* config/arm/elf.h (ASM_OUTPUT_ALIGNED_COMMON): Remove definition.
[official-gcc.git] / gcc / cp / ChangeLog.2
blob26dc387a37ead28dc4d45165e310f3ed2368e541
1 1999-12-31  Mark Mitchell  <mark@codesourcery.com>
3         * cp-tree.h (VF_NORMAL_VALUE): Remove.
4         * class.c (struct base_info): Remove vfield, vfields, and rtti.
5         (set_primary_base): New function, split out from ...
6         (finish_base_struct): ... here.  Rename to ...
7         (determine_primary_base): ... this.  Simplify.
8         (create_vtable_ptr): Tweak accordingly.
9         (finish_struct_1): Simplify.
10         
11         * cp-tree.h (CLASSTYPE_VBASECLASSES): Update documentation.
12         (CLASSTYPE_N_BASECLASSES): Likewise.
13         (BINFO_FOR_VBASE): New macro.
14         (get_vbase_types): Change prototype.
15         * class.c (build_vbase_path): Use BINFO_FOR_VBASE.
16         (prepare_fresh_vtable): Likewise.
17         (finish_vtbls): Likewise.
18         (get_class_offset_1): Likewise.
19         (modify_all_indirect_vtables): Likewise.
20         (build_vbase_pointer_fields): Likewise.
21         * decl.c (xref_basetypes): Don't set CLASSTYPE_VBASECLASSES here.
22         * init.c (sort_base_init): Use BINFO_FOR_VBASE.
23         (expand_member_init): Likewise.
24         * search.c (get_base_distance): Likewise.
25         (lookup_field_queue_p): Likewise.
26         (virtual_context): Likewise.
27         (get_vbase_types): Don't return a value.  Set
28         CLASSTYPE_VBASECLASSES here.
29         * typeck.c (get_delta_difference): Use BINFO_FOR_VBASE.
30         
31 1999-12-30  Mark Mitchell  <mark@codesourcery.com>
33         * class.c (fixup_inline_methods): Clear CLASSTYPE_INLINE_FRIENDS.
35 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
37         * class.c (create_vtable_ptr): Put the vtable at the beginning of
38         the class, not the end, in the new ABI.
39         * tree.c (propagate_binfo_offsets): Do the right thing for the new
40         ABI.
42 1999-12-29  Mark Mitchell  <mark@codesourcery.com>
44         * cp-tree.h (lang_type): Add nearly_empty_p.  Adjust dummy.
45         (CLASSTYPE_NEARLY_EMPTY_P): New macro.
46         * class.c (check_bases): Update CLASSTYPE_NEARLY_EMPTY_P.
47         (check_field_decls): Likewise.
48         (check_bases_and_members): Likewise.
50 1999-12-28  Mark Mitchell  <mark@codesourcery.com>
52         * cp-tree.h (do_inline_function_hair): Remove.
53         * class.c (layout_class_type): New function, split out from
54         finish_struct_1.
55         (fixup_pending_inline): Likewise.
56         (fixup_inline_methods): New function.
57         * method.c (fixup_pending_inline): Remove.
58         (do_inline_function_hair): Likewise.
59         
60         * decl.c (BOOL_TYPE_SIZE): Bools always have size `1' under the
61         new ABI.
62         
63         * cp-tree.h (lang_type): Replace abstract_virtuals with pure_virtuals.
64         (CLASSTYPE_ABSTRACT_VIRTUALS): Rename to ...
65         (CLASSTYPE_PURE_VIRTUALS): ... this.
66         (lang_decl_flags): Replace abstract_virtual with pure_virtual.
67         (DECL_ABSTRACT_VIRTUAL_P): Rename to ...
68         (DECL_PURE_VIRTUAL_P): ... this.
69         (get_abstract_virtuals): Rename to ...
70         (get_pure_virtuals): ... this.
71         * call.c (build_new_method_call): Replace DECL_PURE_VIRTUAL_P with
72         DECL_ABSTRACT_VIRTUAL_P.  Replace CLASSTYPE_ABSTRACT_VIRTUALS with
73         CLASSTYPE_PURE_VIRTUALS.
74         * class.c (build_vtable_entry): Likewise.
75         (finish_struct_bits): Likewise.  Call get_pure_virtuals, not
76         get_abstract_virtuals.
77         (build_vtbl_initializer): Likewise.
78         (override_one_vtable): Likewise.
79         (check_methods): Likewise.
80         * decl.c (duplicate_decls): Likewise.
81         (redeclaration_error_message): Likewise.
82         (lang_mark_tree): Likewise.
83         * decl2.c (grok_function_init): Likewise.
84         (import_export_vtable): Likewise.
85         (import_expor_class): Likewise.
86         * typeck2.c (abstract_virtuals_error): Likewise.
87         * xref.c (GNU_xref_member): Likewise.
88         * search.c (get_abstract_virtuals): Rename to get_pure_virtuals.
89         
90 1999-12-26  Zack Weinberg  <zack@wolery.cumb.org>
92         * cp-tree.h: Replace ENABLE_CHECKING with ENABLE_TREE_CHECKING
93         throughout.
95 1999-12-26  Mark Mitchell  <mark@codesourcery.com>
97         * decl.c (store_return_init): Use mode of old RTL generated for
98         DECL_RESULT, not the mode of DECL_RESULT itself.
99         * semantics.c (finish_named_return_value): Set DECL_UNINLINABLE
100         for functions that used named return values.
101         
102 1999-12-24  Mark Mitchell  <mark@codesourcery.com>
104         * semantics.c (expand_body): Use
105         note_deferral_of_defined_inline_function.
107 1999-12-22  Mark Mitchell  <mark@codesourcery.com>
109         * dump.c (dequeue_and_dump): Handle CTOR_STMTs.
111 1999-12-22  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
113         * error.c (dump_decl): Support named return values.
115 1999-12-20  Mark Mitchell  <mark@codesourcery.com>
117         * cp-tree.h (CLASSTYPE_VFIELD_PARENT): Update comments.
118         (CLASSTYPE_HAS_PRIMARY_BASE_P): New macro.
119         (CLASSTYPE_PRIMARY_BINFO): Likewise.
120         * class.c (check_methods): Don't set TYPE_HAS_COMPLEX_INIT_REF,
121         TYPE_NEEDS_CONSTRUCTING, and CLASSTYPE_NON_AGGREGATE here.
122         (check_bases_and_members): Set them here instead.
123         (create_vtable_ptr): New function, split out from ...
124         (finish_struct_1): ... here.  Use it.  Tidy.  Use
125         CLASSTYPE_HAS_PRIMARY_BASE_P and CLASSTYPE_PRIMARY_BINFO.
126         * search.c (dfs_init_vbase_pointers): Handle seeing TYPE_VFIELD as
127         the first field in the class.
128         * tree.c (layout_basetypes): Use CLASSTYPE_N_BASECLASSES.  Handle
129         seeing TYPE_VFIELD as the first field in the class.
130         
131         * cp-tree.h (TYPE_VIRTUAL_P): Rename to ...
132         (TYPE_POLYMORPHIC_P): ... this.
133         (TYPE_USES_COMPLEX_INHERITANCE): Rename to ...
134         (TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P): ... this.
135         (TREE_CALLS_NEW): Remove.
136         (TREE_MANGLED): Likewise.
137         * call.c (build_vfield_ref): Use TYPE_BASE_CONVS_MAY_REQUIRE_CODE_P,
138         and TYPE_POLYMORPHIC_P.
139         * class.c (check_bases): Likewise.
140         (finish_base_struct): Likewise.
141         (finish_struct_bits): Likewise.
142         (check_for_override): Likewise.
143         (finish_struct_1): Likewise.
144         (get_vfield_name): Likewise.
145         * decl.c (xref_basetypes): Likewise.
146         * decl2.c (import_export_class): Likewise.
147         (import_export_decl): Likewise.
148         * error.c (dump_function_decl): Likewise.
149         * pt.c (instantiate_class_template): Likewise.
150         * repo.c (repo_inline_used): Likewise.
151         * rtti.c (build_headof): Likewise.
152         (get_tinfo_fn_dynamic): Likewise.
153         (build_x_typeid): Likewise.
154         (get_tinfo_var): Likewise.
155         (build_dynamic_cast_1): Likewise.
156         (synthesize_tinfo_fn): Likewise.
157         * search.c (lookup_field_1): Likewise.
158         (dfs_debug_mark): Likewise.
159         (maybe_suppress_debug_info): Likewise.
160         * typeck.c (build_component_ref): Likewise.
161         (build_component_addr): Likewise.
162         * typeck2.c (process_init_constructor): Likewise.
163         
164 1999-12-20  Nathan Sidwell  <nathan@acm.org>
166         * typeck.c (strip_all_pointer_quals): New static function.
167         (build_static_cast): Use it. Don't use at_least_as_qualified_p.
169 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
171         * cp-tree.h (cp_tree_index): Add CPTI_DSO_HANDLE.
172         (dso_handle_node): New macro.
173         (flag_use_cxa_atexit): New variable.
174         (declare_global_var): New function.
175         (start_anon_func): Remove declaration.
176         (end_anon_func): Likewise.
177         * decl.c (get_atexit_node): New function, split out from
178         destroy_local_static.  Handle flag_use_cxa_atexit.
179         (get_dso_handle_node): Likewise.
180         (start_cleanup_fn): Renamed from start_anon_func.  Moved here from
181         except.c.  Handle flag_use_cxa_atexit.
182         (end_cleanup_fn): Renamed from end_anon_func.  Moved here from
183         except.c.
184         (declare_global_var): New variable.
185         (destroy_local_static): Handle flag_use_cxa_atexit.
186         * decl2.c (flag_use_cxa_atexit): New variable.
187         (lang_f_options): Likewise.
188         * except.c (start_anon_func): Remove.
189         (end_anon_func): Liekwise.
190         * lang-options.h: Add -fuse-cxa-atexit and -fno-use-cxa-atexit.
191         * rtti.c (get_tinfo_var): Use declare_global_var.
193 1999-12-16  Mark Mitchell  <mark@codesourcery.com>
195         * class.c (check_field_decls): Don't return a value.
196         (avoid_overlap): Moved here from tree.c.
197         (build_base_fields): Likewise.
198         (check_bases): New function, split out from finish_base_struct.
199         (check_bases_and_members): New function, split out from 
200         finish_struct_1.
201         (struct base_info): Remove cant_have_default_ctor,
202         cant_have_const_ctor, cant_have_asn_ref.
203         (finish_base_struct): Split semantic analysis into check_bases.
204         (finish_struct_methods): Fix bogus assertion.
205         (check_field_decls): Call finish_struct_anon here.
206         (build_vbase_pointer_fields): Use CLASSTYPE_N_BASECLASSES.
207         (finish_struct_1): Use check_bases_and_members.  Reorganize.
208         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
209         (build_base_fields): Don't declare.
210         * tree.c (avoid_overlap): Remove.
211         (build_base_fields): Likewise.
212         
213         * optimize.c (struct inline_data): Remove scope_stmt.
214         (remap_block): Don't use insert_block_after_note.  Don't update
215         scope_stmt.
216         (expand_call_inline): Don't update scope_stmt.
217         (optimize_function): Don't initialize scope_stmt.
218         * semantics.c (expand_stmt): Set NOTE_BLOCK for newly emitted
219         NOTE_INSN_BLOCK_BEG/NOTE_INSN_BLOCK_END notes.
221 1999-12-15  Mark Mitchell  <mark@codesourcery.com>
223         * class.c (handle_using_decl): Get TYPE_FIELDS and TYPE_METHODS
224         out of the class, rather than taking them as parameters.
225         (build_vbase_pointer_fields): Move here from tree.c.
226         (build_vtbl_or_vbase_field): New function.
227         (check_methods): Likewise.
228         (remove_zero_width_bitfields): Likewise.
229         (add_virtual_function): Use tree_cons instead of temp_tree_cons.
230         (delete_duplicate_fields_1): Tidy.  Don't delete duplicate
231         USING_DECLs here.
232         (finish_struct_methods): Handle the case where there are no
233         methods here.
234         (get_basefndecls): Use tree_cons instead of temp_tree_cons.
235         (check_field_decls): Call delete_duplicate_fields here.
236         (finish_struct_1): Tidy.  Use check_methods and
237         remove_zero_width_bitfields.
238         * cp-tree.h (build_vbase_pointer_fields): Remove.
239         * decl.c (grokdeclarator): Use tree_cons instead of
240         temp_tree_cons.
241         * decl2.c (qualified_lookup_using_namespace): Use tree_cons
242         instead of temp_tree_cons.
243         * lex.c (cons_up_default_function): Remove dead code.
244         * method.c (fixup_pending_inline): New function, split out from ...
245         (do_inline_function_hair): ... here.
246         * tree.c (build_vbase_pointer_fields): Remove.
247         
248 1999-12-15  Jason Merrill  <jason@casey.cygnus.com>
250         * tree.c (walk_tree): Walk operand subtrees in forward order.
251         * optimize.c (expand_call_inline): Likewise.
252         (optimize_function): Initialize id->scope_stmt to something useful.
253         (remap_block): Assume id->scope_stmt has a useful value.
255 1999-12-15  Nathan Sidwell  <nathan@acm.org>
257         * typeck.c (build_c_cast): Expand warning message. Move pointer
258         alignment warning to after the cast. Don't warn about pointer
259         alignment when given a pointer to incomplete.
261 1999-12-15  Richard Henderson  <rth@cygnus.com>
263         * cp-tree.h (make_aggr_type): Declare.
264         * lex.c (cp_make_lang_type): Don't SET_IS_AGGR_TYPE.
265         (make_aggr_type): New.
267         * decl.c (build_typename_type, init_decl_processing): Use it.
268         (build_ptrmemfunc_type, xref_tag): Likewise.
269         * except.c (call_eh_info): Likewise.
270         * init.c (init_init_processing): Likewise.
271         * pt.c (process_template_parm, lookup_template_class): Likewise.
272         * rtti.c (expand_class_desc): Likewise.
273         * semantics.c (begin_class_definition, finish_typeof): Likewise.
274         * tree.c (copy_template_template_parm): Likewise.
276 1999-12-15  Jason Merrill  <jason@yorick.cygnus.com>
278         * cp-tree.def (TEMPLATE_PARM_INDEX): Calculate size using
279         sizeof (struct tree_common).
281 1999-12-14  Jason Merrill  <jason@casey.cygnus.com>
283         * optimize.c (expand_call_inline): Set BLOCK_ABSTRACT_ORIGIN on the
284         outermost block to point to the inlined function decl.
286         * error.c (dump_decl): operator==, not operator ==.
287         (op_to_string): Likewise.
289         * decl.c (compute_array_index_type): Handle null name.
291         * decl2.c (ambiguous_decl): Fix to match comment.
292         (lookup_using_namespace): Adjust.
294         * decl2.c (import_export_class): Don't ignore dllimport.
296 1999-12-14  Mark Mitchell  <mark@codesourcery.com>
298         * class.c (check_field_decls): Split out from ...
299         (finish_struct_1): ... here.  Use it.  Tidy.
301         * cp-tree.h (remap_save_expr): Add walk_subtrees parameter.
302         * optimize.c (copy_body_r): Pass it.
303         * tree.c (remap_save_expr): Clear walk_subtrees for an
304         already-handled SAVE_EXPR.
305         (cp_unsave_r): Pass walk_subtrees to remap_save_expr.
307         * dump.c (dequeue_and_dump): Dump DECL_NAMESPACE_ALIAS.
308         * ir.texi (DECL_NAMESPACE_ALIAS): Document it.
310         * error.c (dump_expr): Handle EXPR_WITH_FILE_LOCATION.
312 1999-12-14  Mumit Khan  <khan@xraylith.wisc.edu>
314         * class.c (finish_base_struct): Allow multiple COM base classes
315         as well as non-COM bases as long as it's not the leftmost.
317 1999-12-13  Mumit Khan  <khan@xraylith.wisc.edu>
319         * lex.c (saving_parse_to_obstack): New global.
320         (reinit_parse_for_block): Use.
321         (reinit_parse_for_expr): Use.
322         (check_newline): Use.
324 1999-12-13  Mark Mitchell  <mark@codesourcery.com>
326         * optimize.c (initialize_inlined_parameters): Take FN to which the
327         parameters belong as an argument.
328         (expand_call_inline): Expand calls into the parameter
329         initializations before pushing the function onto the list of
330         functions we are presently expanding.
332 1999-12-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
334         * class.c (get_vtable_name): Use a literal format string and
335         VTABLE_NAME_PREFIX macro instead of VTABLE_NAME_FORMAT.
336         (prepare_fresh_vtable): Likewise.
338         * cp-tree.h (VTABLE_NAME_PREFIX): Define this instead of
339         VTABLE_NAME_FORMAT.
341         * decl.c (make_rtl_for_local_static): Remove unused variable `type'.
343         * init.c (build_vec_init): Initialize variable `try_body'.
345         * lex.c (yyerror): Don't call a variadic function with a
346         non-literal format string.
348         * optimize.c (optimize_function): Call memset, not bzero.
350         * pt.c (for_each_template_parm_r): Add static prototype.
352 1999-12-09  Andreas Jaeger  <aj@suse.de>
354         * except.c (expand_throw): Add static attribute to match
355         prototype.
357         * Makefile.in (semantics.o): Add dependency on output.h.
358         * semantics.c: Include output.h for declaration of
359         make_function_rtl.
361 1999-12-09  Mark Mitchell  <mark@codesourcery.com>
363         * decl.c (init_decl_processing): Reenable inlining on trees.
364         (finish_function): Likewise.
365         * expr.c (cplus_expand_expr): Don't handle AGGR_INIT_EXPR here.
366         * semantics.c (simplify_aggr_init_exprs): New function.
367         (expand_body): Use it.
368         * tree.c (walk_tree): Special-case TARGET_EXPRs since they
369         sometimes present the same sub-tree twice.
370         
371         * dump.c (dequeue_and_dump): Abbreviate `class' as `cls', not
372         `csl'.
374         * semantics.c (finish_switch_cond): Do conversions here, not ...
375         * typeck.c (c_expand_start_case): Here.
377         * semantics.c (do_poplevel): Remove unused variable.
378         
379 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
381         * tree.c (walk_tree): Don't recurse into DECL_INITIAL or DECL_SIZE
382         unless we're declaring the variable in question.
384 1999-12-06  Mark Mitchell  <mark@codesourcery.com>
386         * decl.c (init_decl_processing): #if 0 last patch.
387         (finish_function): Likewise.
389 1999-12-05  Mark Mitchell  <mark@codesourcery.com>
391         * decl.c (init_decl_processing): Set flag_inline_trees if
392         !flag_no_inline.
394         * cp-tree.h (calls_setjmp_p): Declare.
395         * decl.c (finish_function): Mark functions that call setjmp as
396         uninlinable.
397         * optimize.c (calls_setjmp_r): New function.
398         (calls_setjmp_p): Likewise.
400 1999-12-04  Mark Mitchell  <mark@codesourcery.com>
402         * optimize.c (expand_call_inline): Wrap the expanded call in an
403         EXPR_WITH_FILE_LOCATION node to get correct line numbers for
404         inlined functions.
406         * optimize.c (inline_data): Remove fns_top.  Add scope_stmt.  Add
407         in_target_cleanup_p.
408         (remap_decl): New function.
409         (remap_block): Likewise.
410         (copy_scope_stmt): Likewise.
411         (copy_body_r): Use remap_decl and copy_scope_stmt.
412         (copy_body): Use VARRAY_TOP_TREE.
413         (initialize_inlined_parameters): Likewise.
414         (declare_return_variable): Likewise.
415         (inlinable_function_p): Check flag_inline_trees.
416         (expand_call_inline): Handle SCOPE_STMTs and TARGET_EXPRs
417         specially.  Use VARRAY_PUSH_TREE.  Create a BLOCK for the
418         parameters of the inlined function.
419         (optimize_function): Prevent recursion into partially complete
420         functions.
421         
422         * cp-tree.def (SCOPE_STMT): Take one operand.
423         * cp-tree.h (SCOPE_STMT_BLOCK): New macro.
424         (SCOPE_NULLIFIED_P): Redefine.
425         (SCOPE_NO_CLEANUPS_P): New macro.
426         (add_scope_stmt): Change prototype.
427         * decl.c (poplevel): Tidy.  Warn about unused variables here.
428         Record SCOPE_STMT_BLOCKs.
429         (finish_function): Keep DECL_INITIAL for functions that might be
430         inlined.
431         * ir.texi: Document SCOPE_NO_CLEANUPS_P.
432         * semantics.c: Include rtl.h.
433         (add_scope_stmt): Return the new scope statement and, for an
434         end-of-scope statement, its matching begin statement.  Don't set
435         SCOPE_NULLIFIED_P.
436         (do_pushlevel): Simplify, now that we are always
437         function-at-a-time.
438         (do_poplevel): Likewise.  Record SCOPE_STMT_BLOCKs.
439         (expand_stmt): Don't call expand_start_bindings or
440         expand_end_bindings for a scope with SCOPE_NO_CLEANUPS_P set.
441         * tree.c (copy_tree_r): Clear SCOPE_STMT_BLOCK rather than setting
442         SCOPE_NULLIFIED_P.
443         * Makefile.in (semantics.o): Depend on RTL_H.
444         
445         * decl2.c (pending_statics_used): Make it a macro.
446         (saved_inlines_used): Likewise.
447         (finish_static_data_member_decl): Use VARRAY_PUSH_TREE.
448         (mark_inline_for_output): Likewise.
449         (ssdf_decls_used): Remove.
450         (start_static_storage_duration_function): Use VARRAY_PUSH_TREE.
451         (generate_ctor_or_dtor_function): Adjust accordingly.
452         
453 1999-11-24  Geoffrey Keating  <geoffk@cygnus.com>
454             Greg McGary  <gkm@gnu.org>
456         * decl.c (duplicate_decls): Merge
457         DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT,
458         DECL_NO_CHECK_MEMORY_USAGE, DECL_NO_LIMIT_STACK.
460 1999-12-02  Mike Stump  <mrs@wrs.com>
462         * init.c (perform_member_init): Handle parse errors better.
464 1999-12-01  Mark Mitchell  <mark@codesourcery.com>
466         * cp-tree.h (min_tree_cons): Remove.
467         (scratch_ovl_cons): Likewise.
468         * decl.c (saveable_obstack): Don't declare.
469         (duplicate_decls): Tweak error-message.
470         (initialize_local_var): Explicitly mark the definition as static.
471         (finish_function): Call permanent_allocation, just so
472         that the middle-end sees the obstacks it expects.
473         (mark_cp_function_context): Likewise.
474         * init.c (build_new): Don't use min_tree_cons.
475         * lex.c (permanent_obstack): Don't declare.
476         (current_obstack, saveable_obstack): Likewise.
477         * spew.c (current_obstack, saveable_obstack): Likewise.
478         * tree.c (current_obstack, saveable_obstack): Likewise.
479         (scratch_ovl_cons): Remove.
480         (build_min_nt): Don't mess with obstacks.
481         (build_min): Likewise.
482         (min_tree_cons): Remove
483         * typeck.c (build_component_ref): Don't use scratch_ovl_cons.
484         (build_x_function_call): Likewise.
485         (build_c_cast): Don't use min_tree_cons.
486         
487 1999-11-29  Mark Mitchell  <mark@codesourcery.com>
489         * pt.c (tsubst_decl): Robustify.
491 1999-11-27  Mark Mitchell  <mark@codesourcery.com>
493         * decl2.c (finish_file): Call expand_body for inline functions
494         that will be written out but that do not yet have RTL.
495         * semantics.c (expand_body): Do not generate RTL For inline
496         functions that do not yet need to be written out.
498 1999-11-25  Mark Mitchell  <mark@codesourcery.com>
500         * Make-lang.in (CXX_SRCS): Add optimize.c.  
501         * Makefile.in (CXX_OBJS): Add optimize.o.
502         (CXX_TREE_H): Add splay-tree.h, system.h, and $(CONFIG_H).
503         (spew.o, lex.o, decl.o, decl2.o, typeck2.o, typeck.o): Adjust.
504         (class.o, call.o, friend.o, init.o, method.o, cvt.o): Likewise.
505         (search.o, tree.o, ptree.o, rtti.o, except.o, expr.o): Likewise.
506         (xref.o, pt.o, error.o, errfn.o, repo.o, semantics.o): Likewise.
507         (dump.o): Likewise.
508         (optimize.o): New target.  
509         * class.c: Don't include splay-tree.h.
510         * cp-tree.def (CTOR_COMPLETE): Rename to CTOR_STMT.  
511         * cp-tree.h: Include splay-tree.h.
512         (DECL_UNINLINABLE): New macro.
513         (CTOR_BEGIN_P, CTOR_END_P): New macros.
514         (flag_inline_trees): New variable.
515         (local_variable_p): New function.
516         (nonstatic_local_decl_p): Likewise.
517         (optimize_function): Likewise.
518         (cplus_unsave_expr_now): Remove.
519         (copy_tree_r): Declare.
520         (remap_save_expr): Likewise.  
521         * decl.c (local_variable_p): Don't
522         make it static.
523         (local_variable_p_walkfn): New function.
524         (make_rtl_for_local_static): Remove code to try to avoid writing
525         out static constants.
526         (emit_local_var): Fix indentation.
527         (nonstatic_local_decl_p): New function.
528         (check_default_argument): Use local_variable_p_walkfn, not
529         local_variable_p, when walking the tree.
530         (start_function): Set the DECL_CONTEXT for automatically generated
531         labels.
532         (finish_constructor_body): Use CTOR_STMT to mark the end of a
533         constructor.  
534         * decl2.c: Don't include splay-tree.h.
535         (flag_inline_trees): Define.  
536         * dump.c: Don't include
537         splay-tree.h.  
538         * except.c (expand_end_catch_block): Fix comment formatting.
539         (expand_end_eh_spec): Set DECL_CONTEXT on temporary variables.
540         (expand_throw): Tidy comment.  
541         * init.c (build_vec_delete_1): Use create_temporary_var.  
542         * lex.c (cplus_tree_code_type): Make it static.
543         (cplus_tree_code_length): Likewise.
544         (cplus_tree_code_name): Likewise.  
545         * optimize.c: New file.  
546         * semantics.c (finish_goto_stmt): Set DECL_UNLINABLE for functions
547         with computed gotos.
548         (setup_vtbl_ptr): Mark the beginnings of constructors with
549         CTOR_STMT.
550         (expand_stmt): Handle CTOR_STMT, not CTOR_COMPLETE.
551         (expand_body): Call optimize_function.  Save bodies if we're doing
552         inlining on trees.
553         * tree.c: Don't include splay-tree.h.  Include insn-config.h and
554         integrate.h.
555         (copy_tree_r): Make it public.
556         (statement_code_p): New function.
557         (mark_local_for_remap_r): Likewise.
558         (cp_usave_r): Likewise.
559         (cp_unsave): Likewise.
560         (build_cplus_new): Set DECL_CONTEXT for temporary variables.
561         (walk_tree): Walk into `s' class nodes.  Walk statement chains.
562         (copy_tree_r): Handle 's' class nodes.  Restore chains for
563         statements.  Nullify scopes.  Don't copy types.
564         (init_tree): Set lang_unsave to cp_unsave.
565         (remap_save_expr): Define.
566         * ir.texi: Document CTOR_STMT.
567         
568 1999-11-24  Jason Merrill  <jason@casey.cygnus.com>
570         * search.c (note_debug_info_needed): Do perform this optimization
571         for dwarf2.  
572         (maybe_suppress_debug_info): Likewise.  Start by clearing
573         TYPE_DECL_SUPPRESS_DEBUG.
575 1999-11-24  Mark Mitchell  <mark@codesourcery.com>
577         * pt.c (tsubst_decl): Copy TREE_ASM_WRITTEN for VAR_DECLs.
579         * decl2.c (finish_vtable_vardecl): Don't prune vtables here.
581 1999-11-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
583         * decl.c (pushdecl, grokdeclarator): Don't call a variadic
584         function with a non-literal format string.
586         * lex.c (do_identifier): Likewise.
588         * typeck.c (build_unary_op): Likewise.
590 1999-11-23  Mark Mitchell  <mark@codesourcery.com>
592         * cp-tree.h (DECL_NEEDED_P): Tweak to match documentation.
594 1999-11-22  Mark Mitchell  <mark@codesourcery.com>
596         * cp-tree.def (CTOR_COMPLETE): New tree node.
597         * decl.c (finish_constructor_body): Add it, to mark the end of the
598         constructor.
599         (finish_function): Don't call end_protect_partials here.
600         * ir.texi (CTOR_COMPLETE): Document it.
601         * semantics.c (expand_stmt): Handle it.
602         
603         * cp-tree.def (FUNCTION_NAME): New tree node.
604         * cp-tree.h (current_function_name_declared): Tweak documentation.
605         (lang_decl_flags): Add pretty_function_p, adjust dummy.
606         (DECL_PRETTY_FUNCTION_P): New macro.
607         * decl.c (cp_finish_decl): Handle declarations of __FUNCTION__,
608         etc., in a template function.  Use at_function_scope_p instead of
609         expanding it inline.
610         * pt.c (tsubst_decl): Handle DECL_PRETTY_FUNCTION_P declarations
611         specially.
612         (tsubst): Handle FUNCTION_NAME.
613         (tsubst_copy): Likewise.
614         (instantiate_decl): Prevent redeclarations of __PRETTY_FUNCTION__,
615         etc. in instantiation.
616         * semantics.c (begin_compound_stmt): Declare __FUNCTION__, etc.,
617         even in template functions.
618         (setup_vtbl_ptr): Don't declare __PRETTY_FUNCTION in the
619         conditional scope at the top of a destructor.
620         
621         * error.c (dump_function_decl): Use `[ with ... ]' syntax for
622         specializations too.
624 1999-11-22  Nathan Sidwell  <nathan@acm.org>
626         * semantics.c (finish_unary_op_expr): Only set TREE_NEGATED_INT
627         when actually negative.
629         * typeck.c (convert_for_assignment): Expand comment about
630         strange NULL check, moved from ...
631         (convert_for_initialization): ... here. Remove unneeded
632         code.
634 1999-11-21  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
636         * cp-tree.h (build_vec_delete): Remove `auto_delete' argument.
637         * init.c (build_vec_delete, build_vec_delete_1): Likewise.
638         Always destruct virtual bases of array components, but never
639         delete them.
640         (build_vec_init): Adjust invocations.
641         (build_delete): Likewise.
642         * decl2.c (delete_sanity): Likewise.
644 1999-11-19  Nathan Sidwell  <nathan@acm.org>
646         * cp-tree.h (grok_method_quals): Return this pointer qualifiers.
647         * decl.c (grokdeclarator): Adjust calls to grok_method_quals.
648         * decl2.c (grok_method_quals): Accept `restrict' as applying to
649         the object pointer. Return such qualifiers.
650         (grokclassfn): Apply this pointer qualifiers. Cleanup unused
651         variables.
653 1999-11-18  Mark Mitchell  <mark@codesourcery.com>
655         * except.c (expand_end_catch_block): Fix typo.
656         (expand_exception_blocks): Simplify.  Don't call
657         expand_leftover_cleanups.
659 1999-11-15  Jason Merrill  <jason@casey.cygnus.com>
661         * cp-tree.h, decl.c (compute_array_index_type): Make nonstatic.
662         * pt.c (tsubst, case INTEGER_TYPE): Call it.  
663         Check uses_template_parms.
665         * class.c (finish_struct): If we're a local class in a template
666         function, add a TAG_DEFN.
667         * pt.c (lookup_template_class): If this is a local class in a
668         template function, call pushtag.
669         (tsubst_expr, case TAG_DEFN): Handle classes, too.
671         Emit debug info with the vtable.
672         * search.c (maybe_suppress_debug_info): New function...
673         * class.c (finish_struct_1): ...split out from here.
674         * cp-tree.h: Declare it.
675         * decl2.c (finish_vtable_vardecl): Override TYPE_DECL_SUPPRESS_DEBUG
676         if we're writing out the vtable.
677         * decl.c, search.c (dfs_debug_mark, dfs_debug_unmarked_p, 
678         note_debug_info_needed): #if 0 out.
680 1999-11-14  Mark Mitchell  <mark@codesourcery.com>
682         * cp-tree.h (DECL_LOCAL_FUCNTION_P): New macro.
683         * call.c (equal_functions): Use DECL_LOCAL_FUCNTION_P, not
684         TREE_PERMANENT.
685         * decl.c (pushdecl): Set DECL_LOCAL_FUNCTION_P.
686         * decl2.c (lookup_arg_dependent): Use it.
687         
688         * cp-tree.h (cp_finish_decl): Change prototype.
689         (finish_static_data_member_decl): Likewise.
690         (push_permanent_obstack): Remove declaration.
691         (push_expression_obstack): Likewise.
692         (push_scratch_obstack): Likewise.
693         (DECL_TEMPLATE_PARM_P): Robustify.
694         (SET_DECL_TEMPLATE_PARM_P): New macro.
695         * class.c (add_method): Don't manipulate obstacks.
696         (finish_vtbls): Likewise.
697         * cvt.c (build_up_reference): Adjust calls to cp_finish_decl.
698         * decl.c (binding_for_name): Don't manipulate obstacks.
699         (maybe_push_to_top_level): Likewise.
700         (pop_from_top_level): Likewise.
701         (duplicate_decls): Likewise.
702         (pushdecl): Likewise.
703         (implicitly_declare): Likewise.
704         (build_typename_type): Likewise.
705         (start_decl): Likewise.
706         (cp_finish_decl): Likewise.
707         (finish_decl): Likewise.
708         (destroy_local_static): Likewise.
709         (expand_static_init): Likewise.
710         (complete_array_type): Likewise.
711         (grokvardecl): Likewise.
712         (build_ptrmemfnc_type): Likewise.
713         (grokdeclarator): Likewise.
714         (xref_tag): Likewise.
715         (xref_basetypes): Likewise.
716         (start_enum): Likewise.
717         (finish_enum): Likewise.
718         (start_function): Likewise.
719         (finish_function): Likewise.
720         (start_method): Adjust call to cp_finish_decl.
721         * decl2.c (finish_static_data_member_decl): Don't manipulate
722         obstacks.
723         (grokfield): Likewise.
724         (grokbitfield): Likewise.
725         (get_temp_name): Likewise.
726         (get_sentry): Likewise.
727         (fnish_file): Likewise.
728         (lookup_arg_dependent): Likewise.
729         * except.c (call_eh_info): Likewise.
730         (push_eh_info): Likewise.
731         (do_pop_exception): Likewise.
732         (initialize_handler_parm): Likewise.
733         (expand_end_eh_spec): Likewise.
734         (alloc_eh_object): Likewise.
735         (expand_throw): Likewise.
736         * expr.c (extract_scalar_init): Likewise.
737         * init.c (build_java_class_ref): Likewise.
738         * lex.c (get_time_identifier): Likewise.
739         (snarf_defarg): Likewise.
740         (add_defarg_fn): Likewise.
741         (is_global): Simplify.
742         (do_identifier): Don't check TREE_PERMANENT.
743         * method.c (emit_thunk): Don't manipulate obstacks.
744         * parse.y (condition): Adjust call to cp_finish_decl.
745         (primary): Likewise.
746         (initdcl): Likewise.
747         (initdcl0_innards): Likewise.
748         (nomods_initdcl0): Likewise.
749         * pt.c (push_inline_template_parms_recursive): Use
750         SET_DECL_TEMPLATE_PARM_P.
751         (process_template_parm): Likewise.
752         (lookup_template_class): Don't manipulate obstacks.
753         (instantiate_class_template): Adjust call to
754         finish_static_data_member_decl.
755         (tsubst_decl): Don't manipulate obstacks.
756         (tsubst_expr): Likewise.
757         (instantiate_template): Likewise.
758         (instantiate_decl): Adjust calls to cp_finish_decl.
759         * rtti.c (call_void_fn): Don't manipulate obstacks.
760         (get_tinfo_var): Likewise.
761         (get_tinfo_fn_unused): Likewise.
762         (build_dynamic_cast_1): Likewise.
763         (expand_si_desc): Likewise.
764         (expand_class_desc): Likewise.
765         (expand_ptr_desc): Likewise.
766         (expand_attr_desc): Likewise.
767         (expand_generic_desc): Likewise.
768         (synthesize_tinfo_fn): Likewise.
769         * search.c (expand_upcast_fixups): Likewise.
770         * semantics.c (finish_asm_stmt): Likewise.
771         (finish_named_return_value): Likewise.
772         (begin_class_definition): Likewise.
773         (finish_class_definition): Likewise.
774         (finish_typeof): Likewise.
775         * tree.c (build_cplus_method_type): Likewise.
776         (reverse_path): Likewise.
777         (copy_template_template_parm): Likewise.
778         (build_expr_ptr_wrapper): Likewise.
779         (push_expression_obstack): Remove.
780         (push_permanent_obstack): Likewise.
781         * typeck.c (mark_addressable): Likewise.
782         
783 1999-11-13  Mark Mitchell  <mark@codesourcery.com>
785         * call.c (build_conditional_expr): Use build_target_expr_with_type.
786         (convert_like): Likewise.
787         (build_over_call): Likewise.
788         * cp-tree.h (build_target_expr): Remove.
789         (build_target_expr_with_type): New function.
790         * cvt.c (build_up_reference): Use get_target_expr.
791         * decl.c (build_target_expr): Move to ...
792         * tree.c (build_target_expr): Here.  Make it static.
793         (build_target_expr_with_type): New function.  Set DECL_CONTEXT on
794         the temporary VAR_DECLs.
795         (get_target_expr): Use it.
797 1999-11-13  Jason Merrill  <jason@yorick.cygnus.com>
799         * decl.c (duplicate_decls): Propagate DECL_DEFER_OUTPUT.
800         * decl2.c (comdat_linkage): Set DECL_DEFER_OUTPUT.
801         * rtti.c (get_tinfo_fn_unused): Split out from get_tinfo_fn.
802         * class.c (set_rtti_entry): Use it.
804 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
806         * decl.c (cplus_expand_expr_stmt): Don't call break_out_cleanups
807         here.
808         * semantics.c (finish_expr_stmt): Call it here instead.  Move
809         default_conversion logic to semantic-analysis time.
811 1999-11-12  Jason Merrill  <jason@yorick.cygnus.com>
813         * rtti.c (synthesize_tinfo_fn): Set DECL_DEFER_OUTPUT.
815 Fri Nov 12 12:56:32 MST 1999    Diego Novillo <dnovillo@cygnus.com>
817         * init.c (init_init_processing): Re-instated Nov 11 patch after
818         approval.
820 Fri Nov 12 10:42:02 MST 1999    Diego Novillo <dnovillo@cygnus.com>
822         * init.c (init_init_processing): Undo patch from Nov 11, 1999.
823         Patch had not been approved yet.
825 1999-11-12  Mark Mitchell  <mark@codesourcery.com>
827         * decl.c (compute_array_index_type): New function, split out from
828         grokdeclarator.
829         (create_array_type_for_decl): Likewise.
830         (grokdeclarator): Use them.
832         * semantics.c (expand_stmt): Don't suspend_momentary or
833         resume_momentary.
835 Thu Nov 11 12:42:11 MST 1999    Diego Novillo <dnovillo@cygnus.com>
837         * init.c (init_init_processing): Header information for
838         arrays allocated via `new' should have the same alignment used by
839         malloc.
841 1999-11-10  Mark Mitchell  <mark@codesourcery.com>
843         * error.c (dump_function_name): Don't crash if given a friend
844         pseudo-instantiation.
846         * cp-tree.h (build_enumerator): Change prototype.
847         * decl.c (enum_next_value): Remove.
848         (enum_overflow): Likewise.
849         (init_decl_processing): Don't register enum_next_value as a root.
850         (start_enum): Clear TYPE_VALUES for a redefined enum.
851         (finish_enum): Reset the type of enumeration constants.
852         (build_enumerator): Fix indentation.  Don't copy CONST_DECLs when
853         we don't need to.  Maintain the TYPE_VALUES list and look there
854         for the previously defined enumeration constant.  Let enumeration
855         constants have the type of their values until the enumeration type
856         is complete.
857         * parse.y (enumlist_opt, enumlist, enumerator): Don't return a value.
858         (structsp): Adjust.
859         * parse.c: Regenerated.
860         * pt.c (tsubst_enum): Adjust according to build_enumerator changes.
861         
862 Wed Nov 10 12:43:21 1999  Philippe De Muyter  <phdm@macqel.be>
863                           Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
865         * cp-tree.h: Test `GCC_VERSION', not `HAVE_GCC_VERSION'.
867 1999-11-09  Mark Mitchell  <mark@codesourcery.com>
869         * cp-tree.h (language_function): Remove x_last_dtor_insn and
870         x_last_parm_cleanup_insn.
871         * decl.c (last_dtor_insn): Remove.
872         (last_parm_cleanup_insn): Likewise.
873         (expand_start_early_try_stmts): Don't set them.
874         (store_parm_decls): Likewise.
875         (save_function_data): Or save them.
876         (mark_lang_function): Or mark them.
878 1999-11-08  Mark Mitchell  <mark@codesourcery.com>
880         * decl.c (store_parm_decls): Generate cleanup code at
881         semantic-analysis time.  Destroy objects in the correct order.
883 1999-11-07  Mark Mitchell  <mark@codesourcery.com>
885         * cp-tree.h (begin_new_placement): Remove.
886         (finish_new_placement): Likewise.
887         * class.c (finish_struct_1): Don't suspend_momentary or
888         resume_momentary.
889         * decl.c (grokdeclarator): Likewise.
890         (maybe_build_cleanup_1): Likewise.
891         * except.c (push_eh_cleanup): Likewise.
892         (build_terminate_handler): Likewise.
893         * init.c (build_new_1): Likewise.
894         * parse.y (parse_decl): Change prototype.
895         (initdecls, notype_initdecls, initdcl): Don't return int.
896         (initdcl0, notype_initdcl0, initdcl0_innards): Likewise.
897         (.begin_new_placement): Remove.
898         (.finish_new_placement): Likewise.
899         (nonmomentary_expr): Likewise.
900         (suspend_mom): Likewise.
901         (condition): Don't suspend_momentary, resume_momentary, or keep
902         track of need to resume.
903         (unary_expr): Likewise.
904         (new_placement): Likewise.
905         (decl): Likewise.
906         (structsp): Likewise.
907         (new_type_id): Likewise.
908         (maybe_parmlist): Likewise.
909         (direct_after_type_declaration): Likewise.
910         (direct_new_declarator): Likewise.
911         (direct_abstract_declaration): Likewise.
912         * parse.c: Regenerated.
913         * pt.c (tsubst_expr): Don't suspend_momentary or resume_momentary.
914         * semantics.c (begin_new_placement): Remove.
915         (finish_new_placement): Likewise.
916         
917 1999-11-05  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
919         * cp-tree.h (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK): New macro.
920         (DECL_TEMPLATE_INFO): Use it.
921         * decl.c (warn_extern_redeclared_static): Do nothing for
922         TEMPLATE_DECLs.
923         * decl2.c (mark_used): Explicitly check for function or variable.
924         * semantics.c (finish_unary_op_expr): Check whether result is also
925         an INTEGER_CST.
927 1999-11-05  Mark Mitchell  <mark@codesourcery.com>
929         * Makefile.in (typeck2.o): Depend on output.h.
930         * typeck2.c: Include output.h.
932         * decl.c (flag_ansi): Remove declaration.
934         * pt.c (tinst_level_tick): Make it static.
935         (last_template_error_tick): Likewise.
936         
937         * cp-tree.h (mapcar): Remove declaration.
938         (search_tree): Likewise.
939         (walk_tree_fn): New typedef.
940         (walk_tree): New function.
941         * tree.c (bot_manip): Change prototype.  Adjust to be called via
942         walk_tree.
943         (bot_replace): Likewise.
944         (no_linkage_helper): Likewise.
945         (copy_tree_r): New function.
946         (search_tree): Rename, and adjust, to become ...
947         (walk_tree): New function.
948         (mapcar): Remove.
949         (target_remap): Remove.
950         (target_remap_count): Likewise.
951         (break_out_target_exprs): Use walk_tree.
952         * decl.c (local_variable_p): Change prototype.
953         (check_default_argument): Use walk_tree.
954         * pt.c (for_each_template_parm_r): New function, split out from ...
955         (for_each_template_parm): Here.  Use it, via walk_tree.
956         
957 1999-11-03  Mark Mitchell  <mark@codesourcery.com>
959         * class.c (check_bitfield_decl): New function, split out from
960         finish_stuct_1.
961         (check_field_decl): Likewise.  Recursively examine members of
962         anonymous structs.
963         (finish_struct_1): Use them.
964         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
965         
966 1999-11-02  Mark Mitchell  <mark@codesourcery.com>
968         * decl.c (grokfndecl): Remove dead code.
970         * dump.c (dequeue_and_dump): Fix thinko for catch-clauses.
972 1999-11-02  Scott Snyder  <snyder@fnal.gov>
974         * decl2.c (build_expr_from_tree): Handle REALPART_EXPR and
975         IMAGPART_EXPR.
976         * pt.c (tsubst_copy): Likewise.
978 1999-11-01  Jason Merrill  <jason@yorick.cygnus.com>
980         * decl2.c (maybe_make_one_only): Always make things comdat on
981         ELF targets, too.
983 1999-10-31  Mark Mitchell  <mark@codesourcery.com>
985         * decl.c (finish_function): Call free_after_parsing for functions
986         we are not immediately turning into RTL.
988 1999-10-31  Brendan Kehoe  <brendan@cygnus.com>
990         * cp-tree.h (flag_dump_translation_unit): Add decl.
992 Sat Oct 30 22:42:50 1999  Stephen L Moshier <moshier@mediaone.net>
994         * lex.c (yylex): Accept 'f' in mantissa of hex float constant.
996 1999-10-30  Mark Mitchell  <mark@codesourcery.com>
998         * decl.c (pop_cp_function_context): Don't call free on a NULL
999         pointer.
1000         * semantics.c: Include ggc.h.
1001         (expand_body): Do garbage-collection after processing a template
1002         function.  Clear DECL_SAVED_TREE after generating RTL for a
1003         function.
1004         * Makefile.in (semantics.o): Depend on ggc.h.
1005         
1006 1999-10-29  Mark Mitchell  <mark@codesourcery.com>
1008         * cp-tree.h (make_typename_type): Change prototype.
1009         * decl.c (make_typename_type): Only complain if so requested.
1010         * parse.y (nested_name_specifier): Adjust calls.
1011         (typename_sub0): Likewise.
1012         (typename_sub1): Likewise.
1013         * parse.c: Regenerated.
1014         * pt.c (convert_template_argument): Pass complain to
1015         make_typename_type.
1016         (tsubst): Likewise.
1017         
1018 1999-10-28  Mark Mitchell  <mark@codesourcery.com>
1020         * semantics.c (finish_handler): End the scope of the handler
1021         before attaching it to the statement-tree.
1023 1999-10-28  Ian Lance Taylor  <ian@zembu.com>
1025         * rtti.c (build_dynamic_cast_1): Give a better error message for
1026         an attempt to dynamic_cast from a non-polymorphic type.
1028 1999-10-27  Mark Mitchell  <mark@codesourcery.com>
1030         * cp-tree.h (make_temp_vec): Remove.
1031         (make_scratch_vec): Likewise.
1032         * call.c (add_function_candidate): Use make_tree_vec.
1033         (add_conv_candidate): Likewise.
1034         (build_builtin_candidate): Likewise.
1035         (add_template_candidate_real): Likewise.
1036         * class.c (resolve_address_of_overloaded_function): Likewise.
1037         * decl.c (start_function): Don't fool with the momentary obstack.
1038         (finish_function): Likewise.
1039         * init.c (expand_direct_vtbls_init): Likewise.
1040         (begin_init_stmts): Likewise.
1041         (finish_init_stmts): Likewise.
1042         * pt.c (add_to_template_args): Use make_tree_vec.
1043         (check_explicit_specialization): Likewise.
1044         (coerce_template_parms): Likewise.
1045         (lookup_template_class): Don't fool with the momentary obstack.
1046         (instantiate_class_template): Likewise.
1047         (tsubst_template_arg_vector): Use make_tree_vec.
1048         (tsubst_aggr_type): Don't fool with the momentary obstack.
1049         (tsubst_decl): Likewise.  Use make_tree_vec.
1050         (try_one_overload): Likewise.
1051         (try_class_unification):  Don't fool with the momentary obstack.
1052         (get_bindings_real): Use make_tree_vec.
1053         (set_mangled_name_for_template_decl): Likewise.
1054         * rtti.c (synthesize_tinfo_fn): Don't fool with the momentary obstack.
1055         * semantics.c (finish_expr_stmt): Likewise.
1056         (finish_do_stmt): Likewise.
1057         (finish_for_expr): Likewise.
1058         (finish_switch_cond): Likewise.
1059         (do_pushlevel): Likewise.
1060         (do_poplevel): Likewise.
1061         * tree.c (make_temp_vec): Remove.
1062         
1063         * dump.c (dequeue_and_dump): Dump HANDLERs and SAVE_EXPRs.  Dump
1064         CLEANUP_P for a TRY_BLOCK.
1065         * ir.texi: Document SAVE_EXPR.
1067 Tue Oct 26 23:29:56 1999  Jeffrey A Law  (law@cygnus.com)
1069         * call.c (build_over_call):  Check that the built-in function is
1070         of class BUILT_IN_NORMAL before trying to recongize it as BUILT_IN_ABS.
1071         * typeck.c (build_function_call_real): Similarly. 
1073 1999-10-26  Mark Mitchell  <mark@codesourcery.com>
1075         * decl.c (poplevel): Don't set BLOCK_TYPE_TAGS.  Don't call
1076         remember_end_note.
1078 1999-10-24  Mark Mitchell  <mark@codesourcery.com>
1080         * decl.c (push_overloaded_decl_1): Use pushdecl.
1081         
1082         * decl.c (auto_function): Replace #ifdef'd __inline with just
1083         plain inline.
1084         * lex.c (my_get_run_time): Likeise.
1085         (yyprint): Likewise.
1086         (identifier_type): Likewise.
1087         * method.c (start_squangling): Likewise.
1088         (end_squangling): Likewise.
1089         (icat): Likewise.
1090         (old_backref_index): Likewise.
1091         (flush_repeats): Likewise.
1092         (issue_ktype): Likewise.
1093         * parse.y (empty_parms): Likewise.
1094         * parse.c: Regenerated.
1095         
1096 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
1098         * dump.c (dequeue_and_dump): Replace several uses of
1099         queue_and_dump_index with dump_child.
1101 1999-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1103         * expr.c: Include tm_p.h.
1105 1999-10-21  Mark Mitchell  <mark@codesourcery.com>
1107         * cp-tree.h (SCOPE_PARTIAL_P): New macro.
1108         (pushlevel_temporary): Remove.
1109         (add_scope_stmt): New function.
1110         * decl.c (pushlevel_temporary): Remove.
1111         (poplevel): Use add_scope_stmt.
1112         (start_decl_1): Likewise.
1113         * semantics.c (add_scope_stmt): New function.
1114         (do_pushlevel): Use it.
1115         (do_poplevel): Use it.
1116         (expand_stmt): Check SCOPE_PARTIAL_P.
1117         
1118         * cp-tree.def (EMPTY_CLASS_EXPR): New tree node.
1119         * call.c (build_call): Use EMPTY_CLASS_EXPR instead of RTL_EXPR.
1120         * expr.c (cplus_expand_expr): Expand it.
1121         * ir.texi: Document EMPTY_CLASS_EXPR.
1122         
1123 1999-10-20  Mark Mitchell  <mark@codesourcery.com>
1125         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): Don't treat template
1126         parameters as having namespace scope.
1128 1999-10-19  Mark Mitchell  <mark@codesourcery.com>
1130         * method.c (PARM_CAN_BE_ARRAY_TYPE): Remove.
1131         (mangling_flags): New type.
1132         (build_overload_int): Change prototype.
1133         (build_overload_value): Likewise.
1134         (numeric_output_need_bar): Improve comment.
1135         (mangle_expression): New function, broken out from ...
1136         (build_overload_int): Here.
1137         (build_overload_value): Adjust for use of mangling flags.  Don't
1138         warn about real-valued template parameters here.  Do handle
1139         complex expressions involving real-valued template parameters.
1140         (build_template_parm_names): Encase non-type template parameters
1141         in underscores, if necessary.
1142         (process_overload_item): Remove conditional on
1143         PARM_CAN_BE_ARRAY_TYPE.
1145 1999-10-17  Mark Mitchell  <mark@codesourcery.com>
1147         * dump.c (dequeue_and_dump): Handle CLEANUP_POINT_EXPR.
1149         * ir.texi: Clean up documentation of RETURN_INIT.
1150         
1151 1999-10-15  Greg McGary  <gkm@gnu.org>
1153         * lex.c (lang_init_options): Set flag_bounds_check as "unspecified".
1154         (lang_init): Set default for flag_bounds_check if still "unspecified".
1156 1999-10-13  Andrew Haley  <aph@cygnus.com>
1158         * class.c (finish_struct_1): Force alignment of non-bitfields to
1159         BITS_PER_UNIT.
1161 Wed Oct 13 22:01:35 1999  J"orn Rennecke <amylaar@cygnus.co.uk>
1163         * typeck2.c (process_init_constructor): Handle empty constructors.
1165 1999-10-13  Jason Merrill  <jason@yorick.cygnus.com>
1167         * decl.c (lang_mark_tree): Mark NAMESPACE_LEVEL.
1169         * pt.c (tsubst, case INTEGER_TYPE): Be more explicit in zero-size
1170         array error.
1172 1999-10-13  Mark Mitchell  <mark@codesourcery.com>
1174         * decl.c (make_rtl_for_local_static): Don't create register RTL
1175         for addressable constants.
1177 1999-10-13  Nathan Sidwell  <nathan@acm.org>
1179         * cp-tree.h (build_x_va_arg): Prototype new function.
1180         * call.c (build_x_va_arg): Define it.
1181         * parse.y (unary_expr): Call build_x_va_arg.
1182         
1183         * cp-tree.h (convert_type_from_ellipsis): Prototype new function.
1184         * call.c (convert_type_from_ellipsis): Define it.
1185         * decl.c (init_decl_processing): Set lang_type_promotes_to.
1187         * tree.c (lvalue_p_1): Accept VA_ARG_EXPR with aggregates.
1189 1999-10-11  Jason Merrill  <jason@yorick.cygnus.com>
1191         * class.c (fixed_type_or_null): Always set *nonnull.
1193 1999-10-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1195         * cp-tree.h: Use HAVE_GCC_VERSION instead of explicitly testing
1196         __GNUC__ and __GNUC_MINOR__.
1198 1999-10-09  Mark Mitchell  <mark@codesourcery.com>
1200         * cp-tree.h (make_rtl_for_local_static): New function.  
1201         * decl.c (make_rtl_for_nonlocal_decl): Move code to create RTL for
1202         local statics ...
1203         (make_rtl_for_local_static): Here.
1204         * semantics.c (expand_stmt): Use make_rtl_for_local_static.
1205         
1206 1999-10-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1208         * method.c: Include tm_p.h.
1210 1999-10-7   Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
1212         * cp-tree.h (cp_make_lake_type): Renamed from make_lang_type.
1213         * lex.c (cp_make_lake_type): Likewise.
1214         * tree.c (init_tree): Init make_lang_type_fn.
1215         
1216 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
1218         * pt.c (tsubst_expr): Set DECL_TEMPLATE_INSTANTIATED for a catch
1219         parameter.
1220         
1221         * semantics.c (expand_stmt): Don't pretend to have asmspecs for
1222         local statics if we don't really have them.
1224         * ir.texi: Improve documentation for STMT_EXPR.  Describe
1225         CLEANUP_POINT_EXPR.
1227 1999-10-07  Jason Merrill  <jason@yorick.cygnus.com>
1229         * class.c (build_vtable_entry_ref): Use finish_asm_stmt.
1231 1999-10-07  Greg McGary  <gkm@gnu.org>
1233         * class.c (finish_struct_1): Use simpler method of
1234         removing elements of a singly-linked list which doesn't
1235         lose for classes without data members.
1237 1999-10-07  Mark Mitchell  <mark@codesourcery.com>
1239         * friend.c (make_friend_class): Robustify.
1241         * semantics.c (finish_object_call_expr): Reject calls to template
1242         types.
1244 1999-10-06  Mark Mitchell  <mark@codesourcery.com>
1246         * dump.c (dequeue_and_dump): Dump all three operands to a COND_EXPR.
1248         * cp-tree.h (CLASSTYPE_VFIELD): Remove.
1249         * call.c (build_vfield_ref): Use TYPE_VFIELD, not
1250         CLASSTYPE_VFIELD.
1251         * class.c (get_vfield_offset): Likewise.
1252         (finish_base_struct): Likewise.
1253         (modify_one_vtable): Likewise.
1254         (fixup_vtable_deltas): Likewise.
1255         (finish_struct_1): Likewise.
1256         * init.c (expand_virtual_init): Likewise.
1257         * search.c (lookup_field_1): Likewise.
1258         (expand_upcast_fixups): Likewise.
1259         * typeck.c (build_component_ref): Likewise.
1260         (build_binary_op_nodefault): Likewise.
1261         
1262         * dump.c (dqueue_and_dump): Dump TYPE_VFIELD.
1263         * ir.texi: Document TYPE_VFIELD.
1265 1999-10-06  Brendan Kehoe  <brendan@cygnus.com>
1267         * decl.c (grokdeclarator): Only warn about nonzero arrays if
1268         !in_system_header (linux socketbits.h can give this for
1269         __cmsg_data, which is using a GNU extension).
1271 1999-10-05  Mark Mitchell  <mark@codesourcery.com>
1273         * decl2.c (start_static_storage_duration_function): Push the
1274         function declaration so it ends up in namespace scope.
1276         * dump.c (DUMP_CHILDREN): Remove.
1277         (DUMP_BINFO): Adjust.
1278         (struct dump_node_info): Remove dump_children_p.
1279         (queue_and_dump_type): Remove dump_children_p parameter.
1280         (queue): Don't set dump_children_p.
1281         (dump_child): Pass DUMP_NONE, instead of DUMP_CHILDREN, to
1282         queue_and_dump_index.
1283         (dequeue_and_dump): Unconditionally print children.  Adjust calls
1284         to functions mentioned above.
1285         (dump_node):  Pass DUMP_NONE, instead of DUMP_CHILDREN to queue.
1286         
1287         * ir.texi: Document BIND_EXPR, LOOP_EXPR, and EXIT_EXPR.
1288         * dump.c (dequeue_and_dump): Dump them.
1289         
1290         * method.c (synthesize_method): Call setup_vtbl_ptr for destructors.
1292         * decl.c (start_function): Set current_in_charge_parm for
1293         constructors, too, where appropriate.
1294         * search.c (fixup_all_virtual_upcast_offsets): New function.
1295         (expand_indirect_vtbls_init): Use it.
1296         
1297 1999-10-04  Nathan Sidwell  <nathan@acm.org>
1299         * decl2.c (grok_alignof): Don't decay lvalues.
1300         
1301         * init.c (build_new): Remove unused variable.
1303 1999-10-04  Mark Mitchell  <mark@codesourcery.com>
1305         * cp-tree.h (struct language_function): Remove static_labelno.
1306         (static_labelno): Remove macro.
1307         * method.c (build_overload_nested_name): Make static_labelno
1308         static here.
1309         
1310         * pt.c (instantiate_decl): Use DECL_SAVED_TREE, not DECL_INITIAL,
1311         to decide whether or not a function is defined.
1313         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS for
1314         situations where make_node will do it automatically.
1315         * decl.c (grok_reference_init): Likewise.
1316         (expand_static_init): Likewise.
1317         (do_static_initialization): Likewise.
1318         * init.c (perform_member_init): Likewise.
1319         (expand_aggr_init_1): Likewise.
1320         (build_new_1): Likewise.
1321         * method.c (do_build_copy_constructor): Likewise.
1322         (do_build_assign_ref): Likewise.
1323         * search.c (expand_upcast_fixups): Likewise.
1324         * semantics.c (finish_stmt_expr): Likewise.
1325         * typeck.c (build_unary_op): Likewise.
1326         (check_return_expr): Likewise.
1328 1999-10-04  Jason Merrill  <jason@yorick.cygnus.com>
1330         * init.c (build_vec_delete_1): Fold COND_EXPRs.
1332 1999-10-03  Mark Mitchell  <mark@codesourcery.com>
1334         * cp-tree.def (VEC_INIT_EXPR): Remove.
1335         * cp-tree.h (struct stmt_tree): New type.
1336         (struct saved_scope): Remove firstobj.  Add x_saved_tree,
1337         x_stmt_tree.
1338         (class_cache_firstobj): Remove.
1339         (struct language_function): Remove stmts_are_full_exprs_p,
1340         x_last_tree, and x_last_expr_type.  Add x_stmt_tree.
1341         (current_stmt_tree): New macro.
1342         (last_tree): Adjust.
1343         (last_expr_type): Likewise.
1344         (doing_semantic_analysis_p): Simplify.
1345         (stmts_are_full_exprs_p): Adjust.
1346         (begin_tree): Remove prototype.
1347         (end_tree): Likewise.
1348         (begin_stmt_tree): Change prototype.
1349         (finish_stmt_tree): Likewise.
1350         (building_stmt_tree): Simplify.
1351         * decl.c (mark_stmt_tree): New function.
1352         (mark_saved_scope): Use it.
1353         (start_function): Rearrange slightly to call begin_stmt_tree 
1354         earlier.
1355         (save_function_data): Tweak.
1356         (finish_function): Adjust call to finish_stmt_tree.
1357         (mark_lang_function): Use mark_stmt_tree.
1358         * expr.c (cplus_expand_expr): Don't handle VEC_INIT_EXPR.
1359         * init.c (build_new_1): Remove creation of VEC_INIT_EXPR.
1360         (build_vec_init): Remove creation of stand-in initializer.
1361         * pt.c (begin_tree): Remove.
1362         (end_tree): Likewise.
1363         * semantics.c (SET_LAST_STMT): New macro.  Use it throughout.
1364         (begin_compound_stmt): Handle a compound-statement outside of a
1365         function.
1366         (begin_stmt_expr): Handle a statement-expression outsidef of a
1367         function.
1368         (finish_stmt_expr): Likewise.
1369         (begin_class_definition): Don't call begin_tree.
1370         (finish_inline_definitions): Don't call end_tree.
1371         (begin_stmt_tree): Take a pointer to tree, not a function as input.
1372         (finish_stmt_tree): Likewise.
1373         * tree.c (search_tree): Don't handle VEC_INIT_EXPR.
1374         (mapcar): Likewise.
1375         
1376         * parse.y (simple_stmt): Don't call finish_stmt unnecessarily.
1377         * parse.c: Regenerated.
1378         
1379         * dump.c (dqueue_and_dump): Dump bitfieldness.
1380         
1381         * tree.c (lvalue_p_1): Use DECL_C_BIT_FIELD to check for
1382         bitfields, rather than DECL_BIT_FIELD.
1383         * ir.texi: Document how to tell whether or not a field is a
1384         bitfield.
1385         
1386         * lex.c (make_lang_type): Fix typo in comment.
1388 1999-10-01  Jason Merrill  <jason@yorick.cygnus.com>
1390         * typeck.c (decay_conversion): Strip cv-quals from non-class rvalues.
1392 1999-10-01  Mark Mitchell  <mark@codesourcery.com>
1394         * pt.c (tsubst_decl): If the type of a template instantiation is
1395         bogus, so is the whole instantiation.
1397 1999-09-30  Mark Mitchell  <mark@codesourcery.com>
1399         * decl.c (initialize_local_var): Handle static variables here.
1400         (cp_finish_decl): Tweak handling of function-scope static
1401         variables.
1402         * semantics.c (expand_stmt): Handle DECL_STMTs for static
1403         variables.
1405         * method.c (emit_thunk): Don't crash when -fsyntax-only.
1407         * cp-tree.h (lang_decl_flags): Add global_ctor_p and
1408         global_dtor_p.  Add init_priority.
1409         (DECL_ACCESS): Adjust accordingly.
1410         (DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P): New macros.
1411         (GLOBAL_INIT_PRIORITY): Likewise.
1412         * decl.c (lang_mark_tree): Adjust accordingly.
1413         (start_objects): Set DECL_GLOBAL_CTOR_P, DECL_GLOBAL_DTOR_P, 
1414         and GLOBAL_INIT_PRIORITY.
1415         * dump.c (dequeue_and_dump): Print them.
1416         * ir.texi: Document them.
1418         * decl2.c (struct priority_info_s): Remove initialization_sequence
1419         and destruction_sequence.
1420         (start_static_storage_duration_function): Return the body of the
1421         function.  Convert for function-at-a-time mode.
1422         (generate_inits_for_priority): Remove.
1423         (finish_static_storage_duration_function): Change prototype.
1424         Adjust for function-at-a-time mode.
1425         (do_static_initialization): Likewise.
1426         (do_static_destruction): Likewise.
1427         (do_static_initialization_and_destruction): Remove.
1428         (start_static_initialization_or_destruction): New function.
1429         (finish_static_initialization_or_destruction): Likewise.
1430         (get_priority_info): Don't manipulation initialization_sequence or
1431         destruction_sequence.
1432         (prune_vars_needing_no_initialization): New function.
1433         (write_out_vars): Likewise.
1434         (finish_file): Use the various new functions instead of the old.
1435         
1436 Thu Sep 30 00:13:27 1999  Dirk Zoller  <duz@rtsffm.com>
1438         * cp-tree.h (warn_float_equal): Declare.
1439         * decl2.c (warn_float_equal): Define.
1440         (lang_decode_option): Recognize -W[no-]float-equal.
1441         * typeck.c (build_binary_op_nodefault): Conditionally warn
1442         about equality tests of floating point types.
1444 1999-09-29  Jason Merrill  <jason@yorick.cygnus.com>
1446         Support normal type_info-based EH mechanisms with -fno-rtti.
1447         * except.c (build_eh_type_type): Remove special -fno-rtti handling.
1448         (build_eh_type_type_ref): Likewise.
1449         (build_eh_type): Remove.
1450         (expand_throw): Call build_eh_type_type, not build_eh_type.
1451         * decl2.c (import_export_decl): Don't associate the tinfo fn with
1452         the vtable if -fno-rtti.
1453         * decl.c (init_decl_processing): Always init_rtti_processing.
1455         * rtti.c (get_typeid): Don't complain about -fno-rtti.
1457         * class.c (class_cache_obstack, class_obstack): Remove.
1458         (init_class_processing): Don't initialize class_obstack.
1459         (push_cache_obstack): Remove.
1460         (pushclass): Don't call it.
1461         * cp-tree.h: Remove prototype for push_cache_obstack.
1462         * decl.c (decl_obstack, decl_stack, push_decl_level): Remove.
1463         (pushlevel_class): Don't push_decl_level.
1464         (poplevel_class): Don't pop_stack_level.
1465         (push_class_level_binding): Don't push_cache_obstack.
1466         (init_decl_processing): Don't initialize decl_obstack.
1467         * search.c (push_class_decls): Don't push_cache_obstack.
1468         * tree.c (list_hash_add): Put hash node on permanent_obstack.
1469         (hash_tree_cons): Don't mess with obstacks.
1470         (print_lang_statistics): Don't print stats for class_obstack and
1471         decl_obstack.
1473 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
1475         * dump.c (dequeue_and_dump): Dump DECL_EXTERNAL.
1476         * ir.texi: Document DECL_EXTERNAL.
1478         * dump.c (dequeue_and_dump): Improve support for dumping THUNK_DECLs.
1479         * ir.texi: Document THUNK_DECLs.
1481         * cp-tree.h (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move here from pt.c.
1482         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
1483         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
1484         * error.c (dump_template_bindings): Remove unused parameter.
1485         Handle multiple levels of template parameters.
1486         (dump_template_decl): Use `parms', not `args', for template
1487         parameters.  Fix thinko.
1488         (dump_function_decl): Use DECL_TEMPLATE_INSTANTIATION.  Don't pass
1489         flags to dump_template_bindings.
1490         * pt.c (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Move to cp-tree.h.
1491         (TMPL_ARGS_DEPTH, TMPL_ARGS_LEVEL, SET_TMPL_ARGS_LEVEL): Likewise.
1492         (TMPL_ARG, SET_TMPL_ARG, NUM_TMPL_ARGS, TMPL_PARMS_DEPTH): Likewise.
1493         (tsubst_copy): Clarify variable name.
1494         (most_general_template): Robustify.
1495         
1496 1999-09-29  Nathan Sidwell  <nathan@acm.org>
1498         * error.c (dump_template_parms): Don't use TS_PEDANTIC_NAME
1499         to change primary template rendering.
1501 1999-09-29  Mark Mitchell  <mark@codesourcery.com>
1503         * cp-tree.h (UPT_TEMPLATE): Remove.
1504         (UPT_PARMS): Likewise.
1505         (DECL_NEEDED_P): New macro.
1506         * decl2.c (finish_vtable_vardecl): Use it.
1507         (finish_objects): Don't crash with -fsyntax-only.
1508         (finish_file): Use DECL_NEEDED_P.  Don't prune vtables when
1509         -fsyntax-only.
1510         * pt.c (tsubst_friend_function): Remove FIXME that talks about
1511         obstacks.
1512         (tsubst_expr): Correct handling of function try-blocks.
1513         * semantics.c: Include flags.h.
1514         (expand_body): Don't do RTL generation if -fsyntax-only.
1515         * Makefile.in (semantics.o): Depends on flags.h.
1516         
1517 1999-09-28  Gabriel Dos Reis  <gdr@codesourcery.com>
1519         * pt.c (most_general_template): Adjust declaration.
1521         * cp-tree.h: (most_general_template): Declare.
1523         * error.c (dump_template_value): Rename to ...
1524         (dump_template_argument): This.
1525         (dump_template_argument_list): New function.
1526         (dump_type): Use it.
1527         (dump_template_parameter): New function.
1528         (dump_template_decl): Use it.
1529         (dump_template_bindings): New function.
1530         (dump_function_decl): Use it. Pretty print function template
1531         instantiations.
1533 1999-09-28  Nathan Sidwell  <nathan@acm.org>
1535         * decl.c (grokdeclarator): Distinguish parameter context for
1536         diagnostics. Tidy up missing type diagnostic.
1537         Diagnose `explicit' in one place. Diagnose `mutable' in one place.
1539 1999-09-28  Mark Mitchell  <mark@codesourcery.com>
1541         * ir.texi: Improve documentation for TARGET_EXPR.
1543 1999-09-27  Nathan Sidwell  <nathan@acm.org>
1545         Augment stringification of trees.
1546         * cp-tree.h (tree_string_flags): New error stringifying enumeration.
1547         (fndecl_as_string, type_as_string_real, args_as_string,
1548         code_as_string, language_as_string, parm_as_string,
1549         op_as_string, assop_as_string, cv_as_string): Remove.
1550         (type_as_string, decl_as_string, expr_as_string): Adjust prototype.
1551         (context_as_string): Declare new function.
1552         * error.c (cp_printers): Move definition.
1553         (OB_UNPUT): Remove.
1554         (OB_END_TEMPLATE_ID): Adjust.
1555         (interesting_scope_p): Remove.
1556         (dump_scope): New static function.
1557         (dump_qualifiers): Adjust prototype, reimplement.
1558         (dump_template_value): Use tree_string_flags.
1559         (dump_type_real): Move back to dump_type.
1560         (dump_type): Adjust prototype. Use tree_string_flags.
1561         (dump_aggr_type): Likewise. Use dump_template_parms.
1562         (dump_type_prefix): Adjust prototype. Use tree_string_flags.
1563         Return pad flag.
1564         (dump_type_suffix): Adjust prototype. Use tree_string_flags.
1565         (dump_simple_decl): Likewise.
1566         (dump_decl): Likewise. Use dump_template_decl.
1567         (dump_template_decl): New static function broken out of dump_decl.
1568         (dump_function_decl): Adjust prototype. Use tree_string_flags.
1569         (dump_parameters): Likewise. Prefix space.
1570         (dump_exception_spec): Adjust prototype. Use tree_string_flags.
1571         (dump_function_name): Likewise. Use dump_template_parms.
1572         (dump_template_parms): New static function broken out of
1573         dump_function_name.
1574         (dump_expr_list): Adjust prototype. Use tree_string_flags.
1575         (dump_expr): Likewise.
1576         (fndecl_as_string): Removed
1577         (type_as_string_real): Removed
1578         (dump_binary_op): Adjust prototype. Use tree_string_flags.
1579         (dump_unary_op): Likewise.
1580         (type_as_string): Likewise.
1581         (expr_as_string): Likewise.
1582         (decl_as_string): Likewise.
1583         (context_as_string): New function.
1584         (lang_decl_name): Adjust.
1585         (decl_to_string): New static print callback.
1586         (expr_to_string): Likewise.
1587         (fndecl_to_string): Likewise.
1588         (code_as_string): Renamed to ...
1589         (code_to_string): ... here. Adjust.
1590         (language_as_string): Renamed to ...
1591         (language_to_string): ... here. Adjust.
1592         (parm_as_string): Renamed to ...
1593         (parm_to_string): ... here.
1594         (op_as_string): Renamed to ...
1595         (op_to_string): ... here.
1596         (assop_as_string): Renamed to ...
1597         (assop_to_string): ... here.
1598         (type_to_string): New static print callback.
1599         (args_as_string): Renamed to ...
1600         (args_to_string): ... here. Adjust.
1601         (cv_as_string): Renamed to ...
1602         (cv_to_string): ... here. Adjust.
1603         * pt.c (mangle_class_name_for_template): Use tree_string_flags.
1604         (print_template_context): Likewise.
1606 1999-09-26  Mark Mitchell  <mark@codesourcery.com>
1608         * cp-tree.h (expand_throw): Remove prototype.
1609         * except.c (expand_throw): Make it static.  Use tree-generation
1610         functions, rather than RTL-generation functions.
1611         (build_throw): Use it.
1612         * expr.c: Include except.h.
1613         (cplus_expand_expr): Don't call expand_throw here.
1614         * Makefile.in (expr.o): Depend on except.h.
1615         * ir.texi: Update documentation for THROW_EXPR.
1616         
1617         * decl.c (start_function): Set x_dont_save_pending_sizes rather
1618         than calling get_pending_sizes.
1619         * init.c (build_new): Don't save and restore
1620         immediate_size_expand; instead, assert that it has the expected
1621         value already.
1623 1999-09-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1625         * lex.c (compiler_error): Add missing call to va_end().
1627 1999-09-25  Mark Mitchell  <mark@codesourcery.com>
1629         * dump.c (dequeue_and_dump): Handle RESULT_DECL.
1630         * ir.texi: Document RESULT_DECL and DECL_RESULT.
1632         * cp-tree.h (check_return_expr): New function.
1633         * decl.c (finish_constructor_body): New function.
1634         (pushdecl): Put global friend functions in namespace binding
1635         level, not the class binding level.
1636         (finish_destructor_body): Make sure the dtor_label is always
1637         defined.  Fix typo in comment.
1638         (finish_function): Move generation of constructor-termination code
1639         to semantic-analysis time.  Move generation of implicit `main'
1640         return value to semantic-analysis time.
1641         * semantics.c (finish_return_stmt): Generate goto's to
1642         ctor_label/dtor_label here.  Use check_return_expr to do semantic
1643         analysis on the returned expression.
1644         * typeck.c (maybe_warn_about_returning_address_of_local): New
1645         function split out from c_expand_return.
1646         (check_return_expr): Likewise.
1647         (c_expand_return): Just generate the RTL for the return.
1648         
1649 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
1651         * cp-tree.h (CPTI_CLEANUP_TYPE): New macro.
1652         (cleanup_type): Likewise.
1653         (search_tree): Change prototype.
1654         * decl.c (local_variable_p): Adjust for new interface to
1655         search_tree.
1656         (check_default_argument): Likewise.
1657         * error.c (dump_expr): Handle INIT_EXPR.
1658         * except.c (expand_throw): Don't make cleanup_type a local static.
1659         * expr.c (cplus_expand_expr): Don't handle NEW_EXPR.
1660         * init.c (build_new): Call build_new_1 directly, rather than
1661         building a NEW_EXPR.
1662         (build_new_1): Tidy.  Don't build a VEC_INIT_EXPR except when
1663         processing file-scope initializers.
1664         * lex.c (init_parse): Add an opname_tab entry for INIT_EXPR.
1665         * tree.c: Include splay-tree.h
1666         (no_linkage_helper): Adjust for new interface to search_tree.
1667         (search_tree): Pass around pointers to tree nodes, rather than the
1668         nodes themselves.  Handle VEC_INIT_EXPR.
1669         (no_linkage_check): Adjust for new interface to search_tree.
1670         (mapcar): Handle VEC_INIT_EXPR.
1671         (target_remap): New variable.
1672         (bot_manip): Use it.
1673         (bot_replace): New function.
1674         (break_out_target_exprs): Use it to remap all variables used in a
1675         default argument expression.
1676         * typeck.c (build_modify_expr): Don't crash when outside a
1677         function and presented with an INIT_EXPR assignment
1678         * Makefile.in (tree.o): Depend on splay-tree.h.
1680 Fri Sep 24 10:48:10 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1682         * decl.c (duplicate_decls): Use DECL_BUILT_IN_CLASS rather than
1683         DECL_BUILT_IN.
1684         (builtin_function): New arg CLASS.  Arg CODE now of type int.  All
1685         callers changed.
1686         Set the builtin's DECL_BUILT_IN_CLASS.
1688 1999-09-24  Mark Mitchell  <mark@codesourcery.com>
1690         * decl.c (pushdecl): Don't make local declarations of extern
1691         variables give the variable a DECL_CONTEXT for the function.
1692         (make_rtl_for_nonlocal_decl): Don't fuss with obstacks.  Simplify.
1693         Don't accidentally make RTL for local declarations.
1694         (emit_local_var): Handle declarations with asm-specifiers here.
1695         
1696 1999-09-23  Mark Mitchell  <mark@codesourcery.com>
1698         * ir.texi: Improve documentation for TARGET_EXPRs.  Discuss
1699         STMT_IS_FULL_EXPR_P.
1701         * cp-tree.h (language_function): Add cannot_inline.
1702         * decl.c (start_function): Restore current_function_cannot_inline
1703         from the saved value.
1704         (save_function_data): Save current_function_cannot_inline.
1705         * decl2.c (start_objects): Change prototype.  Build the function
1706         in function-at-a-time mode.
1707         (finish_objects): Likewise.
1708         (generate_ctor_or_dtor_function): Adjust accordingly.
1709         
1710         * cp-tree.h (DECL_ANON_UNION_ELEMS): New macro.
1711         * decl2.c (finish_anon_union): Set DECL_ANON_UNION_ELEMS.
1712         Don't call expand_anon_union_decl here
1713         * semantics.c (exapnd_stmt): Call it here, instead.
1714         * typeck.c (mark_addressable): Addressed variables are implicitly
1715         used.
1716         
1717 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1719         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): New macro.
1720         (RECORD_OR_UNION_TYPE_CHECK, LANG_IDENTIFIER_CAST): Likewise.
1721         (DEFARG_NODE_CHECK): Remove; replace with DEFAULT_ARG_CHECK.
1722         * cp-tree.h: Add tree checking macros to various tree access
1723         macros. 
1724         * ptree.c (print_lang_decl): Test for function or variable
1725         before accessing template info.
1727 1999-09-23  Jason Merrill  <jason@yorick.cygnus.com>
1729         * lex.c: Get WCHAR_TYPE_SIZE from wchar_type_node.
1730         * lang-specs.h: If -fshort-wchar, override __WCHAR_TYPE__.
1731         * decl2.c (lang_f_options): Add -fshort-wchar.
1732         * cp-tree.h: Declare flag_short_wchar.
1733         * decl.c (init_decl_processing): If -fshort-wchar, use 'short unsigned 
1734         int' for wchar_t.
1736 1999-09-23  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1738         * ir.texi: Fix formatting errors and typos.
1740 1999-09-22  Mark Mitchell  <mark@codesourcery.com>
1742         * ir.texi: Document CLEANUP_STMT, SCOPE_STMT, and START_CATCH_STMT.
1744         * decl.c (pushdecl): Do create a binding for extern "C" functions,
1745         but not for their DECL_ASSEMBLER_NAMEs.
1746         (lookup_name_current_level): Fix formatting.
1747         (xref_tag): Likewise.
1748         * decl2.c (start_objects): Mark static constructors and
1749         destructors as used.
1751 1999-09-22  Jason Merrill  <jason@yorick.cygnus.com>
1753         * decl.c (define_case_label): Don't crash if we're not in a switch.
1755         * decl2.c (lang_decode_option): Don't bother explicitly ignoring flags.
1756         * lang-options.h: Restore -fthis-is-variable.  Remove help strings
1757         for unsupported flags.
1759 1999-09-21  Jason Merrill  <jason@yorick.cygnus.com>
1761         * decl2.c (lang_decode_option): Accept and ignore -finit-priority.
1762         Accept and warn about -fthis-is-variable.
1764 1999-09-21  Mark Mitchell  <mark@codesourcery.com>
1766         * dump.c (dequeue_and_dump): Handle START_CATCH_STMT,
1767         CLEANUP_STMT, and SCOPE_STMT.
1769         * decl2.c (lang_decode_option): Adjust, in the wake of recent
1770         changes to option processing.
1772 1999-09-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1774         * typeck.c (get_member_function_from_ptrfunc): Allow extraction of
1775         function pointer from pmfs with no object given.
1776         (convert_for_assignment): Do not return error when converting
1777         pmfs.
1779 1999-09-21  Alex Samuel  <samuel@codesourcery.com>
1781         * lex.c (internal_filename): New variable.
1782         (INTERNAL_FILENAME): New macro.
1783         (init_parse): Allocate internal_filename and mark as root.  Use it
1784         instead of a string constant.
1786 1999-09-21  Nathan Sidwell  <nathan@acm.org>
1788         Reimplement dynamic cast and catch matching.
1789         * cp-tree.h (get_dynamic_cast_base_type): Prototype new function
1790         * search.c (dynamic_cast_base_recurse): New function.
1791         (get_dynamic_cast_base_type): New function for dynamic cast.
1792         * rtti.c (build_dynamic_cast_1): Determine source and target
1793         class relationship. Call __dynamic_cast_2.
1794         * tinfo.h (__user_type_info::upcast): New catch dispatcher.
1795         (__user_type_info::dyncast): New dynamic cast dispatcher.
1796         (__user_type_info::sub_kind): New nested enumeration.
1797         (__user_type_info::contained_p): sub_kind predicate.
1798         (__user_type_info::contained_public_p): Likewise.
1799         (__user_type_info::contained_nonpublic_p): Likewise.
1800         (__user_type_info::contained_nonvirtual_p: Likewise.
1801         (__user_type_info::upcast_result): New nested struct.
1802         (__user_type_info::dyncast_result): New nested struct.
1803         (*::do_upcast): New catch function.
1804         (*::do_dyncast): New dynamic cast function.
1805         (__user_type_info::find_public_subobj): New dynamic cast
1806         helper dispatcher.
1807         (*::do_find_public_subobj): New dynamic cast helper function.
1808         * tinfo.cc (__user_type_info::upcast): Define catch dispatcher.
1809         (__user_type_info::dyncast): Define dynamic cast dispatcher.
1810         (*::do_upcast): Define catch function.
1811         (*::do_dyncast): Define dynamic cast function.
1812         (*::do_find_public_subobj): Define dynamic cast helper function.
1813         * tinfo2.cc (__throw_type_match_rtti_2): Use upcast.
1814         (__dynamic_cast): Backwards compatibility wrapper. Use dyncast.
1815         (__dynamic_cast_2): New dynamic cast runtime.
1817 1999-09-20  Mark Mitchell  <mark@codesourcery.com>
1819         * cp-tree.h (finish_stmt_expr): Change prototype.
1820         * expr.c (cplus_expand_expr): Adjust call accordingly.
1821         * init.c (finish_init_stmts): Likewise.
1822         * parse.y (primary): Likewise.
1823         * pt.c (tsubst_copy): Likewise.
1824         * semantics.c (finish_stmt_expr): Don't take two parameters.
1825         Don't remove generated BLOCKs from the block-tree.
1827         Remove support for assigning to `this'.
1828         * NEWS: Note that fact.
1829         * class.c (build_vbase_path): Don't check flag_this_is_variable.
1830         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): Remove.
1831         (language_function): Remove assigns_this, just_assigned_this, and
1832         x_base_init_expr.  Add x_vcalls_possible_p.  Add vtbls_set_up_p.
1833         (base_init_expr): Remove.
1834         (current_vcalls_possible_p): New macro.
1835         (vtbls_set_up_p): Likewise.
1836         (emit_base_init): Change prototype.
1837         * decl.c (finish_destructor_body): New function, split out from
1838         finish_function.
1839         (current_function_assigns_this): Remove.
1840         (current_function_just_assigned_this): Likewise.
1841         (start_function): Don't set them.
1842         (finish_function): Don't check them.  Don't emit
1843         base-initialization code here.  Generate code for destructors when
1844         doing semantic analysis.
1845         (finish_stmt): Don't check current_function_just_assigned_this.
1846         * decl2.c (lang_f_options): Remove this-is-variable.
1847         (lang_decode_option): Likewise.
1848         (grokclassfn): Don't check flag_this_is_variable.
1849         * init.c (emit_base_init): Return the expression generated.
1850         (construct_virtual_bases): Don't push/pop obstacks.  Fix
1851         typo.
1852         (build_new_1): Don't check flag_this_is_variable.
1853         (get_temp_regvar): Don't set DECL_REGISTER.
1854         (build_vec_init): Don't call use_variable.
1855         * lang-options.h: Remove "-fthis-is-variable" and
1856         "-fno-this-is-variable".
1857         * pt.c (tsubst_expr): Don't check EXPR_STMT_ASSIGNS_THIS.
1858         * search.c (expand_upcast_fixups): Use finish_expr_stmt, not
1859         expand_expr_stmt.
1860         * semantics.c (finish_expr_stmt_real): Rename to ...
1861         (finish_expr_stmt): This.  Remove assigned_this parameter.
1862         (begin_if_stmt): Call do_pushlevel before starting the statement.
1863         (begin_compound_stmt): Don't declare __FUNCTION__ in scope-less
1864         blocks.
1865         (setup_vtbl_ptr): Emit initialization code for bases and members
1866         at semantic-analysis time.  Emit code to initialize vtables in
1867         destructors here.
1868         (expand_stmt): Use finish_expr_stmt, not finish_expr_stmt_real.
1869         Don't handle CTOR_INITIALIZER any more.
1870         * typeck.c (build_modify_expr): Don't check for assignments to
1871         this.
1872         (c_expand_return): Don't suggest assigning to `this'.
1873         
1874         * Makefile.in (decl.o): Depend on RTL_H.
1875         (decl2.o): Likewise.
1876         (class.o): Likewise.
1877         (call.o): Likewise.
1878         (method.o): Likewise.
1879         (search.o): Likewise.
1880         (tree.o): Likewise.
1881         (pt.o): Likewise.
1883         * decl.c (duplicate_decls): When a builtin function is redeclared
1884         as static, make sure it is mangled correctly.
1886         * ir.texi (CTOR_INITIALIZER): Remove mention.  Fix typo.  Add
1887         detail about the statement-tree.
1888         
1889 1999-09-20  Nathan Sidwell  <nathan@acm.org>
1891         * parse.y (primary): Use build_functional_cast for CV_QUALIFIER.
1893 1999-09-20  Nick Clifton  <nickc@cygnus.com>
1895         * decl2.c (lang_decode_option): Extend comment.
1897 Mon Sep 20 10:49:05 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
1899         * typeck.c: Include "tm_p.h".
1901 1999-09-19  Mark Mitchell  <mark@codesourcery.com>
1903         * ir.texi: New file.
1905 1999-09-19  Paul Burchard <burchard@pobox.com>
1907         * semantics.c (expand_stmt): Initialize return value.
1909 1999-09-18  Paul Burchard <burchard@pobox.com>
1911         * gxxint.texi: G++ now implements namespaces.
1912         
1913 1999-09-18  Mark Mitchell  <mark@codesourcery.com>
1915         * decl.c (pop_label): Don't warn about unused labels more than
1916         once.
1917         * semantics.c (finish_goto_stmt): Always marked used labels as
1918         used.
1920         * decl.c (layout_var_decl): Change prototype.  Call layout_decl
1921         even when the declaration is external.
1922         (cp_finish_decl): Adjust call to layout_var_decl.
1923         * pt.c (tsubst_expr): Make sure to initialize stmt before using it.
1925 1999-09-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
1927         * typeck.c (get_member_function_from_ptrfunc): Always consider
1928         virtuality inside member pointer.
1930 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
1932         Turn on function-at-a-time processing.  
1933         * cp-tree.h (doing_semantic_analysis_p): New macro.
1934         (SF_DEFAULT): Define to zero, not SF_EXPAND.
1935         (start_handler_parms): Change prototype.
1936         (expand_start_catch_block): Likewise.
1937         (expand_end_catch_block): Likewise.
1938         (expand_start_eh_spec): Likewise.
1939         (expand_end_eh_spec): Declare.
1940         (finish_handler_parms): Change prototype.
1941         (begin_catch_block): Declare.
1942         (finish_handler): Change prototype.
1943         (do_pushlevel): Declare.
1944         (do_poplevel): Likewise.  
1945         * decl.c (pushlevel): Don't create
1946         binding levels when not doing semantic analysis.
1947         (poplevel): Don't pop them.
1948         (pushdecl): Assert that we are never called when not doing
1949         semantic analysis.
1950         (pushdecl_top_level): Use push_to_top_level.
1951         (make_label_decl): Don't fiddle with obstacks.  Make RTL For the
1952         label when expanding.
1953         (cp_finish_decl): Only inject for-scope variables when doing
1954         semantic analysis.  Add comments.
1955         (start_handler_parms): Return the handler parm.
1956         (start_function): Reorganize.  Don't clear DECL_INITIAL if it is
1957         already set.  Reinitialize from saved function data if available.
1958         Don't pushlevel when not doing semantic analysis.
1959         (store_parm_decls): Only generate RTL when expanding.  Only
1960         pushdecl when doing semantic analysis.  Set
1961         current_eh_spec_try_block if appropriate.
1962         (finish_function): Simplify.  Use do_pushlevel and do_poplevel.
1963         Combine common code.  Don't poplevel when not doing semantic
1964         analysis.
1965         (push_cp_function_context): Don't expand functions without an
1966         explicit call to expand_body.
1967         (mark_lang_function): Make eh_spec_try_block and
1968         x_scope_stmt_stack.  
1969         * except.c (expand_end_eh_spec): Don't
1970         declare.
1971         (process_start_catch_block): Likewise.
1972         (push_eh_cleanup): Use finish_decl_cleanup.
1973         (initialize_handler_parm): New function.
1974         (expand_start_catch_block): Use it.
1975         (expand_end_catch_block): Use tree-generation functions, not
1976         RTL-generation functions.
1977         (expand_start_eh_spec): Likewise.
1978         (expand_end_eh_spec): Likewise.
1979         (expand_exception_blocks): Simplify.
1980         (start_anon_func): Use do_pushlevel.
1981         (end_anon_func): Use do_poplvel.  Call expand_body for the
1982         function.  
1983         * expr.c (do_case): Don't call define_case_label.  
1984         * init.c (create_temporary_var): Set DECL_CONTEXT for local
1985         variables.  
1986         * method.c (emit_thunk): Call expand_body for the
1987         thunk.
1988         (sythesize_method): Likewise.  
1989         * parse.y (handler_args): Give it ttype.
1990         (eat_saved_input): Call expand_body.
1991         (base_init): Use do_pushlevel.
1992         (pending_inline): Call expand_body.
1993         (handler): Adjust calls to finish_handler_parms and
1994         finish_handler.
1995         (handler_args): Don't call expand_start_catch_block.  Return the
1996         catch parameter.  * pt.c (tsubst_expr): Adjust HANDLER handling.
1997         * parse.c: Regenerated.
1998         * rtti.c (synthesize_tinfo_fn): Call finish_function.  
1999         * semantics.c (do_pushlevel): Give it external linkage.  Build
2000         SCOPE_STMTs.
2001         (do_poplevel): Likewise.
2002         (finish_case_label): Call define_case_label when doing semantic
2003         analysis.
2004         (finish_goto_stmt): Create RTL for labels.
2005         (finish_function_try_block): Set in_function_try_handler
2006         unconditionally.
2007         (finish_function_handler_sequence): Unset it.
2008         (finish_handler_parms): Use expand_start_catch_block even when
2009         building a statement-tree.
2010         (begin_catch_block): New function.
2011         (finish_handler): Move a little RTL-generation logic here.
2012         (finish_decl_cleanup): Allow cleanups for empty declarations.
2013         (finish_named_return_value): Don't pushdecl when not doing
2014         semantic analysis.
2015         (expand_stmt): Don't do semantic analysis for variable
2016         declarations.  Handle START_CATCH_STMT.  Call expand_label
2017         directly for a LABEL_STMT.  Tweak handling of GOTO_STMT.  Adjust
2018         HANDLERs.  Handle SCOPE_STMT, CTOR_INITIALIZER, and RETURN_INIT.
2019         (expand_body): Let expand_stmt handle CTOR_INITIALIZER,
2020         RETURN_INIT and function try blocks.
2021         
2022         * cp-tree.h (language_function): Add x_eh_spec_try_block.  Add
2023         x_scope_stmt_stack.  Add x_in_charge_parm.
2024         (current_eh_spec_try_block): New macro.
2025         (current_scope_stmt_stack): Likewise.
2026         (current_in_charge_parm): Likewise.
2027         * decl.c (start_function): Initialize current_in_charge_parm.
2028         (finish_function): Use current_in_charge_parm rather than looking
2029         up __in_chrg.
2030         * search.c (expand_indirect_vtbls_init): Likewise.
2032         * cp-tree.def (CLEANUP_STMT): Fix spelling in dumps.
2033         (TRY_BLOCK): Likewise.
2034         (HANDLER): Likewise.
2035         (START_CATCH_STMT): New tree node.
2036         (SCOPE_STMT): Likewise.
2037         * cp-tree.h (SCOPE_BEGIN_P): New macro.
2038         (SCOPE_NULLIFIED_P): Likewise.
2039         (struct lang_decl_flags): Add pending_inline_p.  Adjust dummy.
2040         (struct lang_decl): Add saved_language_function.
2041         (DECL_PENDING_INLINE_INFO): Adjust documentation.
2042         (DECL_PENDING_INLINE_P): New macro.
2043         (TYPE_TI_ARGS): Fix typo in comment.
2044         (DECL_SAVED_TREE): Add to documentation.
2045         (DECL_SAVED_FUNCTION_DATA): New macro.
2046         (START_CATCH_TYPE): Likewise.
2047         (SCOPE_END_P): New macro.
2048         (declare_parm_level): Don't declare.
2049         * decl.c (mark_lang_function): New function, split out from
2050         mark_cp_function_context.
2051         (save_function_data): New function.
2052         (declare_parm_level): Remove.
2053         (finish_function): Use save_function_data to squirrel away
2054         important stuff for later use.
2055         (mark_cp_function_context): Use mark_function_data.
2056         (lang_mark_tree): Likewise.
2057         * lex.c (begin_definition_of_inclass_inline): Set
2058         DECL_PENDING_INLINE_P.
2059         (store_pending_inline): Clear it.
2060         * pt.c (tsubst_decl): Likewise.
2062 1999-09-17  Nathan Sidwell  <nathan@acm.org>
2064         * call.c (perform_implicit_conversion): Deal with error_mark_node.
2066 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
2068         * decl.c (warn_extern_redeclared_static): Don't get confused by
2069         static member functions.
2070         (duplicate_decls): Merge DECL_THIS_STATIC.
2072         * decl.c (expand_static_init): Make sure assignments to local
2073         statics actually occur.
2075 1999-09-17  Mark Mitchell  <mark@codesourcery.com>
2077         * cp-tree.h (poplevel_class): Declare.
2078         * class.c (popclass): Use poplevel_class, not poplevel.
2079         * decl.c (poplevel_class): Don't make it static.  Don't return a
2080         value.
2081         (poplevel): Don't call poplevel_class; abort in a class
2082         binding level is seen.
2083         * semantics.c (finish_translation_unit): Use pop_everything.
2084         * parse.y (member_init): Allow errors.
2085         (pending_inline): Call finish_function.
2086         * parse.c: Regenerated.
2087         * Makefile.in (CONFLICTS): Adjust.
2089 1999-09-17  Gabriel Dos Reis  <gdr@codesourcery.com>
2090         
2091         * error.c: Reduce code duplication.
2092         (dump_template_value): New function.
2093         (dump_type_real): Use it.
2094         (dump_decl): Likewise.
2095         (dump_function_name): Likewise.
2096         (dump_function_decl): Don't be too talkative about function return
2097         type variety.
2099 1999-09-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2101         * lex.c (init_cpp_parse): Call xcalloc, not malloc/bzero.
2103         * xref.c (SALLOC): Call xstrdup, not xmalloc/strcpy.
2105 1999-09-16  Jason Merrill  <jason@yorick.cygnus.com>
2107         * decl2.c (finish_file): Also call check_global_declarations for
2108         the pending_statics list.
2110 1999-09-15  Jason Merrill  <jason@yorick.cygnus.com>
2112         * lex.c (cp_pragma_implementation): Allow #pragma implementation
2113         in header files.
2115 1999-09-15  Richard Henderson  <rth@cygnus.com>
2117         * lex.c (mark_impl_file_chain): Follow the next chain.
2119 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
2121         * decl.c (warn_extern_redeclared_static): Simplify.  Catch
2122         problems with extern "C" functions redeclared as static.
2123         (duplicate_decls): When a builtin is redeclared static, make the
2124         new function have internal linkage.
2125         
2126 1999-09-15  Mark Mitchell  <mark@codesourcery.com>
2128         * decl2.c (build_expr_from_tree): Handle VA_ARG_EXPR.
2129         * pt.c (tsubst_copy): Likewise.
2130         * tree.c (search_tree): Likewise.
2131         (mapcar): Likewise.
2133 1999-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2135         * typeck2.c (ack): Don't declare progname.
2137 1999-09-14  Alexandre Oliva  <oliva@lsd.ic.unicamp.br>
2139         * lex.c (cp_pragma_interface, cp_pragma_implementation): Copy
2140         filenames with ggc_alloc_string.
2142 1999-09-14  Mark Mitchell  <mark@codesourcery.com>
2144         * decl.c (build_target_expr): Set TREE_SIDE_EFFECTS on the 
2145         TARGET_EXPR.
2146         * call.c (build_over_call): Don't set TREE_SIDE_EFFECTS on
2147         the TARGET_EXPR.
2148         * cvt.c (build_up_reference): Likewise.
2149         * tree.c (build_cplus_new): Likewise.
2150         (get_target_expr): Likewise.
2151         
2152 Tue Sep 14 01:45:10 1999  Marc Espie <espie@cvs.openbsd.org>
2154         * Makefile.in:  Prepend $(SHELL) to move-if-change calls.
2156 1999-09-13  Mark Mitchell  <mark@codesourcery.com>
2158         * cp-tree.h (build_target_expr): New function.
2159         * call.c (build_conditional_expr): Use build_target_expr.
2160         (convert_like): Likewise.
2161         (build_over_call): Likewise.
2162         * cvt.c (build_up_reference): Likewise.
2163         * decl.c (build_cleanup_on_safe_obstack): Fold into ...
2164         (destroy_local_var): Here.
2165         (build_target_expr): New function.
2166         * tree.c (build_cplus_new): Use it.
2167         (get_target_expr): Likewise.
2169 1999-09-13  Nathan Sidwell  <nathan@acm.org>
2171         * typeck.c (expr_sizeof): Don't decay arrays and functions.
2172         Remove misleading comment.
2173         (build_compound_expr): Don't decay arrays.
2175 1999-09-13  Jason Merrill  <jason@yorick.cygnus.com>
2177         * call.c (build_conditional_expr): Always use a TARGET_EXPR for
2178         class rvalues again.
2180 Sun Sep 12 23:29:07 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2182         * Make-lang.in (g++spec.o): Depend on system.h and gcc.h.
2184         * g++spec.c: Include gcc.h.
2185         (lang_specific_driver): Constify a char*.  Call xcalloc, not
2186         xmalloc/bzero.  All calls to the function pointer parameter now
2187         explicitly call `fatal'.
2189 1999-09-12  Mark Mitchell  <mark@codesourcery.com>
2191         * call.c (implicit_conversion): Robustify.  Handle OFFSET_REFs.
2192         * cvt.c (ocp_convert): Complete the from and destination types.
2193         Adjust warning about functions always being `true' in conditionals.
2194         * decl.c (duplicate_decls): Don't play funny games with abort.
2195         * error.c (dump_expr): Handle OVERLOADs.
2196         * spew.c (probe_obstack): Remove.
2197         * typeck.c (condition_conversion): Use perform_implicit_conversion.
2198         
2199 1999-09-12  Bernd Schmidt  <bernds@cygnus.co.uk>
2201         * cp-tree.h (auto_function, define_function): Adjust prototypes.
2202         * decl.c (define_function): Lose FUNCTION_CODE arg.  All callers
2203         changed.
2204         (auto_function): Likewise, for CODE arg.
2205         Move code to set DECL_BUILT_IN and DECL_FUNCTION_CODE to...
2206         (builtin_function): ... here.
2208 1999-09-11  Mark Mitchell  <mark@codesourcery.com>
2210         * decl.c (add_decl_to_level): Remove TREE_PERMANENT assertion.
2211         (init_decl_processing): Don't set TREE_PERMANENT for the
2212         error_mark_node.
2213         (start_decl): Don't rebuild non-permanent ARRAY_TYPEs.
2214         (grokdeclarator): Likewise.
2215         (grokparms): Don't check TREE_PERMANENT when building up lists.
2216         * decl2.c (grokfield): Don't assert TREE_PERMANENT.
2217         (mark_inline_for_output): Likewise.
2218         * expr.c (cplus_expand_expr): Don't check TREE_PERMANENT.
2219         * init.c (build_offset_ref): Don't check TREE_PERMANENT.
2220         * lex.c (check_newline): Don't check ggc_p; it is always one.
2221         * pt.c (process_template_parm): Don't check TREE_PERMANENT.
2222         * spew.c (yylex): Don't copy_node or probe_obstacks for
2223         non-permanent CONSTANTs and STRINGs.
2224         * tree.c (build_cplus_array_type_1): Don't fuss with
2225         TREE_PERMANENT on ARRAY_TYPEs.
2226         
2227         * cp-tree.def (CLEANUP_STMT): New node.
2228         * cp-tree.h (language_function): Add name_declared.
2229         (current_function_name_declared): New macro.
2230         (CLEANUP_DECL): New macro.
2231         (CLEANUP_EXPR): Likewise.
2232         (emit_local_var): Likewise.
2233         (finish_decl_cleanup): New function.
2234         * cvt.c (build_up_reference): Simplify.
2235         (ocp_convert): Remove dead code.
2236         * decl.c (start_decl): Remove call to add_decl_stmt.
2237         (grok_reference_init): Adjust, to handle bindings temporaries to
2238         references.  Remove dead code.
2239         (initialize_local_var): Don't generate RTL for
2240         declarations here, or build cleanups here.  Don't fuss with
2241         obstacks.  Replace expand_start_target_temps calls with explicit
2242         setting of stms_are_full_exprs_p.
2243         (destroy_local_var): New function.
2244         (emit_local_var): Likewise.
2245         (cp_finish_decl): Use them, as appropriate.
2246         (start_function): Announce template functions.
2247         (store_parm_decls): Don't call declare_function_name here.
2248         (finish_stmt): Don't start emit base-initialization code when just
2249         building the statement-tree.
2250         * init.c (create_temporary_var): Move add_decl_stmt call ...
2251         (get_temp_regvar): Here.
2252         * pt.c (tsubst_expr): Make DECL_INITIAL look like what
2253         cp_finish_decl would expect.  Don't call add_decl_stmt.
2254         * semantics.c (begin_compound_stmt): Call declare_function_name,
2255         if appropriate.
2256         (finish_decl_cleanup): New function.
2257         (expand_stmt): Use emit_local_var to output variables.          
2258         (expand_body): Set current_function_name_declared.
2259         
2260 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
2262         * cp-tree.h (finish_cleanup_try_block): New function.
2263         * semantics.c (finish_cleanup_try_block): Add comment.
2265 Fri Sep 10 10:32:32 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
2267         * cp-tree.h: Delete declarations for all tree nodes now moved to
2268         global_trees.
2269         * decl.c: Delete their definitions.
2270         (SHORT_TYPE_SIZE, INT_TYPE_SIZE, LONG_TYPE_SIZE, LONG_LONG_TYPE_SIZE,
2271         FLOAT_TYPE_SIZE, DOUBLE_TYPE_SIZE, LONG_DOUBLE_TYPE_SIZE): Don't
2272         provide defaults.
2273         (init_decl_processing): Call build_common_tree_nodes and
2274         build_common_tree_nodes_2 instead of building their nodes here.
2275         Don't add gc roots for them.
2277 1999-09-10  Mark Mitchell  <mark@codesourcery.com>
2279         * cp-tree.h (language_function): Rename expanding_p to
2280         x_expanding_p.  Rename named_label_uses to x_named_label_uses.
2281         (expanding_p): Adjust accordingly.
2282         (TREE_VIA_PRIVATE): Fix typo in comment.
2283         (DECL_REFERENCE_SLOT): Remove.
2284         (SET_DECL_REFERENCE_SLOT): Likewise.
2285         * decl.c (named_label_uses): Adjust. Remove chicken comment.
2286         (push_overloaded_decl): Don't truncate the chain of bindings when
2287         adding an overloaded function.
2288         (grok_reference_init): Don't use DECL_REFERENCE_SLOT.
2289         (initialize_local_var): Fix typo in comment.
2290         (store_parm_decls): Don't set DECL_REFERENCE_SLOT.  Tidy up.
2291         * decl2.c (start_objects): Make the fact that we are expanding
2292         the generated function right away explicit.
2293         (start_static_storage_duration_function): Likewise.
2294         (finish_file): Fix typo in comment.
2295         * init.c (build_vec_init): Correct bugs in handling cleanups.
2296         * semantics.c (maybe_convert_cond): New function.
2297         (FINISH_COND): Always store the condition, even if there's
2298         a declaration.
2299         (finish_if_stmt_cond): Use maybe_convert_cond.
2300         (finish_while_stmt_cond): Likewise.
2301         (finish_do_stmt): Likewise.
2302         (finish_for_cond): Likewise.
2303         (expand_cond): Adjust.
2304         
2305         * cp-tree.h (FN_TRY_BLOCK_P): New macro.
2306         * init.c (perform_member_init): Remove obstack machinations.
2307         (expand_cleanup_for_base): Likewise.
2308         (finish_init_stmts): Mark the statement-expression as used.
2309         * method.c (emit_thunk): Use tree-generating functions, not
2310         RTL.
2311         (do_build_copy_constructor): Likewise.
2312         (do_build_assign_ref): Likewise.
2313         (synthesize_method): Likewise.  Keep track of line numbers.
2314         * pt.c (tsubst_expr): Handle various kinds of try blocks.
2315         * semantics.c (expand_stmts): Remove.
2316         (begin_function_try_block): Set FN_TRY_BLOCK_P.
2317         (finish_function_try_block): Be careful rechaining 
2318         function try blocks.
2319         (expand_stmt): Loop through all the statements at a given level.
2320         (exapnd_body): Be careful with line-numbers here too.  Prepare for
2321         being called directly from the parser.
2323         * cp-tree.h (finish_function): Adjust prototype.
2324         * decl.c (finish_function): Return the function compiled.
2325         * pt.c (instantiate_decl): Don't play games with obstacks.
2326         * tree.c (mapcar): Handle OFFSET_REF and BIT_FIELD_REF.
2327         (search_tree): Likewise.
2328         * typeck.c: Fix typo in comment.
2329         * typeck2.c (store_init_value): Add comment.
2331         * cp-tree.h (CPTI_ATEXIT): New macro.
2332         (atexit_node): Likewise.
2333         * decl.c (destroy_local_static): New function, broken out from ...
2334         (expand_static_init): Here.
2336         * rtti.c (get_tinfo_var): These should always be global
2337         (expand_si_desc): Use tree, not RTL, functions to generate code.
2338         (expand_class_desc): Likewise.
2339         (expand_ptr_desc): Likewise.
2340         (expand_attr_desc): Likewise.
2341         (expand_generic_desc): Likewise.
2342         (synthesize_tinfo_fn): Likewise.
2344 1999-09-09  Mark Mitchell  <mark@codesourcery.com>
2346         * semantics.c (RECHAIN_STMTS): Remove `last' parameter.
2347         (RECHAIN_STMTS_FROM_LAST): Remove.  Replace all uses with
2348         RECHAIN_STMTS. 
2349         (RECHAIN_STMST_FROM_CHAIN): Likewise.
2351         * parse.y (simple_stmt): Fix typo in last change.
2353         * cp-tree.h (EXPR_STMT_ASSIGNS_THIS): New macro.
2354         (STMT_IS_FULL_EXPR_P): Likewise.
2355         (STMT_LINENO_FOR_FN_P): Likewise.
2356         (prep_stmt): New function.
2357         (building_stmt_tree): Tweak for safety.
2358         * pt.c (tsubst_expr): Use prep_stmt throughout.
2359         (add_tree): Move it to semantics.c
2360         * semantics.c (add_tree): Move it here.
2361         (finish_expr_stmt_real): New function.
2362         (finish_expr_stmt): Use it.
2363         (finish_if_stmt_cond): Use FINISH_COND.
2364         (finish_while_stmt_cond): Likewise.
2365         (finish_for_cond): Likewise.
2366         (finish_stmt_tree): Tweak line-number handling.
2367         (prep_stmt): New function.
2368         (expand_stmt): Use it.
2369         
2370         * cp-tree.h (begin_switch_stmt): Adjust prototype.
2371         (finish_switch_cond): Likewise.
2372         * parse.y (simple_stmt): Adjust accordingly.
2373         * parse.c: Regenerated.
2374         * pt.c (tsubst_expr): Adjust accordingly.
2375         * semantics.c (expand_cond): New function.
2376         (FINISH_COND): New macro.
2377         (begin_switch_stmt): Build the SWITCH_STMT here.
2378         (finish_switch_stmt_cond): Not here.
2379         (expand_stmt): Adjust calls to begin_switch_stmt and
2380         finish_switch_cond.  Use expand_cond throughout.
2382         * dump.c (dequeue_and_dump): Dump types for constants.
2383         Describe DECL_ARG_TYPE more intuitively.
2384         Handle ARRAY_REF.
2386         * decl.c (lang_mark_tree): Mark TYPE_LANG_SPECIFIC.
2387         (lang_cleanup_tree): Remove.
2388         * lex.c (make_lang_type): Use ggc_alloc to allocate
2389         TYPE_LANG_SPECIFIC.
2391         Reorganize per-function data.
2392         * cp-tree.h (saved_scope): Add function_decl, bindings.
2393         (language_function): Rename binding_level to bindings.
2394         (cp_function_chain): Use the current_function, not the
2395         outer_function_chain.
2396         (current_class_ptr): Make it work, even when there's no 
2397         current function.
2398         (current_class_ref): Likewise.
2399         (SF_DEFAULT, SF_PRE_PARSED, SF_INCLASS_INLINE, SF_EXPAND): New 
2400         macros.
2401         (clear_temp_name): Remove.
2402         * decl.c (check_function_type): New function, broken out from
2403         start_function.
2404         (current_binding_level): Adjust definition.
2405         (pushlevel): Simplify.
2406         (poplevel): Don't use named_label_uses when we're outside
2407         a function scope.
2408         (mark_saved_scope): Mark function_decl and bindings.
2409         (maybe_push_to_top_level): Don't unconditionally push a new
2410         function context.  Save bindings and the current_function_decl.
2411         Don't clear named_labels.
2412         (pop_from_top_level): Pop function context if appropriate.
2413         (init_decl_processing): Set init_lang_status and free_lang_status,
2414         rather than save_lang_status and restore_lang_status.
2415         (start_function): Take SF_* flags.  Don't clear per-function data.
2416         Reorder and simplify to use new per-function data code.  Add
2417         asserts.
2418         (store_parm_decls): Don't call init_function_start here.
2419         (finish_function): Adjust for new handling of per-function data.
2420         (push_cp_function_context): Simplify.
2421         (mark_cp_function_context): Change binding_level to bindings.
2422         * decl2.c (clear_temp_name): Remove.
2423         (start_objects): Use SF flags to start_function.
2424         (start_static_storage_duration_function): Likewise.
2425         * except.c (start_anon_func): Remove redundant calls to 
2426         push_function_context_to.  Use SF flags to start function.
2427         (end_anon_func): Remove redundant call to pop_function_context
2428         from.
2429         * lex.c (reinit_parse_for_function): Don't initialize per-function 
2430         data.
2431         * method.c (emit_thunk): Clear current_function after calling
2432         assemble_end_function.  Use SF flags for start_function.
2433         (synthesize_method): Use SF flags for start_function.
2434         * parse.c: Regenerated.
2435         * parse.y (fn.defpen): Likewise.
2436         (pending_inline): Clear current_function, even if something goes
2437         wrong.
2438         * pt.c (instantiate_decl): Use SF flags to start_function.
2439         Don't save and restore expanding_p.
2440         (add_tree): Handle the case where we are outside any function.
2441         (end_tree): Likewise.
2442         * rtti.c (sythesize_tinfo_fn): Use SF flags to start_function.
2443         * semantics.c (begin_function_definition): Likewise.
2444         (expand_body): Likewise.
2445         
2446 1999-09-09  Nathan Sidwell  <nathan@acm.org>
2448         * cp-tree.h (convert_to_void): Prototype new function.
2449         (require_complete_type_in_void): Remove prototype.
2450         * cvt.c (convert_to_void): New function.
2451         (ocp_convert): Use convert_to_void.
2452         * decl.c (cplus_expand_expr_stmt): Likewise, for complete
2453         expressions.
2454         * typeck.c (require_complete_type_in_void): Remove function.
2455         (build_compound_expr): Use convert_to_void.
2456         (build_static_cast): Likewise.
2457         (build_c_cast): Likewise.
2458         * semantics.c (finish_expr_stmt): Do not decay full expressions.
2459         
2460         * typeck.c (build_x_compound_expr): Add FIXME.
2462 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
2464         * cp-tree.h (scratch_tree_cons): Remove.
2465         * call.c: Replace all uses of expr_tree_cons, saveable_tree_cons,
2466         and perm_tree_cons with plain tree_cons.
2467         * class.c: Likewise.
2468         * decl.c: Likewise.
2469         * decl2.c: Likewise.
2470         * except.c: Likewise.
2471         * expr.c: Likewise.
2472         * init.c: Likewise.
2473         * lex.c: Likewise.
2474         * method.c: Likewise.
2475         * parse.y: Likewise.
2476         * pt.c: Likewise.
2477         * repo.c: Likewise.
2478         * rtti.c: Likewise.
2479         * search.c: Likewise.
2480         * typeck.c: Likewise.
2481         * parse.c: Regenerated.
2482         * tree.c (build_srcloc): Simplify.
2483         
2484 1999-09-08  Bruce Korb  autogen@linuxbox.com
2486         * Makefile.in: Give the gperf user a hint about why "gperf -F" fails.
2488 1999-09-08  Mark Mitchell  <mark@codesourcery.com>
2490         * cp-tree.h (lang_decl_flags): Remove permanent_attr.
2491         Remove next.
2492         (LANG_DECL_PERMANENT): Remove.
2493         * decl.c (duplicate_decls): Don't mess about with obstacks trying
2494         to free memory.
2495         (lang_mark_tree): Mark DECL_LANG_SPECIFIC.
2496         * lex.c (free_lang_decl_chain): Remove.
2497         (build_lang_decl): Don't use obstacks.
2498         (retrofit_lang_decl): Likewise.
2499         (copy_lang_decl): Likewise.
2501         * cp-tree.h (saved_scope): Remove old_binding_level and 
2502         function_decl.  Tidy up.
2503         * decl.c (mark_saved_scope): Don't set them.
2504         (maybe_push_to_top_level): Clear memory.
2506         * decl.c (layout_var_decl): Change prototype.  Don't complete
2507         types for external objects.
2508         (check_initializer): Likewise.  Tidy.
2509         (initialize_local_var): Complete types here.
2510         (cp_finish_decl): Not here.  Reorganize a little.
2511         (grokvardecl): Don't complete types here.
2513         * decl.c (start_function): Clear last_dtor_insn and
2514         last_parm_cleanup_insn. 
2515         (push_cp_function_context): Just copy over a little of
2516         the old context, not all of it.
2518         * cp-tree.h (copy_to_permanent): Remove.
2519         (permanent_p): Likewise.
2520         * decl.c (building_typename_type): Don't use copy_to_permanent.
2521         (start_decl): Likewise.
2522         (grok_reference_init): Likewise.
2523         (cp_finish_decl): Likewise.
2524         * init.c (build_new_1): Don't use mapcar.
2525         (build_vec_delete_1): Don't use copy_to_permanent.
2526         (build_vec_init): Likewise.
2527         * parse.y (primary): Likewise.
2528         * parse.c: Regenerated.
2529         * pt.c (push_template_decl_real): Don't use copy_to_permanent.
2530         (lookup_template_class): Likewise.
2531         (tsubst_friend_function): Likewise.
2532         (instantiate_class_template): Likewise.
2533         (tsubst_decl): Likewise.
2534         (tsubst): Likewise.
2535         (instantiate_template): Likewise.
2536         (unify): Likewise.
2537         * rtti.c (get_tinfo_fn): Likewise.
2538         (build_dynamic_cast): Likewise.
2539         * semantics.c (finish_if_stmt_cond): Likewise.
2540         (finish_while_stmt_cond): Likewise.
2541         (finish_do_stmt): Likewise.
2542         (finish_for_cond): Likewise.
2543         (finish_for_expr): Likewise.
2544         (finish_cleanup): Likewise.
2545         (add_decl_stmt): Likewise.
2546         (finish_named_return_value): Likewise.
2547         (finish_qualified_call_expr): Likewise.
2548         * tree.c (perm_manip): Remove.
2549         (build_exception_variant): Don't use copy_to_permanent.
2550         (permanent_p): Remove.
2551         (copy_to_permament): Remove.
2552         (build_min_nt): Don't use copy_to_permanent.
2553         (build_min): Likewise.
2554         (min_tree_cons): Likewise.
2555         * typeckc.c (build_static_cast): Likewise.
2556         (build_reinterpret_cast): Likewise.
2557         (build_const_cast): Likewise.
2558         
2559 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
2561         * decl.c (ggc_p): Set it to 1.
2562         (mark_saved_scope): Add prototype.
2564 1999-09-07  Richard Henderson  <rth@cygnus.com>
2566         * cp-tree.h (C_PROMOTING_INTEGER_TYPE_P): Delete.
2567         * typeck.c (self_promoting_args_p): Delete.
2569 1999-09-07  Jason Merrill  <jason@yorick.cygnus.com>
2571         * search.c (binfo_for_vtable): Use CLASSTYPE_VFIELD_PARENT.
2572         (dfs_bfv_queue_p, dfs_bfv_helper, struct bfv_info): Remove.
2574 1999-09-07  Mark Mitchell  <mark@codesourcery.com>
2576         * Makefile.in (tree.o): Depend on ggc.h.
2577         * class.c (make_method_vec): Remove.
2578         (free_method_vec): Likewise.
2579         (free_method_vecs): Remove.
2580         (add_method): Don't use them.
2581         * cp-tree.def (PTRMEM_CST): Make it longer.
2582         (TEMPLATE_PARM_INDEX): Make it shorter.
2583         * cp-tree.h (BINDING_HAS_LEVEL_P): New macro.
2584         (template_parm_index): Remove RTL field.
2585         (ptrmem_cst): Add RTL field.
2586         (finish_function): Removed parameter.
2587         (process_next_inline): Change prototype.
2588         (init_cplus_unsave): Rename to init_tree.
2589         (binding_init): Remove.
2590         * decl.c (free_binding_nodes): Remove.
2591         (push_binding): Don't use them.  Set BINDING_HAS_LEVEL_P.
2592         (pop_binding): Don't use free_binding_nodes.
2593         (free_binding_vecs): Remove.
2594         (store_bindings): Don't use them.
2595         (pop_from_top_level): Likewise.
2596         (lookup_namespace_name): Simplify.
2597         (build_typename_type): Don't use obstack_free.
2598         (unqualified_namespace_lookup): Simplify.
2599         (lookup_name_real): Simplify.
2600         (start_function): Remove comment about leaks.
2601         (finish_function): Removed nested parameter.  Call
2602         expand_end_bindings even when building_stmt_tree.
2603         Call ggc_push_context and ggc_pop_context around
2604         rest_of_compilation, if necessary.
2605         (mark_cp_function_context): Handle a NULL language-context.
2606         (lang_mark_false_label_stack): Fix typo.
2607         (lang_mark_tree): Handle CPLUS_BINDING, OVERLOAD,
2608         TEMPLATE_PARM_INDEX.  Handle the funny TYPE_LANG_SPECIFIC on
2609         pointer to method types.
2610         (lang_cleanup_tree): Use free to free TYPE_LANG_SPECIFIC.
2611         * decl2.c (finish_objects): Adjust call to finish_function.
2612         (finish_static_store_duration_function): Likewise.
2613         (do_nonmember_using_decl): Remove call to binding_init.
2614         * except.c (end_anon_func): Adjust call to finish_function.
2615         * lex.c (mark_impl_file_chain): New function.
2616         (init_parse): Call init_tree, not init_cplus_unsave.
2617         Add GC roots.
2618         (cp_pramga_interface): Use xmalloc, not permalloc.
2619         (cp_pragma_implementation): Likewise.
2620         (begin_definition_of_inclass_inline): Simplify.
2621         (process_next_inline): Adjust prototype.
2622         (do_scoped_id): Don't call binding_init.
2623         (make_lang_type): Allocate TYPE_LANG_SPECIFIC with xmalloc.
2624         * method.c (emit_thunk): Adjust call to finish_function.
2625         (synthesize_method): Likewise.
2626         * parse.y (%union): Add a new `pi' variant.
2627         (PRE_PARSED_FUNCTION_DECL): Use it.
2628         (fn.defpen): Likewise.
2629         (fndef): Adjust call to finish_function.
2630         * pt.c (instantiate_decl): Likewise.
2631         * rtti.c (syntheisze_tinfo_fn): Likewise.
2632         * semantics.c (expand_body): Likewise.
2633         * tree.c: Include ggc.h.
2634         (mark_list_hash): New function.
2635         (binding_init): Remove.
2636         (init_cplus_unsave): Rename to ...
2637         (init_tree): This.  Add GC roots.
2638         
2639 1999-09-05  Mark Mitchell  <mark@codesourcery.com>
2641         Get ready for garbage collection.
2642         * Makefile.in (CXX_TREE_H): Add varray.h
2643         (lex.o): Depend on ggc.h.
2644         (decl.o): Likewise.
2645         (decl2.o): Likewise.
2646         (method.o): Likewise.
2647         (search.o): Likewise.
2648         (pt.o): Likewise.
2649         (repo.o): Likewise.
2650         * class.c: Include ggc.h.
2651         (current_class_name): Remove.
2652         (current_class_type): Likewise.
2653         (current_access_specifier): Likewise.
2654         (previous_class_type): Likewise.
2655         (previous_class_values): Likewise.
2656         (class_cache_firstobj): Likewise.
2657         (current_lang_base): Likewise.
2658         (current_lang_stack): Likewise.
2659         (current_lang_stacksize): Likewise.
2660         (lang_name_c): Likewise.
2661         (lang_name_cplusplus): Likewise.
2662         (lang_name_java): Likewise.
2663         (current_lang_name): Likewise.
2664         (base_layout_decl): Likewise.
2665         (access_default_node): Likewise.
2666         (access_public_node): Likewise.
2667         (access_protected_node): Likewise.
2668         (access_private_node): Likewise.
2669         (access_default_virtual_node): Likewise.
2670         (access_public_virtual_node): Likewise.
2671         (access_protected_virtual_node): Likewise.
2672         (access_private_virtual_node): Likewise.
2673         (signed_zero_node): Likewise.
2674         (init_class_processing): Don't build base_layout_decl.
2675         (push_lang_context): Adjust now that current_lang_base is a varray.
2676         (pop_lang_context): Likewise.
2677         * cp-tree.h: Include varray.h.
2678         (cp_global_trees): Add access_default, access_public,
2679         access_protected, access_private, access_default_virtual,
2680         access_public_virtual, access_protected_virtual,
2681         access_private_virtual, ctor_identifier, delta2_identifier, 
2682         delta_identifier, dtor_identifier, in_charge_identifier,
2683         index_identifier, nelts_identifier, this_identifier,
2684         pfn_identifier, pfn_or_delta2_identifier, vptr_identifier,
2685         lang_name_c, lang_name_cplusplus, lang_name_java,
2686         empty_except_spec, null, jclass, minus_one, terminate.
2687         (saved_scope): Move here from decl.c.  Define globals in terms of
2688         saved_scope: current_namespace, current_class_name,
2689         current_class_type, current_access_specifier, current_lang_stack,
2690         current_lang_base, current_lang_name, current_function_parms,
2691         current_template_parms, processing_template_decl,
2692         processing_specialization, processing_explicit_instantiation,
2693         previous_class_type, previous_class_values, class_cache_firstobj.
2694         (scope_chain): New variable.
2695         (init_pt): New function.
2696         * decl.c (current_namespace): Remove.
2697         (this_identifier, in_charge_identifier, ctor_identifier): Likewise.
2698         (dtor_identifier, pfn_identifier, index_identifier): Likewise.
2699         (delta_identifier, delta2_identifier): Likewise.
2700         (pfn_or_delta2_identifier, tag_identifier): Likewise
2701         (vt_off_identifier, empty_except_spec, null_node): Likewise.
2702         (current_function_parms, current_lang_base): Remove.
2703         (current_lang_stack, previous_class_values): Remove.
2704         (class_binding_level): Macroize.
2705         (saved_scope): Remove.
2706         (current_saved_scope): Rename to scope_chain.
2707         (mark_saved_scope): Adjust for new scope structure.
2708         (maybe_push_to_top_level): Likewise.
2709         (pop_from_top_level): Likewise.
2710         (duplicate_decls): Adjust now that current_lang_base is a varray.
2711         (build_typename_type): Call ggc_add_tree_hash_table_root.
2712         (init_decl_processing): Call init_pt.  Call push_to_top_level to
2713         set up globals.  Add GC roots.
2714         (xref_basetypes): Adjust now that current_lang_base is a varray.
2715         * decl.h (this_identifier): Remove.
2716         (in_charge_identifier): Likewise.
2717         * decl2.c: Don't include varray.h.
2718         (current_namespace): Remove.
2719         (init_decl2): Add GC roots.
2720         * except.c (Terminate): Remove. 
2721         (init_exception_processing): Use terminate_node instead.
2722         (build_terminate_handler): Likewise.
2723         * init.c (nc_nelts_field_id): Remove.
2724         (minus_one): Likewise.
2725         (init_init_processing): Use minus_one_node and nelts_identifier
2726         instead.  Add GC roots.
2727         (jclass_node): Remove.
2728         (build_new_1): Use nelts_identifier.
2729         (build_vec_init): Likewise.
2730         (build_vec_delete): Likewise.
2731         * lex.c: Include ggc.h.
2732         (defarg_fn): Move declaration early.
2733         (defarg_parms): Likewise.
2734         (init_parse): Add GC roots.
2735         (handle_cp_pragma): Remove redundant declaration of
2736         pending_vtables.
2737         * method.c: Include ggc.h.
2738         (btypelist): Make it a varray.  All uses changed.
2739         (ktypelist): Likewise.
2740         (init_method): Add GC roots.
2741         * pt.c: Don't include varray.h.  Include ggc.h.
2742         (current_template_parms): Remove.
2743         (processing_template_decl): Likewise.
2744         (processing_specialization): Likewise.
2745         (processing_explicit_instantiation): Likewise.
2746         (init_pt): New function.
2747         * repo.c: Include ggc.h.
2748         (init_repo): Add GC roots.
2749         * search.c: Don't include varray.h.
2750         (_vptr_name): Remove.
2751         (lookup_field_1): Use vtpr_identifier instead.
2752         (expand_indirect_vtbls_init): Remove redundant declaration of
2753         in_charge_identifier.
2754         (init_search_processing): Use vptr_identifier.
2755         
2756 1999-09-05  Richard Henderson  <rth@cygnus.com>
2757             Bernd Schmidt <bernds@cygnus.co.uk>
2758             Mark Mitchell  <mark@codesourcery.com>
2760         * Makefile.in (parse.o): Depend on ggc.h.
2761         (decl2.o): Depend on ggc.h.
2762         (init.o): Depend on ggc.h.
2763         * cp-tree.h (init_decl2): Declare.
2764         (cp_parse_init): Likewise.
2765         * decl.c (ggc_p): Define to zero.
2766         (mark_saved_scope): New function.
2767         (init_decl_processing): Call cp_parse_init, and cp_decl2.
2768         Register GC roots.
2769         (expand_static_init): Add GC roots.
2770         * decl2.c: Include ggc.h.
2771         (init_decl2): New function.
2772         * init.c: Include ggc.h.
2773         (init_init_processing): Add GC roots.
2774         * parse.y: Include ggc.h.
2775         (cp_parse_init): New function.
2776         
2777 1999-09-04  Mark Mitchell  <mark@codesourcery.com>
2779         * decl.c (init_decl_processing): Set mark_lang_status.
2780         (lang_mark_false_label_stack): Adjust prototype.
2781         * decl2.c (grok_function_init): Remove extraneous declaration of
2782         abort_fndecl.
2784         * Make-lang.in (cc1plus): Remove dependency on GGC.
2785         * Makefile.in (OBJS): Don't mention ggc-simple.o.
2786         (OBJDEPS): Don't mention ggc-simple.o.
2788         * Make-lang.in (cc1plus): Depend on $(GGC).
2789         * Makefile.in (OBJS): Add ggc-simple.o.
2790         (OBJDEPS): Likewise.
2791         * cp-tree.h (language_function): Rename members to `x_' versions;
2792         we now have x_named_labels, x_ctor_label, x_dtor_label,
2793         x_base_init_list, x_member_init_list, x_base_init_expr,
2794         x_current_class_ptr, x_current_class_ref, x_last_tree,
2795         x_last_expr_type, x_last_dtor_insn, x_last_parm_cleanup_insn, and
2796         x_result_rtx. 
2797         (dtor_label, ctor_label, current_base_init_list,
2798         current_member_init_list, base_init_expr, current_class_ptr,
2799         current_class_ref, last_tree, last_expr_type): Adjust accordingly.
2800         * decl.c: Include ggc.h.
2801         (last_dtor_insn): Adjust to use x_ names.
2802         (last_parm_cleanup_insn): Likewise.
2803         (original_result_rtx): Likewise.
2804         (named_labels): Likewise.
2805         (mark_binding_level): New function.
2806         (mark_cp_function_context): Likewise.
2807         (mark_false_label_stack): Likewise.
2808         (lang_mark_tree): Likewise.
2809         (lang_cleanup_tree): Likewise.
2810         
2811 1999-09-03  Mark Mitchell  <mark@codesourcery.com>
2813         * Makefile.in (CXX_TREE_H): Include function.h.
2814         (decl.o): Don't depend on function.h.
2815         (decl2.o): Likewise.
2816         (typeck.o): Likewise.
2817         (init.o): Likewise.
2818         (method.o): Likewise.
2819         * cp-tree.h: Include function.h.
2820         (cp_function): Rename to language_function.  Remove next.
2821         (cp_function_chain): Make it a macro, not a variable.
2822         (push_cp_function_context): Don't declare.
2823         (pop_cp_function_context): Likewise.
2824         * decl.c: Don't include function.h.
2825         (push_cp_function_context): Make it static.  Make it suitable for
2826         a save_lang_status callback.
2827         (pop_cp_function_context): Likewise.
2828         (maybe_push_to_top_level): Call push_function_context_to, not
2829         push_cp_function_context.
2830         (pop_from_top_level): Call pop_function_context_from, not
2831         pop_cp_function_context.
2832         (init_decl_processing):  Set save_lang_status and
2833         restore_lang_status.  Call push_function_context_to, not
2834         push_cp_function_context.
2835         (cp_function_chain): Remove.
2836         * decl2.c: Don't include function.h.
2837         * except.c: Don't include function.h.
2838         (start_anon_func): Call push_function_context_to, not
2839         push_cp_function_context.
2840         (end_anon_func):  Call pop_function_context_from, not
2841         pop_cp_function_context.
2842         * init.c: Don't include function.h.
2843         * lex.c (begin_definition_of_inclass_inline): Call
2844         push_function_context_to, not push_cp_function_context. 
2845         (process_next_inline):  Call pop_function_context_from, not
2846         pop_cp_function_context.
2847         * method.c: Don't include function.h.
2848         (synthesize_method): Call push_function_context_to, not
2849         push_cp_function_context.  Call pop_function_context_from, not
2850         pop_cp_function_context.
2851         * typeck.c: Don't include function.h.
2852         
2853         * decl.c (expand_static_init): Tweak handling of static
2854         initializations for objects without constructors.
2856 1999-09-03  Nathan Sidwell  <nathan@acm.org>
2858         * typeck.c (build_indirect_ref): Reject dereference of pointer to
2859         void.
2861 1999-09-02  Mark Mitchell  <mark@codesourcery.com>
2863         * cp-tree.h (cp_function): Move here, from decl.c.
2864         (cp_function_chain): Declare.
2865         (dtor_label): New macro, instead of variable.
2866         (ctor_label): Likewise.
2867         (current_base_init_list): Likewise.
2868         (current_member_init_list): Likewise.
2869         (base_init_expr): Likewise.
2870         (current_class_ptr): Likewise.
2871         (current_class_ref): Likewise.
2872         (last_tree): Likewise.
2873         (last_expr_type): Likewise.
2874         (current_function_returns_value): Likewise.
2875         (current_function_returns_null): Likewise.
2876         (current_function_just_assigned_this): Likewise.
2877         (current_function_parms_stored): Likewise.
2878         (temp_name_counter): Likewise.
2879         (static_labelno): Likewise.
2880         (expanding_p): Likewise.
2881         (stmts_are_full_exprs_p): Likewise.
2882         (in_function_try_handler): Likewise.
2883         (lang_type): Remove nested type_flags.  All uses changed.
2884         * call.c (ctor_label): Remove.
2885         (dtor_label): Likewise.
2886         * class.c (current_class_ptr): Remove.
2887         (current_class_ref): Likewise.
2888         * decl.c (static_labelno): Remove.
2889         (dtor_label): Likewise.
2890         (last_dtor_insn): New macro, instead of variable.
2891         (last_parm_cleanup_insn): Likewise.
2892         (original_result_rtx): Likewise.
2893         (in_function_try_handler): Remove.
2894         (named_label_uses): New macro, instead of variable.
2895         (named_labels): Likewise.
2896         (current_function_returns_value): Remove.
2897         (current_function_returns_null): Likewise.
2898         (current_function_assigns_this): New macro, instead of variable.
2899         (current_function_just_assigned_this): Likewise.
2900         (current_binding_level): Likewise.
2901         (init_decl_processing): Call push_cp_function_context.
2902         (cp_function): Move to cp-tree.h
2903         (cp_function_chain): Make it global.
2904         (temp_name_counter): Remove.
2905         (push_cp_function_context): Simplify.
2906         (pop_cp_function_context): Likewise.
2907         * decl2.c (temp_name_counter): Remove.
2908         * init_c (current_base_init_list): Likewise.
2909         (current_member_init_list): Likewise.
2910         (base_init_expr): Likewise.
2911         * method.c (static_labelno): Likewise.
2912         * pt.c (last_tree): Likewise.
2913         * semantics.c (expanding_p): Likewise.
2914         (stmts_are_full_exprs_p): Likewise.
2915         (last_expr_type): Likewise.
2916         * typeck.c (dtor_label): Likewise.
2917         (ctor_label): Likewise.
2918         
2919 1999-09-01  Alex Samuel  <samuel@codesourcery.com>
2921         * decl2.c (arg_assoc_template_arg): New prototype.  New function.
2922         (arg_assoc_class): Use arg_assoc_template_arg for template
2923         arguments. 
2924         (arg_assoc): Likewise.
2925         * pt.c (mangle_class_name_for_template): Allow member template
2926         template arguments.
2928 1999-09-02  Nathan Sidwell  <nathan@acm.org>
2930         * call.c (build_conditional_expr): Warn on enum mismatches.
2931         (convert_arg_to_ellipsis): Move non-pod check to after
2932         conversion.
2934 1999-09-01  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2936         * gxx.gperf (hash, is_reserved_word): Add prototypes.
2938         * init.c (build_vec_init): Initialize variable `try_block'.
2940         * lex.c (init_parse): Call memcpy, not bcopy, to avoid casts.
2941         Likewise for bzero/memset.
2942         (token_getch, token_put_back): Add static prototypes.  Remove
2943         `inline' from the definitions.
2944         (retrofit_lang_decl): Call memset, not bzero, to avoid casts.
2946 1999-09-01  Mark Mitchell  <mark@codesourcery.com>
2948         * cp-tree.h (lang_type): Move align into type_flags.
2949         (CLASSTYPE_ALIGN): Adjust accordingly.
2950         * call.c (direct_reference_binding): Remove misleading comment.
2952 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2954         * parse.y (language_string): Constify.
2956 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2958         * repo.c (getpwd): Don't prototype.
2959         * xref.c (getpwd): Likewise
2961 1999-08-30  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2963         * Makefile.in (LIBS, LIBDEPS): Link with & depend on libiberty.a.
2964         Remove hacks for stuff which now comes from libiberty.
2966 1999-08-30  Jason Merrill  <jason@yorick.cygnus.com>
2968         * cp-tree.h (IS_AGGR_TYPE_2): Fix typo.
2970 1999-08-30  Mark Mitchell  <mark@codesourcery.com>
2972         * cp-tree.h (begin_init_stmts): Declare.
2973         (finish_init_stmts): Likewise.
2974         * cvt.c (build_up_reference): Wrap the declaration of a temporary
2975         in a statement-expression so that we will see it when expanding
2976         tree structure later.
2977         * init.c (begin_init_stmts): Don't make it static.
2978         (finish_init_stmts): Likewise.
2980         * cp-tree.h (start_handler_parms): New function.
2981         (expand_start_catch_block): Take only one parameter.
2982         (start_handler_parms): New function.
2983         * decl.c (start_handler_parms): Define it.
2984         * except.c (process_start_catch_block): Take only one parameter.
2985         Don't call grokdeclarator here.
2986         (expand_start_catch_block): Don't call grokdeclarator here,
2987         either.
2988         * parse.y (handler_args): Adjust call to
2989         expand_start_catch_block.  Use start_handler_parms.
2990         * pt.c (push_template_decl_real): Make permanent lists have
2991         permanent elements.
2992         (tsubst_expr): Adjust calls to expand_start_catch_block
2993         appropriately.
2994         * semantics.c (expand_stmt): Likewise.
2995         
2996 1999-08-29  Alex Samuel  <samuel@codesourcery.com>
2998         * pt.c (push_template_decl_real): Use template declaration from
2999         class type if it exists.
3001 1999-08-29  Mark Mitchell  <mark@codesourcery.com>
3003         * cp-tree.h (TYPE_NEEDS_CONSTRUCTING): Remove #if 0'd definition.
3004         (maybe_inject_for_scope_var): Declare it.
3005         (initialize_local_var): Likewise.
3006         * decl.c (maybe_inject_for_scope_var): Make it global.
3007         (initialize_local_var): Likewise.  Move cleanup handling here,
3008         from cp_finish_decl.
3009         (make_rtl_for_nonlocal_decl): Use
3010         push_obstacks_nochange/pop_obstacks, rather than
3011         end_temporary_allocation/resume_temporary_allocation.
3012         (cp_finish_decl): Try to complete the type of a variable when it
3013         is declared.  Move cleanup-handling to initialize_local_var.
3014         (expand_static_init): Use tree-building code, rather than
3015         RTL-building code.
3016         * decl2.c (get_temp_name): Assert non-initializedness of
3017         temporaries.
3018         * init.c (create_temporary_var): Move RTL-assigning code to ...
3019         (get_temp_regvar): Here.
3020         * pt.c (tsbust_expr): Fix indentation.  Call cp_finish_decl here.
3021         * semantics.c (expand_stmt): Don't call cp_finish_decl here.  Just
3022         call initialize_local_var to generate initialization code.
3023         
3024 1999-08-29  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3026         * cp-tree.h (fndecl_as_string, type_as_string,
3027         type_as_string_real, args_as_string, decl_as_string,
3028         expr_as_string, code_as_string, language_as_string,
3029         parm_as_string, op_as_string, assop_as_string, cv_as_string,
3030         lang_decl_name, cp_file_of, lang_printable_name): Constify a char*.
3032         * errfn.c (cp_printer): Likewise.
3034         * error.c (cp_printer, fndecl_as_string, type_as_string_real,
3035         type_as_string, expr_as_string, decl_as_string, lang_decl_name,
3036         cp_file_of, code_as_string, language_as_string, parm_as_string,
3037         op_as_string, assop_as_string, args_as_string, cv_as_string):
3038         Likewise.
3040         * tree.c (lang_printable_name): Likewise.
3042 1999-08-28  Richard Henderson  <rth@cygnus.com>
3044         * decl2.c (arg_assoc_class): Bail if the class is a builtin type.
3046 1999-08-28  Mark Mitchell  <mark@codesourcery.com>
3048         * cp-tree.h (strip_array_types): New function.
3049         * decl.c (maybe_deduce_size_from_array_init): New function, split
3050         out from cp_finish_decl.
3051         (layout_var_decl): Likewise.
3052         (maybe_commonize_var): Likewise.
3053         (maybe_inject_for_scope_var): Likewise.
3054         (initialize_local_var): Likewise.
3055         (build_cleanup_on_safe_obstack): Likewise.
3056         (check_initializer): Likewise.
3057         (make_rtl_for_nonlocal_decl): Likewise.
3058         (cp_finish_decl): Use them.
3059         * typeck.c (strip_array_types): New function.
3060         
3061         * cp-tree.def (LABEL_STMT): New tree node.
3062         * cp-tree.h (LABEL_STMT_LABEL): New macro.
3063         (shadow_label): Remove.
3064         (declare_local_label): New function.
3065         (finish_label_decl): Likewise.
3066         * decl.c (make_label_decl): New function, split out from
3067         lookup_label.
3068         (shadowed_labels): Remove.
3069         (binding_level): Add shadowed_labels.
3070         (clear_binding_level): Remove.
3071         (push_binding_level): Just bzero the new binding level.
3072         (pushlevel): Fix indentation.
3073         (pop_label): New function.
3074         (pop_labels): Likewise, split out from poplevel.
3075         (poplevel): Pop local labels.  Use pop_labels.
3076         (maybe_push_to_top_level): Don't clear shadowed_labels.
3077         (lookup_label): Use make_label_decl.
3078         (shadow_label): Remove.
3079         (declare_local_label): New function.
3080         (define_label): Simplify.
3081         (start_function): Don't clear shadowed_labels.
3082         (cp_function): Remove shadowed_labels.
3083         (push_cp_function_context): Don't save shadowed_labels.
3084         (pop_cp_function_context): Don't restore it.
3085         * dump.c (dequeue_and_dump): Handle LABEL_STMT.
3086         * parse.y (label_decl): Use finish_label_decl.
3087         * pt.c (tsubst_expr): Handle LABEL_STMTs, and local label
3088         declarations.
3089         * semantics.c (finish_label_stmt): Add a LABEL_STMT when
3090         building_stmt_tree.
3091         (finish_label_decl): New function.
3092         (expand_stmt): Handle LABEL_STMTs and local label declarations.
3093         
3094 1999-08-26  Mark Mitchell  <mark@codesourcery.com>
3096         * decl.c (lookup_label): Build labels on the permanent obstack
3097         when building statement trees.  Don't build RTL for labels when
3098         building statement trees.
3099         * semantics.c (finish_goto_stmt): Use LABEL_DECLs even when
3100         building statement trees.
3101         (finish_label_stmt): Likewise.
3102         (expand_stmt): Adjust accordingly.
3103         * pt.c (tsubst_expr); Likewise.
3104         (do_decl_instantiation): Robustify.
3105         
3106         * cp-tree.h (AGGR_INIT_VIA_CTOR_P): New macro.
3107         * tree.c (build_cplus_new): Set it.
3108         * expr.c (cplus_expand_expr): Use it.
3109         * dump.c (deque_and_dump): Handle AGGR_INIT_EXPR.
3110         
3111         * decl.c (store_parm_decls): Reset immediate_size_expand.
3112         (finish_function): Likewise.
3113         
3114         * tree.c (cplus_unsave_expr_now): Don't return a value.
3116         * semantics.c (do_poplevel): Always initialize the return value.
3118 1999-08-26  Gavin Romig-Koch  <gavin@cygnus.com>
3120         * cp-tree.h (cplus_unsave_expr_now) : Correct return type.
3121         * tree.h (cplus_unsave_expr_now) : Same.
3123 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
3125         * decl.c (grokdeclarator): Amend comment.
3126         * except.c (expand_start_catch_block): Call push_template_decl for
3127         catch-block parameters.
3128         * method.c (synthesize_method): Build an empty compound statement
3129         for the body of a constructor.
3131 1999-08-25  Jason Merrill  <jason@yorick.cygnus.com>
3133         * tree.c (cp_build_qualified_type_real): If we're asking for the
3134         same quals we already have, just return.
3136 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
3138         * cp-tree.def (SUBOBJECT): New tree node.
3139         * cp-tree.h (CLEANUP_P): New macro.
3140         (SUBOBJECT_CLEANUP): Likewise.
3141         (keep_next_level): Add parameter.
3142         (get_temp_regvar): Don't declare.
3143         (emit_base_init): Remove parameter.
3144         (expand_aggr_init): Rename to build_aggr_init.
3145         (expand_vec_init): Rename to build_vec_init.
3146         (do_pushlevel): Remove.
3147         (do_poplevel): Likewise.
3148         (finish_cleanup): New function.
3149         (finish_subobject): Likewise.
3150         (stmts_are_full_exprs_p): New variable.
3151         * decl.c (keep_next_level): Add parameter.
3152         (cp_finish_decl): Use build_aggr_init, not
3153         expand_aggr_init.  Use finish_expr_stmt to expand the code.
3154         (expand_static_init): Use tree-generating, not RTL-generating,
3155         functions to handle the initialization.
3156         (start_function): Remove dead code.  Always have a momentary
3157         obstack inside the function, even before hitting the first curly
3158         brace.
3159         (cplus_expand_expr_stmt): Move calls to
3160         expand_{start,end}_target_temps into semantics.c.
3161         (cp_function): Add stmts_are_full_exprs_p.
3162         (push_cp_function_context): Save it.
3163         (pop_cp_function_context): Restore it.
3164         * decl2.c (get_temp_regvar): Move to init.c.
3165         (do_static_initialization): Use build_{aggr,vec}_init.
3166         (do_static_destruction): Fix typo in comment.
3167         * dump.c (dequeue_and_dump): Handle INIT_EXPR.
3168         * except.c (expand_throw): Use create_temporary_var.
3169         * expr.c (cplus_expand_expr): Use build_{aggr,vec}_init.
3170         * init.c (expand_vec_init_try_block): Remove.
3171         (expand_vec_init_catch_clause): Likewise.
3172         (get_temp_regvar): New function.
3173         (begin_init_stmts): Likewise.
3174         (finish_init_stmts): Likewise.
3175         (perform_member_init): Use build_{aggr,vec}_init.  Build up tree
3176         structure here.
3177         (emit_base_init): Likewise.  Remove unused parameter.
3178         (expand_virtual_init): Likewise.
3179         (expand_cleanup_for_base): Use finish_subobject.
3180         (expand_aggr_vbase_init_1): Simplify.
3181         (construct_virtual_bases): Use tree-generating functions to build
3182         up initialization.
3183         (expand_aggr_init): Likewise.  Rename to build_aggr_init.
3184         (expand_default_init): Likewise.
3185         (expand_aggr_init_1): Likewise.
3186         (expand_vec_init): Rename to build_vec_init.
3187         * method.c (do_build_copy_constructor): Use tree-generating
3188         functions.  Don't call clear_last_expr.
3189         (do_build_assign_ref): Likewise.
3190         (synthesize_method): Call clear_last_expr here.
3191         * parse.y (base_init): Don't call clear_last_expr here.
3192         (nodecls): Likewise.
3193         * pt.c (tsubst_expr): Handle a TRY_BLOCK with CLEANUP_P set.
3194         * semantics.c (do_pushlevel): Move to here.
3195         (do_poplevel): Likewise.
3196         (stmts_are_full_exprs_p): New variable.
3197         (finish_expr_stmt): Handle logic for temoprary cleanup here.
3198         (finish_for_stmt): Use finish_expr_stmt.
3199         (finish_cleanup): New function.
3200         (finish_function_try_block): Fix indentation.
3201         (finish_subobject): New function.
3202         (setup_vtbl_ptr): Call keep_next_level here.
3203         (finish_stmt_expr): Handle a block with no scope inside the
3204         statement-expression.
3205         (expand_stmt): Handle a TRY_BLOCK with CLEANUP_P set.  Handle
3206         SUBOBJECT.
3207         * tree.c (search_tree): Handle INIT_EXPR.
3208         (mapcar): Likewise.
3209         * typeck.c (build_modify_expr): Don't build an RTL_EXPR.
3210         * typeck2.c (store_init_value): Change expand_aggr_init to
3211         build_aggr_init in comment.
3212         
3213 1999-08-25  Mark Mitchell  <mark@codesourcery.com>
3215         * dump.c (dequeue_and_dump): Dump TARGET_EXPRs.
3217 1999-08-25  Nathan Sidwell  <nathan@acm.org>
3219         * decl2.c (handle_class_head): Be graceful about additional
3220         scope qualifiers. Adjust comments to reflect reality.
3222 1999-08-24  Jason Merrill  <jason@yorick.cygnus.com>
3224         * call.c (build_conditional_expr): Fix typo.
3225         * typeck.c (build_modify_expr, COND_EXPR): Make sure we've got an
3226         lvalue before trying to mess with the sides.
3228         * error.c (dump_expr, CONVERT_EXPR): Handle (void) properly.
3230 Mon Aug 23 22:17:20 1999  Mumit Khan  <khan@xraylith.wisc.edu>
3232         * g++spec.c (lang_specific_driver): Add room for NULL in arglist.
3234 1999-08-23  Jason Merrill  <jason@yorick.cygnus.com>
3236         * exception.cc (__cplus_type_matcher): Call __throw_type_match_rtti_2.
3237         Return arbitrary pointer or NULL.
3238         (check_eh_spec): Call __throw_type_match_rtti_2.
3239         * tinfo.h (*::dcast): Return int.  Add valp parm.
3240         * tinfo.cc (*::dcast): Likewise.  Adjust to allow for null pointers.
3241         * tinfo2.cc (__throw_type_match_rtti_2): Likewise.
3242         (__throw_type_match_rtti): Now just a wrapper.
3244         * except.c: Lose CatchMatch, FirstExceptionMatch, and Unwind.
3245         (init_exception_processing): Don't initialize them.
3247 1999-08-23  Paul Burchard <burchard@pobox.com>
3249         * decl.c (check_default_argument): Fix typo.
3251 1999-08-22  Mark Mitchell  <mark@codesourcery.com>
3253         * cp-tree.def (STMT_EXPR): Fix typo in node name.
3255         * dump.c (dump_next_stmt): New function.
3256         (dequeue_and_dump): Use it.
3257         
3258         * pt.c (tsubst_copy): Make sure to initialize return value for a
3259         STMT_EXPR, even when processing_template_decl.
3260         * semantics.c (finish_stmt_expr): A statement-expression whose
3261         last statement is not an expression-statement has type `void'.  
3262         
3263 1999-08-20  Mark Mitchell  <mark@codesourcery.com>
3265         * semantics.c (finish_stmt_expr): Fix typo in comment.
3266         * tree.c (search_tree): Handle EXIT_EXPR, LOOP_EXPR.
3267         (mapcar): Likewise.
3268         * init.c (build_vec_delete_1): Make the children of a permanent
3269         BIND_EXPR permanent.
3270         * pt.c (register_specialization): Don't register a specialization
3271         more than once.
3272         
3273 1999-08-18  Andrew Haley  <aph@cygnus.com>
3275         * method.c (process_overload_item): Call build_mangled_C9x_name ()
3276         for all integer parameter types larger than long long.
3278 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
3280         * pt.c (redeclare_class_template): Merge default template
3281         arguments in both directions.
3283         * typeck.c (common_type): Undo 1999-08-18 change.  Remove
3284         compiler_error message.
3286 1999-08-19  Jason Merrill  <jason@yorick.cygnus.com>
3288         * cp-tree.h: Declare flag_use_repository.
3289         * pt.c (do_decl_instantiation): Don't complain about duplicate
3290         instantiation with -frepo.
3291         (do_type_instantiation): Likewise.
3293         * pt.c (push_template_decl_real): Complain about everything
3294         that isn't a valid template.
3296         * decl2.c (import_export_decl): If -fnew-abi, class linkage doesn't
3297         affect inlines.
3299 1999-08-19  Mark Mitchell  <mark@codesourcery.com>
3301         * cp-tree.def (PSEUDO_DTOR_EXPR): New tree code.
3302         * decl2.c (build_expr_from_tree): Handle it.
3303         * error.c (dump_expr): Likewise.
3304         * pt.c (for_each_template_parm): Likewise.
3305         (tsubst_copy): Likewise.
3306         * tree.c (search_tree): Likewise.
3307         * semantics.c (finish_pseudo_destructor_call): Create it.
3308         
3309 1999-08-18  Mark Mitchell  <mark@codesourcery.com>
3311         * search.c (setup_class_bindings): Robustify.
3312         * typeck.c (common_type): Use same_type_p, not pointer equality,
3313         to compare types.
3315         * cp-tree.h (build_lang_field_decl): Remove.
3316         * class.c (build_vtable): Replace calls to build_lang_field_decl
3317         with build_lang_decl.
3318         (prepare_fresh_vtable): Likewise.
3319         (finish_struct_1): Likewise.
3320         (init_class_processing): Likewise.
3321         * decl.c (push_using_decl): Likewise.
3322         (init_decl_processing): Likewise.
3323         (grokvardecl): Likewise.
3324         (build_ptrmemfunc_type): Likewise.
3325         (grokdeclarator): Likewise.
3326         (build_enumerator): Likewise.
3327         * decl2.c (grok_x_components): Likewise.
3328         (do_class_using_decl): Likewise.
3329         * except.c (call_eh_info): Likewise.
3330         * init.c (init_init_processing): Likewise.
3331         * rtti.c (expand_class_decl): Likewise.
3332         * tree.c (build_base_fields): Likewise.
3333         (build_vbase_pointer_fields): Likewise.
3334         * lex.c (build_lang_decl): Build declarations on the permanent
3335         obstack if we're building statmeent trees.
3336         (retrofit_lang_decl): Handle both the full lang_decl and also the
3337         smaller lang_decl_flags here.
3338         (build_lang_field_decl): Remove.
3339         * pt.c (push_template_decl_real): Issue errors for variable
3340         declarations that are not static members.
3342 1999-08-18  Richard Henderson  <rth@cygnus.com>
3344         * tree.c (search_tree): Handle TRUTH_{AND,OR,XOR}_EXPR too.
3345         (mapcar): Likewise.
3347 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
3349         * cp-tree.h (back_end_hook): New variable.
3350         * decl2.c (back_end_hook): Define it.
3351         (finish_file): If it's non-NULL, call it.
3353         * decl.c (add_decl_to_level): New function.
3354         (push_local_binding): Use it.
3355         (find_binding): Fix typo in comment.
3356         (pushdecl): Use add_decl_to_level.  Put templates on the
3357         corresponding namespace-scope binding levels.
3358         * dump.c (dequeue_and_dump): Print the specializations of a
3359         template.
3360         * pt.c (push_template_decl_real): Don't push a template multiple
3361         times.
3363 1999-08-17  Mark Mitchell  <mark@codesourcery.com>
3365         * cp-tree.h (CALL_DECLARATOR_PARMS): New macro.
3366         (CALL_DECLARATOR_QUALS): Likewise.
3367         (CALL_DECARATOR_EXCEPTION_SPEC): Likewise.
3368         * decl.c (grokdeclarator): Adjust to use them.
3369         * decl2.c (grokfield): Likewise.
3370         (reparse_absdcl_as_casts): Likewise.
3371         * lex.c (make_call_declarator): Likewise.
3372         (set_quals_and_spec): Likewise.
3373         * pt.c (tsubst): Likewise.
3374         * tree.c (mapcar): Remove special hack to handle third operand of
3375         a CALL_EXPR.
3377 1999-08-16  Mark Mitchell  <mark@codesourcery.com>
3379         * cp-tree.h (CAN_HAVE_FULL_LANG_DECL_P): New macro.
3380         * class.c (build_vtable): Use build_lang_field_decl to build the
3381         VAR_DECLs for vtables.
3382         (prepare_fresh_vtable): Likewise.
3383         * decl.c (duplicate_decls): Only copy DECL_SAVED_TREE if
3384         CAN_HAVE_FULL_LANG_DECL_P.
3385         (push_using_decl): Use build_lang_decl to build USING_DECLs.
3386         (grokdeclarator): Use build_lang_decl to build TYPE_DECLs.
3387         * lex.c (retrofit_lang_decl): Check CAN_HAVE_FULL_LANG_DECL_P.
3388         (build_lang_field_decl): Likewise.
3389         (copy_lang_decl): Use CAN_HAVE_FULLLANG_DECL_P to decide how much
3390         to copy.
3391         
3392         * cp-tree.def (STMT_EXPR): New tree node.
3393         * cp-tree.h (STMT_EXPR_STMT): New macro.
3394         (store_return_init): Change prototype.
3395         (finish_named_return_value): New function.
3396         (expand_stmt): Likewise.
3397         (expand_body): Likewise.
3398         (begin_stmt_tree): Likewise.
3399         (finish_stmt_tree): Likewise.
3400         (expanding_p): New variable.
3401         (last_expr_type): Likewise.
3402         (building_stmt_tree): New macro.
3403         * decl.c (start_function): Use building_stmt_tree, not
3404         processing_template_decl, where appropriate.
3405         (store_parm_decls): Likewise.
3406         (store_return_init): Move most of the body to semantics.c.
3407         (finish_function): Use building_stmt_tree.
3408         (finish_stmt): Clear last_expr_type here.
3409         (cp_function): Add expanding_p, last_tree, last_expr_type.
3410         (push_cp_function_context): Save them.
3411         (pop_cp_function_context): Restore them.
3412         * decl2.c (setup_vtbl_ptr): Move to semantics.c.
3413         * error.c (dump_expr): Handle STMT_EXPR.
3414         * except.c (expand_start_catch_block): Use building_stmt_tree.
3415         Use add_decl_stmt.
3416         * expr.c (cplus_expand_expr): Handle STMT_EXPR.
3417         (do_case): Move add_tree call to semantics.c.
3418         * parse.y (return_init): Use finish_named_return_value.
3419         (for.init.statement): Use finish_expr_stmt.
3420         * parse.c: Regenerated.
3421         * pt.c (do_pushlevel): Move to semantics.c.
3422         (do_poplevel): Likewise.
3423         (tsubst_copy): Handle STMT_EXPR instead of BIND_EXPR.
3424         (tsubst_expr): Don't expand all the way to RTL here.  Handle
3425         RETURN_INIT and CTOR_INITIALIZER.
3426         (instantiate_decl): Call expand_body after tsubst'ing into
3427         DECL_SAVED_TREE.
3428         * semantics.c (expand_stmts): New function.
3429         (expanding_p): New variable.
3430         (last_expr_type): Likewise.
3431         (finish_expr_stmt): Use building_stmt_tree.
3432         (begin_if_stmt): Likewise.
3433         (finish_if_stmt_cond): Likewise.
3434         (finish_then_clause): Likewise.
3435         (begin_else_clause): Likewise.
3436         (finish_else_clause): Likewise.
3437         (begin_while_stmt): Likewise.
3438         (finish_while_stmt_cond): Likewise.
3439         (finish_while_stmt): Likewise.
3440         (finish_do_body): Likewise.
3441         (finish_do_stmt): Likewise.
3442         (finish_return_stmt): Likewise.
3443         (begin_for_stmt): Likewise.
3444         (fnish_for_init_stmt): Likewise.
3445         (finish_for_cond): Likewise.
3446         (finish_for_expr): Likewise.
3447         (finish_for_stmt): Likewise.
3448         (finish_break_stmt): Likewise.
3449         (finish_continue_stmt): Likewise.
3450         (finish_switch_cond): Likewise.
3451         (finish_switch_stmt): Likewise.
3452         (finish_case_label): Call add_tree here if necessary.
3453         (finish_goto_statement): Use building_stmt_tree.
3454         (begin_try_block): Likewise.
3455         (begin_function_try_block): Likewise.
3456         (finish_try_block): Likewise.
3457         (finish_function_try_block): Likewise.
3458         (finish_handler_sequence): Likewise.
3459         (finish_function_handler_sequence): Likewise.
3460         (begin_handler): Likewise.
3461         (finish_handler_parms): Likewise.
3462         (finish_handler): Likewise.
3463         (begin_compound_stmt): Likewise.
3464         (finish_compound_stmt): Likewise.
3465         (finish_asm_stmt): Likewise.
3466         (finish_label_stmt): Likewise.
3467         (finish_named_return_value): New function.
3468         (setup_vtbl_ptr): Moved here from decl2.c.
3469         (do_pushlevel): Moved here from pt.c.
3470         (do_poplevel): Likewise.
3471         (begin_stmt_expr): Use building_stmt_tree.
3472         (finish_stmt_expr): Likewise.  Build a STMT_EXPR, not a BIND_EXPR,
3473         when building_stmt_tree.
3474         (begin_stmt_tree): New function.
3475         (finish_stmt_tree): Likewise.
3476         (expand_stmt): Likewise.
3477         (expand_body): Likewise.
3478         * tree.c (build_cplus_method_type): Make sure the argument types
3479         end up on the same obstack as the METHOD_TYPE.
3480         (search_tree): Handle COMPOUND_EXPR, MODIFY_EXPR,
3481         THROW_EXPR, STMT_EXPR.
3482         (mapcar): Break out common cases.  Handle COMPOUND_EXPR,
3483         MODIFY_EXPR, THROW_EXPR, STMT_EXPR, RTL_EXPR.  Abort, rather than
3484         sorry, if an unsupported node is encountered.
3485         * typeck.c (require_complete_type_in_void): Handle BIND_EXPR.
3486         (c_expand_return): Don't call add_tree here.
3487         
3488 1999-08-15  Mark Mitchell  <mark@codesourcery.com>
3490         * pt.c (check_default_tmpl_args): Don't check in local scopes.
3491         (tsubst_decl): Make sure the declaration is on a saveable
3492         obstack.  Clear DECL_DEAD_FOR_LOCAL when making a copy of a local
3493         variable.
3494         (tsubst_expr): Adjust now that DECL_STMTs really contain DECLs.
3495         
3496 1999-08-14  Jason Merrill  <jason@yorick.cygnus.com>
3498         Speed up Koenig lookup.
3499         * decl.c (unqualified_namespace_lookup): Nonstatic.  Add spacep parm
3500         to return namespaces we've looked at.
3501         * decl2.c (lookup_using_namespace): Likewise.
3502         (add_function): Don't call ovl_member.
3503         (lookup_arg_dependent): Initialize k.namespaces to the list of 
3504         namespaces seen in unqualified lookup.
3505         * call.c (equal_functions): Move here from tree.c.
3506         (joust): Use it to handle duplicate candidates.
3507         * tree.c (ovl_member): Use ==.
3509 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
3511         * cp-tree.def (DECL_STMT): Make it smaller.
3512         * cp-tree.h (lang_decl_flags): Move saved_tree to ...
3513         (lang_decl): ... here.  Add next.
3514         (DECL_SAVED_TREE): Adjust accordingly.
3515         (DECL_IMPLICIT_TYPEDEF_P): New macro.
3516         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
3517         (DECL_STMT_DECL): Likewise.
3518         (create_implicit_typedef): New function.
3519         (maybe_push_decl): Likewise.
3520         (tsubst_default_argument): New function.
3521         (at_function_scope_p): Likewise.
3522         (add_decl_stmt): Likewise.
3523         (push_permanent_obstack): Likewise.
3524         * call.c (convert_default_arg): Use tsubst_default_argument.
3525         * class.c (add_method): Use push_permanent_obstack.
3526         (build_self_reference): Create a TEMPLATE_DECL for the
3527         self-reference, if necessary.
3528         * decl.c (pseudo_global_level_p): Only look at the current binding
3529         level.
3530         (push_binding): Use push_permanent_obstack.
3531         (create_implicit_typedef): New function.
3532         (pushtag): Use it.
3533         (duplicate_decls): Use push_permanent_obstack.
3534         (maybe_push_decl): New function.
3535         (start_decl): Use it.  Remove dead code.  Use add_decl_stmt.
3536         (start_decl_1): Remove dead code.
3537         (cp_finish_decl): Remove DECL_STMT handling here.  Don't use
3538         pseudo_global_level_p.
3539         (grokvardecl): Create DECL_LANG_SPECIFIC for a VAR_DECL in a
3540         template.
3541         (grokdeclarator): Likewise, for TYPE_DECLs.  Don't use
3542         pseudo_global_level_p.
3543         * decl2.c (grokfield): Call push_template_decl for a TYPE_DECL in
3544         a template.
3545         (get_sentry): Use push_permanent_obstack.
3546         * dump.c (dequeue_and_dump): Enable DECL_STMT.
3547         * except.c (call_eh_info): Use push_permanent_obstack.
3548         (build_eh_type_ref): Likewise.
3549         (do_pop_exception): Likewise.
3550         (expand_eh_spec): Likewise.
3551         (alloc_eh_object): Likewise.
3552         (expand_throw): Likewise.
3553         * init.c (build_java_class_ref): Likewise.
3554         * lex.c (get_time_identifier): Likewise.
3555         (free_lang_decl_chain): Correct type.
3556         (retrofit_lang_decl): Adjust accordingly.
3557         (build_lang_field_decl): Likewise.
3558         * lex.h (free_lang_decl_chain): Likewise.
3559         * parse.y (lang_extdef): Don't use pseudo_global_level_p.
3560         * parse.c: Regenerated.
3561         * pt.c (tsubst_default_arguments): New function.
3562         (retrieve_local_specialization): Likewise.
3563         (register_local_specialization): Likewise.
3564         (push_template_decl_real): Use DECL_IMPLICIT_TYPEDEF_P.  Just use
3565         pseudo_global_level_p to determine whether or not a template is
3566         primary.
3567         (lookup_template_class): Likewise.  Use create_implicit_typedef.
3568         (instantiate_class_template): Call tsubst_default_arguments for
3569         member functions, if appropriate.
3570         (tsubst_default_argument): New function.
3571         (tsubst_decl): Use it.  Change TYPE_DECL handling to match VAR_DECLs.
3572         * search.c (at_function_scope_p): New function.
3573         * semantics.c (finish_asm_stmt): Use push_permanent_obstack.
3574         (finish_label_stmt): Likewise.
3575         (add_decl_stmt): New function.
3576         (begin_class_definition): Likewise.
3577         (finish_typeof): Likewise.
3578         * tree.c (copy_template_template_parm): Likewise.
3579         (copy_to_permanent): Likewise.
3580         (push_permanent_obstack): Define.
3581         (mark_addressable): Use it.
3582         * typeck.c (mark_addressable): Likewise.
3583         
3584 1999-08-13  Gavin Romig-Koch  <gavin@cygnus.com>
3586         * cp-tree.h (init_cplus_unsave): New.
3587         (cplus_unsave_expr_now): New.
3588         * lex.c (init_parse): Call init_cplus_unsave.
3589         * tree.c (init_cplus_unsave): New.
3590         (cplus_unsave_expr_now): New.
3592 1999-08-13  Mark Mitchell  <mark@codesourcery.com>
3594         * pt.c (tsubst): Back out 1999-08-06 patch.  Use fold and
3595         decl_constant_value to simplify array bounds.
3597 1999-08-11  Jason Merrill  <jason@yorick.cygnus.com>
3599         * lang-options.h: Add -fms-extensions.
3600         * cp-tree.h: Declare flag_ms_extensions.
3601         * decl2.c: Define it.
3602         * class.c (instantiate_type): Don't complain about taking the address
3603         of a bound member function if -fms-extensions.
3604         * typeck.c (build_unary_op): Likewise.
3605         * decl.c (grokdeclarator): Or about implicit int.
3606         * init.c (resolve_offset_ref): Or about implicit '&'.
3608 1999-08-11  Mark Mitchell  <mark@codesourcery.com>
3610         * cp-tree.h (minimal_parse_mode): Remove.
3611         (finish_label_stmt): New function.
3612         * decl.c (saved_scope): Remove minimal parse mode.
3613         (maybe_push_to_top_level): Don't save it.
3614         (pop_from_top_level): Don't restore it.
3615         (define_label): Split out template-handling code to semantics.c.
3616         (start_decl): Don't use minimal_parse_mode.
3617         (cp_finish_decl): Likewise.
3618         (start_function): Don't increment it.
3619         (store_return_init): Don't use it.
3620         (finish_function): Don't decrement it.
3621         * parse.y (label_colon): Use finish_label_stmt throughout.
3622         * parse.c: Regenerated.
3623         * pt.c (minimal_parse_mode): Don't define it.
3624         (tsubst_expr): Use finish_label_stmt.
3625         * semantics.c (finish_label_stmt): New function.
3627         * dump.c (queue): Be careful when computing bitmasks.
3628         (dequeue_and_dump): Describe binfos as binfos, not as
3629         vectors.
3630         
3631         * parse.y (pedantic): Give it itype.  Adjust usage accordingly
3632         throughout.     
3633         * parse.c: Regenerated.
3634         
3635         * Make-lang.in (CXX_SRCS): Remove sig.c.
3636         * Makefile.in (CXX_OBJS): Remove sig.o.
3637         (sig.o): Remove.
3638         * cp-tree.h (CPTI_OPAQUE_TYPE): Remove.
3639         (CPTI_SIGNATURE_TYPE): Likewise.
3640         (CPTI_SIGTABLE_ENTRY_TYPE): Likewise.
3641         (opaque_type_node): Likewise.
3642         (signature_type_node): Likewise.
3643         (sigtable_entry_type): Likewise.
3644         (flag_handle_signatures): Likewise.
3645         (lang_type): Remove is_signature, is_signature_pointer,
3646         is_signature_reference, has_opaque_typedecls,
3647         sigtables_has_been_generated.  Adjust dummy.  Remove signature,
3648         signature_pointer_to, signature_reference_to.
3649         (IS_SIGNATURE): Remove.
3650         (SET_SIGNATURE): Remove.
3651         (CLEAR_SIGNATURE): Remove.
3652         (IS_SIGNATURE_POINTER): Remove.
3653         (IS_SIGNATURE_REFERENCE): Remove.
3654         (SIGNATURE_HAS_OPAQUE_TYPEDECLS): Remove.
3655         (SIGTABLE_HAS_BEEN_GENERATED): Remove.
3656         (CLASSTYPE_SIGNATURE): Remove.
3657         (SIGNATURE_TYPE): Remove.
3658         (SIGNATURE_METHOD_VEC): Remove.
3659         (SIGNATURE_POINTER_TO): Remove.
3660         (SIGNATURE_REFERENCE_TO): Remove.
3661         (lang_decl_flags): Remove is_default_implementation.  Rename
3662         memfunc_pointer_to to saved_tree.
3663         (IS_DEFAULT_IMPLEMENTATION): Remove.
3664         (DECL_MEMFUNC_POINTER_TO): Remove.
3665         (DECL_MEMFUNC_POINTING_TO): Remove.
3666         (DECL_SAVED_TREE): Adjust definition.
3667         (tag_types): Remove signature_type_node.
3668         (SIGNATURE_FIELD_NAME): Remove.
3669         (SIGNATURE_FIELD_NAME_FORMAT): Likewise.
3670         (SIGNATURE_OPTR_NAME): Likewise.
3671         (SIGNATURE_SPTR_NAME): Likewise.
3672         (SIGNATURE_POINTER_NAME): Likewise.
3673         (SIGNATURE_POINTER_NAME_FORMAT): Likewise.
3674         (SIGNATURE_REFERENCE_NAME): Likewise.
3675         (SIGNATURE_REFERNECE_NAME_FORMAT): Likewise.
3676         (SIGTABLE_PTR_TYPE): Likewise.
3677         (SIGTABLE_NAME_FORMAT): Likewise.
3678         (SIGTABLE_NAME_FORMAT_LONG): Likewise.
3679         (SIGTABLE_TAG_NAME): Likewise.
3680         (SIGTABLE_VB_OFF_NAME): Likewise.
3681         (SIGTABLE_VT_OFF_NAME): Likewise.
3682         (finish_base_specifiers): Change prototype.
3683         (build_signature_pointer_type): Remove.
3684         (build_signature_reference_type): Remove.
3685         (build_signature_pointer_constructor): Remove.
3686         (build_signature_method_call): Remove.
3687         (build_optr_ref): Likewise.
3688         (append_signature_fields): Likewise.
3689         (signature_error): Likewise.
3690         * call.c (build_this): Remove signature support.
3691         (build_over_call): Likewise.
3692         (build_new_method_call): Likewise.
3693         * class.c (add_implicitly_declared_members): Likewise.
3694         (finish_struct_1): Likewise.
3695         (finish_struct): Likewise.
3696         * cvt.c (cp_convert_to_pointer): Likewise.
3697         (convert_to_pointer_force): Likewise.
3698         (ocp_convert): Likewise.
3699         * decl.c (sigtable_decl_p): Remove.
3700         (init_decl_processing): Remove support for signatures.
3701         (cp_finish_decl): Likewise.
3702         (grokdeclarator): Likewise.
3703         (grokparms): Likewise.
3704         (xref_tag): Likewise.
3705         (start_function): Likewise.
3706         (start_method): Likewise.
3707         * decl2.c (finish_sigtable_vardecl): Remove.
3708         (flag_handle_signatures): Remove.
3709         (lang_f_options): Remove handle-signatures.
3710         (grokfield): Remove support for signatures.
3711         (grokbitfield): Likewise.
3712         (finish_file): Likewise.
3713         (reparse_absdcl_as_casts): Likewise.
3714         * error.c (dump_type_real): Likewise.
3715         (dump_function_decl): Likewise.
3716         * friend.c (make_friend_class): Likewise.
3717         * gxx.gperf: Remove __signature__, signature, __sigof__, sigof.
3718         * hash.h: Regenerated.
3719         * init.c (build_new_1): Remove support for signatures.
3720         * lang-options.h: Remove -fhandle-signatures,
3721         -fno-handle-signatures. 
3722         * lex.c (init_parse): Remove support for signatures.
3723         (yyprint): Likewise.
3724         * lex.h (rid): Remove RID_SIGNATURE.
3725         * method.c (build_decl_overload_real): Remove support for
3726         signatures. 
3727         (hack_identifier): Likewise.
3728         * parse.y (base_class): Likewise.
3729         (base_class.1): Likewise.
3730         (access_specifier): Likewise.
3731         * search.c (lookup_member): Likewise.
3732         * semantics.c (finish_qualified_object_call_expr): Likewise.
3733         (finish_template_type_parm): Likewise.
3734         (begin_class_definition): Likewise.
3735         (finish_base_specifier): Likewise.
3736         * sig.c: Remove.
3737         * tree.c (build_cplus_method_type): Remove support for signatures.
3738         * typeck.c (require_complete_type): Likewise.
3739         (c_sizeof): Likewise.
3740         (c_alignof): Likewise.
3741         (build_object_ref): Likewise.
3742         (build_component_ref): Likewise.
3743         (build_indirect_ref): Likewise.
3744         (build_c_cast): Likewise.
3745         (build_modify_expr): Likewise.
3746         (convert_for_initialization): Likewise.
3747         * typeck2.c (signature_error): Remove.
3748         (store_init_value): Remove support for signatures.
3749         (digest_init): Likewise.
3750         (build_x_arrow): Likewise.
3751         (build_functional_cast): Likewise.
3752         * xref.c (GNU_xref_decl): Likewise.
3753         
3754 1999-08-10  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
3756         * lex.c (do_identifier): Remove unnecessary lookup of class field.
3758 1999-08-09  Martin v. Loewis  <martin@mira.isdn.cs.tu-berlin.de>
3760         * decl2.c (set_decl_namespace): Do not complain about non-matching
3761         decls if processing a template.
3763 1999-08-09  Mark Mitchell  <mark@codesourcery.com>
3765         * decl.c (build_ptrmemfunc_type): Handle qualified
3766         pointer-to-member types here.
3767         * tree.c (cp_build_qualified_type_real): Simplify handling here.
3769 1999-08-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3771         * lex.c (lang_identify): Likewise.
3773 1999-08-09  Bernd Schmidt  <bernds@cygnus.co.uk>
3775         * Makefile.in: Update dependencies.
3776         * class.c (finish_struct_1): Don't initialize DECL_SAVED_INSNS with
3777         NULL_RTX.
3778         * decl.c: Include "function.h"
3779         (cleanup_label, return_label): Delete declarations.
3780         (store_parm_decls):  Don't initialize DECL_SAVED_INSNS with NULL_RTX.
3781         (finish_function): Rename last_parm_insn variable to
3782         fn_last_parm_insn.  Don't compare DECL_SAVED_INSNS to NULL_RTX.
3783         * decl2.c: Include "function.h".
3784         (rtl_expr_chain): Delete declaration.
3785         * method.c: Include "function.h"
3786         * tree.c (build_vbase_pointer_fields): Don't initialize
3787         DECL_SAVED_INSNS with NULL_RTX.
3788         * typeck.c: Include "function.h"
3790 1999-08-09  Jason Merrill  <jason@yorick.cygnus.com>
3792         * semantics.c (begin_function_try_block, finish_function_try_block,
3793         finish_function_handler_sequence): New fns.
3794         * parse.y (function_try_block): Use them.
3795         * pt.c (instantiate_decl): Likewise.
3797         * cp-tree.h: Declare in_function_try_handler.
3798         * decl.c: Define it.
3799         (start_function): Clear it.
3800         (struct cp_function, push_cp_function_context): Save it.
3801         (pop_cp_function_context): Restore it.
3802         * parse.y (function_try_block): Set and clear it.
3803         * except.c (expand_end_catch_block): Rethrow if we reach the end
3804         of a function-try-block handler in a ctor or dtor.
3805         * typeck.c (c_expand_return): Complain about returning from a
3806         function-try-block handler of a ctor.
3808         * parse.y (function_try_block): Call end_protect_partials
3809         before expand_start_all_catch.
3811 1999-08-08  Jason Merrill  <jason@yorick.cygnus.com>
3813         * decl.c (struct binding_level): Add eh_region field.
3814         (push_binding_level): Set it.
3815         (define_label): Complain about jumping into an EH block.
3817         * ptree.c (print_lang_type): Print the real type of a PMF.
3818         Print what exceptions a fn type throws.
3820 1999-08-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3822         * class.c (count_fields, add_fields_to_vec): Add static prototype.
3824         * cp-tree.h (opname_tab, assignop_tab, operator_name_string,
3825         get_id_2, composite_pointer_type, dump_node_to_file): Constify a
3826         char*.
3828         * decl.c (named_label_list, cp_finish_decl, grokdeclarator):
3829         Constify a char*.
3831         * decl2.c (finish_static_data_member_decl, grokfield): Constify a
3832         char*.
3834         * dump.c (queue_and_dump_index, dump_int, dump_string,
3835         dump_string_field, dequeue_and_dump, dump_node_to_file): Constify
3836         a char*.
3837         (dump_stmt): Add static prototype.
3839         * errfn.c (cp_thing): Constify a char*.
3841         * error.c (dump_unary_op, dump_binary_op, aggr_variety,
3842         dump_aggr_type, dump_global_iord, dump_decl, dump_function_name,
3843         dump_expr): Constify a char*.
3845         * lex.c (extend_token_buffer_to, pragma_getc, pragma_ungetc,
3846         read_line_number): Add static prototype.
3847         (opname_tab, assignop_tab, operator_name_string): Constify a char*.
3848         (real_yylex): Move label `letter' into the scope where it is used.
3850         * method.c (build_mangled_template_parm_index, build_overload_int,
3851         build_decl_overload_real, get_id_2): Constify a char*.
3853         * search.c (check_final_overrider): Make static.
3855         * typeck.c (composite_pointer_type): Constify a char*.
3857 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
3859         * pt.c (maybe_get_template_decl_from_type_decl): Make sure that
3860         we're looking at a class.
3862         * decl.c (lookup_name_real): Set the complain flag if we're
3863         looking for a namespace member.
3865         * lex.c (real_yylex): We can have a number with no digits.
3867         * cvt.c (cp_convert_to_pointer): Don't force pmf conversions.
3869         * search.c (binfo_from_vbase): New fn.
3870         * cp-tree.h: Declare it.
3871         * cvt.c (cp_convert_to_pointer): Use it to diagnose conversion
3872         from pointer to member of virtual base.  
3873         * typeck.c (get_delta_difference): Likewise.
3875 1999-08-06  Alexandre Oliva  <oliva@dcc.unicamp.br>
3877         * pt.c (tsubst): Use build_index_type to build in-template array
3878         index type.  Fixes g++.oliva/dwarf1.C.
3879         * decl.c (grokdeclarator): Likewise, just for consistency, as it
3880         doesn't seem to trigger the bug without it.
3882 1999-08-06  Jason Merrill  <jason@yorick.cygnus.com>
3884         * typeck2.c (add_exception_specifier): Use complete_type.
3886 1999-08-06  Mark Mitchell  <mark@codesourcery.com>
3888         * error.c (dump_expr): Handle EXACT_DIV_EXPR.
3889         (dump_binary_op): Bulletproof.
3890         * lex.c (init_parse): Set opname_tab[EXACT_DIV_EXPR].
3891         * tree.c (search_tree): Don't enumerate all the nodes of classes
3892         `1', `2', and `<'; handle them generically.  Don't be sorry about
3893         "unrecognized tree codes"; just abort.
3894         (no_linkage_check): Don't do linkage checks for templates.
3895         
3896         * tree.c (cp_build_qualified_type_real): Handle
3897         pointer-to-member-function types correctly.
3899 1999-08-05  Jason Merrill  <jason@yorick.cygnus.com>
3901         * decl.c (pushdecl): Only give an error for shadowing a parm 
3902         from *this* function.
3904 Thu Aug  5 02:40:42 1999  Jeffrey A Law  (law@cygnus.com)
3906         * typeck2.c: Update URLs and mail addresses.
3908 1999-08-04  Nathan Sidwell  <nathan@acm.org>
3910         * cp-tree.h (empty_except_spec): New global var.
3911         (compexcepttypes): Remove prototype.
3912         (comp_except_specs): Prototype new global function.
3913         (add_exception_specifier): Prototype new global function.
3914         * decl.c (empty_except_spec): Define new global var.
3915         (duplicate_decls): Use comp_except_specs, reword error message.
3916         (init_decl_processing): Initialize empty_except_spec.
3917         Adjust build_exception_variant calls.
3918         * parse.y (exception_specification_opt): Use empty_except_spec.
3919         (ansi_raise_identifier): Call check_for_new_type.
3920         (ansi_raise_identifiers): Use add_exception_specifier.
3921         * pt.c (tsubst): Use add_exception_specifier to build exception
3922         specifier.
3923         * search.c (check_final_overrider): New static function, broken
3924         out of get_matching_virtual. Check throw specifiers, reword
3925         diagnostics.
3926         (get_matching_virtual): Use check_final_overrider.
3927         * tree.c (build_exception_variant): Use comp_except_specs.
3928         * typeck.c (compexcepttypes): Remove.
3929         (comp_except_types): New static function, helper for
3930         comp_except_specs. Compare two types as exception specifiers.
3931         (comp_except_specs): New global function, compare two exception
3932         specifiers.
3933         (comptypes): Adjust for comp_except_specs.
3934         * typeck2.c (add_exception_specifier): New global function.
3935         
3936         * class.c (check_for_override): Reword error message.
3938 1999-08-03  Nathan Sidwell  <nathan@acm.org>
3940         * call.c (convert_arg_to_ellipsis): Use pod_type_p.
3941         * cp-tree.h (struct lang_type): Added non_pod_class flag.
3942         (CLASSTYPE_NON_POD_P): New macro to access it.
3943         * class.c (finish_struct_1): Determine non-PODness.
3944         Check for arrays of pointers (-Weffc++).
3945         Remove array inspection duplicated code.
3946         * tree.c (pod_type_p): Detect non-pod non-aggregate types.
3947         Use CLASSTYPE_NON_POD_P.
3949 1999-08-03  Nathan Sidwell  <nathan@acm.org>
3951         * class.c (duplicate_tag_error): Preserve template information.
3953 1999-08-03  Nathan Sidwell  <nathan@acm.org>
3955         * decl.c (start_enum): Show location of previous definition.
3956         * parse.y (enumlist_opt): New reduction.
3957         (structsp): Simplify enum rules to use enumlist_opt.
3959 1999-08-03  Jason Merrill  <jason@yorick.cygnus.com>
3961         * lex.c (yyprint): Handle PFUNCNAME.
3963         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Only
3964         build_expr_from_tree on the args of a TEMPLATE_ID_EXPR.
3966 1999-08-03  Mumit Khan  <khan@xraylith.wisc.edu>
3968         * decl.c (start_decl): Set attributes before duplicate_decls call.
3970 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
3972         * Make-lang.in (CXX_SRCS): Add dump.c.
3973         * Makefile.in (CXX_OBJS): Add dump.o.
3974         (dump.o): New target.
3975         * cp-tree.h (DECL_CONV_FN_P): Document.
3976         (DECL_OVERLOADED_OPERATOR_P): New function.
3977         (TYPE_PTRMEM_CLASS_TYPE): New macro.
3978         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
3979         (PTRMEM_CST_CLASS): Use TYPE_PTRMEM_CLASS_TYPE.
3980         (ASM_VOLATILE_P): New macro.
3981         (STMT_LINENO): Likewise.
3982         (cp_namespace_decls): New function.
3983         (dump_node_to_file): New function.
3984         * decl.c (cp_namespace_decls): New function.
3985         (walk_namespaces_r): Use it.
3986         (wrapup_globals_for_namespace): Likewise.
3987         * decl2.c (flag_dump_translation_unit): New variable.
3988         (lang_decode_option): Handle -fdump-translation-unit.
3989         (finish_file): If flag_dump_translation_unit is set, dump the
3990         translation unit.
3991         * dump.c: New file.
3992         * lang-options.h: Add -fdump-translation-unit.
3993         * pt.c (tsubst_template_parms): Robustify.
3994         (tsubst_decl): Use DECL_OVERLOADED_OPERATOR_P.
3995         (tsubst_expr): Use STMT_LINENO.
3996         * semantics.c (finish_asm_stmt): Eliminate duplicate code.  Check
3997         for invalid cv-qualifiers even while building templates.
3998         
3999 1999-08-02  Richard Henderson  <rth@cygnus.com>
4001         * call.c: Include defaults.h instead of expr.h.
4002         * decl.c: Likewise.
4003         * pt.c: Likewise.
4004         * typeck.c: Include defaults.h.
4006 1999-08-02  Mark Mitchell  <mark@codesourcery.com>
4008         * lex.c (errorcount, sorrycount): Don't declare.
4009         * repo.c (errorcount, sorrycount): Likewise.
4010         * typeck2.c (errorcount, sorrycount): Likewise.
4012 1999-08-02  Jakub Jelinek  <jj@ultra.linux.cz>
4014         * call.c (convert_default_arg, build_over_call): Change all uses of
4015         PROMOTE_PROTOTYPES, so that it tests it as a C expression.
4016         Ensure expr.h is included.
4017         * decl.c (grokparams): Ditto.
4018         * pt.c (tsubst_decl): Ditto.
4019         * typeck.c (convert_arguments): Ditto.
4021 1999-08-02  Jason Merrill  <jason@yorick.cygnus.com>
4023         * class.c (mark_overriders): Fix order of args to overrides.
4024         (warn_hidden): Likewise.  Fix for having virtual and non-virtual
4025         functions with the same name.
4027 1999-08-02  Richard Henderson  <rth@cygnus.com>
4029         * cp-tree.h (TYPE_PTRMEMFUNC_P): Check TYPE_LANG_SPECIFIC non-null.
4031 1999-08-01  Mark Mitchell  <mark@codesourcery.com>
4033         * call.c (build_conditional_expr): Fix typo in comment.
4035 1999-08-01  Bernd Schmidt  <bernds@cygnus.co.uk>
4037         * decl.c (finish_stmt): Don't declare and test cond_stack, loop_stack,
4038         case_stack; use in_control_zone_p.
4039         * typeck.c (c_expand_return): Likewise.
4041 1999-07-31  Bernd Schmidt  <bernds@cygnus.co.uk>
4043         * except.c (catch_clauses): Delete declaration.
4045 1999-07-30  Mark Mitchell  <mark@codesourcery.com>
4047         * call.c (build_conditional_expr): Call convert_from_reference to
4048         avoid reference/non-reference type confusion.  Fix typo.
4050 1999-07-30  Richard Henderson  <rth@cygnus.com>
4052         * typeck2.c (initializer_constant_valid_p): Moved to c-common.c.
4053         * cp-tree.h (initializer_constant_valid_p): Remove.
4055 1999-07-28  Mark Mitchell  <mark@codesourcery.com>
4057         * call.c (conditional_conversion): Don't build BASE_CONVs for
4058         conversions between things that have the same type.
4059         (build_conditional_expr): Tweak.
4060         (convert_like): Some BASE_CONVs really do require the generation
4061         of code.
4062         
4063         * init.c (perform_member_init): Don't go through build_modify_expr
4064         for simple initializations.
4066 1999-07-27  Jason Merrill  <jason@yorick.cygnus.com>
4068         * cp-tree.h (DECL_VIRTUAL_CONTEXT): New macro.
4069         * typeck.c (expand_ptrmemfunc_cst): Calculate delta correctly for
4070         virtual functions and MI.  Simplify.
4072         * method.c: Remove prototype for largest_union_member.
4073         * pt.c (determine_specialization): Fix uninitialized warning.
4074         * lex.c (real_yylex): Likewise.
4076 1999-07-27  Mark Mitchell  <mark@codesourcery.com>
4078         * class.c (override_one_vtable): Adjust the use of BINFO_VIRTUALS
4079         here too.
4081         * cp-tree.h (BINFO_VIRTUALS): Document new format.
4082         * class.c (modify_one_vtable): Change prototype accordingly.
4083         (modify_all_vtables): Likewise.
4084         (modify_all_direct_vtables): Likewise.
4085         (modify_all_indirect_vtables): Likewise.
4086         (build_vtable_entry_for_fn): New function.
4087         (set_rtti_entry): Simplify for new BINFO_VIRTUALS format.
4088         (modify_vtable_entry): Likewise.
4089         (add_virtual_function): Likewise.
4090         (build_vtbl_initializer): New function.
4091         (finish_vtbls): Simplify for new BINFO_VIRTUALS format.
4092         (fixup_vtable_deltas1): Likewise.
4093         (fixup_vtable_deltas): Likewise.
4094         (override_one_vtable): Likewise.
4095         (finish_struct_1): Likewise.
4097         * error.c (dump_expr): Likewise.
4098         * search.c (get_abstract_virtuals_1): Likewise.
4099         (get_abstract_virtuals): Likewise.
4100         (expand_upcast_fixups): Likewise.
4101         * tree.c (debug_binfo): Likewise.
4102         * decl2.c (mark_vtable_entries): Don't bash abstract virtuals to
4103         __pure_virtual here.
4104         
4105 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
4107         * tree.c (build_cplus_new): Adjust call to abstract_virtuals_error
4108         as per 1999-07-26 change.
4110         * typeck.c (c_sizeof): Don't allow non-static data members.
4111         (expr_sizeof): Likewise.
4113 1999-07-26  Jason Merrill  <jason@yorick.cygnus.com>
4115         * input.c (feed_input): Only touch lineno and input_filename
4116         if !USE_CPPLIB.  Save the old values before setting the new ones.
4118         * input.c (feed_input): Add file, line parms.
4119         * lex.c (begin_definition_of_inclass_inline, feed_defarg): Adjust.
4120         (real_yylex): Check linemode before input_redirected().
4122         * typeck.c (c_expand_return): Downgrade pedwarn about returning NULL
4123         from op new to warning.
4125 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
4127         * cp-tree.h (ncp_convert): Rename to perform_implicit_conversion.
4128         * call.c: All uses changed.
4129         * typeck.c: Likewise.
4131 1999-07-26  Nathan Sidwell  <nathan@acm.org>
4133         * exception.cc (__cplus_type_matcher): Match __eh_matcher
4134         prototype.
4136 1999-07-26  Mark Mitchell  <mark@codesourcery.com>
4138         * cp-tree.h (CP_INTEGRAL_TYPE_P): New macro.
4139         (ARITHMETIC_TYPE_P): Adjust definition for standard conformance.
4140         (strip_top_quals): Declare.
4141         (ncp_convert): Likewise.
4142         (type_after_usual_arithmetic_conversions): Likewise.
4143         (composite_pointer_type): Likewise.
4144         * call.c (strip_top_quals): Don't make it static.
4145         (promoted_arithmetic_type_p): New function.
4146         (conditional_conversion): Likewise.
4147         (null_ptr_cst_p): Allow `false' as a NULL pointer constant.
4148         (standard_conversion): Use same_type_p.  Don't build BASE_CONVs
4149         for converting a type to itself.
4150         (reference_binding): Honor LOOKUP_NO_TEMP_BIND.
4151         (implicit_conversion): Make sure the from and to types are
4152         complete.
4153         (add_builtin_candidate): Correct handling of ?: operator.
4154         (add_builtin_candidates): Improve documentation.
4155         (build_conditional_expr): New function.
4156         (can_convert): Implement in terms of can_convert_arg.
4157         (ncp_convert): New function.
4158         * typeck.c (type_after_usual_arithmetic_conversions): New
4159         function, split out from common_type.
4160         (composite_pointer_type): New function, split out from
4161         build_conditional_expr.
4162         (common_type): Use type_after_usual_arithmetic_conversions.
4163         Remove redundant attribute merging.
4164         (comptypes): Tidy.  Handle COMPLEX_TYPE.
4165         (build_binary_op_nodefault): Use null_ptr_cst_p.
4166         (build_conditional_expr): Remove.
4167         (convert_for_assignment): Use new conversion functions.
4168         
4169         * cp-tree.h (abstract_virtuals_error): Change declaration.
4170         * typeck2.c (abstract_virtuals_error): Check to see if an error
4171         occurred, and return a boolean value accordingly.
4172         (build_functional_cast): Adjust accordingly.
4173         * class.c (finish_struct_1): Likewise.
4174         * cvt.c (ocp_convert): Likewise.
4175         * decl.c (cp_finish_decl): Likewise.
4176         (grokparams): Likewise.
4177         (grok_op_properties): Likewise.
4178         (start_function): Likewise.
4179         * init.c (build_new_1): Likewise.
4181         * pt.c (unify): Don't get confused by pointers-to-member functions.
4183         * search.c (build_cplus_new): Robustify.
4184         
4185 1999-07-24  Richard Henderson  <rth@cygnus.com>
4187         * gxx.gperf (__builtin_va_arg): New.
4188         * parse.y (VA_ARG): New token.
4189         (unary_expr): Recognize it.
4191 Sun Jul 25 15:24:21 1999  Jeffrey A Law  (law@cygnus.com)
4193         * g++FAQ.texi: Deleted per Joe Buck's request.
4194         * Makefile.in: Corresponding changes.
4196 1999-07-23  Jason Merrill  <jason@yorick.cygnus.com>
4198         * lex.c: Sync with C frontend.
4199         (whitespace_cr): New fn.
4200         (skip_white_space): Use it.
4201         (init_parse): Reorder.
4202         (yyprint): Support CONSTANT.
4203         (pragma_getc, pragma_ungetc): Bring back.
4204         (read_line_number): Change in_system_header directly.
4205         (handle_generic_pragma, handle_cp_pragma, yyerror): Move up in file.
4206         (parse_float): Update to C version.
4207         (yylex): Handle '$' under the letter case.
4208         Remove looking_for_typename handling.
4209         Support hex floating point constants.
4210         Follow C's lead for choosing type of integer constants.
4211         Rearrange stuff to match C frontend.
4212         (yyungetc, reinit_parse_for_block, yylex): Support indent_level.
4213         * spew.c (yylex): Clear looking_for_typename if we see a TYPESPEC.
4215 1999-07-23  Mark Mitchell  <mark@codesourcery.com>
4217         * call.c (reference_binding): Tweak.
4218         (mayble_handle_implicit_object): Use direct_reference_binding to
4219         create the right implicit conversion sequence.
4221 1999-07-22  Mark Mitchell  <mark@codesourcery.com>
4223         * pt.c (convert_nontype_argument): Don't call decl_constant_value
4224         if we're converting to a reference type.
4226         * call.c (NEED_TEMPORARY_P): New macro.
4227         (standard_conversion): Set it, for derived-to-base conversions.
4228         (reference_related_p): New function.
4229         (reference_compatible_p): Likewise.
4230         (convert_class_to_reference): Likewise.
4231         (direct_reference_binding): Likewise.
4232         (reference_binding): Rework for standards-compliance.
4233         (convert_like): Adjust accordingly.
4234         (maybe_handle_ref_bind): Simplify; the right conversion sequences
4235         are now built up in reference_binding.
4236         (initialize_reference): New function.
4237         * cp-tree.h (ICS_USER_FLAG): Document.
4238         (ICS_THIS_FLAG): Likewise.
4239         (ICS_BAD_FLAG): Likewise.
4240         (NEED_TEMPORARY_P): Likewise.
4241         (cp_lvalue_kind): New type.
4242         (real_lvalue_p): Return it.
4243         * error.c (dump_expr): Provide more accurate representation for
4244         AGGR_INIT_EXPRs.
4245         * init.c (expand_default_init): Do not try to perform implicit
4246         conversions for a brace-enclosed initializer.
4247         * search.c (lookup_conversions): Document.
4248         * tree.c (lvalue_p_1): Return a cp_lvalue_kind.  Calculate
4249         appropriately.
4250         (real_lvalue_p): Adjust accordingly.
4251         (lvalue_p): Likewise.
4252         (build_cplus_new): Don't allow the creation of an abstract class.
4253         * typeck.c (convert_for_initialization): Use initialize_reference.
4254         
4255 1999-07-21  Gavin Romig-Koch  <gavin@cygnus.com>
4257         * lex.c (real_yylex) : Correct the test for overflow when lexing
4258         integer literals.
4260 1999-07-20  Jason Merrill  <jason@yorick.cygnus.com>
4262         * decl.c (warn_extern_redeclared_static): Check DECL_ARTIFICIAL,
4263         not DECL_BUILT_IN, to determine if a function is internally declared.
4264         (duplicate_decls): Likewise.  Improve handling of builtins.
4265         (push_overloaded_decl): Remove special handling of builtins.
4267         * cp-tree.h (ANON_AGGR_TYPE_P): Use CLASS_TYPE_P.
4269         * decl.c (grokdeclarator): Pull out decl_constant_value in
4270         templates, too.
4272         * class.c (finish_struct, finish_struct_1): Remove 'warn_anon' parm.
4273         * cp-tree.h, pt.c, semantics.c: Adjust.
4274         * method.c (largest_union_member): Remove.
4276         * lang-specs.h (c++-cpp-output): Pass -fpreprocessed.
4278         * lex.c (token_getch, token_put_back): New fns.
4279         (real_yylex): Use them.
4281         * lex.c (lang_init): Generalize.
4282         (lang_init_options): Tell cpplib this is C++.
4283         (nextchar): Remove.  Replace uses with put_back.
4284         (skip_white_space): Handle linemode here.  Optimize for cpplib.
4285         (extend_token_buffer_to): New fn.
4286         (extend_token_buffer): Use it.
4287         (read_line_number, check_newline): Just deal with tokens.
4288         (real_yylex): More cpplib optimizations.  Simplify.  Don't produce
4289         EXTERN_LANG_STRING, LEFT_RIGHT or PAREN_STAR_PAREN here.
4290         * spew.c (yylex): Produce LEFT_RIGHT and EXTERN_LANG_STRING.
4291         * parse.y (PAREN_STAR_PAREN): Remove.
4292         * input.c: Don't use the putback machinery with cpplib.
4293         (sub_getch): Fold back into getch.
4294         (getch): Don't handle linemode here.
4295         (feed_input): Unget any text in the token buffer.
4297         * lex.c (set_typedecl_interface_info, set_vardecl_interface_info,
4298         nextyychar, nextyylval): Remove.
4300 1999-07-20  Michael Tiemann  <tiemann@holodeck.cygnus.com>
4301             Jason Merrill  <jason@yorick.cygnus.com>
4303         * lex.c (indent_level): New variable.
4304         (init_parse): Set cpp_token to CPP_DIRECTIVE.
4305         (consume_string): Make this smart about USE_CPPLIB.
4306         (yyungetc): Use put_back function.
4307         (pragma_getc, pragma_ungetc): Functions deleted.
4308         (check_newline): Rewrite to be intelligent about USE_CPPLIB.
4309         Also, call HANDLE_PRAGMA with getch, yyungetc, not pragma_getc and
4310         pragma_ungetc.
4311         (real_yylex): Rewrite to be intelligent about USE_CPPLIB.
4312         Also, clean up cases where we redundantly set token_buffer[0].
4313         (read_line_number): New fn.
4314         * input.c (feed_input): Use integrated cpplib if USE_CPPLIB.
4315         (end_input): Call cpp_pop_buffer if USE_CPPLIB.
4316         (sub_getch): Conditionalize out code that's not appropriate if
4317         USE_CPPLIB.
4318         (put_back): Rewrite in case USE_CPPLIB is defined.
4319         (input_redirected): Ditto.
4321 Tue Jul 20 11:24:19 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
4323         * cp-tree.h: Delete lots of declarations of tree nodes; replaced by
4324         c_global_trees and accessor macros defined in c-common.h.
4325         (cp_tree_index): New enumeration.
4326         (cp_global_trees): Declare new array.  Add accessor macros for it, and
4327         delete declarations of tree nodes replaced by it.
4328         (builtin_function): Delete macro, add declaration for new function.
4329         Include c-common.h.
4330         * decl.c: Delete definitions for tree nodes that were replaced by
4331         cp_global_trees and c_global_trees.
4332         (init_decl_processing): Call c_common_nodes_and_builtins; delete code
4333         to generate the common builtins here.
4334         (builtin_function): New function.
4335         * decl2.c (abort_fndecl): Delete declaration.
4336         * except.c (expand_builtin_return_address): Delete declaration.
4337         (builtin_return_address_fndecl): Delete variable.
4338         (const_ptr_type_node): Delete declaration.
4339         * lex.c (cons_up_default_function): Delete declaration of
4340         void_list_node.
4341         * parse.y (void_list_node): Delete declaration.
4342         * rtti.c (type_info_type_node, tinfo_fn_id, tinfo_fn_type):
4343         Delete variables.
4344         (const_string_type_node): Delete declaration.
4345         * search.c (abort_fndecl): Delete declaration.
4346         * Makefile.in: Update dependencies.
4348 1999-07-19  Mark Mitchell  <mark@codesourcery.com>
4350         * pt.c (check_default_tmpl_args): Move test for missing default
4351         arguments here, from ...
4352         (end_template_parm_list): Here.
4354 1999-07-18  Mark Mitchell  <mark@codesourcery.com>
4356         * decl.c (lookup_nested_type): Remove.
4357         (pushtag): Don't call it.
4359 Sat Jul 17 23:51:30 1999  Jeffrey A Law  (law@cygnus.com)
4361         * Makefile.in (INTERFACE): Bump to 2.
4363 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
4364         
4365         * typeck2.c (my_friendly_abort): Updated URL with bug reporting
4366         instructions to gcc.gnu.org.  Removed e-mail address.
4368 1999-07-17  Mark Mitchell  <mark@codesourcery.com>
4370         * pt.c (determine_specialization): Tighten error-checking.
4371         (end_template_parm_list): Likewise.
4373 1999-07-14  Mark Mitchell  <mark@codesourcery.com>
4375         * pt.c (check_default_tmpl_args): Handle friends defined in the
4376         class just like member functions defined in the class.
4378 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
4379             Jason Merrill  <jason@yorick.cygnus.com>
4381         * cp-tree.h (struct lang_decl): Added field for storing sorted
4382         FIELD_DECLs (used in TYPE_DECLs).
4383         (DECL_PENDING_INLINE_INFO): Adjusted to use 'u' union.
4384         (DECL_SORTED_FIELDS): New macro.
4385         * class.c (method_name_cmp): New function.
4386         (finish_struct_methods): Modified to support sorting and searching
4387         methods.
4388         (finish_struct_anon): Changed code in inner loop to use ELT rather 
4389         than UELT (which required an extra indirection for every reference).
4390         (field_decl_cmp): New function to support sorting FIELD_DECLs.
4391         (finish_struct_1): Sort fields.
4392         * search.c (lookup_field_1): Use DECL_SORTED_FIELDS if we have them.
4393         (lookup_fnfields_1): Search sorted methods in METHOD_VEC.
4394         Also, switch to using array indexing rather than a changing pointer.
4395         * ptree.c (print_lang_decl): Handle TYPE_DECLs that have
4396         DECL_SORTED_FIELDS.
4398 1999-07-09  Jason Merrill  <jason@yorick.cygnus.com>
4400         * decl2.c (reparse_absdcl_as_casts): Don't warn about old-style
4401         casts in system headers or extern "C" blocks.
4403         * pt.c (do_decl_instantiation): Downgrade duplicate instantiation
4404         errors to pedwarn.
4406 1999-07-09  Michael Tiemann  <tiemann@happy.cygnus.com>
4408         * decl2.c (write_virtuals): Deleted declaration.
4409         * cp-tree.h (write_virtuals): Deleted extern declaration.
4410         * class.c (finish_struct_1): Removed #if 0'd code that mentions
4411         write_virtuals.
4412         * semantics.c (begin_class_definition): Rewrite code to not depend
4413         on write_virtuals.
4415         * lex.c (cp_pragma_interface): New function.
4416         (cp_pragma_implementation): Likewise.
4417         (handle_cp_pragma): Call them.
4419         * typeck.c (comptypes): Simplify C code in look_hard.
4421         * xref.c (PALLOC): Use xcalloc, not calloc.
4422         (SALLOC): Use xmalloc, not malloc.
4424         * rtti.c (synthesize_tinfo_fn): Add missing call to pop_momentary.
4426         * search.c (note_debug_info_needed): Don't search if WRITE_SYMBOLS
4427         is NO_DEBUG.
4429         * decl.c (duplicate_decls): If a redeclaration doesn't match the
4430         initial declaration, then don't save the inline info and by all
4431         means don't mark the function as a builtin function.
4433         * decl.c (lookup_name_real): Set NONCLASS to 1 if 
4434         CURRENT_CLASS_TYPE is 0.
4436         * class.c (duplicate_tag_error): Set TYPE_NONCOPIED_PARTS to
4437         NULL_TREE.
4439         * ptree.c (print_lang_type): Added vtable-needs-writing.
4441 Wed Jul  7 01:26:47 1999  Alexandre Oliva  <oliva@dcc.unicamp.br>
4443         * decl2.c (mark_vtable_entries): Fix check for rtti offset.
4445 1999-07-06  Gavin Romig-Koch  <gavin@cygnus.com>
4447         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
4448         Merged into c-common.
4450 1999-07-05  Dave Brolley  <brolley@cygnus.com>
4452         * lex.c (errorcount): Declare it.
4453         (finish_parse): Update errorcount for when using CPPLIB.
4455 1999-07-05  Mark Mitchell  <mark@codesourcery.com>
4457         * cp-tree.h (IS_AGGR_TYPE): Include instantiated template template
4458         parameters.
4459         (IMPLICIT_TYPENAME_TYPE_DECL_P): New macro.
4460         * decl.c (push_class_binding): Use it.
4461         (lookup_name_real): Likewise.
4463 1999-07-02  Gavin Romig-Koch  <gavin@cygnus.com>
4465         * cp-tree.h (widest_integer_literal_type_node,
4466         widest_unsigned_literal_type) : New.
4467         * decl.c (widest_integer_literal_type_node,
4468         widest_unsigned_literal_type) : New.
4469         (init_decl_processing): Handle/use the two new types.
4470         * lex.c (real_yylex): Same.
4471         * typeck.c (unsigned_type,signed_type,signed_or_unsigned_type) :
4472         Same. 
4474 1999-07-01  Mark Mitchell  <mark@codesourcery.com>
4476         * decl.c (grokdeclarator): Don't give names "for linkage purposes"
4477         to anonymous cv-qualified types.
4479 1999-07-01  Gavin Romig-Koch  <gavin@cygnus.com>
4481         * lex.c (real_yylex) : Change integer literal overflow handling to
4482         be like c-lex.c.
4484         * lex.c (real_yylex): Improve 'integer constant out of range' messages.
4486 1999-06-28  Richard Henderson  <rth@cygnus.com>
4488         * decl.c (cp_finish_decl): Fix typo in cp_warning_at call.
4490 1999-06-28  Jason Merrill  <jason@yorick.cygnus.com>
4492         * error.c (dump_type_real): Handle TREE_LIST again.
4494         * typeck.c (comp_target_parms): Don't complain about 
4495         converting from () to (...) if !flag_strict_prototype.
4497         * decl.c (grokdeclarator): Update the names of all variants when
4498         de-anonymizing.
4500 1999-06-21  Mark Mitchell  <mark@codesourcery.com>
4502         * init.c (expand_aggr_vbase_init): Rename to
4503         construct_virtual_bases.  Conditionalize construction here, 
4504         rather than ...
4505         (emit_base_init): Here.
4507 1999-06-19  Mark Mitchell  <mark@codesourcery.com>
4509         * semantics.c (finish_asm_stmt): Apply decay conversions to
4510         input operands.
4512         * decl.c (expand_static_init): When building an anonymous function
4513         for use with atexit, compute its body before and after entering
4514         the function.
4516         * error.c (dump_expr): Handle BIND_EXPR, LOOP_EXPR, and
4517         EXIT_EXPR.
4518         
4519 1999-06-18  Mark Mitchell  <mark@codesourcery.com>
4521         * init.c (expand_aggr_vbase_init): Add flag parameter.
4522         (build_partial_cleanup_for): Remove, inlining into ..
4523         (expand_cleanup_for_base): ... here.  Take flag parameter.
4524         (emit_base_init): Pass the in_chrg parameter to
4525         emit_aggr_vbase_init. 
4526         (emit_aggr_vbase_init): Pass it to expand_cleanup_for_base.
4527         
4528 1999-06-16  Mark Mitchell  <mark@codesourcery.com>
4530         * decl2.c (import_export_decl): Use same_type_p, rather than
4531         relying on pointer-equality for types.
4533         * method.c (do_build_copy_constructor): Simplify.
4535         * call.c (build_method_call): Remove bogus code for two-argument
4536         delete.
4537         * init.c (build_new_1): Expand on comment, and remove dead code.
4539         * init.c (expand_cleanup_for_base): New function, split out
4540         from ...
4541         (emit_base_init): Here.
4542         (expand_aggr_vbase_init): Use it.
4544 1999-06-15  Mark Mitchell  <mark@codesourcery.com>
4546         * cp-tree.h (class_cache_firstobj): Declare.
4547         (maybe_push_cache_obstack): Rename to push_cache_obstack.
4548         * class.c (permanent_obstack): Remove declaration.
4549         (class_cache_firstobj): Make it global.
4550         (add_method): Don't use permanent_obstack directly.
4551         (pushclass): Only free the class_cache_obstack if we know how far
4552         back to free it.
4553         (maybe_push_cache_obstack): Rename to push_cache_obstack.
4554         * decl.c: Remove dead comment.
4555         (saved_scope): Add class_cache_firstobj.
4556         (push_to_top_level): Save it.
4557         (pop_from_top_level): Restore it.
4558         (push_class_level_binding): Use push_cache_obstack, not
4559         maybe_push_cache_obstack.
4560         * search.c (push_class_decls): Likewise.
4561         
4562 1999-06-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4564         * pt.c (tsubst_friend_function): Push into namespace of friend
4565         function before pushdecl'ing it.
4567 1999-06-14  Nathan Sidwell  <nathan@acm.org>
4569         * call.c (build_new_op): Remove REF_BIND from all operands.
4571 1999-06-13  Alexandre Oliva  <oliva@dcc.unicamp.br>
4573         * init.c (build_new_1): Look up operator delete even if there was
4574         no explicit new placement.
4576 1999-06-08  Nathan Sidwell  <nathan@acm.org>
4578         * except.c (complete_ptr_ref_or_void_ptr_p): New function, broken out
4579         of ...
4580         (build_throw): ... here. Call it.
4581         (process_start_catch_block): Call it.
4583 1999-06-07  Mark Mitchell  <mark@codesourcery.com>
4585         * search.c (convert_pointer_to_single_level): Reimplement without
4586         using get_binfo.
4588 1999-06-06  Mark Mitchell  <mark@codesourcery.com>
4590         * method.c (is_back_referenceable_type): Back-reference bools when
4591         not squangling.
4593 1999-06-07  Dave Brolley  <brolley@cygnus.com>
4595         * lex.c (real_yylex): Replace unused bytes from bad multibyte char.
4596         * input.c (putback_buffer): New structure type.
4597         (putback): Replaces putback_char member.
4598         (putback): Replaces putback_char static variable.
4599         (feed_input): Use putback.
4600         (end_input): Use putback.
4601         (sub_getch): Use putback.
4602         (put_back): Use putback.
4604 1999-06-05  Mark Mitchell  <mark@codesourcery.com>
4606         * decl.c (grokdeclarator): Fix typo in last change.
4608 1999-06-04  Jason Merrill  <jason@yorick.cygnus.com>
4610         * semantics.c (finish_if_stmt_cond): Copy cond to permanent_obstack.
4611         (finish_while_stmt_cond, finish_do_stmt, finish_for_cond): Likewise.
4613 1999-06-04  Nathan Sidwell  <nathan@acm.org>
4615         * except.c (build_throw): Check throw expression validity.
4617 1999-06-03  Mark Mitchell  <mark@codesourcery.com>
4619         * decl.c (grokdeclarator): Don't treat arbitrary types as unsigned
4620         just because flag_signed_bitfields is false.
4622 1999-06-03  Nathan Sidwell  <nathan@acm.org>
4624         * semantics.c (begin_class_definition): Update the struct's
4625         location here ...
4626         * class.c (finish_struct): ... rather than here.
4628         * decl.c (make_typename_type): Don't rely on uninitialized
4629         variable.
4631 1999-05-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4633         * Makefile.in (ALL_CFLAGS): Add '-W -Wall'.
4635 1999-05-31  Mark Mitchell  <mark@codesourcery.com>
4637         * tree.c (build_cplus_array_type_1): Use push_obstacks_nochange
4638         and friends rather than messing with current_obstack directly.
4639         (cp_build_qualified_type_real): Rework ARRAY_TYPE
4640         allocation to match practice throughout the rest of the 
4641         compiler.
4643 1999-05-30  Mark Mitchell  <mark@codesourcery.com>
4645         * lex.c (make_lang_type): Create TYPE_BINFO for
4646         TEMPLATE_TYPE_PARMs just like for non-template types.
4648         * decl.c (start_decl): Move checks on initialization to ...
4649         (cp_finish_decl): Here.  Tidy formatting slightly.
4651 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
4653         * decl.c (add_binding): Don't complain about a redeclaration of a
4654         semantically identical typedef in a local scope.
4656 1999-05-28  Nathan Sidwell  <nathan@acm.org>
4658         * decl.c (complete_array_type): Allocate off same obstack. Fix
4659         DO_DEFAULT comment to match reality.
4661         * friend.c (make_friend_class): Fix diagnostic typo.
4663 1999-05-28  Mark Mitchell  <mark@codesourcery.com>
4665         * decl.c (lookup_namespace_name): Handle getting a
4666         TEMPLATE_ID_EXPR.
4667         (expand_static_init): Don't call pushdecl for implicitly declared
4668         `atexit' used to register destructors.
4670 1999-05-25  Mark Mitchell  <mark@codesourcery.com>
4672         * class.c (finish_vtbls): Copy BINFO_VIRTUALs before using it to
4673         initialize a vtable.
4675         * cp-tree.h (NAMESPACE_LEVEL): Reformat.
4676         (lang_decl_flags): Document MEMFUNC_POINTER_TO.  Save four bytes
4677         by combining TEMPLATE_INFO and LEVEL into a single union.
4678         (DECL_TEMPLATE_INFO): Reformat.
4679         (DECL_SAVED_TREE): Document.
4680         (DECL_TEMPLATE_INJECT): Remove.
4681         * class.c (finish_struct): Remove code to deal with
4682         DECL_TEMPLATE_INJECT. 
4684         * decl.c (maybe_process_template_type_declaration): Handle all new
4685         types in templates uniformly.
4686         * method.c (bulid_overload_identifier): Use CP_DECL_CONTEXT, not
4687         DECL_CONTEXT.
4688         * pt.c (lookup_template_class): Inject template instantiations of
4689         forward-declarations.
4690         (instantiate_class_template): Remove code processing
4691         DECL_TEMPLATE_INJECT.
4692         
4693         * pt.c (lookup_template_class): Tweak lookup to find member
4694         templates.
4696         * pt.c (tsubst_expr, case ASM_STMT): Don't tsubst into
4697         ASM_CV_QUAL.
4698         * semantics.c (finish_asm_stmt): Make strings permanent if they're
4699         used in a template.
4700         
4701 1999-05-25  Jason Merrill  <jason@yorick.cygnus.com>
4703         * typeck.c (casts_away_constness, casts_away_constness_r): Strip both
4704         parts of pointer to data member types.
4706 1999-05-24  Mark Mitchell  <mark@codesourcery.com>
4708         * decl2.c (mark_vtable_entries): Don't make a copy of a function,
4709         and then make it look like `abort'.  Just use `abort' instead.
4710         
4711         * typeck.c (build_static_cast): Don't allow static_casts that cast
4712         away constness.
4713         (casts_away_constness_r): New function.
4714         (casts_away_constness): Likewise.
4716         * decl.c (lookup_tag): Remove code no longer needed after
4717         name-lookup improvements.
4718         * decl2.c (handle_class_head): Make error-recovery more robust.
4719         * friend.c (make_friend_class): Reject templated typename types.
4720         * lex.c (is_global): A template parameter isn't global.
4721         * parse.y (class_head): Robustify.
4722         * parse.c: Regenerated.
4723         
4724 1999-05-22  Mark Mitchell  <mark@codesourcery.com>
4726         * pt.c (for_each_template_parm): Walk into TYPENAME_TYPEs,
4727         INDIRECT_REFs, and COMPONENT_REFs.  Handle FIELD_DECLs.
4728         
4729         * cp-tree.h (push_nested_namespace): Declare.
4730         (pop_nested_namespace): Likewise.
4731         * decl.c (push_nested_namespace): New function.
4732         (pop_nested_namespace): Likewise.
4733         * pt.c (instantiate_class_template): Use them.
4735         * tree.c (mapcar): Handle NON_LVALUE_EXPR.
4737         * cp-tree.h (cplus_expand_constant): Declare.
4738         * cvt.c (convert_to_pointer): Expand PTRMEM_CSTs when they're
4739         converted from one pointer-to-object type to another.
4740         * expr.c (cplus_expand_constant): Don't make it static.
4741         * typeck.c (build_component_ref): Don't crash when presented with
4742         a component which is a TEMPLATE_DECL.
4743         (build_ptrmemfunc): Tidy.  Clarify comment.  Make sure that even a
4744         cast from a pointer-to-member constant to its own type does not
4745         result in a valid non-type template argument.
4747 1999-05-21  Mark Mitchell  <mark@codesourcery.com>
4748             Nathan Sidwell  <nathan@acm.org>
4749         
4750         * Make-lang.in (cc1plus): Make it depend on gxx.gperf.
4751         * cp-tree.h: Fix typo in documentation on pointers-to-members.
4752         (cp_build_qualified_type): Make it a macro.
4753         (cp_build_qualified_type_real): Declare.
4754         * decl.c (grokdeclarator): Remove misleading comment.  Avoid
4755         problem with template parameters and restrict-qualification.
4756         * gxx.gperf: Replace NORID with RID_UNUSED throughout.
4757         * hash.h: Regenerated.
4758         * lex.h (rid): Move RID_FIRST_MODIFIER and RID_LAST_MODIFIER into
4759         the enumeration.
4760         (NORID): Remove definition.
4761         * pt.c (tsubst_aggr_type): Use cp_build_qualified_type_real.
4762         (tsubst): Likewise.  Remove special handling for FUNCTION_TYPEs.
4763         (fn_type_unification): Check that the function type resulting from
4764         the deduction is legal.
4765         (check_cv_quals_for_unify): Don't handle FUNCTION_TYPEs specially.
4766         (unify): Use cp_build_qualified_type_real.
4767         * tree.c (build_cplus_array_type_1): Handle error_marks as inputs.
4768         (cp_build_qualified_type): Rename to ...
4769         (cp_build_qualified_type_real): Add additional COMPLAIN parameter
4770         and modify appropriately.
4771         
4772         * typeck.c (build_ptrmemfunc): Handle PTRMEM_CSTs carefully to
4773         reveal optimization opportunities.
4775         * pt.c (tsubst): Don't issue error messages when we're not
4776         complaining, even if we see a qualified function type.
4777         (check_cv_quals_for_unify): Don't allow a qualified function
4778         type.
4780 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
4782         * class.c (instantiate_type): Downgrade errors for object-dependent
4783         memfn refs to pedwarn.
4785 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
4787         * decl.c (grokdeclarator): Don't treat [] as indicating a
4788         zero-sized array in a typedef.
4790         * call.c (build_object_call): Don't look at DECL_NAME for a type.
4791         (pt.c): Or CP_TYPE_QUALS for an ERROR_MARK.
4792         (typeck.c): Or TYPE_MAIN_VARIANT for a type.
4794         * pt.c (for_each_template_parm): Rework to match documentation.
4795         Don't be fooled by a COMPONENT_REF with no TREE_TYPE.
4797 1999-05-20  Jason Merrill  <jason@yorick.cygnus.com>
4799         * class.c (finish_struct_1): Still check for ANON_AGGR_TYPE_P.
4801         * class.c (finish_base_struct): Allow non-COM bases for COM classes
4802         except at the leftmost position.
4803         (modify_one_vtable, fixup_vtable_deltas1, override_one_vtable):
4804         Pass the binfo's class, not the most derived, to skip_rtti_stuff.
4805         * search.c (get_abstract_virtuals, expand_upcast_fixups): Likewise.
4807         * tree.c (lvalue_p_1): A NOP_EXPR can be an lvalue.
4808         (build_cplus_new): Make sure that what we return is of the right type.
4810 1999-05-20  Mark Mitchell  <mark@codesourcery.com>
4812         * cp-tree.h (make_ptrmem_cst): New function.
4813         * expr.c (cplus_expand_constant): Split out from ...
4814         (cplus_expand_expr): Here.  Use cplus_expand_constant.
4815         (init_cplus_expand): Set lang_expand_constant.
4816         * pt.c (convert_nontype_argument): Use make_ptrmem_cst.
4818         * tree.c (make_ptrmem_cst): Define.
4819         * typeck.c (unary_complex_lvalue): Use make_ptrmem_cst.
4820         * typeck2.c (initializer_constant_valid_p): Use make_ptrmem_cst.
4822 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
4824         * pt.c (build_template_decl): Copy DECL_NONCONVERTING_P.
4826         * decl2.c (start_static_storage_duration_function): Fix comment.
4827         (finish_file): Create static storage duration functions lazily.
4829 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
4831         Implement anonymous structs.
4832         * cp-tree.h (ANON_AGGR_TYPE_P): Rename from ANON_UNION_TYPE_P.
4833         * class.c, decl.c, decl2.c, init.c, pt.c, search.c, typeck.c: Adjust.
4834         * class.c (finish_struct_1): Remove redundant check for anon struct.
4835         * decl.c (fixup_anonymous_aggr): Renamed from fixup_anonymous_union.
4836         (check_tag_decl): Check for anonymous struct here.
4837         * decl2.c (build_anon_union_vars): Catch anon struct at file scope.
4838         * init.c (sort_member_init, emit_base_init): Handle getting fields
4839         as well as names in current_member_init_list.
4840         (perform_member_init): Handle getting an anon aggr.
4841         * method.c (do_build_assign_ref): Don't descend into anon aggrs.
4842         (do_build_copy_constructor): Likewise.
4844 1999-05-19  Mark Mitchell  <mark@codesourcery.com>
4846         * tree.c (cp_build_qualified_type): Don't allow qualified function
4847         types.
4849 Wed May 19 02:50:53 1999  Arvind Sankar <arvinds@mit.edu>
4851         * gxxint.texi: Fix typo.
4853 1999-05-19  Jason Merrill  <jason@yorick.cygnus.com>
4855         * call.c (find_scoped_type, resolve_scope_to_name): Lose.
4856         * class.c (finish_struct_1): Use CLASS_TYPE_P.
4857         * ptree.c (print_lang_type): Likewise.
4858         * typeck.c (build_modify_expr, c_expand_asm_operands): Use
4859         IS_AGGR_TYPE_CODE.
4860         * typeck2.c (digest_init): Likewise.
4862 1999-05-18  Jason Merrill  <jason@yorick.cygnus.com>
4864         * call.c (joust): Compare the types of the conv ops, not the
4865         target types of the conversions.
4867 Tue May 18 00:21:34 1999  Zack Weinberg  <zack@rabi.phys.columbia.edu>
4869         * lang-specs.h: Define __GNUC__ and __GNUC_MINOR__ only if -no-gcc
4870         was not given.
4872 1999-05-17  Mark Mitchell  <mark@codesourcery.com>
4874         * cp-tree.def (TEMPLATE_ID_EXPR): Update documentation.
4875         * decl.c (grokfndecl): Don't allow inline declarations of friend
4876         template specializations, or friend template specializations with
4877         default arguments.
4878         * pt.c (tsubst): Handle substitution into array types that does
4879         not yield a fixed upper bound, even when not processing a
4880         template.
4881         (tsubst_copy): Deal with the fact that the second operand to a
4882         TEMPLATE_ID_EXPR may be NULL_TREE, a TREE_LIST, or a TREE_VEC.
4883         * search.c (marked_pushdecls_p): Don't descend into
4884         TEMPLATE_TYPE_PARMs and the like.
4885         (unmarked_pushdecls_p): Likewise.
4886         
4887         * call.c (build_over_call): Don't throw away
4888         initializations/copies of empty classes; use MODIFY_EXPR and
4889         INIT_EXPR as for non-empty classes.
4890         * class.c (finish_struct_1): Put the padding byte for an empty
4891         class on the TYPE_NONCOPIED_PARTS list for the class.
4893 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
4895         * decl2.c (build_expr_from_tree): Handle COMPONENT_REFs that
4896         indicate a reference to a field that is a qualified name.
4898 1999-05-16  Jason Merrill  <jason@yorick.cygnus.com>
4900         * decl2.c (finish_objects): Don't use .?tors.* if we don't have
4901         ASM_OUTPUT_CONSTRUCTOR.
4903         * friend.c (do_friend): Add attrlist arg.  Remove support for
4904         getting a non-decl as 'decl'.
4905         * decl.c (grokfndecl): Remove attrlist arg.  Don't set attrs or
4906         rtl.
4907         (grokdeclarator): Adjust.
4908         * cp-tree.h: Adjust.
4910 1999-05-16  Mark Mitchell  <mark@codesourcery.com>
4912         * cp-tree.h (permanent_p): New function.
4913         * init.c (build_new_1): Use mapcar, not copy_node, to copy a
4914         possibly complex tree node.
4915         * tree.c (mapcar): Adjust comments, and follow coding standards in
4916         conditional.
4917         (permanent_p): New function.
4919 1999-05-13  Per Bothner  <bothner@cygnus.com>
4921         * class.c (push_lang_context):  Turn off DECL_IGNORED_P for
4922         primitive Java types, if we actually see `extern "Java"'.
4924 1999-05-10 18:21 -0400  Zack Weinberg  <zack@rabi.phys.columbia.edu>
4926         * lang-specs.h: Pass -$ to the preprocessor.
4928 1999-05-10  Jason Merrill  <jason@yorick.cygnus.com>
4930         * init.c (build_offset_ref): Wrap baselinks in OFFSET_REF, too.
4931         Don't bother wrapping an OFFSET_TYPE around unknown_type_node.
4932         (resolve_offset_ref): Don't handle a raw baselink.
4933         * cvt.c (build_expr_type_conversion): Likewise.
4934         * typeck.c (decay_conversion, build_c_cast, convert_for_assignment,
4935         convert_for_initialization): Likewise.
4936         * class.c (instantiate_type): Handle seeing a baselink under an
4937         OFFSET_REF.
4938         * error.c (dump_expr): Likewise.        
4939         * pt.c (for_each_template_parm): Likewise.
4940         (resolve_overloaded_unification): Likewise.
4941         * tree.c (is_overloaded_fn, really_overloaded_fn): Likewise.
4942         * typeck.c (expr_sizeof): Also complain about other permutations
4943         of overloaded functions.
4945 1999-05-07  Jason Merrill  <jason@yorick.cygnus.com>
4947         * init.c (resolve_offset_ref): Don't return a raw method.
4948         Use BASELINK_P.
4949         * typeck.c (decay_conversion): Don't handle a raw method.
4950         Resolve all OFFSET_REFs.
4951         (get_member_function_from_ptrfunc): 0 is a valid vtable index.
4952         (build_binary_op_nodefault): Handle resolving overloaded fns.  Use
4953         same_type_p for pmf bits.  Don't use build_binary_op to compare
4954         raw pointers to methods.
4955         (convert_for_assignment): Check for OFFSET_REF, not OFFSET_TYPE,
4956         to decide when to call resolve_offset_ref.
4957         (build_c_cast, convert_for_initialization): Likewise.
4958         * cvt.c (build_expr_type_conversion): Likewise.
4960 1999-05-06  Nathan Sidwell  <nathan@acm.org>
4962         * call.c (build_new_method_call): Use TYPE_MAIN_VARIANT of class.
4964 1999-05-05  Mark Mitchell  <mark@codesourcery.com>
4966         * decl2.c (start_objects): Don't let static constructors and
4967         destructors get inlined.
4969         * parse.y (nested_name_specifier): Make sure ordinary types are
4970         complete, just like template types.
4971         * parse.c: Regenerated.
4973         * pt.c (check_explicit_specialization): Improve error messages.
4975 1999-05-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4977         * typeck.c (string_conv_p): Use same_type_p to check whether we
4978         try to convert between char and wchar_t.
4980 1999-05-03  Mark Mitchell  <mark@codesourcery.com>
4982         * search.c (lookup_field_r): Set the TREE_TYPE of an ambiguous
4983         lookup to error_mark_node here.
4984         (lookup_member): Revise documentation.  Add comments.  Don't set
4985         the TREE_TYPE to error_mark_node here, and don't build up an extra
4986         TREE_LIST for ambiguous lookups.
4987         (setup_class_bindings): Adjust accordingly.
4988         (push_class_decls): Revise out-of-date comments.
4989         
4990         * typeck.c (build_const_cast): Tighten checks for legality.
4992 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
4994         * init.c (build_member_call): Lookup names coming from
4995         namespace-scoped LOOKUP_EXPR.
4997 1999-05-03  Jim Blandy  <jimb@zwingli.cygnus.com>
4999         * gxxint.texi: Add documentation for 'I'.
5001 1999-05-02  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5003         * tinfo.cc (operator==): Qualify type_info with std::.
5005 1999-05-02  Mark Mitchell  <mark@codesourcery.com>
5007         * cp-tree.h (lang_decl_flags): Remove comdat.  Updated dummy.
5008         (DECL_COMDAT): Remove definition.
5010 1999-05-01  Mark Mitchell  <mark@codesourcery.com>
5012         * decl.c (wrapup_globals_for_namespace): Fix thinko in previous
5013         change.
5015 1999-04-30  Mark Mitchell  <mark@codesourcery.com>
5017         * class.c (build_vtable): Use build_lang_decl when building
5018         vtables, not just build_decl.
5019         (prepare_fresh_vtable): Likewise.
5020         * decl.c (wrapup_globals_for_namespace): Mark vtables as
5021         DECL_EXTERNAL when calling wrapup_global_declarations.
5022         * decl2.c (priority_info_s): Add initializations_p and
5023         destructions_p members.
5024         (finish_vtable_vardecl): Use TREE_SYMBOL_REFERENCED, not TREE_USED,
5025         when deciding what vtables to write out.
5026         (ssdf_decls): New variable.
5027         (ssdf_decls_used): Likewise.
5028         (start_static_storage_duration_function): Deal with being called
5029         multiple times.  Avoid inlining this function.
5030         (generate_inits_for_priority): Deal with reuse of priority map.
5031         (get_priority_info): Clear initializations_p and destructions_p.
5032         (do_static_initialization): Tweak comment.
5033         (do_static_destruction): Likewise.  Fix condition on sentries for
5034         destruction.
5035         (generate_ctor_or_dtor_function): Call all of the static storage
5036         duration functions.
5037         (generate_ctor_or_dtor_function_for_priority): Check
5038         initializations_p and destructions_p to see what priorities need
5039         initialization functions.
5040         (finish_file): Rework to generate multiple static storage duration
5041         functions, rather than just one.
5043         * typeck.c (build_const_cast): Tweak last change to handle
5044         templates correctly.
5046         * typeck.c (build_const_cast): Disallow use of const_cast to
5047         anything but a pointer or reference type.
5049 1999-04-30  Nathan Sidwell  <nathan@acm.org>
5051         * decl.c (cp_finish_decl): Don't permit arrays of abstract or
5052         signature type.
5054 1999-04-29  Mark Mitchell  <mark@codesourcery.com>
5056         * decl2.c (do_static_destruction): Remove obsolete FIXME comment.
5057         (finish_file): Indent comments properly.
5059 1999-04-29  Richard Henderson  <rth@cygnus.com>
5061         * decl2.c (do_static_initialization): Call do_pending_stack_adjust.
5062         (do_static_destruction): Likewise.
5064 1999-04-29  Nathan Sidwell  <nathan@acm.org>
5066         * cp-tree.h (TYPE_NOTHROW_P): New macro.
5067         * decl2.c (delete_sanity): Warn on deleting void *.
5068         * init.c (build_new_1): Use TYPE_NOTHROW_P.
5069         * typeck.c (c_expand_return): cp_pedwarn on returning NULL from
5070         throwing operator new.
5072 1999-04-28  Nathan Sidwell  <nathan@acm.org>
5074         * cp-tree.h (build_component_addr): Remove prototype.
5075         * typeck.c (build_component_addr): Make static. Remove MSG
5076         argument.
5077         (build_component_addr): Remove MSG parameter, clean up
5078         comment.
5079         (build_x_function_call): Use cp_error.
5080         (build_unary_op): Adjust call of build_component_addr.
5082 1999-04-28  Mark Mitchell  <mark@codesourcery.com>
5084         * pt.c (tsubst_friend_class): Check for NULL.
5086 Wed Apr 28 11:42:22 1999  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
5088         * search.c (binfo_for_vtable): Initialize bfvi.var.
5090 1999-04-27  Nathan Sidwell  <nathan@acm.org>
5092         * rtti.c (build_x_typeid): Check rtti is enabled.
5094 1999-04-26  Mark Mitchell  <mark@codesourcery.com>
5096         * search.c (is_subobject_of_p): Make sure we're looking at the
5097         right baseclasses.
5099 1999-04-26  Marc Espie  <espie@cvs.openbsd.org>
5101         * Make-lang.in (cplib2.ready): Don't depend on phony targets.
5103 1999-04-23  Mark Mitchell  <mark@codesourcery.com>
5105         * decl2.c (finish_file): Tweak handling of extern inlines so that
5106         they are not unnecessarily put out.
5108         * search.c (is_subobject_of_p): Handle TEMPLATE_TYPE_PARMs and
5109         such as base classes.
5111 1999-04-22  Brendan Kehoe  <brendan@cygnus.com>
5113         * tree.c (build_exception_variant): Fix typo: use the chain of U,
5114         not trying V, while cycling through U.
5116 1999-04-22  Mark Mitchell  <mark@codesourcery.com>
5118         * cp-tree.h (lang_decl_flags): Remove returns_first_arg and
5119         preserves_first_arg.  Enlarge dummy accordingly.
5120         (DECL_TINFO_FN_P): New macro.
5121         (SET_DECL_TINFO_FN_P): Likeiwse.
5122         (DECL_RETURNS_FIRST_ARG): Remove.
5123         (DECL_PRESERVES_THIS): Likewise.
5124         (DECL_INIT_PRIORITY): New macro.
5125         (finish_struct_1): Change prototype.
5126         (cat_namespace_levels): Remove prototype.
5127         (vtable_decl_p): New prototype.
5128         (vtype_decl_p): Likewise.
5129         (sigtable_decl_p): Likewise.
5130         (walk_globals_pred): New typedef.
5131         (walk_globals_fn): Likewise.
5132         (walk_globals): New prototype.
5133         (walk_namespaces_fn): New typedef.
5134         (walk_namespaces): New prototype.
5135         (wrapup_globals_for_namespace): Likewise.
5136         (walk_vtables): Remove prototype.
5137         (walk_sigtables): Likewise.
5138         (instantiate_pending_templates): New prototype.
5139         * class.c (finish_struct_1): Don't return a value.
5140         * decl.h (pending_statics): Remove declaration.
5141         * decl.c (walk_namespaces_r): New function.
5142         (walk_globals_r): Likewise.
5143         (vtable_decl_p): Likewise.
5144         (vtype_decl_p): Likewise.
5145         (sigtable_decl_p): Likewise.
5146         (walk_namespaces): Likewise.
5147         (walk_globals_data): New type.
5148         (walk_globals): New function.
5149         (wrapup_globals_for_namespace): Likewise.
5150         (expand_static_init): Remove assertion.  Remove redundancy in
5151         conditional.  Don't put static data members in static_aggregates
5152         Tidy.
5153         (finish_function): Remove redundancy in conditional.  Don't set
5154         DECL_RETURNS_FIRST_ARG.
5155         (cat_namespace_levels): Remove.
5156         * decl2.c: Include splay-tree.h and varray.h.
5157         (priority_info_s): New structure.
5158         (finish_vtable_vardecl): Change prototype.  Adjust for new calling
5159         conventions.
5160         (prune_vtable_vardecl): Likewise.
5161         (finish_sigtable_vardecl): Likewise.
5162         (setup_initp): Remove.
5163         (do_dtors): Remove.
5164         (do_ctors): Remove.
5165         (start_static_storage_duration_function): New function.
5166         (generate_inits_for_priority): Likewise.
5167         (finish_static_storage_duration_function): Likewise.
5168         (get_priority_info): Likewise.
5169         (do_static_initialization): Likewise.
5170         (do_static_destruction): Likewise.
5171         (do_static_initialization_and_destruction): Likewise.
5172         (generate_ctor_or_dtor_function): Likewise.
5173         (generate_ctor_and_dtor_functions_for_priority): Likewise.
5174         (pending_statics): Make it a varray.
5175         (pending_statics_used): New variable.
5176         (saved_inlines): Make it a varray.
5177         (saved_inlines_used): New variable.
5178         (finish_static_data_member): Change method of updating
5179         pending_statics.
5180         (mark_inline_for_output): Remove #if 0'd code.  Change method of
5181         updating saved_inlines.
5182         (walk_vtables): Remove.
5183         (walk_sigtables): Likewise.
5184         (import_export_decl): Use DECL_TINFO_FN_P.
5185         (pending_templates): Remove declaration.
5186         (maybe_templates): Likewise.
5187         (static_aggregates_initp): Likewise.
5188         (setup_initp): Likewise.
5189         (finish_objects): Simplify.
5190         (INITIALIZE_P_IDENTIFIER): New macro.
5191         (PRIORITY_IDENTIFIER): New macro.
5192         (SSDF_IDENTIFIER): New macro.
5193         (initialize_p_decl): New variable.
5194         (priority_decl): Likewise.
5195         (ssdf_decl): Likewise.
5196         (priority_info_map): Likewise.
5197         (finish_file): Recode output of static intializers and other
5198         file-scope finalization tasks.
5199         * error.c (OB_END_TEMPLATE_ID): New macro.
5200         (dump_type_real): Use it.
5201         (dump_decl): Likewise.
5202         (dump_function_name): Likewise.
5203         * lex.c (set_typedecl_interface_info): Adjust for new walk_globals
5204         interface.
5205         (check_newline): Use walk_globals, not walk_vtables.
5206         * pt.c (pending_tempalte_expansions): Remove.
5207         (set_vardecl_interface_info): Likewise.
5208         (pending_templates): Make static.
5209         (maybe_templates): Likewise.
5210         (instantiate_class_template): Adjust call to finish_struct_1.
5211         (instantiate_pending_templates): New function.
5212         * rtti.c (get_tinfo_fn): Use SET_DECL_TINFO_FN_P.
5213         * tree.c (static_aggregates_initp): Remove.
5214         (cp_valid_lang_attribute): Don't use it; use DECL_INIT_PRIORITY
5215         instead.
5216         * Makefile.in (decl2.o): Depend on varray.h and splay-tree.h.
5218         * gxx.gperf (RETURN): Rename to RETURN_KEYWORD to avoid clashes
5219         with the RTL code RETURN.
5220         * hash.h: Regenerated.
5221         * lex.c (reinit_parse_for_block): Use RETURN_KEYWORD.
5222         * parse.y: Replace RETURN with RETURN_KEYWORD throughout.
5223         * parse.c: Regenerated.
5224         * pt.c: Include varray.h.  Include rtl.h since varray.h requires
5225         it.
5226         (inline_parm_levels): New variable.
5227         (inline_parm_levels_used): Likewise.
5228         (maybe_begin_member_template_processing): Update them.
5229         (maybe_end_member_template_processing): Use them, rather than
5230         guessing how many levels to pop.
5232         * decl.c (make_typename_type): Tighten error-checking.
5234 1999-04-20  Mark Mitchell  <mark@codesourcery.com>
5236         * cp-tree.h (build_binary_op): Remove unneeded parameter.
5237         * class.c (build_vrable_entry_ref): Adjust call to
5238         build_binary_op.
5239         * decl.c (expand_static_init): Likewise.
5240         (grokdeclarator): Likewise.
5241         (finish_function): Likewise.
5242         * decl2.c (delete_sanity): Likewise.
5243         (do_dtors): Likewise.
5244         (do_ctors): Likewise.
5245         * error.c (dump_type_suffix): Likewise.
5246         * expr.c (cplus_expand_expr): Likewise.
5247         * init.c (resolve_offset_ref): Likewise.
5248         (build_new): Likewise.
5249         (build_new_1): Likewise.
5250         (build_vec_delete_1): Likewise.
5251         (expand_vec_init_catch_clause): Likewise.
5252         (build_delete): Likewise.
5253         * pt.c (tsubst): Likewise.
5254         * rtti.c (synthesize_tinfo_fn): Likewise.
5255         * search.c (expand_upcast_fixups): Likewise.
5256         (expand_direct_vtbls_init): Likewise.
5257         * typeck.c (get_member_function_from_ptrfunc): Likewise.
5258         (build_binary_op_nodefault): Likewise.
5259         (point_int_sum): Likewise.
5260         (pointer_diff): Likewise.
5261         (build_unary_op): Likewise.
5262         (build_modify_expr): Likewise.
5263         (get_delta_difference): Likewise.
5264         (build_ptrmemfunc): Likewise.
5265         (expand_ptrmemfunc_cst): Likewise.
5267 1999-04-20  Jason Merrill  <jason@yorick.cygnus.com>
5269         * decl.c (grokfndecl): Always call cplus_decl_attributes.
5270         * decl2.c (grokfield): Pass attrlist to grokdeclarator.
5272 1999-04-19  Mark Mitchell  <mark@codesourcery.com>
5274         * cp-tree.h (finish_static_data_member_decl): New function.
5275         * decl2.c (finish_static_data_member_decl): Split out from ...
5276         (grokfield): Here.
5277         * pt.c (instantiate_class_template): Use it here instead of
5278         trying to fake it.
5279         (tsubst_decl): Don't set DECL_ASSEMBLER_NAME;
5280         finish_static_data_member_decl will do that.  Explicit set
5281         DECL_EXTERNAL to match non-template processing.
5283 1999-04-18  Mark Mitchell  <mark@codesourcery.com>
5285         * cp-tree.h (finish_class_definition): Add parameter.
5286         * parse.y (structsp): Use it.  Don't call pop_scope here.
5287         * parse.c: Regenerated.
5288         * semantics.c (finish_class_definition): Pop it here.
5290 1999-04-17  Mark Mitchell  <mark@codesourcery.com>
5292         * decl.c (xref_tag): Revise handling of nested template
5293         declarations.
5294         * pt.c (check_explicit_specialization): Tweak handling of friend
5295         templates in template classes.
5296         (tsubst_friend_class): Handle friend declarations for nested
5297         member template classes.
5299 1999-04-16  Mark Mitchell  <mark@codesourcery.com>
5301         * class.c (finish_struct): Remove unused variable.
5302         (pushclass): Likewise.
5303         (invalidate_class_lookup_cache): Likewise.
5304         * cp-tree.def (TYPENAME_TYPE): Improve documentation.
5305         * decl.c (build_typename_type): Make sure TYPENAME_TYPE_FULLNAME
5306         doesn't get obliterated.
5307         (make_typename_type): Handle template classes correctly.
5309         * cp-tree.h (TREE_NONLOCAL_FLAG): Remove.
5310         (storetags): Declare.
5311         * class.c (finish_struct): Don't use TREE_NONLOCAL_FLAG.
5312         (pushclass): Likewise.  Use storetags to install tag declarations,
5313         not pushtag.
5314         (invalidate_class_lookup_cache): Don't use TREE_NONLOCAL_FLAG.
5315         * decl.c (storetags): Make it global.
5316         (push_class_binding): Set INHERITED_VALUE_BINDING_P for an
5317         implicit typename declaration.
5318         (pushtag): Tidy.  Don't use TREE_NONLOCAL_FLAG.
5319         * method.c (hack_identifier): Likewise.
5320         * search.c (lookup_member): Likewise.
5322         * decl.c (warn_about_implicit_typename_lookup): New function.
5323         (lookup_name_real): Use it.  Rework handling of implicit typename
5324         extension.
5326 1999-04-15  Mark Mitchell  <mark@codesourcery.com>
5328         * cp-tree.h (lookup_nested_field): Remove.
5329         * class.c (push_nested_class): Handle UNION_TYPEs.
5330         (pop_nested_class): Likewise.
5331         * decl.c (lookup_name_real): Don't call lookup_nested_field.
5332         (start_decl): Use push_nested_class, not just pushclass.
5333         (cp_finish_decl): Use pop_nested_class, not just popclass.
5334         * search.c (lookup_nested_field): Remove.
5336         * cp-tree.h (lang_type): Add documentation.
5337         * decl2.c (handle_class_head): Create template declarations here,
5338         as appropriate.
5339         * parse.y (class_head): Return whether or not we entered a new
5340         scope, as well as the type named.
5341         (named_class_head): Likewise.
5342         (named_complex_class_head_sans_basetype): Likewise.
5343         (structsp): Adjust accordingly.  Pop scope when required.
5344         * parse.c: Regenerated.
5345         * pt.c (check_default_tmpl_args): Robustify.
5346         (redeclare_class_template): Likewise.
5347         (instantiate_class_template): An instantiation of an
5348         anonymous union is itself an anonymous union.
5349         * semantics.c (begin_class_definition): Don't create template
5350         declarations here.
5352 1999-04-15  Jason Merrill  <jason@yorick.cygnus.com>
5354         * parse.y (after_type_declarator_intern): New nonterminal.
5355         (after_type_declarator): Use it.
5356         (direct_after_type_declarator): Likewise.  Move above
5357         nonnested_type to fix reduce/reduce conflict resolution.
5358         (declmods): Reducing from just 'attributes' has EMPTY precedence.
5359         * Makefile.in (CONFLICTS): Update.
5361         * decl.c (define_label): Downgrade error for jumping over a
5362         non-POD decl to pedwarn.
5364 1999-04-14  Mark Mitchell  <mark@codesourcery.com>
5366         * cp-tree.h (popclass): Change declaration.
5367         (pop_nested_class): Likewise.
5368         (poplevel_class): Remove declaration.
5369         * call.c (convert_default_argument): Pass no arguments to
5370         popclass.
5371         * class.c (finish_struct_1): Likewise.
5372         (finish_struct): Likewise.
5373         (popclass): Remove argument.  Simplify code accordingly.
5374         (pop_nested_class): Likewise.
5375         * decl.c (poplevel_class): Declare it here, and make it static.
5376         (poplevel): Handle class scopes.
5377         (poplevel_class): Don't take an rgument.  Simplify.
5378         (pop_everything): Pass no arguments to pop_nested_class.
5379         (cp_finish_decl): Pass no arguments to popclass.
5380         (grokdeclarator): Pass no arguments to pop_nested_class.
5381         (finish_function): Likewise.
5382         * decl2.c (grokfield): Likewise.
5383         (pop_scope): Pass no arguments to popclass.
5384         * lex.c (do_pending_defargs): Pass no arguments to pop_nested_class.
5385         * pt.c (instantiate_class_template): Move call to pushclass, and
5386         document.  Pass no arguments to popclass.
5387         (regenerate_decl_from_template): Likewise.
5389 1999-04-14  Jason Merrill  <jason@yorick.cygnus.com>
5391         * typeck.c (build_unary_op): Handle taking the address of a unique
5392         bound non-static member function.
5394 1999-04-13  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5396         * lang-options.h (-Wdeprecated): New flag.
5397         * decl2.c (warn_deprecated): New flag.
5398         (lang_decode_option): Deprecated this-is-variable,
5399         external-templates, alt-external-templates.
5400         Support -Wdeprecated.
5401         * errfn.c (cp_deprecated): New function.
5403 1999-04-13  Jason Merrill  <jason@yorick.cygnus.com>
5405         * decl2.c (setup_initp): Compare DECL_ASSEMBLER_NAME instead
5406         of the decls themselves.
5408         * pt.c (tsubst_function_type): Copy attributes over.
5410         * tree.c (cp_valid_lang_attribute): New fn.  Handle init_priority
5411         and com_interface.
5412         * cp-tree.h: Add prototype.
5413         * decl.c (init_decl_processing): Set valid_lang_attribute.
5415 1999-04-13  Mark Mitchell  <mark@codesourcery.com>
5417         * class.c (finish_struct_1): Look at the const-ness of the field's
5418         type, not the TREE_READONLY-ness of the declaration.
5419         * method.c (synthesize_method): Likewise.
5420         * pt.c (tsubst_decl): Call c_apply_type_quals_to_decl when
5421         creating new declarations.
5423 1999-04-13  Mike Stump  <mrs@wrs.com>
5425         * decl2.c (import_export_decl): Because vtables always reference
5426         virtual functions, even if they are inlined, don't allow
5427         -fno-implement-inlines to not emit them, instead, emit them with
5428         the vtable.
5429         * decl.c (start_function): Likewise.
5431 1999-04-12  Jason Merrill  <jason@yorick.cygnus.com>
5433         * cp-tree.h (struct lang_type): Add com_interface.
5434         (CLASSTYPE_COM_INTERFACE): New macro.
5435         * class.c (set_rtti_entry): COM interface classes have no RTTI
5436         entries in their vtables; adjust.
5437         (add_virtual_function, finish_base_struct, skip_rtti_stuff,
5438         modify_one_vtable, fixup_vtable_deltas1, override_one_vtable,
5439         finish_struct_1): Likewise.
5440         * decl2.c (mark_vtable_entries): Likewise.
5441         * rtti.c (build_headof, get_tinfo_fn_dynamic): Likewise.
5442         * search.c (get_abstract_virtuals_1, get_abstract_virtuals,
5443         expand_upcast_fixups): Likewise.
5444         * tree.c (debug_binfo): Likewise.
5446         * cp-tree.h (COMPARE_NO_ATTRIBUTES): New macro.
5447         * typeck.c (comptypes): If we get it, ignore attributes.
5448         * class.c (instantiate_type): Use BASELINK_P.  Change complain
5449         parameter to flags; 2 means ignore attributes.
5450         * call.c (build_op_delete_call): Pass it.
5452         * decl.c (xref_tag): Only complain once about using a typedef-name
5453         with 'struct'.  Downgrade to pedwarn.
5455         * decl.c (grokdeclarator): Allow [] syntax for zero-length array.
5457         * parse.y (absdcl_intern): New nonterminal.
5458         (absdcl, direct_abstract_declarator): Use it.
5460         * pt.c (lookup_template_class): Look through implict typename.
5462 1999-04-11  Mark Mitchell  <mark@codesourcery.com>
5464         * friend.c (add_friend): Deal gracefully with error_mark_node.
5465         * method.c (build_overload_value): Handle pointers-to-members as
5466         template parameters.
5468         * decl.c (push_binding): Fix typo in comment.
5470 1999-04-10  Mark Mitchell  <mark@codesourcery.com>
5472         * error.c (dump_type_real): If a typename is a template-id, put
5473         out the template arguments.
5474         (dump_expr): Handle TEMPLATE_ID_EXPR.
5475         * pt.c (lookup_template_class): Now that full arguments are
5476         available everywhere, remove code that tried to guess them.
5478 1999-04-09  Mark Mitchell  <mark@codesourcery.com>
5480         * decl.c (make_typename_type): Complain if we don't find a type
5481         when trying to make a typename type for a non-template type.
5483 1999-04-09  Jason Merrill  <jason@yorick.cygnus.com>
5485         * decl.c (start_decl): Pass attributes to grokdeclarator.
5486         (grokdeclarator): Handle attributes on constructor-syntax
5487         initializers.
5489 1999-04-08  Mark Mitchell  <mark@codesourcery.com>
5491         * error.c (dump_expr): Don't crash on INDIRECT_REFs whose operands
5492         don't have types.
5494         * search.c (template_self_reference_p): Tweak.
5496 1999-04-07  Mark Mitchell  <mark@codesourcery.com>
5498         * init.c (build_offset_ref): Don't build yet another weird data
5499         structure to describe overloaded functions.
5501 1999-04-06  Mark Mitchell  <mark@codesourcery.com>
5503         * cp-tree.h (BASELINK_P): New macro.
5504         (SET_BASELINK_P): Likewise.
5505         * init.c (build_member_call): Remove needless assignment in if
5506         statement.
5507         * search.c (lookup_field_r): Fix handling when we are looking
5508         specifically for a type; these are not hidden by functions and
5509         variables.
5510         (lookup_member): Use SET_BASELINK_P.
5511         * tree.c (is_overloaded_fn): Use BASELINK_P.
5512         (really_overloaed_fn): Likewise.
5513         (get_first_fn): Likewise.
5515 1999-04-05  Mark Mitchell  <mark@codesourcery.com>
5517         * decl.c (lookup_name_current_level): Tweak, and improve
5518         documentation.
5520         * class.c (maybe_fixup_vptrs): Remove declaration.
5521         (build_class_init_list): Likewise.
5522         * decl.c (pushdecl_class_level): Call check_template_shadow here
5523         ...
5524         (push_class_level_binding): ... not here.
5525         * search.c (dfs_push_type_decls): Only avoid
5526         template-self-reference TYPE_DECLs if they are from base classes.
5528 1999-04-04  Mark Mitchell  <mark@codesourcery.com>
5530         * pt.c (check_template_shadow): Don't treat OVERLOADs as _DECL
5531         nodes.  Tidy.
5533 1999-04-03  Jason Merrill  <jason@yorick.cygnus.com>
5535         * class.c (maybe_fixup_vptrs, build_class_init_list): Lose.
5536         (finish_struct_1): Don't call build_class_init_list.
5538 1999-04-02  Mark Mitchell  <mark@codesourcery.com>
5540         * tinfo.h (__class_type_info): Fix illegal declaration.
5542         * cp-tree.def (TEMPLATE_ID_EXPR): Update comment.
5543         * cp-tree.h (INHERITED_VALUE_BINDING_P): New macro.
5544         (IDENTIFIER_CLASS_VALUE): Improve documentation.
5545         (is_properly_derived_from): Declare.
5546         (invalidate_class_lookup_cache): Likewise.
5547         (maybe_maybe_note_name_used_in_class): Likewise.
5548         (note_name_declared_in_class): Likewise.
5549         (push_using_decl): Remove duplicate declaration.
5550         (id_in_current_class): Remove declaration.
5551         (push_class_binding): Change prototype.
5552         (clear_identitifer_class_values): Declare.
5553         * call.c (is_properly_derived_from): Make it global.
5554         (build_new_function_call): Be careful about updating candidates.
5555         (build_new_method_call): Handle COMPONENT_REFs.  Don't crash when
5556         asked to make illegal calls.
5557         * class.c: Include splay-tree.h.
5558         (class_stack_node): Add names_used slot.
5559         (check_member_decl_is_same_in_complete_scope): Remove.
5560         (add_method): Fix comment.  Push the declaration into class
5561         scope.
5562         (finish_struct_1): When popping the class, pop the bindings too.
5563         Remove check for data member/function member conflict.
5564         (finish_struct): Remove calls to
5565         check_member_decl_is_same_in_complete_scope.  Change calls to
5566         popclass.
5567         (pushclass): Clear names_used in the class stack entry.
5568         Use invalidate_class_lookup_cache to remove cached entries, rather
5569         than magic values with popclass.  Clear IDENTIFIER_CLASS_VALUE
5570         before entering a new class.  Remove dead code.  Don't mess with
5571         current_function_decl when pushing declarations.
5572         (invalidate_class_lookup_cache): New function, split out from ...
5573         (popclass): Here.  Clean up names_used on our way out.
5574         (instantiate_type): Adjust.
5575         (build_self_reference): Don't push the declaration here.
5576         (maybe_note_name_used_in_class): New function.
5577         (note_name_declared_in_class): Likewise.
5578         * decl.c (add_binding): Change prototype.
5579         (find_class_binding_level): New function.
5580         (innermost_nonclass_level): Likewise.
5581         (current_binding_level): Update documentation.
5582         (inner_binding_level): Remove.  Replace with current_binding_level
5583         throughout.
5584         (push_binding_level): Remove special handling of
5585         class_binding_level.
5586         (pop_binding_level): Likewise.  Use find_class_binding_level.
5587         (suspend_binding_level): Likewise.
5588         (global_bindings_p): Use innermost_nonclass_level.
5589         (toplevel_bindings_p): Likewise.
5590         (namespace_bindings_p): Likewise.
5591         (pseudo_global_level_p): Likewise.
5592         (push_binding): Clear INHERITED_VALUE_BINDING_P.
5593         (add_binding): Check for illegal multiple declarations.  Return a
5594         value indicating whether or not the new binding was legal.
5595         (push_local_binding): Skip over class binding levels.  Check
5596         return value from add_binding.
5597         (push_class_binding): Set INHERITED_VALUE_BINDING_P.  Call
5598         note_name_declared_in_class.
5599         (pushlevel_class): Remove "fake out the rest of the compiler"
5600         code.
5601         (poplevel_class): Reset IDENTIFIER_CLASS_VALUEs.
5602         (clear_identifier_class_values): New function.
5603         (pop_from_top_level): Use it.
5604         (pop_everything): Tweak.
5605         (maybe_process_template_type_declaration): Don't push the
5606         declaration for the template here.
5607         (pushtag): Don't push tag declarations into class scope here.
5608         (pushdecl): Apply DeMorgan's law for readability.
5609         (pushdecl_class_level): Remove special-case code for
5610         TYPE_BEING_DEFINED.  Handle OVERLOADs and anonymous unions.
5611         (push_class_level_bindng): Deal with inherited bindings.
5612         (lookup_name_real): Remove special-case code for
5613         TYPE_BEING_DEFINED, and some implicit typename magic.
5614         (grokdeclarator): Handle COMPONENT_REF for a template function.
5615         (build_enumerator): Don't call pushdecl_class_level here.
5616         (id_in_current_class): Remove.
5617         * decl2.c (grokfield): Don't call pushdecl_class_level or
5618         check_template_shadow.
5619         * errfn.c (cp_file_of): Don't declare.
5620         (cp_line_of): Likewise.
5621         * error.c (dump_decl): Handle an OVERLOAD.
5622         (cp_file_of): Likewise.
5623         (cp_line_of): Likewise.
5624         * init.c (build_member_call): Handle a COMPONENT_REF.
5625         * lex.c (do_identifier): Call maybe_note_name_used_in_class, not
5626         pushdecl_class_level.
5627         * method.c (hack_identifier): Build COMPONENT_REFs for references
5628         to member templates as well as member functions.  Remove dead
5629         code.
5630         * parse.y (left_curly): Remove.
5631         (nonnested_type): Call maybe_note_name_used_in_class, not
5632         pushdecl_class_level.
5633         * parse.c: Regenerated.
5634         (nested_name_specifier_1): Likewise.
5635         * pt.c (check_explicit_specialization): Adjust, for robustness.
5636         (check_template_shadow): Handle OVERLOADs.
5637         (build_template_decl): Set DECL_CONSTRUCTOR_P on the
5638         TEMPLATE_DECL, if appropriate.
5639         * search.c (envelope_add_decl): Remove.
5640         (dfs_pushdecls): Likewise.
5641         (dfs_compress_decls): Likewise.
5642         (dfs_push_decls): New function.
5643         (dfs_push_type_decls): Likewise.
5644         (setup_class_bindings): Likewise.
5645         (template_self_reference_p): Likewise.
5646         (lookup_field_r): Use it.
5647         (looup_member): Remove old comment.  Deal with ambiguity.
5648         (push_class_decls): Use dfs_push_decls and dfs_push_type_decls,
5649         and remove envelope processing.
5650         * semantics.c (begin_class_definition): Let pushclass push
5651         declarations for base classes.
5652         (finish_member_declaration): Push declarations into class scope.
5653         * typeck.c (build_component_ref): Just put an OVERLOAD into the
5654         COMPONENT_REF, not a TREE_LIST of an OVERLOAD.
5655         (build_x_function_call): Deal with OVERLOAD.  Handle template-ids.
5656         * Makefile.in (class.o): Depend on splay-tree.h.
5658 Wed Mar 31 11:30:43 1999  Nathan Sidwell  <nathan@acm.org>
5660         * cvt.c (convert_pointer_to_real): Use same_type_p.
5661         * typeck.c (comp_target_types): Use same_type_p.
5663 1999-03-31  Jason Merrill  <jason@yorick.cygnus.com>
5665         * semantics.c (begin_inline_definitions,
5666         finish_inline_definitions): Rename from finish_default_args and
5667         begin_inline_definitions, respectively, to something that isn't a
5668         total lie.  :)
5669         * parse.y (structsp): Adjust.
5671         * tree.c (hash_tree_cons): Remove obsolete via_* parms.
5672         (list_hash_lookup): Likewise.
5673         (hash_tree_chain): Adjust.
5674         * pt.c (tsubst): Adjust.
5675         (tsubst_arg_types): Use plain hash_tree_cons.
5676         * cp-tree.h (hash_tree_cons_simple): Lose.
5677         * parse.y (declmods, nonempty_cv_qualifiers): Use hash_tree_cons.
5679 Wed Mar 31 10:48:29 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5681         * Makefile.in (hash.h): Generate using gperf language 'C', not
5682         'KR-C', so gperf uses the `const' keyword on strings.
5684         * gxx.gperf (resword): Const-ify a char*.
5686 1999-03-30  Jason Merrill  <jason@yorick.cygnus.com>
5688         * cp-tree.h (IDENTIFIER_AS_DESC, IDENTIFIER_AS_LIST,
5689         CLASSTYPE_BASELINK_VEC, CLASSTYPE_N_SUPERCLASSES,
5690         CLASSTYPE_N_BASECLASSES, CLASSTYPE_MAX_DEPTH,
5691         CLASSTYPE_BASE_INIT_LIST, CLASSTYPE_AS_LIST, CLASSTYPE_ID_AS_LIST,
5692         CLASSTYPE_BINFO_AS_LIST): Remove cruft.
5693         * class.c, lex.c, parse.y, ptree.c, search.c, semantics.c,
5694         tree.c: Adjust.
5696 1999-03-29  Jason Merrill  <jason@yorick.cygnus.com>
5698         * decl2.c (lang_decode_option): Remove -Wsign-promo from -Wall.
5700 1999-03-28  Jason Merrill  <jason@yorick.cygnus.com>
5702         * pt.c (fn_type_unification): Ignore 'this' parm from conversion ops.
5704 1999-03-27  Mark Mitchell  <mark@codesourcery.com>
5706         * cp-tree.h (add_friend): Declare.
5707         (add_friends): Likewise.
5708         * friend.c (add_friend): Make it global.  Don't add to
5709         DECL_BEFRIENDING_CLASSES if the befriending class is a template.
5710         (add_friends): Make it global.
5711         (make_friend_class): Don't add to DECL_BEFRIENDING_CLASSES if the
5712         befriending class is a template.
5713         * parse.y (component_decl_1): Fix typo in comment.
5714         * parse.c: Regenerated.
5715         * pt.c (instantiate_class_template): Use add_friend and
5716         add_friends rather that duplicating some of their functionality
5717         here.
5719 1999-03-27  Jason Merrill  <jason@yorick.cygnus.com>
5721         * call.c (build_field_call): Unify 'this' and non-'this' cases.
5723         * typeck.c (build_indirect_ref): Check for 'this' sooner.
5725 Fri Mar 26 10:20:34 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5727         * call.c (op_error): Const-ify a char*.
5728         (add_candidate, source_type, add_warning): Add static prototype.
5729         (print_z_candidates): Const-ify a char*.
5731         * class.c (resolve_address_of_overloaded_function,
5732         fixed_type_or_null, build_vtable_entry_ref): Add static prototype.
5733         (get_vtable_name, finish_struct_1): Const-ify a char*.
5735         * cvt.c (convert_to_reference): Likewise.
5737         * decl.c (redeclaration_error_message, record_builtin_type,
5738         record_unknown_type, member_function_or_else, bad_specifiers):
5739         Likewise.
5740         (find_binding, select_decl, unqualified_namespace_lookup,
5741         lookup_flags, qualify_lookup, record_builtin_java_type, tag_name):
5742         Add static prototype.
5743         (warn_extern_redeclared_static, duplicate_decls, pushdecl,
5744         implicitly_declare, record_builtin_java_type, define_function,
5745         grok_op_properties, tag_name): Const-ify a char*.
5747         * cp-tree.h (FORMAT_VBASE_NAME): Allow parameter `BUF' to be const.
5748         (define_function, finish_builtin_type): Const-ify a char*.
5749         (cp_error, cp_error_at, cp_warning, cp_warning_at, cp_pedwarn,
5750         cp_pedwarn_at, cp_compiler_error, cp_sprintf): Add prototype args.
5751         (file_name_nondirectory): Const-ify a char*.
5752         (init_filename_times): Don't prototype.
5753         (compiler_error): Prototype.
5754         (yyerror, init_repo): Const-ify a char*.
5755         (build_srcloc): Don't prototype.
5756         (build_x_indirect_ref, build_indirect_ref, build_component_addr):
5757         Const-ify a char*.
5758         (warn_for_assignment): Don't prototype.
5759         (convert_for_initialization, readonly_error, check_for_new_type,
5760         GNU_xref_begin, GNU_xref_file, GNU_xref_ref, GNU_xref_call):
5761         Const-ify a char*.
5763         * decl2.c (acceptable_java_type, output_vtable_inherit,
5764         setup_initp, start_objects, finish_objects, do_dtors, do_ctors,
5765         merge_functions, decl_namespace, validate_nonmember_using_decl,
5766         do_nonmember_using_decl): Add static prototype.
5767         (lang_f_options): Const-ify a char*.
5768         (finish_builtin_type): Likewise.
5769         (add_function, arg_assoc_namespace, arg_assoc_class): Add static
5770         prototype.
5772         * errfn.c: Include cp-tree.h.
5773         (cp_thing): Add static prototype.
5774         (compiler_error): Don't protoptype.
5775         (cp_compiler_error): Cast `compiler_error' to `errorfn' before
5776         passing it to `cp_thing'.
5778         * error.c (interesting_scope_p): Add static prototype.
5780         * except.c (build_eh_type_type, build_eh_type_type_ref): Const-ify
5781         a char*.
5783         * init.c (compiler_error): Don't prototype.
5784         (member_init_ok_or_else): Const-ify a char*.
5785         (build_java_class_ref): Add static prototype.
5787         * lex.c (compiler_error): Don't prototype.
5788         (get_time_identifier, interface_strcmp, extend_token_buffer,
5789         handle_cp_pragma): Const-ify a char*.
5790         (is_global, init_filename_times): Add static prototype.
5791         (file_name_nondirectory, cplus_tree_code_name): Const-ify a char*.
5792         (compiler_error): Change from fixed args to variable args.
5793         (yyerror): Const-ify a char*.
5795         * parse.y (cond_stmt_keyword): Const-ify a char*.
5796         (parse_decl): Add static prototype.
5798         * pt.c (template_args_equal, print_template_context): Likewise.
5799         (print_candidates, check_default_tmpl_args): Const-ify a char*.
5800         (instantiate_class_template): Likewise.
5802         * repo.c (get_base_filename, open_repo_file, init_repo): Likewise.
5804         * rtti.c (call_void_fn, expand_generic_desc, expand_si_desc,
5805         expand_class_desc, expand_ptr_desc, expand_attr_desc): Likewise.
5807         * search.c (lookup_field_info, lookup_member): Likewise.
5808         (lookup_member): Cast the first argument of `bzero' to a PTR.
5810         * sig.c (compiler_error): Don't prototype.
5811         (build_signature_pointer_or_reference_nam): Const-ify a char*.
5812         (get_sigtable_name, build_member_function_pointer): Likewise.
5814         * tree.c (compiler_error): Don't prototype.
5815         (no_linkage_helper, build_srcloc): Add static prototype.
5816         (build_vbase_pointer_fields): Const-ify a char*.
5817         (__eprintf): Don't unnecessarily handle `const' when !__STDC__.
5819         * typeck.c (compiler_error): Don't prototype.
5820         (convert_for_assignment): Const-ify a char*.
5821         (comp_cv_target_types): Add static prototype.
5822         (build_x_indirect_ref, build_indirect_ref, convert_arguments,
5823         build_component_addr, build_unary_op, convert_for_initialization):
5824         Const-ify a char*.
5826         * typeck2.c (ack): Add static prototype and change from fixed args
5827         to variable args.
5828         (readonly_error, check_for_new_type): Const-ify a char*.
5830         * xref.c (_XREF_FILE, find_file, filename, fctname, declname,
5831         fixname, open_xref_file, classname, GNU_xref_begin): Likewise.
5832         (GNU_xref_file): Likewise.  Also use `xmalloc' instead of `malloc'.
5833         (GNU_xref_end_scope, GNU_xref_ref, GNU_xref_decl, GNU_xref_call,
5834         gen_assign, GNU_xref_member): Const-ify a char*.
5836 1999-03-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5838         * gxxint.texi: Remove old discussion on copying virtual bases.
5840 1999-03-25  Zack Weinberg  <zack@rabi.columbia.edu>
5842         * Make-lang.in: Remove all references to g++.o/g++.c.
5843         Link g++ from gcc.o.
5845 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
5847         * decl2.c (comdat_linkage): Treat vtables like functions.
5849 1999-03-25  Mark Mitchell  <mark@codesourcery.com>
5851         * pt.c (tsubst_decl): tsubst into DECL_BEFRIENDING_CLASSES.
5853 1999-03-25  Nathan Sidwell  <nathan@acm.org>
5855         * decl.c (init_decl_processing): Add `signed' type as a synonym
5856         for `int'.
5858 1999-03-25  Jason Merrill  <jason@yorick.cygnus.com>
5860         * typeck.c (common_type): Handle cv-qual unification for pointers
5861         to members.
5863         * decl.c (unqualified_namespace_lookup): Return error_mark_node
5864         on error.
5865         (lookup_name_real): Set LOOKUP_COMPLAIN when *not* parsing.
5866         * lex.c (do_identifier): If we got error_mark_node, call
5867         lookup_name again.
5869 1999-03-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5871         * class.c (finish_struct_1): Always reset TYPE_FIELDS for empty
5872         classes.
5874 1999-03-24  Jason Merrill  <jason@yorick.cygnus.com>
5876         * decl.c (lookup_name_real): Do nested field lookup regardless of
5877         TYPE_BEING_DEFINED.
5879 1999-03-24  Mark Mitchell  <mark@codesourcery.com>
5881         * cp-tree.h (lang_type): Remove has_assignment and
5882         has_real_assignment.  Add befriending_classes.
5883         (TYPE_HAS_ASSIGNMENT): Remove.
5884         (TYPE_HAS_REAL_ASSIGNMENT): Likewise.
5885         (CLASSTYPE_BEFRIENDING_CLASSES): New macro.
5886         (lang_decl): Document.
5887         (DECL_BEFRIENDING_CLASSES): New macro.
5888         (FRIEND_NAME): Move declaration to more obvious location.
5889         (FRIEND_DECLS): Likewise.
5890         * class.c (finish_struct_1): Don't use TYPE_HAS_REAL_ASSIGNMENT.
5891         * decl.c (duplicate_decls): Copy DECL_BEFRIENDING_CLASSES.
5892         (fixup_anonymous_union): Don't use TYPE_HAS_ASSIGNMENT.
5893         (grok_op_properties): Likewise.
5894         * friend.c (is_friend): Use FRIEND_NAME and FRIEND_DECLS.
5895         (add_friend): Likewise.  Don't do weird things with assignment
5896         operators.  Update DECL_BEFRIENDING_CLASSES.
5897         (add_friends): Don't do weird things with assignment operators.
5898         (make_friend_class): Likewise.  Update
5899         CLASSTYPE_BEFRIENDING_CLASSES.
5900         * pt.c (instantiate_class_template): Don't set
5901         TYPE_HAS_ASSIGNMENT.
5902         (tsubst_copy): Substitute the TREE_TYPE for more unary
5903         expressions.
5904         * ptree.c (print_lang_type): Don't look at TYPE_HAS_ASSIGNMENT.
5905         * search.c (protected_accessible_p): New function.
5906         (friend_accessible_p): Likewise.
5907         (accessible_p): Use them.
5909 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
5911         * pt.c (convert_nontype_argument): Don't create things that aren't
5912         PTRMEM_CSTs when applying a qualification conversion to a
5913         PTRMEM_CST.
5915 1999-03-23  Mark Mitchell  <mark@codesourcery.com>
5917         * Makefile.in (OBJS): Don't mention hash.o.
5918         (OBJDEPS): Likewise.
5920 1999-03-23  Jason Merrill  <jason@yorick.cygnus.com>
5922         * decl2.c (finish_file): Set at_eof to 2 after expanding ctors.
5923         * decl.c (expand_static_init): Make sure we don't add any after
5924         then.
5926         * decl.c (cp_finish_decl): Move intelligence about handling
5927         DECL_COMDAT for variables from here...
5928         * decl2.c (comdat_linkage): ...to here.
5929         (maybe_make_one_only): Tweak.
5930         (import_export_decl): Call comdat_linkage for variables, too.
5931         (finish_file): Handle template statics properly.
5933 1999-03-22  Mark Mitchell  <mark@codesourcery.com>
5935         * cp-tree.h (TYPE_PTRMEMFUNC_P): Use TYPE_PTRMEMFUNC_FLAG.
5936         Document internals of pointer-to-member-functions.
5937         (DELTA2_FROM_PTRMEMFUNC): Make it call delta2_from_ptrmemfunc.
5938         (PFN_FROM_PTRMEMFUNC): Likewise.
5939         (build_type_conversion): Remove unused parameter.
5940         (build_ptrmemfunc1): Declare.
5941         (expand_ptrmemfunc_cst): New function.
5942         (delta2_from_ptrmemfunc): Likewise.
5943         (pfn_from_ptrmemfunc): Likewise.
5944         * cvt.c (cp_convert_to_pointer): Remove unused parameter to
5945         build_type_conversion.  Use TYPE_PTRMEM_P for readability.
5946         (convert_to_reference): Remove unused parameter to
5947         build_type_conversion.
5948         (ocp_convert): Likewise.
5949         (build_user_type_conversion): Likewise.
5950         * error.c (dump_expr): Handle NULL pointer-to-member functions.
5951         * expr.c (cplus_expand_expr): Handle PTRMEM_CSTs for functions.
5952         * method.c (build_overload_value): Don't go splitting CONSTRUCTORs
5953         open when handling pointer-to-member functions.
5954         * pt.c (convert_nontype_argument): Clean up error messages.  Be
5955         more stringent with pointers-to-members.
5956         * typeck.c (build_ptrmemfunc1): Don't declare.  Make it global.
5957         (build_unary_op): Tidy ever-so-slightly.
5958         (build_conditional_expr): Remove extra parameter to
5959         build_type_conversion.
5960         (build_ptrmemfunc): Build PTRMEM_CSTs if we know what function
5961         we're using.
5962         (expand_ptrmemfunc_cst): Define.
5963         (delta2_from_ptrmemfunc): Likewise.
5964         (pfn_from_ptrmemfunc): Likewise.
5966 1999-03-19  Mark Mitchell  <mark@codesourcery.com>
5968         * init.c (build_member_call): Handle template-id expressions
5969         correctly.
5970         * typeck.c (build_x_function_call): Likewise.
5972 1999-03-19  Chip Salzenberg  <chip@perlsupport.com>
5974         * friend.c (make_friend_class): Avoid core dump when
5975         not-yet-defined friend type lacks TYPE_LANG_SPECIFIC().
5977 1999-03-18  Jason Merrill  <jason@yorick.cygnus.com>
5979         * decl.c (start_function): Suppress normal linkage heuristics
5980         for #pragma interface under MULTIPLE_SYMBOL_SPACES.
5982 1999-03-19  Alexandre Oliva  <oliva@dcc.unicamp.br>
5984         * Make-lang.in: ($(INTL_TARGETS)): Depend on cp/parse.c.
5985         ($(srcdir)/cp/parse.c): Moved from ../Makefile.in.
5987 1999-03-17  Martin von Löwis  <loewis@informatik.hu-berlin.de>
5989         * parse.y (named_complex_class_head_sans_basetype):
5990         Do not push a scope for error_mark_node.
5991         (maybe_base_class_list): Likewise.
5993         * decl.c (start_decl): Check for error_mark_node as a type.
5994         Detected by g++.brendan/array-refs.C.
5995         (start_decl_1): Likewise.  Detected by g++.bugs/900322_01.C.
5996         (maybe_build_cleanup_1): Likewise.  Detected by
5997         g++.jason/incomplete1.C.
5999         * tree.c (build_dummy_object): Use void_zero_node instead of the
6000         error_mark_node.
6001         (is_dummy_object): Check for such a node.
6002         Detected by g++.bob/inherit1.C
6004 1999-03-16  Jason Merrill  <jason@yorick.cygnus.com>
6006         * method.c (old_backref_index): Split out...
6007         (flush_repeats): From here.  Rename back from try_old_backref.
6008         (build_mangled_name): Put back some old-style repeat handling.
6010 Mon Mar 15 21:57:16 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6012         * lex.c: Don't include setjmp.h.
6013         (parse_float): New static function.
6014         (pf_args): New struct.
6015         (real_yylex): Use them in call to `do_float_handler'.
6017 1999-03-15  Mark Mitchell  <mark@markmitchell.com>
6019         * decl.c (xref_basetypes): Set CLASSTYPE_VBASECLASSES here.
6020         * tree.c (layout_basetypes): Not here.
6021         * search.c (dfs_search): Remove; no longer used.
6023 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
6025         * decl2.c (validate_nonmember_using_decl): Issue sensible
6026         error-messages on bogus qualifiers.
6028 1999-03-14  Jason Merrill  <jason@yorick.cygnus.com>
6030         * call.c (add_function_candidate): Fix uninitialized variable.
6032         * Makefile.in (search.o): Add dependency on varray.h.
6034 1999-03-13  Jason Merrill  <jason@yorick.cygnus.com>
6036         * decl.c (duplicate_decls): Use same_type_p.
6037         * method.c (try_old_backref): Renamed from flush_repeats.  Use
6038         same_type_p.  Don't try to handle repeats.  Return success.
6039         (is_back_referenceable_type): Return 0 if TYPE_FOR_JAVA.  Support
6040         calls from old-style code, too.
6041         (check_ktype): Use same_type_p.
6042         (check_btype): Use same_type_p.  Don't pull out TYPE_MAIN_VARIANT.
6043         (build_qualified_name): Simplify logic.
6044         (process_overload_item): Strip typedefs and quals at the top.
6045         (build_mangled_name_for_type_with_Gcode): Remove call to
6046         type_canonical_variant.
6047         (build_mangled_name): Likewise.  Remove support for old-style
6048         repeats, which have been disabled since 2.7.2.  Don't mess with
6049         TREE_USED.
6050         (build_decl_overload_real): Don't mess with TREE_USED.
6052 1999-03-13  Nathan Sidwell  <nathan@acm.org>
6054         * error.c (cp_printers): Add 'F' escape character.
6055         (dump_type_real): Remove TREE_LIST (fnargs) printing.
6056         Functionality moved to dump_parameters.
6057         (dump_type_suffix): Use dump_parameters and dump_exception_spec.
6058         (dump_function_decl): Extend meaning of V parameter.  Use
6059         dump_parameters and dump_exception_spec.
6060         (dump_parameters): New static function.
6061         (dump_exception_spec): New static function.
6062         (fndecl_as_string): Change argument semantics.  Use
6063         dump_function_decl directly.
6065         * sig.c (build_signature_table_constructor): Use cp_error.
6067 1999-03-13  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6069         * semantics.c (finish_switch_cond): Handle error cases gracefully.
6070         Detected by g++.law/enum5.C.
6072         * typeck.c (build_modify_expr): Check for errors after resolving
6073         offsets.  Detected by g++.brendan/static1.C.
6075         * decl.c (complete_array_type): Ignore initial_value if it is an
6076         error.  Detected by g++.benjamin/17930.C.
6078         * typeck2.c (process_init_constructor): Return error if one argument
6079         is in error.  Detected by g++.benjamin/13478.C.
6081 1999-03-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6083         * decl.c (select_decl): Allow class templates when we need types.
6084         * decl2.c (ambiguous_decl): Likewise.
6086 1999-03-12  Mark Mitchell  <mark@markmitchell.com>
6088         * lex.c (do_identifier): Correct call to enforce_access.
6089         * search.c (accessible_p): Tweak comment.
6091 1999-03-10  Mark Mitchell  <mark@markmitchell.com>
6093         * semantics.c (begin_class_definition): Call build_self_reference.
6094         (finish_member_declaration): Set DECL_CONTEXT for TYPE_DECLs.
6096         * search.c (assert_canonical_unmarked): Fix typo in prototype.
6098         * search.c (dfs_canonical_queue): New function.
6099         (dfs_assert_unmarked_p): Likewise.
6100         (assert_canonical_unmarked): Likewise.
6101         (access_in_type): Use it.
6102         (accessible_p): Likewise.  Walk the whole tree when umarking.
6104         * sig.c (build_signature_table_constructor): Use accessible_p
6105         instead of compute_access.
6107 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
6109         * call.c (add_builtin_candidates): Handle overloaded conversion ops.
6111 1999-03-09  Mark Mitchell  <mark@markmitchell.com>
6113         * cp-tree.h (flag_access_control): Declare.
6114         (TREE_VIA_PPUBLIC): Document.
6115         (DECL_NONSTATIC_MEMBER_P): New macro.
6116         (enforce_access): Return an indication of whether or not access
6117         was permitted.
6118         (build_self_reference): Change prototype.
6119         (compute_access): Replace with ...
6120         (accessible_p): New function.
6121         (dfs_walk): Change prototype.
6122         (dfs_unmark): Likewise.
6123         (markedp): Likewise.
6124         * call.c (enforce_access): Use accessible_p.
6125         * class.c (build_self_reference): Insert the declaration into the
6126         list of members for this type, and make it public.
6127         * decl.c (xref_basetypes): Avoid ill-timed recursion.
6128         * init.c (build_offset_ref): Use lookup_member, not three separate
6129         name-lookups.  Call enforce_access rather than checking for
6130         illegal accesses here.
6131         (resolve_offset_ref): Likewise.
6132         * lex.c (do_identifier): Likewise.
6133         * method.c (hack_identifier): Likewise.
6134         * parse.y (self_reference): Remove.
6135         (opt_component_decl_list): Don't use it.
6136         * parse.c: Regenerated.
6137         * pt.c (print_candidates): Generalize to handle lists of
6138         overloaded functions.
6139         (instantiate_class_template): Don't rely on TREE_VIA_PRIVATE; it's
6140         not set.
6141         (get_template_base): Use new calling convention for dfs_walk.
6142         * search.c: Include varray.h.  Add prototypes.
6143         (dfs_walk): Accept a data pointer to pass to the work functions.
6144         All callers changed.  All work functions changed.
6145         (breadth_first_search): Rename to bfs_walk, and make consistent
6146         with dfs_walk.
6147         (dfs_walk_real): New function.
6148         (canonical_binfo): New function.
6149         (context_for_name_lookup): Likewise.
6150         (shared_marked_p): Likewise.
6151         (shared_unmarked_p): Likewise.
6152         (lokup_field_queue_p): Likewise.
6153         (lookup_field_r): Generalize to handle both functions and fields.
6154         (lookup_field): Just call lookup_member.
6155         (lookup_fnfields): Likewise.
6156         (lookup_member): Move body of lookup_field here and generalize.
6157         (dfs_accessible_queue_p): Likewise.
6158         (dfs_accessible_p): Likewise.
6159         (dfs_access_in_type): Likewise.
6160         (access_in_type): Likewise.
6161         (compute_access): Remove, and replace with ...
6162         (accessible_p): New function.
6163         (vbase_types): Remove.
6164         (vbase_decl_ptr_intermediate): Likewise.
6165         (vbase_decl_ptr): Likewise.
6166         (vbase_init_result): Likewise.
6167         (closed_envelopes): Likewise.
6168         (bvtable): Likewise.
6170 1999-03-09  Jason Merrill  <jason@yorick.cygnus.com>
6172         * call.c (add_function_candidate): Check for proper number of args
6173         before checking the validity of those args.
6175 1999-03-06  Jason Merrill  <jason@yorick.cygnus.com>
6177         * cp-tree.h (struct lang_type): Add anon_union field.
6178         (ANON_UNION_TYPE_P): Use it instead of examining type.
6179         (SET_ANON_UNION_TYPE_P): New macro.
6180         * decl.c (check_tag_decl): Use it.
6182         * search.c (compute_access): Handle non-type contexts earlier, and
6183         handle NULL_TREE.
6185         * tree.c (build_exception_variant): Use copy_to_permanent.
6187         * decl2.c (setup_initp): Give statics with no priority the default
6188         priority here.
6189         (do_dtors, do_ctors, finish_file): Remove special handling of
6190         non-prioritized statics.
6192 1999-03-05  Mark Mitchell  <mark@markmitchell.com>
6194         * cp-tree.h (ANON_UNION_TYPE_P): Robustify.
6195         * decl.c (make_typename_type): Don't issue an error if an
6196         immediate lookup fails; it migt be resolved later.
6197         * friend.c (is_friend): Add comment.
6198         * search.c (breadth_first_search): Add POSTFN and DATA
6199         parameters.  Tidy.  All callers changed.
6200         (lookup_field_queue_p): New function.
6201         (lookup_field_r): Likewise.
6202         (lookup_field_post): Likewise.
6203         (lookup_field): Use them, via breadth_first_search, instead of
6204         duplicating logic.
6205         (compute_access): Robustify.
6206         (lookup_fnfield_info): New structure.
6208 1999-03-05  Jason Merrill  <jason@yorick.cygnus.com>
6210         * pt.c (tsubst, case ARRAY_REF): Use tsubst_expr again.
6212 1999-03-03  Jason Merrill  <jason@yorick.cygnus.com>
6214         * class.c, decl2.c, method.c, pt.c: Add 'static' to make SunOS 4
6215         cc happy.
6217         * decl2.c (import_export_class): Also return if
6218         CLASSTYPE_INTERFACE_ONLY is set.
6220 1999-03-03  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6222         * decl.c (push_overloaded_decl): Only overwrite the old binding if
6223         there was one.
6224         * decl2.c (do_local_using_decl): Fix loop termination.
6226 1999-03-02  Mark Mitchell  <mark@markmitchell.com>
6228         * cp-tree.h (determine_specialization): Don't declare.
6229         * pt.c (determine_specialization): Make it static.  Eliminate
6230         complain parameter.  Note that decl is always non-NULL now, and
6231         simplify accordingly.
6233         * decl.c (maybe_push_to_top_level): Always call
6234         push_cp_function_context.
6235         (pop_from_top_level): Always call pop_cp_function_context.
6237 1999-02-26  Nathan Sidwell  <nathan@acm.org>
6239         * typeck.c (complete_type_or_else): Add VALUE arg, for helpful
6240         diagnostics.
6241         * cp-tree.h (complete_type_or_else): Added VALUE parameter.
6242         * init.c (build_new_1): Extra arg to complete_type_or_else.
6243         (build_delete): Likewise.
6244         * typeck.c (require_complete_type): Likewise.
6245         (pointer_int_sum): Likewise.
6246         (pointer_diff): Likewise.
6247         (build_component_ref): Likewise.
6249         * typeck2.c (incomplete_type_error): Always use cp_error.
6250         Show declaration of undefined type, if appropriate.
6251         Deal with UNKNOWN_TYPE nodes.
6253         * typeck.c (require_complete_type): Use TYPE_SIZE as
6254         size_zero_node to mean incomplete type.
6255         (require_complete_type_in_void): New function.
6256         (build_compound_expr): Call complete_type_in_void for LHS.
6257         (build_c_cast): Call complete_type_in_void for void cast.
6258         * cvt.c (ocp_convert): Call complete_type_in_void for void cast.
6259         * decl.c (cplus_expand_expr_stmt): Void expression checks moved to
6260         require_complete_type_in_void.  Call it.
6261         * cp-tree.h (require_complete_type_in_void): Prototype new function.
6263         * typeck.c (convert_arguments): Use alternative format for
6264         function decls.  Don't require_complete_type here.  Simplify
6265         diagnostic printing.
6266         (convert_for_initialization): Don't require_complete_type on RHS yet.
6267         * call.c (convert_arg_to_ellipsis): Call require_complete_type.
6269         * call.c (build_over_call): Cope with qualified void return type.
6270         * semantics.c (finish_call_expr): Likewise.
6271         * typeck.c (build_function_call_real): Likewise.
6272         (c_expand_return): Likewise.
6273         * decl2.c (reparse_absdcl_as_expr): Cope with qualified void type.
6275         * call.c (print_z_candidates): Use alternate print format, to be
6276         consistent with (pt.c) print_candidates.
6277         * method.c (hack_identifier): List candidate members.
6278         * search.c (lookup_field): Build ambiguous list, and show it, if
6279         ambiguous.
6281 1999-02-26  Mark Mitchell  <mark@markmitchell.com>
6283         * typeck.c (decay_conversion): Don't confuse constant array
6284         variables with their initializers.
6286         * decl.c (duplicate_decls): Copy DECL_TEMPLATE_INSTANTIATED when
6287         merging decls.
6288         * pt.c (regenerate_decl_from_template): Tweak for clarity.
6289         (instantiate_decl): Mark a decl instantiated before regenerating
6290         it to avoid recursion.
6291         * tree.c (mapcar): Don't call decl_constant_value unless we know
6292         something is TREE_READONLY_DECL_P.
6294         * class.c (check_for_override): Don't stop checking when we find
6295         the first overridden function.  Delete #if 0'd code.
6296         * search.c (get_matching_virtual): Likewise.
6298 1999-02-25  Richard Henderson  <rth@cygnus.com>
6300         * lang-specs.h: Define __FAST_MATH__ when appropriate.
6302 1999-02-24  Mike Stump  <mrs@wrs.com>
6304         * typeck.c (convert_for_assignment): Allow boolean integral constant
6305         expressions to convert to null pointer.
6307 1999-02-24  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6309         * decl.c (lookup_namespace_name): Resolve namespace aliases.
6311         * class.c (push_nested_class): Allow namespaces.
6313         * decl2.c (set_decl_namespace): Add friendp parameter.
6314         * decl.c (grokfndecl): Pass it.
6315         (grokvardecl): Likewise.
6316         * cp-tree.h: Change declaration.
6318 1999-02-24  Jason Merrill  <jason@yorick.cygnus.com>
6320         * pt.c (tsubst): Allow an array of explicit size zero.
6322 1999-02-23  Jason Merrill  <jason@yorick.cygnus.com>
6324         * errfn.c: Change varargs code to look like toplev.c.
6326         * method.c (process_modifiers): Don't prepend 'U' for char or
6327         wchar_t.
6329 1999-02-20  Craig Burley  <craig@jcb-sc.com>
6331         * Make-lang.in (cplib2.ready): Don't consider updating
6332         cplib2 stuff if the current directory isn't writable, as
6333         it won't work (such as during a `make install').
6335 Sun Feb 21 20:38:00 1999  H.J. Lu  (hjl@gnu.org)
6337         * decl2.c (start_objects): Make file scope constructors and
6338         destructors local to the file if ASM_OUTPUT_CONSTRUCTOR and
6339         ASM_OUTPUT_DESTRUCTOR are defined.
6341 1999-02-19  Mark Mitchell  <mark@markmitchell.com>
6343         * cp-tree.h (CLASSTYPE_METHOD_VEC): Adjust comment.
6344         (fn_type_unification): Adjust prototype.
6345         (lookup_fnfields_1): Declare.
6346         * call.c (add_template_candidate_real): Adjust call to
6347         fn_type_unification.
6348         * class.c (add_method): Don't allow duplicate declarations of
6349         constructors or destructors.
6350         (resolve_address_of_overloaded_function): Remove unused variable.
6351         Adjust call to fn_type_unification.
6352         * decl.c (grokfndecl): Be more robust in the face of illegal
6353         specializations.
6354         * decl2.c (check_classfn): Remove hokey handling of member
6355         templates.
6356         * pt.c (determine_specialization): Improve comments.  Adjust to
6357         handle template argument deduction as per the standard.
6358         (check_explicit_specialization): Fix comment spacing.  Handle
6359         type-conversion operators correctly.  Improve error-recovery.
6360         (fn_type_unification): Remove EXTRA_FN_ARG parameter.
6361         (get_bindings_real): Simplify handling of static members.
6362         * search.c (lookup_fnfields_1): Make it have external linkage.
6363         * typeck.c (compparms): Fix comment.
6364         (build_unary_op): Don't try to figure out which template
6365         specialization is being referred to when when the address-of
6366         operator is used with a template function.
6368 Thu Feb 18 23:40:01 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6370         * cp-tree.h (lvalue_or_else): Qualify a char* with the `const'
6371         keyword to match an analogous change at the top level.
6373         * tree.c (lvalue_or_else): Likewise.
6375 1999-02-17  Mark Mitchell  <mark@markmitchell.com>
6377         * decl.c (xref_basetypes): Comment.
6378         * pt.c (instantiate_class_template): Use xref_basetypes.
6380 1999-02-16  Mark Mitchell  <mark@markmitchell.com>
6382         * cp-tree.h (tsubst): Change prototype.
6383         (tsubst_expr): Likewise.
6384         (tsubst_copy): Likewise.
6385         (type_unification): Remove prototype.
6386         * call.c (convert_default_arg): Adjust call to tsubst_expr.
6387         * class.c (resolve_address_of_overloaded_function): Just use
6388         fn_type_unification.
6389         * decl.c (grokdeclarator): Adjust call to tsubst.
6390         * method.c (build_template_parm_names): Likewise.
6391         * pt.c (GTB_VIA_VIRTUAL): New macro.
6392         (GTB_IGNORE_TYPE): Likewise.
6393         (resolve_overloaded_unification): Add `complain' parameter.
6394         (try_one_overload): Likewise.
6395         (tsubst_template_arg_vector): Likewise.
6396         (tsubst_template_parms): Likewise.
6397         (tsubst_aggr_type): Likewise.
6398         (tsubst_arg_types): Likewise.
6399         (tsubst_call_declarator_parms): Likewise.
6400         (unify): Remove explicit_mask.
6401         (type_unification_real): Likewise.
6402         (get_template_base_recursive): Likewise.
6403         (coerce_template_template_parms): Provide prototype.
6404         (tsubst_function_type): Likewise.
6405         (try_class_unification): New function.
6406         All callers changed to use new complain parameter.
6407         (get_template_base): Use try_class_unification.
6408         (unify): Adjust handling of classes derived from template types.
6409         (fn_type_unification): Substitute explicit arguments before
6410         unification.
6412 1999-02-16  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6414         * decl.c (pushdecl): Remove dead code.
6416 1999-02-16  Jason Merrill  <jason@yorick.cygnus.com>
6418         * decl2.c (finish_objects): Fix code I missed in previous change.
6420 1999-02-13  Jason Merrill  <jason@yorick.cygnus.com>
6422         * decl.c (grokfndecl): Return NULL_TREE instead of error_mark_node.
6423         (grokdeclarator): Don't expect error_mark_node from grokfndecl.
6425         * pt.c (maybe_process_partial_specialization): Complain about
6426         'template <>' on non-specialization.
6428 1999-02-10  Jason Merrill  <jason@yorick.cygnus.com>
6430         * decl.c (grokdeclarator): Catch weird declarators.
6431         * decl2.c (finish_file): Don't abort because of namespace parsing
6432         failure.
6433         (check_decl_namespace): Remove.
6435 1999-02-09  Mark Mitchell  <mark@markmitchell.com>
6437         * cp-tree.h (get_template_base): Don't declare.
6438         (dfs_walk): Declare.
6439         (dfs_unmark): Likewise.
6440         (markedp): Likewise.
6441         * pt.c (unify): Remove duplicate declaration.  Pass tparms and
6442         targs to get_template_base.
6443         (get_template_base_recursive): Move here from search.c.  Check to
6444         see that the base found can be instantiated to form the desired
6445         type.
6446         (get_template_base): Likewise.
6447         (get_class_bindings): Simplify.
6448         * search.c (get_template_base_recursive): Move to pt.c.
6449         (get_template_base): Likewise.
6450         (markedp): Make it global.
6451         (dfs_walk): Likewise.
6452         (dfs_unmark): Likewise.
6454 1999-02-07  Jason Merrill  <jason@yorick.cygnus.com>
6456         * pt.c (maybe_process_partial_specialization): Complain about
6457         specialization in wrong namespace.
6458         * tree.c (decl_namespace_context): New fn.
6460 1999-02-06  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6462         * decl2.c (arg_assoc_type): Handle TEMPLATE_TEMPLATE_PARM.
6463         * pt.c (coerce_template_template_parms): Handle nested
6464         template template parameters.
6466 Sat Feb  6 18:08:40 1999  Jeffrey A Law  (law@cygnus.com)
6468         * typeck2.c: Update email addresses.
6470 1999-02-04  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6472         * pt.c (unify): Call coerce_template_parms with the COMPLAIN flag
6473         turned off.
6475 1999-02-04  Jason Merrill  <jason@yorick.cygnus.com>
6477         * lex.c (retrofit_lang_decl): Split out...
6478         (build_lang_decl): From here.
6479         * decl.c (pushdecl): Call it for functions generated by the middle
6480         end that don't have DECL_LANG_SPECIFIC.
6481         * cp-tree.h: Declare it.
6483         * decl2.c: Remove flag_init_priority.  Always enable initp stuff.
6484         (start_objects, finish_objects): Only use special
6485         init_priority code if the user specified a priority.
6486         (do_ctors, do_dtors): Use DEFAULT_INIT_PRIORITY for the non-initp
6487         objects.
6489 Wed Feb  3 22:50:17 1999  Marc Espie  <Marc.Espie@liafa.jussieu.fr>
6491         * Make-lang.in (GXX_OBJS): Remove choose-temp.o, pexecute.o and
6492         mkstemp.o.  Get them from libiberty now.
6493         (DEMANGLER_PROG): Simlarly, remove getopt.o getopt1.o.
6495 Tue Feb  2 22:38:48 1999  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
6497         * decl2.c (lang_decode_option): Use read_integral_parameter.
6499 1999-02-01  Mark Mitchell  <mark@markmitchell.com>
6501         * pt.c (tsubst, case TYPENAME_TYPE): Check TYPE_BEING_DEFINED
6502         before calling complete_type_or_else.
6504 Mon Feb  1 09:49:52 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6506         * input.c (inline): Don't define, its handled by system.h.
6508 Sun Jan 31 20:34:29 1999  Zack Weinberg  <zack@rabi.columbia.edu>
6510         * decl2.c: Don't define flag_no_ident here.  Don't process
6511         -f(no-)ident here.
6512         * cp-tree.h: Don't declare flag_no_ident here.
6513         * lang-specs.h: Map -Qn to -fno-ident.
6515 1999-01-28  Jason Merrill  <jason@yorick.cygnus.com>
6517         * cp-tree.h (struct tree_binding): Replace scope field with a union.
6518         (BINDING_SCOPE): Adjust.
6519         * decl.c (BINDING_LEVEL): Adjust.
6521 1999-01-26  Jason Merrill  <jason@yorick.cygnus.com>
6523         * pt.c (instantiate_class_template): Set up the DECL_INITIAL of
6524         member constants.
6526         * init.c (expand_member_init): Pull out TYPE_MAIN_VARIANT in
6527         a ctor initializer.
6529         * tree.c (equal_functions): Fix name in prototype.
6531         * decl.c (push_local_binding): Add FLAGS argument.
6532         (pushdecl, push_overloaded_decl): Pass it.
6533         * decl2.c (do_local_using_decl): Likewise.
6534         * cp-tree.h: Adjust prototype.
6535         * decl.c (poplevel): Fix logic.
6537         * decl.c (push_local_binding): Also wrap used decls in a TREE_LIST.
6538         (poplevel): Handle that.  Fix logic for removing TREE_LISTs.
6539         (cat_namespace_levels): Don't loop forever.
6541 1999-01-25  Richard Henderson  <rth@cygnus.com>
6543         * typeck.c (build_reinterpret_cast): Fix typo in duplicated test.
6545 1999-01-25  Jason Merrill  <jason@yorick.cygnus.com>
6547         * class.c (resolve_address_of_overloaded_function): Mark the
6548         chosen function used.
6550         * call.c (build_call): Make sure that a function coming in has
6551         been marked used already.
6552         * decl.c (expand_static_init): Call mark_used instead of
6553         assemble_external.
6554         * except.c (call_eh_info, do_pop_exception, expand_end_eh_spec,
6555         alloc_eh_object, expand_throw): Likewise.
6556         * init.c (build_builtin_delete_call): Likewise.
6557         * rtti.c (call_void_fn, get_tinfo_fn, build_dynamic_cast_1,
6558         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
6559         expand_generic_desc): Likewise.
6561 1999-01-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
6563         * tree.c (equal_functions): New function.
6564         (ovl_member): Call it.
6566 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
6568         * cvt.c (cp_convert_to_pointer): Fix conversion of 0 to pmf.
6570 1999-01-25  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6572         * decl.c (decls_match): Return 1 if old and new are identical.
6573         (push_overloaded_decl): Set OVL_USED when PUSH_USING.
6575 1999-01-24  Jason Merrill  <jason@yorick.cygnus.com>
6577         * decl.c (start_function): Make member functions one_only on windows.
6578         * decl2.c (import_export_decl): Likewise.
6580         * decl.c (grokdeclarator): Don't complain about implicit int in
6581         a system header.  Change same-name field check to not complain in
6582         a system header instead of within extern "C".
6584 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
6586         * cp-tree.h (PUSH_GLOBAL): New macro.
6587         (PUSH_LOCAL): Likewise.
6588         (PUSH_USING): Likewise.
6589         (namespace_bindings_p): Declare.
6590         (push_overloaded_decl): Likewise.
6591         * decl.c (push_overloaded_decl): Don't make it static.  Check for
6592         illegal declarations after using declarations here.
6593         (namespace_bindings_p): Likewise.
6594         (duplicate_decls): Don't consider declarations from different
6595         namespaces to be the same.
6596         (pushdecl): Use symbolic PUSH_ constants in calls to
6597         push_overloaded_decl.
6598         (push_overloaded_decl_1): Likewise.
6599         * decl2.c (validate_nonmember_using_decl): Tweak `std' handling.
6600         (do_nonmember_using_decl): Check for illegal using declarations
6601         after ordinary declarations here.
6602         (do_local_using_decl): Call pushdecl to insert declarations.
6604 1999-01-21  Jason Merrill  <jason@yorick.cygnus.com>
6606         * decl.c (grokdeclarator): Fix lang_c -> lang_name_c typo.
6608 1999-01-21  Mark Mitchell  <mark@markmitchell.com>
6610         * tree.c (build_cplus_array_type_1): Don't call build_array_type
6611         for types involving template parameters.
6613         * cp-tree.h (PARM_DECL_EXPR): Delete.
6614         (convert_default_arg): Change prototype.
6615         (check_default_argument): Declare.
6616         (search_tree): Likewise.
6617         * call.c (convert_default_arg): Take the function to which the
6618         default argument belongs as a parameter, and do any necessary
6619         instantiation here, instead of ...
6620         (build_over_call): Here.
6621         * decl.c (local_variable_p): New function.
6622         (check_default_argument): Likewise, split out and tidied from ...
6623         (grokparms): Here.
6624         * error.c (dump_expr): Don't set PARM_DECL_EXPR.
6625         * pt.c (tsubst_call_declarator_parms): New function.
6626         (for_each_template_parm): Handle ARRAY_REFs.  Do the obvious thing
6627         with CALL_EXPRs, rather than trying to be clever.
6628         (tsubst): Use tsubst_call_declarator_parms.
6629         * tree.c (search_tree): Don't make it static.
6630         * typeck.c (convert_arguments): Use new interface to
6631         convert_default_arg.
6633 1999-01-20  Mark Mitchell  <mark@markmitchell.com>
6635         * error.c (dump_function_decl): Don't print the argument types for
6636         a function when the verbosity level is negative.
6638         * call.c (build_over_call): Check format attributes at call-time.
6640         * pt.c (tsubst_copy): Fix comment.
6641         (unify): Don't allow unification with variable-sized arrays.
6643         * semantics.c (finish_stmt_expr): When processing a template make
6644         the BIND_EXPR long-lived.
6646 1999-01-19  Jason Merrill  <jason@yorick.cygnus.com>
6648         * decl2.c (finish_vtable_vardecl): Make vtables comdat here.
6649         (import_export_vtable): Not here.
6651 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
6653         * typeck.c (build_component_ref): Wrap an OVERLOAD around a unique
6654         non-static member function.
6656 1999-01-18  Nathan Sidwell  <nathan@acm.org>
6658         * class.c (instantiate_type): Only diagnose illegal address of member
6659         function if complaining.
6661         * decl.c (lookup_name_real): Remove duplicate code.
6663 1999-01-18  Jason Merrill  <jason@yorick.cygnus.com>
6665         * tree.c (copy_template_template_parm): Use permanent_obstack.
6667 1999-01-18  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
6669         * pt.c (unify): Remove restrictions on deduction of argument
6670         of template template parameters.
6672 1999-01-18  Nathan Sidwell  <nathan@acm.org>
6674         * rtti.c (build_dynamic_cast_1): Resolve OFFSET_REF exprs.
6676         * class.c (resolve_address_of_overloaded_function): Show list of
6677         all candidates, when none of them match.
6679 1999-01-18  Chip Salzenberg  <chip@perlsupport.com>
6681         * typeck.c (comp_ptr_ttypes_reinterpret): Per ANSI, tighten up
6682         definition of 'casting away const' in reinterpret_cast<>.
6684 1999-01-18  Graham  <grahams@rcp.co.uk>
6686         * cvt.c: Add include for decl.h, remove extern for
6687         static_aggregates which is now provided by decl.h.
6689         * Makefile.in (cvt.o): Add dependency for decl.h and missing
6690         dependencies for convert.h and flags.h.
6692 1999-01-18  Nathan Sidwell  <nathan@acm.org>
6694         * decl2.c (do_dtors): Set current location to that of the
6695         decl, for sensible diagnostics and debugging.
6696         (check_classfn): Issue `incomplete type' error, if
6697         class is not defined.
6699 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
6701         * cp-tree.h: Add prototype for bound_pmf_p.
6703 1999-01-16  Jason Merrill  <jason@yorick.cygnus.com>
6704             Manfred Hollstein <manfred@s-direktnet.de>
6706         * decl.c (grokdeclarator): Don't make 'main(){}' an error with only
6707         -Wreturn-type.
6709 1999-01-16  Nathan Sidwell  <nathan@acm.org>
6711         * cp-tree.h (struct lang_type): Added has_mutable flag.
6712         (CLASSTYPE_HAS_MUTABLE): New macro to access it.
6713         (TYPE_HAS_MUTABLE_P): New macro to read it.
6714         (cp_has_mutable_p): Prototype for new function.
6715         * class.c (finish_struct_1): Set has_mutable from members.
6716         * decl.c (cp_finish_decl): Clear decl's TREE_READONLY flag, if
6717         it contains a mutable.
6718         * typeck.c (cp_has_mutable_p): New function.
6720 1999-01-15  Mark Mitchell  <mark@markmitchell.com>
6722         * pt.c (process_template_parm): Ignore top-level qualifiers on
6723         non-type parameters.
6725         * decl.c (start_function): Use current_function_parms in the call
6726         to require_complete_type_for_parms, not the probably empty
6727         DECL_ARGUMENTS.
6729 1999-01-14  Jason Merrill  <jason@yorick.cygnus.com>
6731         * semantics.c (finish_asm_stmt): Don't warn about redundant volatile.
6733         * decl2.c (import_export_class): MULTIPLE_SYMBOL_SPACES only means
6734         that we don't suppress the other copies.
6735         * lex.c (handle_cp_pragma): Likewise.
6737 1999-01-13  Mark Mitchell  <mark@markmitchell.com>
6739         * decl.c (grokdeclarator): Undo 1998-12-14 change.
6740         * tree.c (build_cplus_array_type_1): Likewise.
6741         * pt.c (instantiate_class_template): Remove misleading comment.
6742         (tsubst_aggr_type): Substitute if there are template parameters,
6743         regardless of whether or not they use template arguments.
6744         (unify): Likewise, but for unification.
6746 1999-01-12  Richard Henderson  <rth@cygnus.com>
6748         * cp-tree.h (flag_permissive): Declare extern.
6750 1999-01-06  Mark Mitchell  <mark@markmitchell.com>
6752         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use OPERATOR_TYPENAME_FORMAT
6753         here.
6754         (lang_type): Add is_partial_instantiation.  Decrease width of
6755         dummy.
6756         (PARTIAL_INSTANTIATION_P): New macro.
6757         (OPERATOR_TYPENAME_P): Remove.
6758         * decl.c (unary_op_p): Use IDENTIFIER_TYPENAME_P, not
6759         OPERATOR_TYPENAME_P.
6760         (grok_op_properties): Likewise.
6761         * friend.c (do_friend): Handle friends that are member functions
6762         correctly.
6763         * lex.c (init_parse): Use OPERATOR_TYPENAME_FORMAT.
6764         * pt.c (instantiate_class_template): Rework for clarity.  Avoid
6765         leaving TYPE_BEING_DEFINED set in obscure cases.  Don't do
6766         any more partial instantiation than is absolutely necessary for
6767         implicit typename.  Set PARTIAL_INSTANTIATION_P.
6768         (tsubst_decl): Use IDENTIFIER_TYPENAME_P.
6769         * semantics.c (begin_class_definition): Handle partial
6770         specializations of a type that was previously partially
6771         instantiated.
6773 Wed Jan  6 03:18:53 1999  Mark Elbrecht  <snowball3@usa.net.
6775         * g++spec.c (LIBSTDCXX): Provide default definition.
6776         (lang_specific_driver): Use LIBSTDCXX instead of "-lstdc++".
6778 Tue Jan  5 22:11:25 1999  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6780         * Make-lang.in (g++.o): Depend on prefix.h.
6782 1999-01-04  Jason Merrill  <jason@yorick.cygnus.com>
6784         * tree.c (bound_pmf_p): New fn.
6785         * typeck.c (build_c_cast): Use it.
6787         * decl.c (grok_op_properties): Use same_type_p.
6789 Tue Dec 22 15:09:25 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6791         * Makefile.in (cvt.o): Depend on toplev.h.
6793         * cp-tree.h (check_template_shadow, pod_type_p): Add prototypes.
6795         * cvt.c: Include toplev.h.
6797         * except.c (get_eh_caught, get_eh_handlers): Hide prototypes and
6798         definitions.
6800         * init.c (expand_vec_init): Initialize variable `itype'.
6802         * lex.c (yyerror): Cast the argument passed to a ctype function to
6803         an unsigned char.
6805         * method.c (build_mangled_C9x_name): Wrap prototype and definition
6806         in "HOST_BITS_PER_WIDE_INT >= 64".
6808         * typeck.c (build_binary_op): Mark parameter `convert_p' with
6809         ATTRIBUTE_UNUSED.
6811 1998-12-22  Mark Mitchell  <mark@markmitchell.com>
6813         * cp-tree.h (TYPE_RAISES_EXCEPTIONS): Improve documentation.
6814         * tree.c (build_exception_variant): Don't crash on empty throw
6815         specs.
6817 1998-12-18  DJ Delorie  <dj@cygnus.com>
6819         * cvt.c (convert_to_reference): Check for both error_mark_node
6820         and NULL_NODE after call to convert_for_initialization.
6822 1998-12-17  Jason Merrill  <jason@yorick.cygnus.com>
6824         * error.c (interesting_scope_p): New fn.
6825         (dump_simple_decl): Use it.
6826         (dump_expr, case CONSTRUCTOR): Force a & for a PMF.
6827         (dump_expr, case OFFSET_REF): Print ->* if appropriate.
6829 1998-12-16  Mark Mitchell  <mark@markmitchell.com>
6831         * class.c (resolve_address_of_overloaded_function): Do conversion
6832         to correct type here, rather than ...
6833         (instantiate_type): Here.
6835         * cp-tree.h (DECL_TEMPLATE_PARM_P): New macro.
6836         (DECL_TEMPLATE_TEMPLATE_PARM_P): Use it.
6837         (decl_template_parm_p): Remove.
6838         * decl.c (pushdecl): Don't set DECL_CONTEXT for a template
6839         parameter.
6840         * lex.c (do_identifier): Use DECL_TEMPLATE_PARM_P.
6841         * pt.c (push_inline_template_parms_recursive): Set it.
6842         (decl_template_parm_p): Remove.
6843         (check_template_shadow): Use DECL_TEMPLATE_PARM_P.
6844         (process_template_parm): Set it.
6846 Wed Dec 16 16:33:58 1998  Dave Brolley  <brolley@cygnus.com>
6848         * lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus
6849         if configured with cpplib.
6851 1998-12-15  Mark Mitchell  <mark@markmitchell.com>
6853         * decl.c (poplevel): Make sure ns_binding is initialized.
6855         * decl.c (finish_function): Undo inadvertent change in previous
6856         patch.
6858 1998-12-14  Mark Mitchell  <mark@markmitchell.com>
6860         * class.c (pushclass): Tweak handling of class-level bindings.
6861         (resolve_address_of_overloaded_function): Update pointer-to-member
6862         handling.
6863         (instantiate_type): Likewise.
6864         * cvt.c (cp_convert_to_pointer): Likewise.
6865         * decl.c (pop_binding): Take the DECL to pop, not just the name.
6866         Deal with `struct stat' hack.
6867         (binding_level): Add to documentation.
6868         (push_binding): Clear BINDING_TYPE.
6869         (add_binding): New function.
6870         (push_local_binding): Use it.
6871         (push_class_binding): Likewise.
6872         (poplevel): Adjust calls to pop_binding.
6873         (poplevel_class): Likewise.
6874         (pushdecl): Adjust handling of TYPE_DECLs; add bindings for hidden
6875         declarations to current binding level.
6876         (push_class_level_binding): Likewise.
6877         (push_overloaded_decl): Adjust handling of OVERLOADs in local
6878         bindings.
6879         (lookup_namespace_name): Don't crash when confronted with a
6880         TEMPLATE_DECL.
6881         (lookup_name_real): Do `struct stat' hack in local binding
6882         contexts.
6883         (build_ptrmemfunc_type): Adjust documentation.
6884         (grokdeclarator): Don't avoid building real array types when
6885         processing templates unless really necessary.
6886         (finish_method): Adjust calls to pop_binding.
6887         * decl2.c (reparse_absdcl_as_expr): Recursively call ourselves,
6888         not reparse_decl_as_expr.
6889         (build_expr_from_tree): Deal with a template-id as the function to
6890         call in a METHOD_CALL_EXPR.
6891         * pt.c (convert_nontype_argument): Tweak pointer-to-member handling.
6892         (maybe_adjust_types_For_deduction): Don't do peculiar things with
6893         METHOD_TYPEs here.
6894         (resolve_overloaded_unification): Handle COMPONENT_REFs.  Build
6895         pointer-to-member types where necessary.
6896         * tree.c (build_cplus_array_type_1): Don't avoid building real
6897         array types when processing templates unless really necessary.
6898         (build_exception_variant): Compare the exception lists correctly.
6900 1998-12-13  Mark Mitchell  <mark@markmitchell.com>
6902         * cp-tree.def (CPLUS_BINDING): Update documentation.
6903         * cp-tree.h (LOCAL_BINDING_P): New macro.
6904         (lang_identifier): Rename local_value to bindings.
6905         (tree_binding): Make `scope' of type `void*', not `tree'.
6906         (BINDING_SCOPE): Update documentation.
6907         (IDENTIFIER_LOCAL_VALUE): Remove.
6908         (IDENTIFIER_CLASS_VALUE): Document.
6909         (IDENTIFIER_BINDING): New macro.
6910         (IDENTIFIER_VALUE): Likewise.
6911         (TIME_IDENTIFIER_TIME): Likewise.
6912         (TIME_IDENTIFIER_FILEINFO): Likewise.
6913         (IMPLICIT_TYPENAME_P): Likewise.
6914         (set_identifier_local_value): Remove.
6915         (push_local_binding): New function.
6916         (push_class_binding): Likewise.
6917         * class.c (pushclass): Update comments; use push_class_binding.
6918         * decl.c (set_identifier_local_value_with_scope): Remove.
6919         (set_identifier_local_value): Likewise.
6920         (push_binding): New function.
6921         (pop_binding): Likewise.
6922         (binding_level): Update documentation.  Remove shadowed.
6923         (BINDING_LEVEL): New macro.
6924         (free_binding_nodes): New variable.
6925         (poplevel): Adjust for new name-lookup scheme.  Don't mess up
6926         BLOCK_VARs when doing for-scope extension.  Remove effectively
6927         dead code.
6928         (pushlevel_class): Tweak formatting.
6929         (poplevel_class): Adjust for new name-lookup scheme.
6930         (print_binding_level): Likewise.
6931         (store_bindings): Likewise.
6932         (pushdecl): Likewise.
6933         (pushdecl_class_level): Likewise.
6934         (push_class_level_binding): Likewise.
6935         (push_overloaded_decl): Update comments.  Adjust for new
6936         name-lookup scheme.
6937         (lookup_name_real): Likewise.
6938         (lookup_name_current_level): Likewise.
6939         (cp_finish_decl): Likewise.
6940         (require_complete_types_for_parms): Likewise.  Remove misleading
6941         #if 0'd code.
6942         (grok_parms): Likewise.  Don't call
6943         require_complete_types_for_parms here.
6944         (grok_ctor_properties): Don't treat templates as copy
6945         constructors.
6946         (grop_op_properties): Or as assignment operators.
6947         (start_function): Document.  Adjust for new name-lookup scheme.
6948         (finish_function): Likewise.
6949         * decl2.c (do_local_using_decl): Use push_local_binding.
6950         * lex.c (begin_definition_of_inclass_inline): New function, split
6951         out from ...
6952         (do_pending_inlines): Here, and ...
6953         (process_next_inline): Here.
6954         (get_time_identifier): Use TIME_IDENTIFIER_* macros.
6955         (init_filename_times): Likewise.
6956         (extract_interface_info): Likewise.
6957         (ste_typedecl_interface_info): Likewise.
6958         (check_newline): Likewise.
6959         (dump_time_statistics): Likewise.
6960         (handle_cp_pragma): Likewise.
6961         (do_identifier): Adjust for new name-lookup scheme.
6962         * parse.y (function_try_block): Return ctor_initializer_opt value.
6963         (fndef): Use it.
6964         (fn.defpen): Pass appropriate values to start_function.
6965         (pending_inline): Use functor_try_block value, and pass
6966         appropriate values to finish_function.
6967         * pt.c (is_member_template): Update documentation; remove handling
6968         of FUNCTION_DECLs.  As per name, this function should deal only in
6969         TEMPLATE_DECLs.
6970         (decl_template_parm_p): Change name of olddecl parameter to decl.
6971         (check_template_shadow): Adjust for new name-lookup scheme.
6972         (lookup_template_class): Likewise.
6973         (tsubst_decl): Tweak so as not to confuse member templates with
6974         copy constructors and assignment operators.
6975         (unify): Handle UNION_TYPEs.
6976         * ptree.c (print_lang_identifier): Adjust for new name-lookup scheme.
6977         (lang_print_xnode): Adjust for new name-lookup scheme.
6978         * typeck.c (mark_addressable): Likewise.
6979         (c_expand_return): Likewise.
6981 1998-12-08  Jason Merrill  <jason@yorick.cygnus.com>
6983         * decl.c (grokdeclarator): Allow field with same name as class
6984         in extern "C".
6986         * decl.c (lookup_name_real): Don't limit field lookup to types.
6987         * class.c (check_member_decl_is_same_in_complete_scope): No error
6988         if icv and x are the same.
6989         * lex.c (do_identifier): Tweak error message.
6991 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
6993         * decl.c (start_enum): Use push_obstacks, not
6994         end_temporary_allocation.
6995         (finish_enum): Call pop_obstacks.
6997 1998-12-10  Mark Mitchell  <mark@markmitchell.com>
6999         * class.c (instantiate_type): Return error_mark_node rather than
7000         junk.
7002 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
7004         * cp-tree.h (most_specialized_instantiation): New function.
7005         (print_candidates): Likewise.
7006         * class.c (validate_lhs): Remove.
7007         (resolve_address_of_overloaded_function): New function, split out
7008         and then substantially reworked, from ...
7009         (instantiate_type): Use it.  Simplify.
7010         * cvt.c (convert_to_reference): Complain when caller has indicated
7011         that's the right thing to do.  Don't crash if instantiate_type
7012         fails.
7013         * pt.c: Substitute `parameters' for `paramters' throughout.
7014         (print_candidates): Don't make it static.
7015         (most_specialized_instantiation): Split out from ...
7016         (most_specialized): Here.
7018 Wed Dec  9 15:33:01 1998  Dave Brolley  <brolley@cygnus.com>
7020         * lex.c (lang_init_options): Initialize cpplib.
7021         * decl2.c (parse_options,cpp_initialized): Removed.
7022         (lang_decode_option): Move initialization of cpplib to
7023         lang_init_options.
7025 1998-12-09  Mark Mitchell  <mark@markmitchell.com>
7027         * decl.c (grokdeclarator): Update the name of the TEMPLATE_DECL, as
7028         well as the TYPE_DECL, when a typedef name is assigned to a
7029         previously anonymous type.
7031 1998-12-08  Andrew MacLeod  <amacleod@cygnus.com>
7033         * cp/except.c (call_eh_info): Use __start_cp_handler instead of
7034         __cp_eh_info for getting the eh info pointer.  Add table_index to
7035         field list.
7036         (push_eh_cleanup): Don't increment 'handlers' data field.
7037         (process_start_catch_block): Don't set the 'caught' field.
7039         * cp/exception.cc (CP_EH_INFO): New macro for getting the
7040         exception info pointer within library routines.
7041         (__cp_eh_info): Use CP_EH_INFO.
7042         (__start_cp_handler): Get exception info pointer, set caught field,
7043         and increment the handlers field.  Avoids this being done by handlers.
7044         (__uncatch_exception, __check_eh_spec): Use CP_EH_INFO macro.
7045         (uncaught_exception): Use CP_EH_INFO macro.
7047 Tue Dec  8 10:48:21 1998  Jeffrey A Law  (law@cygnus.com)
7049         * Make-lang.in (cxxmain.o): Depend on $(DEMANGLE_H), not demangle.h
7051 Mon Dec  7 17:56:06 1998  Mike Stump  <mrs@wrs.com>
7053         * lex.c (check_newline): Add support for \ as `natural'
7054         characters in file names in #line to be consistent with #include
7055         handling.  We support escape processing in the # 1 "..." version of
7056         the command.  See also support in cp/lex.c.
7058 1998-12-07  Zack Weinberg  <zack@rabi.phys.columbia.edu>
7060         * cp/decl2.c: s/data/opts/ when initializing cpp_reader
7061         structure.
7063 1998-12-07  Jason Merrill  <jason@yorick.cygnus.com>
7065         * decl.c (build_typename_type): Set DECL_ARTIFICIAL.
7067         * error.c (dump_simple_decl): Also print namespace context.
7068         (dump_function_decl): Likewise.
7070         * decl2.c (ambiguous_decl): Don't print old value if it's
7071         error_mark_node.
7073         * decl.c (lookup_name_real): Fix handling of local types shadowed
7074         by a non-type decl.  Remove obsolete code.
7075         * cp-tree.h (DECL_FUNCTION_SCOPE_P): New macro.
7077         * lang-options.h: Add -fpermissive.
7078         * decl2.c: Likewise.
7079         * cp-tree.h: Add flag_permissive.
7080         * decl.c (init_decl_processing): If neither -fpermissive or -pedantic
7081         were specified, set flag_pedantic_errors.
7082         * call.c (build_over_call): Turn dropped qualifier messages
7083         back into pedwarns.
7084         * cvt.c (convert_to_reference): Likewise.
7085         * typeck.c (convert_for_assignment): Likewise.
7087 1998-12-05  Jason Merrill  <jason@yorick.cygnus.com>
7089         * decl2.c (coerce_new_type): Use same_type_p.
7090         (coerce_delete_type): Likewise.
7092         * call.c (check_dtor_name): Return 1, not error_mark_node.
7094 1998-12-04  Jason Merrill  <jason@yorick.cygnus.com>
7096         * lex.c (handle_cp_pragma): Disable #pragma interface/implementation
7097         if MULTIPLE_SYMBOL_SPACES.
7099         * pt.c (check_template_shadow): New fn.
7100         * decl2.c (grokfield): Use it.
7101         * decl.c (pushdecl): Likewise.
7102         (pushdecl_class_level): Likewise.
7103         (start_method): Likewise.
7104         (xref_tag): Don't try to use 't' if we're defining.
7106         * call.c (check_dtor_name): Just return an error_mark_node.
7107         * pt.c (lookup_template_class): Complain about using non-template here.
7108         * parse.y (apparent_template_type): Not here.
7110         * pt.c (check_explicit_specialization): Complain about specialization
7111         with C linkage.
7113         * lang-options.h: Add -f{no-,}implicit-inline-templates.
7115         * pt.c (convert_nontype_argument): Don't assume that any integer
7116         argument is intended to be a constant-expression.
7118 1998-12-03  Mark Mitchell  <mark@markmitchell.com>
7120         * class.c (handle_using_decl): Fix comment.  Don't lookup
7121         constructors in base classes.
7122         (validate_lhs): Fix typo in comment.
7123         * search.c (lookup_field_1): Don't return a USING_DECL.
7125         * cp-tree.h (DECL_ACCESS): Improve documentation.
7127         * decl.c (expand_static_init): Don't set the initialization-done
7128         flag until the initialization is done.
7130 1998-12-02  Mark Mitchell  <mark@markmitchell.com>
7132         * decl2.c (validate_nonmember_using_decl): Complain about using
7133         declarations for class members.
7135 1998-11-29  Jason Merrill  <jason@yorick.cygnus.com>
7137         * typeck2.c (process_init_constructor): Use same_type_p.
7139         * decl.c (check_tag_decl): Don't warn about null decl inside a
7140         class.
7142         * pt.c (unify, case OFFSET_TYPE): Pass down 'strict' rather than
7143         UNIFY_ALLOW_NONE.
7144         (convert_nontype_argument): Use TYPE_PTRMEMFUNC_FN_TYPE.
7145         (resolve_overloaded_unification): Strip baselinks.
7147 Fri Nov 27 13:07:23 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7149         * g++spec.c: Don't prototype xmalloc.
7151 1998-11-25  Jason Merrill  <jason@yorick.cygnus.com>
7153         * except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
7155         * decl.c (check_tag_decl): Do complain about null friend decl at
7156         file scope.
7158 1998-11-25  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
7160         * lex.c (make_lang_type): Clear the whole struct lang_type, not
7161         only the first multiple of sizeof (int).
7163 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
7165         * decl.c (start_decl): An explicit specialization of a static data
7166         member is only a definition if it has an initializer.
7168         * except.c (expand_throw): Use cp_finish_decl for the throw temp.
7169         * cvt.c (build_up_reference): Pass DIRECT_BIND down into
7170         cp_finish_decl.
7171         * init.c (expand_default_init): Check for DIRECT_BIND instead of
7172         DECL_ARTIFICIAL.
7174         * call.c (build_over_call): Use build_decl.
7176         * except.c (expand_throw): Just use convert, not
7177         build_reinterpret_cast.
7179         * lex.c (handle_generic_pragma): Use token_buffer.
7181         * decl.c (check_tag_decl): Don't complain about null friend decl.
7183 1998-11-24  Dave Pitts  <dpitts@cozx.com>
7185         * Make-lang.in (DEMANGLER_PROG): Move the output arguments to the
7186         first position.
7187         * lex.c (check_newline): Use ISALPHA.
7188         (readescape): Use ISGRAPH.
7189         (yyerror): Use ISGRAPH.
7191 1998-11-24  Nathan Sidwell  <nathan@acm.org>
7193         * search.c (get_abstract_virtuals): Do not use initial
7194         CLASSTYPE_ABSTRACT_VIRTUALS.
7195         * typeck2.c (abstract_virtuals_error): Show location of abstract
7196         declaration.
7197         * call.c (build_new_method_call): Use
7198         CLASSTYPE_ABSTRACT_VIRTUAL, rather than recalculate.
7199         * class.c (finish_struct_bits): Don't bother working out whether
7200         get_abstract_virtuals will do anything, just do it.
7202 1998-11-24  Graham  <grahams@rcp.co.uk>
7204         * typeck.c (build_component_ref): Remove unused statement.
7206 1998-11-24  Jason Merrill  <jason@yorick.cygnus.com>
7208         * class.c (add_method): Catch invalid overloads.
7210         * class.c (add_method): Build up OVERLOADs properly for conversion ops.
7211         * search.c (lookup_conversions): Handle getting real OVERLOADs.
7212         (add_conversions): Likewise.  Revert last change.
7213         * call.c (add_conv_candidate): Pass totype to add_candidate instead
7214         of fn.  Don't add a new candidate if the last one was for the same
7215         type.
7216         (print_z_candidates): Handle getting a type as a function.
7217         (joust): If we got two conversion candidates to the same type,
7218         just pick one.
7219         (build_object_call): Lose 'templates'.
7220         (build_user_type_conversion_1): Handle getting real OVERLOADs.
7222 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
7224         * typeck2.c (process_init_constructor): If there are elements
7225         that don't have initializers and they need to have constructors
7226         run, supply them with initializers.
7228         * class.c (finish_struct_1): A class with a 0-width bitfield is
7229         still empty.
7231 1998-11-23  Mark Mitchell  <mark@markmitchell.com>
7233         * pt.c (instantiate_class_template): Don't try to figure out what
7234         specialization to use for a partial instantiation.  Correct
7235         typos in a couple of comments.  Avoid calling uses_template_parms
7236         multiple times.
7238 1998-11-23  Benjamin Kosnik  <bkoz@cygnus.com>
7240         * method.c (process_overload_item): Add call to
7241         build_mangled_C9x_name for intTI_type_nodes.
7242         (build_mangled_C9x_name): Add prototype, define.
7243         * decl.c (init_decl_processing): Add names for
7244         TImode_type_node.
7246 1998-11-23  Jason Merrill  <jason@yorick.cygnus.com>
7248         * parse.y (named_class_head): Update CLASSTYPE_DECLARED_CLASS.
7250         * class.c (finish_struct_1): Set things up for 0-width bitfields
7251         like we do for others.
7253         * decl.c (check_tag_decl): New fn.
7254         (shadow_tag): Split out from here.
7255         * decl2.c (grok_x_components): Call it.
7257 1998-11-22  Jason Merrill  <jason@yorick.cygnus.com>
7259         * decl.c: Lose warn_about_return_type.
7260         (grokdeclarator): Always complain about implicit int, except for
7261         `main () { ... }'.
7263         * decl.c (tag_name): New fn.
7264         (xref_tag): Complain about using typedef-name after class-key.
7266         * init.c (expand_vec_init): Also keep going if from_array.
7268         * tree.c (is_overloaded_fn): Also handle the output of
7269         build_offset_ref.
7271         * decl.c (grokdeclarator): Use constructor_name when comparing
7272         field name against enclosing class.
7273         * class.c (finish_struct_anon): Likewise.
7275 1998-11-22  Mark Mitchell  <mark@markmitchell.com>
7277         * decl.c (poplevel): Remove code to handle KEEP == 2.
7278         (finish_function): Don't confuse BLOCK-order when
7279         processing a destructor.
7281 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
7283         * decl.c (require_complete_types_for_parms): Call layout_decl
7284         after we've completed the type.
7286 1998-11-21  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7288         * decl2.c (validate_nonmember_using_decl): Allow using templates
7289         from the global namespace.
7291 1998-11-21  Jason Merrill  <jason@yorick.cygnus.com>
7293         Handle specifying template args to member function templates.
7294         * tree.c (build_overload): Always create an OVERLOAD for a template.
7295         * search.c (add_conversions): Handle finding an OVERLOAD.
7296         * decl2.c (check_classfn): Likewise.
7297         * lex.c (identifier_type): See through a baselink.
7298         * parse.y (do_id): Don't call do_identifier if we got a baselink.
7299         * class.c (instantiate_type, case TREE_LIST): Recurse.
7301         * decl.c (grokdeclarator): Allow a boolean constant for array
7302         bounds, odd as that sounds.
7304         * pt.c (unify): Be more strict about non-type parms, except for
7305         array bounds.
7306         (UNIFY_ALLOW_INTEGER): New macro.
7308 1998-11-19  Manfred Hollstein  <manfred@s-direktnet.de>
7310         * Make-lang.in (mandir): Replace all uses of $(mandir) by $(man1dir).
7312 1998-11-19  Jason Merrill  <jason@yorick.cygnus.com>
7314         * semantics.c (begin_class_definition): Call
7315         maybe_process_partial_specialization before push_template_decl.
7316         Don't call push_template_decl for a specialization.
7317         * search.c (lookup_field): Do return a member template class.
7318         * decl2.c (handle_class_head): Handle member template classes.
7320         * decl.c (grokdeclarator): A parm type need not be complete.
7322         * pt.c (convert_nontype_argument): Fix thinko.
7324 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
7326         * cp-tree.h (PTRMEM_CST_CLASS): Fix typo.
7327         (global_delete_fndecl): New variable.
7328         * decl.c (global_delete_fndecl): Define it.
7329         (init_decl_processing): Set it.
7330         * init.c (build_builtin_delete_call): Use it.
7331         * tree.c (mapcar): Recursively call mapcar for the type of EXPR
7332         nodes.
7334 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
7336         * decl.c (cplus_expand_expr_stmt): Always complain about unresolved
7337         type.
7339         * tree.c (lvalue_p_1): An INDIRECT_REF to a function is an lvalue.
7340         * call.c (build_object_call): Also support references to functions.
7341         * typeck.c (convert_for_initialization): Don't decay a function
7342         if the target is a reference to function.
7344         * search.c (add_conversions): Get all the overloads from a class.
7346         * decl.c (grok_ctor_properties): Complain about any constructor
7347         that will take a single arg of the class type by value.
7349         * typeck2.c (build_functional_cast): Can't create objects of
7350         abstract classes this way.
7351         * cvt.c (ocp_convert): Likewise.
7353         * decl.c (grokfndecl): Member functions of local classes are not
7354         public.
7356 1998-11-18  Mark Mitchell  <mark@markmitchell.com>
7358         * Make-lang.in (cc1plus): Add dependency on hash.o.
7360 1998-11-18  Jason Merrill  <jason@yorick.cygnus.com>
7362         * search.c (get_abstract_virtuals): Complain about virtuals with
7363         no final overrider.
7364         * typeck2.c (abstract_virtuals_error): Remove handling for virtuals
7365         with no final overrider.
7366         * class.c (override_one_vtable): Don't set DECL_ABSTRACT_VIRTUAL_P
7367         on virtuals with no final overrider.
7369         * lex.c (reinit_parse_for_block): Add a space after the initial ':'.
7371         * class.c (finish_struct_1): Don't remove zero-width bit-fields until
7372         after layout_type.
7374         * friend.c (do_friend): Don't set_mangled_name_for_decl.
7376         * class.c (finish_struct_anon): Complain about non-fields.
7377         * decl2.c (build_anon_union_vars): Likewise.
7379         * decl.c (grokdeclarator): Normal data members can't have the same
7380         name as the class, either.
7381         * class.c (finish_struct_anon): Neither can members of an
7382         anonymous union.
7384 1998-11-17  Mark Mitchell  <mark@markmitchell.com>
7386         * cp-tree.h (TYPE_ALIAS_SET): Document language-dependent uses.
7387         (TYPE_BINFO): Likewise.
7388         (IS_AGGR_TYPE): Tweak.
7389         (SET_IS_AGGR_TYPE): New macro.
7390         (CLASS_TYPE_P): Tweak.
7391         (lang_type): Group mark bitfields together.  Remove linenum.
7392         (CLASSTYPE_SOURCE_LINE): Remove macro.
7393         (CLASSTYPE_MARKED_N): New macro.
7394         (SET_CLASSTYPE_MARKED_N): Likewise.
7395         (CLEAR_CLASSTYPE_MARKED_N): Likewise.
7396         (CLASS_TYPE_MARKED_*): Use them.
7397         (SET_CLASSTYPE_MARKED_*): Likewise.
7398         (CLEAR_CLASSTYPE_MARKED_*): Likewise.
7399         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
7400         (TYPE_TEMPLATE_INFO): Handle TEMPLATE_TEMPLATE_PARMs as well.
7401         (TYPENAME_TYPE_FULLNAME): Use TYPE_BINFO rather than CLASSTYPE_SIZE.
7402         * class.c (class_cache_obstack): New variable.
7403         (class_cache_firstobj): Likewise.
7404         (finish_struct): Don't set CLASSTYPE_SOURCE_LINE.
7405         (pushclass): Free the cache, when appropriate.
7406         (popclass): Tidy.
7407         (maybe_push_cache_obstack): Use class_cache_obstack.
7408         * decl.c (include hash.h).
7409         (typename_hash): New function.
7410         (typename_compare): Likewise.
7411         (build_typename_type): Check the hash table to avoid creating
7412         duplicates.
7413         (build_ptrmemfunc_type): Use SET_IS_AGGR_TYPE.
7414         (grokdeclarator): Use CLASS_TYPE_P.
7415         (xref_basetypes): Likewise.
7416         (start_function): Likewise.  Don't put current_class_ref on the
7417         permanent obstack.
7418         * error.c (dump_type_real): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO
7419         and TYPE_TI_ARGS.
7420         * lex.c (note_got_semicolon): Use CLASS_TYPE_P.
7421         (make_lang_type): Don't create TYPE_LANG_SPECIFIC and associated
7422         fields for types other than class types.  Do clear TYPE_ALIAS_SET
7423         for types other than class types, though.
7424         * method.c (build_overload_identifier): Use CLASS_TYPE_P and
7425         TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7426         * pt.c (process_template_parm): Don't set
7427         CLASSTYPE_GOT_SEMICOLON.
7428         (lookup_template_class): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7429         Coerce arguments on the momentary obstack.
7430         (for_each_template_parm): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7431         (instantiate_class_template): Calculate template arguments on the
7432         momentary obstack.  Tidy.
7433         (tsubst_template_arg_vector): Use make_temp_vec.
7434         (tsubst_aggr_type): Put template arguments on the momentary
7435         obstack.
7436         (tsubst_decl): Likewise.
7437         (tsubst): Copy the array bounds index to the permanent obstack
7438         before building index types.  Use new macros.
7439         (unify): Use new macros.
7440         (do_type_instantiation): Likewise.
7441         * search.c (lookup_fnfields_1): Use new macros.
7442         (dfs_pushdecls): Build envelopes on the cache obstack.
7443         (dfs_compress_decls): Use new macros.
7444         (push_class_decls): Build on the cache obstack.
7445         * semantics.c (finish_typeof): Don't set CLASSTYPE_GOT_SEMICOLON.
7446         * sign.c (build_signature_pointer_or_reference_type): Use
7447         SET_IS_AGGR_TYPE.
7448         * tree.c (make_binfo): Check CLASS_TYPE_P.
7449         (copy_template_template_parm): Adjust.
7450         (make_temp_vec): Use push_expression_obstack.
7451         * typeck.c (complete_type): Use new macros.
7452         (comptypes): Likewise.
7454 1998-11-17  Jason Merrill  <jason@yorick.cygnus.com>
7456         * pt.c (tsubst): Add diagnostics for invalid array, reference
7457         and pointer to member types.
7459 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
7461         * typeck2.c (my_friendly_abort): Don't fatal twice in a row.
7463         * typeck.c (c_expand_start_case): Use build_expr_type_conversion.
7464         Simplify.
7466         * parse.y (structsp): Fix cut-and-paste error.
7468         * init.c (build_new): Complain about non-integral size.
7470         * parse.y (unary_expr): Complain about defining types in sizeof.
7472         * typeck.c (expr_sizeof): Complain about sizeof an overloaded fn.
7474         * rtti.c (build_x_typeid): Complain about typeid without
7475         including <typeinfo>.
7476         (get_typeid): Likewise.  Complain about typeid of incomplete type.
7477         (get_tinfo_fn_dynamic): Likewise.
7478         (get_typeid_1): Not static anymore.
7479         * except.c (build_eh_type_type): Use get_typeid_1.
7481         * rtti.c (build_dynamic_cast_1): Give errors for dynamic_cast to
7482         ambiguous or private bases.  Fix warning for reference cast.
7484 1998-11-16  Mark Mitchell  <mark@markmitchell.com>
7486         * cp-tree.h (DECL_TEMPLATE_INSTANTIATED): New macro.
7487         * decl.c (duplicate_decls): Remove special-case code to deal with
7488         template friends, and just do the obvious thing.
7489         * pt.c (register_specialization): Tweak for clarity, and also to
7490         clear DECL_INITIAL for an instantiation before it is merged with a
7491         specialization.
7492         (check_explicit_specialization): Fix indentation.
7493         (tsubst_friend_function): Handle both definitions in friend
7494         declaration and outside friend declarations.
7495         (tsubst_decl): Don't clear DECL_INITIAL for an instantiation.
7496         (regenerate_decl_from_template): Tweak accordingly.
7497         (instantiate_decl): Likewise.
7499 1998-11-16  Jason Merrill  <jason@yorick.cygnus.com>
7501         * decl.c (cplus_expand_expr_stmt): Promote warning about naked
7502         member function reference to error.
7503         * cvt.c (ocp_convert): Complain about converting an overloaded
7504         function to void.
7506         * init.c (build_offset_ref): Just return a lone static member
7507         function.
7509         * decl.c (cp_finish_decl): Only complain about real CONSTRUCTORs,
7510         not internal ones.
7512         * typeck.c (build_binary_op_nodefault): Improve error handling.
7514         * decl.c (grokfndecl): Complain about making 'main' a template.
7516         * typeck.c (string_conv_p): Don't convert from wchar_t[] to char*.
7518         * call.c (build_method_call): Handle a BIT_NOT_EXPR around a
7519         TYPE_DECL in a template.
7521 1998-11-15  Jason Merrill  <jason@yorick.cygnus.com>
7523         * typeck2.c (my_friendly_abort): Add URL in the other case, too.
7525         * decl.c (struct cp_function): Add named_label_uses.
7526         (push_cp_function_context): Save it.
7527         (pop_cp_function_context): Restore it.
7528         (define_label): Also complain about jumping into the scope of
7529         non-POD objects that don't have constructors.
7530         * tree.c (pod_type_p): New fn.
7532         * pt.c (instantiate_class_template): Clear TYPE_BEING_DEFINED sooner.
7533         * rtti.c (synthesize_tinfo_fn): Call import_export_decl here.
7534         (get_tinfo_fn): Not here.
7535         * repo.c (repo_get_id): Abort if we get called for an incomplete
7536         type.
7538 1998-11-13  Mark Mitchell  <mark@markmitchell.com>
7540         * except.c (expand_throw): Make sure first argument to
7541         __cp_push_exception is of type `void*' to avoid spurious error
7542         messages.
7544 1998-11-11  Jason Merrill  <jason@yorick.cygnus.com>
7546         * pt.c (try_one_overload): Take orig_targs again.  Only check for
7547         mismatches against them; we don't care what a previous call found.
7548         (resolve_overloaded_unification): Adjust.
7550         * search.c (lookup_field): Don't return anything for a non-type
7551         field from a dependent type.
7552         * decl.c (grokdeclarator): Resolve SCOPE_REFs of the current class
7553         in an array declarator.
7554         (start_decl): Push into the class before looking for the field.
7556 1998-11-08  Mark Mitchell  <mark@markmitchell.com>
7558         * method.c (build_overload_value): Handle REFERENCE_TYPE.
7560 1998-11-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7562         * decl.c (grokdeclarator): Allow namespace-scoped members if they
7563         are friends.
7565 1998-11-08  Jason Merrill  <jason@yorick.cygnus.com>
7567         * pt.c (tsubst_decl): Don't mess with the global value of an
7568         un-mangled DECL_ASSEMBLER_NAME.
7570 1998-11-03  Christopher Faylor  <cgf@cygnus.com>
7572         * decl.c (init_decl_processing): Remove CYGWIN conditional
7573         since CYGWIN is now able to deal with trapping signals.
7575 Sat Nov  7 15:48:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7577         * cp-tree.h: Don't include gansidecl.h.
7578         * exception.cc: Include gansidecl.h (since we don't include config.h)
7579         * g++spec.c: Don't include gansidecl.h.
7581 1998-11-06  Mark Mitchell  <mark@markmitchell.com>
7583         * cp-tree.h (lang_decl_flags): Add defined_in_class.  Decrease
7584         size of dummy.
7585         (DECL_DEFINED_IN_CLASS_P): New macro.
7586         (TEMPLATE_PARMS_FOR_INLINE): Document.
7587         (check_static_variable_definition): New function.
7588         * decl.c (cp_finish_decl): Set DECL_DEFINED_IN_CLASS_P, if
7589         appropriate.
7590         (check_static_variable_definition): Split out from ...
7591         (grokdeclarator): Here.
7592         * pt.c (check_default_tmpl_args): New function, split out from ...
7593         (push_template_decl_real): Here.
7594         (instantiate_template): Fix comment.
7596 1998-11-04  Mark Mitchell  <mark@markmitchell.com>
7598         * cp-tree.h (CP_TYPE_CONST_P): Make {0,1}-valued.
7599         (CP_TYPE_VOLATILE_P): Likewise.
7600         (CP_TYPE_RESTRICT_P): Likewise.
7602 1998-11-03  Mark Mitchell  <mark@markmitchell.com>
7604         * pt.c (tsubst): Use build_index_type, not build_index_2_type.
7606 1998-11-02  Jason Merrill  <jason@yorick.cygnus.com>
7608         * class.c (instantiate_type): Be more helpful.
7610         * decl2.c (import_export_decl): Call import_export_class.
7612         * cp-tree.h (EMPTY_CONSTRUCTOR_P): Check !TREE_HAS_CONSTRUCTOR.
7613         * decl2.c (build_expr_from_tree): Propagate TREE_HAS_CONSTRUCTOR.
7614         * pt.c (tsubst_copy): Likewise.
7616 1998-11-02  Mark Mitchell  <mark@markmitchell.com>
7618         * init.c (expand_vec_init): Fix off-by-one error.
7620 1998-11-02  Alexandre Oliva  <oliva@dcc.unicamp.br>
7622         * parse.y (apparent_template_type): New type.
7623         (named_complex_class_head_sans_basetype): Use it.
7624         * Makefile.in (CONFLICTS): One new conflict.
7625         * parse.c: Regenerated.
7627 1998-11-01  Mark Mitchell  <mark@markmitchell.com>
7629         * cp-tree.h (COMPARE_STRICT): New macro.
7630         (COMPARE_BASE): Likewise.
7631         (COMPARE_RELAXED): Likewise.
7632         (COMPARE_REDECLARATION): Likewise.
7633         (same_type_p): Likewise.
7634         (same_or_base_type_p): Likewise.
7635         * call.c (standard_conversion): Use them, in place of comptypes
7636         with numeric arguments.
7637         (reference_binding): Likewise.
7638         (convert_like): Likewise.
7639         (build_over_call): Likewise.
7640         (is_subseq): Likewise.
7641         (is_properly_derived_from): Likewise.
7642         (compare_ics): Likewise.
7643         (joust): Likewise.
7644         * class.c (delete_duplicate_fields_1): Likewise.
7645         (resolves_to_fixed_type_p): Likewise.
7646         (instantiate_type): Likewise.  Remove #if 0'd code.
7647         * decl.c (decls_match): Likewise.  Use COMPARE_REDECLARATION here.
7648         (pushdecl): Likewise.
7649         (lookup_name_real): Likewise.
7650         (grokdeclarator): Likewise.  Check for illegal array declarations.
7651         (grokparms): Likewise.
7652         (grok_op_properties): Likewise.
7653         * decl2.c (check_classfn): Likewise.
7654         * friend.c (is_friend): Likewise.
7655         (make_friend_class): Likewise.
7656         * init.c (expand_aggr_init): Likewise.
7657         (expand_vec_init): Likewise.
7658         * pt.c (is_member_template_class): Remove declaration.
7659         (is_specialization_of): Use COMPARE_* and new macros.
7660         (comp_template_parms): Likewise.
7661         (convert_nontype_argument): Likewise.
7662         (coerce_template_template_parms): Likewise.
7663         (template_args_equal): Likewise.
7664         (lookup_template_class): Likewise.
7665         (type_unification_real): Likewise.
7666         (unify): Likewise.
7667         (get_bindings_real): Likewise.
7668         * search.c (covariant_return_p): Likewise.
7669         (get_matching_virtual): Likewise.
7670         * sig.c (match_method_types): Likewise.
7671         * tree.c (vec_binfo_member): Likewise.
7672         (cp_tree_equal): Likewise.
7673         * typeck.c (common_type): Likewise.
7674         (comp_array_types): Likewise.  Get issues involving unknown array
7675         bounds right.
7676         (comptypes): Update comments.  Use new flags.
7677         (comp_target_types): Use new macros.
7678         (compparms): Likewise.
7679         (comp_target_parms): Likewise.
7680         (string_conv_p): Likewise.
7681         (build_component_ref): Likewise.
7682         (build_indirect_ref): Likewise.
7683         (build_conditional_expr): Likewise.
7684         (build_static_cast): Likewise.
7685         (build_reinterpret_cast): Likewise.
7686         (build_const_cast): Likewise.
7687         (build_modify_expr): Likewise.
7688         (convert_for_assignment): Likewise.
7689         (comp_ptr_ttypes_real): Likewise.
7690         (ptr_reasonably_similar): Likewise.
7691         (comp_ptr_ttypes_const): Likewise.
7693 1998-10-31  Jason Merrill  <jason@yorick.cygnus.com>
7695         * rtti.c (build_dynamic_cast_1): Fix cut-and-paste error.
7697 1998-10-30  Mark Mitchell  <mark@markmitchell.com>
7699         * decl2.c (delete_sanity): Pass integer_zero_node, not
7700         integer_two_node, to build_vec_delete.
7701         * init.c (build_array_eh_cleanup): Remove.
7702         (expand_vec_init_try_block): New function.
7703         (expand_vec_init_catch_clause): Likewise.
7704         (build_vec_delete_1): Don't deal with case that auto_delete_vec
7705         might be integer_two_node anymore.
7706         (expand_vec_init): Rework for initialization-correctness and
7707         exception-correctness.
7708         * typeck2.c (process_init_constructor): Make mutual exclusivity
7709         of cases more obvious.
7711 1998-10-29  Jason Merrill  <jason@yorick.cygnus.com>
7713         * decl.c (lookup_name_real): OK, only warn if not lexing.
7714         Simplify suggested fix.
7716         * cp-tree.h (IDENTIFIER_MARKED): New macro.
7717         * search.c (lookup_conversions): Use breadth_first_search.
7718         (add_conversions): Avoid adding two conversions to the same type.
7719         (breadth_first_search): Work with base binfos, rather
7720         than binfos and base indices.
7721         (get_virtual_destructor): Adjust.
7722         (tree_has_any_destructor_p): Adjust.
7723         (get_matching_virtual): Adjust.
7725         * pt.c (push_template_decl_real): Generalize check for incorrect
7726         number of template parms.
7727         (is_member_template_class): #if 0.
7729 1998-10-29  Richard Henderson  <rth@cygnus.com>
7731         * Makefile.in (cc1plus): Put CXX_OBJS, and thence @extra_cxx_objs@,
7732         last.
7734 1998-10-28  Zack Weinberg  <zack@rabi.phys.columbia.edu>
7736         * lex.c: Call check_newline from lang_init always.  After
7737         calling cpp_start_read, set yy_cur and yy_lim to read from the
7738         cpplib token buffer.
7740 1998-10-28  Jason Merrill  <jason@yorick.cygnus.com>
7742         * class.c (instantiate_type): Don't consider templates for a normal
7743         match.
7745         * class.c (finish_struct_1): Don't complain about non-copy
7746         assignment ops in union members.
7748         * class.c (build_vtable): Don't pass at_eof to import_export_vtable.
7749         (prepare_fresh_vtable): Likewise.
7750         (finish_struct_1): Don't call import_export_class.
7751         * decl2.c (finish_vtable_vardecl): Do import/export stuff.
7752         (finish_prevtable_vardecl): Lose.
7753         (finish_file): Don't call it.
7754         * pt.c (instantiate_class_template): Likewise.
7755         * cp-tree.h: Remove it.
7757         * init.c (build_delete): Reset TYPE_HAS_DESTRUCTOR here.
7758         * decl.c (finish_function): Not here.
7759         (start_function): Do set DECL_INITIAL.
7761         * pt.c (push_template_decl_real): Complain about default template
7762         args for enclosing classes.
7764         * call.c (add_function_candidate): Treat conversion functions
7765         as coming from the argument's class.
7766         * cp-tree.h (DECL_CONV_FN_P): New fn.
7767         (DECL_DESTRUCTOR_P): Also check DECL_LANGUAGE.
7768         * class.c (add_method): Use DECL_CONV_FN_P.
7769         * decl2.c (check_classfn): Likewise.
7770         * error.c (dump_function_name): Likewise.
7771         (dump_function_decl): Likewise.
7772         * pt.c (fn_type_unification): Likewise.
7773         * search.c (add_conversions): Likewise.
7775 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
7777         * lex.c (do_identifier): Also generate LOOKUP_EXPR for RESULT_DECL.
7778         * method.c (hack_identifier): Also check for using RESULT_DECL
7779         from outer context.
7781 1998-10-27  Mark Mitchell  <mark@markmitchell.com>
7783         * decl.c (grokdeclarator): Use type_quals, rather than constp,
7784         consistently.
7786 1998-10-27  Jason Merrill  <jason@yorick.cygnus.com>
7788         * call.c (standard_conversion): instantiate_type here.
7789         (reference_binding): And here.
7790         (implicit_conversion): Not here.
7791         (build_op_delete_call): No need to cons up an OVERLOAD.
7792         * cvt.c (cp_convert_to_pointer): instantiate_type here.
7793         (convert_to_reference): And here.
7794         * decl.c (grok_reference_init): Not here.
7795         (grokparms): Or here.
7796         * typeck2.c (digest_init): Or here.
7797         * typeck.c (decay_conversion): Take the address of overloaded
7798         functions, too.
7799         (require_instantiated_type): Lose.
7800         (convert_arguments): Don't handle unknown types here.
7801         (build_c_cast): Likewise.
7802         (build_binary_op): Gut.
7803         (build_conditional_expr): Don't require_instantiated_type.
7804         (build_modify_expr): Likewise.
7805         (build_static_cast): Don't instantiate_type.
7806         (build_reinterpret_cast): Likewise.
7807         (build_const_cast): Likewise.
7808         (convert_for_initialization): Likewise.
7809         (build_ptrmemfunc): Use type_unknown_p.
7810         (convert_for_assignment): Also do default_conversion on overloaded
7811         functions.  Hand them off to ocp_convert.
7813 1998-10-26  Mark Mitchell  <mark@markmitchell.com>
7815         * error.c (dump_decl): Deal with TEMPLATE_DECLs that are
7816         VAR_DECLs.  Handle vtables whose DECL_CONTEXT is not a type.
7818         * class.c (finish_struct_1): Use build_cplus_array_type to build
7819         array types.
7820         * decl.c (init_decl_processing): Likewise.
7821         * except.c (expand_end_eh_spec): Likewise.
7822         * search.c (expand_upcast_fixups): Simplify very slightly.
7824 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
7826         * decl.c (grokdeclarator): Complain about a variable using
7827         constructor syntax coming back null from start_decl.
7829         * friend.c (make_friend_class): Complain about trying to make
7830         a non-class type a friend.
7832         * decl.c (grokfndecl): Set DECL_INITIAL for a defn here.
7833         (start_function): Not here.
7835 1998-10-26  Brendan Kehoe  <brendan@cygnus.com>
7837         * decl.c (grokdeclarator): Disallow `explicit' in a friend declaration.
7839 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
7841         * typeck2.c (process_init_constructor): Only skip anonymous fields
7842         if they are bitfields.
7844         * cp-tree.def (TYPEOF_TYPE): New code.
7845         * error.c (dump_type_real): Handle it.
7846         * pt.c (tsubst): Likewise.
7847         * tree.c (search_tree): Likewise.
7848         * semantics.c (finish_typeof): New fn.
7849         * parse.y (typespec): Use it.
7850         * cp-tree.h: Declare it.
7852 1998-10-26  Manfred Hollstein  <manfred@s-direktnet.de>
7854         * cp-tree.h (FORMAT_VBASE_NAME): Make definition unconditional.
7856 1998-10-26  Jason Merrill  <jason@yorick.cygnus.com>
7858         * typeck.c (convert_arguments): Don't handle pmf references
7859         specially.
7861         * init.c (build_member_call): Don't try to convert to the base type
7862         if it's ambiguous or pedantic.
7864         * typeck2.c (check_for_new_type): Only depend on pedantic for
7865         C-style casts.
7867 1998-10-25  Mark Mitchell  <mark@markmitchell.com>
7869         * decl.c (grokdeclarator): Set DECL_NONCONVERTING_P for all
7870         non-converting constructors.
7872 1998-10-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7874         * gxxint.texi: Correct documentation for n, N, Q, and B.
7876 1998-10-23  Martin von Löwis  <loewis@informatik.hu-berlin.de>
7878         * parse.y (condition): Convert VAR_DECL from reference to indirect
7879         reference.
7881 1998-10-23  Andrew MacLeod  <amacleod@cygnus.com>
7883         * exception.cc (__cp_pop_exception): Free the original exception
7884         value, not the potentially coerced one.
7886 1998-10-23  Mark Mitchell  <mark@markmitchell.com>
7888         * Makefile.in (hash.h): Run gperf when necessary.
7890         * cp-tree.h (CP_TYPE_READONLY): Remove.
7891         (CP_TYPE_VOLATILE): Likewise.
7892         (CP_TYPE_QUALS): New macro.
7893         (CP_TYPE_CONST_P): Likewise.
7894         (CP_TYPE_VOLATILE_P): Likewise.
7895         (CP_TYPE_RESTRICT_P): Likewise.
7896         (CP_TYPE_CONST_NON_VOLATILE_P): Likewise.
7897         (cp_build_type_variant): Rename to ...
7898         (cp_build_qualified_type): New function.
7899         (c_apply_type_quals_to_decl): Declare.
7900         (SIGNATURE_POINTER_NAME_FORMAT): Modify to allow `restrict'.
7901         (SIGNATURE_REFERENCE_NAME_FORMAT): Likewise.
7902         (cp_type_qual_from_rid): New function.
7903         (compparms): Remove unused parameter.  All callers changed.
7904         (cp_type_quals): New function.
7905         (at_least_as_qualified_p): Likewise.
7906         (more_qualified_p): Likewise.
7908         * call.c (standard_conversion): Replace calls to
7909         cp_build_type_variant with cp_build_qualified_type.  Use
7910         CP_TYPE_QUALS to get qualifiers and at_least_as_qualified_p to
7911         compare them.  Use CP_TYPE_* macros to check qualifiers.
7912         (reference_binding): Likewise.
7913         (implicit_conversion): Likewise.
7914         (add_builtin_candidates): Likewise.
7915         (build_over_call): Likewise.
7916         * class.c (overrides): Compare all qualifiers, not just `const',
7917         on method declarations.
7918         * cvt.c (convert_to_reference): More CP_TYPE_QUALS conversion, etc.
7919         (convert_pointer_to_real): Likewise.
7920         (type_promotes_to): Likewise.
7921         * decl.c (check_for_uninitialized_const_var): New function.
7922         (init_decl_processing): More CP_TYPE_QUALS conversion, etc.
7923         (cp_finish_decl): Use check_for_uninitialized_const_var.
7924         (grokdeclarator): More CP_TYPE_QUALS conversion, etc.  Update to
7925         handle `restrict'.
7926         (grok_ctor_properties): Likewise.
7927         (grok_op_properties): Likewise.
7928         (start_function): Likewise.
7929         (rever_static_member_fn): Likewise.
7930         * decl2.c (grok_method_quals): Likewise.
7931         (grokfield): Likewise.
7932         * error.c (dump_readonly_or_volatile): Rename to ...
7933         (dump_qualifiers): New function.  Handle `restrict'.
7934         (dump_type_real): Use it.
7935         (dump_aggr_type): Likewise.
7936         (dump_type_prefix): Likewise.
7937         (dump_type_suffix): Likewise.
7938         (dump_function_decl): Likewise.
7939         (cv_as_string): Likewise.
7940         * gxx.gperf: Add __restrict and __restrict__.
7941         * gxxint.texi: Document `u' as used for `__restrict', and a few
7942         other previously undocumented codes.
7943         * hash.h: Regenerated.
7944         * init.c (expand_aggr_init): More CP_TYPE_QUALS conversion, etc.
7945         (build_member_call): Likewise.
7946         (build_new_1): Likewise.
7947         * lex.c (init_parse): Add entry for RID_RESTRICT.
7948         (cons_up_default_function): More CP_TYPE_QUALS conversion, etc.
7949         (cp_type_qual_from_rid): Define.
7950         * lex.h (enum rid): Add RID_RESTRICT.
7951         * method.c (process_modifiers): Deal with `restrict'.
7952         * parse.y (primary): More CP_TYPE_QUALS conversion, etc.
7953         * parse.c: Regenerated.
7954         * pt.c (convert_nontype_argument): More CP_TYPE_QUALS conversion, etc.
7955         (tsubst_aggr_type): Likewise.
7956         (tsubst): Likewise.
7957         (check_cv_quals_for_unify): Likewise.
7958         (unify): Likewise.
7959         * rtti.c (init_rtti_processing): Likewise.
7960         (build_headof): Likewise.
7961         (get_tinfo_var): Likewise.
7962         (buidl_dynamic_cast_1): Likewise.  Fix `volatile' handling.
7963         (expand_class_desc): Likewise.
7964         (expand_attr_desc): Likewise.
7965         (synthesize_tinfo_fn): Likewise.
7966         * search.c (covariant_return_p): Likewise.  Fix `volatile' handling.
7967         (get_matching_virtual): Likewise.
7968         (expand_upcast_fixups): Likewise.
7969         * sig.c (build_signature_pointer_or_reference_name): Take
7970         type_quals, not constp and volatilep.
7971         (build_signature_pointer_or_reference_type): Likewise.
7972         (match_method_types): More CP_TYPE_QUALS conversion, etc.
7973         (build_signature_pointer_constructor): Likewise.
7974         (build_signature_method_call): Likewise.
7975         * tree.c (build_cplus_array_type): Likewise.
7976         (cp_build_type_variant): Rename to ...
7977         (cp_build_qualified_type): New function.  Deal with `__restrict'.
7978         (canonical_type_variant): More CP_TYPE_QUALS conversion, etc.
7979         (build_exception_variant): Likewise.
7980         (mapcar): Likewise.
7981         * typeck.c (qualif_type): Likewise.
7982         (common_type): Likewise.
7983         (comptypes): Likewise.
7984         (comp_cv_target_types): Likewise.
7985         (at_least_as_qualified_p): Define.
7986         (more_qualified_p): Likewise.
7987         (comp_cv_qualification): More CP_TYPE_QUALS conversion, etc.
7988         (compparms): Likewise.
7989         (inline_conversion): Likewise.
7990         (string_conv_p): Likewise.
7991         (build_component_ref): Likewise.
7992         (build_indirect_ref): Likewise.
7993         (build_array_ref): Likewise.
7994         (build_unary_op): Likewise.
7995         (build_conditional_expr): Likewise.
7996         (build_static_cast): Likewise.
7997         (build_c_cast): Likewise.
7998         (build_modify_expr): Likewise.
7999         (convert_For_assignment): Likewise.
8000         (comp_ptr_ttypes_real): Likewise.
8001         (cp_type_quals): New function.
8003 1998-10-23  Jason Merrill  <jason@yorick.cygnus.com>
8005         * cp-tree.h (CP_TYPE_READONLY): New macro to handle arrays.
8006         (CP_TYPE_VOLATILE): Likewise.
8007         * decl.c (grokdeclarator): Use them.
8008         * tree.c (canonical_type_variant): Likewise.
8010 1998-10-22  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8012         * parse.y (named_class_head): Push into class while parsing the
8013         base class list.
8014         * decl2.c (push_scope, pop_scope): New functions.
8015         * cp-tree.h: Declare them.
8016         * init.c (build_new_1): Delay cleanup until end of full expression.
8018 1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
8020         * typeck.c (build_component_ref): Use of a type here is an error.
8022 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
8024         Revamp references to member functions.
8025         * method.c (hack_identifier): Call build_component_ref for a
8026         reference to a member function.
8027         * typeck.c (build_component_ref): Only return a single function
8028         if it's static.  Otherwise, return a COMPONENT_REF.
8029         (build_x_function_call): Handle a COMPONENT_REF.
8030         (build_unary_op): Handle all unknown-type things.
8031         * decl2.c (arg_assoc): Handle COMPONENT_REF.
8032         * class.c (instantiate_type): Complain if the function we get is a
8033         nonstatic member function.  Remove code for finding "compatible"
8034         functions.
8035         * pt.c (tsubst_copy): Handle NOP_EXPR.
8036         * tree.c (build_dummy_object): New fn.
8037         (maybe_dummy_object): New fn.
8038         (is_dummy_object): New fn.
8039         * cp-tree.h: Declare them.
8040         * cvt.c (cp_convert_to_pointer): Use maybe_dummy_object.
8041         * error.c (dump_expr, case OFFSET_REF): Use is_dummy_object.
8042         * init.c (build_member_call): Use maybe_dummy_object and
8043         is_dummy_object.
8044         (build_offset_ref): Use maybe_dummy_object.
8045         (resolve_offset_ref): Use is_dummy_object.
8046         * typeck.c (build_x_function_call): Call build_dummy_object.
8047         (unary_complex_lvalue): Call is_dummy_object.
8049         * typeck.c (build_component_addr): Make sure field is a field.
8051         * call.c (build_new_op): Delete obsolete code.
8053         * pt.c (tsubst, TEMPLATE*PARM*): Abort if we don't have any args.
8055 1998-10-18  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8057         * decl2.c (validate_nonmember_using_decl): Fix using-directives of
8058         std if std is ignored.
8060 1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
8062         * decl.c (grokvardecl): Fix thinko.
8064         * decl.c (grokdeclarator): Embedded attrs bind to the right,
8065         not the left.
8067         * parse.y (fn.def2): Fix 'attrs' format.
8069 1998-10-18  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
8071         * Makefile.in (CONFLICTS): Update.
8072         * parse.y (expr_or_declarator_intern): New rule.
8073         (expr_or_declarator, direct_notype_declarator, primary,
8074         functional_cast): Use it.
8075         (notype_declarator_intern): New rule.
8076         (notype_declarator, complex_notype_declarator): Use it.
8078 1998-10-17  Jason Merrill  <jason@yorick.cygnus.com>
8080         * decl.c (grokfndecl): Set DECL_CONTEXT to namespace if appropriate.
8081         (grokvardecl): Likewise.
8083 Sat Oct 17 23:27:20 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8085         * class.c (make_method_vec): Cast 1st argument of `bzero' to (PTR).
8086         (add_method): Likewise for arguments 1 & 2 of `bcopy'.
8088         * decl.c (signal_catch): Mark with ATTRIBUTE_NORETURN.
8090         * pt.c (process_partial_specialization): Cast 1st argument of
8091         `bzero' to (PTR).
8093         * tree.c (build_base_fields): Cast `base_align' to (int) when
8094         comparing against one.
8096 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
8098         * decl.c (lookup_name_real): Handle template parameters for member
8099         templates where said parameters have the same name as the
8100         surrounding class.
8102         * decl.c (expand_static_init): Build cleanups before entering the
8103         anonymous function used to do them to avoid access-checking
8104         confusion.
8106         * decl.c (grokfndecl): Add back call to cplus_decl_attributes
8107         accidentally removed by previous change, and make DECL_RTL here.
8108         * class.c (add_method): Don't make DECL_RTL here.
8110         * pt.c (for_each_template_parm): Don't examine uninstantiated
8111         default arguments.
8113 1998-10-16  Dave Brolley  <brolley@cygnus.com>
8115         * lex.c (real_yylex): Fix unaligned access of wchar_t.
8117 1998-10-16  Mark Mitchell  <mark@markmitchell.com>
8119         * class.c (add_method): Fix documentation to reflect previous
8120         changes.  Check for duplicate method declarations here.
8121         * decl.c (decls_match): Handle FUNCTION_DECL vs TEMPLATE_DECL
8122         correctly; such things never match.
8123         (grokfndecl): Don't look for duplicate methods here.
8124         * decl2.c (check_classfn): Don't assume names are mangled.
8125         Don't add bogus member function declarations to a class before the
8126         class type is complete.
8127         (grokfield): Reformat error message.
8128         * method.c (set_mangled_name_for_decl): Don't mangle names while
8129         processing_template_decl.
8131 1998-10-16  Jason Merrill  <jason@yorick.cygnus.com>
8133         * typeck.c (build_indirect_ref): Complain about a pointer to data
8134         member, too.
8135         * typeck2.c (build_m_component_ref): Don't indirect a pointer to
8136         data member.
8137         * init.c (resolve_offset_ref): Don't undo the above.
8139         * cp-tree.h (DECL_C_BIT_FIELD, SET_DECL_C_BIT_FIELD): New macros.
8140         (struct lang_decl_flags): Add `bitfield'.
8141         * class.c (finish_struct_1): Use DECL_C_BIT_FIELD instead of
8142         DECL_BIT_FIELD.
8143         * decl2.c (grokbitfield, grok_alignof): Likewise.
8144         * init.c (build_offset_ref): Likewise.
8145         * typeck.c (build_component_addr, expr_sizeof): Likewise.
8146         * cvt.c (build_up_reference): Don't crash if taking the address
8147         returns error_mark_node.
8149         * decl.c (grokfndecl): Also check ctype when checking for ::main().
8151 1998-10-15  Jason Merrill  <jason@yorick.cygnus.com>
8153         * decl.c (grokfndecl): ::main and __builtin_* get C linkage.
8154         Do mangling here.
8155         (grokdeclarator): Instead of here.
8156         * friend.c (do_friend): Lose special handling of ::main and
8157         __builtin_*.
8158         * cp-tree.h (DECL_MAIN_P): Check for C linkage.
8160         * spew.c (yylex): Clear looking_for_typename if we got
8161         'enum { ... };'.
8163 1998-10-15  Mark Mitchell  <mark@markmitchell.com>
8165         * class.c (maybe_warn_about_overly_private_class): Improve error
8166         messages for class with only private constructors.
8168         * cp-tree.def (TYPENAME_TYPE): Add to documentation.
8169         * cp-tree.h (TYPENAME_TYPE_FULLNAME): Document.
8170         (build_typename_type): New function.
8171         * decl.c (build_typename_type): Broken out from ...
8172         (make_typename_type): Use it.
8173         * search.c (lookup_field): Likewise.
8175 1998-10-14  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
8177         * pt.c (convert_nontype_argument): Check against type_referred_to.
8178         * decl.c (grokvardecl): Check for declarator name before building
8179         DECL_ASSEMBLER_NAME.
8181 1998-10-14  Mark Mitchell  <mark@markmitchell.com>
8183         * pt.c (lookup_template_class): Add comment.
8184         (instantiate_class_template): Don't mark the _TYPE node for
8185         member class templates as an instantiation.
8187 1998-10-14  Jason Merrill  <jason@yorick.cygnus.com>
8189         * decl.c (grokfndecl): Fix my thinko.
8191 1998-10-13  Jason Merrill  <jason@yorick.cygnus.com>
8193         * tinfo2.cc (fast_compare): Remove.
8194         (before): Just use strcmp.
8195         * tinfo.cc (operator==): Just use strcmp.
8197 1998-10-13  Klaus-Georg Adams  <Klaus-Georg.Adams@chemie.uni-karlsruhe.de>
8199         * decl.c (grokfndecl): Don't check for linkage in `extern "C"'
8200         declarations.
8202 1998-10-13  Mark Mitchell  <mark@markmitchell.com>
8204         * cp-tree.h (specializations_of_same_template_p): Remove.
8205         * search.c (get_template_base): Don't use it.
8206         (get_template_base_recursive): Likewise.
8207         * pt.c (specializations_of_same_template_p): Remove.
8208         (unify): Don't use it.
8209         (lookup_template_class): Find the correct parent when setting
8210         CLASSTYPE_TI_TEMPLATE.
8212 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
8214         * tinfo.cc (operator==): Always compare names.
8216 1998-10-12  Herman ten Brugge  <Haj.Ten.Brugge@net.HCC.nl>
8218         * decl.c (start_function): Fix cut-and-paste error.
8220 1998-10-12  Jason Merrill  <jason@yorick.cygnus.com>
8222         * inc/typeinfo: Add #pragma interface.
8223         (operator!=): Just call operator==.
8224         * tinfo.cc: Add #pragma implementation.
8225         (operator==): Move from inc/typeinfo and tinfo2.cc.
8226         Check __COMMON_UNRELIABLE instead of _WIN32.
8228         * typeck2.c (my_friendly_abort): Add URL.
8230 1998-10-12  Alastair J. Houghton  <ajh8@doc.ic.ac.uk>
8232         * decl.c (start_method): Added extra parameter for attributes.
8233         * cp-tree.h (start_method): Update prototype.
8234         * parse.y (fn.def2): Update start_method parameter list.
8236 1998-10-11  Mark Mitchell  <mark@markmitchell.com>
8238         * cp-tree.h (specializations_of_same_template_p): Declare.
8239         * pt.c (specializations_of_same_template_p): New function.
8240         (unify): Use it.
8241         * search.c (get_template_base): Use it.
8242         (get_template_base_recursive): Likewise.
8244 1998-10-10  Manfred Hollstein  <manfred@s-direktnet.de>
8246         * decl2.c (start_objects): Add new variable `joiner' and
8247         initialize it properly.
8249 1998-10-09  Mark Mitchell  <mark@markmitchell.com>
8251         * search.c (expand_upcast_fixups): Tweak to match 1998-10-07
8252         change to vtable types.
8254         * cvt.c (ocp_convert): Avoid infinite recursion caused by
8255         1998-10-03 change.
8257 1998-10-08  Jason Merrill  <jason@yorick.cygnus.com>
8259         * pt.c (resolve_overloaded_unification): New fn.
8260         (try_one_overload): Likewise.
8261         (unify): Don't fail on unknown type.
8262         (type_unification_real): Likewise.  Use resolve_overloaded_unification
8263         to handle an overloaded argument.
8264         (template_args_equal): Split out...
8265         (comp_template_args): From here.
8266         (determine_specialization): Also allow a template with more
8267         parms than were explicitly specified.
8268         * cp-tree.h: Add template_args_equal.
8269         * call.c (resolve_args): Remove TEMPLATE_ID_EXPR code.
8271 Thu Oct  8 15:58:30 1998  Anthony Green  <green@cygnus.com>
8273         * semantics.c (finish_asm_stmt): Revert my 1998-09-28
8274         change.
8276 Thu Oct  8 06:00:19 1998  Jeffrey A Law  (law@cygnus.com)
8278         * typeck.c (unsigned_type): Only return TItype nodes when
8279         HOST_BITS_PER_WIDE_INT is >= 64 bits.
8280         (signed_type): Likewise.
8281         * decl.c (intTI_type_node, unsigned_intTI_type_node): Only declare
8282         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
8283         (init_decl_processing): Only create TItype nodes when
8284         HOST_BITS_PER_WIDE_INT is >= 64 bits.
8285         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Only declare
8286         when HOST_BITS_PER_WIDE_INT is >= 64 bits.
8288 Wed Oct  7 12:32:44 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8290         * Makefile.in (hash.h): Add -L KR-C -F ', 0, 0' flags to gperf.
8291         (gxx.gperf): Update comments describing invocation flags.
8292         (hash.h): Regenerate using gperf 2.7.1 (19981006 egcs).
8294 1998-10-07  Mark Mitchell  <mark@markmitchell.com>
8296         * class.c (finish_struct_1): Add commentary on previous change.
8298         * cp-tree.h (vtbl_ptr_type_node): New variable.
8299         * class.c (build_vtbl_ref): Don't indirect through the vptr; it's
8300         already of the right type.
8301         (finish_struct_1): Make the vptr be of type vtbl_ptr_type_node.
8302         Simplify code to grow vtable.
8303         * decl.c (vtbl_ptr_type_node): Define.
8304         (init_decl_processing): Initialize it.
8306 1998-10-06  Mark Mitchell  <mark@markmitchell.com>
8308         * cp-tree.def (PTRMEM_CST): New tree node.
8309         * cp-tree.h (ptrmem_cst): New type.
8310         (lang_type): Remove local_typedecls.
8311         (dummy): Increase to 12 bits from 11.
8312         (CLASSTYPE_LOCAL_TYPEDECLS): Remove.
8313         (PTRMEM_CST_CLASS): New macro.
8314         (PTRMEM_CST_MEMBER): Likewise.
8315         (current_access_specifier): New variable.
8316         (current_class_type): Remove duplicate declaration.
8317         (finish_struct): Change prototype.
8318         (unreverse_member_declarations): New function.
8319         (pushdecl_class_level): Change prototype.
8320         (grok_enum_decls): Remove.
8321         (fixup_anonymous_union): New function.
8322         (grok_x_components): Change prototype.
8323         (tsubst_chain): Remove.
8324         (finish_member_template_decl): Likewise.
8325         (check_explicit_specialization): Fix indentation.
8326         (finish_class_definition): Change prototype.
8327         (finish_member_class_template): Likewise.
8328         (finish_member_declaration): New function.
8329         (check_multiple_declarators): Likewise.
8330         * class.c (class_stack_node_t): New type.
8331         (current_class_base): Remove.
8332         (current_class_stack): Change type.
8333         (current_access_specifier): New variable.
8334         (grow_method): Remove.
8335         (check_member_decl_is_same_in_complete_scope): Break out from
8336         finish_struct.
8337         (make_method_vec): New function.
8338         (free_method_vec): Likewise.
8339         (add_implicitly_declared_members): Break out from finish_struct_1.
8340         (free_method_vecs): New variable.
8341         (add_method): Rework for direct use from parser.
8342         (handle_using_decl): Watch for NULL_TREE while iterating through
8343         CLASSTYPE_METHOD_VEC.
8344         (finish_struct_methods): Don't build CLASSTYPE_METHOD_VEC here;
8345         just do some error-checking.
8346         (warn_hidden): Change iteration through CLASSTYPE_METHOD_VEC.
8347         (finish_struct_1): Simplify.  Use add_implicitly_declared_members.
8348         (finish_struct): Change prototype.  Simplify; fields and methods
8349         are already set up at this point.
8350         (init_class_processing): Set up current_class_stack.
8351         (pushclass): Save current_access_specifier.
8352         (popclass): Restore it.
8353         (currently_open_class): Simplify.
8354         (build_self_reference): Remove use of CLASSTYPE_LOCAL_TYPEDECLS.
8355         * decl.c (saved_scope): Add access_specifier.
8356         (maybe_push_to_top_level): Save it.
8357         (pop_from_top_level): Restore it.
8358         (maybe_process_template_type_declaration): Use
8359         finish_member_declaration.
8360         (pushtag): Likewise.
8361         (pushdecl_class_level): Don't return a value.
8362         (fixup_anonymous_union): Break out from grok_x_components.
8363         (shadow_tag): Use it.
8364         (xref_tag): Complain about using an elaborated type specifier to
8365         reference a template type parameter or typedef name.
8366         (xref_basetypes): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
8367         (current_local_enum): Remove.
8368         (build_enumerator): Call finish_member_declaration.
8369         (grok_enum_decls): Remove.
8370         * decl2.c (grok_x_components): Simplify.
8371         (check_classfn): Change iteration through CLASSTYPE_METHOD_VEC.
8372         (grokfield): Don't set CLASSTYPE_LOCAL_TYPEDECLS.
8373         (merge_functions): Add to comment.
8374         (arg_assoc_type): Prototype.
8375         (arg_assoc): Pass as many arguments as there are parameters.
8376         * error.c (dump_expr): Handle PTRMEM_CST.  Improve handling of
8377         OFFSET_REF.
8378         * expr.c (cpls_expand_expr): Remove dead code.  Handle
8379         PTRMEM_CST.
8380         * friend.c (do_friend): Lookup friends when in nested classes.
8381         Change comments.
8382         * init.c (build_offset_ref): Do lookup even for classes that are
8383         only partially defined.
8384         (decl_constant_value): Remove dead code.
8385         * method.c (build_overload_value): Remove hack where by TYPE was
8386         not a TYPE.  Handle PTRMEM_CST.
8387         (build_template_parm_names): Don't pass a PARM_DECL where a TYPE
8388         should go.
8389         * parse.y (components, notype_components, component_decl,
8390         component_decl_1, component_declarator, component_declarator0):
8391         Now all are itype rather than ttype.  Rework to add members to
8392         classes on the fly.
8393         (typesqpecqual_reserved): Use check_multiple_declarators.
8394         (structsp): Update class to finish_class_definition.
8395         (do_xref_defn): Unsplit into named_class_head.
8396         (access_specifier): Set current_access_specifier.
8397         * pt.c (set_current_access_from_decl): New function.
8398         (finish_member_template_decl): Don't take the parameters.
8399         (comp_template_args): Make more robust.
8400         (lookup_template_class): Don't use current_local_enum.
8401         (for_each_template_parm): Handle PTRMEM_CST.
8402         (instantiate_class_template): Use set_current_access_from_decl,
8403         finish_member_declaration and unreverse_member_declarations.  Set
8404         lineno/input_filename before generating implicit member functions.
8405         (type_unification_real): Don't assume back-unification happens
8406         only for the last argument.
8407         (regenerate_decl_from_template): Call pushclass a bit earlier.
8408         (tsubst_chain): Remove.
8409         (tsubst_enum): Use set_current_access_from_decl.
8410         (set_mangled_name_for_template_decl): Fix indentation.
8411         * search.c (lookup_fnfields_1): Change iteration through
8412         CLASSTYPE_METHOD_VEC.
8413         (dfs_pushdecls): Likewise.
8414         (dfs_compress_decls): Likewise.
8415         (add_conversions): Likewise.
8416         * semantics.c (finish_class_definition): Don't take components.
8417         Change call to finish_struct.
8418         (finish_member_declaration): New function.
8419         (finish_member_class_template): Don't take template parameters.
8420         Change call to grok_x_components.  Call finish_member_template_decl.
8421         (check_multiple_declarators): New function.
8422         * sig.c (append_signature_fields): Work from the TYPE_METHODS, not
8423         a passed in fieldlist.
8424         * tree.c (search_tree): Handle PTRMEM_CST.
8425         (mapcar): Likewise.
8426         * typeck.c (unary_complex_lvalue): Build PTRMEM_CSTs, not
8427         INTEGER_CSTs, for pointer-to-data members.
8429         * call.c (resolve_args): Resolve template specializations, if
8430         possible.
8432 Tue Oct  6 07:57:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8434         * Makefile.in (spew.o): Depend on toplev.h.
8436         * call.c (compare_ics): Initialize variables `deref_from_type2',
8437         `deref_to_type1' and `deref_to_type2'.
8439         * except.c (get_eh_type): Hide prototype and definition.
8440         (process_start_catch_block_old): Remove unused static prototype.
8442         * pt.c (tsubst_decl): Initialize variable `argvec'.
8444         * spew.c: Include toplev.h.
8446 1998-10-05  Jason Merrill  <jason@yorick.cygnus.com>
8448         * pt.c (instantiate_decl): Do save and restore file position.
8450 1998-10-05  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8452         * method.c (build_decl_overload_real): Clear
8453         numeric_output_need_bar after __.
8455 1998-10-05  Nathan Sidwell  <nathan@acm.org>
8457         * call.c (build_new_method_call): Issue 'incomplete type' error,
8458         if class is not defined.
8460 1998-10-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8462         * call.c (build_object_call): Move declaration of variable
8463         `fn' into the scope where it is used.  Don't access variable
8464         `fn' when it is uninitialized, instead use `fns'.
8466 1998-10-04  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
8468         * errfn.c (cp_thing): Print buf as a string not as a printf format
8469         to avoid problems with the operator%.  Consequently, `%%' sequences
8470         in format are copied as `%' in buf.
8472 1998-10-04  Jason Merrill  <jason@yorick.cygnus.com>
8474         * pt.c (pop_tinst_level): Call extract_interface_info.
8475         (instantiate_decl): Don't save and restore file position.
8477         * decl.c (cp_finish_decl): Make statics in extern inlines and
8478         templates common, if possible and the target doesn't support weak
8479         symbols.
8481         * decl.c (grokdeclarator): Remove redundant calls to
8482         build_type_variant and some duplicated code.
8483         * sig.c (build_signature_reference_type): Only take the type parm.
8484         (build_signature_pointer_type): Likewise.
8485         * tree.c (build_cplus_method_type): Adjust.
8486         * cp-tree.h: Update.
8488 1998-10-04  Mark Mitchell  <mark@markmitchell.com>
8490         * call.c (build_over_call): Make pedwarns about dropped qualifiers
8491         into full-fledged errors.
8492         * cvt.c (convert_to_reference): Likewise.
8493         * typeck.c (convert_for_assignment): Likewise.
8495         * search.c (expand_upcast_vtables): In addition to unsetting
8496         TREE_READONLY, remove top-level const type qualifier.
8498 1998-10-03  Mark Mitchell  <mark@markmitchell.com>
8500         * class.c (current_class_ptr, current_class_ref): Clarify
8501         documentation.
8502         * cvt.c (ocp_convert): Don't expect fold to remove all trivial
8503         NOP type conversions.
8504         * decl.c (decls_match): Use comptypes directly; ignore
8505         qualifiers on the DECL.
8506         (duplicate_decls): Remove qualifier checks on DECL.
8507         (grokdeclarator): Make the type built up include top-level
8508         qualifiers.
8509         * decl2.c (do_dtors): Fix spelling error.
8510         * error.c (dump_simple_decl): Don't look at qualifiers on the decl
8511         when printing type information.
8512         * init.c (build_new_1): Add documentation.  Deal with the fact
8513         that type of allocated memory now contains qualifiers.
8514         * lex.c (is_global): Improve error-recovery.
8515         * sig.c (build_member_function_pointer): Don't cast away const
8516         on fields of sigtable_entry_type.
8517         * tree.c (lvalue_type): Don't look at top-level qualifiers on
8518         expressions.
8519         * typeck.c (decay_conversion): Likewise.
8520         (build_component_ref): Make sure the type of the COMPONENT_REF
8521         contains top-level qualifiers, as appropriate.  Improve
8522         error-handling.
8523         (build_indirect_ref): Simplify.  Don't strip top-level qualifiers.
8524         (build_array_ref): Likewise.
8525         (build_unary_op): Improve error-recovery.
8526         (unary_complex_lvalue): Make taking the address a bound member
8527         function an error, not a sorry.
8528         (build_conditional_expr): Look at the type qualifiers, not the
8529         qualifiers on the expression itself.
8531 1998-10-03  Jason Merrill  <jason@yorick.cygnus.com>
8533         * decl2.c (merge_functions): Remove duplicates.
8535         * decl2.c: Add -f{no-,}implicit-inline-templates.
8536         (import_export_decl): Check it.
8538         * decl.c (lookup_name_real): Template parms also take precedence
8539         over implicit typename.  Only warn if yylex.
8541         * typeck.c (build_conditional_expr): Only fold if ifexp is an
8542         INTEGER_CST.
8544         * decl2.c (finish_vtable_vardecl): Check DECL_INTERFACE_KNOWN
8545         instead of linkage.
8547 1998-10-01  Jason Merrill  <jason@yorick.cygnus.com>
8549         * cp-tree.h (FORMAT_VBASE_NAME): New macro.
8550         * class.c (build_vbase_pointer): Use it.
8551         * rtti.c (expand_class_desc): Likewise.
8552         * tree.c (build_vbase_pointer_fields): Likewise.
8554 Thu Oct  1 10:43:45 1998  Nick Clifton  <nickc@cygnus.com>
8556         * decl.c (start_decl): Add invocation of
8557         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
8558         (start_function): Add invocation of
8559         SET_DEFAULT_DECL_ATTRIBUTES, if defined.
8561         * lex.c: Replace occurrences of HANDLE_SYSV_PRAGMA with
8562         HANDLE_GENERIC_PRAGMAS.
8564 1998-09-28  Anthony Green  <green@cygnus.com>
8566         * semantics.c (finish_asm_stmt): Always permit volatile asms.
8568 1998-09-28  Mark Mitchell  <mark@markmitchell.com>
8570         * decl.c (grokdeclarator): Tighten checks for invalid
8571         destructors.  Improve error-messages and error-recovery.
8572         * decl2.c (check_classfn): Don't assume that mangled destructor
8573         names contain type information.
8575 1998-09-25  Jason Merrill  <jason@yorick.cygnus.com>
8577         * search.c (get_base_distance): Remove assert.
8579         * decl2.c (build_anon_union_vars): Don't process a field with no
8580         name.
8581         (finish_anon_union): Also complain about local anon unions with no
8582         members.
8584 1998-09-25  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8586         * decl.c (lookup_namespace_name): If the name is a namespace,
8587         return it immediately.
8589 Fri Sep 25 11:45:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8591         * cp-tree.h (define_case_label): Remove unused parameter.
8592         (check_java_method): Likewise.
8593         (grokclassfn): Likewise.
8594         (expand_aggr_init): Likewise.
8595         (build_x_delete): Likewise.
8596         (maybe_end_member_template_processing): Likewise.
8597         (unshare_base_binfos): Add prototype.
8598         (string_conv_p): Likewise.
8599         (my_friendly_abort): Mark with ATTRIBUTE_NORETURN.
8601         * cvt.c (build_up_reference): Remove unused parameter
8602         `checkconst', all callers changed.
8603         (build_type_conversion): Mark parameter `code' with
8604         ATTRIBUTE_UNUSED.
8605         (build_expr_type_conversion): Initialize variable `conv'.
8607         * decl.c (push_namespace): Initialize variable `d'.
8608         (define_case_label): Remove unused parameter `decl', all callers
8609         changed.
8611         * decl2.c (lang_decode_option): If !USE_CPPLIB, mark parameter
8612         `argc' with ATTRIBUTE_UNUSED.
8613         (grokclassfn): Remove unused parameter `cname', all callers
8614         changed.
8615         (check_java_method): Likewise for parameter `ctype'.
8616         (copy_assignment_arg_p): Mark parameter `virtualp' with
8617         ATTRIBUTE_UNUSED.
8618         (finish_prevtable_vardecl): Likewise for parameter `prev'.
8620         * expr.c (extract_init): Likewise for parameters `decl' and `init'.
8622         * init.c (expand_aggr_init_1): Remove unused parameter
8623         `alias_this', all callers changed.
8624         (expand_aggr_init): Likewise.
8625         (expand_default_init): Likewise.
8626         (build_new_1): Initialize variable `susp'.
8627         (build_x_delete): Remove unused parameter `type', all callers
8628         changed.
8630         * lex.c (set_typedecl_interface_info): Mark parameter `prev' with
8631         ATTRIBUTE_UNUSED.
8632         (readescape): Use (unsigned) value in shift.
8633         (real_yylex): Likewise.  Likewise.  Also cast `sizeof' to int when
8634         comparing to a signed quantity.
8636         * pt.c (maybe_end_member_template_processing): Remove unused
8637         parameter `decl', all callers changed.
8638         (check_explicit_specialization): Add braces around empty body in
8639         an else-statement.
8640         (current_template_args): Initialize variable `args'.
8641         (lookup_template_class): Likewise for variable `prev_local_enum'.
8642         (tsubst_decl): Likewise for variable `r'.
8643         (set_mangled_name_for_template_decl): Initialize variable
8644         `context'.
8646         * spew.c (scan_tokens): Change type of parameter `n' to unsigned.
8647         Likewise for variable `i'.
8648         (yylex): Initialize variable `trrr'.
8650         * typeck.c (compparms): Mark variable `strict' with
8651         ATTRIBUTE_UNUSED.
8653         * xref.c (simplify_type): Cast argument of ctype function to
8654         `unsigned char'.
8656 1998-09-24  Mark Mitchell  <mark@markmitchell.com>
8658         * cp-tree.h (language_lvalue_valid): Remove.
8659         * decl.c (grokdeclarator): Don't disallow references to functions.
8660         * tree.c (lvalue_p_1): New function, combining duplicated
8661         code from ...
8662         (lvalue_p): Use it.
8663         (real_lvalue_p): Likewise.
8664         * typeck.c (language_lvalue_valid): Remove.
8665         (build_modify_expr): Treat FUNCTION_TYPEs as readonly, even though
8666         they don't have TREE_READONLY set.
8667         * typeck2.c (readonly_error): Add case for FUNCTION_DECLs.
8669 1998-09-24  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8671         * spew.c (yylex): Give diagnostic.
8672         * hash.h (is_reserved_word): Add export.
8673         * gxx.gperf: Likewise.
8674         * lex.h (rid): Add RID_EXPORT.
8675         * lex.c (init_parse): Likewise.
8677 Tue Sep 22 21:01:19 1998  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
8679         * friend.c (do_friend): Make warning a full sentence.
8681 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
8683         * parse.y (component_decl_list): Improve error-recovery.
8685 1998-09-22  Benjamin Kosnik  <bkoz@loony.cygnus.com>
8687         * decl.c (make_typename_type): Move error to point where name
8688         variable can be used by dump_type.
8690 1998-09-22  Mark Mitchell  <mark@markmitchell.com>
8692         * decl.c (grokfndecl): Improve error-recovery.
8693         * decl2.c (grokfield): Likewise.
8694         * pt.c (finish_member_template_decl): Likewise.
8696 1998-09-20  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8698         * method.c (hack_identifier): Finding multiple members is always
8699         an error.
8701 1998-09-21  Per Bothner  <bothner@cygnus.com>
8703         * Make-lang.in (c++-filt):  Link libiberty.a after cxxmain.o.
8705 Mon Sep 21 01:53:05 1998  Felix Lee  <flee@cygnus.com>
8707         * lex.c (init_lex): Use getenv ("LANG"), not GET_ENVIRONMENT ().
8709 1998-09-20  Mark Mitchell  <mark@markmitchell.com>
8711         * class.c (maybe_warn_about_overly_private_class): Reformat.
8713 1998-09-17  Andrew MacLeod  <amacleod@cygnus.com>
8715         * exception.cc (__cplus_type_matcher): Realign some code.
8717 1998-09-16  Mark Mitchell  <mark@markmitchell.com>
8719         * Make-lang.in (tinfo.o): Use CXXFLAGS when compiling.
8720         (tinfo2.o): Likewise.
8721         (exception.o): Likewise.
8722         (new.o): Likewise.
8723         (opnew.o): Likewise.
8724         (opnewnt.o): Likewise.
8725         (opvnew.o): Likewise.
8726         (opvnewnt.o): Likewise.
8727         (opdel.o): Likewise.
8728         (opdelnt.o): Likewise.
8729         (opvdel.o): Likewise.
8730         (opvdelnt.o): Likewise.
8732 1998-09-16  Richard Henderson  <rth@cygnus.com>
8734         * decl.c (init_decl_processing): Kill __builtin_fp and __builtin_sp.
8736 1998-09-15  Alexandre Oliva  <oliva@dcc.unicamp.br>
8738         * call.c (build_field_call): Handle static data members too.
8740         * typeck.c (comptypes): When comparing pointer types, check
8741         whether referred types match even in strictest modes.
8743 1998-09-15  Mark Mitchell  <mark@markmitchell.com>
8745         * cp-tree.h: Revert previous change.
8746         (finish_struct_methods): Remove declaration.
8747         * class.c: Revert previous change.
8748         (maybe_warn_about_overly_private_class): New function.
8749         (finish_struct_methods): Declare here, and make static.  Remove
8750         unnecessary parameters.  Tidy slightly.  Use
8751         maybe_warn_about_overly_private_class.
8752         (finish_struct_1): Adjust.  Remove check for private constructors,
8753         now done elsewhere.
8754         (finish_struct): Adjust.
8756 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
8758         * except.c (expand_start_catch_block): No need to check for new
8759         exception model.
8760         (process_start_catch_block_old): Deleted.
8761         (process_start_catch_block): Add call to start_decl_1().
8762         (expand_end_catch_block): Add call to end_catch_handler().
8763         * exception.cc (__cplus_type_matcher): Only check the exception
8764         language if there is an exception table.
8766 1998-09-15  Andrew MacLeod  <amacleod@cygnus.com>
8768         * search.c (expand_indirect_vtbls_init): Mark temporary stack slots
8769         as used to prevent conflicts with virtual function tables.
8771 1998-09-14  Mark Mitchell  <mark@markmitchell.com>
8773         * cp-tree.h (lang_type): Add has_non_private_static_mem_fn.
8774         (CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN): New macro, to access it.
8775         * class.c (maybe_class_too_private_p): New function.
8776         (finish_struct_methods): Use it.
8777         (finish_struct_1): Likewise.
8778         (finish_struct): Set CLASSTYPE_HAS_NON_PRIVATE_STATIC_MEM_FN if
8779         appropriate.
8781         * pt.c (check_specialization_scope): Fix spelling error.
8782         (check_explicit_specialization): Remove code to handle explicit
8783         specializations in class scope; they are now correctly diagnosed
8784         as errors.
8786 1998-09-10  Mark Mitchell  <mark@markmitchell.com>
8788         * decl.c (pushdecl): Don't copy types if the
8789         DECL_ABSTRACT_ORIGIN of the new decl matches the TYPE_NAME of the
8790         type.
8792 1998-09-09  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
8794         * class.c (get_enclosing_class): New function.
8795         (is_base_of_enclosing_class): Likewise.
8796         * cp-tree.h (get_enclosing_class): Declare.
8797         (is_base_of_enclosing_class): Likewise.
8798         * pt.c (coerce_template_parms): Use them.
8800 1998-09-09  Jason Merrill  <jason@yorick.cygnus.com>
8802         * g++spec.c (lang_specific_driver): Check whether MATH_LIBRARY is
8803         null to decide whether to use it.
8805         * error.c (dump_type_real): Handle NAMESPACE_DECL.
8806         * parse.y (base_class.1): Avoid crash on error.
8808 1998-09-08  Martin von Löwis  <loewis@informatik.hu-berlin.de>
8810         * decl.c (make_typename_type): If context is a namespace, the code
8811         is in error.
8813 1998-09-08  Mumit Khan  <khan@xraylith.wisc.edu>
8815         * parse.y (nomods_initdcl0): Set up the parser stack correctly.
8817 1998-09-08  Mark Mitchell  <mark@markmitchell.com>
8819         * cp-tree.h (anonymous_namespace_name): Declare.
8820         * decl.c: Define it.
8821         (push_namespace): Use anonymous_namespace_name, rather than local
8822         static anon_name.
8823         * error.c (dump_decl): If a namespace is named
8824         anonymous_namespace_name, call it {anonymous}.
8826         * decl.c (grokparms): Distinguish between references and pointers
8827         in error message.
8829 1998-09-08  Richard Henderson  <rth@cygnus.com>
8830             Mark Mitchell  <mark@markmitchell.com>
8832         * pt.c (process_partial_specialization): Consistently allocate
8833         and zero tpd.parms based on ntparms.  Use tpd2.parms, not
8834         tpd.parms, where appropriate.
8836 Sun Sep  6 00:00:51 1998  Jeffrey A Law  (law@cygnus.com)
8838         * Makefile.in (INCLUDES): Update after recent toplevel gcc
8839         reorganizations.
8841 1998-09-05  Mark Mitchell  <mark@markmitchell.com>
8843         * cp-tree.h (TI_PENDING_SPECIALIZATION_FLAG): Remove.
8844         * class.c (finish_struct): Remove hackery to deal with explicit
8845         specializations in class scope.
8846         * decl.c (grokfndecl): Improve error-recovery.
8847         * decl2.c (grokfield): Likewise.
8848         * pt.c (check_specialization_scope): New function.
8849         (begin_specialization): Call it.
8850         (process_partial_specialization): New function, split out from
8851         push_template_decl.  Check partial specializations more
8852         stringently.
8853         (push_template_decl): Call it.
8854         (check_explicit_specialization): Don't attempt to handle explicit
8855         specializations in class scope.
8856         (template_parm_data): Document.  Add current_arg and
8857         arg_uses_template_parms.
8858         (mark_template_parm): Set it.
8859         (tsubst_arg_types): Remove unused variable.
8860         * semantics.c (begin_class_definition): Tweak.
8862 1998-09-04  Mark Mitchell  <mark@markmitchell.com>
8864         * inc/typeinfo (type_info::type_info(const char*)): Make
8865         `explicit'.
8867         * cp-tree.h (hash_tree_cons_simple): New macro.
8868         * pt.c (tsubst_arg_types): New function.  Use hash_tree_cons.
8869         (coerce_template_parms): Use make_temp_vec, instead of
8870         make_tree_vec.  Document this behavior.
8871         (lookup_template_class): Likewise.
8872         (tsubst, cases METHOD_TYPE, FUNCTION_TYPE): Use tsubst_arg_types.
8873         Remove dead code (and add assertion to check its deadness).  Fix
8874         bug w.r.t. exception specifications.
8876 1998-09-03  Jason Merrill  <jason@yorick.cygnus.com>
8878         * decl2.c (import_export_vtable): Always make artificials comdat.
8879         (import_export_decl): Likewise.
8880         * pt.c (mark_decl_instantiated): Likewise.
8882 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
8884         * cp-tree.h (finish_globally_qualified_member_call_expr):
8885         Rename to ...
8886         (finish_qualified_call_expr).
8887         * semantics.c: Likewise.
8888         * parse.y (primary): Use it.
8889         * method.c (hack_identifier): Remove redundant code.
8891         * init.c (resolve_offset_ref): Call convert_from_reference to
8892         handle members of reference type.  Improve error recovery.
8894 1998-09-03  Benjamin Kosnik  <bkoz@cygnus.com>
8896         * cp-tree.h: Declare warn_nontemplate_friend.
8897         * decl2.c (lang_decode_option): Set.
8898         * lang-options.h: Add -Wnon-template-friend.
8899         * friend.c (do_friend): Use to toggle non-template function warning.
8901 1998-09-03  Mark Mitchell  <mark@markmitchell.com>
8903         * decl.c (finish_enum): Don't resolve CONST_DECLs to their
8904         corresponding INTEGER_CSTs when processing_template_decl.
8905         * pt.c (tsubst_enum): Tweak accordingly.
8907 1998-09-03  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
8909         * decl.c (pushdecl_class_level): Add warning here.
8910         (pushdecl): Tweak.
8912 1998-09-02  Jason Merrill  <jason@yorick.cygnus.com>
8914         * cvt.c (convert_pointer_to_real): Tidy.
8915         * search.c (get_base_distance_recursive): Simplify.
8916         (get_base_distance): Likewise.
8918         * pt.c (unify): Only special-case INTEGER_TYPE if it uses template
8919         parms.
8921 Wed Sep 02 09:25:29 1998  Nick Clifton  <nickc@cygnus.com>
8923         * lex.c (check_newline):  Call HANDLE_PRAGMA before
8924         HANDLE_SYSV_PRAGMA if both are defined.  Generate warning messages
8925         if unknown pragmas are encountered.
8926         (handle_sysv_pragma): Interpret return code from
8927         handle_pragma_token ().  Return success/failure indication rather
8928         than next unprocessed character.
8929         (pragma_getc): New function: retrieves characters from the
8930         input stream.  Defined when HANDLE_PRAGMA is defined.
8931         (pragma_ungetc): New function: replaces characters back into the
8932         input stream.  Defined when HANDLE_PRAGMA is defined.
8934 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
8936         * decl2.c (output_vtable_inherit): Use %cDIGIT in the operands.
8937         * class.c (build_vtable_entry_ref): Likewise.
8939 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
8941         * cp-tree.h (DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION): New macro.
8942         * decl2.c (import_export_decl): Likewise.
8943         * pt.c (instantiate_decl): Use it.
8945 1998-09-01  Jason Merrill  <jason@yorick.cygnus.com>
8947         * decl.c (lookup_name_real): Also do implicit typename thing for
8948         artificial TYPE_DECLs.
8949         * search.c (lookup_field): Likewise.
8950         (lookup_fnfields, lookup_field): Adjust for implicit typename kludge.
8951         * semantics.c (begin_constructor_declarator): Use enter_scope_of.
8952         (enter_scope_of): Extract type from implicit typename.
8953         (begin_class_definition): Likewise.
8954         * lex.c (identifier_type): Handle implicit typename when checking
8955         for SELFNAME.
8957         * cp-tree.h: Declare flag_strict_prototype.
8958         * lex.c (do_scoped_id, do_identifier): Don't implicitly_declare if
8959         -fstrict-prototype.
8960         * decl.c (init_decl_processing): If -f{no,-}strict-prototype wasn't
8961         specified, set it to the value of pedantic.
8963 1998-09-01  Mark Mitchell  <mark@markmitchell.com>
8965         * decl2.c (arg_assoc): Handle template-id expressions as arguments.
8967 1998-08-31  Mark Mitchell  <mark@markmitchell.com>
8969         * decl.c (finish_enum): Handle member enums of classes declared in
8970         template functions.
8972         * decl2.c (grok_x_components): Strip attributes before calling
8973         groktypename.
8975 1998-08-31  Jason Merrill  <jason@yorick.cygnus.com>
8977         * cp-tree.h, decl2.c: Remove support for -fall-virtual,
8978         -fenum-int-equivalence and -fno-nonnull-objects.
8979         * class.c (check_for_override): Remove support for -fall-virtual.
8980         (finish_struct_1): Likewise.
8981         * call.c (build_new_op): Remove support for -fenum-int-equivalence.
8982         * typeck.c (build_binary_op_nodefault): Likewise.
8983         * cvt.c (ocp_convert): Likewise.
8984         * call.c (build_vfield_ref): Remove support for -fno-nonnull-objects.
8985         * class.c (build_vbase_path): Likewise.
8987 Sun Aug 30 22:16:31 1998  H.J. Lu  (hjl@gnu.org)
8989         * Makefile.in (INTERFACE): New, set to 1.
8991 1998-08-30  Mark Mitchell  <mark@markmitchell.com>
8993         * error.c (dump_decl): Use CP_DECL_CONTEXT, not DECL_CONTEXT, when
8994         comparing with global_namespace.
8995         (dump_aggr_type): Likewise.
8997         * decl.c (grokfndecl): Issue error on declaration of friend
8998         templates with explicit template arguments.
9000         * pt.c (convert_template_argument): New function, split out
9001         from...
9002         (coerce_template_parms): Here.
9003         (tsubst): Attempt better error-recovery.
9005 1998-08-28  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9007         * pt.c (decl_template_parm_p): Add checks for
9008         TEMPLATE_TEMPLATE_PARM.
9010 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
9012         * lex.c (do_identifier): Fix thinko in previous change.
9014 1998-08-28  Jason Merrill  <jason@yorick.cygnus.com>
9016         * search.c (dfs_search, binfo_for_vtable, dfs_bfv_helper): New fns.
9017         * decl2.c (output_vtable_inherit): Call binfo_for_vtable.
9019 1998-08-28  Richard Henderson  <rth@cygnus.com>
9021         Add support for discarding unused virtual functions.
9022         * lang-options.h: Add -fvtable-gc.
9023         * cp-tree.h: Add flag_vtable_gc.
9024         * decl2.c (output_vtable_inherit): New fn.
9025         (finish_vtable_vardecl): Call it.
9026         * class.c (build_vtable_entry_ref): New fn.
9027         (build_vtbl_ref): Call it.
9029 1998-08-28  Mark Mitchell  <mark@markmitchell.com>
9031         * cp-tree.h (build_enumerator): Take the enumeration type as a
9032         parameter.
9033         * decl.c (finish_enum): Don't set the TREE_TYPE for the
9034         enumeration constant values if we're processing_template_decls.
9035         Don't set the type for the CONST_DECLs either; that's done in
9036         build_enumerator.
9037         (build_enumerator): Take the enumeration type as a
9038         parameter.
9039         * lex.c (do_identifier): Don't resolve enumeration constants while
9040         processing template declarations, even if they happen to be
9041         TEMPLATE_PARM_INDEXs.
9043         * parse.y (current_enum_type): New variable.
9044         (primary): Don't allow statement-expression in local classes just
9045         as we don't in global classes.
9046         (structsp): Use current_enum_type.
9047         (enum_list): Likewise.
9048         * pt.c (tsubst_enum): Don't check for NOP_EXPRs introduced by
9049         finish_enum; they no longer occur.
9051         * cp-tree.h (finish_base_specifier): New function.
9052         * parse.y (base_class): Use it.
9053         * semantics.c (finish_base_specifier): Define it.
9055         * parse.y (structsp): Warn on use of typename outside of template
9056         declarations.
9058 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
9060         * lex.c (handle_cp_pragma): Remove #pragma vtable.
9061         * lang-options.h: Remove +e options.
9062         * decl2.c (lang_decode_option): Likewise.
9063         (import_export_vtable): Don't check write_virtuals.
9064         (finish_vtable_vardecl, finish_file): Likewise.
9065         * search.c (dfs_debug_mark): Likewise.
9066         * semantics.c (begin_class_definition): Likewise.
9067         * class.c (build_vtable, finish_vtbls, finish_struct_1): Likewise.
9069         * call.c (build_over_call): Check flag_elide_constructors.
9070         * decl2.c: flag_elide_constructors defaults to 1.
9071         * typeck.c (convert_arguments): Remove return_loc parm.
9072         (build_function_call_real): Adjust.
9074         * search.c: Tear out all mi_matrix and memoize code.
9075         (lookup_field, lookup_fnfields): Use scratch_tree_cons.
9076         * lang-options.h: Remove documentation for -fhandle-exceptions,
9077         -fmemoize-lookups and -fsave-memoized.
9078         * cp-tree.h: Lose mi_matrix and memoize support.
9079         * decl2.c: Ignore -fmemoize-lookups and -fsave-memoized.
9080         * class.c: Lose struct class_level.
9081         (pushclass, popclass): Lose memoize support.
9082         * init.c (build_offset_ref): Likewise.
9084         Never change BINFO_INHERITANCE_CHAIN.
9085         * init.c (emit_base_init): Change modification of
9086         BINFO_INHERITANCE_CHAIN to an assert.
9087         * search.c (get_base_distance_recursive): Likewise.
9088         (get_base_distance): Likewise.
9089         (lookup_member): Likewise.
9090         (convert_pointer_to_single_level): Likewise.
9091         (lookup_field): Likewise.  Lose setting TREE_VIA_* on TREE_LISTs.
9092         (lookup_fnfields): Likewise.
9093         * tree.c (propagate_binfo_offsets): Don't call unshare_base_binfos.
9094         (unshare_base_binfos): Don't call propagate_binfo_offsets.
9095         (layout_basetypes): Call propagate_binfo_offsets instead of
9096         unshare_base_binfos.
9097         * decl.c (xref_basetypes): Call unshare_base_binfos.
9098         * pt.c (instantiate_class_template): Likewise.
9099         * tree.c (reverse_path): Remove 'copy' parm; always make a
9100         temporary copy.
9101         * class.c (build_vbase_path): Just call it.
9102         * search.c (compute_access): Likewise.  Don't re-reverse.
9104 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
9106         * class.c (build_vbase_path): Use reverse_path.
9107         (finish_base_struct): Move warnings for inaccessible bases to
9108         layout_basetypes.
9109         (modify_one_vtable): Remove check of TREE_USED (binfo).
9110         (fixup_vtable_deltas1): Likewise.
9111         * cp-tree.h (BINFO_INHERITANCE_CHAIN): Document here.
9112         (xref_tag): Remove binfos parameter.
9113         (make_binfo): Remove chain parameter.
9114         (reverse_path): Add copy parameter.
9115         * decl.c (init_decl_processing): Change calls to xref_tag.
9116         (xref_tag): Remove binfos parameter.
9117         (xref_basetypes): Change calls to make_binfo.
9118         * decl2.c (grok_x_components): Change calls to xref_tag.
9119         (handle_class_head): Likewise.
9120         * friend.c (do_friend): Likewise.
9121         * lex.c (make_lang_type): Change calls to make_binfo.
9122         * parse.y (structsp): Change calls to xref_tag.
9123         (named_complex_class_head_sans_basetype): Likewise.
9124         (named_class_head): Likewise.
9125         * rtti.c (init_rtti_processing): Likewise.
9126         * search.c (compute_access): Change calls to reverse_path.
9127         (dfs_get_vbase_types): Change calls to make_binfo.
9128         (get_vbase_types): Remove dead code.
9129         * tree.c (unshare_base_binfos): Change calls to make_binfo.
9130         (layout_basetypes): Warn here about inaccessible bases.
9131         (make_binfo): Remove chain parameter.
9132         (reverse_path): Add copy parameter.
9134 1998-08-27  Jason Merrill  <jason@yorick.cygnus.com>
9136         * class.c: #if 0 complete_type_p.
9137         * init.c (build_java_class_ref, build_new_1): Remove unused locals.
9138         * method.c (process_overload_item): Likewise.
9139         * typeck.c (comp_target_types): Likewise.
9141         Stop sharing binfos for indirect virtual bases.
9142         * tree.c (propagate_binfo_offsets): Unshare vbases, too.
9143         (layout_basetypes): Likewise.
9144         (unshare_base_binfos): Copy vbases, too.
9145         * cp-tree.h (BINFO_VIA_PUBLIC, BINFO_BASEINIT_MARKED,
9146         BINFO_VBASE_INIT_MARKED): Remove obsolete macros.
9147         (BINFO_PUSHDECLS_MARKED, SET_BINFO_PUSHDECLS_MARKED,
9148         CLEAR_BINFO_PUSHDECLS_MARKED): New macros.
9149         * search.c (lookup_field, lookup_fnfields, lookup_member): Remove
9150         reference to BINFO_VIA_PUBLIC.
9151         (marked_pushdecls_p, unmarked_pushdecls_p): New fns.
9152         (push_class_decls): Use them.
9153         (dfs_pushdecls): Use SET_BINFO_PUSHDECLS_MARKED.
9154         (dfs_compress_decls): Use CLEAR_BINFO_PUSHDECLS_MARKED.
9156 1998-08-27  Mark Mitchell  <mark@markmitchell.com>
9158         * decl.c (build_enumerator): Set DECL_CONTEXT for the
9159         CONST_DECLs.
9161 1998-08-26  Mark Mitchell  <mark@markmitchell.com>
9163         * cp-tree.h (finish_enum): Change prototype.
9164         * decl.c (finish_enum): Use TYPE_VALUES, rather than taking a
9165         VALUES parameter.  Don't try to compute mins/maxs if
9166         processing_template_decl.
9167         * parse.y (structsp): Use new calling sequence for finish_enum.
9168         * pt.c (tsubst_enum): Likewise.  Take the new type as input.
9169         (lookup_template_class): Remove unused variables.  Tweak.
9170         Register enums on instantiation list before substituting
9171         enumeration constants.
9172         (tsubst_decl): Remove unused variables.
9173         (regenerate_decl_from_template): Likewise.
9175         * decl.c (duplicate_decls): Don't obliterate the
9176         DECL_TEMPLATE_INFO for a template if we're not replacing it with
9177         anything.
9179         * lex.c (do_identifier): Fix typo in comment.
9181 Wed Aug 26 10:54:51 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9183         * errfn.c: Remove stdarg.h/varargs.h.
9184         * tree.c: Likewise.
9186 1998-08-25  Brendan Kehoe  <brendan@cygnus.com>
9188         * pt.c (tsubst_copy): Only do typename overloading on an
9189         IDENTIFIER_NODE that happens to look like a typename if it actually
9190         has a type for us to use.
9192 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
9194         * typeck.c (comp_cv_target_types): Split out...
9195         (comp_target_types): From here.  Don't allow cv-qual changes under
9196         a pointer if nptrs == 0.  Fix OFFSET_TYPE handling.
9197         (build_ptrmemfunc): Pass 1 to nptrs.
9198         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
9200 1998-08-25  Mark Mitchell  <mark@markmitchell.com>
9202         * search.c (dependent_base_p): Don't compare a binfo to
9203         current_class_type; use the TREE_TYPE of the binfo instead.
9205         * cp-tree.h (CLASS_TYPE_P): Revise definition.
9207 1998-08-25  Jason Merrill  <jason@yorick.cygnus.com>
9209         * decl.c (duplicate_decls): Don't complain about different
9210         exceptions from an internal decl even if pedantic.
9212         * typeck.c (convert_for_assignment): Converting from pm of vbase
9213         to derived is an error, not a sorry.
9215         * call.c (build_over_call): Use convert_pointer_to_real for 'this'.
9216         * class.c (fixed_type_or_null): Rename from
9217         resolves_to_fixed_type_p.  Return the dynamic type of the
9218         expression, if fixed, or null.
9219         (resolves_to_fixed_type_p): Use it.  Return 0 if the dynamic type
9220         does not match the static type.
9221         (build_vbase_path): Rename 'alias_this' to 'nonnull'.  Use
9222         resolves_to_fixed_type_p again.
9224 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
9226         * pt.c (tsubst_decl): Move special case code for dealing with
9227         tricky friend templates here from ...
9228         (regenerate_decl_from_template): Here.
9230 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
9232         * decl.c (start_decl): Remove redundant linkage check.
9234 1998-08-24  Gavin Romig-Koch  <gavin@cygnus.com>
9236         * typeck.c (c_expand_return): Handle the case that valtype
9237         is wider than the functions return type.
9239 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
9241         * cp-tree.h (CLASS_TYPE_P): New macro.
9242         * decl.c (grokdeclarator): Use it instead of IS_AGGR_TYPE.
9243         * pt.c (process_template_parm): Undo previous change.
9245 1998-08-24  Benjamin Kosnik  <bkoz@cygnus.com>
9247         * cp-tree.h: Declare.
9248         * pt.c (decl_template_parm_p): New function.
9249         * decl.c (pushdecl): Check decls for redeclaring template parms.
9250         (xref_tag): Make redeclaration an error, print decl.
9251         * decl2.c (grokfield): Check field_decls for redeclaration as well.
9253 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
9255         * parse.y (primary): Fix up the type of string constants.
9257 1998-08-24  Mark Mitchell  <mark@markmitchell.com>
9259         * typeck.c (convert_for_initialization): Move check for odd uses
9260         of NULL to avoid duplicate warnings.
9262 1998-08-24  Jason Merrill  <jason@yorick.cygnus.com>
9264         * tree.c (lvalue_type): Fix for arrays.
9265         * typeck.c (string_conv_p): New fn.
9266         (convert_for_assignment): Use it.
9267         (build_unary_op): Use lvalue_type.
9268         * call.c (standard_conversion, convert_like): Use string_conv_p.
9269         (add_function_candidate): Use lvalue_type.
9270         * cvt.c (convert_to_reference): Likewise.
9271         * decl2.c (lang_decode_option): Ignore -traditional.
9272         * decl.c (init_decl_processing): flag_writable_strings inhibits
9273         flag_const_strings.
9275 1998-08-24  Andrew MacLeod  <amacleod@cygnus.com>
9277         * lang-options.h (lang_options): Add fconst-strings to the list
9278         of valid options.
9279         * decl2.c (lang_f_options, lang_decode_option): Likewise.
9281 1998-08-24  Nathan Sidwell  <nathan@acm.org>
9283         * lex.c (real_yylex): Don't warn about long long constants if
9284         we're allowing long long.
9286 1998-08-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
9288         * decl.c (pushdecl): Use IDENTIFIER_NAMESPACE_VALUE instead of
9289         accessing bindings directly.
9291         * search.c (my_tree_cons): Reimplement.
9293         * lang-specs.h: Remove __HONOR_STD.
9294         * inc/exception, inc/new, inc/new.h, inc/typeinfo: Likewise.
9296 1998-08-23  Mark Mitchell  <mark@markmitchell.com>
9298         * decl.c (grokdeclarator): Complain about in-class initialization
9299         of aggregates and/or references.
9300         * pt.c (process_template_parm): Clear IS_AGGR_TYPE for
9301         TEMPLATE_TYPE_PARMs.
9303         * decl2.c (grok_array_decl): Add comment.
9304         (mark_used): Don't instantiate an explicit instantiation.
9305         * friend.c (make_friend_class): Remove bogus comment.  Fix check
9306         for partial specializations.
9307         * pt.c (check_explicit_specialization): Don't
9308         SET_DECL_EXPLICIT_INSTANTIATION here.
9309         (mark_decl_instantiated): Or here.
9310         (do_decl_instantiation): Do it here, instead.  Add checks for
9311         duplicate explicit instantiations, etc.  Tidy.
9312         (do_type_instantiation): Likewise.
9313         (instantiate_decl): Improve comments.  Complain about explicit
9314         instantiations where no definition is available.
9316         * cp-tree.h (ansi_null_node): Remove.
9317         * call.c (build_over_call): Warn about converting NULL to an
9318         arithmetic type.
9319         * cvt.c (build_expr_type_conversion): Likewise.  Use
9320         null_ptr_cst_p instead of expanding it inline.
9321         * decl.c (ansi_null_node): Remove.
9322         (init_decl_processing): Make null_node always have integral type.
9323         * except.c (build_throw): Warn about converting NULL to an
9324         arithmetic type.
9325         * lex.c (init_parse): Remove handling of ansi_null_node.
9326         * pt.c (type_unification_real): Don't convert NULL to void* type.
9327         * typeck.c (build_binary_op_nodefault): Fix NULL warnings.
9328         (convert_for_assignment): Warn about converting NULL to an
9329         arithmetic type.
9330         (convert_for_initialization): Likewise.
9332 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
9334         * tree.c (search_tree, no_linkage_helper, no_linkage_check): New fn.
9335         * pt.c (coerce_template_parms): Use no_linkage_check.
9336         * decl.c (grokvardecl): Likewise.
9337         (grokfndecl): Likewise.  Members of anonymous types have no linkage.
9339         * method.c (process_overload_item): Remove useless code.
9341 1998-08-20  Per Bothner  <bothner@cygnus.com>
9343         Handle new'ing of Java classes.
9344         * init.c (build_class_classref):  New function.
9345         (build_new_1):  If type is TYPE_FOR_JAVA:  Call _Jv_AllocObject;
9346         constructor does not return this;  don't need to exception-protect.
9348         * pt.c (lookup_template_class):  Copy TYPE_FOR_JAVA flag.
9349         * decl2.c (acceptable_java_type):  Handle template-derived types.
9351 1998-08-20  Per Bothner  <bothner@cygnus.com>
9353         * decl2.c (import_export_vtable):  Suppress vtables for Java classes.
9355 1998-08-20  Mark Mitchell  <mark@markmitchell.com>
9357         * decl.c (duplicate_decls): Always merge the old and new patterns
9358         for templates, regardless of whether or not the new one has
9359         DECL_INITIAL.  Don't throw away specializations.  Merge
9360         DECL_SAVED_TREE.
9361         * pt.c (tsubst_decl): Use the right pattern when calculating the
9362         complete args for a new template instance.
9363         (do_decl_instantiation): Fix typo in comment.
9364         (regenerate_decl_from_template): Deal with tricky friend template
9365         case.
9366         (instantiate_decl): Likewise.
9368 Thu Aug 20 09:09:45 1998  Jeffrey A Law  (law@cygnus.com)
9370         * init.c (build_builtin_delete_call): Add missing assemble_external
9371         call.
9373 1998-08-20  Jason Merrill  <jason@yorick.cygnus.com>
9375         * parse.y (notype_unqualified_id): Also accept ~A<int>.
9377 1998-08-19  Mark Mitchell  <mark@markmitchell.com>
9379         * typeck.c (build_binary_op_nodefault): Warn on use of NULL in
9380         arithmetic.
9381         * except.c (build_throw): Warn when NULL is thrown, even with
9382         -ansi.  Use ansi_null_node, rather than integer_zero_node, in the
9383         thrown expression.
9385         * cp-tree.h (ansi_null_node): New variable.
9386         * decl.c (ansi_null_node): New variable.
9387         (init_decl_processing): Initialize its type.
9388         * lex.c (init_parse): Initialize its value.  Use ansi_null_node
9389         for null_node in non-ANSI mode.
9390         * typeck.c (build_binary_op_nodefault): Use ansi_null_node in
9391         place of null_node to avoid spurious errors.
9393 1998-08-17  Mark Mitchell  <mark@markmitchell.com>
9395         * cp-tree.h (enter_scope_of): New function.
9396         * parse.y (complex_direct_notype_declarator): Use it.
9397         * semantics.c (enter_scope_of): New function.
9399 1998-08-17  Jason Merrill  <jason@yorick.cygnus.com>
9401         * decl.c (grokparms): No, here.
9403         * decl.c (grokdeclarator): Catch parm with pointer to array of
9404         unknown bound here...
9405         * method.c (process_overload_item): ...not here.
9407         * gxxint.texi: Remove obsolete documentation of overloading code.
9409         * decl.c (finish_enum): Also set TYPE_SIZE_UNIT.
9410         * class.c (finish_struct_bits): Likewise.
9412         * tree.c (lvalue_type): Fix for arrays.
9413         * typeck.c (build_unary_op): Use lvalue_type.
9414         * call.c (add_function_candidate): Likewise.
9415         * cvt.c (convert_to_reference): Likewise.
9417         * decl2.c (lang_decode_option): Ignore -traditional.
9419         * init.c (build_offset_ref): Don't mess with error_mark_node.
9420         * lex.c (do_scoped_id): Use cp_error.
9422         * rtti.c (get_tinfo_fn): Don't mess with the context for now.
9424 1998-08-17  Benjamin Kosnik  <bkoz@loony.cygnus.com>
9426         * decl.c (grokdeclarator): Allow anonymous types to be cv-qualified.
9428 Mon Aug 17 10:40:18 1998  Jeffrey A Law  (law@cygnus.com)
9430         * cp-tree.h (set_identifier_local_value): Provide prototype.
9432         * decl2.c (do_namespace_alias): Remove unused variables `binding'
9433         and `old'.
9435 Fri Aug 14 16:42:27 1998  Nick Clifton  <nickc@cygnus.com>
9437         * Makefile.in: Rename BBISON to BISON so that it can be properly
9438         inherited from the parent makefile.
9440 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
9442         * lang-options.h: Add -finit-priority.
9443         * decl2.c: Likewise.  Check flag_init_priority instead of
9444         USE_INIT_PRIORITY.
9446         * decl2.c (setup_initp): New fn.
9447         (start_objects, finish_objects, do_ctors): Handle init_priority.
9448         (do_dtors, finish_file): Likewise.
9450 1998-08-13  Jason Merrill  <jason@yorick.cygnus.com>
9452         * pt.c (tsubst_copy): Hush warning.
9454         * rtti.c (get_tinfo_fn): Also set DECL_IGNORED_P.
9456 1998-08-12  Mark Mitchell  <mark@markmitchell.com>
9458         * pt.c (print_template_context): Don't abort when instantiating a
9459         synthesized method.
9461         * decl.c (grokdeclarator): Issue errors on namespace qualified
9462         declarators in parameter lists or in class scope.
9464 1998-08-09  Mark Mitchell  <mark@markmitchell.com>
9466         * pt.c (check_explicit_specialization): Don't abort on bogus
9467         explicit instantiations.
9469 1998-08-07  Mark Mitchell  <mark@markmitchell.com>
9471         * typeck.c (require_complete_type): Use complete_type_or_else.
9472         (complete_type_or_else): Always return NULL_TREE on failure, as
9473         documented.
9475         * pt.c (tsubst_aggr_type): Prototype.
9476         (tsubst_decl): New function, split out from tsubst.  Set
9477         input_filename and lineno as appropriate.
9478         (pop_tinst_level): Restore the file and line number saved in
9479         push_tinst_level.
9480         (instantiate_class_template): Set input_filename and lineno as
9481         appropriate.
9482         (tsubst): Move _DECL processing to tsubst_decl.  Make sure the
9483         context for a TYPENAME_TYPE is complete.
9485         * decl2.c (grokbitfield): Issue errors on bitfields declared with
9486         function type.
9487         (do_dtors): As in do_ctors, pretend to be a member of the same
9488         class as a static data member while generating a call to its
9489         destructor.
9491         * cvt.c (cp_convert_to_pointer): Handle NULL pointer
9492         conversions, even in complex virtual base class hierarchies.
9494 1998-08-06  Mark Mitchell  <mark@markmitchell.com>
9496         * cp-tree.h (ENUM_TEMPLATE_INFO): New macro.
9497         (TYPE_TEMPLATE_INFO): Likewise.
9498         (SET_TYPE_TEMPLATE_INFO): Likewise.
9499         (ENUM_TI_TEMPLATE): Likewise.
9500         (ENUM_TI_ARGS): Likewise.
9501         (lookup_nested_type_by_name): Remove.
9502         * decl.c (maybe_process_template_type_declaration): Handle enums.
9503         (start_enum): Don't check for primary-template enum declarations
9504         here.
9505         (finish_enum): Clean up, document.  Make sure template enum
9506         constants get the correct type.
9507         (build_enumerator): Copy initializers for template enumerations,
9508         too.
9509         (grok_enum_decls): Document.
9510         * lex.c (do_identifier): Document use of LOOKUP_EXPR a bit
9511         better.  Build LOOKUP_EXPRs for local variables, even if they are
9512         TREE_PERMANENT.
9513         * pt.c (tsubst_enum): Remove field_chain parameter.
9514         (template_class_depth): Include the depth of surrounding function
9515         contexts.
9516         (push_template_decl): Check for primary-template enum declarations
9517         here.  Deal with enumeration templates.
9518         (lookup_template_class): Likewise.
9519         (for_each_template_parm): Likewise.
9520         (instantiate_class_template): Don't call tsubst_enum directly,
9521         call tsubst instead, to instantiate enums.  Deal with all
9522         field_chain issues here, not in tsubst_enum.
9523         (lookup_nested_type_by_name): Remove.
9524         (tsubst_aggr_type): Revise handling of enumeration types.
9525         (tsubst): Likewise.
9526         (tsubst_copy): Likewise.
9527         (tsubst_expr): Call tsubst, not tsubst_enum for TAG_DEFNs.
9529 1998-08-04  Mark Mitchell  <mark@markmitchell.com>
9531         * decl.c (pushtag): Don't mangle the name of a TYPE_DECL if it
9532         uses template parameters.
9533         * method.c (build_template_parm_names): Use the full set of
9534         template arguments for tsubst'ing.
9535         (build_overload_identifier): Pass the full set of template
9536         arguments to build_template_parm_names, not just the
9537         innermost_args.
9538         * pt.c (TMPL_ARGS_DEPTH): Define using
9539         TMPL_ARGS_HAVE_MULTIPLE_LEVELS, for clarity.
9540         (NUM_TMPL_ARGS): New macro.
9541         (add_outermost_template_args): Deal with the case where the outer
9542         args will be completely discarded.
9543         (coerce_template_parms): Use the full set of template arguments
9544         for tsubst'ing.  Simplify.  Add some asserts.  Improve
9545         error messages.
9546         (lookup_template_class): Pass the full set of template arguments
9547         to coerce_template_parms.
9548         (tsubst): Add assertion.
9549         (do_type_instantiation): Don't instantiate member template
9550         classes.
9552         * init.c (build_offset_ref): Deal with a TEMPLATE_ID_EXPR whose
9553         name is a LOOKUP_EXPR, rather than an IDENTIFIER_NODE.
9555 1998-08-03  Jason Merrill  <jason@yorick.cygnus.com>
9557         * method.c (set_mangled_name_for_decl): Change return type to void.
9559         * decl.c (lookup_name_real): A namespace-level decl takes priority
9560         over implicit typename.  Avoid doing the same lookup twice.
9562         * search.c (dependent_base_p): New fn.
9563         (dfs_pushdecls, dfs_compress_decls): Use it.
9565         * typeck.c (get_member_function_from_ptrfunc): Don't try to handle
9566         virtual functions if the type doesn't have any.
9568 1998-08-03  Mark Mitchell  <mark@markmitchell.com>
9570         * decl2.c (grokfield): Don't mangle the name of a TYPE_DECL if it
9571         uses template parameters.
9573 1998-08-02  Mark Mitchell  <mark@markmitchell.com>
9575         * cp-tree.def (LOOKUP_EXPR): Document.  Remove second argument.
9576         * cp-tree.h (DECL_TI_TEMPLATE): Improve documentation.
9577         * lex.c (do_identifier): Don't use a second argument, or a type,
9578         when building LOOKUP_EXPRs.
9579         (do_identifier): Likewise.
9580         (do_scoped_id): Likewise.
9581         * method.c (hack_identifier): Improve error message.
9582         * pt.c (lookup_template_function): Don't needlessly call
9583         copy_to_permanent or build_min.
9584         (tsubst_copy): Remove #if 0'd code.  tsubst into LOOKUP_EXPRs if
9585         necessary.
9586         (do_decl_instantiation): Improve error message.
9587         * tree.c (mapcar, case LOOKUP_EXPR): Don't be sorry; make a copy.
9588         (build_min): Copy the type to the permanent obstack, too.
9590 1998-08-01  Jason Merrill  <jason@yorick.cygnus.com>
9592         * init.c (init_init_processing): Remove BI* handling.
9593         (build_builtin_call): Remove.
9594         (build_builtin_delete_call): New fn.
9595         (build_delete): Use it.
9597 1998-07-31  Mark Mitchell  <mark@markmitchell.com>
9599         * cp-tree.h (PROCESSING_REAL_TEMPLATE_DECL_P): New macro.
9600         (maybe_check_template_type): New function.
9601         * decl.c (maybe_process_template_type_declaration): New function,
9602         split out from pushtag  Call maybe_check_template_type.
9603         (pushtag): Use it.  Use PROCESSING_REAL_TEMPLATE_DECL_P.
9604         (xref_tag): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9605         * friend.c (do_friend): Use PROCESSING_REAL_TEMPLATE_DECL_P.
9606         * pt.c (template_class_depth_real): Generalization of ...
9607         (template_class_depth): Use it.
9608         (register_specialization): Use duplicate_decls for duplicate
9609         declarations of specializations.
9610         (maybe_check_template_type): New function.
9611         (push_template_decl_real): Fix comment.
9612         (convert_nontype_argument): Likewise.
9613         (lookup_template_class): Likewise.  Avoid an infinite loop on
9614         erroneous code.
9615         (tsubst_friend_function): Fix comment.
9616         (tsubst, case FUNCTION_DECL): Deal with a DECL_TI_TEMPLATE that is
9617         an IDENTIFIER_NODE.
9618         * semantics.c (begin_function_definition): Use
9619         reset_specialization to note that template headers don't apply
9620         directly to declarations after the opening curly for a function.
9622 1998-07-29  Jason Merrill  <jason@yorick.cygnus.com>
9624         * decl.c (push_overloaded_decl): Use current_namespace instead of
9625         DECL_CONTEXT (decl) to determine where we go.
9627         * decl.c (lookup_name_real): Fix typo.
9629 1998-07-28  Mark Mitchell  <mark@markmitchell.com>
9631         * friend.c (is_friend): Be lenient with member functions to deal
9632         with nested friends.
9634 1998-07-28  Jason Merrill  <jason@yorick.cygnus.com>
9636         * class.c (finish_struct_1): Convert integer_zero_node to
9637         ssizetype before passing it to set_rtti_entry.
9638         * typeck2.c (initializer_constant_valid_p): Allow conversion of 0
9639         of any size to a pointer.
9641 1998-07-27  Mark Mitchell  <mark@markmitchell.com>
9643         * cp-tree.h (TI_USES_TEMPLATE_PARMS): Remove.
9644         (build_template_decl_overload): Remove.
9645         (set_mangled_name_for_decl): New function.
9646         (innermost_args): Remove is_spec parameter.
9647         (most_specialized, most_specialized_class): Remove declarations.
9648         (lookup_template_class): Add entering_scope parameter.
9649         (maybe_process_partial_specialization): New function.
9650         (finish_template_decl): Likewise.
9651         (finish_template_type): Likewise.
9652         * class.c (finish_struct): Clean up processing of member template
9653         specializations.
9654         * decl.c (pushtag): Fix formatting.
9655         (lookup_tag): Improve handling of pseudo-global levels.
9656         (make_typename_type): Adjust call to lookup_template_class.
9657         (shadow_tag): Use maybe_process_partial_specialization.
9658         (xref_tag): Improve handling of member friends.
9659         (start_function): Call push_nested_class before
9660         push_template_decl.  Don't call push_template_decl for
9661         specializations.
9662         * decl2.c (grok_x_components): Don't call xref_tag for
9663         template instantiations.  Handle UNION_TYPEs like RECORD_TYPEs.
9664         (grokclassfn): Use set_mangled_name_for_decl.
9665         (arg_assoc_class): Adjust call to innermost_args.
9666         (mark_used): Don't call instantiate_decl for a TEMPLATE_DECL.
9667         * error.c (dump_function_name): Improve printing of template
9668         function names.
9669         * friend.c (is_friend): Don't compare types of decls to determine
9670         friendship, unless flag_guiding_decls.
9671         (make_friend_class): Partial specializations cannot be friends.
9672         (do_friend): Use set_mangled_name_for_decl.  Call
9673         push_template_decl_real instead of push_template_decl.
9674         * method.c (build_decl_overload_real): Remove prototype.  Give it
9675         external linkage.
9676         (build_overload_identifier): Adjust call to innermost_args.
9677         (build_template_decl_overload): Remove.
9678         (set_mangled_name_for_decl): New function.
9679         * parse.y (.finish_template_type): New non-terminal.
9680         (template_def): Use finish_template_decl.  Use template_extdef
9681         instead of extdef.
9682         (template_extdef, template_datadef): New non-terminals, containing
9683         only those rules for things which can be templates.
9684         (datadef): Tidy.
9685         (template_type, self_template_type): Use .finish_template_type.
9686         (named_class_head): Use maybe_process_partial_specialization.
9687         * pt.c (mangle_class_name_for_template): Remove context parameter.
9688         (get_class_bindings): Remove outer_args parameter.
9689         (complete_template_args): Remove.
9690         (add_outermost_template_args): New function.
9691         (register_specialization): Return the specialization.
9692         (unregister_specialization): New function.
9693         (tsubst_template_parms): Likewise.
9694         (most_specialized, most_specialized_class): Prototype here as
9695         static.
9696         (original_template): Rename to most_general_template.
9697         (tsubst_template_parms): New function.
9698         (set_mangled_name_for_template_decl): Likewise.
9699         (TMPL_ARGS_DEPTH): New macro.
9700         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): Adjust.
9701         (TMPL_ARGS_LEVEL): New macro.
9702         (SET_TMPL_ARGS_LEVEL): Likewise.
9703         (TMPL_ARG): Likewise.
9704         (SET_TMPL_ARG): Likewise.
9705         (TMPL_ARGS_DEPTH): Likewise.
9706         (finish_member_template_decl): Use finish_template_decl.
9707         (maybe_process_partial_specialization): New function, split out
9708         from tsubst.
9709         (inline_needs_template_parms): Use TMPL_PARMS_DEPTH.
9710         (maybe_begin_member_template_processing): Use new macros.
9711         (is_member_template): Likewise.
9712         (is_member_template_class): Likewise.
9713         (add_to_template_args): Likewise.  Deal with multiple levels of
9714         args.
9715         (maybe_process_partial_specialization): New function.
9716         (retrieve_specialization): Add consistency check.
9717         (determine_specialization): Return full argument list.
9718         (check_explicit_specialization): Tweak friend handling.  Use full
9719         argument lists.  Simplify.
9720         (current_template_args): Use new macros.
9721         (push_template_decl_real): Change ill-named mainargs to specargs.
9722         Check that a partial specialization actually specializes at least
9723         one parameter.   Improve friend handling.  Modify for full
9724         template arguments.
9725         (classtype_mangled_name): Don't mangle the names of
9726         specializations.
9727         (lookup_template_class): Add entering_scope parameter.  Use it to
9728         avoid finding a template type when an instantiation is required.
9729         Simplify.  Use full template arguments.
9730         (tsubst_friend_function): Use unregister_specialization.  Use new
9731         macros.  Use full template arguments.
9732         (tsubst_friend_class): Substitute, using tsubst_template_parms,
9733         into the template parameters before passing them to
9734         redeclare_class_template.
9735         (instantiate_class_template): Simplify.  Use full template
9736         arguments.  Adjust calls to get_class_bindings.  Use
9737         SET_IDENTIFIER_TYPE_VALUE where needed.  Improve friend handling.
9738         (innermost_args): Use new macros.
9739         (tsubst_aggr_type): New function, split out from tsubst.
9740         (tsubst): Use tsubst_aggr_type, tsubst_template_parms, new calling
9741         conventions for lookup_template_class.  Refine handling of partial
9742         instantiations.   Remove calls to complete_template_args.
9743         Simplify.  Add consistency checks.  Use set_mangled_name_for_decl
9744         and set_mangled_name_for_template_decl.
9745         (tsubst_copy): Use tsubst_aggr_type.
9746         (instantiate_template): Use full template arguments.
9747         (more_specialized): Improve formatting.
9748         (more_specialized_class): Adjust calls to get_class_bindings.
9749         (get_bindings_real): Don't call complete_template_args.
9750         (most_specialized): Don't overwrite input; create a new list.
9751         (most_specialized_class): Use most_general_template.
9752         (regenerate_decl_from_template): Use unregister_specialization.
9753         Use full template arguments.
9754         (instantiate_decl): Use full template arguments.
9755         (set_mangled_name_for_template_decl): New function.
9756         * semantics.c (begin_class_definition): Use
9757         maybe_process_partial_specialization.
9758         (finish_member_class_template): New function.
9759         (finish_template_decl): Likewise.
9760         (finish_template_type): Likewise.
9761         (typeck.c): Don't crash after issuing a compiler_error.
9762         * Makefile.in (CONFLICTS): Adjust; we removed a s/r conflict.
9764 1998-07-27  Jason Merrill  <jason@yorick.cygnus.com>
9766         * typeck2.c (build_functional_cast): Handle default-initialization.
9768         * call.c (build_over_call): Pass 1 to popclass.
9770         * parse.y (direct_notype_declarator): Add precedence declaration
9771         to notype_unqualified_id case.
9772         * Makefile.in (EXPECT): Adjust.
9774         * tree.c (ovl_member): Fix for single function in OVL.
9776 1998-07-27  Dave Brolley  <brolley@cygnus.com>
9778         * c-lex.c (yylex): Fix boundary conditions in character literal and
9779         string literal loops.
9781 1998-07-24  Jason Merrill  <jason@yorick.cygnus.com>
9783         * decl.c (lookup_name_real): OK, do return the from_obj value
9784         unless got_object depends on template parms.
9786         * parse.y (nested_name_specifier_1): Pull out the TYPE_MAIN_VARIANT.
9788         * pt.c (coerce_template_parms): Also complain about local enums.
9790         * cp-tree.h: Add prototype for set_identifier_local_value.
9791         * decl.c (set_identifier_local_value_with_scope): Make static,
9792         prototype.
9793         * search.c (covariant_return_p): Likewise.
9794         * except.c (build_terminate_handler, alloc_eh_object): Likewise.
9796         * call.c (build_method_call): Only pull out the type of a destructor
9797         if it's a template type parm.
9798         * decl.c (lookup_name_real): Never return the from_obj value.
9800 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
9802         * except.c (process_start_catch_block_old): Call start_decl_1 for
9803         catch parm.
9804         * decl.c (start_decl_1): Avoid duplicate error.
9806         * init.c (expand_default_init): Only perform the initialization if
9807         it will do something.
9809 1998-07-23  H.J. Lu  (hjl@gnu.org)
9811         * parse.y (base_class): Check for invalid base class.
9813 1998-07-23  Jason Merrill  <jason@yorick.cygnus.com>
9815         * decl2.c (import_export_template): Fold in...
9816         (import_export_class): ...to here.  Handle dllimport/export.
9818         * class.c (build_vtable): Pass at_eof to import_export_vtable.
9819         (prepare_fresh_vtable): Likewise.
9820         * decl2.c (import_export_class): Split out...
9821         (finish_prevtable_vardecl): From here.
9822         * class.c (finish_struct_1): Call import_export_class if at_eof.
9824         * decl.c (start_function): #if 0 mysterious code I wrote and have
9825         forgotten why.
9826         * rtti.c (get_tinfo_fn): If this is for a class type, set
9827         DECL_CONTEXT.
9829 1998-07-22  Jason Merrill  <jason@yorick.cygnus.com>
9831         * inc/exception: Change terminate and unexpected to ().
9833         * parse.y (named_class_head_sans_basetype_defn): A
9834         named_class_head_sans_basetype followed by '{' or ':' is a defn.
9836 1998-07-21  Jason Merrill  <jason@yorick.cygnus.com>
9838         * tree.c (canonical_type_variant): New fn to handle arrays.
9839         * cp-tree.h (CANONICAL_TYPE_VARIANT): Remove.
9840         * pt.c (unify, default case): Also fold arg.  Fix array bounds case.
9841         * method.c (process_overload_item): Use build_overload_value for
9842         arrays.
9844 1998-07-20  Dave Brolley  <brolley@cygnus.com>
9846         * lex.c (mbchar.h): #include it.
9847         (GET_ENVIRONMENT): New macro.
9848         (init_parse): Set character set based on LANG environment variable.
9849         (real_yylex): Handle multibyte characters in character literals.
9850         (real_yylex): Handle multibyte characters in string literals.
9852 1998-07-19  Jason Merrill  <jason@yorick.cygnus.com>
9854         * lex.c (do_identifier): Look for class value even if we don't
9855         have a global value.  Do implicit declaration if parsing is 2.
9856         * semantics.c (finish_call_expr): Pass 2 if we're doing Koenig
9857         lookup.
9859 1998-07-19  Mark Mitchell  <mark@markmitchell.com>
9861         * decl.c (pushtag): Revert previous change.
9862         * pt.c (lookup_template_class): Don't put out debugging
9863         information for types that use template parameters.
9865         * decl.c (pushtag): Don't put out debugging information for
9866         compiler-generated typedefs.
9868         * error.c (dump_type_real): Don't crash when presented with
9869         intQI_type_node or the like.
9871         * semantics.c (finish_translation_unit): Fix spelling error in
9872         comment.
9874 1998-07-17  Jason Merrill  <jason@yorick.cygnus.com>
9876         * decl.c (lookup_name_real): Pull out single function here.
9877         (select_decl): Not here.
9878         (unqualified_namespace_lookup): Use CP_DECL_CONTEXT.
9880         * decl.c (qualify_lookup): Tweak again.
9882         * pt.c (lookup_template_class): Don't mess with the context of the
9883         instantiation.
9884         * decl2.c (current_decl_namespace): Remove special handling for
9885         templates.
9887         * pt.c (tsubst, case FUNCTION_DECL): Fix getting complete args for
9888         a member template specialization.
9890         * tree.c (ovl_member): Use decls_match to compare functions.
9891         * decl.c (decls_match): Check the context of a function.
9893         * parse.y (primary): Use notype_unqualified_id instead of IDENTIFIER
9894         in Koenig lookup support rules.
9895         * semantics.c (finish_call_expr): Handle the new cases.
9897         * typeck.c (build_x_function_call): Handle overloaded methods.
9899         * decl.c (grokvardecl): Don't call build_static_name for extern "C".
9901 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
9903         * semantics.c (finish_object_call_expr): Revert previous change.
9904         * call.c (build_new_method_call): Likewise.  Instead, convert
9905         TYPE_DECLs to IDENTIFIERs here, in the presence of templates.
9907 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
9909         * decl.c (qualify_lookup): Handle templates.
9911         * decl2.c (do_using_directive): Don't pass ancestor.
9912         * decl.c (push_using_directive): Calculate ancestor.
9914         * decl2.c (do_nonmember_using_decl): Allow for type shadowing.
9915         * decl.c (pushdecl): Move type shadowing handling from here...
9916         (duplicate_decls): ...to here.
9917         * decl.c (set_identifier_local_value_with_scope): New fn.
9918         (pushdecl): Use it.
9919         (set_identifier_local_value, lookup_type_current_level): New fns.
9920         * decl2.c (do_local_using_decl): Handle types and binding level
9921         stuff properly.
9923         * init.c (build_offset_ref): Don't call mark_used on an OVERLOAD.
9924         * decl.c (select_decl): Extract a lone function from an OVERLOAD.
9925         (lookup_namespace_name): Likewise.
9926         * typeck.c (build_unary_op): Not here anymore.
9928         * decl2.c (do_class_using_decl): Make sure we get an identifier.
9929         * class.c (handle_using_decl): Ignore TYPE_DECLs.
9931         * decl.c (qualify_lookup): New fn.
9932         (lookup_name_real): Use it.
9934 1998-07-16  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
9936         * decl2.c (add_using_namespace): When directly using a namespace
9937         that was indirect before, promote it.
9939         * cp-tree.h (LOOKUP_PREFER_TYPES, LOOKUP_PREFER_NAMESPACES,
9940         LOOKUP_PREFER_BOTH, LOOKUP_NAMESPACES_ONLY, LOOKUP_TYPES_ONLY,
9941         LOOKUP_QUALIFIERS_ONLY, LOOKUP_TEMPLATES_EXPECTED): New macros.
9942         * decl.c (select_decl): Replace two flag parameters by one.
9943         (unqualified_namespace_lookup): Likewise, pass flag.
9944         (lookup_flags): New function.
9945         (lookup_name_real): Compute flags, pass them.
9946         (lookup_namespace_name): Call with zero-flag.
9947         * decl2.c (ambiguous_decl): Add flag parameter, complain only
9948         according to flags.
9949         (lookup_using_namespace, qualified_lookup_using_namespace):
9950         Add flag parameter, pass them through.
9951         * lex.c (do_scoped_id): Call with zero-flag.
9953 1998-07-16  Jason Merrill  <jason@yorick.cygnus.com>
9955         * typeck.c (convert_for_assignment): Use comptypes.
9957 1998-07-16  Mark Mitchell  <mark@markmitchell.com>
9959         * semantics.c (finish_object_call_expr): Move test for the
9960         function called being a TYPE_DECL to ...
9961         * call.c (build_new_method_call): Here.
9963 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
9965         * decl2.c (arg_assoc_class): Also look at template arguments, if any.
9966         (arg_assoc): Handle error_mark_node and multiple levels of TREE_LIST.
9968         * lex.c (looking_for_typename): Don't initialize.
9970         * decl2.c (ambiguous_decl): Clarify error message.
9972         * decl.c (push_using_directive): Iterate over namespaces used
9973         indirectly.
9975 1998-07-15  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
9977         * decl2.c (add_using_namespace): Iterate over namespaces used
9978         indirectly.
9980         * decl.c (lookup_name_real): Accept namespace aliases as locals.
9981         (cat_namespace_levels): Ignore aliases.
9982         (duplicate_decls): Ignore duplicate aliases.
9983         * decl2.c (do_namespace_alias): Process block level namespace
9984         aliases.  Store alias with pushdecl.  Remove odr errors.
9985         * parse.y (namespace_alias): New non-terminal.
9986         (extdef): Use it.
9988 1998-07-15  Jason Merrill  <jason@yorick.cygnus.com>
9990         * decl2.c (arg_assoc_type): Handle METHOD_TYPE like FUNCTION_TYPE.
9991         Handle TEMPLATE_TYPE_PARM.
9992         (arg_assoc): Rewrite.
9994         * pt.c (complete_template_args): Don't look at the context unless
9995         we have to.
9997         * method.c (build_decl_overload_real): Fix namespace handling.
9999         * typeck.c (build_unary_op): Extract a lone function from an
10000         OVERLOAD.
10002         * call.c (build_scoped_method_call): Handle getting a namespace
10003         for basetype in a destructor call.
10004         (check_dtor_name): Handle enums.
10006         * parse.y (using_directive): New nonterminal.
10007         (extdef, simple_stmt): Use it.
10009 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10011         * decl2.c (add_function): Move error message ...
10012         (arg_assoc_namespace): ... from here.
10014 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
10016         * parse.y (namespace_qualifier): Fix multiple level handling.
10017         * decl2.c (namespace_ancestor): Use CP_DECL_CONTEXT.
10018         (arg_assoc): Don't skip the first argument of a function.
10020 Tue Jul 14 20:09:22 1998  Jeffrey A Law  (law@cygnus.com)
10022         * search.c (my_tree_cons): Clean up.
10024 1998-07-14  Jason Merrill  <jason@yorick.cygnus.com>
10026         * call.c (joust): Don't warn about "confusing" conversions to the
10027         same type.
10029 1998-07-14  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10031         * class.c (push_nested_class): Complain about namespaces.
10032         * decl.c (start_decl): Enter the object's namespace.
10033         (cp_finish_decl): Leave it.
10034         (grokdeclarator): Likewise.
10035         * decl2.c (check_decl_namespace): New function.
10036         (finish_file): Call it.
10037         * parse.y (complex_direct_notype_declarator): Set complexity
10038         of namespace-qualified ids to -1, enter the namespace.
10040         * method.c (build_template_decl_overload): Expect _DECL as first
10041         parameter.  Put context temporarily into current_namespace.
10042         * pt.c (check_explicit_specialization): Change caller.
10043         (tsubst): Likewise.
10045         * init.c (build_offset_ref): Call mark_used and
10046         convert_from_reference for namespace members.
10048 Mon Jul 13 23:25:28 1998  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10050         * search.c (my_tree_cons): The bitfield is at index 2.
10052 Mon Jul 13 17:21:01 1998  Nick Clifton  <nickc@cygnus.com>
10054         * lang-options.h: Format changed to work with new --help support
10055         in gcc/toplev.c
10057 1998-07-12  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10059         * decl2.c (build_expr_from_tree): Change calls of do_identifier.
10060         Do Koenig lookup in CALL_EXPR.
10061         (arg_assoc): Handle error_mark.
10062         * lex.c (is_global): New function.
10063         (do_identifier): Expect arguments for Koenig lookup.
10064         * parse.y (primary): Add rules for calls of unqualified function calls.
10065         (do_id): Change call of do_identifier.
10066         * pt.c (finish_stmt_expr): Likewise.
10067         * semantics.c (finish_id_expr): Likewise.
10068         (finish_call_expr): Add integer parameter to indicate
10069         argument-dependent lookup.
10071         * decl.c (struct binding_level): New field using_directives.
10072         (push_using_decl): Not sorry anymore.
10073         (push_using_directive): New function.
10074         (lookup_tag): Use CP_DECL_CONTEXT to iterate.
10075         (unqualified_namespace_lookup): New function, code from ...
10076         (lookup_name_real): ... here.
10077         * decl2.c (lookup_using_namespace): Pass using list instead of
10078         initial scope.
10079         (validate_nonmember_using_decl): New function.
10080         (do_nonmember_using_decl): New function.
10081         (do_toplevel_using_decl): Use them.
10082         (do_local_using_decl): New function.
10083         (do_using_directive): Support block-level directives.
10084         * parse.y (simple_stmt): Support using declarations and
10085         directives.
10086         (namespace_qualifier, namespace_using_decl): New non-terminals.
10088         * xref.c (classname): New function.
10089         (GNU_xref_hier): Change class and base parameters to tree.
10090         * decl.c (xref_baseypes): Change caller.
10091         * friend.c (make_friend_class): Likewise.
10093 1998-07-12  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
10095         * typeck.c (comptypes, case TEMPLATE_TEMPLATE_PARM): Add parameter
10096         comparison.
10098         * pt.c (for_each_template_parm, case TEMPLATE_DECL): If it is a
10099         template template parameter, record its use.
10100         (for_each_template_parm, case TEMPLATE_TEMPLATE_PARM): Traverse
10101         its template arguments if exists.
10103         * pt.c (coerce_template_template_parms): New function equivalent
10104         to coerce_template_parms when IS_TMPL_PARM is true.
10105         (coerce_template_parms): Use it.  Remove the IS_TMPL_PARM parameter,
10106         all callers changed.
10108         (coerce_template_parms): Access ARGLIST properly when creating a
10109         new vector.  Only accept implicit TYPE_DECL as valid argument for
10110         a template template parameter when it is a base class of
10111         current_class_type.  Don't display error message when COMPLAIN is
10112         false.
10114 1998-07-12  Klaus Kaempf  (kkaempf@progis.de)
10116         * repo.c (get_base_filename): Use file_name_nondirectory.
10117         (open_repo_file): Likewise.
10118         * cp-tree.h (file_name_nondirectory): Add prototype.
10120 1998-07-12  Jason Merrill  <jason@yorick.cygnus.com>
10122         * friend.c (do_friend): Pull the identifier out of declarator.
10123         Use cp_error and friends.
10124         * decl2.c (qualified_lookup_using_namespace): Fix call to
10125         purpose_member.
10126         * decl.c (lookup_name_real): Don't call complete_type on a namespace.
10127         (grokvardecl): Use DECL_CLASS_SCOPE_P.
10128         * cvt.c (convert_pointer_to_real): Check for error_mark_node sooner.
10129         * class.c (warn_hidden): Fix for OVERLOAD.
10130         From grahams@rcp.co.uk:
10131         * cp-tree.h (DEFARG_NODE_CHECK): New macro.
10132         (DEFARG_LENGTH, DEFARG_POINTER): Use it.
10134 Sun Jul 12 01:20:57 1998  Jeffrey A Law  (law@cygnus.com)
10136         * g++.1 (-traditional): Remove duplicated documentation.
10138 1998-07-11  Mark Mitchell  <mark@markmitchell.com>
10140         * method.c (flush_repeats): Add nrepeats parameter.
10141         (issue_nrepeats): Likewise.
10142         (is_back_referenceable_type): New function.  Don't back-reference
10143         TEMPLATE_TYPE_PARMs as well as simple types like integers.
10144         (build_mangled_name_for_type): Likewise.
10145         (build_mangled_name_for_type_with_Gcode): Likewise.
10146         (lasttype): Remove.
10147         (nrepeats): Likewise.
10148         (Nrepeats): Likewise.
10149         (start_squangling): Don't clear the variables removed above.
10150         (end_squangling): Likewise.
10151         (flush_repeats): Tidy.  Use nrepeats parameter rather than
10152         Nrepeats global.
10153         (issue_nrepeats): Likewise, but with nrepeats global.  Use
10154         is_backreferenceable_type.
10155         (build_overload_nested_name): Tidy.  Add comment.  Use
10156         build_mangled_name_for_type.
10157         (build_underscore_int): Comment.
10158         (build_overload_scope_ref): Use build_mangled_name_for_type.
10159         (build_overload_int): Likewise.
10160         (build_template_template_parm_names): Tidy.
10161         (build_template_parm_names): Use build_mangled_name_for_type.
10162         (build_overload_identifier): Add comments.
10163         (build_mangled_name_for_type_with_Gcode): Split out from
10164         build_mangled_name.
10165         (build_mangled_name_for_type): Use it.
10166         (build_mangled_name): Rework to use build_mangled_name_for_type
10167         and to not use global nrepeats/Nrepeats.  Tidy.
10168         (process_modifiers): Tidy.
10169         (check_btype): Use is_backreferenceable_type.  Add comment.
10170         Rename `node' to `type'.
10171         (process_overload_item): Set numeric_output_need_bar here.
10172         Use build_mangled_name_for_type.  Tidy.
10173         (build_decl_overload_real): Tidy.  Don't use Nrepeats.  Use
10174         build_mangled_name_for_type.
10176         * pt.c (push_template_decl_real): Don't look at DECL_TEMPLATE_INFO
10177         for TYPE_DECLs.
10179 1998-07-08  Vladimir N. Makarov  <vmakarov@cygnus.com>
10181         * cp-tree.h (warn_long_long): Define.
10182         * decl.c (grokdeclarator): Add flag `warn_long_long' as guard for
10183         warning "ANSI C++ does not support `long long'".
10184         * decl2.c (warn_long_long): Define.
10185         (lang_decode_option): Parse -Wlong-long, -Wno-long-long options.
10187 1998-07-07  Jason Merrill  <jason@yorick.cygnus.com>
10189         * decl.c (xref_tag): Handle attributes between 'class' and name.
10190         * parse.y (aggr): Likewise.
10191         * semantics.c (finish_class_definition): Likewise.
10192         * Makefile.in (EXPECTED): Adjust.
10194         * cp-tree.h: Declare flag_optional_diags and warn_multichar.
10195         * decl2.c: Define them.
10196         (lang_decode_option): Handle them.
10197         * lang-options.h: Add -foptional-diags.
10198         * class.c (finish_struct): Don't complain about multiple meanings of
10199         name if -fno-optional-diags.
10200         * decl.c (pushdecl_class_level): Likewise.
10201         * lex.c (real_yylex): Check warn_multichar.
10203 1998-07-06  Jason Merrill  <jason@yorick.cygnus.com>
10205         * decl.c (lookup_tag): Use CP_DECL_CONTEXT.
10207         * tree.c (make_binfo): Fix length.
10209 1998-06-30  Benjamin Kosnik  <bkoz@bliss.nabi.net>
10211         * decl2.c (lang_decode_option): Remove warn_template_debugging.
10212         * lang-options.h: Likewise.
10214 Mon Jun 29 20:17:40 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10216         * except.c (build_eh_type_type_ref): Remove unused variable `susp'.
10217         (process_start_catch_block): Likewise for variables
10218         `false_label_rtx', `call_rtx' and `return_value_rtx'.
10220 1998-06-29  Brendan Kehoe  <brendan@cygnus.com>
10222         * tree.c (build_srcloc): Make sure we allocate this node on the
10223         permanent obstack.
10225 Sat Jun 27 23:34:18 1998  Fred Fish  <fnf@ninemoons.com>
10227         * g++spec.c (NEED_MATH_LIBRARY): Define to 1 if not already defined.
10228         (lang_specific_driver): Initialize need_math with NEED_MATH_LIBRARY.
10229         (lang_specific_driver): Only add -lm automatically if need_math is
10230         nonzero.
10232 Sat Jun 27 12:22:56 1998  Jeffrey A Law  (law@cygnus.com)
10234         * Make-lang.in (g++): Depend on mkstemp.o.  Link in mkstemp.o
10236 Sat Jun 27 07:36:09 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10238         * Makefile.in (EXPR_H): New dependency variable.
10239         (decl2.o): Depend on $(EXPR_H).
10240         (typeck.o): Likewise.
10241         (init.o): Likewise.
10242         (expr.o): Likewise.
10244 1998-06-25  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
10246         * decl.c (start_enum): Put local enums on permanent_obstack.
10248 1998-06-25  Mark Mitchell  <mark@markmitchell.com>
10250         * cp-tree.h (c_get_alias_set): Declare.
10251         * decl.c (init_decl_processing): Set lang_get_alias_set.
10253 1998-06-25  Andrew MacLeod  <amacleod@cygnus.com>
10255         * cp-tree.h (mark_all_runtime_matches): Add function prototype.
10256         * except.c (mark_all_runtime_matches): Set TREE_SYMBOL_REFERENCED
10257         flag for all function decls which are in the exception table.
10258         * exception.cc (__cplus_type_matcher): Check for CATCH_ALL_TYPE match.
10259         * decl2.c (finish_file): Call mark_all_runtime_matches to make sure
10260         code is emitted for any referenced rtti function.
10262 1998-06-25  Dave Brolley  <brolley@cygnus.com>
10264         * lang-specs.h: Use new | syntax to eliminate
10265         string concatenation.
10267 1998-06-25  Jason Merrill  <jason@yorick.cygnus.com>
10269         * cp-tree.h (CP_DECL_CONTEXT): New macro.
10270         * decl2.c (is_namespace_ancestor, lookup_using_namespace): Use it.
10271         * method.c (build_overload_nested_name): Likewise.
10272         * sig.c (build_signature_pointer_or_reference_type): Don't set
10273         DECL_CONTEXT.
10275 1998-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10277         Set DECL_CONTEXT for globals to NULL_TREE instead of global_namespace.
10278         * cp-tree.h (FROB_CONTEXT): New macro.
10279         (DECL_MAIN_P): ::main should have a DECL_CONTEXT of NULL_TREE.
10280         * decl.c (namespace_binding): Replace NULL_TREE with
10281         global_namespace.
10282         (set_namespace_binding, pop_namespace, lookup_name_real): Likewise.
10283         * decl2.c (is_namespace_ancestor, lookup_using_namespace):
10284         Likewise.
10285         * decl.c (pushtag): Use FROB_CONTEXT.
10286         (pushdecl, make_typename_type, define_function, grokdeclarator):
10287         Likewise.
10288         * decl2.c (set_decl_namespace, do_namespace_alias): Likewise.
10289         * pt.c (push_template_decl_real, lookup_template_class, tsubst):
10290         Likewise.
10291         * decl2.c (decl_namespace): Return global_namespace if no context.
10292         * method.c (build_overload_nested_name): Expect null as context.
10293         * pt.c (mangle_class_name_for_template): Do nothing for null
10294         contexts.
10295         (lookup_template_class): Allow for null id_context.
10297 1998-06-25  Richard Henderson  <rth@cygnus.com>
10299         * method.c (emit_thunk): Set current_function_is_thunk for the
10300         ASM_OUTPUT_MI_THUNK case as well.
10302 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
10304         * exception.cc (__cplus_type_matcher): Get a match_info pointer
10305         instead of an exception table entry as a parameter.
10307 1998-06-23  Andrew MacLeod  <amacleod@cygnus.com>
10309         * parse.y (function_try_block): Don't call start_catch_handler.
10310         * except.c (call_eh_info): Remove coerced field from declaration.
10311         (build_eh_type_type_ref): New function to create an address of a
10312         rtti function for the new style exception tables.
10313         (expand_start_catch_block): Split function, this contains the
10314         common part.
10315         (process_start_catch_block_old): New function to perform the rest
10316         of expand_start_catch_block under old style exceptions.
10317         (process_start_catch_block_old): New function to perform the rest
10318         of expand_start_catch_block under new style exceptions.
10319         (expand_end_catch_block): Only pop the false label off the stack under
10320         the old style of exceptions.
10321         * semantics.c (finish_try_block): Don't call start_catch_handler.
10322         * exception.cc (struct cp_eh_info): Add original_value field.
10323         (__cplus_type_matcher): Perform type matching on the original exception
10324         value, and if we have a match, set the current value.
10325         (__cp_push_exception): Set the original exception value.
10327 1998-06-23  Jason Merrill  <jason@yorick.cygnus.com>
10329         * call.c (joust): Fix confusing conversion warning.
10331         * call.c (build_op_delete_call): Add placement parm.  Check
10332         LOOKUP_SPECULATIVELY.
10333         * cp-tree.h, decl2.c, init.c: Adjust.
10334         * decl.c (finish_function): Use it.
10336         * pt.c (tsubst): Diagnose creating void fields or variables.
10338 Mon Jun 22 08:50:26 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10340         * call.c (build_scoped_method_call): Remove unused variable `tmp'.
10342         * cp-tree.h (check_dtor_name): Add prototype.
10344         * init.c (expand_member_init): Remove unused variables
10345         `ptr_type_node', `parm' and `rval'.
10347         * ptree.c (print_lang_type): Use HOST_WIDE_INT_PRINT_DEC specifier
10348         in call to fprintf.
10349         (lang_print_xnode): Likewise.
10351         * typeck2.c (enum_name_string): Cast argument to sprintf to long
10352         and use %ld specifier.
10354         * xref.c (GNU_xref_end_scope): Use HOST_WIDE_INT_PRINT_DEC
10355         specifier in call to fprintf.
10356         (GNU_xref_member): Cast argument to sprintf to int.
10358 Fri Jun 19 23:22:42 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
10360         * typeck2.c (pop_init_level): Warn about implicit zero initialization
10361         of struct members.
10363 Thu Jun 18 09:32:32 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10365         * cp-tree.h: Prototype function `check_java_method'.
10367 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
10369         * class.c (finish_struct): Make conflicting use of id a pedwarn.
10370         * decl.c (pushdecl_class_level): Likewise.
10372 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
10374         * pt.c (convert_nontype_argument): Issue an error when presented
10375         with an integer (real) constant that cannot be simplified to an
10376         INT_CST (REAL_CST).
10378         * cp-tree.h (c_get_alias_set): Remove declaration added in
10379         1998-06-13 change that should never have been checked in.
10381 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
10383         * typeck.c (build_binary_op_nodefault): Change % in format strings
10384         to %%.
10386         * decl.c (grokvardecl): Don't build_static_name for decls that
10387         aren't at namespace scope.
10389         * init.c (perform_member_init): Catch default-initialization of
10390         references.
10392 1998-06-17  Mark Mitchell  <mark@markmitchell.com>
10394         * errfn.c (cp_thing): Handle the `%%' formatting sequence.
10396 1998-06-17  Jason Merrill  <jason@yorick.cygnus.com>
10398         * method.c (hack_identifier): Complain about getting a namespace
10399         or class template.
10400         * typeck.c (decay_conversion): Remove check for namespaces.
10401         * typeck2.c (incomplete_type_error): Likewise.
10402         * parse.y (template_arg): Add PTYPENAME expansion.
10404 1998-06-16  Andrew MacLeod  <amacleod@cygnus.com>
10406         * decl.c (grokvardecl): Don't build external assembler names for
10407         TYPENAMEs in other namespaces as there is no declarator.
10408         * error.c (cp_file_of, cp_line_of): Don't extract file or line number
10409         info from DECL_CONTEXT if it is NULL.
10411 1998-06-16  Jason Merrill  <jason@yorick.cygnus.com>
10413         * call.c (check_dtor_name): Split out.
10414         (build_scoped_method_call): Use it.
10415         (build_method_call): Use it.
10416         * init.c (build_offset_ref): Use it.
10418         * typeck.c (build_static_cast): Fix handling of pointers to members.
10420         * decl.c (finish_function): Just return nothing from a constructor.
10421         * typeck.c (c_expand_return): Complain about returning a void
10422         expression from a destructor.
10424 1998-06-13  Mark Mitchell  <mark@markmitchell.com>
10426         * class.c (alter_access): Accept a BINFO explaining how to get
10427         from the entity whose accessed is being altered to the type doing
10428         the altering.
10429         (handle_using_decl): New function containing code split out from ...
10430         (finish_struct_1): Here.
10432         * cp-tree.h (complete_type_or_else): Declare.
10433         * init.c (build_new_1, build_delete): Use it.
10434         * typeck.c (require_complete_type): Use complete_type, rather than
10435         expanding it inline.
10436         (complete_type_or_else): New function.
10437         (build_component_ref): Use it.
10438         (pointer_int_sum): Make sure the type pointed to is complete.
10439         (pointer_diff): Likewise.
10441         * pt.c (for_each_template_parm): Traverse the TYPE_CONTEXT for
10442         types.
10444         * search.c (get_matching_virtual): Note that member templates
10445         cannot override virtual functions.
10447 1998-06-12  Brendan Kehoe  <brendan@cygnus.com>
10449         * pt.c (check_explicit_specialization): If DECLARATOR turned into
10450         an error_mark_node from lookup_template_function, return the same.
10451         (determine_specialization): Also make sure TEMPLATE_ID isn't an
10452         error_mark_node, before we try to read its operands.
10453         * decl.c (grokdeclarator): If we got an error_mark_node from
10454         check_explicit_specialization, just return it right back.
10456 1998-06-12  Mark Mitchell  <mark@markmitchell.com>
10458         * class.c (instantiate_type): Don't treat template-ids that don't
10459         specify any template arguments as equivalent to ordinary
10460         identifiers.  Use OFFSET_REF instead of SCOPE_REF to refer to
10461         pointer-to-members for member templates.  Tidy slightly.
10462         * cp-tree.def (TEMPLATE_ID_EXPR): Revise documentation.
10463         * init.c (build_offset_ref): Handle template-ids like ordinary
10464         identifiers, for the most part, but store a TEMPLATE_ID_EXPR in the
10465         offset part of the OFFSET_REF.
10466         * typeck.c (build_unary_op): Change check for unknown types to
10467         look for OFFSET_REFs, not SCOPE_REFs.
10469 1998-06-11  Mark Mitchell  <mark@markmitchell.com>
10471         * pt.c (is_member_template_class): New function.
10472         (push_template_decl_real): Use it.
10474 1998-06-11  Benjamin Kosnik  <bkoz@elmo.cygnus.com>
10476         * friend.c (do_friend): Add support for nested classes using
10477         member functions of the enclosing class as friends.
10479 1998-06-10  Mark Mitchell  <mark@markmitchell.com>
10481         * call.c (convert_default_arg): Make global, not static.
10482         (convert_arg_for_ellipsis): Split out from ...
10483         (build_over_call): Here.
10484         * cp-tree.h (convert_default_arg); Declare.
10485         (convert_arg_to_ellipsis): Likewise.
10486         (do_member_init): Remove.
10487         * init.c (do_member_init): Remove; this code is dead.
10488         (expand_member_init): Remove much of this code; it is dead.
10489         * typeck.c (convert_arguments): Use convert_default_arg and
10490         convert_arg_for_ellipsis, rather than duplicating here.
10492         * call.c (convert_like): Don't fail silently if
10493         build_user_type_conversion fails.  Always return error_mark_node
10494         for failure.
10496 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
10498         * search.c (covariant_return_p): Complain about ambiguous base.
10500         * typeck.c (build_component_ref): Diagnose ref to nested type.
10502 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
10504         * decl.c (grokparms): Check that INIT isn't an error_mark_node
10505         before giving error about invalid type for default arg.
10507 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
10509         * call.c (build_method_call): Fix thinko.
10511 1998-06-10  Dave Brolley  <brolley@cygnus.com>
10513         * decl2.c (lang_decode_option): New argc/argv interface.
10514         * cp-tree.h (lang_decode_option): New argc/argv interface.
10515         * lang-specs.h (default_compilers): Only call cpp if -E, -M or -MM is
10516         specified for cpplib-enabled compilers.
10517         * lex.c (lang_init): Don't check_newline for cpplib.
10518         (init_parse): Don't initialize cpplib here.
10520 1998-06-10  Brendan Kehoe  <brendan@cygnus.com>
10522         * typeck.c (build_component_ref): Make sure FIELD has a lang_specific
10523         piece before checking DECL_MUTABLE_P.
10525 1998-06-10  John Carr  <jfc@mit.edu>
10527         * tree.c (debug_binfo): Make printf format match arguments.
10529         * error.c (OB_PUTI): Make printf format match arguments.
10531 1998-06-10  Jason Merrill  <jason@yorick.cygnus.com>
10533         * init.c (perform_member_init): Handle default-initialization.
10535         * except.c (build_throw): Handle throwing NULL.
10537         * typeck.c (build_x_function_call): Use resolve_offset_ref.
10539         * search.c (compute_access): Only strip an anonymous union
10540         for a FIELD_DECL.
10542         * call.c (add_builtin_candidates): Tweak.
10544         * cvt.c (build_expr_type_conversion): Restore code for conversion
10545         from class types.
10546         * decl2.c (delete_sanity): Use it.  Clean up.
10548         * typeck.c (comp_ptr_ttypes_real): Fix cv-qual comparisons.
10550 1998-06-10  Branko Cibej  <branko.cibej@hermes.si>
10552         * typeck.c (c_expand_return): Don't warn about void expressions on
10553         return statements in functions returning void.
10555 1998-06-09  Mark Mitchell  <mark@markmitchell.com>
10557         * pt.c (fn_type_unification): Revise documentation.  Tidy.
10558         (type_unification): Likewise.
10560 1998-06-09  Andrew MacLeod  <amacleod@cygnus.com>
10562         * semantics.c (finish_try_block): Rename expand_start_catch, and delete
10563         expand_end_catch.
10564         * parse.y (function_try_block): Rename expand_start_catch, and delete
10565         expand_end_catch.
10566         * except.c (expand_end_eh_spec): Rename expand_start_catch, and delete
10567         expand_end_catch.
10569 1998-06-09  Jason Merrill  <jason@yorick.cygnus.com>
10571         * search.c (lookup_member): New fn.
10572         * class.c (finish_struct_1): Use it.
10573         * decl.c (lookup_name_real): Use it.
10575 Mon Jun  8 20:45:52 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10577         * Makefile.in (decl2.o): Depend on dwarf2out.h and dwarfout.h.
10579         * cp-tree.h: Add prototype for `maybe_print_template_context' and
10580         `maybe_make_one_only'.
10582         * decl.c (auto_function): Remove unused variable `decl'.
10584         * decl2.c: Include dwarf2out.h and dwarfout.h.
10586         * lex.c: Remove redundant declarations of `set_float_handler' and
10587         `asm_out_file'.
10589 1998-06-08  Andrew MacLeod  <amacleod@cygnus.com>
10591         * except.c (init_exception_processing): Remove NEW_EH_MODEL compile
10592         time flag.  Call __cp_eh_info instead of __cp_exception_info.
10593         * exception.cc (struct cp_eh_info): Remove NEW_EH_MODEL flag.
10594         (__cp_exception_info): Return offset into cp_eh_info structure to
10595         match what use to be the start of this structure.
10596         (__cp_eh_info): New function to return a pointer to cp_eh_info struct.
10597         (__cplus_type_matcher, __cp_push_exception): Remove NEW_EH_MODEL
10598         compile time flag.
10599         (__uncatch_exception, __check_eh_spec, std::uncaught_exception): Call
10600         __cp_eh_info instead of __cp_exception_info.
10602 1998-06-08  Jason Merrill  <jason@yorick.cygnus.com>
10604         * decl.c (cp_finish_decl): Disable inlining of extern inlines
10605         with static variables.
10607 1998-06-08  Mark Mitchell  <mark@markmitchell.com>
10609         * init.c (build_offset_ref): Correct previous change to use build,
10610         not build_min.
10612 1998-06-07  Mark Mitchell  <mark@markmitchell.com>
10614         * class.c (instantiate_type): Handle pointer-to-members where the
10615         member is a template.
10616         * init.c (build_offset_ref): Likewise.
10617         * typeck.c (build_unary_op): Likewise.
10619 1998-06-07  Richard Henderson  <rth@cygnus.com>
10621         * lex.c (lang_init_options): New function.
10622         (lang_init): Remove flag_exceptions == 2 hack.
10624 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
10626         * search.c (envelope_add_decl): Tweak for implicit typename.
10628         * call.c (joust): Also warn about confusing conversion op/constructor
10629         overload resolution.
10631         * spew.c (yylex): Also return the TYPE_DECL if got_object.
10632         Don't clear got_object after '~'.
10633         * call.c (build_scoped_method_call): Tweak destructor handling.
10634         (build_method_call): Likewise.
10635         * pt.c (tsubst_copy, case METHOD_CALL_EXPR): Don't mess with
10636         TYPE_MAIN_VARIANT for destructors.
10637         * semantics.c (finish_object_call_expr): Complain about calling a
10638         TYPE_DECL.
10640 1998-06-05  Per Bothner  <bothner@cygnus.com>
10642         * g++spec.c (lang_specific_pre_link, lang_specific_extra_ofiles):
10643         Define - update needed by gcc.c change.
10645 1998-06-05  Jason Merrill  <jason@yorick.cygnus.com>
10647         * error.c (cp_printers): Use 'o' instead of '_' for the null entry.
10649 1998-06-05  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
10651         * cp-tree.h (DECL_NAMESPACE_ALIAS, ORIGINAL_NAMESPACE): Declare.
10652         * decl.c (lookup_name_real): Add namespaces_only parameter.
10653         If set, return only NAMESPACE_DECLs.
10654         (select_decl): Likewise.
10655         (identifier_type_value): Give additional parameter.
10656         (lookup_name_nonclass): Likewise.
10657         (lookup_name): Likewise.
10658         (find_binding): Skip namespace aliases.
10659         (binding_for_name): Likewise.
10660         (push_namespace): Check for namespace aliases.
10661         (lookup_name_namespace_only): New function.
10662         (begin_only_namespace_names, end_only_namespace_names): New functions.
10663         * decl2.c (set_decl_namespace): Skip namespace aliases.
10664         (do_using_directive): Likewise.
10665         (do_namespace_alias): Produce namespace aliases, fix alias
10666         redeclaration.
10667         * error.c (dump_decl): Support SCOPE_REF.
10668         * parse.y (extdef): Wrap lookup with namespace_only for namespace
10669         aliases and using declarations.
10671 1998-06-04  Jason Merrill  <jason@yorick.cygnus.com>
10673         * tree.c (really_overloaded_fn): Only see through one TREE_LIST.
10675         * error.c (dump_expr): Clean up NEW_EXPR case.
10677 1998-06-04  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10679         Suggested by Brendan Kehoe
10680         * decl2.c (do_toplevel_using_decl): When decl is a TYPE_DECL,
10681         treat it as using ::decl.
10683         * decl2.c (arg_assoc_type): Process unknown_type_node and OFFSET_TYPE.
10685         * tree.c (mapcar): Support NEW_EXPR.
10687         * error.c (dump_expr): Support NEW_EXPR.
10689 1998-06-03  Jason Merrill  <jason@yorick.cygnus.com>
10691         * method.c (make_thunk): Use overload machinery to make name.
10692         * search.c (covariant_return_p): New fn.
10693         (get_matching_virtual): Use it.
10695         * init.c (build_new_1): Fix check for void.
10697 1998-06-01  Per Bothner  <bothner@cygnus.com>
10699         * cp-tree.h (TYPE_FOR_JAVA):  New macro.
10700         * decl.c, cp-tree.h (java_byte_type_node, java_short_type_node,
10701         java_int_type_node, java_long_type_node, java_float_type_node,
10702         java_double_type_node, java_char_type_node, java_boolean_type_node):
10703         New "primitive" types, with predefined names __java_byte etc.
10704         (record_builtin_java_type):  New function.
10705         (init_decl_processing):  Make Java types with record_builtin_java_type.
10706         (pushtag, grokdeclarator):  Set TYPE_FOR_JAVA if in extern "JAVA".
10707         (xref_baseypes):  If base class was TYPE_FOR_JAVA, so is this class.
10708         (grokfndecl):  Call check_java_method for Java classes.
10709         * method.c (is_java_type):  Removed.  Replaced with TYPE_FOR_JAVA.
10710         (process_overload_item):  Match types against specific
10711         java_XX_type_node types, rather than using is_java_type.
10712         * class.c (finish_struct_1):  Don't add default copy constructor
10713         or operator= if TYPE_FOR_JAVA.
10714         (pop_lang_conext):  Restore strict_prototyp proper if Java.
10715         * decl2.c (acceptable_java_type, check_java_method):  New functions.
10716         * pt.c (instantiate_class_template):  Copy TYPE_FOR_JAVA from pattern.
10717         (tsubst):  Move common statement after if statement.
10718         * typeck.c (comptypes):  If strict, TYPE_FOR_JAVA must match.
10720 1998-06-01  Jason Merrill  <jason@yorick.cygnus.com>
10722         * pt.c (for_each_template_parm): Use first_rtl_op.
10724         * tree.c (build_cplus_array_type_1): Also check index_type for
10725         template parms.
10727 1998-05-31  Jason Merrill  <jason@yorick.cygnus.com>
10729         * pt.c (tsubst): Always copy BINFO_BASETYPES.
10731 1998-05-29  scott snyder  <snyder@d0sgif.fnal.gov>
10733         * tree.c (layout_basetypes): If we change TYPE_SIZE, change
10734         TYPE_SIZE_UNIT too.
10736 1998-05-29  Mark Mitchell  <mark@markmitchell.com>
10738         * decl.c (grokdeclarator): Don't complain about in-class
10739         initialization of static consts if we don't really know the type
10740         of the variable.
10742 1998-05-29  Jason Merrill  <jason@yorick.cygnus.com>
10744         * cp-tree.h (DECL_DESTRUCTOR_P): New macro.
10745         * method.c (build_destructor_name): New fn.
10746         * decl2.c (maybe_retrofit_in_chrg): Split out...
10747         (grokclassfn): From here.  Reorganize.
10748         * decl.c (grok_ctor_properties): Make sure ctors for types with
10749         vbases have the in_chrg parm.
10750         * pt.c (instantiate_class_template): Update
10751         TYPE_USES_VIRTUAL_BASECLASSES from tsubsted bases.  Don't call
10752         grok_*_properties.
10753         (tsubst): Call grok_ctor_properties and maybe_retrofit_in_chrg.
10755 1998-05-28  Mark Mitchell  <mark@markmitchell.com>
10757         * pt.c (instantiate_decl): Make test for whether or not static
10758         variables should be instantiated early match its comment.
10760 1998-05-28  Jason Merrill  <jason@yorick.cygnus.com>
10762         * decl.c (start_decl): Always pedwarn about vacuously redeclaring
10763         a member.
10764         (start_function): Call check_default_args.
10765         * decl2.c (grokfield): Don't call check_default_args.
10766         (check_default_args): Use cp_error_at.
10767         * lex.c (do_pending_defargs): Call check_default_args.
10769 1998-05-27  Brendan Kehoe  <brendan@cygnus.com>
10771         * call.c (build_method_call): Make sure get_type_value returns
10772         something before we try to use its TYPE_MAIN_VARIANT.
10773         (build_scoped_method_call): Likewise.
10775 1998-05-27  Jason Merrill  <jason@yorick.cygnus.com>
10777         * typeck2.c (digest_init): Complain about getting a TREE_LIST to
10778         initialize an array.
10780         * search.c (expand_upcast_fixups): Don't set DECL_CONTEXT and
10781         DECL_VIRTUAL_P.
10783         * friend.c (do_friend): Clarify template warning.
10785 1998-05-27  Mark Mitchell  <mark@markmitchell.com>
10787         * decl.c (shadow_label): Don't treat decls as identifiers.
10788         (maybe_push_to_top_level): Clear shadowed_labels.
10790         * pt.c (instantiate_decl): Reset lineno and filename after calling
10791         regenerate_decl_from_template.
10793         * decl.c (grokdeclarator): Don't try to use TYPE_OBSTACK on an
10794         error_mark_node.
10796 1998-05-27  Kevin Buhr  <buhr@stat.wisc.edu>
10798         * parse.y (base_class): Use is_aggr_type, not IS_AGGR_TYPE.
10800 1998-05-26  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
10802         * pt.c (process_template_parm): Accept TYPENAME_TYPE nodes.
10803         (convert_nontype_argument): Handle cases when nontype template
10804         parameters become classes after substitution.
10806 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
10808         * friend.c (is_friend): Use comptypes, rather than == to compare
10809         types.  Modify for new representation of template friends.
10810         (make_friend_class): Likewise.
10811         * pt.c (tsubst_friend_class): Undo 1998-05-21 change.  Tweak.
10812         (instantiate_class_template): Deal with template friends.
10814         * decl.c (store_parm_decls): Remove redundant call to
10815         expand_main_function.
10817 1998-05-26  Benjamin Kosnik  <bkoz@loony.cygnus.com>
10819         * decl.c (start_decl): Check for DECL_LANG_SPECIFIC before
10820         DECL_USE_TEMPLATE.
10822 1998-05-26  Per Bothner  <bothner@cygnus.com>
10824         * language_as_string:  Handle lang_java.
10826 1998-05-26  Jason Merrill  <jason@yorick.cygnus.com>
10828         * decl.c (pushdecl): Don't copy the type_decl.
10830 1998-05-26  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10832         * class.c (pushclass): Always store TYPE_MAIN_VARIANT in
10833         current_class_type.
10834         * decl.c (grokdeclarator): Put typedefs on the type's obstack.
10836         * parse.y (complex_direct_notype_declarator): Use $1 to access
10837         scope of notype_qualified_id.
10839 1998-05-26  Dave Brolley  <brolley@cygnus.com>
10841         * lex.c (parse_options,yy_cur,yy_lim): Add for cpplib.
10842         (init_parse): Initialize cpplib interface.
10844         * Makefile.in (CXX_OBJS): Make sure dependencies never end with an
10845         empty continuation.
10847 1998-05-26  Mark Mitchell  <mark@markmitchell.com>
10849         * decl.c (pushtag): Avoid crashing on erroneous input.
10851 1998-05-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10853         * decl.c (push_namespace): Only produce one unique name for
10854         anonymous namespaces.
10855         (get_unique_name): Remove.
10857 1998-05-25  Mark Mitchell  <mark@markmitchell.com>
10859         * call.c (tourney): Don't do any extra comparisons.
10861         * decl2.c (build_anon_union_vars): Don't crash on empty sub-unions.
10863         * cp-tree.h (processing_template_parmlist): Declare.
10864         * decl.c (pushtag): Don't call push_template_decl when we
10865         shouldn't.
10866         * pt.c (processing_template_parmlist): New variable.
10867         (TMPL_ARGS_HAVE_MULTIPLE_LEVELS): New macro.
10868         (complete_template_args): Use it.
10869         (add_to_template_args): Likewise.
10870         (innermost_args): Likewise.
10871         (tsubst): Likewise.
10872         (begin_template_parm_list): Use processing_template_parmlist.
10873         (end_template_parm_list): Likewise.
10875         * cp-tree.h (ANON_UNION_TYPE_P): New macro.
10876         * decl.c (grokdeclarator): Use it.
10877         * decl2.c (grok_x_components): Likewise.
10878         * init.c (initializing_context): Likewise.
10879         * method.c (do_build_copy_constructor): Likewise.
10880         (do_build_assign_ref): Likewise.
10881         * search.c (compute_access): Likewise.
10882         * typeck.c (build_component_ref): Likewise.
10884         * decl.c (grokdeclarator): Don't give a cv-qualified version of an
10885         unnamed type a typedef name "for linkage purposes".
10887         * pt.c (lookup_template_class): Don't look at
10888         IDENTIFIER_CLASS_VALUE when there's no current_class_type.
10890         * method.c (build_overload_int): Handle error cases gracefully.
10892         * pt.c (instantiate_decl): Handle static member variables
10893         correctly.
10895         * pt.c (tsubst): Use the tsubst'd type when producing new
10896         TEMPLATE_PARM_INDEX nodes.
10898 1998-05-24  Mark Mitchell  <mark@markmitchell.com>
10900         * tree.c (cp_tree_equal): Handle pointers to member functions.
10902         * call.c (maybe_handle_implicit_object): Handle QUAL_CONVs.  Make
10903         sure the type of the REF_BIND is a reference type.
10904         (maybe_handle_ref_bind, compare_ics): Rename reference_type to
10905         target_type for clarity.
10907         * parse.y (xcond): Move call to condition_conversion ...
10908         * semantics.c (finish_for_cond): Here.
10909         * parse.c: Regenerated.
10911 1998-05-24  Jason Merrill  <jason@yorick.cygnus.com>
10913         * decl.c (push_namespace): Namespaces have type void.
10914         * typeck2.c (incomplete_type_error): Complain about namespace
10915         used as expression.
10916         * typeck.c (decay_conversion): Likewise.
10918 1998-05-24  Martin von Löwis  <loewis@informatik.hu-berlin.de>
10920         * error.c (dump_expr): Support namespaces.
10922 1998-05-23  Jason Merrill  <jason@yorick.cygnus.com>
10924         * cp-tree.def: Add SRCLOC.
10925         * cp-tree.h: Add struct tree_srcloc and accessor macros.
10926         * tree.c (build_srcloc, build_srcloc_here): New fns.
10927         * pt.c (add_pending_template): Use build_srcloc_here.
10928         (push_tinst_level): Update last_template_error_tick before erroring.
10929         (instantiate_decl): Restore lineno and input_filename before
10930         calling add_pending_template.
10931         * decl2.c (finish_file): Set up lineno and input_filename for
10932         pending templates.
10934 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
10936         * decl.c (lang_print_error_function): New fn.
10937         (init_decl_processing): Set print_error_function to use it.
10938         * errfn.c (cp_thing): Don't call maybe_print_template_context here.
10940         * call.c (maybe_handle_ref_bind): Propagate ICS_USER_FLAG and
10941         ICS_BAD_FLAG.
10943         * cvt.c (ocp_convert): Don't set LOOKUP_NO_CONVERSION for
10944         copy-initialization.
10946         * class.c (build_vtable_entry): Use int_fits_type_p.
10947         (build_vtable): Pass a signed offset to build_vtable_entry.
10948         (prepare_fresh_vtable, modify_one_vtable, fixup_vtable_deltas1,
10949         set_rtti_entry): Likewise.
10951 1998-05-22  Per Bothner  <bothner@cygnus.com>
10953         * cp-tree.h:  Add comments documenting which LANG_FLAGS are used.
10954         (C_TYPE_VARIABLE_SIZE, C_DECL_VARIABLE_SIZE):  Removed, not used.
10956 1998-05-22  Jason Merrill  <jason@yorick.cygnus.com>
10958         * pt.c (print_template_context): Use fprintf instead of cp_error.
10960         * pt.c (determine_specialization): Just return an error_mark_node.
10961         Also print the decl we want in error messages.  If we complain,
10962         return error_mark_node.
10963         (tsubst_friend_function): Set lineno and input_filename so
10964         error messages will be useful.
10965         (instantiate_template): Just return an error_mark_node.
10966         (check_explicit_specialization): Don't mess with a returned
10967         error_mark_node.
10969         * pt.c (print_template_context): Add new argument.
10970         (maybe_print_template_context): New fn.
10971         (push_tinst_level): Increment tinst_level_tick.
10972         (pop_tinst_level): Likewise.
10973         * errfn.c (cp_thing): Call maybe_print_template_context.  Use
10974         xrealloc instead of xmalloc.
10976         * typeck.c (build_unary_op, CONVERT_EXPR): Propagate TREE_CONSTANT.
10978 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
10980         * pt.c (tsubst_friend_class): Don't call redeclare_class_template
10981         if the template we looked up is the same as the one we already
10982         have.
10984 Thu May 21 11:54:44 1998  Dave Brolley  <brolley@cygnus.com>
10986         * lex.c: (handle_sysv_pragma): FILE* parameter not used.
10987         (cpp_reader,parse_in): Add for cpplib.
10988         (check_newline): Call handle_sysv_pragma with new interface.
10989         (check_newline): Call GET_DIRECTIVE_LINE, not get_directive_line.
10991         * input.c: (yy_cur,yy_lim,yy_get_token,GETC): Add for cpplib.
10992         (sub_getch): Call GETC for cpplib.
10994         * cp-tree.h: (get_directive_line): Different prototype for cpplib.
10995         (GET_DIRECTIVE_LINE): Macro wrapper for get_directive_line.
10997         * Makefile.in (CXX_OBJS): Add @extra_cxx_objs@ for cpplib.
10999 1998-05-21  Jason Merrill  <jason@yorick.cygnus.com>
11001         * decl2.c (maybe_make_one_only): New fn.
11002         (import_export_vtable): Use it.
11003         (import_export_decl): Likewise.
11004         * pt.c (mark_decl_instantiated): Likewise.
11006 1998-05-21  Mark Mitchell  <mmitchell@usa.net>
11008         * decl2.c (find_representative_member): Rename to ...
11009         (build_anon_union_vars): New function.
11010         (finish_anon_union): Fix stupidity of previous change.
11012 1998-05-20  Jason Merrill  <jason@yorick.cygnus.com>
11014         * decl.c (grokfndecl): Handle definition of specialization in
11015         friend declaration.
11017         * error.c (dump_decl): Fix LOOKUP_EXPR handling.
11019 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
11021         * class.c (delete_duplicate_fields_1): Use DECL_DECLARES_TYPE_P
11022         to look for type declarations.
11023         (finish_struct): Deal with templates on the CLASSTYPE_TAGS list.
11024         * cp-tree.h (DECL_DECLARES_TYPE_P): New macro.
11025         (finish_member_class_template): Declare.
11026         * decl.c (pushtag): Put member class templates on the
11027         CLASSTYPE_TAGS list, just as for ordinary member classes.
11028         (pushdecl_class_level): Use DECL_DECLARES_TYPE_P.
11029         (lookup_tag): Look for IDENTIFIER_CLASS_VALUEs, just as with
11030         IDENTIFIER_NAMESPACE_VALUEs.
11031         * parse.y (component_decl): Move code to ...
11032         * semantics.c (finish_member_class_template): New function.
11033         Don't put member class templates on the list of components for a
11034         class.
11035         * parse.c: Regenerated.
11036         * pt.c (classtype_mangled_name): Don't try DECL_CONTEXT on types.
11037         In fact, don't use DECL_CONTEXT at all here.
11039 1998-05-20  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11041         * decl.c (record_unknown_type): New function.
11042         (init_decl_processing): Call it for the unknown and global type
11043         nodes.
11045 1998-05-20  Mark Mitchell  <mmitchell@usa.net>
11047         * decl2.c (find_representative_member): New function.
11048         (finish_anon_union): Use it.
11050         * cp-tree.h (MAIN_NAME_P): New macro.
11051         (DECL_MAIN_P): Likwise.
11052         * decl.c (pushdecl): Avoid crashing on redefinitions of `main'.
11053         (grokfndecl): Use the new macros.
11054         (grokdeclarator): Likewise.
11055         (start_function): Likewise.
11056         (store_parm_decls): Likewise.
11057         (finsh_function): Likewise.
11058         * friend.c (do_friend): Likewise.
11059         * typeck.c (build_function_call_real): Likewise.
11060         (build_unary_op): Likewise.
11062 Wed May 20 02:16:01 1998  Jason Merrill  <jason@yorick.cygnus.com>
11064         * decl2.c (start_objects, finish_objects, do_dtors,
11065         do_ctors): Split out from...
11066         (finish_file): ...here.
11068 Tue May 19 20:36:23 1998  Jason Merrill  <jason@yorick.cygnus.com>
11070         * tree.c (is_overloaded_fn): Don't abort on placeholders from
11071         push_class_decls.
11073 Tue May 19 15:16:22 1998  Brendan Kehoe  <brendan@cygnus.com>
11075         * class.c (is_empty_class): Return 0 if TYPE is an error_mark_node.
11077         * error.c (dump_expr): Handle an ARROW_EXPR.
11079 Tue May 19 15:13:39 1998  Mark Mitchell  <mmitchell@usa.net>
11081         * decl.c (saveable_obstack): Declare.
11082         (pushdecl): Copy TYPE_DECLs to the same obstack as the type they
11083         declare, if necessary.
11085 Tue May 19 14:50:27 1998  Mark Mitchell  <mmitchell@usa.net>
11087         * call.c (compare_qual): Remove.
11088         (is_subseq): Tweak.
11089         (is_properly_derived_from): New function.
11090         (maybe_handle_ref_bind): Likewise.
11091         (maybe_handle_implicit_object): Likewise.
11092         (compare_ics): Modify substantially to bring into conformance with
11093         the standard.
11094         * cp-tree.h (TYPE_PTRMEMFUNC_OBJECT_TYPE): New macro.
11095         (comp_cv_qualification): Declare.
11096         (comp_cv_qual_signature): Likewise.
11097         * typeck.c (comp_cv_qualification): Likewise.
11098         (comp_cv_qual_signature): Likewise.
11100 Tue May 19 10:05:02 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11102         * Makefile.in (parse.o): Depend on toplev.h.
11104         * class.c (typecode_p): Remove prototype and definition.
11106         * cp-tree.h (currently_open_class, is_empty_class, member_p):
11107         Add prototype.
11109         * decl.c (push_overloaded_decl_top_level): Remove prototype and
11110         definition.
11112         * errfn.c (cp_error): Cast function pointer `error' to (errorfn *)
11113         in call to `cp_thing'.
11114         (cp_warning): Likewise for function pointer `warning'.
11116         * except.c (do_function_call): Remove prototype and definition.
11117         (call_eh_info): Wrap variable `t1' in macro NEW_EH_MODEL.
11119         * method.c (is_java_type): Add prototype and make it static.
11121         * parse.y: Include toplev.h.
11123         * pt.c (type_unification): Remove unused variable `arg'.
11124         (instantiate_decl): Likewise for `save_ti'.
11126         * tree.c (propagate_binfo_offsets): Likewise for `base_binfos'.
11128 Tue May 19 02:43:25 1998  Jason Merrill  <jason@yorick.cygnus.com>
11130         * init.c (build_member_call): Handle template_ids.
11131         * parse.y (primary): Add global_scope template_id.
11133 Mon May 18 23:22:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
11135         * decl2.c (get_sentry): Use end_temporary_allocation.
11136         Don't declare permanent_obstack.
11138 Mon May 18 12:28:44 1998  Mark Mitchell  <mmitchell@usa.net>
11140         * parse.y (.finish_new_placement): New non-terminal.
11141         (unary_expr, new_type_id): Use it.
11142         * parse.c: Regenerated.
11144 Mon May 18 12:20:27 1998  Brendan Kehoe  <brendan@cygnus.com>
11146         * pt.c (redeclare_class_template): Say where the original definition
11147         of the template-parameter's default argument appeared.
11149 Mon May 18 03:00:57 1998  Jason Merrill  <jason@yorick.cygnus.com>
11151         * call.c (build_over_call): Tweak empty class handling.
11153         * decl.c (make_typename_type): Use currently_open_class.
11155         * class.c (instantiate_type): Don't abort on TREE_NONLOCAL_FLAG.
11157 Mon May 18 01:43:01 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11159         * decl.c (lookup_name_real): Don't look at IDENTIFIER_LOCAL_VALUE
11160         for a type unless it is one.
11162         * class.c (finish_struct_1): Use OVL_CURRENT in error message.
11164 Mon May 18 01:24:08 1998  Jeffrey A Law  (law@cygnus.com)
11166         * Makefile.in (program_transform_name, objdir): Define.
11168         * Makefile.in (BISON): Use bison from the build tree if it exists.
11169         (FLEX): Likewise.
11171 Sun May 17 14:52:08 1998  Martin v. Loewis  <loewis@informatik.hu-berlin.de>
11173         * typeck.c (type_unknown_p): Return true for TREE_LIST also.
11175         * call.c (build_method_call): Use TYPE_MAIN_VARIANT on typedefs.
11177 Sun May 17 14:51:41 1998  Jason Merrill  <jason@yorick.cygnus.com>
11179         * call.c (build_scoped_method_call): Likewise.
11181 Sun May 17 13:53:48 1998  Mark Mitchell  <mmitchell@usa.net>
11183         * init.c (build_new_1): Call suspend_momentary around the creation
11184         of values that must be saved for exception handling.
11185         * parse.y (.build_new_placement): New non-terminal.
11186         (unary_expr, new_placement): Use it.
11187         * parse.c: Regenerated.
11189 Sun May 17 12:32:08 1998  Jason Merrill  <jason@yorick.cygnus.com>
11191         * decl.c (duplicate_decls): Use CANONICAL_TYPE_VARIANT to compare
11192         old and new types.
11194         * pt.c (tsubst): Make sure that BINFO_TYPE of new binfos is the
11195         canonical type.
11197         * call.c (build_over_call): Don't use IS_SIGNATURE on a namespace.
11199 Fri May 15 20:28:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
11201         * decl.c (start_decl): Revert problem change.
11203         * Makefile.in (CONFLICTS): Fix.
11205 Fri May 15 15:34:02 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11207         * decl.c (duplicate_decls): Clean up, add DECL_DATA_AREA bits.
11209 Fri May 15 00:46:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
11211         * class.c (finish_struct_1): Use BINFO_SIZE.
11213         * decl.c (start_decl): Use 'tem'.
11215 Thu May 14 16:30:47 1998  Andrew MacLeod  <amacleod@cygnus.com>
11217         * exception.cc: Include eh-common.h.
11218         (struct cp_eh_info): Add eh_info struct with NEW_EH_MODEL.
11219         (__cplus_type_matcher): First stab at new C++ runtime type matcher.
11220         (__cp_push_exception): Initialize eh_info struct as well.
11221         * except.c: Remove local structs and include eh-common.h.
11222         (init_exception_processing): Set language and version codes.
11223         (call_eh_info): Add presence of eh_info to runtime description of
11224         struct cp_eh_info.
11225         (expand_end_eh_spec): Call start_catch_block() and end_catch_block().
11226         * semantics.c (finish_try_block): Call start_catch_block() and
11227         end_catch_block().
11228         * parse.y (function_try_block): Call start_catch_block() and
11229         end_catch_block().
11231 Thu May 14 12:27:34 1998  Brendan Kehoe  <brendan@cygnus.com>
11233         * typeck.c (original_type): New function.
11234         (common_type): Use it to get the DECL_ORIGINAL_TYPE for T1 and T2,
11235         to see if they're actually the same.
11236         * cp-tree.h (original_type): Declare.
11238 Wed May 13 12:54:30 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11240         * Makefile.in (lex.o): Depend on output.h.
11242         * call.c (add_function_candidate): Remove unused variable `cand'.
11243         (add_conv_candidate): Likewise.
11244         (build_builtin_candidate): Likewise.
11246         * cp-tree.h: Add prototype for `types_overlap_p'.
11248         * decl.c (signal_catch): Mark parameter `sig' with ATTRIBUTE_UNUSED.
11250         * decl2.c (merge_functions): Remove unused variables `tmp' and
11251         `tempn'.
11253         * error.c (expr_as_string): Mark parameter `v' with ATTRIBUTE_UNUSED.
11254         (code_as_string): Likewise.
11255         (language_as_string): Likewise.
11256         (parm_as_string): Likewise.
11257         (op_as_string): Likewise.
11258         (assop_as_string): Likewise.
11259         (cv_as_string): Likewise.
11261         * lex.c: Include output.h.
11263         * pt.c (type_unification): Cast first argument of `bzero' to a char*.
11265         * search.c (dfs_no_overlap_yet): Mark parameter `t' with
11266         ATTRIBUTE_UNUSED.
11268         * tinfo.cc (__class_type_info::dcast): Change the type of variable
11269         `i' from int to size_t.
11271         * typeck.c (language_lvalue_valid): Mark parameter `exp' with
11272         ATTRIBUTE_UNUSED.
11274 Tue May 12 21:37:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
11276         * error.c (dump_simple_decl): Use DECL_CLASS_SCOPE_P and/or
11277         DECL_NAMESPACE_SCOPE_P.
11278         (lang_decl_name): Likewise.
11279         * pt.c (tsubst_friend_function, tsubst): Likewise.
11280         * decl.c (pushdecl, redeclaration_error_message, start_decl,
11281         cp_finish_decl, start_function): Likewise.
11282         * class.c (finish_struct_1): Likewise.
11283         * call.c (build_over_call): Likewise.
11284         (compare_ics): Use DERIVED_FROM_P.
11286 Tue May 12 07:24:18 1998  Mark Mitchell  <mmitchell@usa.net>
11288         * cp-tree.h (CANONICAL_TYPE_VARIANT): New macro.
11289         * method.c (build_mangled_name): Use it.
11290         (build_decl_overload_real): Likewise.
11292         * error.c (dump_simple_decl): New function, broken out from ...
11293         (dump_decl): Use it.
11295 Mon May 11 11:38:07 1998  Mark Mitchell  <mmitchell@usa.net>
11297         * ptree.c (lang_print_xnode): Add missing `break'.
11299         * pt.c (tsubst): Remove duplicate check for IDENTIFIER_NODE.
11301         * call.c (add_template_candidate): Adjust for changes to
11302         fn_type_unification.
11303         (add_template_candidate_real): Likewise.
11304         (add_template_conv_candidate): Likewise.
11305         (build_user_type_conversion_1): Likewise.
11306         (build_new_function_call): Likewise.
11307         (build_object_call): Likewise.
11308         (build_new_op): Likewise.
11309         (build_new_method_call): Likewise.
11310         * class.c (instantiate_type): Likewise.
11311         * cp-tree.h (unification_kind_t): New type.
11312         (fn_type_unification): Adjust prototype.
11313         (type_unificaiton): Likewise.
11314         * pt.c (UNIFY_ALLOW_NONE): New macro.
11315         (UNIFY_ALLOW_MORE_CV_QUAL): Likewise.
11316         (UNIFY_ALLOW_LESS_CV_QUAL): Likewise.
11317         (UNIFY_ALLOW_DERIVED): Likewise.
11318         (unify): Change prototype.
11319         (maybe_adjust_types_for_deduction): New function.
11320         (check_cv_quals_for_unify): Likewise.
11321         (determine_specialization): Adjust.
11322         (fn_type_unification): Likewise.
11323         (type_unification): Likewise.
11324         (type_unification_real): Likewise.  Use
11325         maybe_adjust_types_for_deduction.  Fix mishandling of
11326         back-unification of template functions passed as arguments.  Pass
11327         appropriate combination of UNIFY_ALLOW_* to unify.
11328         (unify): Remove unused NTPARMS parameter.  Use
11329         check_cv_quals_for_unify.  Remove bogus code that allowed
11330         too-generous unification in order to adhere more closely to standard.
11331         (get_bindings_real): Adjust.
11332         (get_class_bindings): Likewise.
11334         * method.c (build_overload_identifier): Only use the innermost
11335         template arguments when mangling.
11336         * pt.c (tsubst_template_argument_vector): New function.
11337         (complete_template_args): Deal with the situation where the
11338         extra_args contain more than one level of arguments.
11339         (lookup_template_class): Deal with member template classes, which
11340         may have more than one level of arguments.
11341         (tsubst): Don't tsbust into the TREE_TYPE of an IDENTIFIER_NODE.
11342         Improve handling of member template classes.  Use
11343         DECL_PRIMARY_TEMPLATE instead of inline expansion.  Use
11344         tsubst_template_argument_vector where appropriate.
11345         (regenerate_decl_from_template): Break out from ...
11346         (instantiate_decl): Here.
11348         * lex.c (yyprint): Remove TYPENAME_ELLIPSIS.
11349         * parse.h: Regenerated.
11350         * parse.c: Really regenerated.
11352         * cp-tree.h (finish_unary_op_expr): New function.
11353         (finish_id_expr): Likewise.
11354         (begin_new_placement): Likewise.
11355         (finish_new_placement): Likewise.
11356         (finish_declarator): Likewise.
11357         (finish_translation_unit): Likewise.
11358         (finish_parmlist): Likewise.
11359         (begin_class_definition): Likewise.
11360         (finish_class_definition): Likewise.
11361         (finish_default_args): Likewise.
11362         (finish_inline_definitions): Likewise.
11363         * parse.y (GCC_ASM_KEYWORD): Remove.
11364         (TYPENAME_ELLIPSIS): Likewise.
11365         * parse.c: Regenerated.
11366         Use new functions in semantics.c in the actions for many rules.
11367         * gxx.gperf (GCC_ASM_KEYWORD): Just use ASM_KEYWORD.
11368         * hash.h: Regenerated.
11369         * semantics.c (finish_expr_stmt): Allow NULL expr.
11370         (finish_unary_op_expr): New function, containing
11371         code previously in parse.y.
11372         (finish_id_expr): Likewise.
11373         (begin_new_placement): Likewise.
11374         (finish_new_placement): Likewise.
11375         (finish_declarator): Likewise.
11376         (finish_translation_unit): Likewise.
11377         (finish_parmlist): Likewise.
11378         (begin_class_definition): Likewise.
11379         (finish_class_definition): Likewise.
11380         (finish_default_args): Likewise.
11381         (finish_inline_definitions): Likewise.
11383 Sun May 10 23:43:13 1998  Mark Mitchell  <mmitchell@usa.net>
11385         * typeck.c (build_c_cast): Don't decay arrays and functions to
11386         pointer type when converting to a class type.
11388 Sun May 10 22:53:56 1998  Jason Merrill  <jason@yorick.cygnus.com>
11390         * cp-tree.h (DECL_NAMESPACE_SCOPE_P): New macro.
11391         (DECL_CLASS_SCOPE_P): Likewise.
11393 Sun May 10 22:48:22 1998  H.J. Lu  (hjl@gnu.org)
11395         * class.c (finish_struct_1): Use OVL_CURRENT on TREE_VEC_ELT.
11396         * decl2.c (constructor_name_full): Likewise.
11398 Sun May 10 22:48:12 1998  Mike Stump  <mrs@wrs.com>
11400         * tree.c (mapcar): Add OVERLOAD support.
11402         * init.c (resolve_offset_ref): We must use basetype_path before we
11403         destroy it with a call to convert_pointer_to.
11405 Sat May  9 14:44:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
11407         * class.c (currently_open_class): New fn.
11408         * decl.c (lookup_name_real): Use it.
11409         * search.c (lookup_field): Likewise.
11411 Fri May  8 23:32:42 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
11413         * cp-tree.def (OVERLOAD): New node.
11414         * cp-tree.h (BINDING_TYPE, SET_IDENTIFIER_GLOBAL_VALUE,
11415         SET_IDENTIFIER_NAMESPACE_VALUE): Define.
11416         (NAMESPACE_BINDING): Remove.
11417         (IDENTIFIER_GLOBAL_VALUE, IDENTIFIER_NAMESPACE_VALUE): Use
11418         namespace_binding.
11419         (OVL_FUNCTION, OVL_CHAIN, OVL_CURRENT, OVL_NEXT, OVL_USED):
11420         Define.
11421         (tree_overload): New struct.
11422         (IDENTIFIER_TYPE_VALUE): Use identifier_type_value.
11423         (REAL_IDENTIFIER_TYPE_VALUE): Define.
11424         (IDENTIFIER_HAS_TYPE_VALUE): Use IDENTIFIER_TYPE_VALUE.
11425         (lang_decl_flags): Remove in_namespace.
11426         (lang_decl): Remove chain.
11427         (DECL_CHAIN, DECL_NAMESPACE): Remove.
11428         (flag_honor_std): Declare extern.
11429         (identifier_type_value, pushdecl_namespace_level, push_using_decl,
11430         namespace_binding, set_namespace_binding,
11431         lookup_function_nonclass, cat_namespace_levels,
11432         set_decl_namespace, lookup_arg_dependent, binding_init, ovl_cons,
11433         scratch_ovl_cons, ovl_member, build_overload): Declare.
11434         (decl_list_length, get_namespace_id, current_namespace_id,
11435         overloaded_globals_p): Remove.
11436         (lookup_using_namespace, qualified_lookup_using_namespace): Change
11437         return type.
11438         (push_scratch_obstack): New macro.
11439         * call.c (add_function_candidate): Special-case type of OVERLOAD node.
11440         (build_user_conversions_1): Iterate using OVL_NEXT for ctors,
11441         convs, fns.
11442         (build_new_function_call): Iterate using OVL_CHAIN.
11443         Print DECL_NAME in when reporting ambiguities.
11444         (build_object_call): Iterate using OVL_NEXT for fns, convs.
11445         (build_new_op): Call lookup_function_nonclass.
11446         Iterate using OVL_NEXT.
11447         (build_op_delete_call): Change detection of members.
11448         Do not wrap TREE_LIST around fields and single global functions.
11449         (build_over_call): Don't push a class level if the context is a
11450         namespace.
11451         (build_new_method_call): Iterate using OVL_NEXT.
11452         * class.c (add_method): Chain overloaded members using
11453         build_overload.  Remove copying of method.
11454         (grow_method): When iterating through the obstack, expect OVERLOAD
11455         nodes.  Chain overload members.
11456         (finish_struct_methods): Chain overload members.  Unpack OVERLOAD
11457         nodes in call to get_baselinks.
11458         (duplicate_tag_error): Expect OVERLOAD nodes when unchaining.
11459         (finish_struct_1): Iterate over ctor using OVL_NEXT.  Handle
11460         fdecls that are OVERLOAD nodes.
11461         (validate_lhs): New function.
11462         (instantiate_type): Do not copy OVERLOAD nodes.  Remove dead
11463         code.  Use DECL_NAME in error messages.  Split code between global
11464         and member function processing.
11465         * decl.c (global_type_node): New static variable.
11466         (in_std): New global.
11467         (struct binding_level): New field usings.
11468         (resume_binding_level): Assert that we are not in a class.
11469         (toplevel_bindings_p): Just check for namespace_p or
11470         pseudo_global.
11471         (resume_level): Remove.
11472         (find_binding): New function.
11473         (binding_for_name): Call it.
11474         (namespace_binding, set_namespace_binding): New functions.
11475         (push_namespace): Associate binding level with new namespace,
11476         resume_binding_level for existing namespace.  Remove old code.
11477         Fake std by counting.
11478         (store_bindings): Use REAL_IDENTIFIER_TYPE_VALUE.
11479         (maybe_push_to_top_level): Save current namespace.
11480         (pop_from_top_level): Restore saved namespace.
11481         (pop_namespace): Call suspend_binding_level.  Remove old code.
11482         (cat_namespace_levels): New function.
11483         (set_identifier_type_value_with_scope): For namespace bindings,
11484         set BINDING_TYPE, and use global_type_node.
11485         Use REAL_IDENTIFIER_TYPE_VALUE otherwise.
11486         (identifier_type_value): New function.
11487         (pushtag): If no context, use current_namespace.
11488         (duplicate_decls): Don't process DECL_CHAIN.
11489         (pushdecl): Set DECL_CONTEXT to current_namespace, if it is not
11490         already set.  Never reset it to NULL_TREE.  Lookup global variables
11491         in their namespace.  Push overloaded templates if they are on
11492         namespace level.
11493         (pushdecl_namespace_level): New function.
11494         (pushdecl_top_level): Implement using pushdecl_namespace_level.
11495         (pushdecl_using_decl): New function.
11496         (overloaded_globals_p): Remove.
11497         (push_overloaded_decl): Create OVERLOAD nodes, and iterate through
11498         them.  Use namespace_binding and set_namespace_value.
11499         (redeclaration_error_message): Complain if the declarations come
11500         from different namespaces.
11501         (lookup_tag): On namespace level, look in the BINDING_TYPE.
11502         (lookup_namespace_name): Pass tree_bindings from stack.  Remove
11503         old code.
11504         (select_decl): New function.
11505         (lookup_name_real): Call it for qualified and unqualified lookup.
11506         Pass tree_bindings from the stack.
11507         If prefer_type is 1, also accept namespaces.
11508         (lookup_function_nonclass): New function.
11509         (init_decl_processing): Set the binding level of the global
11510         namespace to global_binding_level.
11511         Build a proper type list for __builtin_apply.
11512         Initialize std_node to "fake std" if flag_honor_std is set.
11513         Initialize global_type_node.
11514         Allocated bad_alloc in namespace std if flag_honor_std.
11515         (define_function): Set the DECL_CONTEXT to the current_namespace.
11516         (start_decl): A namespace is not considered as a context here.  If
11517         the DECL_CONTEXT is a namespace, push the decl.
11518         (cp_finish_decl): Check for namespaces used as initializers.
11519         (grokfndecl): Add namespace parameter.  Remove processing of
11520         DECL_CHAIN.
11521         (grokvardecl): Add namespace parameter.
11522         (grokdeclarator): Process SCOPEs that are namespaces.  For
11523         mangling, temporarily set the DECL_CONTEXT on anonymous structs.
11524         (start_function): Check for contexts that are namespaces.
11525         Set context for declarations that have not been pushed.
11526         (store_parm_decls): Check for ::main only.
11527         (finish_function): Likewise.
11528         (start_method): Check for contexts that are namespaces.
11529         (start_method): Remove DECL_CHAIN processing.
11530         * decl2.c (flag_honor_std): Declare.
11531         (lang_decode_option): Set it if -fhonor-std or -fnew-abi is given.
11532         (decl_namespace_list): New static global.
11533         (grok_x_components): Ignore namespaces as type contexts.
11534         (check_classfn): Expect OVERLOAD nodes.
11535         (grokfield): Remove DECL_CHAIN processing.
11536         (finish_file): Call cat_namespace_levels.
11537         (merge_functions): New function.
11538         (ambiguous_decl): Rewrite.
11539         (lookup_using_namespace): Produce tree_bindings.
11540         (qualified_lookup_using_namespace): Likewise.
11541         (set_decl_namespace, decl_namespace, current_decl_namespace,
11542         push_decl_namespace, pop_decl_namespace): New functions.
11543         (arg_lookup): New struct.
11544         (add_function, arg_assoc_namespace, arg_assoc_class,
11545         arg_assoc_type, arg_assoc_args, arg_assoc, lookup_arg_dependent):
11546         New functions.
11547         (get_namespace_id, current_namespace_id): Remove.
11548         (do_toplevel_using_decl): Rewrite.
11549         (do_class_using_decl): Complain about namespace qualifiers.
11550         (do_using_directive): Sorry if not on namespace level.  Complain
11551         about unknown namespaces.
11552         * error.c (dump_aggr_type): Check for namespace contexts.
11553         * except.c (init_exception_processing): Push terminate into std.
11554         * friend.c (is_friend): A namespace is not a context, here.
11555         * init.c (expand_member_init): Remove DECL_CHAIN processing.
11556         (build_offset_ref): Process OVERLOAD nodes.
11557         * lang-specs.h (__HONOR_STD): Define if -fnew-abi or -fhonor-std.
11558         * lex.c (identifier_type): Loop using OVL_CHAIN.
11559         (see_typename): Set looking_for_typename to 2.
11560         (real_yylex): Likewise.
11561         (do_identifier): Expect OVERLOAD nodes instead of TREE_LISTs.
11562         (do_scoped_id): Expect OVERLOAD nodes.
11563         Change calling convention for qualified_lookup_using_namespace.
11564         (build_lang_decl): Don't set in_namespace anymore.
11565         * method.c (typevec_size): New global.
11566         (build_overload_nested_name): Return if global_namespace.
11567         Otherwise, always expect a declaration context.
11568         (build_qualified_name): Likewise.
11569         Make sure we don't write beyond typevec_size.
11570         (build_decl_overload_real): Likewise.
11571         Allocate one extra slot for the namespace.
11572         (hack_identifier): Mark code dead.
11573         Process OVERLOAD and NAMESPACE_DECL nodes.
11574         * parse.y (program): Pop namespaces until in global namespace.
11575         (extdef): In a using-declaration, don't discard the identifier if
11576         there is no declaration.
11577         (left_curly): Ignore type contexts which are namespaces.
11578         (typename_sub2): Use IDENTIFIER_TYPE_VALUE to retrieve the type
11579         used as scope.
11580         * pt.c (template_class_depth): Expect types to be namespaces.
11581         (determine_specialization): Simplify by expecting OVERLOAD nodes.
11582         (push_template_decl): Push into namespace level.
11583         Reset ctx if it is a namespace.
11584         Set DECL_CONTEXT to current_namespace if not set already.
11585         Ignore real contexts that are namespaces.
11586         (mangle_class_name_for_template): Skip global_namespace.
11587         Mangle other namespaces as declarations.
11588         (lookup_template_function): Set type of OVERLOAD nodes to unknown.
11589         (lookup_template_class): Push into namespace of context.
11590         If the context is a namespace, set it to global_namespace.
11591         Use id_context for mangling.
11592         (for_each_template_parm): Handle OVERLOAD and NAMESPACE_DECL nodes.
11593         (tsubst_friend_function): Ignore namespace contexts.
11594         Push into namespace level.
11595         (tsubst): Handle NAMESPACE_DECL nodes.
11596         Remove DECL_CHAIN processing.
11597         (type_unification_real): Recognize OVERLOAD instead of TREE_LIST nodes.
11598         * ptree.c (print_lang_identifier): Print bindings.
11599         (lang_print_xnode): Print OVERLOAD nodes.
11600         * rtti.c (init_rtti_processing): Push type_info into std.
11601         * search.c (lookup_fnfields_here): Expect OVERLOAD nodes.
11602         (lookup_fnfields_1, get_virtuals_named_this, get_matching_virtual,
11603         dfs_debug_mark, dfs_pushdecls, dfs_compress_decls, add_conversions,
11604         lookup_fnfields_here): Likewise.
11605         Process all nodes, instead of going through TREE_CHAIN.
11606         * sig.c (build_signature_pointer_or_reference_type): Set context
11607         to global_namespace.
11608         (build_signature_table_constructor): Expect OVERLOAD nodes.
11609         * spew.c (yylex): Save old setting of looking_for_typename.
11610         * tree.c (decl_list_length): Remove.
11611         (binding_init): New function.
11612         (count_functions): Rewrite.
11613         (is_overloaded_fn): Expect OVERLOAD nodes.
11614         (really_overloaded_fn, get_first_fn, lvalue_type): Likewise.
11615         (ovl_cons, scratch_ovl_cons, build_overload, build_overload_after,
11616         ovl_member): New functions.
11617         * typeck.c (require_complete_type): Expect OVERLOAD nodes.
11618         (type_unknown_p): Likewise.
11619         (require_instantiated_type): Likewise.
11620         (build_component_ref): Declare code dead.
11621         (build_x_function_call): Create and expect OVERLOAD nodes.
11622         (build_function_call_real): Check for ::main only.
11623         (build_unary_op): Likewise.  Expect OVERLOAD nodes.
11624         (convert_for_assignment): Check for TREE_LIST before accessing
11625         TREE_VALUE.
11626         * decl.c (duplicate_decls): Check for namespace bindings instead
11627         of global bindings.
11628         (pushdecl, push_overloaded_decl, lookup_tag, lookup_name_real,
11629         lookup_name_current_level, start_decl, xref_tag,
11630         finish_enum): Likewise.
11631         * init.c (build_offset_ref): Likewise.
11632         * search.c (lookup_field): Likewise.
11633         (lookup_fnfields): Likewise.
11634         (dfs_debug_mark): Likewise.
11635         * decl.c (poplevel): Use SET_IDENTIFIER_TYPE_VALUE.
11636         (poplevel_class, pop_from_top_level): Likewise.
11637         * decl2.c (finish_method): Likewise.
11638         * class.c (build_vtable): Use SET_IDENTIFIER_GLOBAL_VALUE.
11639         * decl.c (record_builtin_type): Likewise.
11640         (init_decl_processing, grokfndecl): Likewise.
11641         * lex.c (get_time_identifier, do_identifier, do_scoped_id): Likewise.
11642         (make_lang_type): Likewise.
11643         * parse.y (make_thunk): Likewise.
11644         * pt.c (tsubst): Likewise.
11645         * tree.c (debug_binfo): Likewise.
11646         * exception.cc, new.cc, new1.cc, new2.cc, tinfo.cc, tinfo.h,
11647         tinfo2.cc, inc/new.h: Add std qualifications.
11648         * inc/new: Wrap with namespace std if __HONOR_STD.
11649         * inc/typeinfo: Likewise.
11651 Fri May  8 00:43:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
11653         * call.c (build_user_type_conversion_1): Handle second_conv
11654         properly for templates.
11656 Thu May  7 17:09:25 1998  Andrew MacLeod  <amacleod@cygnus.com>
11658         * method.c (build_decl_overload_real): Set TREE_USED flag to
11659         zero for build_type_variants nodes as well.
11661 Wed May  6 19:27:09 1998  Jason Merrill  <jason@yorick.cygnus.com>
11663         * pt.c (tsubst): Don't tsubst the type of an IDENTIFIER_NODE.
11665 Wed May  6 16:49:48 1998  Jim Wilson  <wilson@cygnus.com>
11667         * Makefile.in (call.o, class.o, decl.o, decl2.o, errfn.o, error.o,
11668         except.o, expr.o, friend.o, init.o, lex.o, method.o, pt.o, repo.o,
11669         rtti.o, search.o, semantics.o, sig.o, tree.o, typeck.o, typeck2.o,
11670         xref.o): Add toplev.h dependencies.
11672 Wed May  6 16:44:58 1998  Jeffrey A Law  (law@cygnus.com)
11674         * errfn.c (cp_error, cp_warning): Remove declarations for
11675         error and warning respectively.
11677 Wed May  6 14:28:18 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11679         * error.c: Convert to using ctype macros defined in system.h.
11680         * method.c: Likewise.
11681         * xref.c: Likewise.
11682         * lex.c: Likewise.  Also remove redundant system header stuff.
11684 Wed May  6 06:36:41 1998  Robert Lipe  <robertl@dgii.com>
11686         * call.c, class.c, decl.c, decl2.c, errfn.c, error.c, except.c,
11687         expr.c, friend.c, init.c, lex.c, method.c, pt.c, repo.c, rtti.c,
11688         search.c, semantics.c, sig.c, tree.c, typeck.c, typeck2.c,
11689         xref.c: Add include of toplev.h.
11691 Wed May  6 02:33:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
11693         * tree.c (perm_manip): Also regenerate the RTL of an extern.
11694         (copy_to_permanent): Use end_temporary_allocation.
11696 Tue May  5 23:54:04 1998  Jason Merrill  <jason@yorick.cygnus.com>
11698         * init.c (expand_vec_init): The initialization of each array
11699         element is a full-expression.
11701 Tue May  5 18:24:13 1998  Andrew MacLeod  <amacleod@cygnus.com>
11703         * method.c (build_mangled_name): Add a call to build_type_variant
11704         to get the right type.
11706 Tue May  5 01:25:03 1998  Jason Merrill  <jason@yorick.cygnus.com>
11708         * Makefile.in: Add .SUFFIXES.
11710         * cp-tree.def: Remove NAMESPACE_DECL.
11712 Sun May  3 01:32:14 1998  Jason Merrill  <jason@yorick.cygnus.com>
11714         * call.c (build_over_call): Do evaluate arg even if it has empty
11715         class type.
11716         * decl.c (start_function): Don't push a member function.
11718 Thu Apr 30 18:59:23 1998  Jim Wilson  <wilson@cygnus.com>
11720         * Makefile.in (g++FAQ.info): Put -o option before input file.
11722 Thu Apr 30 13:05:33 1998  Andrew MacLeod  <amacleod@cygnus.com>
11724         * gxxint.texi: Add info for squangling codes K and B.
11726 Tue Apr 28 13:22:01 1998  Mark Mitchell  <mmitchell@usa.net>
11728         * semantics.c (begin_stmt_expr): Avoid duplicating the effect of
11729         the expression in templates.
11730         (finish_stmt_expr): Likewise.
11732 1998-04-28  Brendan Kehoe  <brendan@cygnus.com>
11734         * decl2.c (ambiguous_decl): Fix NAME parm to be a tree, not int.
11736 Mon Apr 27 13:58:10 1998  Mark Mitchell  <mmitchell@usa.net>
11738         * decl.c (maybe_push_to_top_level): Always clear
11739         current_template_parms and processing_template_decl.
11740         (pushtag): Remove check of current_class_type and some comments,
11741         since maybe_push_to_top_level no longer creates confusion.
11743 Sun Apr 26 12:10:18 1998  Mark Mitchell  <mmitchell@usa.net>
11745         * cp-tree.h (CLASSTYPE_IS_TEMPLATE): New macro.
11746         (DECL_CLASS_TEMPLATE_P): Likewise.
11747         (DECL_PRIMARY_TEMPLATE): Likewise.
11748         (PRIMARY_TEMPLATE_P): Use it.
11749         (push_template_decl_real): New function.
11750         (redeclare_class_template): Take new template parameters as
11751         input.
11752         (is_specialization_of): New function.
11753         (comp_template_args): Declare.
11754         * decl.c (pushtag): Handle friend template classes.
11755         (xref_tag): Likewise.  Use new calling convention for
11756         redeclare_class_template.
11757         * decl2.c (grok_x_components): Handle friend templates.
11758         * friend.c (is_friend): Use is_specialization_of where
11759         appropriate.  Deal with friend class templates.
11760         (make_friend_class): Let a class template be friends with itself.
11761         * pt.c (comp_template_args): Remove declaration.
11762         (tsubst_friend_class): New function.
11763         (push_template_decl_real): New function.
11764         (push_template_decl): Use it.
11765         (redeclare_class_template): Adjust for new calling convention.
11766         (comp_template_args): Give it external linkage.
11767         (instantiate_class_type): Use tsubst_friend_class to deal
11768         with friend templates.
11769         * typeck.c (comptypes): Use comp_template_args, rather than
11770         expanding it inline.
11771         * parse.y (component_decl): Handle a nested template type
11772         like other component type declarations.
11774         * pt.c (check_explicit_specialization): Handle overloaded
11775         constructors correctly.
11777         * pt.c (mabybe_get_template_decl_from_type_decl): New function.
11778         (lookup_template_class): Use it.
11780 Thu Apr 23 21:19:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
11782         * cp-tree.def: Add WRAPPER.  USER_CONV now only has two ops.
11783         * cp-tree.h: Add WRAPPER support.
11784         * call.c (add_candidate): Split out from add_*_candidate fns.
11785         (build_over_call): Take the candidate instead of function and args.
11786         Enforce access control here.  Emit overload warnings here.
11787         (add_warning): New fn.
11788         (joust): Add WARN parm.  If not set, call add_warning instead of
11789         printing a warning.  Re-enable some warnings.
11790         (tourney): Pass it.
11791         (convert_like): Adjust.
11792         (build_new_op): Adjust.
11793         (build_new_function_call): Adjust.
11794         (build_user_type_conversion_1): Adjust.
11795         (USER_CONV_FN): Adjust.
11796         * tree.c (build_expr_wrapper, build_expr_ptr_wrapper,
11797         build_int_wrapper): New fns.
11799 Thu Apr 23 18:27:53 1998  Mark P. Mitchell  <mmitchell@usa.net>
11801         * pt.c (unify): Fix typo in previous change.
11803 Thu Apr 23 09:32:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
11805         * error.c (dump_type_real): Declare canonical_name.
11807         * typeck.c (comp_target_types): Fix PMFs.
11809 Wed Apr 22 13:24:48 1998  Mark Mitchell  <mmitchell@usa.net>
11811         * class.c (finish_struct): Set TREE_PRIVATE and TREE_PROTECTED for
11812         the DECL_RESULTs of a member TEMPLATE_DECL, not just the
11813         TEMPLATE_DECL.
11815         * pt.c (tsubst): Decrease the template-level of
11816         TEMPLATE_TEMPLATE_PARMS.  Likewise for the DECL_INITIAL of a
11817         TEMPLATE_PARM_INDEX.
11818         (template_decl_level): New function.
11819         (unify): Make sure to record unifications for template
11820         parameters, even when the parameters exactly match the arguments.
11821         Combine duplicated code for TEMPLATE_TEMPLATE_PARMs and
11822         TEMPLATE_TYPE_PARMS.  Don't try to unify template parameters that
11823         aren't from the level we're currently working on.
11825 Tue Apr 21 22:00:04 1998  Mark Mitchell  <mmitchell@usa.net>
11827         * errfn.c (cp_thing): Use xrealloc, not xmalloc, to copy memory.
11829         * decl2.c (check_member_template): Set DECL_IGNORED for member
11830         class templates, too.
11832         * decl2.c (grokfield): Remangle the name of a member TYPE_DECL.
11834 Tue Apr 21 18:59:11 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
11836         * decl.c (duplicate_decls): Only check DECL_FRIEND_P if function.
11838 Tue Apr 21 14:22:00 1998  Jeffrey A Law  (law@cygnus.com)
11840         * cp-tree.h (intTI_type_node, unsigned_intTI_type_node): Declare.
11841         * decl.c (intTI_type_node, unsigned_intTI_type_node): Define.
11842         (init_decl_processing): Handle TI types.
11843         * typeck.c (unsigned_type, signed_type): Handle TI types.
11845 Sat Apr 18 15:25:21 1998  Jim Wilson  <wilson@cygnus.com>
11847         * g++spec.c (lang_specific_driver): New argument in_added_libraries.
11848         New local added_libraries.  Increment count when add library to
11849         arglist.
11851 Fri Apr 17 21:25:00 1998  Mark Mitchell  <mmitchell@usa.net>
11853         * cp-tree.h (type_as_string_real): New function.
11854         * pt.c (mangle_class_name_for_template): Use it.
11855         * error.c (dump_aggr_type): Change prototype.
11856         (dump_type_prefix): Likewise.
11857         (dump_type_suffix): Likewise.
11858         (dump_type_real): Convert from dump_type.  If desired, the
11859         "canonica" name of a typedef, i.e., the name of the underlying
11860         type, can be printed.
11861         (dump_type): Call dump_type_real.
11863 Fri Apr 17 14:30:45 1998  Jason Merrill  <jason@yorick.cygnus.com>
11865         * decl2.c (lang_decode_option): -fnew-abi implies -fvtable-thunks.
11867         * typeck.c (comp_target_types): Tweak pedantic case.
11868         (comp_target_parms): Tweak pedantic case.  Clean up somewhat.
11869         Return -1 or 1 instead of 1 or 2.
11870         (compparms): Remove STRICT handling.
11871         (convert_for_assignment): Fix handling of pmfs.
11873 Fri Apr 17 14:04:16 1998  Mark Mitchell  <mmitchell@usa.net>
11875         * typeck.c (comp_target_types): Handle references like pointers.
11876         (comp_target_parms): Note that return code from comp_target_types
11877         can be negative to indicate failure.
11879 Fri Apr 17 09:10:52 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
11881         * Make-lang.in (c++.all.build): Don't depend on $(DEMANGLER_PROG),
11882         which requires a working target compiler to build.
11884 Fri Apr 17 08:57:35 1998  Jeffrey A Law  (law@cygnus.com)
11886         * tree.c (avoid_overlap): Add prototype.
11888         * spew.c (num_tokens): Add prototype.
11889         (nth_noken, add_token, consume_token, debug_yychar): Likewise.
11891         * search.c (dfs_check_overlap): Add prototype.
11892         (dfs_no_overlap_yet): Likewise.
11894         * pt.c (original_template): Add prototype.
11895         (inline_needs_template_parms): Likewise.
11896         (push_inline_template_parms_recursive): Likewise.
11897         (retrieve_specialization, register_specialization): Likewise.
11898         (print_candidates, reduce_template_parm_level): Likewise.
11899         (build_template_decl, mark_template_parm): Likewise.
11900         (tsubst_friend_function, get_bindings_real): Likewise.
11902         * method.c (start_squangling): Add prototype.
11903         (end_squangling, check_ktype, issue_ktype): Likewise.
11904         (build_overloaded_scope_ref, check_btype): Likewise.
11905         (build_mangled_template_parm_index): Likewise.
11907         * lex.c (init_cpp_parse): Add prototype.
11908         (handle_cp_pragma, handle_sysv_pragma): Likewise.
11909         (reduce_cmp, token_cmp): Likewise.
11911         * except.c (call_eh_info): Add prototype.
11912         (push_eh_info, get_eh_info, get_eh_value, get_eh_type): Likewise.
11913         (get_eh_caught, get_eh_handlers, do_pop_exception): Likewise.
11915         * decl2.c (is_namespace_ancestor): Add prototype.
11916         (namespace_ancestor, add_using_namespace): Likewise.
11917         (ambiguous_decl): Likewise.
11919         * decl.c (indent): Add prototype.
11921         * call.c (add_template_candidate_real): Add prototype.
11923 Fri Apr 17 01:57:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
11925         * decl2.c (build_expr_from_tree): Just return a PMF.
11927 Fri Apr 17 00:45:12 1998  Mark Mitchell  <mmitchell@usa.net>
11929         * typeck2.c (process_init_constructor): Don't strip cv-qualifiers
11930         when doing initializations.
11932         * pt.c (unify): Use comptypes to compare type args.
11934 Fri Apr 17 00:24:22 1998  Jason Merrill  <jason@yorick.cygnus.com>
11936         * decl.c (duplicate_decls): Fix check for when it's safe to free
11937         the new decl.
11939         * pt.c (mangle_class_name_for_template): Don't pass a typedef type
11940         to type_as_string.
11942 Thu Apr 16 17:47:30 1998  Jeffrey A Law  (law@cygnus.com)
11944         * pt.c (build_template_parm_index): Add prototype.
11946         * search.c (my_tree_cons): Don't clear words outside the
11947         newly allocated node.
11949 Wed Apr 15 15:34:44 1998  Dave Brolley  <brolley@cygnus.com>
11951         * lex.c (init_parse): Now returns char* containing the filename.
11953 Wed Apr 15 13:20:06 1998  John Carr  <jfc@mit.edu>
11954                           Jeff Law   <law@cygnus.com>
11956         * errfn.c: Rework to avoid problems when HOST_WIDE_INT is longer
11957         than a pointer.
11959 Sun Apr 12 22:31:19 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11961         * cvt.c (cp_convert_to_pointer): Use TYPE_PRECISION.
11963 Fri Apr 10 12:16:49 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11965         * decl.c (duplicate_decls): Don't warn for redundant decls if
11966         friend: let add_friend take care of it.
11968 Thu Apr  9 02:40:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
11970         * sig.c (build_signature_pointer_constructor): Don't set
11971         TREE_HAS_CONSTRUCTOR for a signature pointer.
11972         * cvt.c (ocp_convert): Don't force a temporary for internal structs.
11973         * init.c (resolve_offset_ref): Warn about implicit & on pmfs
11974         here, too.
11975         * typeck.c (build_unary_op): Only allow taking the address of a
11976         real constructor.
11977         * typeck2.c (digest_init): Simplify.
11978         (store_init_value): Don't pedwarn about using { } for pmfs.
11980 Thu Apr  9 22:16:57 1998  Per Bothner  <bothner@cygnus.com>
11982         * cp-tree.h (start_decl):  Update prototype.
11983         * decl.c (start_decl):  Like the C version, new parameters
11984         for the attributes.  Call cplus_decl_attributes here,
11985         (pushdecl):  Like C version, do build_type_copy if TYPE_DECL,
11986         (grokdeclarator):  Pass NULL for new start_decl arguments.
11987         * pt.c (tsubst_expr):  Likewise.
11988         * parse.y:  Merge cplus_decl_attribute calls into start_decl calls.
11989         * typeck.c (common_type): Check TYPE_MAIN_VARIANT.
11990         * lex.c (build_lang_decl): Add lang_name_java.
11991         * class.c (push_lang_context): Add lang_name_java.
11992         * method.c (build_mangled_name): Check for is_java_type.
11994 Thu Apr  9 22:16:57 1998  Benjamin Kosnik  <bkoz@loony.cygnus.com>
11996         * decl.c (grokdeclarator): Check TYPE_MAIN_VARIANT.
11997         * call.c (build_scoped_method_call): Check for TREE_CODE for
11998         VOID_TYPE instead of type ==  void_type_node.
11999         (build_method_call): Likewise.
12000         * decl.c (lookup_name_real): Likewise.
12001         (grokdeclarator): Likewise.
12002         (start_decl): Likewise.
12003         (grokparms): Likewise.
12004         (start_function): Likewise.
12005         (finish_function): Likewise.
12006         (start_method): Likewise.
12008 Thu Apr  9 00:18:44 1998  Dave Brolley  (brolley@cygnus.com)
12010         * lex.c (finput): New variable.
12011         (init_cpp_parse):  Renamed from init_parse.
12012         (init_parse): Handle !USE_CPPLIB.  Call init_cpp_parse when finished.
12013         (finish_parse): New function.
12014         * cp-tree.h (init_lex, init_parse): Remove declarations.
12016 Mon Apr  6 02:25:05 1998  Jason Merrill  <jason@yorick.cygnus.com>
12018         * call.c (build_call): Still evaluate the actual argument.
12019         * class.c (is_empty_class): Update for -fnew-abi.
12021         * decl2.c: -fnew-abi implies -fsquangle.
12023         * method.c (do_build_assign_ref): Don't do anything to copy
12024         an empty class.
12025         (do_build_copy_constructor): Likewise.
12026         * call.c (build_over_call): Likewise.
12028 Sat Apr  4 18:43:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
12030         * tree.c (avoid_overlap): Return a value.
12032 Sat Apr  4 12:52:35 1998  Jeffrey A Law  (law@cygnus.com)
12034         * method.c (check_btype): Add missing argument to xrealloc.
12035         (check_ktype): Likewise.
12037 Fri Apr  3 02:22:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
12039         Implement empty base optimization.
12040         * class.c (finish_struct_1): Add vbase fields earlier.  Set
12041         CLASSTYPE_SIZE of an empty base to 0.  Types with bases can be empty.
12042         * search.c (dfs_check_overlap, dfs_no_overlap_yet): New fns.
12043         (types_overlap_p): New fn.
12044         * tree.c (avoid_overlap): New fn.
12045         (build_base_fields): Use it to avoid overlapping empty bases.
12046         * cp-tree.h, decl2.c, lang-options.h: Add -fnew-abi.
12048         * decl.c (cplus_expand_expr_stmt): Strip unused INDIRECT_REFs.
12050         Re-implement allocation of base class subobjects.
12051         * tree.c (unshare_base_binfos): New fn.
12052         (layout_basetypes): Use it.  Now handles offsets of both virtual and
12053         non-virtual bases, after layout_type.
12054         (layout_vbasetypes): Remove.
12055         (build_base_fields): Generate FIELD_DECLs for each non-virtual base.
12056         (build_vbase_pointer_fields): Split out from old layout_basetypes.
12057         * class.c (finish_base_struct): Lose offset handling code.
12058         Move nonvdtor warning here.  Don't mess with t_binfo anymore.
12059         (finish_struct_1): Don't mess with t_binfo anymore.  Use fns above.
12060         * cp-tree.h: Adjust.
12062 Thu Apr  2 14:25:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
12064         * cp-tree.h: Lose CLASSTYPE_VBASE_SIZE, some unused stuff.
12065         * decl.c, decl2.c, pt.c, ptree.c, lex.c: Likewise.
12066         * class.c (duplicate_tag_error): Likewise.
12067         (finish_struct_1): Set CLASSTYPE_SIZE, CLASSTYPE_MODE, CLASSTYPE_ALIGN.
12068         * tree.c (layout_vbasetypes): Update from layout_record, remove
12069         var_size support, use CLASSTYPE_SIZE instead of CLASSTYPE_VBASE_SIZE.
12070         (layout_basetypes): Likewise.
12072 Wed Apr  1 18:22:25 1998  Jeffrey A Law  (law@cygnus.com)
12074         * class.c, Make sure system.h is included just after config.h.
12075         Delete lingering stdio and errno references too.
12076         * decl.c, errfn.c, parse.y, ptree.c search.c, xref.c: Likewise.
12078 Wed Apr  1 15:38:36 1998  Jason Merrill  <jason@yorick.cygnus.com>
12080         * friend.c (is_friend): Fix access control for local classes.
12082         * class.c (is_empty_class): New fn.
12083         * call.c (build_call): Don't pass empty class objects to a function.
12085 Wed Apr  1 14:58:35 1998  Mark Mitchell  <mmitchell@usa.net>
12087         * call.c (build_over_call): Do name resolution for default
12088         arguments of function templates in the scope of the templates.
12090 Tue Mar 31 13:43:57 1998  Jeffrey A Law  (law@cygnus.com)
12092         * call.c: Include system.h.  Remove includes, declarations and
12093         defines provided by system.h.
12094         * class.c, cvt.c, decl.c, decl2.c, errfn.c error.c: Likewise.
12095         * except.c, expr.c friend.c, g++spec.c, init.c, input.c: Likewise.
12096         * lex.c, parse.y, pt.c, ptree.c repo.c rtti.c, search.c: Likewise.
12097         * semantics.c, sig.c, spew.c, tree.c, typeck.c: Likewise.
12098         * typeck2.c, xref.c: Likewise.
12099         * Makefile.in: Dependencies updated as appropriate.
12100         * Make-lang.in: Likewise.
12102 Mon Mar 30 12:15:00 1998  Mark Mitchell  <mmitchell@usa.net>
12104         * pt.c (fn_type_unification): Allow incomplete unification without
12105         an immediate error message.
12107 Mon Mar 30 08:55:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
12109         * tree.c (member_p): New fn.
12110         * decl2.c (finish_file): Only set DECL_STATIC_FUNCTION_P for
12111         initializing class members.
12113         * cp-tree.def (TEMPLATE_PARM_INDEX): Class 'x'.
12114         * ptree.c (lang_print_xnode): Handle TEMPLATE_PARM_INDEX.
12116         * call.c (build_method_call): Handle non-scoped destructors, too.
12117         * pt.c (tsubst_copy): Likewise.
12119         * pt.c (print_template_context): Split out...
12120         (push_tinst_level): ...from here.
12122         * friend.c (is_friend): Don't pass a type to decl_function_context.
12124         * typeck.c (convert_for_initialization): Always hand off
12125         conversions to class type.
12127 Sun Mar 29 20:01:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
12129         * friend.c (is_friend): Local classes have the same access as the
12130         enclosing function.
12132 Sun Mar 29 00:47:32 1998  Jeffrey A Law  (law@cygnus.com)
12134         * typeck.c (expand_target_expr): Delete dead function.
12136         * search.c: Put various prototypes inside #ifdef MI_MATRIX.
12138         * repo.c (save_string): Delete dead function.
12140         * method.c (thunk_printable_name): Delete dead function.
12142         * lex.c (yynextch): Delete dead function.
12144         * expr.c (tree_extract_aggr_init): #if 0 out.
12146         * except.c (do_unwind): Delete dead function.
12147         (easy_expand_asm): Likewise.
12149         * cvt.c (build_conversion_type_1): Delete dead function.
12151         * cp-tree.h (push_expression_obstack): Declare.
12153         * call.c (source_type): #if 0 out.
12155         * class.c (alter_access): Remove unused label.  Add braces
12156         around empty else clause.
12158         * lex.c (yyprint): Fix argument to printf.
12160 Sat Mar 28 17:43:52 1998  Mark Mitchell  <mmitchell@usa.net>
12162         * pt.c (tsubst): Clear TREE_USED for new FUNCTION_DECLs.
12164         * pt.c (instantiate_class_template): Make sure template
12165         arguments are permanent.
12166         * init.c (resolve_offset_ref): Don't go looking around in
12167         template types.
12169         * semantics.c: Add routines to handle expressions, and some
12170         declaration processing.
12171         * parse.y: Use them.
12172         (current_class_depth): Move declaration to cp-tree.h.
12173         * parse.c: Regenerated.
12174         * cp-tree.h: Use them.
12175         (current_class_depth): Declare.
12176         * pt.c (tsubst_copy): Use begin_stmt_expr and finish_stmt_expr.
12178 Fri Mar 27 20:23:18 1998  Mark Mitchell  <mmitchell@usa.net>
12180         * error.c (dump_decl): Be a bit more explicit with template
12181         type arguments, when verbose.
12183 Fri Mar 27 18:16:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
12185         * inc/exception: Reorder closing braces.
12187 Fri Mar 27 13:22:18 1998  Mark Mitchell  <mmitchell@usa.net>
12189         * pt.c (redeclare_class_template): New function.
12190         * cp_tree.h (redeclare_class_template): Declare it.
12191         * decl.c (xref_tag): Use it.
12193 Thu Mar 26 11:16:30 1998  Jason Merrill  <jason@yorick.cygnus.com>
12195         * call.c (build_over_call): Check IS_AGGR_TYPE, not
12196         TYPE_LANG_SPECIFIC.
12197         * typeck.c (convert_arguments): Likewise.
12199         * decl.c (grokdeclarator): Remove const and volatile from type after
12200         setting constp and volatilep.
12202         * class.c (finish_struct_1): Don't warn about bool bitfield larger
12203         than one bit.
12205 Thu Mar 26 10:25:52 1998  Mark Mitchell  <mmitchell@usa.net>
12207         * pt.c (convert_nontype_argument): STRIP_NOPS where appropriate.
12209 Thu Mar 26 10:24:05 1998  Mark Mitchell  <mmitchell@usa.net>
12211         * call.c (build_object_call): Complain about ambiguous operator(),
12212         rather that crashing.
12213         (build_new_op): Likewise.
12214         (build_op_delete_call): Likewise.
12216 Thu Mar 26 10:23:24 1998  Mark Mitchell  <mmitchell@usa.net>
12218         * cvt.c (perform_qualification_conversions): Use comp_target_types
12219         instead of comp_ptr_ttypes.
12221 Wed Mar 25 16:10:50 1998  Mark Mitchell  <mmitchell@usa.net>
12223         * cp-tree.h (enforce_access): Declare.
12224         * call.c (enforce_access): Make it extern, not static.
12225         * class.c (alter_access): Use enforce_access; modify code for ISO
12226         compliance, rather than ARM rules.
12228 Wed Mar 25 12:10:45 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12230         * cp-tree.h: Fix typo.
12232 Wed Mar 25 02:01:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
12234         * expr.c (cplus_expand_expr): Only do PCC_STATIC_STRUCT_RETURN thing
12235         if (aggregate_value_p (type)).
12237         * decl2.c (constructor_name_full): Handle TYPENAME_TYPE.
12239 Tue Mar 24 16:12:01 1998  Mark Mitchell  <mmitchell@usa.net>
12241         * tree.c (mapcar): When dealing with a DECL, use it's constant
12242         value, if any.
12243         * pt.c (lookup_template_class): Don't mangle the names of template
12244         classes whose arguments are unknown.
12246         * pt.c (tsubst_expr): Handle GOTO_STMT correctly.
12248 Tue Mar 24 12:21:55 1998  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
12250         * decl.c (init_decl_processing): Set TYPE_PRECISON for bools to 1.
12252 Tue Mar 24 12:21:48 1998  Jim Wilson  <wilson@cygnus.com>
12254         * decl.c (init_decl_processing): Initialize TYPE_MAX_VALUE for
12255         boolean_type_node to 1.
12257 Tue Mar 24 10:23:47 1998  Mark Mitchell  <mmitchell@usa.net>
12259         * error.c (dump_expr): Remove unused variable `l'.
12261         * pt.c (for_each_template_parm): New function, created by
12262         converting uses_template_parms.
12263         (tree_fn_t): New typedef.
12264         (uses_template_parms): Use it.
12265         (mark_template_parm): New function.
12266         (push_template_decl): Check that the argument list of a partial
12267         specialization uses all the template parameters.
12269         * Make-lang.in (c++filt): Don't delete cxxmain.c after we're done
12270         with it; we might want it for debugging.
12271         * cp-tree.h (type_unification): Change interface.
12272         * class.c (finish_struct_1): Skip nested template types, just like
12273         ordinary nested types.
12274         (instantiate_type): Use new interface to type_unification.
12275         * lex.c (init_lex): Add __sz as opname for sizeof.
12276         * method.c (build_overload_scope_ref): New function.
12277         (build_overload_int): Handle complex expressions.  Set
12278         numeric_output_need_bar if necessary.
12279         (build_overload_value): Handle non-PARM_DECL nodes; this
12280         routine is now used by build_overload_int.  Remove some
12281         assignments to numeric_output_need_bar.  Use
12282         build_overload_scope_ref.
12283         (build_qualified_name): Note that some template mangled names end
12284         with digits, and set numeric_output_need_bar appropriately.  Use
12285         build_underscore_int.
12286         * pt.c (unify): Change interface.
12287         (type_unification_real): Likewise.
12288         (determine_specialization): Use new interfaces.
12289         (tsubst): Deal gracefully with situations in which the argument
12290         vector is not fully filled.
12291         (fn_type_unification): Use new interfaces.
12292         (type_unification): Likewise.  Remove NOP_EXPR hack.
12293         (type_unification_real): Likewise.
12294         (unify): Likewise.  Deal with unification of complex expressions.
12296 Mon Mar 23 12:24:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12298         * pt.c (complete_template_args): Initialize skip properly.
12300         * decl.c (make_typename_type): Revert.
12301         (make_implicit_typename): Remove.
12302         (lookup_name_real): Don't call it.  Call lookup_field if we see a
12303         TYPE_DECL from a template base.
12304         * search.c (lookup_field): Do implicit typename stuff.
12306 Sun Mar 22 00:50:42 1998  Nick Clifton  <nickc@cygnus.com>
12307                           Geoff Noer    <noer@cygnus.com>
12309         * Makefile.in: Various fixes for building cygwin32 native toolchains.
12310         * Make-lang.in: Likewise.
12312 Fri Mar 20 18:07:39 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12314         * pt.c (tsubst, TEMPLATE_TEMPLATE_PARM): Simplify.
12316 Fri Mar 20 10:42:07 1998  Jason Merrill  <jason@yorick.cygnus.com>
12318         * decl.c (make_implicit_typename): Rewrite removed code.
12319         (make_typename_type): Call it if the type we look up comes from
12320         a base that uses template parms.
12322         * pt.c (complete_template_args): Rewrite.
12323         (tsubst, FUNCTION_DECL): Use it.
12325 Fri Mar 20 08:12:43 1998  H.J. Lu  (hjl@gnu.org)
12327         * semantics.c (finish_asm_stmt): Fix combine strings.  Call
12328         c_expand_asm_operands () if output_operands, input_operands or
12329         clobbers is not NULL_TREE.
12331 Fri Mar 20 00:10:19 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12333         * pt.c (complete_template_args): New function.
12334         (get_bindings): Deal with specializations of function templates
12335         with return type containing parameters from outer class
12336         templates.
12337         (tsubst, TEMPLATE_TEMPLATE_PARM): When reducing parameter level,
12338         substitute arguments and compose a new type.
12340 Thu Mar 19 19:01:48 1998  Mark Mitchell  <mmitchell@usa.net>
12342         * pt.c (tsubst): Clear DECL_PENDING_INLINE_INFO for new
12343         FUNCTION_DECLs.
12345 Thu Mar 19 11:51:58 1998  Jason Merrill  <jason@yorick.cygnus.com>
12347         * decl.c (make_implicit_typename): Lose useless code.
12349         * call.c (standard_conversion): Handle A* -> const A* properly.
12351         * pt.c (get_bindings_real): Rename from get_bindings.  Add
12352         check_rettype parm.
12353         (get_bindings): Pass 1.
12354         (get_bindings_overload): Pass 0.
12356 Wed Mar 19 09:08:12 1998  Mark Mitchell  <mmitchell@usa.net>
12358         * pt.c (check_explicit_specialization): When reverting a static
12359         member function, also remove the `this' parameter from
12360         last_function_parms.
12362 Thu Mar 19 02:27:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
12364         * pt.c (tsubst_copy, CONST_DECL): Don't bother tsubsting
12365         a function context.
12367         * decl.c (store_bindings): Use free_binding_vecs.
12368         (pop_from_top_level): Likewise.
12370 Wed Mar 18 12:41:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
12372         * decl.c (make_implicit_typename): Only change the type of a
12373         TYPENAME_TYPE.
12375 Wed Mar 18 10:09:51 1998  Mark Mitchell  <mmitchell@usa.net>
12377         * semantics.c: New file, containing routines to perform the
12378         semantic phase of parsing.
12379         * parse.y: Use it.
12380         * pt.c (tsubst_expr): Likewise.
12381         * cp-tree.h: Declare the various functions in semantics.c.
12382         Provide macros to access _STMT tree nodes.
12383         * cp-tree.def: Add ASM_STMT tree node.
12384         * Makefile.in, Make-lang.in: Add dependencies on and for
12385         semantics.c.
12387 Wed Mar 18 00:24:10 1998  Jason Merrill  <jason@yorick.cygnus.com>
12389         * pt.c (push_template_decl): Only check primary templates.
12391         * pt.c (check_explicit_specialization): Complain about default args
12392         in explicit specialization.
12394         * parse.y (nomods_initdcl0): Also call cp_finish_decl for a
12395         constructor_declarator.
12397 Tue Mar 17 14:44:54 1998  Mark Mitchell  <mmitchell@usa.net>
12399         * typeck2.c (build_x_arrow): Don't crash when an aggregate type
12400         has no overloaded operator ->.
12402         * call.c (build_field_call): Don't crash when presented with a
12403         field that is actually a nested type.
12405         * decl.c (pushtag): Deal with friend class injection in local
12406         classes.
12408         * call.c (build_object_call): Don't crash if OBJ is a
12409         pointer-to-member-function.
12411 Tue Mar 17 11:40:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
12413         * pt.c (push_template_decl): Complain about template with C linkage,
12414         anonymous template class.
12416 Mon Mar 16 12:10:39 1998  Jason Merrill  <jason@yorick.cygnus.com>
12418         * class.c (pushclass): Only use the mi_matrix stuff #ifdef MI_MATRIX.
12419         * search.c: Likewise.
12421         * lex.c (do_pending_defargs): Only call
12422         maybe_{begin,end}_member_template_processing for FUNCTION_DECLs.
12424         * parse.y (initdcl0_innards): Move maybeasm back into initdcl0 et al.
12426 Mon Mar 16 10:47:22 1998  Mark Mitchell  <mmitchell@usa.net>
12428         * parse.y: Deal with CONSTRUCTORS in new_initializers.
12430 Mon Mar 16 10:54:21 1998  Mark Mitchell  <mmitchell@usa.net>
12432         * pt.c (tsubst_copy): Deal with BIND_EXPR in a way that more
12433         closely mimics the behavior in parse.y.
12434         (tsubst_expr): Return the resulting BLOCK when making a tsubst'ing
12435         into a compound statement.
12437 Sun Mar 15 02:07:26 1998  Jason Merrill  <jason@yorick.cygnus.com>
12439         * cp-tree.h (TEMPLATE_PARMS_FOR_INLINE): New macro.
12440         * pt.c (inline_needs_template_parms): New fn.
12441         (original_template): New fn.
12442         (push_inline_template_parms_recursive): New fn.
12443         (maybe_begin_member_template_processing): Use them.
12444         (maybe_end_member_template_processing): Likewise.
12445         (is_member_or_friend_template): Rename to is_member_template.
12446         Member functions of local classes are never member templates.
12448 Sun Mar 15 01:14:22 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12450         * lex.c (do_identifier): Handle TEMPLATE_DECL that was
12451         added in the class scope to catch redefinition error.
12453         * pt.c (reduce_template_parm_level): Also copy
12454         the DECL_TEMPLATE_PARMS field.
12456 Sun Mar 15 10:54:08 1998  Mark Mitchell  <mmitchell@usa.net>
12458         * pt.c (tsubst): Clear TYPE_REFERENCE_TO when creating a
12459         reduced-level template type parameter.
12461 Sun Mar 15 12:26:02 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12463         * cp-tree.h (struct lang_decl_flags): Add needs_final_overrider.
12464         (DECL_NEEDS_FINAL_OVERRIDER_P): New macro.
12465         * class.c (override_one_vtable): Set DECL_NEEDS_FINAL_OVERRIDER_P.
12466         * decl.c (duplicate_decls): Propagate it.
12467         * typeck2.c (abstract_virtuals_error): Use two loops to emit
12468         abstract virtual functions and virtual functions which need a
12469         final overrider separately.
12471 Thu Mar 12 09:39:40 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12473         * lang-specs.h: Properly put brackets around array elements in
12474         initializer.
12476         * typeck.c (build_binary_op_nodefault): Correctly place parens around
12477         && and || in expression.
12479 Thu Mar 12 09:26:04 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12481         * call.c (default_parm_conversions): Remove prototype definition.
12482         (build_method_call): Remove unused variable result.
12484         * cvt.c (ocp_convert): Remove unused variable conversion.
12486         * decl2.c (ambiguous_decl): Add explicit parameter definition for name.
12488         * except.c (do_unwind): #if 0 definition of unused variables fcall
12489         and next_pc.
12491         * expr.c (extract_scalar_init): #if 0 prototype and function
12492         definition.
12494         * init.c (expand_aggr_init_1): Remove unused variable init_type.
12495         (build_new_1): Remove unused variable t.
12497         * pt.c (instantiate_class_template): Remove unused variable newtag;
12498         cast called function return value to void.
12499         (do_decl_instantiation): Remove unused variables name and fn.
12501         * tree.c (get_type_decl): Add default return to shut up compiler from
12502         complaining control reaches end of non-void function.
12504         * typeck.c (build_x_conditional_expr): Remove unused variable rval.
12506 Thu Mar 12 09:12:15 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12508         * call.c (default_parm_conversions): Remove prototype definition.
12509         (build_method_call): Remove unused variable result.
12510         (build_over_call): Add default case in enumeration switch.
12512 Thu Mar 12 08:39:13 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12514         * decl2.c (lang_decode_option): Change j's type to size_t.
12516         * tree.c (layout_vbasetypes): record_align and desired_align are of
12517         type unsigned int; const_size and nonvirtual_const_size likewise.
12519 Wed Mar 11 07:25:20 1998  Mark Mitchell  <mmitchell@usa.net>
12521         * parse.y (new_initializer): Make sure all initializers are
12522         lists.
12524 Tue Mar 10 07:32:36 1998  Mark Mitchell  <mmitchell@usa.net>
12526         * decl2.c (import_export_decl): Mark tinfo functions for
12527         cv-qualified versions of class types as DECL_NOT_REALLY_EXTERN.
12529 Fri Mar  6 23:27:35 1998  Jeffrey A Law  (law@cygnus.com)
12531         * method.c: Fix typo.
12533 Fri Mar  6 10:06:59 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12535         * method.c: Include "system.h" to get stdlib.h, stdio.h,
12536         ctype.h, string.h, etc.
12537         (issue_nrepeats): Add default case in enumeration switch.
12538         (check_btype): Likewise.
12539         (process_overload_item): Likewise.
12541         * Makefile.in (method.o): Depend on system.h.
12543 Wed Mar  4 22:26:53 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12545         * lex.c (do_scoped_id): Fix parenthesizing.
12547 Wed Mar  4 12:11:53 1998  Michael Tiemann  <tiemann@axon.cygnus.com>
12549         * rtti.c (get_tinfo_fn_dynamic): If this function is called an
12550         FLAG_RTTI is unset, initialize type info machinery and continue
12551         with FLAG_RTTI enabled.
12552         (get_typeid): Likewise.
12554 Wed Mar  4 11:47:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
12556         * typeck.c (unary_complex_lvalue): &D::i has type B::* if i comes
12557         from B.
12559 Wed Mar  4 11:28:08 1998  Mark Mitchell  <mmitchell@usa.net>
12561         * pt.c (finish_member_template_decl): Deal more gracefully with
12562         invalid declarations.
12564 Tue Mar  3 01:38:17 1998  Jason Merrill  <jason@yorick.cygnus.com>
12566         * cvt.c, decl.c, decl2.c, init.c, rtti.c, typeck.c, typeck2.c,
12567         cp-tree.h: Clean up more old overloading code, old RTTI code, and
12568         some formatting quirks.
12570         * call.c, class.c, cp-tree.h, cvt.c, decl.c, init.c, lex.c,
12571         method.c, pt.c, ptree.c, typeck.c: Remove support for
12572         -fno-ansi-overloading and overloading METHOD_CALL_EXPR.
12573         * class.h: Remove.
12574         * Makefile.in: Adjust.
12576         * pt.c (unify): Don't allow reduced cv-quals when strict.
12578         * call.c, class.c, pt.c, cp-tree.h: Remove nsubsts parm from
12579         *type_unification* and unify.
12581 Mon Mar  2 12:11:06 1998  Jason Merrill  <jason@yorick.cygnus.com>
12583         * parse.y (explicit_template_type): Remove TEMPLATE keyword.
12584         (nested_name_specifier): And add it before this use.
12585         (typename_sub0): And this use.  Also add use without the keyword.
12586         (typename_sub1): Likewise.
12587         * pt.c (instantiate_class_template): Don't actually instantiate
12588         anything if our type uses template parms.
12590 Mon Mar  2 11:04:59 1998  Jim Wilson  <wilson@cygnus.com>
12592         * decl.c (start_function): Don't call temporary_allocation for a
12593         nested function.
12595 Sun Mar  1 21:06:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12597         * pt.c (instantiate_class_template): Don't mess with friends if
12598         our type uses template parms.
12600 Sat Feb 28 12:06:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
12602         * parse.y (nested_name_specifier): Use explicit_template_type.
12603         (typename_sub): Allow a template_type, an explicit_template_type,
12604         or an implicit template type at the end.
12605         * lex.c (yyprint): Handle a PTYPENAME being a TEMPLATE_DECL.
12606         * decl.c (make_typename_type): Handle template-id where the name
12607         is a TEMPLATE_DECL.
12608         * call.c (build_scoped_method_call): Handle member template
12609         destructor call.
12610         * pt.c (tsubst_copy, METHOD_CALL_EXPR): Don't assume a member
12611         destructor is represented by the type.
12613         * cp-tree.h (TYPENAME_TYPE_FULLNAME): New macro.
12614         * parse.y (nested_name_specifier): Add 'template' case.
12615         (explicit_template_type): New rule.
12616         (typename_sub): Use it.
12617         * decl.c (make_typename_type): Handle getting a template-id for NAME.
12618         * pt.c (tsubst): Likewise.
12620 Fri Feb 27 11:17:50 1998  Jason Merrill  <jason@yorick.cygnus.com>
12622         * pt.c (add_to_template_args): Fix thinko.
12623         (instantiate_class_template): Call it later.
12625         * pt.c (get_class_bindings): Add outer_args parm.
12626         (most_specialized_class): Likewise.
12627         (instantiate_class_template): Pass it.
12628         (more_specialized_class): Likewise.
12629         (lookup_template_class): Get context from template if none
12630         was specified.
12631         (finish_member_template_decl): Don't do anything with a
12632         partial specialization.
12633         * decl2.c (check_member_template): Use IS_AGGR_TYPE instead of
12634         AGGREGATE_TYPE_P.
12635         * class.c (finish_struct): Member class templates have already been
12636         checked for name clashes.
12637         * decl.c (pushdecl_with_scope): Handle pushing at class level.
12639 Fri Feb 27 02:25:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
12641         * pt.c (tsubst, TEMPLATE_DECL): Support member class templates.
12642         (tsubst, *_PARM): Support multiple levels of template classes.
12643         (instantiate_class_template): Look up the pattern from the
12644         original template.
12645         (lookup_template_class): Handle getting a template for d1.
12646         (push_template_decl): Correct setting of 'primary'.
12647         (reduce_template_parm_level): Add 'levels' parm.
12648         (finish_member_template_decl): Support member class templates.
12649         (template_class_depth): Handle multiple levels.
12650         * parse.y (component_decl_1, fn.def2): Remove member template case.
12651         (component_decl): Add member template cases.
12652         * decl2.c (check_member_template): We now handle member template
12653         classes.
12654         * decl.c (pushtag): Handle member templates.
12655         * method.c (do_inline_function_hair): Don't touch
12656         IDENTIFIER_GLOBAL_VALUE.
12657         * init.c (build_offset_ref): If name isn't an identifier, just
12658         return it.
12659         * spew.c (yylex): Handle PTYPENAME like TYPENAME.
12661         * typeck.c (get_delta_difference): Do adjust for conversions to
12662         and from virtual base.
12664 Wed Feb 25 09:51:29 1998  Jason Merrill  <jason@yorick.cygnus.com>
12666         * typeck.c (get_delta_difference): Give hard error for conversion
12667         from virtual base.
12669         * cp-tree.h: Tweak formatting.
12671 Wed Feb 25 00:35:33 1998  Jason Merrill  <jason@yorick.cygnus.com>
12673         * decl.c (push_namespace): Handle redeclaration error.
12675         * cp-tree.h (IDENTIFIER_NAMESPACE_VALUE): New macro.
12676         (IDENTIFIER_NAMESPACE_BINDINGS): New macro.
12677         (NAMESPACE_BINDING): New macro.
12678         (IDENTIFIER_GLOBAL_VALUE): Use NAMESPACE_BINDING.
12679         * *.c: Use them.
12681         * pt.c (push_template_decl): Use innermost_args.
12683         * decl.c (get_unique_name): Tweak from earlier in the name.
12685 Tue Feb 24 22:15:04 1998  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12687         * cp-tree.def: Add CPLUS_BINDING node.
12688         * cp-tree.h (tree_binding): New struct.
12689         (BINDING_SCOPE, BINDING_VALUE): New macros.
12690         (current_namespace, global_namespace): Declare extern.
12691         (struct lang_decl_flags): New field in_namespace.
12692         (DECL_NAMESPACE_USING, DECL_NAMESPACE_USERS): New macros.
12693         (DECL_NAMESPACE, SET_DECL_NAMESPACE): New macros.
12694         (TREE_INDIRECT_USING): New macro.
12695         * decl2.c (current_namespace, global_namespace): Declare.  The
12696         value is a NAMESPACE_DECL now, not a TREE_LIST.
12697         (is_namespace_ancestor, namespace_ancestor): New static functions.
12698         (add_using_namespace, ambiguous_decl): Likewise.
12699         (lookup_using_namespace): New support function for lookup_name.
12700         (qualified_lookup_using_namespace): New support function for
12701         do_scoped_id and lookup_namespace_name.
12702         (get_namespace_id): Mark as obsolete.
12703         (current_namespace_id): Likewise.
12704         (do_namespace_alias): Implement.
12705         (do_using_directive): Implement as call to add_using_namespace.
12706         * decl.c (binding_for_name): New function.
12707         (push_namespace, pop_namespace): Implement.
12708         (push_decl): Don't install a FUNCTION_DECL in the global branch.
12709         (lookup_namespace_name): Implement using qualified lookup.
12710         (lookup_name_real): For global scoping, lookup in
12711         global_namespace.  For namespace scoping, lookup in given
12712         namespace.  For unscoped lookup, iterate over namespace,
12713         considering using directives.
12714         (init_decl_processing): Initialize global_namespace.
12715         (grokvardecl): Build assembler name as static name for globals.
12716         (grokdeclarator): Remove old namespace mangling.
12717         (xref_tag): When installing a global binding for the
12718         tag, make sure we have an identifier.
12719         * method.c (build_overload_nested_name): Mangle namespaces.
12720         (build_qualified_name): Likewise.
12721         (build_decl_overload_real): Likewise.
12722         * lex.c (build_lang_decl): Set namespace for new declaration to
12723         current_namespace.
12724         (do_scoped_id): Find global names in global or current
12725         namespace, or using qualified namespace lookup, depending on
12726         context.
12727         * init.c (build_member_call): When scope is namespace, use
12728         build_x_function_call instead.
12729         (build_offset_ref): When scope is namespace, collapse processing
12730         to lookup_namespace_name instead.
12731         * error.c (dump_decl): Support NAMESPACE_DECL.
12732         * decl.c (pushdecl): Bind globals to current namespace.
12733         (push_overloaded_decl): Likewise.
12734         (lookup_tag): Likewise.
12735         (lookup_name_current_level): Likewise.
12736         (xref_tag): Likewise.
12737         (start_function): Likewise.
12738         * lex.c (do_identifier): Likewise.
12739         (identifier_typedecl_value): Likewise.
12740         (real_yylex): Likewise.
12741         * method.c (do_inline_function_hair): Likewise.
12742         * parse.y (unscoped): Likewise.
12743         * pt.c (check_explicit_specialization): Likewise.
12744         (lookup_template_class): Likewise.
12745         * rtti.c (call_void_fn): Likewise.
12746         * sig.c (build_sigtable): Likewise.
12747         * ptree.c (lang_print_xnode): New function.
12749 Tue Feb 24 01:40:24 1998  Jason Merrill  <jason@yorick.cygnus.com>
12751         * pt.c (instantiate_class_template): Don't instantiate if pedantic
12752         and the args use template parms.
12754         * pt.c (push_tinst_level): If the instantiation uses template parms,
12755         fail silently.
12756         * decl.c (xref_basetypes): Do call complete_type for basetypes
12757         that involve template parameters.
12759 Tue Feb 24 00:36:43 1998  Jason Merrill  <jason@yorick.cygnus.com>
12761         * typeck2.c (process_init_constructor): Fix labeled init check.
12763 Mon Feb 23 05:08:55 1998  Jason Merrill  <jason@yorick.cygnus.com>
12765         * pt.c, call.c, decl.c, method.c, cp-tree.h: Remove unused NARGS
12766         argument to tsubst and friends.
12768         * pt.c (tsubst, FUNCTION_DECL): Tidy.
12770         * typeck.c (build_x_function_call): Handle static member function
12771         templates like non-templates.  Handle friend templates like normal
12772         function templates.
12773         * pt.c (tsubst, *_PARM): Don't use orig_level.
12774         (get_bindings): Don't call add_to_template_args.
12775         (instantiate_template): Likewise.
12776         (tsubst, FUNCTION_DECL): Call add_to_template_args as appropriate.
12777         * ptree.c (print_lang_type): Print index/level for template parms.
12779 Mon Feb 23 02:52:29 1998  Mark Mitchell  <mmitchell@usa.net>
12781         * Make-lang.in (cc1plus): Note that cc1plus depends on
12782         cp/cp-tree.h and cp/cp-tree.def.
12784         * cp-tree.def (TEMPLATE_CONST_PARM): Remove.
12785         (TEMPLATE_PARM_INDEX): New tree code, used to indicate a
12786         position in a template parameter list.
12787         * cp-tree.h (template_parm_index): New structure, used as the tree
12788         structure for a TEMPLATE_PARM_INDEX.
12789         (TEMPLATE_PARM_IDX): New macro.
12790         (TEMPLATE_PARM_LEVEL): Likewise.
12791         (TEMPLATE_PARM_DESCENDANTS): Likewise.
12792         (TEMPLATE_PARM_ORIG_LEVEL): Likewise.
12793         (TEMPLATE_PARM_DECL): Likewise.
12794         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
12795         (TEMPLATE_TYPE_ORIG_LEVEL): Likewise.
12796         (TEMPLATE_TYPE_DECL): Likewise.
12797         (TEMPLATE_CONST_IDX): Remove.
12798         (TEMPLATE_CONST_LEVEL): Likewise.
12799         (TEMPLATE_CONST_SET_INFO): Likewise.
12800         (TEMPLATE_TYPE_SET_INFO): Likewise.
12801         (TEMPLATE_TYPE_IDX): Redefine in terms of TEMPLATE_PARM_INDEX
12802         node.
12803         (TEMPLATE_TYPE_LEVEL): Likewise.
12804         * decl.c (decls_match): Call comp_template_parms, rather than
12805         expanding it inline.
12806         (duplicate_decls): If two template declarations are being merged,
12807         then their TEMPLATE_INFOs should be merged as well.
12808         (grokfndecl): Save template-id information when declaring a friend
12809         with explicit template arguments.  Pass arguments to
12810         check_explicit_specialization via correct convention; at some
12811         point check_explicit_specialization changed, but these call-sites
12812         did not.
12813         (grokdeclarator): Tidy up slightly.
12814         * decl2.c (check_classfn): Tidy up slightly.  Don't assume that
12815         two template functions with the same DECL_ASSEMBLER_NAME the same,
12816         since the names are not yet mangled.
12817         * error.c (dump_decl): Use TEMPLATE_PARM_INDEX instead of
12818         TEMPLATE_CONST_PARM.
12819         (dump_expr): Likewise.  Use the TEMPLATE_PARM_DECL to get at the
12820         decl for a non-type parameter, rather than printing `<tparm ...>'.
12821         * friend.c (is_friend): Handle TEMPLATE_DECL friends.
12822         (do_friend): Deal with template friends.
12823         * lex.c (do_pending_inlines): Call
12824         maybe_begin_member_template_processing, rather than
12825         conditionally calling begin_member_template_processing.
12826         (process_next_inline): Likewise.  Call
12827         maybe_end_member_template_processing, rather than
12828         conditionally calling end_member_template_processing.
12829         (do_pending_defargs): Likewise.
12830         (do_identifier): Use TEMPLATE_PARM_INDEX instead of
12831         TEMPLATE_CONST_PARM.
12832         * method.c (build_mangled_template_parm_index): New function.
12833         (build_overload_value): Use it.
12834         (build_overload_name): Likewise.
12835         * pt.c (finish_member_template_decl): Allow friend declarations.
12836         (template_class_depth): New function.
12837         (is_member_template): Rename, and modify, to become...
12838         (is_member_or_friend_template): New function.
12839         (end_member_template_processing): Rename, and modify, to become...
12840         (maybe_end_member_template_processing).
12841         (build_template_parm_index): New function.
12842         (reduce_template_parm_level): New function.
12843         (process_template_parm): Modify to use build_template_parm_index.
12844         (push_template_decl): Deal with friend templates.
12845         (uses_template_parms): Use TEMPLATE_PARM_INDEX instead of
12846         TEMPLATE_CONST_PARM.
12847         (tsubst_friend_function): New function.
12848         (instantiate_class_template): Generate the DECL_FRIENDLIST
12849         for a new instantiation by using tsubst_friend_function rather
12850         than just tsubst.
12851         (tsubst): Don't tsubst into a type which is a TEMPLATE_DECL.
12852         Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM, and the
12853         appropriate new macros.  Use reduce_template_parm_level to
12854         generate lower-level template parameters.  Handle tsubst'ing into
12855         TEMPLATE_DECLS that declare TEMPLATE_TEMPLATE_PARMS.  Don't forget
12856         to tsubst the DECL_CONTEXT and DECL_CLASS_CONTEXT of newly created
12857         templates.  Similarly for the template parameters for a new
12858         template.
12859         (tsubst_copy): Tidy up slightly.  Use TEMPLATE_PARM_INDEX instead
12860         of TEMPLATE_CONST_PARM.  Handle TYPE_DECLs by tsubsting into them.
12861         (unify): Use TEMPLATE_PARM_INDEX instead of TEMPLATE_CONST_PARM.
12862         (get_bindings): Call add_to_template_args if necessary.
12863         (instantiate_decl): Handle instantiations of friend templates.
12864         * search.c (lookup_field_1): Don't treat the TYPE_FIELDS of a
12865         TEMPLATE_TYPE_PARM as a list of fields; it's not!
12866         * spew.c (yylex): Do a little manual constant propagation to
12867         clarify the code.
12869 Sun Feb 22 19:53:29 1998  Jeffrey A Law  (law@cygnus.com)
12871         * error.c: Include sys/types.h.
12873 Thu Feb 19 14:49:09 1998  Jeffrey A Law  (law@cygnus.com)
12875         * method.c (build_mangled_name): Start CPP directives in column zero.
12877 Thu Feb 19 10:36:48 1998  Jason Merrill  <jason@yorick.cygnus.com>
12879         * typeck2.c (process_init_constructor): Sorry about non-trivial
12880         labeled initializers.
12881         * parse.y (initlist): Re-enable labeled initializers.
12883 Thu Feb 19 10:15:55 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12885         * pt.c (coerce_template_parms): Add a new parameter, is_tmpl_parm,
12886         all callers changed.  Rely on the new parameter instead of arg
12887         being a TREE_LIST when determine whether we are working inside
12888         template template parameter.  Clean up is_type test.
12890 Thu Feb 19 10:04:12 1998  Jason Merrill  <jason@yorick.cygnus.com>
12892         * cvt.c (cp_convert_to_pointer): Preserve TREE_CONSTANT.
12893         * typeck2.c (initializer_constant_valid_p): Allow conversions
12894         between pointers and references.
12896 1998-02-19  Brendan Kehoe  <brendan@cygnus.com>
12898         * typeck.c (build_unary_op): Only warn about incr/decr a pointer
12899         if pedantic || warn_pointer_arith.
12901 Thu Feb 19 09:37:21 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
12903         * pt.c (unify): Handle TEMPLATE_DECL.
12905 1998-02-18  Brendan Kehoe  <brendan@cygnus.com>
12907         * cp-tree.h (strip_attrs): Remove decl.
12909 1998-02-18  Doug Evans  <devans@cygnus.com>
12911         * decl.c (duplicate_decls): Call merge_machine_decl_attributes.
12912         Update olddecl's attributes too.
12913         (strip_attrs): Remove function.
12914         * typeck.c (common_type): Call merge_machine_type_attributes.
12916 Tue Feb 17 14:07:52 1998  Mark Mitchell  <mmitchell@usa.net>
12918         * parse.y (initdcl0_innards): New grammar symbol.
12919         (nomods_initdecls, nomods_initdcl0): Change type from itype to
12920         none, since the resulting value is never used.
12921         (parse_decl): New function.
12922         (datadef): Remove redundant actions.
12923         (initdcl0, notype_initdcl0, nomods_initdcl0): Use initdcl0_innards.
12924         * parse.c: Regenerated.
12926 Tue Feb 17 11:54:16 1998  Jason Merrill  <jason@yorick.cygnus.com>
12928         * parse.y (simple_stmt): Use getdecls() to check for decl.
12930 Sat Feb 14 11:50:51 1998  Manfred Hollstein  <manfred@s-direktnet.de>
12932         * Make-lang.in (DEMANGLER_INSTALL_NAME, DEMANGLER_CROSS_NAME): New
12933         macros.
12934         (c++.install-common): Install c++filt properly as native or as cross
12935         variant.
12936         (c++.uninstall): Add c++filt.
12938 Fri Feb 13 14:55:37 1998  Jason Merrill  <jason@yorick.cygnus.com>
12940         * call.c (standard_conversion): Fix multi-level ptr conversions.
12942 Fri Feb 13 14:06:22 1998  Mike Stump  <mrs@wrs.com>
12944         * init.c (build_new): Propagate error_mark_node up.
12946 Fri Feb 13 13:24:32 1998  Jason Merrill  <jason@yorick.cygnus.com>
12948         * parse.y (simple_stmt): If the condition isn't a declaration,
12949         start the controlled block after the test.
12951 Fri Feb 13 02:26:10 1998  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
12953         * call.c (build_over_call): Convert builtin abs, labs and fabs to
12954         tree-codes.
12955         * decl.c (init_decl_processing): Re-enable abs, labs and fabs as
12956         builtins.
12958 Fri Feb 13 01:36:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
12960         * call.c (standard_conversion): A BASE_CONV replaces an RVALUE_CONV.
12962 Fri Feb 13 00:21:59 1998  Jason Merrill  <jason@yorick.cygnus.com>
12964         * cp-tree.h: Add access_protected_virtual_node.
12965         * class.c (init_class_processing): Initialize it.
12966         * decl.c (xref_basetypes): Use it.
12967         * parse.y (base_class_access_list): Likewise.
12969         * Make-lang.in (DEMANGLER_PROG): Add $(exeext).
12970         (c++.install-common): Install c++filt.
12972 Thu Feb 12 12:46:51 1998  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
12974         * decl.c (shadow_tag): Give error for typedef-ing built-in types.
12976 Wed Feb 11 23:28:05 1998  Mark Mitchell  <mmitchell@usa.net>
12978         * call.c (reference_binding): Use comptypes when comparing
12979         TYPE_MAIN_VARIANTS to handle non-canonical array/index types.
12981 Wed Feb 11 16:42:04 1998  Mark Mitchell  <mmitchell@usa.net>
12983         * tree.c (is_overloaded_fn): Use really_overloaded_fn.
12984         (really_overloaded_fn): Move check here from is_overloaded_fn.
12985         (get_first_fn): Use really_overloaded_fn and is_overloaded_fn.
12987 Wed Feb 11 15:54:18 1998  Mark Mitchell  <mmitchell@usa.net>
12989         * typeck.c (build_ptrmemfunc): Type-check pointer-to-member
12990         conversions.
12992 Mon Feb  9 22:23:31 1998  Mark Mitchell  <mmitchell@usa.net>
12994         * cp-tree.h (push_template_decl): Return the decl passed in, or an
12995         equivalent duplicate.
12996         * decl.c (pushtag): Use the return value from push_template_decl.
12997         (duplicate_decls): When duplicating a template declaration, merge
12998         the DECL_TEMPLATE_RESULTs as well.
12999         (make_implicit_typename): Don't try to dive into typename types to
13000         find a context for making a new implicit typename.
13001         (start_decl): Use the return value from push_template_decl.
13002         (grokdeclarator): Complain about declarations list `const operator
13003         int'.  Since we don't correctly handle in-class initializations of
13004         non-static data members, complain about this (now illegal)
13005         practice.  Issue an error for initializations of non-const statics
13006         since that is illegal as well, and since we don't handle that case
13007         correctly either.
13008         (start_function): Use the return value from push_template_decl.
13009         (start_method): Likewise.
13010         * decl2.c (grokfield): Likewise.  Since the change to
13011         grokdeclarator ensures that all initialized fields are in fact
13012         static, remove a redundant test for TREE_PUBLIC.
13013         * parse.y (initlist): Disable labeled initializers since they do
13014         not work as per the documentation, and since they do not use the
13015         same syntax as the C front end.
13016         * pt.c (push_template_decl): Return the decl passed in, or an
13017         equivalent duplicate.
13018         (lookup_template_class): When searching in a nested context,
13019         use the right arguments.
13020         (uses_template_parms): Handle the DECL_INITIAL for a CONST_DECL.
13021         * typeck.c (build_component_ref): Assign the correct type to the
13022         result of build_vfn_ref.
13024 Tue Feb 10 23:56:46 1998  Jason Merrill  <jason@yorick.cygnus.com>
13026         * pt.c (convert_nontype_argument): Fix typo.
13027         (check_explicit_specialization): Allow old-style specialization
13028         of class template members.
13030 Tue Feb 10 20:36:52 1998  Jason Merrill  <jason@yorick.cygnus.com>
13031                           Manfred Hollstein  <manfred@s-direktnet.de>
13033         * decl.c (grokdeclarator): Use DECL_USE_TEMPLATE instead
13034         when deciding to override DECL_ASSEMBLER_NAME.
13036 Tue Feb 10 15:30:55 1998  Andrew MacLeod  <amacleod@torpedo.to.cygnus.com>
13038         * decl2.c (lang_f_options): Add -fsquangle to option processing list.
13039         * cp-tree.h (flag_do_squangling): Add declaration.
13040         * lang-options.h: Add -fsquangle and -fno-squangle.
13041         * method.c: Add macros and static variables for squangling.
13042         (build_overload_name): Rename to build_mangled_name, add logic for B
13043         compression, and split into process_modifiers and
13044         process_overload_item.
13045         (process_modifiers): New function, to handle constant, reference,
13046         and pointer types.
13047         (process_overload_item): New function, handles issue of type codes.
13048         (build_overload_name): New function, start squangling and call
13049         build_mangled_name.
13050         (ALLOCATE_TYPEVEC, DEALLOCATE_TYPEVEC): Remove macro and expand inline.
13051         (start_squangling): New function to initialize squangling structs.
13052         (end_squangling): New function to destroy squangling structs.
13053         (nrepeats): Rename variable to Nrepeats.
13054         (issue_nrepeats): New function for issuing 'n' type repeats.
13055         (check_ktype): New function to check for type K name compression.
13056         (build_overload_nested_name): Add a check for K name compression.
13057         (build_qualified_name): Add a check for K name compression and don't
13058         use DECL_ASSEMBLER_NAME when squangling is on.
13059         (check_btype): New function, checks for B type compression.
13060         (build_static_name, build_decl_overload_real): Initiate squangling.
13061         (build_typename_overload, build_overload_with_type): Initiate
13062         squangling
13064 Sun Feb  8 23:47:38 1998  scott snyder  <sss@d0linux01.fnal.gov>
13066         * method.c (make_thunk): Avoid name buffer overflow.
13068 Sat Feb  7 16:48:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
13070         * pt.c (instantiate_decl): Call cp_finish_decl for vars even if we
13071         don't define them yet.
13073         * parse.y (nomods_initdcl0): Add constructor_declarator case.
13075 Fri Feb  6 21:32:25 1998  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
13077         * config-lang.in (diff_excludes): Use basename only.
13079 Thu Feb  5 19:10:40 1998  Jason Merrill  <jason@yorick.cygnus.com>
13081         * tinfo2.cc: Add tinfo for signed char.
13083 Thu Feb  5 14:38:23 1998  Mike Stump  <mrs@wrs.com>
13085         * search.c (compute_access): Handle protected constructors in derived
13086         classes as accessible.
13088 Wed Feb  4 01:26:49 1998  Jason Merrill  <jason@yorick.cygnus.com>
13090         * expr.c (cplus_expand_expr, PCC_STATIC_STRUCT_RETURN code):
13091         Call convert_from_reference sooner.
13093 Tue Feb  3 23:50:52 1998  Mark Mitchell  <mmitchell@usa.net>
13095         * cvt.c (ocp_convert): Obtain the constant values from constant
13096         decls even if the destination type is the same as the type of the
13097         decl.
13099         * decl2.c (finish_file): Make sure that static inlines with
13100         definitions are not marked DECL_EXTERNAL before returning.
13102 Tue Feb  3 22:43:42 1998  Jason Merrill  <jason@yorick.cygnus.com>
13104         * decl.c: Lose arg_looking_for_template.
13105         (lookup_name_real): Likewise.
13106         * parse.y: Lose processing_template_arg, template_arg1.
13107         (primary): Likewise.
13108         * spew.c (yylex): Set lastiddecl for PTYPENAMEs, too.
13110 Tue Feb  3 22:04:01 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13112         * error.c (dump_decl): Fix type of default arguments for template
13113         template parameters and nontype template parameters.
13114         * parse.y (template_parm): Handle invalid default template
13115         template arguments here.
13117         * parse.y (template_parm): Use template_arg instead of PTYPENAME
13118         for default template template argument.
13119         * pt.c (coerce_template_parms): Merge default template argument
13120         codes.  Can treat RECORD_TYPE as template name if it is implicitly
13121         created.  Fix argument index in error message.
13122         * typeck.c (comptypes): Merge template argument comparison codes in
13123         TEMPLATE_TEMPLATE_PARM and RECORD_TYPE.
13125 Tue Jan  6 01:42:44 1998  Mumit Khan  <khan@xraylith.wisc.edu>
13127         * lex.c (file_name_nondirectory): Also check for '/'.
13129 Mon Feb  2 11:24:22 1998  Mark Mitchell  <mmitchell@usa.net>
13131         * parse.y (primary): Deal with statement-expressions in
13132         templates.
13133         * pt.c (tsubst_copy): Handle BIND_EXPR.
13134         * tree.c (mapcar): Likewise.
13136         * call.c (add_template_candidate_real): Pass extra parameter to
13137         fn_type_unification.
13138         * cp-tree.h (fn_type_unification): Add parameter.
13139         * pt.c (fn_type_unification): Add additional parameter to deal with
13140         static member functions.
13141         (get_bindings): Deal with static member functions.
13143         * cp-tree.h (DECL_NONSTATIC_MEMBER_FUNCTION_P): New macro.
13144         (revert_static_member_fn): Declare.
13145         * decl.c (revert_static_member_fn): Remove declaration.  Change
13146         linkage from internal to external.
13147         (cp_finish_decl): Deal with virtual functions in classes local to
13148         template functions.
13149         * decl2.c (finish_file): Don't forget to emit increment/decrement
13150         expressions in initializers for file-scope variables.
13151         * parse.y (typename_sub2): If the typename doesn't names a
13152         template, rather than a type, issue an error message.
13153         * pt.c (check_explicit_specialization): Handle specializations of
13154         static member functions.
13155         (coerce_template_parms): Handle offset references to lists of
13156         member functions.
13157         * search.c (note_debug_info_needed): Don't crash when handed a
13158         type which is being defined.
13159         * typeck.c (complete_type): Don't crash when handed NULL_TREE;
13160         that can happen with some illegal code.
13162 Mon Feb  2 00:57:38 1998  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13164         * call.c (user_harshness): Initialize `code' to 0.
13165         (build_method_call): Initialize `candidates', `cp' and `len' to 0.
13166         (null_ptr_cst_p): Add parentheses around && within ||.
13167         (standard_conversion): Likewise.
13168         (z_candidate): Likewise.
13169         (build_user_type_conversion_1): Initialize `args' to NULL_TREE.
13170         (build_object_call): Likewise for `mem_args'.
13171         (build_new_op): Likewise for `mem_arglist'.  Add `return' from
13172         default case in enumeration switch.
13174         * class.c (build_vtable_entry): Add explicit braces to avoid
13175         ambiguous `else'.
13176         (build_class_init_list): Likewise.
13177         (finish_struct_1): Initialize `width' to 0.
13178         (instantiate_type): Initialize `name' to NULL_TREE.  Add
13179         explicit braces to avoid ambiguous `else'.
13181         * cvt.c (convert_to_aggr): Add explicit braces to avoid ambiguous
13182         `else'.
13184         * decl.c (grok_reference_init): Eliminate unused parameter, all
13185         callers changed.
13186         (record_builtin_type): Initialize `tdecl' to NULL_TREE.
13187         (init_decl_processing): Initialize `vb_off_identifier' to NULL_TREE.
13188         (cp_finish_decl): Initialize `ttype' to NULL_TREE.
13189         (grokdeclarator): Add parentheses around && within ||.  Add
13190         explicit braces to avoid ambiguous `else'.
13191         (grokparms): Initialize `type' to NULL_TREE.
13192         (xref_tag): Remove unused label `just_return'.
13193         (finish_enum): Initialize `minnode' and `maxnode' to NULL_TREE.
13194         (finish_function): Initialize `cond' and `thenclause' to NULL_TREE.
13195         (hack_incomplete_structures): Add parentheses around assignment
13196         used as truth value.
13198         * decl2.c (coerce_delete_type): Hide definition of `e3'.
13200         * error.c: Include <stdlib.h>.
13201         (dump_expr): Change the type of `i' to size_t.  Remove unused
13202         label `error'.
13204         * except.c (init_exception_processing): Remove unused variable `d'.
13205         (expand_throw): Likewise for `label'.
13207         * friend.c (add_friends): Add explicit braces to avoid ambiguous
13208         `else'.
13210         * init.c (sort_member_init): Initialize `last_field' to NULL_TREE.
13211         (sort_base_init): Likewise for `binfo'.
13212         (expand_member_init): Likewise for `rval'.
13213         (build_member_call): Add parentheses around assignment used as
13214         truth value.
13215         (build_offset_ref): Add explicit braces to avoid ambiguous `else'.
13216         (build_new): Initialize `nelts' to NULL_TREE.  Initialize
13217         `old_immediate_size_expand' to 0.
13218         (build_new_1): Initialize `nelts' and `alloc_node' to NULL_TREE.
13219         (build_vec_delete_1): Remove unused variable `block'.
13220         (expand_vec_init): Initialize `itype' to NULL_TREE.
13222         * lex.c: Include <strings.h> if we don't have <string.h>.  Protect
13223         declaration of `index' and `rindex' with autoconf macros.
13224         (reinit_parse_for_expr): Remove unused variables
13225         `look_for_semicolon' and `look_for_lbrac'.
13226         (cons_up_default_function): Initialize `args' to NULL_TREE.
13227         (readescape): Initialize `firstdig' to 0.
13228         (real_yylex): Add parentheses around assignment used as truth value.
13230         * method.c: Include <strings.h> if we don't have <string.h>.
13231         Protect declaration of `index' with autoconf macro.
13233         * parse.y (primary): Add explicit braces to avoid ambiguous `else'.
13234         Initialize `type' to NULL_TREE.
13235         (structsp): Remove unused variable `id'.
13237         * pt.c (coerce_template_parms): Add explicit braces to avoid
13238         ambiguous `else'.
13239         (lookup_template_class): Initialize `template' to NULL_TREE.
13240         (instantiate_class_template): Remove unused variable `name' and `e'.
13241         (tsubst): Likewise for `i'.  Initialize `last' to NULL_TREE.
13242         (do_poplevel): Initialize `saved_warn_unused' to 0.
13243         (type_unification): Remove unused varable `parm'.
13244         (unify): Likewise for `j'.
13246         * repo.c (init_repo): Add parentheses around assignment used as
13247         truth value.
13248         (finish_repo): Remove unused varable `p'.
13250         * search.c (get_binfo): Initialize `type' to NULL_TREE.
13251         (get_base_distance): Likewise.
13252         (lookup_field): Initialize `rval_binfo_h', `type', `basetype_path'
13253         and `new_v' to NULL_TREE.
13254         (lookup_fnfields): Likewise for `rval_binfo_h'.
13255         (breadth_first_search): Add parentheses around assignment used as
13256         truth value.
13257         (get_template_base): Initialize `type' to NULL_TREE.
13259         * sig.c (append_signature_fields): Initialize `last_mfptr' to
13260         NULL_TREE.
13261         (build_signature_table_constructor): Likewise for
13262         `last_rhs_field', `pfn' and `vt_off'.
13263         (build_sigtable): Likewise for `init'.
13265         * tree.c (break_out_calls): Initialize `t2' to NULL_TREE.
13266         (propagate_binfo_offsets): Likewise for `delta'.
13267         (hash_tree_cons): Initialize hashcode to 0.
13268         (can_free): Likewise for `size'.
13269         (cp_tree_equal): Add explicit braces to avoid ambiguous `else'.
13271         * typeck.c (convert_sequence): Hide prototype.
13272         (common_type): Add explicit braces to avoid ambiguous `else'.
13273         (comp_target_types): Likewise.
13274         (build_x_function_call): Initialize `ctypeptr' to NULL_TREE.
13275         (build_function_call_real): Add explicit braces to avoid ambiguous
13276         `else'.
13277         (convert_arguments): Initialize `called_thing' to 0.
13278         (convert_for_initialization): Initialize `savew' and `savee' to 0.
13280         * typeck2.c (incomplete_type_error): Initialize `errmsg' to 0.
13281         (digest_init): Initialize `old_tail_contents' to NULL_TREE.
13282         (build_x_arrow): Likewise for `last_rval'.
13284         * xref.c (GNU_xref_decl): Initialize `cls' to 0.
13286 Sun Feb  1 12:45:34 1998  J"orn Rennecke  <amylaar@cygnus.co.uk>
13288         * decl.c (init_decl_processing): Use set_sizetype.
13289         * decl2.c (sizetype): Don't declare.
13290         * typeck.c (c_sizeof): Convert result of *_DIV_EXPR to sizetype.
13291         (c_sizeof_nowarn, build_binary_op_nodefault): Likewise.
13292         (build_component_addr, unary_complex_lvalue): Likewise.
13293         * rtti.c (expand_class_desc): Likewise.
13294         * class.c (get_vfield_offset): Likewise.
13296 Thu Jan 29 10:39:30 1998  Mark Mitchell  <mmitchell@usa.net>
13298         * pt.c (convert_nontype_argument): Move check for is_overloaded_fn
13299         early to avoid bogus error.  Handle overloaded function
13300         names provided as template arguments correctly.
13301         (coerce_template_parms): Don't mishandle overloaded functions when
13302         dealing with template template parameters.
13303         (lookup_template_class): Issue an error message, rather than
13304         crashing, when the TYPE_DECL provided is not a template type.
13306 Wed Jan 28 23:14:44 1998  Jason Merrill  <jason@yorick.cygnus.com>
13308         * class.c (instantiate_type): Don't just return a known type if
13309         it's wrong.
13311 Wed Jan 28 11:04:07 1998  Mark Mitchell  <mmitchell@usa.net>
13313         * class.c (instantiate_type): Remove handling of FUNCTION_DECL
13314         since that code could never be reached.
13316         * error.c (dump_decl): Avoid aborting in the midst of printing an
13317         error message about an illegal template declaration.
13319         * parse.y (structsp): Print an error message, rather than crashing,
13320         when a class-head does not name a class.
13322         * pt.c (convert_nontype_argument):  Allow REAL_TYPE and COMPLEX_TYPE
13323         template arguments as a g++ extension.
13325         * cp-tree.def (ALIGNOF_EXPR): New tree code.
13326         * decl2.c (grok_alignof): If processing_template_decl, just store
13327         the expression.
13328         * typeck.c (c_alignof): Likewise.
13329         * decl2.c (build_expr_from_tree): Handle ALIGNOF_EXPR.
13330         * error.c (dump_expr): Likewise.
13331         * pt.c (tsubst_copy): Likewise.
13332         * tree.c (cp_tree_equal): Likewise.
13333         * pt.c (uses_template_parms): Correctly determine whether or not a
13334         SIZEOF_EXPR/ALIGNOF_EXPR uses template parameters so that constant
13335         folding can be done.
13337         * cp-tree.h (grok_enum_decls): Remove type parameter.
13338         * decl.c (grok_enum_decls): Likewise.
13339         * decl2.c (grok_x_components): Call grok_enum_decls
13340         unconditionally, since it will do nothing if there is no
13341         current_local_enum.  Use the new calling sequence.
13342         * pt.c (tsubst_enum): Use the new calling sequence for
13343         grok_enum_decls.
13345         * decl.c (start_function): Make member functions of local classes
13346         in extern inline functions have comdat linkage here...
13347         (grokdeclarator): Rather than here.
13349 Wed Jan 28 10:55:47 1998  Jason Merrill  <jason@yorick.cygnus.com>
13351         * pt.c (convert_nontype_argument): Use decl_constant_value.
13353 Tue Jan 27 16:42:21 1998  Mark Mitchell  <mmitchell@usa.net>
13355         * call.c (add_template_candidate_real): New function.
13356         (add_template_candidate): Use it.
13357         (add_template_conv_candidate): Likewise.
13358         (joust): Pass extra argument to more_specialized.
13359         * class.c (instantiate_type): Handle a single FUNCTION_DECL.
13360         (is_local_class): Remove.
13361         (finish_struct): Check TI_PENDING_SPECIALIZATION_FLAG.
13362         * cp-tree.h (is_local_class): Remove.
13363         (perform_array_to_pointer_conversion): Likewise.
13364         (finish_member_template_decl): Add.
13365         (check_explicit_specialization): Return a tree, not an int.
13366         (more_specialized): Take additional argument.
13367         (get_bindings): Likewise.
13368         (TI_PENDING_SPECIALIZATION_FLAG): New macro.
13369         * cvt.c (perform_qualification_conversions): Use comp_ptr_ttypes.
13370         (perform_array_to_pointer_conversion): Remove.
13371         * decl.c (saved_scope): Add processing_specialization,
13372         processing_explicit_instantiation fields.
13373         (maybe_push_to_top_level): Save them.
13374         (pop_from_top_level): Restore them.
13375         (grokfndecl): Use new return value from
13376         check_explicit_specialization.
13377         (start_decl): Don't check flag_guiding_decls before pushing
13378         decls.
13379         (cp_finish_decl): Remove previous (bogus) change.
13380         (grok_declarator): Use decl_function_context rather than
13381         is_local_class.
13382         * decl2.c (finish_file): Pass extra argument to get_bindings.
13383         (build_expr_from_tree): Let build_x_component_ref check
13384         validity of arguments rather than doing it here.
13385         * lex.c (cons_up_default_function): Remove code fooling with
13386         processing_specialization, processing_explicit_instantiation
13387         flags, as that is now done in {maybe_push_top,pop_from}_top_level.
13388         * method.c (build_overload_identifier): Mangle local classes in
13389         template functions correctly.
13390         * parse.y (finish_member_template_decl): Move to pt.c.
13391         * pt.c (finish_member_template_decl): Moved here from parse.y.
13392         (print_candidates): New function.
13393         (determine_specialization): Change interface.  Properly look for
13394         most specialized versions of template candidates.
13395         (check_explicit_specialization): Fully process explicit
13396         instantiations.
13397         (push_template_decl): Avoid looking at CLASSTYPE fields in
13398         FUNCTION_DECLS.
13399         (determine_overloaded_function): Remove.
13400         (convert_nontype_argument): Change name from
13401         convert_nontype_parameter.  Use determine_overloaded_function
13402         instead of instantiate_type.
13403         (mangle_class_name_for_template): Handle type contexts as well as
13404         function contexts.
13405         (classtype_mangled_name): Likewise.
13406         (lookup_template_class): Likewise.
13407         (tsubst): Likewise.
13408         (more_specialized): Take explict template arguments as a
13409         parameter.
13410         (most_specialized): Likewise.
13411         (get_bindings): Likewise.  Check that return types match before
13412         proclaiming a function a match.
13413         (do_decl_instantiation): Remove code searching for function to
13414         instantiate; that is now done in check_explicit_specialization.
13415         (add_maybe_template): Pass extra argument to get_bindings.
13416         * tree.c (really_overloaded_fn): Use is_overloaded_fn to simplify
13417         implementation.
13418         * typeck.c (build_component_ref): Check for invalid arguments.
13420 Tue Jan 27 01:44:02 1998  Jason Merrill  <jason@yorick.cygnus.com>
13422         * expr.c (cplus_expand_expr, AGGR_INIT_EXPR): Don't check that
13423         return_target and call_target are equivalent.
13425         * pt.c (type_unification_real): Just accept function parms that
13426         don't use any template parms.
13428 Sun Jan 25 03:30:00 1998  Jason Merrill  <jason@yorick.cygnus.com>
13430         * decl.c (cp_finish_decl): When bailing on a comdat variable, also
13431         unset DECL_NOT_REALLY_EXTERN.
13433         * parse.y (typename_sub*): Fix std::.
13435 Sat Jan 24 12:13:54 1998  Jason Merrill  <jason@yorick.cygnus.com>
13437         * error.c (dump_decl): Fix type default template args.
13438         (dump_type): Hand TEMPLATE_DECL off to dump_decl.
13440 Fri Jan 23 18:34:37 1998  Mumit Khan  <khan@xraylith.wisc.edu>
13442         * lex.c (DIR_SEPARATOR): Define to be '/' if not already defined.
13443         (file_name_nondirectory): Use.
13445 Wed Jan 21 10:29:57 1998  Kriang Lerdsuwanakij  <lerdsuwa@scf.usc.edu>
13447         * pt.c (coerce_template_parms): Don't access elements of ARGLIST
13448         that are not really present.  Substitute default arguments in
13449         template template arguments.  Correctly convert TEMPLATE_DECL to
13450         TEMPLATE_TEMPLATE_PARM.
13451         (comp_template_args): TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM
13452         are no longer treated specially here.
13453         * parse.y (template_template_parm): Fix copy error.
13454         * decl.c (grokdeclarator): Warn about missing `typename' for nested
13455         type created from template template parameters.
13456         * parse.y (bad_parm): Likewise
13458         * class.c (finish_struct): Handle TEMPLATE_TEMPLATE_PARM.
13459         (push_nested_class): Likewise.
13460         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): New tree code.
13461         * cp-tree.h (DECL_TEMPLATE_TEMPLATE_PARM_P): New macro.
13462         (copy_template_template_parm): Declare.
13463         * decl.c (arg_looking_for_template): New variable.
13464         (lookup_name_real): Handle TEMPLATE_TEMPLATE_PARM.
13465         Try to return TEMPLATE_DECL or TEMPLATE_TEMPLATE_PARM
13466         node if arg_looking_for_template is nonzero.
13467         (pushdecl): Handle TEMPLATE_TEMPLATE_PARM.
13468         (grok_op_properties, xref_tag, xref_basetypes): Likewise.
13469         (grokdeclarator): Handle TEMPLATE_DECL.
13470         * decl2.c (constructor_name_full): Handle TEMPLATE_TEMPLATE_PARM.
13471         * error.c (dump_type): Add TEMPLATE_DECL and TEMPLATE_TEMPLATE_PARM.
13472         (dump_type_prefix, dump_type_suffix): Handle TEMPLATE_TEMPLATE_PARM.
13473         (dump_decl): Handle unnamed template type parameters.
13474         Handle template template parameters.
13475         (dump_function_name): Handle template template parameters.
13476         * init.c (is_aggr_typedef, is_aggr_type, get_aggr_from_typedef):
13477         Handle TEMPLATE_TEMPLATE_PARM.
13478         * method.c (build_template_template_parm_names): New function.
13479         (build_template_parm_names): Handle TEMPLATE_DECL.
13480         (build_overload_nested_name, build_overload_name):
13481         Handle TEMPLATE_TEMPLATE_PARM.
13482         * parse.y (maybe_identifier): New nonterminal.
13483         (template_type_parm): Use it.
13484         (template_template_parm, template_arg1): New nonterminal.
13485         (template_parm): Add template_template_parm rules.
13486         (template_arg): Set processing_template_arg.
13487         (template_arg1): Rules moved from template_arg.
13488         (primary, nonnested_type): Set arg_looking_for_template if we are
13489         processing template arguments.
13490         * pt.c (begin_member_template_processing): Handle TEMPLATE_DECL.
13491         (process_template_parm): Handle template template parameters.
13492         (coerce_template_parms, comp_template_args): Likewise.
13493         (mangle_class_name_for_template, lookup_template_class): Likewise.
13494         (uses_template_parms): Handle TEMPLATE_DECL and
13495         TEMPLATE_TEMPLATE_PARM.
13496         (current_template_args): Handle TEMPLATE_DECL.
13497         (tsubst, tsubst_copy, unify): Handle TEMPLATE_TEMPLATE_PARM.
13498         * search.c (dfs_walk, dfs_record_inheritance):
13499         Handle TEMPLATE_TEMPLATE_PARM.
13500         * tree.c (copy_template_template_parm): New function.
13501         (mapcar): Handle TEMPLATE_TEMPLATE_PARM.
13502         * typeck.c (comptypes): Handle TEMPLATE_TEMPLATE_PARM.
13504 Mon Jan 19 22:40:03 1998  Mark Mitchell  <mmitchell@usa.net>
13506         * decl.c (start_decl): Don't allow duplicate definitions of static
13507         data members.
13509         * call.c (build_user_type_conversion_1): Handle user-defined
13510         template conversion operators correctly.
13512         * decl2.c (build_expr_from_tree): Issue an error message if the
13513         object in a COMPONENT_REF is a TEMPLATE_DECL.
13515         * typeck.c (incomplete_type_error): Handle TEMPLATE_TYPE_PARMs.
13517         * class.c (is_local_class): New function.
13518         * cp-tree.h (is_local_class): Declare it.
13519         (last_tree): Likewise.
13520         (begin_tree): Likewise.
13521         (end_tree): Likewise.
13522         (lookup_template_class): Change prototype.
13523         * decl.c (cp_finish_decl): Check for NULL where necessary.
13524         Consider FUNCTION_DECLS to declare objects with top-level binding,
13525         when calling make_decl_rtl.
13526         (grokdeclarator): Give members of local classes internal linkage.
13527         (start_function): Remove declaration of last_tree.
13528         (finish_function): Set flag_keep_inline_functions around call to
13529         rest_of_compilation if we are processing a member function in a
13530         local class.
13531         (start_method): Call push_template_decl for member functions of
13532         local classes in template functions.
13533         * decl2.c (import_export_decl): Don't give external linkage to
13534         instantiations of templates with internal linkage.
13535         * parse.y (last_tree): Remove declaration.
13536         (template_type): Pass extra parameter to lookup_template_class.
13537         (self_template_type): Likewise.
13538         (structsp): Move call to reset_specialization into left_curly.
13539         (left_curly): Call reset_specialization, and begin_tree.
13540         * pt.c (saved_trees): New variable.
13541         (mangle_class_name_for_template): Change prototype.  Use
13542         additional function context to name local classes in templates
13543         correctly.
13544         (classtype_mangled_name): Pass the context.
13545         (push_template_decl): Handle local classes and templates, and
13546         member functions for such classes.
13547         (convert_nontype_parameter): Fix handling of pointer-to-member
13548         constants.
13549         (lookup_template_class): Handle local classes in templates.
13550         (tsubst): Likewise.  Don't assume that template instantiations
13551         have external linkage; pay attention to the template declaration.
13552         (mark_decl_instantiated): Likewise.
13553         (begin_tree): New function.
13554         (end_tree): Likewise.
13556         * decl.c (xref_basetypes): Don't call complete_type for basetypes
13557         that involve template parameters; that can lead to infinite
13558         recursion unnecessarily.
13560         * pt.c (register_specialization): Do not register specializations
13561         that aren't ready to be registered yet.
13562         (check_explicit_specialization): Handle explicit specialization of
13563         constructors and destructors.
13564         (build_template_decl): New function.
13565         (push_template_delc): Handle out-of-class specializations of
13566         member templates.
13568         * pt.c (check_explicit_specialization): Set up the template
13569         information before registering the specialization.
13570         (coerce_template_parms): Fix thinko.
13571         (tsubst): Handle specializations of member templates correctly.
13573         * class.c (finish_struct_methods): Remove calls to
13574         check_explicit_specialization from here.
13575         (finish_struct): And insert them here.
13576         * cp-tree.h (perform_qualification_conversions): New function.
13577         (perform_array_to_pointer_conversion): Likewise.
13578         (begin_explicit_instantiation): Likewise.
13579         (end_explicit_instantiation): Likewise.
13580         (determine_specialization): Renamed from
13581         determine_explicit_specialization.
13582         (comp_template_parms): New function.
13583         (processing_explicit_instantiation): New variable.
13584         * cvt.c (perform_qualification_conversions): New function.
13585         (perform_array_to_pointer_conversion): Likewise.
13586         * decl.c (duplicate_decls): Don't consider template functions
13587         alike unless they have the same parameters.  Refine handling of
13588         instantiation/specialization mismatches.
13589         (start_decl): Don't call pushdecl for template specializations,
13590         since they don't affect overloading.
13591         (start_function): Likewise.
13592         (grokfndecl): Call check_explicit_specialization a little later.
13593         Don't call duplicate_decls for memberm template specializations.
13594         (grokdeclarator): Don't update template_count for classes that are
13595         themselves specializations.  Remove use of `2' as parameter to
13596         grokfndecl since that value isn't used.
13597         * lex.c (cons_up_default_function): Save and restore
13598         processing_explicit_instantiation around calls to grokfield.
13599         * parse.y (finish_member_template_decl): New function.
13600         (component_decl_1): Use it.
13601         (fn.def2): Likewise.
13602         (template_arg_list_opt): New nonterminal.
13603         (template_type): Use it.
13604         (self_template_type): Likewise.
13605         (template_id): Likewise.
13606         (object_template_id): Likewise.
13607         (notype_template_declarator): Likwise.
13608         (begin_explicit_instantiation): Likewise.
13609         (end_explicit_instantiation): Likewise.
13610         (explicit_instantiation): Use them.
13611         * pt.c (coerce_template_parms): Add parameters.
13612         (processing_explicit_instantiation): New variable.
13613         (convert_nontype_parameter): New function.
13614         (determine_overloaded_function): Likewise.
13615         (begin_explicit_instantiation): Likewise.
13616         (end_explicit_instantiation): Likewise.
13617         (retrieve_specialization): Likewise.
13618         (register_specialization): Likewise.
13619         (processing_explicit_specialization): Removed.
13620         (determine_specialization): Handle specializations of member
13621         functions of template class instantiations.
13622         (check_explicit_specialization): Refine to conform to standard.
13623         (comp_template_parms): New function.
13624         (coerce_template_parms): Call convert_nontype_parameter.
13625         (tsubst): Refine handling of member templates.  Use
13626         register_specialization.
13627         (instantiate_template): Use retrieve_specialization.
13628         (do_decl_instantiation): Likewise.
13629         (instantiate_decl): Likewise.
13630         (type_unification): Improve handling of explict template
13631         arguments.
13632         * tree.c (mapcar): Return error_mark_node, rather than aborting,
13633         on VAR_DECLS, FUNCTION_DECLS, and CONST_DECLS.
13634         * typeck.c (build_unary_op): Call determine_specialization, rather
13635         than determine_explicit_specialization.
13637 Mon Jan 19 13:18:51 1998  Jason Merrill  <jason@yorick.cygnus.com>
13639         * cvt.c (build_up_reference): A TARGET_EXPR has side effects.
13641 Fri Jan 16 11:40:50 1998  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13643         * error.c (dump_decl): For enum tags, output the tag, not its value.
13645 1998-01-13  Brendan Kehoe  <brendan@cygnus.com>
13647         * decl.c (init_decl_processing): Only call init_rtti_processing
13648         FLAG_RTTI is set.
13650 Mon Jan 12 01:35:18 1998  Jason Merrill  <jason@yorick.cygnus.com>
13652         * init.c (build_new_1): Split out from build_new.
13653         (build_new): Just return a NEW_EXPR.
13654         * expr.c (cplus_expand_expr): Handle NEW_EXPR.
13656         * decl2.c (get_temp_regvar): Tweak.
13658         * cp-tree.h (TREE_CALLS_NEW): Comment out.
13659         * class.c (resolves_to_fixed_type_p): Remove use.
13660         * method.c (build_opfncall): Likewise.
13661         * call.c (build_new_op): Likewise.
13663 Wed Jan  7 23:47:13 1998  Jason Merrill  <jason@yorick.cygnus.com>
13665         * exception.cc (__eh_alloc, __eh_free): New fns.
13666         (__cp_push_exception, __cp_pop_exception): Use them.
13667         (__uncatch_exception): Call terminate here if no exception.
13668         * except.c (build_terminate_handler): New fn.
13669         (expand_start_catch_block): Use it.
13670         (expand_exception_blocks): Likewise.
13671         (alloc_eh_object): New fn.
13672         (expand_throw): Use it.  Protect exception init with terminate.
13673         * typeck.c (build_modify_expr): Remove code that ignores trivial
13674         methods.
13676 Mon Dec 22 11:36:27 1997  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13678         * call.c (add_builtin_candidate): Add default case in enumeration
13679         switch.
13680         (build_new_op): Likewise.
13681         (convert_like): Likewise.
13682         * cvt.c (build_expr_type_conversion): Likewise.
13683         * tree.c (real_lvalue_p): Likewise.
13684         (lvalue_p): Likewise.
13685         (cp_tree_equal): Likewise.
13686         * typeck.c (comptypes): Likewise.
13687         (build_component_ref): Likewise.
13688         (build_function_call_real): Likewise.
13689         (build_binary_op_nodefault): Likewise.
13690         (build_unary_op): Likewise.
13691         (build_modify_expr): Likewise.
13692         * typeck2.c (initializer_constant_valid_p): Likewise.
13694 Sun Dec 21 15:59:00 1997  Nick Clifton  <nickc@cygnus.com>
13696         * decl2.c (lang_decode_option): Add support for -Wunknown-pragmas.
13698 Thu Dec 18 14:51:50 1997  Mark Mitchell  <mmitchell@usa.net>
13700         * pt.c (coerce_template_parms): Make sure to digest_init if
13701         possible.
13703         * decl.c (duplicate_decls): Make the newdecl virtual if the
13704         olddecl was, just as is done with other attributes of olddecl.
13706 Thu Dec 18 14:43:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
13708         * typeck.c (unary_complex_lvalue): Ignore op0 when taking the
13709         address of an OFFSET_REF.
13711         * cp-tree.def: Add AGGR_INIT_EXPR.
13712         * error.c, tree.c, typeck.c: Replace uses of NEW_EXPR with
13713         AGGR_INIT_EXPR where appropriate.
13714         * expr.c (cplus_expand_expr): Likewise.  Simplify.
13716         * decl2.c (finish_file): Remove call to register_exception_table.
13718 Wed Dec 17 17:08:52 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13720         * pt.c (instantiate_class_template): Don't do injection when
13721         processing_template_decl is true, as pollutes current_binding_level
13722         for base classes.
13724 Wed Dec 17 21:17:39 1997  Peter Schmid  <schmid@ltoi.iap.physik.tu-darmstadt.de>
13726         * pt.c (maybe_fold_nontype_arg): Add prototype.
13728 Tue Dec 16 10:31:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13730         * tree.c (mapcar): Handle TRY_CATCH_EXPR et al.
13731         * error.c (dump_expr): Likewise.
13733 Mon Dec 15 12:22:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
13735         * typeck.c (build_function_call_real): Remove "inline called before
13736         definition" pedwarn.
13738         * pt.c (coerce_template_parms): Use maybe_fold_nontype_arg.
13740 Sun Dec 14 22:34:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
13742         * cvt.c (cp_convert_to_pointer): Fix base conversion of pm's.
13744         * pt.c (type_unification_real): Change __null to type void* with
13745         a warning.
13747 Sun Dec 14 20:38:35 1997  Mark Mitchell  <mmitchell@usa.net>
13749         * call.c (implicit_conversion): Don't call
13750         build_user_type_conversion_1 with a NULL expr, since it will
13751         crash.
13753         * pt.c (unify): Don't try to unify array bounds if either array is
13754         unbounded.
13756 Fri Dec 12 16:09:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13758         * errfn.c (cp_pedwarn, cp_pedwarn_at, cp_error_at, cp_warning_at):
13759         Replace extern decls with casts.
13761         * decl.c (expand_start_early_try_stmts): Don't mess with a sequence.
13762         Update last_parm_cleanup_insn.
13763         (store_after_parms): Remove.
13764         * cp-tree.h: Adjust.
13766 Thu Dec 11 22:18:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13768         * decl2.c (comdat_linkage): Also set DECL_COMDAT.
13769         (finish_file): Check DECL_COMDAT instead of weak|one_only.
13770         (import_export_vtable): Use make_decl_one_only instead of
13771         comdat_linkage for win32 tweak.
13772         (import_export_decl): Likewise.
13773         * pt.c (mark_decl_instantiated): Likewise.
13775         * decl2.c (finish_file): Lose handling of templates in pending_statics.
13777 Thu Dec 11 21:12:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
13779         * decl2.c (finish_file): Lose call to expand_builtin_throw.
13780         * except.c (expand_builtin_throw): Remove.
13781         * cp-tree.h: Remove ptr_ptr_type_node.
13782         * decl.c: Likewise.
13784 Thu Dec 11 20:43:33 1997  Teemu Torma  <tot@trema.com>
13786         * decl.c (ptr_ptr_type_node): Define.
13787         (init_decl_processing): Initialize it.
13788         * cp-tree.h: Declare it.
13789         * exception.cc (__cp_exception_info): Use __get_eh_info.
13790         (__cp_push_exception): Likewise.
13791         (__cp_pop_exception): Likewise.
13793         From Scott Snyder <snyder@d0sgif.fnal.gov>:
13794         * except.c (expand_builtin_throw): Use get_saved_pc_ref instead of
13795         saved_pc.
13796         (init_exception_processing): Removed saved_pc initialization.
13798 Wed Dec 10 11:04:45 1997  Jason Merrill  <jason@yorick.cygnus.com>
13800         * pt.c (instantiate_decl): Defer all templates but inline functions.
13802 Mon Dec  8 23:17:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
13804         * init.c (expand_vec_init): Don't fold a list of parameters.
13806         * decl.c (copy_args_p): Handle copy elision for types with virtual
13807         bases.
13808         * call.c (build_over_call): Likewise.
13810 Sun Dec  7 22:38:12 1997  Mark Mitchell  <mmitchell@usa.net>
13812         * pt.c (lookup_template_function): Copy the template arguments,
13813         not just the list containing them, to the permanent obstack.
13815 Sun Dec  7 15:53:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
13817         * except.c (expand_start_catch_block): suspend_momentary for the
13818         terminate handler.
13820         * error.c (dump_decl): Handle LOOKUP_EXPR.
13822 Sun Dec  7 15:45:07 1997  Mark Mitchell  <mmitchell@usa.net>
13824         * rtti.c (build_dynamic_cast): Copy the cast-to type to the
13825         permanent obstack if we are processing a template decl.
13826         * typeck.c (build_static_cast): Likewise.
13827         (build_const_cast): Likewise.
13828         (build_reinterpret_cast): Likewise.
13830         * pt.c (coerce_template_parms): Coerce some expressions, even
13831         when processing_template_decl.
13833 Sun Dec  7 01:46:33 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13835         * typeck.c (build_binary_op_nodefault, pointer_diff): Symmetric
13836         handling of pointer difference expressions.
13838         * typeck.c (comp_target_types): Comparison of function/method types
13839         is independent of nptrs.
13841 Sun Dec  7 01:40:27 1997  Mark Mitchell  <mmitchell@usa.net>
13843         * pt.c (tsubst): Avoid creating pointer to reference and
13844         reference to reference types.
13846 Sat Dec  6 01:29:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
13848         * parse.y (do_id): New nonterminal.
13849         (template_id): Use it.
13851 Fri Dec  5 01:17:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
13853         * parse.y (template_id): do_identifier for PFUNCNAMEs, too.
13854         * spew.c (yylex): Don't do_identifier here.
13855         * decl2.c (build_expr_from_tree): Revert last change.
13857         * decl2.c (build_expr_from_tree): Expand the name for a method call.
13858         * parse.y (object_template_id): Don't try to take the DECL_NAME.
13860 Wed Dec  3 20:02:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
13862         * init.c (build_new): Use a TARGET_EXPR instead of SAVE_EXPR for
13863         alloc_expr.
13864         * call.c (build_op_delete_call): Adjust.
13866         * except.c (expand_end_catch_block): Lose rethrow region.
13867         (expand_start_catch_block): Likewise.
13868         (expand_end_catch_block): Don't expand_leftover_cleanups.
13870 Wed Dec  3 13:24:04 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
13872         * pt.c (tsubst): Remove tree_cons call (places redundant info into
13873         DECL_TEMPLATE_INSTANTIATION).
13875 Wed Dec  3 11:44:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
13877         * tree.c (is_overloaded_fn): Handle getting a fn template.
13878         (really_overloaded_fn): Likewise.
13879         * error.c (dump_decl): Handle TEMPLATE_ID_EXPRs better.
13880         * pt.c (check_explicit_specialization): Tweak.
13881         (determine_explicit_specialization): Tweak.
13883         * tree.c, cp-tree.h (get_target_expr): New fn.
13885 Wed Dec  3 08:47:27 1997  Paul Eggert  <eggert@twinsun.com>
13887         * pt.c (check_explicit_specialization): Fix misspelling in
13888         diagnostic: `preceeded'.
13889         * typeck.c (get_delta_difference): Fix misspelling in diagnostic:
13890         `conversiona'.
13892 1997-12-02  Mark Mitchell  <mmitchell@usa.net>
13894         * pt.c (determine_explicit_specialization): Avoid an internal
13895         error for bad specializations.
13897         * method.c (build_overload_value): Handle SCOPE_REF.
13899 Tue Dec  2 19:18:50 1997  Mike Stump  <mrs@wrs.com>
13901         * class.c (prepare_fresh_vtable): Enable even more complex MI
13902         vtable names.
13904 Tue Dec  2 01:37:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
13906         * exception.cc (__check_eh_spec): Optimize a bit.
13908         * exception.cc (__cp_pop_exception): Lose handler arg.
13909         * except.c (do_pop_exception): Likewise.
13910         (push_eh_cleanup): Let the cleanup mechanism supply the handler.
13911         (expand_end_catch_block): Likewise.
13913 Fri Nov 28 01:58:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
13915         * pt.c (check_explicit_specialization): Complain about using a
13916         template-id for a non-specialization.
13918 Fri Nov 28 12:35:19 1997  Scott Christley  <scottc@net-community.com>
13920         * repo.c: Prototype rindex only if needed.
13921         * xref.c: Likewise.
13923 Fri Nov 28 01:56:35 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
13925         * error.c (dump_decl): Handle TEMPLATE_ID_EXPR.
13927 Thu Nov 27 00:59:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
13929         * typeck.c (build_const_cast): Handle references here instead of
13930         handing off to convert_to_reference.
13932         * except.c: Lose Unexpected, SetTerminate, SetUnexpected,
13933         TerminateFunctionCall.
13934         (init_exception_processing): Likewise.  Terminate et al are now
13935         the fns, not ADDR_EXPRs.
13936         (various): Lose redundant assemble_external calls.
13937         (do_unwind): s/BuiltinReturnAddress/builtin_return_address_fndecl/.
13939         * cp-tree.h (struct lang_decl_flags): Add comdat.
13940         (DECL_COMDAT): New macro.
13941         * decl.c (duplicate_decls): Propagate it.
13942         (cp_finish_decl): Handle it.
13943         * decl2.c (import_export_decl): Just set DECL_COMDAT on VAR_DECLs.
13945         * class.c: Remove static pending_hard_virtuals.
13946         (add_virtual_function): Take pointers to pending_virtuals
13947         and pending_hard_virtuals.
13948         (finish_struct_1): Pass them.  Declare pending_hard_virtuals.
13950 Wed Nov 26 20:28:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
13952         * decl2.c (import_export_vtable): If we support one_only but not
13953         weak symbols, mark instantiated template vtables one_only.
13954         (import_export_decl): Likewise for tinfo functions.
13955         (finish_vtable_vardecl): Also write out vtables from explicitly
13956         instantiated template classes.
13957         * pt.c (mark_class_instantiated): Revert last change.
13959         * except.c (expand_throw): Call mark_used on the destructor.
13961 Wed Nov 26 15:13:48 1997  Jeffrey A Law  (law@cygnus.com)
13963         * lex.c (lang_init): Enable flag_exceptions by default if no
13964         command line switch was specified.
13966 1997-11-26  Mark Mitchell  <mmitchell@usa.net>
13968         * pt.c (unify): Handle `void' template parameters in
13969         specializations.
13971 Wed Nov 26 01:11:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
13973         * rtti.c (build_dynamic_cast): Handle template case here.
13974         (build_dynamic_cast_1): Not here.
13976         * typeck2.c (digest_init): Make copies where appropriate.
13978         * decl2.c (delete_sanity): resolve_offset_ref.
13980         * except.c: Call terminate without caching so many bits.
13982         * except.c (expand_start_catch_block): Fix catching a reference
13983         to pointer.
13985 Tue Nov 25 11:28:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
13987         * init.c (build_new): Copy size to the saveable obstack.
13989         * init.c (build_new): Stick a CLEANUP_POINT_EXPR inside the
13990         TRY_CATCH_EXPR for now.
13992 Mon Nov 24 12:15:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
13994         * typeck.c (mark_addressable): Don't assume a FUNCTION_DECL
13995         has DECL_LANG_SPECIFIC.
13997         * exception.cc (struct cp_eh_info): Add handlers field.
13998         (__cp_push_exception): Initialize it.
13999         (__cp_pop_exception): Decrement it.  Don't pop unless it's 0.
14000         (__throw_bad_exception): Remove.
14001         * except.c (call_eh_info): Add handlers field.
14002         (get_eh_handlers): New fn.
14003         (push_eh_cleanup): Increment handlers.
14005 Fri Nov 21 12:22:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
14007         * except.c (expand_start_eh_spec): Use the try/catch code.
14008         (expand_end_eh_spec): Likewise.  Call __check_eh_spec instead of
14009         doing everything inline.
14010         (init_exception_processing): throw_type_match now takes
14011         const void pointers.
14012         * exception.cc (__check_eh_spec): New fn.
14013         * inc/exception: Neither terminate nor unexpected return.
14014         * decl.c: Make const_ptr_type_node public.
14015         * tinfo2.cc (__throw_type_match_rtti): Take the typeinfos constly.
14017         * except.c (expand_start_catch_block): We only need the rethrow
14018         region for non-sjlj exceptions.
14019         (expand_end_catch_block): Likewise.  Use outer_context_label_stack.
14021 Thu Nov 20 14:40:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
14023         * Make-lang.in (CXX_LIB2FUNCS): Add new op new and op delete objs.
14024         (various.o): Likewise.
14025         * inc/new: Add placement deletes.  Add throw specs for default new.
14026         * new.cc (set_new_handler): Move here from libgcc2.
14027         * new1.cc (new (nothrow)): Catch a bad_alloc thrown from the handler.
14028         (new): Move from libgcc2.  Throw bad_alloc.
14029         * new2.cc: Move the rest of the op news and op deletes from libgcc2.
14030         * decl.c (init_decl_processing): Update exception specs on new and
14031         delete.
14033         * method.c (build_decl_overload_real): Don't mess with global
14034         placement delete.
14036         * init.c (build_new): Check for null throw spec, not nothrow_t.
14038         * decl.c (duplicate_decls): Don't complain about different exceptions
14039         from an internal declaration.
14041         * call.c (build_op_delete_call): Fix check for member fns again.
14043         * decl2.c (import_export_decl): Interface hackery affects
14044         virtual synthesized methods.
14046 Wed Nov 19 18:24:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14048         * decl.c (start_decl): Don't just complain about a mismatched
14049         scope, fix it.
14051         * decl.c (make_implicit_typename): Handle case where t is not
14052         actually from context.
14053         * tree.c (get_type_decl): Lose identifier case.
14054         * spew.c (yylex): Lose useless call to identifier_typedecl_value.
14055         * parse.y (nonnested_type): Just use lookup_name.
14056         (complex_type_name): Just use IDENTIFIER_GLOBAL_VALUE.
14058 Wed Nov 19 11:45:07 1997  Michael Tiemann  <tiemann@axon.cygnus.com>
14060         * error.c (dump_function_name): Test DECL_LANG_SPECIFIC in case
14061         T was built in C language context (for example, by
14062         output_func_start_profiler).
14064 Wed Nov 19 10:39:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
14066         * decl.c (make_implicit_typename): New fn.
14067         (lookup_name_real): Use it.  Use current_class_type as the context.
14069 Mon Nov 17 23:42:03 1997  Bruno Haible  <haible@ilog.fr>
14071         * pt.c (do_poplevel): Don't prohibit jumps into this contour.
14073 Mon Nov 17 02:01:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14075         * friend.c (do_friend): Warn about non-template friends in templates.
14077         * call.c (build_op_delete_call): Fix handling of inherited delete.
14079         * search.c (dfs_record_inheritance): Ignore template type parms.
14081 Sat Nov 15 00:30:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
14083         * call.c (build_new_op): Fix copy error.
14084         (build_op_new_call): New fn.
14085         (build_op_delete_call): New fn.
14086         * cp-tree.h: Declare them.
14087         * init.c (build_new): Use them.  Support placement delete.
14088         (build_x_delete): Use build_op_delete_call.
14089         (build_delete): Likewise.
14090         * decl2.c (delete_sanity): Likewise.
14091         (coerce_delete_type): Don't complain about placement delete.
14093 Thu Nov 13 01:52:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14095         * call.c (build_new_function_call): Remove unused 'obj' parm.
14096         * cp-tree.h, typeck.c: Adjust.
14098         * init.c (build_new): Make the cleanup last longer.
14099         (expand_vec_init): Call do_pending_stack_adjust.
14101 Wed Nov 12 11:04:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
14103         * pt.c (do_type_instantiation): Fix typo.
14104         (mark_class_instantiated): If we support one_only but not weak
14105         symbols, don't mark this as known.
14107         * init.c (build_new): Handle vec delete in EH cleanup.
14109 Wed Nov 12 08:11:55 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14111         * call.c (build_method_call): Call complete_type before checking
14112         for destructor.
14114 Sun Nov  9 01:29:55 1997  Jim Wilson  (wilson@cygnus.com)
14116         * decl.c (add_block_current_level): Delete.
14117         * init.c (build_vec_delete_1): Delete build_block and
14118         add_block_current_level calls.
14120 Wed Nov 12 00:48:16 1997  Jason Merrill  <jason@yorick.cygnus.com>
14122         * init.c (build_new): Handle freeing allocated memory when the
14123         constructor throws.
14125         * call.c (build_new_method_call): Fix flags arg.
14127         * pt.c (do_type_instantiation): Don't try to instantiate
14128         member templates.
14129         (mark_decl_instantiated): If we support one_only but not
14130         weak symbols, mark this one_only.
14131         * decl2.c (import_export_vtable): Don't defer handling of vtables
14132         if MULTIPLE_SYMBOL_SPACES.
14134 Tue Nov 11 12:02:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14136         * except.c (expand_end_catch_block): Lose call to __sjpopnthrow.
14138 Tue Nov 11 02:53:44 1997  Jason Merrill  <jason@lasher.cygnus.com>
14140         * except.c (do_pop_exception): Return a value.
14142 Mon Nov 10 20:25:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
14144         * call.c (build_new_method_call): Handle getting a
14145         TEMPLATE_ID_EXPR around a TEMPLATE_DECL.  Don't look for a field
14146         if we got template parms.
14147         * typeck.c (build_x_function_call): Remember the TEMPLATE_ID_EXPR,
14148         not just the args.
14149         * decl2.c (build_expr_from_tree): Tweak last change.
14150         * pt.c (tsubst_copy): Use get_first_fn instead of TREE_VALUE.
14151         (maybe_fold_nontype_arg): Split out from tsubst_copy.
14152         * tree.c (get_first_fn): Just return a TEMPLATE_ID_EXPR.
14154 Mon Nov 10 20:08:38 1997  Kriang Lerdsuwanakij  <lerdsuwa@scf-fs.usc.edu>
14156         * pt.c (tsubst_copy): Handle explicit template arguments in
14157         function calls.
14158         * typeck.c (build_x_function_call): Likewise.
14159         * decl2.c (build_expr_from_tree): Lookup function name if it
14160         hasn't been done.
14162         * pt.c (tsubst): Instantiate template functions properly when
14163         template parameter does not appear in function arguments and return
14164         type.
14165         (comp_template_args): Handle member templates required by tsubst.
14167 Mon Nov 10 20:08:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14169         * decl.c (grokdeclarator): Tweak conditions for pedwarn in
14170         previous change.
14172 Mon Nov 10 20:08:29 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14174         * pt.c (coerce_template_parms): Tweak error message.
14176         * decl.c (grokdeclarator): If -Wreturn-type, warn everytime a
14177         return type defaults to `int', even if there are storage-class
14178         specifiers.
14180 Mon Nov 10 03:04:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
14182         Complete nested exception support.
14183         * except.c (do_pop_exception): Split out...
14184         (push_eh_cleanup): From here.  Handle the EH region by hand.
14185         (expand_start_catch_block): Add a new level for the catch parm.
14186         Move the rethrow region outside the two cleanup regions.
14187         Protect the initializer for the catch parm with terminate.
14188         (expand_end_catch_block): Likewise.  End the region for the eh_cleanup.
14189         * exception.cc (__cp_pop_exception): Now takes two parms.  Handle
14190         popping off the middle of the stack.
14191         * tree.c (lvalue_p, real_lvalue_p): Handle TRY_CATCH_EXPR,
14192         WITH_CLEANUP_EXPR, and UNSAVE_EXPR.
14193         (build_cplus_new): Only wrap CALL_EXPRs.
14194         * init.c (expand_default_init): Handle a TRY_CATCH_EXPR around
14195         the constructor call.
14197 Sun Nov  9 18:00:26 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14199         * Make-lang.in (c++.distdir): Make inc subdirectory.
14201 Fri Nov  7 11:57:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
14203         * decl2.c (finish_file): Put back some code.
14205 Thu Nov  6 11:28:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14207         * decl2.c (finish_file): Remove redundant code.
14208         * method.c (emit_thunk): Don't let the backend defer generic thunks.
14210 Wed Nov  5 23:52:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
14212         * except.c (call_eh_info): Split out...
14213         (push_eh_info): From here.
14214         (expand_builtin_throw): Use it.
14215         (expand_start_catch_block): Move region start back.
14217 Tue Nov  4 13:45:10 1997  Doug Evans  <devans@canuck.cygnus.com>
14219         * lex.c (MULTIBYTE_CHARS): #undef if cross compiling.
14220         (real_yylex): Record wide strings using target endianness, not host.
14222 1997-11-03  Brendan Kehoe  <brendan@lisa.cygnus.com>
14224         * repo.c (rindex): Add decl unconditionally.
14225         (get_base_filename, open_repo_file): Don't cast rindex.
14226         * xref.c (rindex): Add decl unconditionally.
14227         (index): Remove unused decl.
14228         (open_xref_file): Don't cast rindex.
14230 Sun Nov  2 15:04:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
14232         * class.c (build_vbase_path): Propagate the result type properly.
14234 1997-11-01  Brendan Kehoe  <brendan@lisa.cygnus.com>
14236         * except.c (expand_builtin_throw) [!DWARF2_UNWIND_INFO]: Replace
14237         remaining use of saved_throw_type with a call to get_eh_type.
14239 1997-10-31  Brendan Kehoe  <brendan@lisa.cygnus.com>
14241         * lex.c (FILE_NAME_NONDIRECTORY): Delete macro.
14242         (file_name_nondirectory): New function, doing the same as the macro.
14243         (set_typedecl_interface_info): Use it instead of the macro.
14244         (check_newline): Likewise.
14245         (handle_cp_pragma): Likewise.
14247         * repo.c (get_base_filename): Cast result of rindex to char*.
14248         (open_repo_file): Likewise.
14249         * xref.c (open_xref_file): Likewise.
14250         * error.c (dump_char): Make its arg int, not char.
14252         * except.c (push_eh_info): Pass the number of fields - 1 down, not
14253         the exact number of fields.
14255 Fri Oct 31 01:47:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
14257         Support for nested exceptions.
14258         * tinfo2.cc (__is_pointer): New fn.
14259         * exception.cc (struct cp_eh_info): Define.
14260         (__cp_exception_info, __uncatch_exception): New fns.
14261         (__cp_push_exception, __cp_pop_exception): New fns.
14262         * except.c: Lose saved_throw_{type,value,cleanup,in_catch}.
14263         Lose empty_fndecl.
14264         (init_exception_processing): Likewise.  __eh_pc is now external.
14265         (push_eh_info): New fn.
14266         (get_eh_{info,value,type,caught}): New fns.
14267         (push_eh_cleanup): Just call __cp_pop_exception.
14268         (expand_start_catch_block): Use push_eh_info.  Start the eh region
14269         sooner.
14270         (expand_end_eh_spec): Use push_eh_info.
14271         (expand_throw): Call __cp_push_exception to set up the exception info.
14272         Just pass the destructor or 0 as the cleanup.  Call __uncatch_exception
14273         when we rethrow.
14274         (expand_builtin_throw): Don't refer to empty_fndecl.
14276 Thu Oct 23 02:01:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
14278         * pt.c (instantiate_decl): SET_DECL_IMPLICIT_INSTANTIATION on new decl.
14280 1997-10-22  Brendan Kehoe  <brendan@cygnus.com>
14282         * method.c (build_template_parm_names, build_decl_overload_real):
14283         Add static to definitions.
14284         * pt.c (add_to_template_args, note_template_header,
14285         processing_explicit_specialization, type_unification_real): Likewise.
14286         ({determine,check}_explicit_specialization): Use a single string for
14287         error messages.
14289 Mon Oct 20 12:06:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
14291         * except.c (expand_exception_blocks): Call do_pending_stack_adjust.
14292         (expand_end_catch_block): Likewise.
14293         (expand_end_eh_spec): Likewise.
14295 Mon Oct 20 11:44:20 1997  Mark Mitchell  <mmitchell@usa.net>
14297         * decl.c (duplicate_decls): Handle template specializations
14298         correctly.
14299         * error.c (dump_function_name): Fix printing of specializations of
14300         member functions that are not member templates.
14301         * cp-tree.h (processing_specialization): Make global.
14302         * pt.c (processing_specialization): Likewise.
14303         * lex.c (cons_up_default_function): Save and restore
14304         processing_specialization to avoid confusion.
14306 Mon Oct 20 10:52:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14308         * decl.c (init_decl_processing): Give null_node unknown* type.
14309         * typeck.c (comp_target_types): Handle UNKNOWN_TYPE.
14310         (common_type): Likewise.
14311         * error.c (args_as_string): Recognize null_node.
14313 Sun Oct 19 09:13:01 1997  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
14315         * typeck.c (rationalize_conditional_expr): Handle {MIN,MAX}_EXPR.
14316         (unary_complex_lvalue): Call it for {MIN,MAX}_EXPR.
14318         * decl.c (init_decl_processing): Call using_eh_for_cleanups.
14320         * Make-lang.in (g++): Include prefix.o.
14322 Thu Oct 16 15:31:09 1997  Judy Goldberg  <judygold@sanwafp.com>
14324         * pt.c (determine_explicit_specialization): Initialize "dummy"
14325         to keep Purify quiet.
14327 Thu Oct 16 00:14:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14329         * method.c (build_overload_value): Handle TEMPLATE_CONST_PARMs here.
14330         (build_overload_int): Not here.
14332 Wed Oct 15 00:35:28 1997  Mike Stump  <mrs@wrs.com>
14334         * class.c (build_type_pathname): Remove.
14335         (prepare_fresh_vtable): Fix problem with complex MI vtable names.
14337 1997-10-14  Brendan Kehoe  <brendan@lisa.cygnus.com>
14339         * parse.y (unary_expr): Give a pedwarn if someone tries to use the
14340         &&label GNU extension.
14342 Tue Oct 14 12:01:00 1997  Mark Mitchell  <mmitchell@usa.net>
14344         * decl.c (pushtag): Unset DECL_ASSEMBLER_NAME before setting it,
14345         so as to avoid incorrect manglings.
14346         * method.c (build_decl_overload_real): Don't mangle return types
14347         for constructors.
14349 Tue Oct 14 11:46:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
14351         * cp-tree.h (scratchalloc, build_scratch_list, make_scratch_vec,
14352         scratch_tree_cons): Define as macros for now.
14353         * call.c, class.c, cvt.c, decl.c, decl2.c, except.c, expr.c, init.c,
14354         lex.c, method.c, parse.y, pt.c, rtti.c, search.c, tree.c, typeck.c,
14355         typeck2.c: Use them and the expression_obstack variants.
14357 Mon Oct 13 17:41:26 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14359         * decl.c (store_return_init): Allow classes with explicit ctors to
14360         be used with the named return values extension.
14362 Fri Oct 10 12:21:11 1997  Jason Merrill  <jason@yorick.cygnus.com>
14364         * pt.c (instantiate_decl): Fix previous change.
14366 Thu Oct  9 12:08:21 1997  Jason Merrill  <jason@yorick.cygnus.com>
14368         * pt.c (tsubst): Fix thinko.
14369         (instantiate_decl): Really use the original template.
14371         * call.c (build_new_method_call): Use simple constructor_name for
14372         error messages.
14374 Wed Oct  8 22:44:42 1997  Jeffrey A Law  <law@cygnus.com>
14376         * method.c (build_underscore_int): Don't use ANSI specific
14377         features.
14379 Wed Oct  8 00:18:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14381         * decl2.c (finish_prevtable_vardecl): Check DECL_REALLY_EXTERN
14382         for our key method; it might have been inlined by -O3.
14384 Tue Oct  7 23:00:12 1997  Mark Mitchell  <mmitchell@usa.net>
14386         * decl.c (make_typename_type): Do not try to call lookup_field for
14387         non-aggregate types.
14389 Tue Oct  7 22:52:10 1997  Jason Merrill  <jason@yorick.cygnus.com>
14391         * typeck.c (build_reinterpret_cast): Tweak.
14393 Tue Oct  7 22:45:31 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
14395         * typeck.c (build_reinterpret_cast): Converting a void pointer
14396         to function pointer with a reinterpret_cast produces a warning
14397         if -pedantic is issued.
14399 Tue Oct  7 22:43:43 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
14401         * typeck.c (c_expand_return): Don't warn about returning a
14402         reference-type variable as a reference.
14404 Tue Oct  7 21:11:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
14406         * method.c (build_static_name): Fix typo.
14408 1997-10-07  Brendan Kehoe  <brendan@lisa.cygnus.com>
14410         * decl.c (duplicate_decls): Make sure DECL_LANG_SPECIFIC is set on
14411         OLDDECL before we try to do DECL_USE_TEMPLATE.
14413 Tue Oct  7 00:48:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14415         * decl.c (duplicate_decls): Don't warn about template instances.
14417         * typeck.c (mark_addressable): Lose ancient code that unsets
14418         DECL_EXTERNAL.
14420         * pt.c (do_decl_instantiation): Lose support for instantiating
14421         non-templates.
14423         * call.c (build_new_function_call): Fix handling of null explicit
14424         template args.
14425         (build_new_method_call): Likewise.
14427 Mon Oct  6 23:44:34 1997  Mark Mitchell  <mmitchell@usa.net>
14429         * method.c (build_underscore_int): Fix typo.
14431 1997-10-06  Brendan Kehoe  <brendan@lisa.cygnus.com>
14433         * tree.c (print_lang_statistics): #if 0 call to
14434         print_inline_obstack_statistics until its definition is checked in.
14436 Mon Oct  6 09:27:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
14438         * decl2.c (finish_file): Move dump_tree_statistics to end.
14440         * pt.c (instantiate_decl): Look for the original template.
14441         (tsubst): Set DECL_IMPLICIT_INSTANTIATION on partial instantiations
14442         of member templates.
14444 Wed Oct  1 08:41:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14446         * Makefile.in (g++FAQ.*): New rules.
14447         (CONFLICTS): Update.
14448         * g++FAQ.texi: Moved from libg++.
14450         * parse.y (PFUNCNAME): Only specify the type once.
14452 1997-10-01  Brendan Kehoe  <brendan@lasher.cygnus.com>
14454         * lex.c (real_yylex): Clean up the code to fully behave the way
14455         the c-lex.c parser does for complex and real numbers.
14457 Tue Sep 30 08:51:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
14459         * method.c (build_decl_overload_real): Reformat.
14461 Tue Sep 30 00:18:26 1997  Jason Merrill  <jason@yorick.cygnus.com>
14463         * method.c (synthesize_method): If at_eof, determine our linkage.
14465 1997-09-29  Paul Eggert  <eggert@twinsun.com>
14467         * lex.c (real_yylex): Treat `$' just like `_', except issue a
14468         diagnostic if !dollars_in_ident or if pedantic.
14470         * lang-specs.h (@c++): -ansi no longer implies -$.
14472         * decl2.c (lang_decode_option):
14473         -traditional and -ansi now do not mess with
14474         dollars_in_ident.
14476 Mon Sep 29 19:57:51 1997  H.J. Lu  <hjl@gnu.ai.mit.edu>
14478         * Makefile.in (parse.o, decl.o): Also depend on
14479         $(srcdir)/../except.h $(srcdir)/../output.h.
14480         (decl2.o): Also depend on $(srcdir)/../expr.h ../insn-codes.h
14481         $(srcdir)/../except.h $(srcdir)/../output.h.
14482         (typeck.o, init.o): Also depend on $(srcdir)/../expr.h
14483         ../insn-codes.h.
14485         * call.c, cp-tree.h, decl.c, tree.c: Finish prototyping.
14487         * expr.c (cplus_expand_expr): Make it static.
14489         * decl2.c, init.c, typeck.c: Include "expr.h".
14490         (expand_expr): Use proper values when calling the function.
14492 Mon Sep 29 11:05:54 1997  Alexandre Oliva  <oliva@dcc.unicamp.br>
14494         * lang-options.h: New -Wold-style-cast flag.
14495         * cp-tree.h (warn_old_style_cast): New variable.
14496         * decl2.c (warn_old_style_cast): Likewise.
14497         (lang_decode_option): Support -Wold-style-cast.
14498         (reparse_absdcl_as_casts): Produce old-style-cast warning.
14500 Mon Sep 29 09:20:53 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14502         * decl.c (cp_finish_decl): Allow expand_aggr_init to set
14503         TREE_USED, reset value based on already_used.
14505         * init.c (expand_member_init): Revert change.
14507 Mon Sep 29 08:57:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
14509         * cp-tree.h, decl.c, decl2.c, pt.c:
14510         Lose DECL_C_STATIC and DECL_PUBLIC.  Don't pretend statics are public.
14512         * decl2.c (lang_decode_option): Add missing ;.
14514 Sat Sep 27 16:22:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
14516         * friend.c (do_friend): Disable injection for all template-derived
14517         decls.
14518         * decl2.c (lang_decode_option): Handle -fguiding-decls.
14519         * parse.y (notype_template_declarator): New nonterminal.
14520         (direct_notype_declarator): Use it.
14521         (complex_direct_notype_declarator): Likewise.
14522         (object_template_id): Accept any kind of identifier after TEMPLATE.
14523         (notype_qualified_id): Don't add template declarators here.
14525 Sat Sep 27 16:21:58 1997  Mark Mitchell  <mmitchell@usa.net>
14527         * call.c (add_template_candidate): Add explicit_targs parameter.
14528         (build_scoped_method_call): Use it.
14529         (build_overload_call_real): Likewise.
14530         (build_user_type_conversion_1): Likewise.
14531         (build_new_function_call): Likewise.
14532         (build_object_call): Likewise.
14533         (build_new_op): Likewise.
14534         (build_new_method_call): Likewise.
14535         (build_new_function_call): Handle TEMPLATE_ID_EXPR.
14536         (build_new_method_call): Likewise.
14538         * class.c (finish_struct_methods): Add specialization pass to
14539         determine which methods were specializing which other methods.
14540         (instantiate_type): Handle TEMPLATE_ID_EXPR.
14542         * cp-tree.def (TEMPLATE_ID_EXPR): New tree code.
14544         * cp-tree.h (name_mangling_version): New variable.
14545         (flag_guiding_decls): Likewise.
14546         (build_template_decl_overload): New function.
14547         (begin_specialization): Likewise.
14548         (reset_specialization): Likewise.
14549         (end_specialization): Likewise.
14550         (determine_explicit_specialization): Likewise.
14551         (check_explicit_specialization): Likewise.
14552         (lookup_template_function): Likewise.
14553         (fn_type_unification): Add explicit_targs parameter.
14554         (type_unification): Likewise.
14556         * decl.c (duplicate_decls): Add smarts for explicit
14557         specializations.
14558         (grokdeclarator): Handle TEMPLATE_ID_EXPR, and function
14559         specializations.
14560         (grokfndecl): Call check_explicit_specialization.
14562         * decl2.c (lang_decode_option): Handle -fname-mangling-version.
14563         (build_expr_from_tree): Handle TEMPLATE_ID_EXPR.
14564         (check_classfn): Handle specializations.
14566         * error.c (dump_function_name): Print specialization arguments.
14568         * friend.c (do_friend): Don't call pushdecl for template
14569         instantiations.
14571         * init.c (build_member_call): Handle TEMPLATE_ID_EXPR.
14573         * lang-options.h: Add -fname-mangling-version, -fguiding-decls,
14574         and -fno-guiding-decls.
14576         * lex.c (identifier_type): Return PFUNCNAME for template function
14577         names.
14579         * method.c (build_decl_overload_real): New function.
14580         (build_template_parm_names): New function.
14581         (build_overload_identifier): Use it.
14582         (build_underscore_int): New function.
14583         (build_overload_int): Use it.  Add levels for template
14584         parameters.
14585         (build_overload_name): Likewise.  Also, handle TYPENAME_TYPEs.
14586         (build_overload_nested_names): Handle template type parameters.
14587         (build_template_decl_overload): New function.
14589         * parse.y (YYSTYPE): New ntype member.
14590         (nested_name_specifier): Use it.
14591         (nested_name_specifier_1): Likewise.
14592         (PFUNCNAME): New token.
14593         (template_id, object_template_id): New non-terminals.
14594         (template_parm_list): Note specializations.
14595         (template_def): Likewise.
14596         (structsp): Likewise.
14597         (fn.def2): Handle member template specializations.
14598         (component_decl_1): Likewise.
14599         (direct_notype_declarator): Handle template-ids.
14600         (component_decl_1): Likewise.
14601         (direct_notype_declarator): Handle template-ids.
14602         (primary): Handle TEMPLATE_ID_EXPR, and template-ids.
14604         * pt.c (processing_specializations): New variable.
14605         (template_header_count): Likewise.
14606         (type_unification_real): New function.
14607         (processing_explicit_specialization): Likewise.
14608         (note_template_header): Likewise.
14609         (is_member_template): Handle specializations.
14610         (end_template_decl): Call reset_specialization.
14611         (push_template_decl): Handle member template specializations.
14612         (tsubst): Likewise.
14613         (tsubst_copy): Handle TEMPLATE_ID_EXPR.
14614         (instantiate_template): Handle specializations.
14615         (instantiate_decl): Likewise.
14616         (fn_type_unification): Handle explicit_targs.
14617         (type_unification): Likewise.  Allow incomplete unification
14618         without an error message, if allow_incomplete.
14619         (get_bindings): Use new calling sequence for fn_type_unification.
14621         * spew.c (yylex): Handle PFUNCNAME.
14623         * tree.c (is_overloaded_fn): Handle TEMPLATE_ID_EXPR.
14624         (really_overloaded_fn): Likewise.
14625         (get_first_fn): Handle function templates.
14627         * typeck.c (build_x_function_call): Use really_overloaded_fn.
14628         Handle TEMPLATE_ID_EXPR.
14629         (build_x_unary_op): Likewise.
14630         (build_unary_op): Likewise.
14631         (mark_addressable): Templates whose address is taken are marked
14632         as used.
14634 1997-09-25  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
14636         * decl.c (init_decl_processing): Declare __builtin_constant_p as
14637         accepting any kind of type, not only int.
14639 Fri Sep 26 00:22:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14641         * search.c (get_matching_virtual): Notice virtual bases when sorrying
14642         about covariant returns.
14644         * parse.y (member_init): Also imply typename here.  Remove ancient
14645         extension for initializing base members.
14647 Thu Sep 25 11:11:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14649         Handle multi-level typenames and implicit typename in base list.
14650         * parse.y (typename_sub{,[0-2]}): New rules.
14651         (structsp, rule TYPENAME_KEYWORD): Use typename_sub.
14652         (nonnested_type): New rule.
14653         (complete_type_name): Use it.
14654         (base_class.1): Use typename_sub and nonnested_type.
14655         (nested_name_specifier): Don't elide std:: here.
14656         * decl.c (make_typename_type): Handle getting a type for NAME.
14657         (lookup_name_real): Turn std:: into :: here.
14659         Rvalue conversions were removed in London.
14660         * call.c (is_subseq): Don't consider lvalue transformations.
14661         (build_conv): LVALUE_CONV and RVALUE_CONV get IDENTITY_RANK.
14662         (joust): Re-enable ?: kludge.
14664 1997-09-22  Brendan Kehoe  <brendan@lisa.cygnus.com>
14666         * decl.c (start_function): Up warning of no return type to be a
14667         pedwarn.
14669 Mon Sep 22 14:15:34 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14671         * init.c (expand_member_init): Don't set TREE_USED.
14672         * decl.c (cp_finish_decl): Mark decls used if type has TREE_USED
14673         set,don't clear TREE_USED wholesale.
14675 Sat Sep 20 15:31:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
14677         * call.c (build_over_call): Do require_complete_type before
14678         build_cplus_new.
14680 Thu Sep 18 16:47:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
14682         * search.c (lookup_field): Call complete_type in all cases.
14684         * decl.c (finish_function): Just warn about flowing off the end.
14686 Wed Sep 17 10:31:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14688         * decl.c (grokparms): Don't bash a permanent list node if we're
14689         in a function.
14691 1997-09-17  Brendan Kehoe  <brendan@lisa.cygnus.com>
14693         * Makefile.in (CONFLICTS): Fix s/r conflict count to 18.
14695 Tue Sep 16 14:06:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
14697         * call.c (build_new_op): Give better error for syntactically
14698         correct, but semantically invalid, use of undeclared template.
14700         * call.c (compare_qual): Handle pmfs.
14702         * decl.c (store_parm_decls): last_parm_cleanup_insn is the insn
14703         after the exception spec.
14705 Mon Sep 15 11:52:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14707         * call.c (null_ptr_cst_p): Integer type, not integral type.
14709         * call.c (joust): Disable warnings until they can be moved to the
14710         right place.
14712 Fri Sep 12 16:11:13 1997  Per Bothner  <bothner@cygnus.com>
14714         * Makefile.in, config-lang.in:  Convert to autoconf.
14716 Thu Sep 11 17:14:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
14718         * decl.c (lookup_name_real): Add implicit 'typename' to types from
14719         base classes.
14721         * pt.c (most_specialized_class): Fix typo.
14722         (tsubst): Move constant folding to TREE_VEC case.
14724 Thu Sep 11 10:08:45 1997  Mark Mitchell  <mmitchell@usa.net>
14726         * pt.c (do_poplevel): Don't warn about unused local variables
14727         while processing_template_decl since we don't always know whether
14728         or not they will need constructing/destructing.
14730         * pt.c (uses_template_parms): Check the values of an enumeration
14731         type to make sure they don't depend on template parms.
14733         * decl.c (make_typename_type): Don't lookup the field if the
14734         context uses template parms, even if we're not
14735         processing_template_decl at the moment.
14737         * pt.c (coerce_template_parms): Avoid looking at the
14738         TYPE_LANG_DECL portion of a typename type, since there won't be
14739         one.
14740         (tsubst): Do constant folding as necessary to make sure that
14741         arguments passed to lookup_template_class really are constants.
14743 Wed Sep 10 11:21:55 1997  Jason Merrill  <jason@yorick.cygnus.com>
14745         * except.c (expand_builtin_throw): #ifndef DWARF2_UNWIND_INFO.
14746         * decl2.c (finish_file): Only register exception tables if we
14747         need to.
14749         * decl.c (init_decl_processing): Add __builtin_[fs]p.
14751 Tue Sep  9 19:49:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14753         * pt.c (unify): Just return 0 for a TYPENAME_TYPE.
14755 Tue Sep  9 17:57:25 1997  Mark Mitchell  <mmitchell@usa.net>
14757         * error.c (dump_decl): Avoid crashing when presented with a
14758         uninitialized constant, as can occur with a template parameter.
14759         (dump_expr): Make sure that there are enough levels of
14760         current_template_parms before we start diving through them.
14762 1997-09-09  Brendan Kehoe  <brendan@lisa.cygnus.com>
14764         * typeck.c (build_indirect_ref): Heed FLAG_VOLATILE similar to
14765         c-typeck.c.
14767 Tue Sep  9 09:36:39 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
14769         * except.c (expand_throw): Call build_delete for all
14770         exception types, not just objects with destructors.
14772 Mon Sep  8 02:33:20 1997  Jody Goldberg  <jodyg@idt.net>
14774         * decl.c (current_local_enum): Remove static.
14775         * pt.c (tsubst_enum): Save and restore value of current_local_enum
14776         in case template is expanded in enum decl.
14777         (instantiate_class_template): Use new tsubst_enum signature.
14778         (tsubst_expr): Likewise.
14780 Mon Sep  8 01:21:43 1997  Mark Mitchell  <mmitchell@usa.net>
14782         * pt.c (begin_member_template_processing): Take a function as
14783         argument, not a set of template arguments.  Use the template
14784         parameters, rather than the arguments.  Handle non-type parameters
14785         correctly.  Push a binding level for the parameters so that multiple
14786         member templates using the same parameter names can be declared.
14787         (end_member_template_processing): Pop the binding level.
14788         (push_template_decl): Mark member templates as static when
14789         appropriate.
14791         * lex.c (do_pending_inlines): Pass the function, not its template
14792         arguments, to begin_member_template_processing.
14793         (process_next_inline): Likewise.
14794         (do_pending_defargs): Likewise.
14796         * error.c (dump_expr): Obtain the correct declaration for a
14797         TEMPLATE_CONST_PARM.
14799         * call.c (add_template_conv_candidate): New function.
14800         (build_object_call): Handle member templates, as done in the other
14801         build_ functions.
14803 Sat Sep  6 10:20:27 1997  Mark Mitchell  <mmitchell@usa.net>
14805         * decl.c (replace_defag): Undo previous change.
14806         * lex.c (do_pending_defargs): Deal with member templates.
14808         * pt.c (is_member_template): Avoid crashing when passed a
14809         non-function argument.
14811 Fri Sep  5 17:27:38 1997  Jason Merrill  <jason@yorick.cygnus.com>
14813         * class.c (grow_method): Remove check for redeclaration.
14815 Fri Sep  5 01:37:17 1997  Mark Mitchell  <mmitchell@usa.net>
14817         * cp-tree.h (INNERMOST_TEMPLATE_PARMS): New macro.
14818         (DECL_INNERMOST_TEMPLATE_PARMS): Likewise.
14819         (PRIMARY_TEMPLATE_P): Use it.
14820         * call.c (build_overload_call_real): Use it.
14821         * class.c (instantiate_type): Likewise.
14822         * decl.c (decls_match): Likewise.
14823         * method.c (build_overload_identifier): Likewise.
14824         * pt.c (push_template_decl): Likewise.
14825         (classtype_mangled_name): Likewise.
14826         (lookup_template_class): Likewise.
14828         * cp-tree.h (DECL_NTPARMS): Change name from DECL_NT_PARMS to
14829         DECL_NTPARMS to conform to usage elsewhere.
14830         * call.c (add_template_candidate): Likewise.
14831         * class.c (instantiate_type): Likewise.
14832         * pt.c (instantiate_template): Likewise.
14833         (get_bindings): Likewise.
14835         * class.c (grow_method): Use DECL_FUNCTION_TEMPLATE_P instead of
14836         is_member_template.
14838         * pt.c (unify): Undo changes to allow multiple levels of template
14839         parameters.
14840         (type_unification): Likewise.
14841         (fn_type_unification): Likewise.
14842         (get_class_bindings): Likewise.
14843         * cp-tree.h (Likewise).
14845         * decl.c (replace_defarg): Check that the type of the default
14846         parameter does not invlove a template type before complaining
14847         about the initialization.
14849         * error.c (dump_expr): Deal with template constant parameters in
14850         member templates correctly.
14852         * pt.c (is_member_template): Deal with class specializations
14853         correctly.
14854         (tsubst): Handle "partial instantiation" of member templates
14855         correctly.
14857 Wed Sep  3 12:30:24 1997  Mark Mitchell  <mmitchell@usa.net>
14859         * pt.c (type_unification): Change calling sequence to allow for
14860         multiple levels of template parameters.
14861         (tsubst_expr): Likewise.
14862         (tsubst): Likewise.
14863         (tsubst_copy): Likewise.
14864         (instantiate_template): Likewise.
14865         (unify): Likewise.
14866         * call.c (build_overload_call_real): Use it.
14867         (add_builtin_candidate): Use it.
14868         (build_new_method_call): Use it.
14869         * class.c (instantiate_type): Use it.
14870         * decl.c (grokdeclarator): Use it.
14871         * decl2.c (finish_file): Use it.
14872         * method.c (build_overload_identifier): Use it.
14874         * call.c (add_template_candidate):  Add additional parameter for
14875         the function return type.  Call fn_type_unification istead of
14876         type_unification.
14877         (build_user_type_conversion_1): Handle member templates.
14878         (build_new_function_call): Likewise.
14879         (build_new_op): Likewise.
14880         (build_new_method_call): Likewise.
14882         * class.c (grow_method): Don't give an error message indicating
14883         that two member templates with the same name are ambiguous.
14884         (finish_struct): Treat member template functions just like member
14885         functions.
14887         * cp-tree.h (check_member_template): Add declaration.
14888         (begin_member_template_processing): Likewise.
14889         (end_member_template_processing): Likewise.
14890         (fn_type_unification): Likewise.
14891         (is_member_template): Likewise.
14892         (tsubst): Change prototype.
14893         (tsubst_expr): Likewise.
14894         (tsubst_copy): Likewise.
14895         (instantiate_template): Likewise.
14896         (get_bindings): Likewise.
14898         * decl.c (decls_match): Handle multiple levels of template
14899         parameters.
14900         (pushdecl): Handle template type params just like other type
14901         declarations.
14902         (push_class_level_binding): Return immediately if the
14903         class_binding_level is NULL.
14904         (grokfndecl): If check_classfn() returns a member_template, use
14905         the result of the template, not the template itself.
14907         * decl2.c (check_member_template): New function.  Check to see
14908         that the entity declared to be a member template can be one.
14909         (check_classfn): Allow redeclaration of member template functions
14910         with different types; the new functions can be specializations or
14911         explicit instantiations.
14913         * error.c (dump_decl): Handle multiple levels of template
14914         parameters.
14915         (dump_function_decl): Update to handle function templates.
14917         * lex.c (do_pending_inlines): Set up template parameter context
14918         for member templates.
14919         (process_next_inline): Likewise.
14921         * method.c (build_overload_identifier): Adjust for multiple levels
14922         of template parameters.
14924         * parse.y (fn.def2): Add member templates.
14925         (component_decl_1): Likewise.
14927         * pt.c (begin_member_template_processing): New function.
14928         (end_member_template_processing): Likewise.
14929         (is_member_template): Likewise.
14930         (fn_type_unification): Likewise.
14931         (current_template_parms): Return a vector of all the template
14932         parms, not just the innermost level of parms.
14933         (push_template_decl): Deal with the possibility of member
14934         templates.
14935         (lookup_template_class): Likewise.
14936         (uses_template_parms): Likewise.
14937         (tsubst): Modify processing to TEMPLATE_TYPE_PARM and
14938         TEMPLATE_CONST_PARM to deal with multiple levels of template
14939         arguments.   Add processing of TEMPLATE_DECL to produce new
14940         TEMPLATE_DECLs from old ones.
14941         (do_decl_instantiation): Handle member templates.
14943         * search.c (lookup_fnfields_1): Handle member template conversion
14944         operators.
14946         * tree.c (cp_tree_equal): Check the levels, as well as the
14947         indices, of TEMPLATE_CONST_PARMs.
14949         * typeck.c (comptypes): Check the levels, as well as the indices,
14950         fo TEMPLATE_TYPE_PARMs.
14951         (build_x_function_call): Treat member templates like member
14952         functions.
14954 Wed Sep  3 11:09:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
14956         * typeck.c (c_expand_return): Always convert_for_initialization
14957         before checking for returning a pointer to local.
14959         * pt.c (type_unification): If strict and the function parm doesn't
14960         use template parms, just compare types.
14962 Wed Sep  3 10:35:49 1997  Klaus Espenlaub  <kespenla@student.informatik.uni-ulm.de>
14964         * method.c (build_overloaded_value): Replace direct call
14965         to the floating point emulator with REAL_VALUE_TO_DECIMAL macro.
14967 Wed Sep  3 00:02:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
14969         * typeck.c (convert_arguments): Don't arbitrarily choose the first
14970         of a set of overloaded functions.
14972 Tue Sep  2 12:09:13 1997  Jason Merrill  <jason@yorick.cygnus.com>
14974         * lex.c (real_yylex): Don't elide __FUNCTION__.
14976         * method.c (build_overload_value): Add in_template parm.
14977         (build_overload_int): Likewise.
14978         (build_overload_identifier): Pass it.
14980         * decl.c (duplicate_decls): Don't bash a previous template
14981         definition with a redeclaration.
14983         * pt.c (unify): float doesn't match double.
14985         * pt.c (do_type_instantiation): Handle getting a _TYPE or a
14986         TYPE_DECL.  Handle getting non-template types.
14987         * parse.y (explicit_instantiation): Use typespec instead of
14988         aggr template_type.
14990 Tue Sep  2 10:27:08 1997  Richard Henderson  <rth@cygnus.com>
14992         * typeck.c (build_ptrmemfunc1): Clean up ptr->int cast warnings.
14994 Mon Sep  1 13:19:04 1997  Eugene Mamchits  <eugin@ips.ras.ru>
14996         * call.c (add_builtin_candidate): Add missing TREE_TYPE.
14997         (compare_ics): Likewise.
14999 Mon Sep  1 13:19:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
15001         * call.c (joust): Warn about choosing one conversion op over
15002         another because of 'this' argument when the other return type is
15003         better.
15004         (source_type): New fn.
15006         * call.c (build_new_op): Strip leading REF_BIND from first operand
15007         to builtin operator.
15009         * decl2.c (mark_vtable_entries): Mark abort_fndecl as used when we
15010         use its RTL.
15012 Thu Aug 28 09:45:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
15014         * call.c (null_ptr_cst_p): Remove support for (void*)0.
15016 Wed Aug 27 02:03:34 1997  Jeffrey A Law  <law@cygnus.com>
15018         * typeck.c (expand_target_expr): Make definition match declaration.
15020         * class.c (get_basefndecls): Make definition match declaration.
15022 Mon Aug 25 14:30:02 1997  Jason Merrill  <jason@yorick.cygnus.com>
15024         * input.c (sub_getch): Eventually give up and release the input file.
15026         * decl.c (cp_finish_decl): If #p i/i, put inline statics in the
15027         right place.
15029         * call.c (joust): Tweak message.
15031 Sat Aug 23 18:02:59 1997  Mark Mitchell  <mmitchell@usa.net>
15033         * error.c (type_as_string): Put const/volatile on template type
15034         parameters where appropriate.
15036 Sat Aug 23 17:47:22 1997  Jeffrey A Law  <law@cygnus.com>
15038         * call.c (strictly_better): Make arguments unsigned ints.
15040 Thu Aug 21 18:48:44 1997  Jason Merrill  <jason@yorick.cygnus.com>
15042         * lex.c (real_yylex): Refer to __complex instead of complex.
15044 Thu Aug 21 22:25:46 1997  J"orn Rennecke  <amylaar@cygnus.co.uk>
15046         * lex.c (real_yylex): Don't use getc directly.
15048 Wed Aug 20 17:25:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
15050         * call.c (is_subseq): Don't try to be clever.
15052 Wed Aug 20 03:13:36 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
15054         * parse.y, pt.c: Include "except.h".
15055         * call.c, class.c, class.h, cp-tree.h, cvt.c, decl.c, decl2.c,
15056         error.c, except.c, expr.c, friend.c, g++spec.c, init.c, input.c,
15057         lex.c, lex.h, method.c, parse.y, pt.c, repo.c, rtti.c, search.c,
15058         sig.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c: Finish
15059         prototyping.
15061 Wed Aug 20 01:34:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
15063         * decl2.c (mark_vtable_entries): Instead of replacing pure
15064         virtuals with a reference to __pure_virtual, copy the decl and
15065         change the RTL.
15067 Tue Aug 19 02:26:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
15069         * pt.c (lookup_nested_type_by_name): Handle typedef wierdness.
15071         * typeck2.c (my_friendly_abort): Report bugs to egcs-bugs@cygnus.com.
15073         * pt.c (instantiate_class_template): Call repo_template_used
15074         before finish_prevtable_vardecl.
15076         * call.c (is_subseq): New fn.
15077         (compare_ics): Use it.
15079         * repo.c (finish_repo): Don't crash on no args.
15081         * parse.y (named_complex_class_head_sans_basetype): Handle
15082         explicit global scope.
15083         * decl2.c (handle_class_head): New fn.
15085         * pt.c (unify): Add CONST_DECL case.
15087 Thu Aug 14 10:05:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15089         * rtti.c (permanent_obstack): Fix decl to not be a pointer.
15091         * cp-tree.h (report_type_mismatch): Add prototype.
15092         * call.c (build_overload_call_real): Remove erroneous fourth
15093         argument to report_type_mismatch.
15094         (build_user_type_conversion_1): Remove erroneous second arg to
15095         tourney.
15096         (build_new_function_call): Likewise.
15097         (build_object_call): Likewise.
15098         (build_new_op): Likewise.
15099         (build_new_method_call): Likewise.
15101 Wed Aug 13 19:19:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
15103         * error.c (dump_decl): Don't bother processing a function with no
15104         DECL_LANG_SPECIFIC.
15106         * method.c (emit_thunk): Call init_function_start in the macro case.
15108 Wed Aug 13 10:46:19 1997  H.J. Lu  (hjl@gnu.ai.mit.edu)
15110         * decl2.c (DEFAULT_VTABLE_THUNKS): Define to be 0 if not
15111         defined and used to set flag_vtable_thunks.
15113 Tue Aug 12 20:13:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
15115         * parse.y: Don't clear the inlines from their obstack until they've
15116         all been processed.
15118         * decl.c (duplicate_decls): Don't complain about exception
15119         specification mismatch if flag_exceptions is off.
15121 Mon Aug 11 15:01:56 1997  Marc Lehmann  <pcg@goof.com>
15123         * Make-lang.in (c++.distclean): Remove g++.c on make distclean.
15125 Sun Aug 10 12:06:09 1997  Paul Eggert  <eggert@twinsun.com>
15127         * cp-tree.h: Replace STDIO_PROTO with PROTO in include files.
15128         * cvt.c, error.c, except.c, expr.c, friend.c, init.c, rtti.c:
15129         Include <stdio.h> before include files that formerly used STDIO_PROTO.
15131         * decl.c, g++spec.c, lex.c, method.c, repo.c:
15132         Include "config.h" first, as per autoconf manual.
15134 Fri Aug  8 11:47:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
15136         * decl.c (duplicate_decls): Tweak wording.
15137         * lex.c (do_pending_defargs): Don't die if we see a default arg
15138         that isn't a DEFAULT_ARG.
15139         * error.c (dump_expr): Handle DEFAULT_ARG.
15141         * decl2.c (lang_decode_option): Handle -fhandle-exceptions.
15142         * lang-options.h: Add -fhandle-exceptions.
15144         * class.c (build_vtable): Vtables are artificial.
15145         (prepare_fresh_vtable): Likewise.
15147 Wed Aug  6 11:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15149         * cvt.c (ocp_convert): After converting to the target type, set
15150         LOOKUP_NO_CONVERSION.
15152         * call.c (joust): Warn about potentially confusing promotion rules
15153         with -Wsign-promo.
15154         * cp-tree.h, lang-options.h, decl2.c: Support -Wsign-promo.
15156 Tue Aug  5 15:15:07 1997  Michael Meissner  <meissner@cygnus.com>
15158         * exception.cc: Declare __terminate_func with noreturn attribute.
15160 Fri Aug  1 03:18:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
15162         * parse.y: Break out eat_saved_input, handle errors.
15163         (function_try_block): Use compstmt instead of compstmt_or_error.
15165 Thu Jul 31 17:14:04 1997  Jason Merrill  <jason@yorick.cygnus.com>
15167         * tree.c (build_cplus_new): Don't set TREE_ADDRESSABLE.
15169 Fri Jul  4 01:45:16 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15171         * Make-lang.in (cplib2.txt, cplib2.ready): Instead of checking for
15172         existence of cc1plus check whether $(LANGUAGES) contains C++.
15174 Wed Jul 30 13:04:21 1997  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
15176         * method.c (do_build_copy_constructor): When copying an anonymous
15177         union member loop around to handle nested anonymous unions.  Use
15178         the offset of the member relative to the outer structure, not the
15179         union.
15181 Tue Jul 29 21:17:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
15183         * call.c (resolve_args): New fn.
15184         (build_new_function_call): Use it.
15185         (build_object_call): Likewise.
15186         (build_new_method_call): Likewise.
15188 Mon Jul 28 16:02:36 1997  Jason Merrill  <jason@yorick.cygnus.com>
15190         * call.c (build_over_call): tsubst all default parms from templates.
15192 Wed Jul 23 13:36:25 1997  Jason Merrill  <jason@yorick.cygnus.com>
15194         * decl.c (struct cp_function): Add static_labelno.
15195         (push_cp_function_context): Save it.
15196         (pop_cp_function_context): Restore it.
15198 Tue Jul 22 14:43:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
15200         * typeck.c (build_component_ref_1): Convert from reference.
15202 Tue Jul 22 11:06:23 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15204         * parse.y (current_declspecs, prefix_attributes): Initialize to
15205         NULL_TREE.
15207         * parse.y (initdcl0): Make sure CURRENT_DECLSPECS is non-nil
15208         before we try to force it to be a TREE_LIST.
15209         (decl): Make sure $1.t is non-nil.
15211 Sun Jul 20 11:53:07 1997  Jason Merrill  <jason@yorick.cygnus.com>
15213         * pt.c (uses_template_parms): Handle template first-parse codes.
15215         * decl.c (cp_finish_decl): Only warn about user-defined statics.
15217 Fri Jul 18 17:56:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
15219         * pt.c (unify): Handle BOOLEAN_TYPE.
15221         * cp-tree.h: Lose PARM_DEFAULT_FROM_TEMPLATE.
15222         * pt.c (tsubst): Don't set it.
15223         * call.c (build_over_call): Use uses_template_parms.
15225 Thu Jul 17 18:06:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
15227         * method.c (build_overload_nested_name): Use static_labelno
15228         instead of var_labelno.
15229         (build_qualified_name): New fn.
15230         (build_overload_name): Split out from here.
15231         (build_static_name): Use build_qualified_name.
15232         * decl.c (cp_finish_decl): Statics in extern inline functions
15233         have comdat linkage.
15234         (start_function): Initialize static_labelno.
15236 Thu Jul 17 11:20:17 1997  Benjamin Kosnik  <bkoz@rhino.cygnus.com>
15238         * class.c (finish_struct_methods): Add check of warn_ctor_dtor_privacy
15239         before "all member functions in class [] are private".
15241 Wed Jul 16 23:47:08 1997  Jason Merrill  <jason@yorick.cygnus.com>
15243         * lex.c (do_scoped_id): convert_from_reference.
15244         * init.c (build_offset_ref): Likewise.
15246 Wed Jul 16 12:34:29 1997  Benjamin Kosnik  <bkoz@lisa.cygnus.com>
15248         * error.c (dump_expr): Check TREE_OPERAND before dump_expr_list.
15250 Mon Jul 14 03:23:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
15252         * typeck.c (get_member_function_from_ptrfunc): Promote index
15253         before saving it.
15255 Sun Jul 13 00:11:52 1997  Jason Merrill  <jason@yorick.cygnus.com>
15257         * tree.c (layout_basetypes): Move non-virtual destructor warning.
15258         * decl.c (xref_basetypes): Remove non-virtual destructor warning.
15260 Sat Jul 12 12:47:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15262         * decl.c (grokdeclarator): Call add_defarg_fn for the function
15263         type, too.
15264         * lex.c (add_defarg_fn): Adjust.
15265         (do_pending_defargs): Adjust.  Don't skip the first parm.
15267 Fri Jul 11 01:39:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
15269         * decl.c (build_enumerator): Global enumerators are also readonly.
15271         * rtti.c (build_dynamic_cast_1): Renamed from build_dynamic_cast.
15272         (build_dynamic_cast): Call it and convert_from_reference.
15274         * lex.c (add_defarg_fn): New fn.
15275         (snarf_defarg): Don't add to defarg_types.
15276         (do_pending_defargs): Lose defarg_types.  All fns we process now
15277         have defargs.
15278         * decl.c (grokfndecl): Call add_defarg_fn.
15280         * Makefile.in (CONFLICTS): Expect 18 s/r conflicts.
15281         * cp-tree.def: Add DEFAULT_ARG.
15282         * spew.c (yylex): Call snarf_defarg as appropriate.
15283         * parse.y: New tokens DEFARG and DEFARG_MARKER.
15284         (defarg_again, pending_defargs, defarg, defarg1): New rules.
15285         (structsp): Use pending_defargs.
15286         (parms, full_parm): Use defarg.
15287         * lex.c (init_lex): Initialize inline_text_firstobj.
15288         (do_pending_inlines): Never pass the obstack to feed_input.
15289         (process_next_inline): Call end_input instead of restore_pending_input.
15290         (clear_inline_text_obstack, reinit_parse_for_expr, do_pending_defargs,
15291         finish_defarg, feed_defarg, snarf_defarg, maybe_snarf_defarg): New fns.
15292         * input.c (end_input): New fn.
15293         (sub_getch): At the end of some fed input, just keep returning EOF
15294         until someone calls end_input.
15295         Remove 'obstack' field from struct input_source.
15296         * decl.c (grokparms): Handle DEFAULT_ARG.
15297         (replace_defarg): New fn.
15298         * cp-tree.h (DEFARG_LENGTH, DEFARG_POINTER): New macros.
15300 Wed Jul  9 13:44:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15302         * call.c (implicit_conversion): If nothing else works, try binding
15303         an rvalue to a reference.
15305 Wed Jul  9 13:04:38 1997  Geoffrey Noer  <noer@cygnus.com>
15307         * decl.c (init_decl_processing): Fix Jun 30 patch -- move
15308         ifndef for Cygwin32 to include SIGSEGV.
15310 Thu Jul  3 01:44:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
15312         * class.c (finish_struct_1): Only complain about pointers without
15313         copy stuff if there are any constructors.
15315         * rtti.c (build_dynamic_cast): Call complete_type on the types.
15317         * decl.c (grokfndecl): If the function we chose doesn't actually
15318         match, die.
15320         * decl2.c (grokclassfn): Don't specify 'const int' for the
15321         artificial destructor parm.
15323         * pt.c (type_unification): If we are called recursively, nothing
15324         decays.
15326 Mon Jun 30 17:53:21 1997  Geoffrey Noer  <noer@cygnus.com>
15328         * decl.c (init_decl_processing): Stop trying to catch signals
15329         other than SIGABRT since the Cygwin32 library doesn't support
15330         them correctly yet.  This fixes a situation in which g++ causes
15331         a hang on SIGSEGVs and other such signals in our Win32-hosted
15332         tools.
15334 Mon Jun 30 14:50:01 1997  Jason Merrill  <jason@yorick.cygnus.com>
15336         * tree.c (mapcar, case CALL_EXPR): Handle all the parse node data.
15338 Fri Jun 27 15:18:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
15340         * typeck2.c (store_init_value): Always return the value if our
15341         type needs constructing.
15343         * method.c (hack_identifier): Convert class statics from
15344         reference, too.
15346 Thu Jun 26 11:44:46 1997  Jason Merrill  <jason@yorick.cygnus.com>
15348         * Make-lang.in (cplib2.ready): Add $(LANGUAGES) dependency.
15350 Thu Jun 19 16:49:28 1997  Mike Stump  <mrs@cygnus.com>
15352         * typeck.c (c_expand_return): Make sure we clean up temporaries at
15353         the end of return x;
15355 Thu Jun 19 12:28:43 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15357         * lex.c (check_for_missing_semicolon): Also check for CV_QUALIFIER.
15359 Tue Jun 17 18:35:57 1997  Mike Stump  <mrs@cygnus.com>
15361         * except.c (expand_builtin_throw): Add support
15362         -fno-sjlj-exceptions -fPIC exception handling on the SPARC.
15364 Mon Jun 16 01:24:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
15366         * repo.c (extract_string): Null-terminate.
15368         * cp-tree.h (TI_SPEC_INFO): New macro.
15369         (CLASSTYPE_TI_SPEC_INFO): New macro.
15370         * pt.c (push_template_decl): Correctly determine # of template parms
15371         for partial specs.
15373         * call.c (compare_ics): Really fix 'this' conversions.
15375         * pt.c (do_decl_instantiation): Don't crash on explicit inst of
15376         non-template fn.
15378         * pt.c (push_template_decl): Complain about mismatch in # of
15379         template parms between a class template and a member template.
15381 Sun Jun 15 02:38:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15383         * method.c (synthesize_method): You can't call
15384         function_cannot_inline_p after finish_function.
15385         * decl.c (finish_function): Turn on flag_inline_functions and turn
15386         off DECL_INLINE before handing a synthesized method to the
15387         backend.
15389 Thu Jun 12 17:35:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15391         * method.c (synthesize_method): Remove July 30 change to never set
15392         DECL_INLINE if at_eof.
15394 Thu Jun 12 15:25:08 1997  Mike Stump  <mrs@cygnus.com>
15396         * xref.c (GNU_xref_member): Ensure that the node has a
15397         decl_lang_specific part before checking DECL_FRIEND_P.
15399 Thu Jun 12 12:36:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
15401         * pt.c (instantiate_class_template): Diagnose non-class types used
15402         as bases.
15404 Wed Jun 11 17:33:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
15406         * typeck.c (build_conditional_expr): Use convert_for_initialization
15407         instead of convert_and_check.
15409 Wed Jun 11 12:31:33 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15411         * parse.y (typespec): Don't pedwarn for typeof.
15413 Tue Jun 10 00:22:09 1997  Jason Merrill  <jason@yorick.cygnus.com>
15415         * repo.c (finish_repo): Only check changes if we would write a
15416         repo file.
15418         * call.c (compare_ics): Fix handling of 'this' conversions.
15420         * pt.c (do_decl_instantiation): Support static data too.  Rename
15421         from do_function_instantiation.
15422         * cp-tree.h: Adjust.
15423         * parse.y: Adjust.
15425         * repo.c (extract_string): New fn.
15426         (get_base_filename): Use it.
15427         (init_repo): Compare old args with current args.
15429 Mon Jun  9 14:25:30 1997  Mike Stump  <mrs@cygnus.com>
15431         * Makefile.in, Make-lang.in: Protect C-ls with a comment
15432         character, idea from Paul Eggert <eggert@twinsun.com>.
15434 Mon Jun  9 01:52:03 1997  Jason Merrill  <jason@yorick.cygnus.com>
15436         * typeck.c (c_expand_return): Be more persistent in looking for
15437         returned temps.
15439         * cvt.c (build_up_reference): Use NOP_EXPR for switching from
15440         pointer to reference.
15442         * class.c (build_vbase_path): Don't do anything if PATH has no steps.
15444 Sun Jun  8 03:07:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
15446         * init.c (build_member_call, build_offset_ref):
15447         Use do_scoped_id instead of do_identifier.
15449         * cvt.c (convert): Remove bogosity.
15451 Sat Jun  7 20:50:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15453         * cvt.c (build_up_reference): Do checks of ARGTYPE and
15454         TARGET_TYPE before trying to use get_binfo.
15456 Fri Jun  6 17:36:39 1997  Jason Merrill  <jason@yorick.cygnus.com>
15458         * cvt.c (build_up_reference): Call get_binfo to get access control.
15460         * decl2.c (import_export_decl): If we don't support weaks, leave
15461         statics undefined.
15463 Fri Jun  6 15:55:49 1997  Mike Stump  <mrs@cygnus.com>
15465         * except.c (expand_builtin_throw): Add support for machines that
15466         cannot access globals after throw's epilogue when
15467         -fno-sjlj-exceptions is used.
15469 Thu Jun  5 16:28:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
15471         * parse.y: 'std::' becomes '::'.
15472         * lex.c (real_yylex): Remove 'namespace' warning.
15473         * init.c (build_member_call): Ignore 'std::'.
15474         (build_offset_ref): Likewise.
15475         * decl2.c (do_using_directive): Ignore 'using namespace std;'.
15476         (do_toplevel_using_decl): Ignore 'using std::whatever'.
15477         * decl.c (push_namespace): Just sorry.
15478         (pop_namespace): Nop.
15479         (init_decl_processing): Declare std namespace.
15481 Tue Jun  3 18:08:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
15483         * search.c (push_class_decls): A name which ambiguously refers to
15484         several instantiations of the same template just refers to the
15485         template.
15487 Tue Jun  3 12:30:40 1997  Benjamin Kosnik  <bkoz@cirdan.cygnus.com>
15489         * decl.c (build_enumerator): Fix problem with unsigned long
15490         enumerated values being smashed to ints, causing overflow
15491         when computing next enumerated value (for enum values around
15492         MAX_VAL).
15494 Mon Jun  2 17:40:56 1997  Jason Merrill  <jason@yorick.cygnus.com>
15496         * typeck.c (build_component_ref): Only call mark_used on a decl.
15498 Thu May 29 15:54:17 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15500         * typeck.c (build_c_cast): Make the check for a ptr to function
15501         more specific before possible default_conversion call.
15503 Thu May 29 13:02:06 1997  Mike Stump  <mrs@cygnus.com>
15505         * except.c (expand_exception_blocks): Simplify and fix and make
15506         sure we don't end a region in a sequence, as expand_end_bindings
15507         doesn't like it.
15509 Wed May 28 17:08:03 1997  Mike Stump  <mrs@cygnus.com>
15511         * except.c (init_exception_processing): Mark terminate as not
15512         returning so that the optimizer can optimize better.
15514 Tue May 27 19:49:19 1997  Mike Stump  <mrs@cygnus.com>
15516         * cvt.c (convert): Don't do any extra work, if we can avoid it
15517         easily.
15519 Tue May 27 18:21:47 1997  Mike Stump  <mrs@cygnus.com>
15521         * *.[chy]: Change cp_convert to ocp_convert, change convert to
15522         cp_convert.  convert is now reserved for the backend, and doesn't
15523         have the semantics a frontend person should ever want.
15525 Fri May 23 10:58:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
15527         * lang-specs.h: Define __EXCEPTIONS if exceptions are enabled.
15528         Lose -traditional support.
15530 Thu May 22 15:41:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15532         * rtti.c (get_tinfo_var): Use TYPE_PRECISION (sizetype).
15534         * parse.y (self_reference): Do it for templates, too.
15535         * class.c (pushclass): Don't overload_template_name; the alias
15536         generated by build_self_reference serves the same purpose.
15538         * tree.c (list_hash): Make static, take more args.
15539         (list_hash_lookup): Likewise.
15540         (list_hash_add): Make static.
15541         (list_hash_canon): Lose.
15542         (hash_tree_cons): Only build a new node if one isn't already in the
15543         hashtable.
15544         (hash_tree_chain): Use hash_tree_cons.
15545         * cp-tree.h: Adjust.
15546         * decl.c (grokfndecl): Just check IDENTIFIER_GLOBAL_VALUE instead
15547         of calling lookup_name.
15549 Wed May 21 18:24:19 1997  Jason Merrill  <jason@yorick.cygnus.com>
15551         * pt.c (instantiate_class_template): TYPE_VALUES for an enum
15552         doesn't refer to the CONST_DECLs.
15554 Tue May 20 21:09:32 1997  Bob Manson  <manson@charmed.cygnus.com>
15556         * rtti.c (get_tinfo_var): Either INT_TYPE_SIZE or 32, whichever
15557         is bigger.
15558         (expand_class_desc): Convert the last argument to a sizetype.
15560 Tue May 20 13:55:57 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15562         * gxx.gperf (__complex, __complex__, __imag, __imag__, __real,
15563         __real__): Add reswords.
15564         * hash.h: Regenerate.
15565         * lex.h (rid): Add RID_COMPLEX.
15566         (RID_LAST_MODIFIER): Set to RID_COMPLEX.
15567         * lex.c (init_lex): Add building of RID_COMPLEX.
15568         (real_yylex): General cleanup in line with what c-lex.c also has,
15569         sans the cruft for traditional; add handling of SPEC_IMAG, complex
15570         types, and imaginary numeric constants.
15571         * parse.y (REALPART, IMAGPART): Add tokens.
15572         (unary_expr): Add REALPART and IMAGPART rules.
15573         * cp-tree.h (complex_{integer,float,double,long}_type_node): Declare.
15574         * decl.c (complex_{integer,float,double,long}_type_node): Define
15575         types.
15576         (init_decl_processing): Set up the types.
15577         (grokdeclarator): Add handling of RID_COMPLEX.  Set and use
15578         DEFAULTED_INT instead of EXPLICIT_INT when we default to int type.
15579         * call.c (build_new_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15580         * cvt.c (cp_convert): Handle COMPLEX_TYPE.
15581         * error.c (dump_type_prefix, dump_type, dump_type_suffix): Add
15582         COMPLEX_TYPE case.
15583         * method.c (build_overload_name): Add handling of the different
15584         COMPLEX_TYPEs, prefixing them with `J'.
15585         * pt.c (process_template_parm): Don't let them use a COMPLEX_TYPE
15586         as a template parm.
15587         (uses_template_parms, tsubst, unify): Add COMPLEX_TYPE case.
15588         * tree.c (lvalue_p): Add REALPART_EXPR and IMAGPART_EXPR cases.
15589         (mapcar): Handle COMPLEX_CST.
15590         * typeck.c (build_binary_op_nodefault): Handle COMPLEX_TYPE.
15591         (common_type): Add code for complex types.
15592         (build_unary_op): Add REALPART_EXPR and IMAGPART_EXPR cases.
15593         (convert_for_assignment): Likewise.
15594         (mark_addressable): Add REALPART_EXPR and IMAGPART_EXPR cases.
15596 Mon May 19 12:26:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
15598         * pt.c (tsubst): Don't pass the MINUS_EXPR for an array domain to
15599         tsubst_expr, as it might try to do overload resolution.
15601 Sat May 17 10:48:31 1997  Jason Merrill  <jason@yorick.cygnus.com>
15603         * pt.c (instantiate_class_template): Oops.
15605 Fri May 16 14:23:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
15607         * cp-tree.def: Add TAG_DEFN.
15608         * pt.c (tsubst_enum): New fn.
15609         (instantiate_class_template): Use it.
15610         (tsubst_expr): Support TAG_DEFN.
15611         (tsubst): Support local enums.
15612         (tsubst_copy): Likewise.
15613         * decl.c (finish_enum): Likewise.
15614         (start_enum): If this is a local enum, switch to permanent_obstack.
15616 Wed May 14 19:08:28 1997  Mike Stump  <mrs@cygnus.com>
15618         * decl.c (store_parm_decls): Set last_parm_cleanup_insn here.
15619         (finish_function): Put the base init code for constructors just
15620         after the parm cleanup insns.
15621         (struct cp_function): Add last_parm_cleanup_insn.
15622         (push_cp_function_context): Likewise.
15623         (pop_cp_function_context): Likewise.
15625 Tue May 13 15:51:20 1997  Jason Merrill  <jason@yorick.cygnus.com>
15627         * pt.c (tsubst_copy): Handle BIT_NOT_EXPR.
15629 Wed May  7 11:17:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15631         * method.c (emit_thunk) [ASM_OUTPUT_MI_THUNK]: Build up the RTL
15632         for THUNK_FNDECL before we switch to temporary allocation.
15634 Mon May  5 14:46:53 1997  Jason Merrill  <jason@yorick.cygnus.com>
15636         * call.c (build_new_op): Handle null arg2 for ?:.
15638 Thu May  1 18:26:37 1997  Mike Stump  <mrs@cygnus.com>
15640         * except.c (expand_exception_blocks): Ensure that we flow through
15641         the end of the exception region for the exception specification.
15642         Move exception region for the exception specification in, so that
15643         it doesn't protect the parm cleanup.  Remove some obsolete code.
15644         * decl.c (store_parm_decls): Likewise.
15645         (finish_function): Likewise.
15647 Tue Apr 29 15:38:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
15649         * init.c (build_new): Fix nothrow handling.
15651 Tue Apr 29 14:29:50 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15653         * init.c (emit_base_init): Don't warn about the initialization
15654         list for an artificial member.
15656 Fri Apr 25 17:47:59 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15658         * expr.c (do_case): Handle !START case for the error msg.
15660 Fri Apr 25 11:55:23 1997  Jason Merrill  <jason@yorick.cygnus.com>
15662         * decl2.c, lang-options.h: New option -Weffc++.
15663         * class.c, decl.c, init.c, typeck.c: Move Effective C++ warnings
15664         to -Weffc++.
15666         * decl2.c (finish_prevtable_vardecl): Change NO_LINKAGE_HEURISTICS
15667         to MULTIPLE_SYMBOL_SPACES.
15669 Wed Apr 23 18:06:50 1997  Jason Merrill  <jason@yorick.cygnus.com>
15671         * method.c (emit_thunk, generic case): Set current_function_is_thunk.
15673         * method.c (emit_thunk, macro case): Set up DECL_RESULT.
15675         * typeck.c (c_expand_return): Don't complain about returning void
15676         to void in an artificial function.
15677         * method.c (make_thunk): Change settings of READONLY/VOLATILE,
15678         don't set DECL_RESULT, set DECL_ARTIFICIAL.
15679         (emit_thunk, generic code): Also set up DECL_LANG_SPECIFIC.
15681 Wed Apr 23 14:43:06 1997  Mike Stump  <mrs@cygnus.com>
15683         * init.c (init_decl_processing): Add support for setjmp/longjmp based
15684         exception handling.
15685         * except.c (init_exception_processing): Likewise.
15686         (expand_end_catch_block): Likewise.
15687         (expand_exception_blocks): Likewise.
15688         (expand_throw): Likewise.
15689         * exception.cc (__default_terminate): Likewise.
15691         * init.c (perform_member_init): Use new method of expr level
15692         cleanups, instead of cleanups_this_call and friends.
15693         (emit_base_init): Likewise.
15694         (expand_aggr_vbase_init_1): Likewise.
15695         (expand_vec_init): Likewise.
15696         * decl.c (cp_finish_decl): Likewise.
15697         (expand_static_init): Likewise.
15698         (store_parm_decls): Likewise.
15699         (cplus_expand_expr_stmt): Likewise.
15700         * decl2.c (finish_file): Likewise.
15702         * Make-lang.in (exception.o): Ok to compile with -O now.
15704         * decl.c (maybe_build_cleanup_1): We no longer have to unsave, as
15705         we know it will be done later by the backend.
15707         * decl2.c (lang_f_options): Remove support for short temps.
15708         * lang-options.h: Likewise.
15710 Wed Apr 23 04:12:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
15712         * tree.c (varargs_function_p): New fn.
15713         * method.c (emit_thunk): Replace broken generic code with code to
15714         generate a heavyweight thunk function.
15716 Tue Apr 22 02:45:18 1997  Jason Merrill  <jason@yorick.cygnus.com>
15718         * pt.c (process_template_parm): pedwarn about floating-point parms.
15720         * decl.c (grokdeclarator): inline no longer implies static.
15722         * spew.c (yylex): Always return the TYPE_DECL if we got a scope.
15724 Mon Apr 21 15:42:27 1997  Jason Merrill  <jason@yorick.cygnus.com>
15726         * class.c (check_for_override): The signature of an overriding
15727         function is not changed.
15729         * call.c (build_over_call): Move setting of conv into the loop.
15730         Note: this change, along with the related changes of the 18th thru
15731         the 20th of April, fix an infinite loop problem in conversions.
15733 Sun Apr 20 16:24:29 1997  Jason Merrill  <jason@yorick.cygnus.com>
15735         * call.c (build_user_type_conversion_1): Really ignore rvalue
15736         conversions when looking for a REFERENCE_TYPE.
15738         * cvt.c (build_up_reference): Eviscerate, use build_unary_op.
15739         * cp-tree.h (TREE_REFERENCE_EXPR): #if 0.
15740         * typeck.c (decay_conversion): Don't set TREE_REFERENCE_EXPR.
15741         (build_unary_op): Likewise.
15742         * call.c (build_over_call): See through a CONVERT_EXPR around the
15743         ADDR_EXPR for on a temporary.
15744         * typeck.c (c_expand_return): See through a CONVERT_EXPR around
15745         the ADDR_EXPR for a local variable.
15747 Fri Apr 18 12:11:33 1997  Jason Merrill  <jason@yorick.cygnus.com>
15749         * call.c (build_user_type_conversion_1): If we're trying to
15750         convert to a REFERENCE_TYPE, only consider lvalue conversions.
15751         (build_new_function_call): Print candidates.
15752         (implicit_conversion): Try a temp binding if the lvalue conv is BAD.
15753         (reference_binding): Binding a temporary of a reference-related type
15754         is BAD.
15756 Thu Apr 17 14:37:22 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15758         * inc/typeinfo (type_info::before): Add cv-qualifier-seq.
15759         * tinfo2.cc (type_info::before): Likewise.
15761 Mon Apr 14 12:38:17 1997  Jason Merrill  <jason@yorick.cygnus.com>
15763         * call.c (implicit_conversion): Oops.
15765 Fri Apr 11 02:18:30 1997  Jason Merrill  <jason@yorick.cygnus.com>
15767         * call.c (implicit_conversion): Try to find a reference conversion
15768         before binding a const reference to a temporary.
15770 Wed Apr  2 12:51:36 1997  Mike Stump  <mrs@cygnus.com>
15772         * exception.cc (__default_unexpected): Call terminate by default,
15773         so that if the user overrides terminate, the correct function will
15774         be called.
15776 Wed Mar 19 14:14:45 1997  Mike Stump  <mrs@cygnus.com>
15778         * parse.y (left_curly): Avoid trying to use any fields of
15779         error_mark_node, as there aren't any.
15781 Thu Mar 13 16:33:22 1997  Jason Merrill  <jason@yorick.cygnus.com>
15783         * lex.c (do_identifier): Avoid breaking on overloaded methods
15784         as default arguments.
15786 Wed Mar 12 13:55:10 1997  Hans-Peter Nilsson  <Hans-Peter.Nilsson@axis.se>
15788         * call.c (add_template_candidate): Initialize the variable "dummy".
15790 Mon Mar 10 15:13:14 1997  Brendan Kehoe  <brendan@canuck.cygnus.com>
15792         * decl.c (start_decl): Make sure TYPE isn't an error_mark_node
15793         before we try to use TYPE_SIZE and TREE_CONSTANT on it.
15795 Fri Mar  7 13:19:36 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15797         * cp-tree.h (comp_ptr_ttypes, more_specialized): Add decl.
15798         (debug_binfo): Delete decl, not needed.
15800         * tree.c (fnaddr_from_vtable_entry, function_arg_chain,
15801         promotes_to_aggr_type): Delete fns.
15802         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY,
15803         SET_FNADDR_FROM_VTABLE_ENTRY, FUNCTION_ARG_CHAIN,
15804         PROMOTES_TO_AGGR_TYPE): Delete alternates to #if 1.
15806         * decl.c (pending_invalid_xref{,_file,_line}): Delete unused vars.
15808         * friend.c (is_friend_type): Delete fn.
15809         * cp-tree.h (is_friend_type): Delete decl.
15811         * decl.c (original_result_rtx, double_ftype_double,
15812         double_ftype_double_double, int_ftype_int, long_ftype_long,
15813         float_ftype_float, ldouble_ftype_ldouble, last_dtor_insn): Make static.
15814         * typeck.c (original_result_rtx, warn_synth): Delete extern decls.
15816         * decl.c (push_overloaded_decl{,_top_level}): Make static, adding
15817         fwd decls.
15818         * cp-tree.h (push_overloaded_decl{,_top_level}): Delete decls.
15820         * decl.c (pushdecl_nonclass_level): #if 0, unused.
15821         * cp-tree.h (pushdecl_nonclass_level): #if 0 decl.
15823         * lex.c (reinit_lang_specific): #if 0, unused.
15824         * cp-tree.h (reinit_lang_specific): #if 0 decl.
15826         * decl.c (revert_static_member_fn): Make static, adding fwd decl.
15827         * cp-tree.h (revert_static_member_fn): Delete decl.
15829         * class.c (root_lang_context_p): Delete fn.
15830         * cp-tree.h (root_lang_context_p): Delete decl.
15832         * decl.c (set_current_level_tags_transparency): #if 0, unused.
15833         * cp-tree.h (set_current_level_tags_transparency): #if 0 decl.
15835         * lex.c (set_vardecl_interface_info): Make static.
15836         * cp-tree.h (set_vardecl_interface_info): Delete decl.
15838         * call.c (find_scoped_type): Make static.
15839         * cp-tree.h (find_scoped_type): Delete decl.
15841         * search.c (convert_pointer_to_vbase): Make static.
15842         * cp-tree.h (convert_pointer_to_vbase): Delete decl.
15844         * decl.c (const_ptr_type_node): Likewise.
15845         * cp-tree.h (const_ptr_type_node): Delete decl.
15847         * typeck.c (common_base_type): Make static.
15848         * cp-tree.h (common_base_types): Delete erroneous decl.
15850         * pt.c (classtype_mangled_name): Make static.
15851         * cp-tree.h (classtype_mangled_name): Delete decl.
15853         * lex.c (check_newline): Make static.
15854         * cp-tree.h (check_newline): Delete decl.
15856         * typeck.c (build_x_array_ref): Delete fn, same idea as
15857         grok_array_decl.
15858         * cp-tree.h (build_x_array_ref): Delete decl.
15860         * lex.c (copy_decl_lang_specific): Delete fn, same idea as
15861         copy_lang_decl.
15862         * cp-tree.h (copy_decl_lang_specific): #if 0 decl.
15864         * class.c (build_vtable_entry): Make static.
15865         * cp-tree.h (build_vtable_entry): Delete decl.
15867         * class.c (build_vbase_pointer): Make static.
15868         * cp-tree.h (build_vbase_pointer): Delete decl.
15870         * sig.c (build_sptr_ref): Add forward decl and make static.
15871         * cp-tree.h (build_sptr_ref): Delete decl.
15873         * call.c (build_new_method_call): Add forward decl and make static.
15874         * cp-tree.h (build_new_method_call): Delete decl.
15876         * call.c (build_object_call): Make static.
15877         * class.c (check_for_override, complete_type_p, mark_overriders):
15878         Likewise.
15879         * decl.c (cp_function_chain): Likewise.
15880         * lex.c (set_typedecl_interface_info, reinit_parse_for_block):
15881         Likewise.
15882         * pt.c (comp_template_args, get_class_bindings, push_tinst_level):
15883         Likewise.
15884         * tree.c (build_cplus_array_type_1): Likewise.
15885         * typeck.c (comp_ptr_ttypes_{const,real,reinterpret}): Likewise.
15886         (comp_target_parms): Likewise.
15888         * init.c (build_builtin_call): Make static.
15889         * cp-tree.h (build_builtin_call): Delete decl.
15891         * typeck.c (binary_op_error): Delete decl.
15892         * cp-tree.h (binary_op_error): Likewise.
15894 Thu Mar  6 16:13:52 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15896         * call.c (build_method_call): Compare against error_mark_node
15897         directly, rather than the ERROR_MARK tree code.
15898         * cvt.c (cp_convert): Likewise.
15899         * decl.c (print_binding_level): Likewise.
15900         (duplicate_decls): Likewise.
15901         (grokdeclarator): Likewise.
15902         (grokdeclarator): Likewise.
15903         * init.c (expand_aggr_init_1): Likewise.
15904         (decl_constant_value): Likewise.
15905         * method.c (build_opfncall): Likewise.
15906         (hack_identifier): Likewise.
15907         * typeck.c (build_modify_expr): Likewise.
15909         * typeck.c (build_c_cast): Don't decl TYPE as register tree.
15911 Sun Mar  2 02:54:36 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
15913         * pt.c (unify): Strip NOP_EXPR wrappers before unifying integer values.
15915         * pt.c (coerce_template_parms): Add new error message.
15917         * method.c (build_overload_value): Implement name mangling for
15918         floating-point template arguments.
15920         * method.c (build_overload_int, icat, dicat): Fix mangling of template
15921         arguments whose absolute value doesn't fit in a signed word.
15923 Mon Mar  3 12:14:54 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15925         * friend.c: New file; put all of the friend stuff in here.
15926         * init.c: Instead of here.
15927         * Makefile.in (CXX_OBJS): Add friend.o.
15928         (friend.o): Add dependencies.
15929         * Make-lang.in (CXX_SRCS): Add $(srcdir)/cp/friend.c.
15931 Sun Mar  2 11:04:43 1997  Jason Merrill  <jason@yorick.cygnus.com>
15933         * call.c (build_scoped_method_call): Complain if the scope isn't a
15934         base.
15936 Wed Feb 26 11:31:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
15938         * parse.y (left_curly): Don't crash on erroneous type.
15940         * init.c (build_delete): Fix type of ref.
15942 Tue Feb 25 12:41:48 1997  Jason Merrill  <jason@yorick.cygnus.com>
15944         * search.c (get_vbase_1): Renamed from get_vbase.
15945         (get_vbase): Wrapper, now non-static.
15946         (convert_pointer_to_vbase): Now static.
15948         * call.c (build_scoped_method_call): Accept a binfo for BASETYPE.
15949         * init.c (build_delete): Pass one.
15950         (build_partial_cleanup_for): Use build_scoped_method_call.
15951         * decl.c (finish_function): Pass a binfo.
15953 Mon Feb 24 15:00:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
15955         * call.c (build_over_call): Only synthesize non-trivial copy ctors.
15957         * typeck.c (build_c_cast): Lose other reference to flag.
15959         * call.c (build_field_call): Don't look for [cd]tor_identifier.
15960         * decl2.c (delete_sanity): Remove meaningless use of
15961         LOOKUP_HAS_IN_CHARGE.
15962         * decl.c (finish_function): Use build_scoped_method_call instead
15963         of build_delete for running vbase dtors.
15964         * init.c (build_delete): Call overload resolution code instead of
15965         duplicating it badly.
15967 Thu Feb 20 15:12:15 1997  Jason Merrill  <jason@yorick.cygnus.com>
15969         * call.c (build_over_call): Call mark_used before trying to elide
15970         the call.
15972         * decl.c (implicitly_declare): Don't set DECL_ARTIFICIAL.
15974 Wed Feb 19 11:18:53 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
15976         * typeck.c (build_modify_expr): Always pedwarn for a cast to
15977         non-reference used as an lvalue.
15979 Wed Feb 19 10:35:37 1997  Jason Merrill  <jason@yorick.cygnus.com>
15981         * cvt.c (cp_convert_to_pointer): Convert from 0 to a pmf properly.
15983 Tue Feb 18 15:40:57 1997  Jason Merrill  <jason@yorick.cygnus.com>
15985         * parse.y (handler): Fix template typo.
15987 Sun Feb 16 02:12:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
15989         * error.c (lang_decl_name): New fn.
15990         * tree.c (lang_printable_name): Use it.
15992 Fri Feb 14 16:57:05 1997  Mike Stump  <mrs@cygnus.com>
15994         * g++spec.c: Include config.h so that we can catch bzero #defines
15995         from the config file.
15997 Tue Feb 11 13:50:48 1997  Mike Stump  <mrs@cygnus.com>
15999         * new1.cc: Include a declaration for malloc, to avoid warning, and
16000         avoid lossing on systems that require one (ones that define malloc
16001         in xm.h).
16003 Mon Feb 10 22:51:13 1997  Bruno Haible  <bruno@linuix.mathematik.uni-karlsruhe.de>
16005         * decl2.c (max_tinst_depth): New variable.
16006         (lang_decode_option): Parse "-ftemplate-depth-NN" command line
16007         option.
16008         * pt.c (max_tinst_depth): Variable moved.
16009         * lang-options.h: Declare "-ftemplate-depth-NN" command line option
16010         as legal.
16012 Fri Feb  7 15:43:34 1997  Jason Merrill  <jason@yorick.cygnus.com>
16014         * decl.c (xref_basetypes): Allow a base class that depends on
16015         template parms to be incomplete.
16017         * decl2.c (build_expr_from_tree): Support typeid(type).
16018         * rtti.c (get_typeid): Support templates.
16019         (expand_si_desc, expand_class_desc): Fix string length.
16020         (expand_ptr_desc, expand_attr_desc, expand_generic_desc): Likewise.
16022 Tue Feb  4 11:28:24 1997  Jason Merrill  <jason@yorick.cygnus.com>
16024         * pt.c (unify, case TEMPLATE_CONST_PARM): Use cp_tree_equal.
16026         * pt.c (tsubst): Put it back for -fno-ansi-overloading.
16028 Mon Feb  3 18:41:12 1997  Jason Merrill  <jason@yorick.cygnus.com>
16030         * pt.c (tsubst, case FUNCTION_DECL): Lose obsolete code that
16031         smashes together template and non-template decls of the same
16032         signature.
16034 Thu Jan 30 19:18:00 1997  Jason Merrill  <jason@yorick.cygnus.com>
16036         * pt.c (tsubst): Don't recurse for the type of a TYPENAME_TYPE.
16038 Wed Jan 29 11:40:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16040         * decl.c (duplicate_decls): Next route, pedwarn about different
16041         exceptions if -pedantic *or* olddecl !DECL_IN_SYSTEM_HEADER.
16043 Tue Jan 28 20:43:29 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16045         * cp-tree.h (HAS_DEFAULT_IMPLEMENTATION): Delete macro.
16046         (struct lang_type): Delete has_default_implementation member.
16047         Increase dummy to 21.
16048         * decl.c (start_method): Delete usage.
16050         * cp-tree.h (build_call, null_ptr_cst_p, in_function_p,
16051         store_after_parms, start_decl_1, auto_function): Add decls.
16052         (get_arglist_len_in_bytes, declare_implicit_exception,
16053         have_exceptions_p, make_type_decl, typedecl_for_tag,
16054         store_in_parms, pop_implicit_try_blocks, push_exception_cleanup,
16055         build_component_type_expr, cplus_exception_name,
16056         {make,clear}_anon_parm_name, dont_see_typename): Removed decls.
16057         * call.c (build_this): Make static.
16058         (is_complete): Likewise.
16059         (implicit_conversion): Likewise.
16060         (reference_binding): Likewise.
16061         (standard_conversion): Likewise.
16062         (strip_top_quals): Likewise.
16063         (non_reference): Likewise.
16064         (build_conv): Likewise.
16065         (user_harshness): Likewise.
16066         (rank_for_ideal): Likewise.
16067         * decl.c (start_decl_1): Delete forward decl.
16068         (push_decl_level): Make static.
16069         (resume_binding_level): Make static.
16070         (namespace_bindings_p): Make static.
16071         (declare_namespace_level): Make static.
16072         (lookup_name_real): Make static.
16073         (duplicate_decls): Make static.  Take register off NEWDECL and
16074         OLDDECL parm decls.
16075         * decl2.c (get_sentry): Make static.
16076         (temp_name_p): Delete fn.
16077         * except.c (auto_function): Delete decl.
16078         * lex.c (handle_{cp,sysv}_pragma): Make static.
16079         (handle_sysv_pragma) [HANDLE_SYSV_PRAGMA]: Add forward decl.
16080         * method.c (do_build_{copy_constructor,assign_ref}): Make static.
16081         * pt.c (tsubst_expr_values): Make static.
16082         * rtti.c (combine_strings): Delete decl.
16084 Tue Jan 28 16:40:40 1997  Jason Merrill  <jason@yorick.cygnus.com>
16086         * pt.c (push_template_decl): Handle getting a typedef.
16088         * call.c (build_new_function_call): Complain about void arg.
16090 Tue Jan 28 15:25:09 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16092         * decl.c (duplicate_decls): Give pedwarn of different exceptions
16093         if -pedantic, instead of olddecl !DECL_IN_SYSTEM_HEADER.
16095 Mon Jan 27 19:21:29 1997  Mike Stump  <mrs@cygnus.com>
16097         * except.c (expand_throw): Don't expand the cleanup tree here,
16098         since we are not going to write the rtl out.  Fixes problem with
16099         -g -O on SPARC.
16101 Mon Jan 27 16:24:35 1997  Sean McNeil  <sean@mcneil.com>
16103         * Make-lang.in: Add $(exeext) as necessary.
16105 Mon Jan 27 13:20:39 1997  Mike Stump  <mrs@cygnus.com>
16107         * parse.y (handler_seq): Must have at least one catch clause.
16109 Sat Jan 25 12:00:05 1997  Jason Merrill  <jason@yorick.cygnus.com>
16111         * call.c (add_builtin_candidate): Restore ?: hack.
16113         * decl.c (grok_op_properties): More warnings.
16115 Sat Jan 25 08:50:03 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16117         * decl.c (duplicate_decls): On second thought, do it as a pedwarn
16118         still but only if !DECL_IN_SYSTEM_HEADER (olddecl).
16120         * decl.c (duplicate_decls): Scale back to a warning, and only do
16121         'em if -pedantic.
16123 Fri Jan 24 17:52:54 1997  Mike Stump  <mrs@cygnus.com>
16125         * decl.c (duplicate_decls): pedwarn mismatched exception
16126         specifications.
16128 Thu Jan 23 18:18:54 1997  Mike Stump  <mrs@cygnus.com>
16130         * call.c (build_new_method_call): Don't display the invisible
16131         argument for controlling virtual bases.
16133 Thu Jan 23 16:48:10 1997  Mike Stump  <mrs@cygnus.com>
16135         * new: Add nothrow new and delete, bad_alloc and throw specifications
16136         for delete.
16137         * decl.c (init_decl_processing): Add throw specification for delete.
16138         * new.cc (nothrow): Define.
16139         * lex.c (real_yylex): Removing warning that throw and friends are
16140         keywords.
16141         * new1.cc (operator new (size_t sz, const nothrow_t&)): Define.
16142         * new2.cc (operator new[] (size_t sz, const nothrow_t&): Define.
16143         * Make-lang.in: Add new{1,2}.{cc,o}.
16145 Thu Jan 23 16:39:06 1997  Jason Merrill  <jason@yorick.cygnus.com>
16147         * lex.c (cons_up_default_function): Fix return type of synth op=.
16149         * init.c (emit_base_init): Add warnings for uninitialized members
16150         and bases.
16152         * decl.c (xref_basetypes): Add warning for non-polymorphic type
16153         with destructor used as base type.
16155         * decl.c (grok_op_properties): Add warning for op= returning void.
16156         * typeck.c (c_expand_return): Add warning for op= returning anything
16157         other than *this.
16159         * class.c (finish_struct_1): Add warning for class with pointers
16160         but not copy ctor or copy op=.
16162         * cp-tree.h (TI_PENDING_TEMPLATE_FLAG): New macro.
16163         * pt.c (add_pending_template): Use it instead of LANG_FLAG_0.
16164         (instantiate_template): If -fexternal-templates, add this
16165         instantiation to pending_templates.
16167         * decl2.c (copy_assignment_arg_p): Disable old hack to support
16168         Booch components.
16170 Tue Jan 21 18:32:04 1997  Mike Stump  <mrs@cygnus.com>
16172         * cvt.c (cp_convert): pedwarn enum to pointer conversions.
16174 Mon Jan 20 17:59:51 1997  Jason Merrill  <jason@yorick.cygnus.com>
16176         * call.c (standard_conversion): Handle getting references.  Tack
16177         on RVALUE_CONV here.  Do it for non-class types, too.
16178         (reference_binding): Pass references to standard_conversion.
16179         (implicit_conversion): Likewise.
16180         (add_builtin_candidate): Disable one ?: kludge.
16181         (convert_like): Handle RVALUE_CONVs for non-class types.
16182         (joust): Disable the other ?: kludge.
16184 Mon Jan 20 14:53:13 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16186         * decl.c (init_decl_processing): Add code to build up common
16187         function types beforehand, to avoid creation then removal of
16188         things already in the hash table.
16190 Mon Jan 20 14:43:49 1997  Jason Merrill  <jason@yorick.cygnus.com>
16192         * decl.c (finish_function): Also zero out DECL_INCOMING_RTL for
16193         the arguments.
16195         * error.c (dump_expr, TEMPLATE_CONST_PARM): Don't require
16196         current_template_parms.
16198 Fri Jan 17 10:25:42 1997  Jason Merrill  <jason@yorick.cygnus.com>
16200         * search.c (lookup_field): Don't return a function, check want_type.
16202 Thu Jan 16 18:14:35 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16204         * init.c (build_new): Make sure PLACEMENT has a type.
16206 Thu Jan 16 17:40:28 1997  Jason Merrill  <jason@yorick.cygnus.com>
16208         * init.c (build_new): Support new (nothrow).
16210 Wed Jan 15 12:38:14 1997  Jason Merrill  <jason@yorick.cygnus.com>
16212         * pt.c (instantiate_decl): Also do push_to_top_level before setting
16213         up DECL_INITIAL.
16215         * cp-tree.h (PARM_DEFAULT_FROM_TEMPLATE): New macro.
16216         * pt.c (tsubst): Defer instantiation of default args.
16217         * call.c (build_over_call): Until here.
16219 Wed Jan 15 10:08:10 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16221         * search.c (lookup_field): Make sure we have an
16222         IDENTIFIER_CLASS_VALUE before we try to return it.
16224 Thu Jan  9 07:19:01 1997  Brendan Kehoe  <brendan@lisa.cygnus.com>
16226         * call.c (build_method_call): Delete unused var PARM.
16227         (build_overload_call_real): Likewise.
16228         (build_object_call): Delete unused var P.
16229         (build_new_op): Likewise.
16230         * decl.c (builtin_type_tdescs_{arr, len, max}): #if 0 out static
16231         var definitions, which are never used.
16232         (shadow_tag): Delete unused var FN.
16233         * expr.c (cplus_expand_expr): Delete unused var ORIGINAL_TARGET.
16234         * init.c (build_new): Delete unused var ALLOC_TEMP.
16235         * method.c (hack_identifier): Delete unused var CONTEXT.
16236         (do_build_copy_constructor): Delete unused var NAME.
16237         (synthesize_method): Delete unused var BASE.
16238         * pt.c (lookup_template_class): Delete unused var CODE_TYPE_NODE.
16239         * rtti.c (build_headof): Delete unused var VPTR.
16240         (get_typeid): Delete unused var T.
16241         * typeck.c (build_conditional_expr): Delete unused vars ORIG_OP1
16242         and ORIG_OP2.
16243         (build_ptrmemfunc): Delete unused vars U and NINDEX.
16244         * typeck2.c (build_functional_cast): Delete unused var BINFO.
16246 Wed Jan  8 13:09:54 1997  Jason Merrill  <jason@yorick.cygnus.com>
16248         * search.c (lookup_field): Use IDENTIFIER_CLASS_VALUE to look up
16249         things in a type being defined.
16250         * decl.c (finish_enum): Reverse the values so that they are in
16251         the correct order.
16253         * pt.c (instantiate_class_template): Don't initialize
16254         BINFO_BASETYPES until the vector is filled out.
16255         (unify): Don't abort on conflicting bindings, just fail.
16256         (instantiate_decl): Do push_tinst_level before any tsubsting.
16258         * method.c (build_overload_value): Handle getting a
16259         TEMPLATE_CONST_PARM for a pointer.
16261 Tue Jan  7 14:00:58 1997  Jason Merrill  <jason@yorick.cygnus.com>
16263         * init.c (expand_member_init): Don't give 'not a base' error for
16264         templates.
16266         * pt.c (instantiate_decl): Call import_export_decl later.
16268         * pt.c (instantiate_class_template): Return a value.
16270         * parse.y (extension): New rule for __extension__.
16271         (extdef, unary_expr, decl, component_decl): Use it.
16273 Tue Jan  7 09:20:28 1997  Mike Stump  <mrs@cygnus.com>
16275         * class.c (base_binfo): Remove unused base_has_virtual member.
16276         (finish_base_struct): Likewise.
16277         (finish_struct_1): Likewise.
16279 Tue Dec 31 20:25:50 1996  Mike Stump  <mrs@cygnus.com>
16281         * search.c (expand_upcast_fixups): Fix bogus code generation
16282         problem where the generated code uses the wrong index into the
16283         runtime built vtable on the stack.  Old code could clobber random
16284         stack values.
16286 Tue Dec 31 15:16:56 1996  Mike Stump  <mrs@cygnus.com>
16288         * init.c (perform_member_init): Make sure the partial EH cleanups
16289         live on the function_obstack.
16291 Fri Dec 27 10:31:40 1996  Paul Eggert  <eggert@twinsun.com>
16293         * Make-lang.in (g++spec.o): Don't use $< with an explicit target;
16294         this isn't portable to some versions of `make' (e.g. Solaris 2.5.1).
16296 Tue Dec 24 10:24:03 1996  Jeffrey A Law  <law@cygnus.com>
16298         * decl.c (grokvardecl): Avoid ANSI style initialization.
16300 Sun Dec 22 04:22:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
16302         * pt.c (tsubst): Tweak arg types for a FUNCTION_TYPE.
16304 Fri Dec 20 17:09:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
16306         * pt.c (instantiate_class_template): Call grok_{ctor,op}_properties.
16308 Fri Dec 20 12:17:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16310         * g++spec.c (lang_specific_driver): Put missing hyphen in front of
16311         arguments we compare against.  Start the count of I at 1, not 0,
16312         since argv[0] is still the command.
16314 Thu Dec 19 11:53:57 1996  Stan Shebs  <shebs@andros.cygnus.com>
16316         * lang-specs.h: Accept .cp as an C++ extension.
16318 Mon Dec 16 22:43:31 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16320         * cp-tree.h (ptr_reasonably_similar): Add decl.
16322 Thu Dec 12 15:00:35 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16324         * decl.c (grokvardecl): Change SPECBITS parm to be the SPECBITS_IN
16325         pointer.  New local SPECBITS with the parm's value.
16326         (grokdeclarator): Pass &specbits down.
16328         * parse.y (expr_no_commas): Make sure $$ is not an error_mark_node
16329         before we try to do C_SET_EXP_ORIGINAL_CODE on it.
16331         * search.c (envelope_add_decl): Check that the CLASSTYPE_CID of
16332         CONTEXT is not 0 before we try to use TYPE_DERIVES_FROM.
16334         * decl.c (cplus_expand_expr_stmt): Only expand the expr if EXP is
16335         not an error_mark_node.
16337 Sat Dec  7 17:20:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16339         * cp-tree.h (TYPE_MAIN_DECL): Use TYPE_STUB_DECL.
16340         * *.c: Use TYPE_MAIN_DECL instead of TYPE_NAME where appropriate.
16342 Fri Dec  6 14:40:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16344         * decl.c (grokdeclarator): When giving an anonymous struct a name,
16345         replace TYPE_NAME instead of TYPE_IDENTIFIER (so TYPE_STUB_DECL is
16346         not affected).
16348         * typeck2.c (build_m_component_ref): If component is a pointer
16349         to data member, resolve the OFFSET_REF now.
16351         * call.c (convert_like): Don't go into infinite recursion.
16353         * pt.c (coerce_template_parms): Use tsubst_expr for non-type args.
16355         * class.c (finish_struct_1): Set DECL_ARTIFICIAL on the vptr.
16356         * tree.c (layout_basetypes): And on the vbase ptr.
16358 Thu Dec  5 02:11:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
16360         * decl.c (BOOL_TYPE_SIZE): Define in terms of POINTER_SIZE or
16361         CHAR_TYPE_SIZE so bool is always the same size as another type.
16363         * decl.c (pushtag): Set DECL_IGNORED_P for DWARF, too.
16365 Tue Dec  3 23:18:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
16367         * decl2.c (grok_x_components): Remove synthesized methods from
16368         TYPE_METHODS of an anonymous union, complain about member
16369         functions.
16370         * decl.c (shadow_tag): Wipe out memory of synthesized methods in
16371         anonymous unions.
16372         (finish_function): Just clear the DECL_RTL of our arguments.
16374 Fri Nov 29 21:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
16376         * decl2.c (finish_file): Emit DWARF debugging info for static data
16377         members.
16379         * pt.c (tsubst): If t is a stub decl, return the stub decl for type.
16381 Wed Nov 27 14:47:15 1996  Bob Manson  <manson@charmed.cygnus.com>
16383         * typeck.c (build_component_ref): Don't die if COMPONENT isn't a
16384         IDENTIFIER_NODE.
16386 Wed Nov 27 16:05:19 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
16388         * Make-lang.in (g++-cross$(exeext)): Fix typo.
16390 Wed Nov 27 08:14:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16392         Make the g++ driver now be a standalone program, rather than one
16393         that tries to run the gcc driver after munging up the options.
16394         * Make-lang.in (g++.c, g++spec.o): New rules.
16395         (g++.o): New rule, based on gcc.o with -DLANG_SPECIFIC_DRIVER
16396         added.
16397         (g++$(exeext)): New rule, based on xgcc rule.
16398         (g++-cross$(exeext)): Now just copies g++$(exeext) over.
16399         * g++spec.c: New file.
16400         * g++.c: Removed file.
16402 Tue Nov 26 19:01:09 1996  Mike Stump  <mrs@cygnus.com>
16404         * cvt.c (build_up_reference): Arrange for any temporary values
16405         that have been keep in registers until now to be put into memory.
16407 Mon Nov 25 15:16:41 1996  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16409         * Make-lang.in (c++.stage[1234]): Depend upon stage[1-4]-start, so
16410         that make -j3 bootstrap works better.
16412 Sun Nov 24 02:09:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
16414         * decl.c (pushtag): Do pushdecl for anon tags.
16416 Thu Nov 21 16:30:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
16418         * typeck.c (c_expand_return): Fix logic.
16419         (unary_complex_lvalue): Avoid unused warning on address of INIT_EXPR.
16421 Wed Nov 20 18:47:31 1996  Bob Manson  <manson@charmed.cygnus.com>
16423         * g++.c (main): Make sure arglist has a final NULL entry.  Add
16424         PEXECUTE_LAST to the flags passed to pexecute, as otherwise
16425         stdin/stdout of the invoked program are redirected to
16426         nowheresville.
16428 Tue Nov 19 16:12:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
16430         * decl.c (implicitly_declare): Set DECL_ARTIFICIAL.
16432 Tue Nov 19 15:48:19 1996  Mike Stump  <mrs@cygnus.com>
16434         * init.c (resolve_offset_ref): Handle obj.vfn better.
16435         * typeck.c (build_component_ref): Set TREE_TYPE on result from
16436         build_vfn_ref.
16438 Tue Nov 19 13:14:33 1996  Mike Stump  <mrs@cygnus.com>
16440         * typeck.c (convert_for_assignment): Also handle anachronistic
16441         implicit conversions from (::*)() to cv void*.
16442         * cvt.c (cp_convert_to_pointer): Likewise.
16444 Mon Nov 18 17:05:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
16446         * lex.c (handle_cp_pragma): Fix bogus warning.
16448 Mon Nov 18 16:10:43 1996  Mike Stump  <mrs@cygnus.com>
16450         * cvt.c (cp_convert_to_pointer): Avoid thinking a POINTER_TYPE
16451         (METHOD_TYPE) is a TYPE_PTRMEMFUNC_P.
16453 Thu Nov 14 23:18:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
16455         * class.c (finish_struct_1): Support DWARF2_DEBUG.
16456         * search.c (dfs_debug_mark): Likewise.
16457         * decl2.c (finish_vtable_vardecl): Likewise.
16458         * decl.c (pushtag, finish_enum): Likewise.
16459         * lex.c (check_newline): Use debug_* instead of calling *out
16460         functions directly.
16462 Thu Nov 14 15:21:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16464         * Make-lang.in (cplib2.ready): Add else clause to avoid problems
16465         on some picky hosts.
16467 Wed Nov 13 12:32:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
16469         * class.c (finish_struct_1): A class has a non-trivial copy
16470         constructor if it has virtual functions.
16472         * cvt.c (cp_convert): Always call a constructor.
16474         * call.c (reference_binding): Still tack on a REF_BIND
16475         for bad conversions.
16476         (build_user_type_conversion_1): Propagate ICS_BAD_FLAG.
16478         * typeck.c (convert_arguments): Pass LOOKUP_ONLYCONVERTING.
16479         (c_expand_return): Likewise.
16480         * typeck2.c (digest_init): Likewise for { }.
16481         * init.c (expand_aggr_init_1): Keep the CONSTRUCTOR handling.
16482         * cvt.c (cp_convert): Handle failure better.
16484 Wed Nov 13 11:51:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16486         * g++.c (main): Also set PEXECUTE_SEARCH, to make the invocation
16487         of GCC be path-relative.
16489 Wed Nov 13 11:27:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
16491         * Make-lang.in (g++-cross): G++-cross doesn't need version.o, but
16492         it does need choose-temp.o and pexecute.o.
16494 Wed Nov 13 07:53:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16496         * g++.c (error) [!HAVE_VPRINTF]: Put error back for the only time
16497         that we still use it.
16498         (P_tmpdir, R_OK, W_OK, X_OK) [__MSDOS__]: Delete unnecessary macros.
16500 Wed Nov 13 02:00:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
16502         * init.c (expand_default_init): Avoid calling constructors to
16503         initialize reference temps.
16505         * cvt.c (convert_to_reference): Fix.
16507 Tue Nov 12 19:10:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
16509         * cvt.c (cp_convert): Simplify for flag_ansi_overloading.
16510         (convert_to_reference): Likewise.
16511         * typeck.c (convert_for_initialization): Likewise.
16512         * init.c (expand_default_init): Likewise.
16513         (expand_aggr_init_1): Likewise.
16514         * cp-tree.h (CONV_NONCONVERTING): Lose.
16515         * typeck.c (build_c_cast): Lose allow_nonconverting parm.
16516         * *.c: Adjust.
16517         * call.c (build_user_type_conversion_1): Assume LOOKUP_ONLYCONVERTING.
16519 Tue Nov 12 16:29:04 1996  Brendan Kehoe  <brendan@canuck.cygnus.com>
16521         * pt.c (tsubst_expr): Reverse args to expand_start_catch_block.
16523 Tue Nov 12 15:26:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
16525         * init.c (expand_aggr_init_1): Don't crash on non-constructor
16526         TARGET_EXPR.
16528 Tue Nov 12 14:00:50 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16530         * g++.c: Include gansidecl.h.
16531         (VPROTO, PVPROTO, VA_START): Delete.
16532         (choose_temp_base_try, choose_temp_base, perror_exec,
16533         run_dos) [__MSDOS__]: Delete fns.
16534         (pfatal_with_name): Delete fn.
16535         (temp_filename): Declare like in gcc.c.
16536         (pexecute, pwait, choose_temp_base): Declare from gcc.c.
16537         (error_count, signal_count): Define.
16538         (error): Delete both definitions.
16539         (PEXECUTE_{FIRST,LAST,SEARCH,VERBOSE}): Define from gcc.c.
16540         (pfatal_pexecute): Add fn from gcc.c.
16541         (main): Rename local VERBOSE var to VERBOSE_FLAG.  Rewrite the
16542         code to use the pexecute stuff also used by gcc.c.
16543         (MIN_FATAL_STATUS): Define.
16544         * Make-lang.in (g++): Add dependency on and linking with
16545         choose-temp.o and pexecute.o.
16547         * cp-tree.h: Include gansidecl.h.
16548         (STDIO_PROTO): Delete #undef/#define.
16549         * cvt.c (NULL): Delete #undef/#define.
16550         * expr.c (NULL): Likewise.
16551         * init.c (NULL): Likewise.
16552         * rtti.c (NULL): Likewise.
16553         * xref.c (NULL): Likewise.
16555         * cp-tree.h (build_user_type_conversion): Add prototype.
16556         * call.c (build_user_type_conversion): Delete prototype.  Correct
16557         decl of FLAGS arg to be an int.
16558         * cvt.c (build_user_type_conversion): Likewise.
16560 Tue Nov 12 12:16:20 1996  Jason Merrill  <jason@yorick.cygnus.com>
16562         * cp-tree.def: Add TRY_BLOCK and HANDLER.
16563         * except.c (expand_start_catch_block): Support templates.
16564         * parse.y (try_block, handler_seq): Likewise.
16565         * pt.c (tsubst_expr): Support TRY_BLOCK and HANDLER.
16567 Mon Nov 11 13:57:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
16569         * pt.c (current_template_args): New fn.
16570         (push_template_decl): Use it.
16571         * decl.c (grokdeclarator): Use it.
16573         * decl2.c (build_expr_from_tree): Dereference ref vars.
16575         * decl.c (grokdeclarator): Generalize handling of TYPENAME_TYPEs in
16576         the decl-specifier-seq.
16578         * decl.c (grok_op_properties): Don't force the type of a conversion
16579         op to be complete.  Don't warn about converting to the same type
16580         for template instantiations.
16582         * decl2.c (finish_file): Don't call instantiate_decl on synthesized
16583         methods.
16585 Mon Nov 11 13:20:34 1996  Bob Manson  <manson@charmed.cygnus.com>
16587         * typeck.c (get_delta_difference): Remove previous bogusness.
16588         Don't give errors if force is set.
16590 Fri Nov  8 17:38:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
16592         * decl2.c (finish_file): Don't emit debug info.
16593         * decl.c (pushdecl): Lose obsolete code.
16594         (grokdeclarator): Still do the long long thing after complaining.
16595         * search.c (note_debug_info_needed): Don't do anything if we're in a
16596         template.
16597         * method.c (synthesize_method): For non-local classes,
16598         push_to_top_level first.
16600 Fri Nov  8 11:52:28 1996  Bob Manson  <manson@charmed.cygnus.com>
16602         * typeck.c (get_delta_difference): Add no_error parameter.
16603         (build_ptrmemfunc): Call get_delta_difference with no_error set;
16604         we don't want error messages when converting unrelated
16605         pointer-to-member functions.
16607 Thu Nov  7 11:16:24 1996  Mike Stump  <mrs@cygnus.com>
16609         * error.c (dump_expr): Improve the wording on error messages that
16610         involve pointer to member functions.
16612 Tue Nov  5 17:12:05 1996  Mike Stump  <mrs@cygnus.com>
16614         * cvt.c (cp_convert_to_pointer): Move code for conversions from
16615         (::*)() to void* or (*)() up a bit, so that we can convert from
16616         METHOD_TYPEs as well.
16618 Tue Nov  5 14:54:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
16620         * rtti.c (get_tinfo_fn): Make sure 'type' is permanent.
16621         There are no 'member' types.
16622         (get_tinfo_fn_dynamic): Diagnose typeid of overloaded fn.
16623         (build_x_typeid): Handle errors.
16625 Mon Nov  4 17:43:12 1996  Mike Stump  <mrs@cygnus.com>
16627         * typeck.c (convert_for_assignment): Handle anachronistic implicit
16628         conversions from (::*)() to void* or (*)().
16629         * cvt.c (cp_convert_to_pointer): Likewise.
16630         (cp_convert_to_pointer_force): Remove cp_convert_to_pointer
16631         conversions from here.
16632         * decl2.c (lang_decode_option): Add -W{no-,}pmf-conversions.
16633         * lang-options.h: Likewise.
16634         * decl2.c (warn_pmf2ptr): Define.
16635         * cp-tree.h: Declare it.
16636         * typeck2.c (digest_init): Allow pmfs down into
16637         convert_for_initialization.
16639 Sun Nov  3 09:43:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
16641         * typeck.c (c_expand_return): Fix for returning overloaded fn.
16643 Fri Nov  1 08:53:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
16645         * cp-tree.h (DIRECT_BIND): Change from INDIRECT_BIND.
16646         * decl.c (grok_reference_init): Pass DIRECT_BIND.
16647         * cvt.c (build_up_reference): Don't mark 'this' addressable.  Use
16648         DIRECT_BIND.
16649         * call.c (convert_like): Don't pass INDIRECT_BIND.
16650         * typeck.c (convert_arguments): Likewise.
16651         * typeck.c (mark_addressable): Allow &this if flag_this_is_variable.
16653 Thu Oct 31 17:08:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
16655         * typeck.c (mark_addressable): Support TARGET_EXPR, unify with
16656         similar code in build_up_ref.
16657         * cvt.c (build_up_reference): Drastically simplify.
16659 Mon Oct 28 12:45:05 1996  Jeffrey A Law  <law@cygnus.com>
16661         * typeck.c (signed_or_unsigned_type): If the given type already
16662         as the correct signedness, then just return it.
16664         * typeck.c ({un,}signed_type): If can't do anything, call
16665         signed_or_unsigned_type.
16667 Thu Oct 24 14:21:59 1996  Bob Manson  <manson@charmed.cygnus.com>
16669         * decl2.c (copy_assignment_arg_p): Don't buy the farm if
16670         current_class_type is NULL.
16672 Wed Oct 23 00:43:10 1996  Jason Merrill  <jason@gerbil.cygnus.com>
16674         * class.c (finish_struct_1): Avoid empty structs by adding a field
16675         so layout_type gets the mode right.
16677         * typeck.c (c_expand_return): Drastically simplify.
16679 Mon Oct 21 22:34:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
16681         * typeck.c (decay_conversion): Handle overloaded methods.
16683 Fri Oct 18 16:03:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
16685         * call.c (build_over_call): A TARGET_EXPR has side-effects.
16687 Thu Oct 17 11:31:59 1996  Mike Stump  <mrs@cygnus.com>
16689         * cvt.c (convert_to_pointer_force): Add code to support pointer to
16690         member function to pointer to function conversions.
16691         * init.c (resolve_offset_ref): Add code to allow faked up objects,
16692         ignoring them if they are not used, and giving an error, if they
16693         are needed.
16694         * typeck.c (get_member_function_from_ptrfunc): Fold e1 to improve
16695         code, and so that we can give an error, if we needed an object,
16696         and one was not provided.
16697         (build_c_cast): Don't call default_conversion when we want to
16698         convert to pointer to function from a METHOD_TYPE.
16700 Mon Oct 14 00:28:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
16702         * Make-lang.in (cplib2.ready): Fix logic.
16704         * decl.c (shadow_tag): Only complain about non-artificial function
16705         members.
16707         * class.c (finish_struct_1): Add synthesized methods to TYPE_METHODS.
16709 Fri Oct 11 16:12:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
16711         * expr.c (cplus_expand_expr): Pre-tweak call_target like
16712         expand_inline_function would.
16714         * pt.c (mark_decl_instantiated): If extern_p, call
16715         mark_inline_for_output.
16717 Thu Oct 10 15:58:08 1996  Mike Stump  <mrs@cygnus.com>
16719         * typeck.c (unary_complex_lvalue): Add code to handle intermediate
16720         pmd conversions.
16722         * typeck.c (get_delta_difference): Fix wording, as we can be used
16723         for pointer to data members.
16725 Tue Oct  8 12:43:51 1996  Bob Manson  <manson@charmed.cygnus.com>
16727         * pt.c (tsubst): If the function decl isn't a member of this
16728         template, return a copy of the decl (including copying the
16729         lang-specific part) so we don't hose ourselves later.
16731 Thu Oct  3 16:24:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
16733         * class.c (finish_struct): Remove DWARF-specific tag handling.
16734         * decl.c (pushtag): Likewise.
16735         (finish_function): Always clear DECL_ARGUMENTS on function decls with
16736         no saved RTX.
16737         * decl2.c (finish_file): Emit DWARF debugging info for static data
16738         members.
16740 Wed Oct  2 21:58:01 1996  Bob Manson  <manson@charmed.cygnus.com>
16742         * decl.c (duplicate_decls): Make sure the old DECL_LANG_SPECIFIC
16743         isn't the same as the new one before we whack it.
16745 Mon Sep 30 13:38:24 1996  Jason Merrill  <jason@yorick.cygnus.com>
16747         * class.c, cp-tree.h, cvt.c, decl.c, decl2.c, gxx.gperf, hash.h,
16748         lex.c, method.c, parse.y, typeck.c, typeck2.c: Remove
16749         warn_traditional and warn_strict_prototypes; remove ancient
16750         'overload' code; remove references to flag_traditional.
16752 Mon Sep 30 12:58:40 1996  Mike Stump  <mrs@cygnus.com>
16754         * input.c (sub_getch): Handle 8-bit characters in string literals.
16756 Sun Sep 29 03:12:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
16758         * tree.c (mapcar): Handle CONSTRUCTORs.
16759         (copy_to_permanent): Handle expression_obstack properly.
16761         * Make-lang.in (cplib2.txt): Also depend on the headers.
16763         * rtti.c (get_tinfo_var): Don't assume that POINTER_SIZE ==
16764         INT_TYPE_SIZE.
16765         (expand_class_desc): Use USItype for offset field.
16766         * tinfo.h (struct __class_type_info): Likewise.
16768         * method.c (build_overload_int): TYPE_PRECISION should be applied
16769         to types.
16771 Sat Sep 28 14:44:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
16773         * call.c (build_new_op): A COND_EXPR involving void must be a
16774         builtin.
16776 Fri Sep 27 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
16778         * typeck.c (build_x_component_ref): New fn.
16779         (build_object_ref): Use it.
16780         * parse.y (primary): Use it.
16781         * decl2.c (build_expr_from_tree): Use it.
16782         * cp-tree.h: Declare it.
16784         * decl.c (start_decl): Variable-sized arrays cannot be initialized.
16785         * error.c (dump_type_suffix): Handle variable arrays.
16787 Fri Sep 27 13:14:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16789         * Make-lang.in (exception.o): Put back compiling it with -fPIC.
16791 Fri Sep 27 03:00:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
16793         * decl.c (lookup_name_real): Don't try to look up anything in a
16794         TYPENAME_TYPE.
16796         * tinfo2.cc (__throw_type_match_rtti): Oops.
16798 Thu Sep 26 22:11:05 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16800         * Make-lang.in (exception.o): Use -fno-PIC for now.
16802 Thu Sep 26 10:59:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
16804         * rtti.c (build_dynamic_cast): Pass tinfo fns rather than
16805         calling them.
16806         (get_tinfo_fn_dynamic): Extracted from build_typeid.
16807         * tinfo2.cc (__dynamic_cast): Adjust.
16809         * rtti.c (build_typeid): Use resolves_to_fixed_type_p.
16810         (build_x_typeid): Likewise.
16812         * parse.y: Call build_x_typeid instead of build_typeid.
16813         * cp-tree.def: Add TYPEID_EXPR.
16814         * pt.c (tsubst_copy): Handle typeid.
16815         * decl2.c (build_expr_from_tree): Likewise.
16816         * rtti.c (build_x_typeid): Throw bad_typeid from here.
16817         (build_typeid): Not here.
16818         * cp-tree.h: Declare build_x_typeid.
16820 Wed Sep 25 17:26:16 1996  Jason Merrill  <jason@yorick.cygnus.com>
16822         * call.c (convert_like): Pull out constant values.
16824         * tree.c (mapcar): Use build_cplus_array_type, not build_array_type.
16826 Wed Sep 25 17:28:53 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
16828         * decl.c (init_decl_processing): Create short int types before
16829         creating size_t in case a machine description needs to use
16830         unsigned short for size_t.
16832 Tue Sep 24 18:18:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
16834         * Make-lang.in (exception.o): Turn off pic.
16836         * tinfo2.cc (__throw_type_match_rtti): Fix cv-variants of the same
16837         type, multi-level ptr conversions.
16839         * rtti.c (call_void_fn): Renamed and genericized from throw_bad_cast.
16840         (throw_bad_cast): Use it.
16841         (throw_bad_typeid): New fn.
16842         (build_typeid): Throw bad_typeid as needed.
16843         Use build_call.
16844         (synthesize_tinfo_fn): Handle functions and arrays before checking
16845         for cv-quals.
16847         * Remove .h from standard C++ headers, add new.h, move into inc
16848         subdirectory.
16850         * exception*: Remove pointer from object, constructors.  Add
16851         default exception::what that uses type_info::name.  Add
16852         __throw_bad_typeid.
16854         * init.c (build_new): Don't add a cookie to new (void *) T[2].
16856 Mon Sep 23 15:21:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
16858         * Make-lang.in: Building C++ code depends on cc1plus.
16860 Mon Sep 23 12:38:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16862         * decl.c (struct saved_scope): Declare PROCESSING_TEMPLATE_DECL as
16863         a HOST_WIDE_INT, not a tree.
16865 Mon Sep 23 12:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
16867         * exception.cc: Don't include <stdlib.h>.
16869         * Make-lang.in (c++.clean): Remove cplib2.*.
16871 Mon Sep 23 09:42:19 1996  Doug Evans  <dje@canuck.cygnus.com>
16873         * parse.y (component_decl_1, component_costructor_declarator case):
16874         Pass attributes/prefix_attributes in tree list.
16876 Mon Sep 23 01:18:50 1996  Jason Merrill  <jason@yorick.cygnus.com>
16878         * tinfo{,2}.cc: #include <stddef.h> instead of <stdlib.h>.
16880 Sun Sep 22 05:31:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
16882         * lex.c (do_identifier): Don't do deferred lookup in a template
16883         header.
16885         * typeck2.c (store_init_value): Oops.
16887         * new.{h,cc}, exception.{h,cc}, typeinfo.h, tinfo{2.cc,.cc,.h}:
16888         New files for C++ lang-support library.
16889         * Make-lang.in (CXX_EXTRA_HEADERS): Define.
16890         (CXX_LIB2FUNCS): Define.
16891         And rules for building the C++ lang-support code.
16892         * config-lang.in (headers): Define.
16893         (lib2funcs): Define.
16895 Sat Sep 21 19:17:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
16897         * decl2.c (build_expr_from_tree): If CONSTRUCTOR has a type, call
16898         digest_init.
16899         * pt.c (tsubst_copy): Compute type for CONSTRUCTOR.
16900         * typeck2.c (store_init_value): Check for initializing pmf with { }
16901         here.
16902         (process_init_constructor): Not here.
16904 Thu Sep 19 16:41:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
16906         * pt.c (begin_template_parm_list): Increment
16907         processing_template_decl here.
16908         (end_template_parm_list): Not here.
16909         (process_template_parm): No need to add 1 to it now.
16910         * *.c: Use processing_template_decl instead of current_template_parms
16911         to check for being in a template.
16913         * pt.c (uses_template_parms): Handle SCOPE_REF.  Fix CONSTRUCTOR.
16914         (tsubst_copy): Handle CONSTRUCTOR.
16915         (instantiate_decl): Set up context properly for variables.
16916         * decl2.c (build_expr_from_tree): Handle CONSTRUCTOR.
16917         * class.c (finish_struct): Reverse CLASSTYPE_TAGS.
16919 Wed Sep 18 13:30:20 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16921         * lex.c (enum tree_node_kind) [GATHER_STATISTICS]: Put the enum back.
16923 Wed Sep 18 04:24:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
16925         * method.c (make_thunk): Call comdat_linkage before setting the
16926         TREE_CODE.
16928         * decl2.c (comdat_linkage): Use make_decl_one_only.
16929         (import_export_decl): Likewise.
16930         * decl.c (init_decl_processing): Check supports_one_only instead of
16931         SUPPORTS_WEAK.
16933 Sat Sep 14 08:34:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
16935         * decl2.c (grokfield): Tighten checking for access decls.
16937         * decl.c (make_typename_type): Resolve references to
16938         current_class_type.  Set CLASSTYPE_GOT_SEMICOLON.
16939         (lookup_name_real): Types that depend on a template parameter get
16940         an implicit 'typename' unless they're in the current scope.
16941         (start_decl_1): We don't care about incomplete types that depend
16942         on a template parm.
16943         (grokdeclarator): Resolve 'typename's in the type specifier that
16944         refer to members of the current scope.
16946         * call.c (build_over_call): Remove 'inline called before
16947         definition' diagnostic.
16948         (build_method_call): Likewise.
16949         * decl.c (duplicate_decls): Downgrade 'used before declared
16950         inline' to a warning, only with -Winline.
16952 Fri Sep 13 17:31:40 1996  Stan Shebs  <shebs@andros.cygnus.com>
16954         * mpw-make.sed: Fix include paths, add @DASH_C_FLAG@ to compile.
16956 Wed Sep 11 22:38:13 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
16958         * call.c (build_method_call): When calling a signature
16959         default implementation, as in other cases, let instance_ptr simply
16960         be instance.
16962 Wed Sep 11 22:14:44 1996  Mike Stump  <mrs@cygnus.com>
16964         * parse.y (simple_stmt): Cleanup and use do_poplevel ().
16966 Wed Sep 11 22:10:48 1996  Mike Stump  <mrs@cygnus.com>
16968         * except.c (expand_start_catch_block): Add a pushlevel so that -g
16969         works on hppa and SPARC.
16971 Wed Sep 11 10:18:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
16973         * typeck.c (build_indirect_ref): Catch PTR being an error_mark_node.
16975 Mon Sep  9 19:51:14 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
16977         * call.c (build_over_call): Check first whether DECL_CONTEXT exists
16978         before testing whether it's a signature.
16980 Sun Sep  8 16:06:57 1996  Gerald Baumgartner  <gb@cs.purdue.edu>
16982         * call.c (build_new_method_call): Don't complain about signature
16983         pointers and references not being an aggr type.
16984         (build_this): If a signature pointer or reference was passed in,
16985         just return it.
16986         (build_new_method_call): If instance is a signature pointer, set
16987         basetype to the signature type of instance.
16988         * sig.c (build_signature_method_call): Deleted basetype and
16989         instance parameters, they can be found as the DECL_CONTEXT of
16990         function and as the first argument passed in.
16991         * cp-tree.h: Changed declaration of build_signature_method_call.
16992         * call.c (build_method_call): Deleted first two arguments in call
16993         of build_signature_method_call.
16994         (build_over_call): Added call to build_signature_method_call.
16996 Thu Sep  5 16:51:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
16998         * typeck.c (build_c_cast): Don't tack a non_lvalue_expr onto a
16999         target_expr.
17001 Thu Sep  5 10:05:38 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17003         * cvt.c (convert_to_reference): Use %#T, not %#D, for error.
17005 Wed Sep  4 17:16:09 1996  Bob Manson  <manson@charmed.cygnus.com>
17007         * except.c (expand_start_try_stmts): Move to except.c in the backend.
17008         (expand_end_try_stmts): Remove.
17010         * init.c (perform_member_init): Use add_partial_entry () instead
17011         of directly manipulating lists.
17012         (emit_base_init): Likewise.
17014 Wed Sep  4 12:14:36 1996  Mike Stump  <mrs@cygnus.com>
17016         * except.c (expand_exception_blocks): Always make sure USE and
17017         CLOBBER insns that came at the end still do, the backend relies
17018         upon this.
17020 Wed Sep  4 07:44:48 1996  Jason Merrill  <jason@yorick.cygnus.com>
17022         * call.c (build_over_call): We can only use a TARGET_EXPR of the
17023         right type.
17025 Tue Sep  3 19:26:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
17027         * cvt.c (convert_to_reference): Revert last change, don't complain
17028         about temp without target decl.
17030 Tue Sep  3 10:22:56 1996  Mike Stump  <mrs@cygnus.com>
17032         * decl.c (grokdeclarator): Don't core dump when void() is given.
17034 Tue Sep  3 02:38:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
17036         * decl.c (copy_args_p): Don't crash.
17038 Fri Aug 30 14:26:57 1996  Mike Stump  <mrs@cygnus.com>
17040         * pt.c (tsubst): And support template args inside the exception
17041         specification.
17043         * pt.c (tsubst): Add support for exception specifications in
17044         template functions.
17046 Fri Aug 30 10:01:55 1996  Mike Stump  <mrs@cygnus.com>
17048         * cp-tree.def (DECL_STMT): Eliminate the throw spec field, only 3
17049         fields now.
17050         * cp-tree.h (start_decl): Eliminate the throw spec parameter.
17051         (start_function): Likewise.
17052         (start_method): Likewise.
17053         (grokfield): Likewise.
17054         (make_call_declarator): Add throw spec parameter.
17055         (set_quals_and_spec): Add routine.
17056         * lex.c (set_quals_and_spec): Likewise.
17057         * decl.h (grokdeclarator): Eliminate the throw spec parameter.
17058         * decl.c (shadow_tag): Eliminate the throw spec parameter to
17059         grokdeclarator.
17060         (groktypename): Likewise.
17061         (start_decl): Eliminate the throw spec parameter.  Eliminate the
17062         throw spec parameter to grokdeclarator.  Eliminate the throw spec
17063         field in DECL_STMT.
17064         (cp_finish_decl): Eliminate the throw spec field in DECL_STMT.
17065         (grokfndecl): Remove useless set of raises.
17066         (grokdeclarator): Eliminate the throw spec parameter.  Eliminate
17067         the throw spec parameter to start_decl.  Pull the throw spec out
17068         of the call declarator.
17069         (grokparms): Eliminate the throw spec parameter to grokdeclarator.
17070         (start_function): Eliminate the throw spec parameter.  Eliminate
17071         the throw spec parameter to grokdeclarator.
17072         (start_method): Likewise.
17073         * decl2.c (grokfield): Likewise.
17074         (grokbitfield): Eliminate the throw spec parameter to grokdeclarator.
17075         (grokoptypename): Likewise.
17076         (finish_file): Eliminate the throw spec parameter to
17077         start_function.  Add throw spec to make_call_declarator.
17078         * except.c (init_exception_processing): Add throw spec to
17079         make_call_declarator.  Eliminate the throw spec parameter to
17080         start_decl.
17081         (expand_start_catch_block): Eliminate the throw spec parameter to
17082         grokdeclarator.
17083         (expand_builtin_throw): Add throw spec to make_call_declarator.
17084         Eliminate the throw spec parameter to start_function.
17085         (start_anon_func): Likewise.
17086         * lex.c (make_call_declarator): Add throw spec parameter.
17087         (set_quals_and_spec): New routine.
17088         (cons_up_default_function): Add throw spec to make_call_declarator.
17089         Eliminate the throw spec parameter to grokfield.
17090         * method.c (synthesize_method): Eliminate the throw spec parameter
17091         to start_function.
17092         * pt.c (process_template_parm): Eliminate the throw spec parameter
17093         to grokdeclarator.
17094         (tsubst): Add throw spec to make_call_declarator.
17095         (tsubst_expr): Eliminate the throw spec parameter to start_decl.
17096         (do_function_instantiation): Eliminate the throw spec parameter to
17097         grokdeclarator.  Eliminate the throw spec parameter to
17098         start_function.
17099         * rtti.c (synthesize_tinfo_fn): Eliminate the throw spec parameter
17100         to start_function.
17101         * parse.y (datadef): Remove non-winning optimization.
17102         (decl): Likewise.
17103         (fndef): Remove ambiguous error productions uncovered by grammar
17104         fixing.
17105         (constructor_declarator): Add exception_specification_opt here.
17106         (component_constructor_declarator): Likewise.
17107         (direct_after_type_declarator): Likewise.
17108         (complex_direct_notype_declarator): Likewise.
17109         (direct_abstract_declarator): Likewise.
17110         (fn.def1): Remove exception_specification_opt.
17111         (fn.def2): Likewise.
17112         (condition): Likewise.
17113         (initdcl0): Likewise.
17114         (initdcl): Likewise.
17115         (notype_initdcl0): Likewise.
17116         (nomods_initdcl0): Likewise.
17117         (component_decl_1): Likewise.
17118         (component_declarator): Likewise.
17119         (after_type_component_declarator0): Likewise.
17120         (after_type_component_declarator): Likewise.
17121         (notype_component_declarator): Likewise.
17123 Wed Aug 28 01:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17125         * call.c (build_over_call): Also use an INIT_EXPR when
17126         initializing anything from an rvalue.
17128         * call.c (build_over_call): Call stabilize_reference when building
17129         an INIT_EXPR instead of calling the copy ctor.
17131         * call.c (joust): Extend the previous change to all comparisons.
17133         * decl2.c, method.c, lex.c: Use MAKE_DECL_ONE_ONLY and
17134         NO_LINKAGE_HEURISTICS.
17136         * decl2.c (finish_file): Emit any statics that weren't already.
17138         * typeck.c (build_static_cast): Implement.
17139         * tree.c (build_cplus_new): Handle getting a TARGET_EXPR.
17140         * decl.c (grokparms): Use can_convert_arg instead of
17141         implicit_conversion directly.
17142         (copy_args_p): New fn.
17143         * cvt.c (convert_to_reference): Don't complain about temp with
17144         static_cast.
17145         (build_up_reference): Handle TARGET_EXPRs.
17146         * call.c (build_over_call): Elide unnecessary temps.
17147         (can_convert*): Use new overloading code.
17149 Tue Aug 27 13:12:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
17151         * call.c: Move TYPE_PTR*_MACROS ...
17152         * cp-tree.h: To here.
17153         * typeck.c (build_reinterpret_cast): Implement.
17155         * call.c (add_builtin_candidate): Use TYPE_PTROB_P instead of
17156         ptr_complete_ob.
17157         (joust): If we're comparing a function to a builtin and the worst
17158         conversion for the builtin is worse than the worst conversion for the
17159         function, take the function.
17161         * typeck.c (build_const_cast): Implement.
17162         (comp_ptr_ttypes_const): Like comp_ptr_ttypes, for const_cast.
17163         (comp_ptr_ttypes_reinterpret): Like cpt, for reinterpret_cast.
17165 Tue Aug 27 13:14:58 1996  Bob Manson  <manson@charmed.cygnus.com>
17167         * rtti.c (build_dynamic_cast): Don't try to dereference exprtype
17168         too early.  Make sure we explode if exprtype turns out to be a
17169         NULL_TREE when it shouldn't be.
17171 Tue Aug 27 10:56:21 1996  Mike Stump  <mrs@cygnus.com>
17173         * cp-tree.h: New routine make_call_declarator.
17174         * lex.c (make_call_declarator): Define it.
17175         * except.c (init_exception_processing): Use it.
17176         (expand_builtin_throw): Likewise.
17177         (start_anon_func): Likewise.
17178         * decl2.c (finish_file): Likewise.
17179         * lex.c (cons_up_default_function): Likewise.
17180         * parse.y: Likewise.
17181         * pt.c (tsubst): Likewise.
17183 Mon Aug 26 17:40:03 1996  Mike Stump  <mrs@cygnus.com>
17185         * decl2.c (groktypefield): Remove unused code.
17187 Mon Aug 26 17:00:33 1996  Mike Stump  <mrs@cygnus.com>
17189         * gxx.gperf: Change TYPE_QUAL into CV_QUALIFIER.
17190         * parse.y: Likewise.  Change maybe_type_qual into maybe_cv_qualifier.
17191         Change type_quals into cv_qualifiers.  Change nonempty_type_quals into
17192         nonempty_cv_qualifiers.
17193         * hash.h: Rebuild.
17195         * lex.c (make_pointer_declarator): Change type_quals into
17196         cv_qualifiers.
17197         (make_reference_declarator): Likewise.
17199 Thu Aug 22 01:09:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17201         * decl.c (start_function): Only check interface_* for templates
17202         with flag_alt_external_templates.
17204         * call.c (build_new_op): Check for comparison of different enum types.
17205         (build_over_call): Fix arg # output.
17207         * typeck.c (build_component_ref): Handle pre-found TYPE_DECL.
17209 Wed Aug 21 00:13:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
17211         * call.c (build_new_op): Check for erroneous args.
17213         * call.c (build_new_method_call): Add missing args to cp_error.
17215         * tree.c (error_type): Don't print reference-to-array.
17217         * typeck.c (convert_for_assignment): Don't say contravariance for
17218         removing const.
17220 Tue Aug 20 13:23:00 1996  Jason Merrill  <jason@yorick.cygnus.com>
17222         * call.c (build_over_call): Diagnose bad convs for `this'.
17224         * lex.c (cons_up_default_function): Set DECL_ARTIFICIAL
17225         on _ctor_arg.
17227         * call.c (convert_like): Handle bad convs.
17228         (build_over_call): Handle bad convs better.
17230         * decl2.c: -fansi-overloading is now the default.
17232         * call.c (build_new_method_call): Check for erroneous args.
17234         * pt.c (instantiate_class_template): Propagate
17235         TYPE_USES_MULTIPLE_INHERITANCE.
17237 Tue Aug 20 13:09:57 1996  Mike Stump  <mrs@cygnus.com>
17239         * call.c (enforce_access): Add static to routine.
17241 Sun Aug 18 14:35:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17243         * call.c (build_user_type_conversion_1): Fix bad handling.
17244         (compare_ics): Likewise.
17246 Sat Aug 17 21:54:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
17248         * call.c (standard_conversion): Oops.
17250 Sat Aug 17 16:28:11 1996  Geoffrey Noer  <noer@cygnus.com>
17252         * g++.c: Update test for win32 (&& ! cygwin32).
17254 Sat Aug 17 03:45:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
17256         * typeck.c (comp_ptr_ttypes_real): Handle OFFSET_TYPEs properly.
17257         (ptr_reasonably_similar): New fn.
17258         * call.c (BAD_RANK): New rank.
17259         (ICS_BAD_FLAG): New macro.
17260         (standard_conversion): Handle almost-right pointer conversions.
17261         (reference_binding): Handle bad rvalue bindings.
17262         (add_*_candidate): Stuff.
17263         (build_over_call): Pass bad conversions to convert_for_initialization.
17264         (compare_ics): Handle bad convs.
17265         (joust): Likewise.
17267 Fri Aug 16 15:02:19 1996  Bob Manson  <manson@charmed.cygnus.com>
17269         * init.c (expand_vec_init): Use ptrdiff_type_node instead of
17270         integer_type_node when computing pointer offsets.
17272 Fri Aug 16 01:28:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
17274         * tree.c (lvalue_type): New fn.
17275         (error_type): New fn.
17276         * call.c (op_error): Use error_type.
17277         (add_conv_candidate): Use lvalue_type.
17278         (add_builtin_candidates): Likewise.
17279         * error.c (args_as_string): Use error_type.
17281 Thu Aug 15 17:27:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
17283         * pt.c (instantiate_decl): Evaluate DECL_INITIAL of a VAR_DECL here.
17284         (tsubst): Not here.
17286         * decl.c (init_decl_processing): With -ansi, __null's type is the
17287         signed integral type with the same number of bits as a pointer.
17288         Introduce a new variable null_node for it.
17289         * cp-tree.h: Adjust.
17290         * call.c (null_ptr_cst_p): Adjust.
17292 Thu Aug 15 17:09:54 1996  Mike Stump  <mrs@cygnus.com>
17294         * except.c (do_unwind): Mark %i7 as used on the SPARC so we can
17295         optimize.
17297 Thu Aug 15 01:36:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
17299         * decl2.c (import_export_decl): Ignore #pragma interface for tinfo
17300         fns of classes without virtual functions.
17302         * call.c (add_function_candidate): Handle `this' specially.
17303         (compare_ics): Likewise.
17305 Tue Aug 13 12:16:10 1996  Jason Merrill  <jason@yorick.cygnus.com>
17307         * typeck.c (build_conditional_expr): Fix handling of __null.
17309         * decl2.c (comdat_linkage): New fn.
17310         (import_export_vtable): Use it.
17311         (import_export_decl): Use it.
17312         * method.c (make_thunk): Use it.
17314 Mon Aug 12 00:09:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
17316         * pt.c (end_template_decl): If we don't actually have parms, return.
17317         * parse.y (template_header): Accept 'template <>'.
17319         * errfn.c: Allow 5 args.
17321 Sun Aug 11 15:20:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
17323         * tree.c (make_temp_vec): New fn.
17324         * pt.c (push_template_decl): Handle partial specs.
17325         (instantiate_class_template): Likewise.
17326         (more_specialized): Use get_bindings.
17327         (more_specialized_class): New fn.
17328         (get_class_bindings): New fn.
17329         (most_specialized_class): New fn.
17330         (do_function_instantiation): List candidates for ambiguous case.
17331         * decl.c (duplicate_decls): Lose reference to DECL_TEMPLATE_MEMBERS.
17332         (shadow_tag): Call push_template_decl for partial specializations.
17333         * parse.y: Likewise.
17334         * cp-tree.h (DECL_TEMPLATE_SPECIALIZATIONS): Replaces
17335         DECL_TEMPLATE_MEMBERS.
17336         * call.c (print_z_candidates): Reduce duplication.
17338 Fri Aug  9 14:36:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
17340         * decl2.c (lang_decode_option): Allow -fansi-overloading.
17342 Thu Aug  8 17:04:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
17344         * pt.c (get_bindings): New fn.
17345         (most_specialized): Likewise.
17346         (do_function_instantiation): Use them.
17347         (add_maybe_template): New fn.
17348         * cp-tree.h (DECL_MAYBE_TEMPLATE): New macro.
17349         * call.c (build_new_op): Handle guiding decls.
17350         (build_new_function_call): Likewise.
17351         * decl2.c (finish_file): Likewise.
17353         * decl2.c (mark_used): Do synthesis here.
17354         * call.c (build_method_call): Not here.
17355         (build_over_call): Or here.
17356         * typeck.c (build_function_call_real): Or here.
17357         * tree.c (bot_manip): Call mark_used on functions used in default
17358         args.
17360 Thu Aug  8 17:48:16 1996  Michael Meissner  <meissner@tiktok.cygnus.com>
17362         * decl2.c (import_export_vtable): Delete code that disabled vtable
17363         heuristic on systems with ASM_OUTPUT_EXTERNAL.
17365 Wed Aug  7 12:44:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
17367         * typeck.c (build_x_function_call): Handle static call context
17368         better.
17370         * decl.c (finish_function): Set the DECL_CONTEXT of the result to
17371         the function, not its outer block.
17373         * call.c (build_field_call): Pass fields on to build_opfncall
17374         regardless of TYPE_OVERLOADS_CALL_EXPR.
17375         (build_method_call): Pass on to build_new_method_call sooner.
17377         * typeck.c (build_ptrmemfunc): Just return what instantiate_type
17378         gives us.
17379         * class.c (instantiate_type): Don't put a POINTER_TYPE to
17380         METHOD_TYPE on an expression.  Also make a copy of rhs instead of
17381         modifying it.
17383 Tue Aug  6 12:58:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
17385         * call.c (compare_ics): Handle qual_conv after lvalue_conv.
17386         (add_builtin_candidate): Don't take enums for ++.
17387         (build_new_method_call): Handle non-aggregates and field calls.
17388         Move new overloading code from...
17389         * cvt.c: Here.
17391         * decl.c (grokparms): Don't check default args in templates.
17393 Mon Aug  5 17:17:06 1996  Jason Merrill  <jason@yorick.cygnus.com>
17395         * cvt.c (build_new_op): Fix args to build_unary_op.
17396         (add_builtin_candidates): Don't call type_promotes_to on float.
17398         * decl.c (grokparms): Check the type of the default arg.
17400         * cvt.c (build_new_op): Pass non-overloaded cases on rather than
17401         returning NULL_TREE.
17403         * typeck.c (build_x_binary_op): Avoid doing extra work.
17404         (build_x_unary_op): Likewise.
17405         (build_x_conditional_expr): Likewise.
17406         * cvt.c (build_over_call): Return.
17407         (add_builtin_candidate): Fix MEMBER_REF.
17408         (build_new_op): Likewise.
17410 Mon Aug  5 17:07:47 1996  Mike Stump  <mrs@cygnus.com>
17412         * method.c (build_overload_name): Put bug fix into code but leave
17413         disabled for now so we can be bug compatible with older releases
17414         that do repeats incorrectly.  In the future, we can enable it.
17416 Mon Aug  5 13:46:28 1996  Jason Merrill  <jason@yorick.cygnus.com>
17418         * cvt.c (convert_like): Don't call build_cplus_new twice.
17420         * call.c, cp-tree.h, cvt.c, decl2.c, init.c, method.c, pt.c, typeck.c:
17421         Control new overloading code with -fansi-overloading.
17423 Sun Aug  4 15:29:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
17425         * cvt.c (build_over_call): Call build_cplus_new.
17426         * call.c (build_method_call): Likewise.
17427         * typeck.c (build_function_call_real): Likewise.
17428         (build_conditional_expr): If both operands are TARGET_EXPRs, wrap
17429         the COND_EXPR in a TARGET_EXPR so they use the same slot.
17431         * cvt.c (build_up_reference): Propagate INDIRECT_BIND to
17432         recursive calls.
17433         * typeck.c (complete_type): Propagate
17434         TYPE_NEEDS_{CONSTRUCTING,DESTRUCTOR}.
17436 Sat Aug  3 14:05:07 1996  Jason Merrill  <jason@yorick.cygnus.com>
17438         * cvt.c (joust): More ?: kludging.  Sigh.
17439         (build_over_call): Don't try to synthesize global fns.
17441         * search.c (lookup_conversions): Use binfo marking.
17443 Sat Aug  3 12:33:42 1996  Bob Manson  <manson@charmed.cygnus.com>
17445         * search.c (build_mi_matrix): Use the correct value of cid
17446         when determining the new mi_size.
17448 Sat Aug  3 01:27:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
17450         * cvt.c (add_builtin_candidates): Do consider type conversion ops
17451         for the first parms of += et al.
17452         (strip_top_quals): New fn.
17453         (reference_binding): Use it instead of TYPE_MAIN_VARIANT.
17454         (implicit_conversion): Likewise.
17455         (add_builtin_candidates): Be careful about arrays.
17456         (build_new_method_call): Handle vtable optimization.
17458 Fri Aug  2 01:26:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
17460         * cp-tree.h (LOOKUP_NO_TEMP_BIND): New flag.
17461         * cvt.c (reference_binding): Use it.
17462         (implicit_conversion): Use it.
17463         (add_builtin_candidate, COND_EXPR): Use it.
17465         * cvt.c (build_new_function_call): Check for error args.
17467         * typeck.c (comptypes): Just check DERIVED_FROM_P, not UNIQUELY.
17469         * gxx.gperf: Add __null.
17470         * hash.h: Regenerate.
17471         * lex.h: Add RID_NULL.
17472         * lex.c (init_lex): Create null_pointer_node here, stick it in
17473         RID_NULL.
17474         * decl.c (init_decl_processing): Still set its type here.
17475         * cvt.c (cp_convert_to_pointer): Don't produce null_pointer_node.
17476         (convert_to_pointer_force): Likewise.
17477         (null_ptr_cst_p): Check for null_pointer_node; only accept (void*)0
17478         if (! pedantic).
17479         * call.c (convert_harshness): Use null_ptr_cst_p.
17480         * typeck.c (convert_for_assignment): Likewise.  Don't produce
17481         null_pointer_node.
17483         * error.c (args_as_string): Handle lists of actual args, too.
17484         * cvt.c (null_ptr_cst): Support (void*)0 for now.
17485         (build_user_type_conversion_1): Improve diagnostics.
17486         (build_new_function_call): Likewise.
17487         (build_object_call): Likewise.
17488         (build_new_method_call): Likewise.  Move call before def diagnostic...
17489         (build_over_call): Here.
17491         * cvt.c (build_new_method_call): Don't complain about no match if
17492         LOOKUP_SPECULATIVELY.
17493         (build_over_call): Fix 'this' for virtual fn.
17494         (build_new_method_call): Add diagnostic.
17496 Thu Aug  1 16:45:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
17498         * cvt.c (add_function_candidate): Expect 'this' and 'in_chrg' for
17499         constructors to be passed in.
17500         (build_over_call): Likewise.
17501         (build_user_type_conversion_1): Pass them in.
17502         (convert_like): Likewise.
17503         (build_object_call): Handle overloaded conversions.
17504         (build_over_call): Pass the right args to build_vfn_ref.
17505         (standard_conversion): Fix pmf convs.
17506         (joust): Handle comparing statics and non-statics.
17507         (build_new_method_call): New fn.
17508         * call.c (build_method_call): Call it if NEW_OVER.
17510 Thu Aug  1 16:06:14 1996  Mike Stump  <mrs@cygnus.com>
17512         * lex.c (do_identifier): Don't use %O on IDENTIFIER_OPNAME_Ps, use
17513         %D instead.
17515 Thu Aug  1 15:24:02 1996  Mike Stump  <mrs@cygnus.com>
17517         * except.c (expand_throw): Use maybe_build_cleanup_and_delete
17518         instead of just maybe_build_cleanup so that we deallocate the
17519         thrown object.
17521 Thu Aug  1 15:18:00 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17523         * decl2.c (finish_prevtable_vardecl): Make non-static for pt.c's use.
17524         * cp-tree.h (finish_prevtable_vardecl): Add decl.
17526 Thu Aug  1 11:53:51 1996  Bob Manson  <manson@charmed.cygnus.com>
17528         * pt.c (instantiate_class_template): Call complete_type.  Also, if
17529         we're at the end of the file and we just instantiated a template
17530         class with a vtable, call finish_prevtable_vardecl.
17532         * error.c (dump_decl): Don't explode (or explode more gracefully
17533         as appropriate) if the object being dumped has a null type.
17534         (dump_expr): Likewise.
17536         * search.c (build_mi_matrix): Ensure that mi_size is large enough,
17537         by counting the number of nodes that we'll need before allocating
17538         the array.
17539         (lookup_fnfields): Fix comment.
17540         (breadth_first_search): Fix comment.
17542 Wed Jul 31 09:57:05 1996  Jason Merrill  <jason@yorick.cygnus.com>
17544         * pt.c (instantiate_class_template): Propagate TYPE_PACKED and
17545         TYPE_ALIGN.
17546         * class.c (finish_struct): Call cplus_decl_attributes here.
17547         (finish_struct_1): Not here.
17548         * cp-tree.h: Adjust.
17550         * pt.c (type_unification): New parameter STRICT.
17551         (unify): If STRICT, don't allow cv addition or base deduction.
17552         * call.c, class.c, cvt.c, cp-tree.h: Adjust.
17554 Tue Jul 30 13:06:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
17556         * search.c (get_template_base{_recursive}): New fns.
17557         * pt.c (more_specialized): New fn.
17558         (do_function_instantiation): Use it.
17559         (unify): Handle base deduction.
17560         * cvt.c (joust): Use more_specialized.
17561         Don't arbitrarily choose between non-builtin candidates.
17562         (build_over_call): Call require_complete_type.
17564         * decl.c (start_function): Statics are static even in a #pragma
17565         interface file.
17567         * decl2.c (import_export_vtable): Disable vtable heuristic on
17568         systems with ASM_OUTPUT_EXTERNAL.
17570         * cvt.c (compare_ics): Fix comparison of PMEM_CONV and BASE_CONV.
17571         (standard_conversion): No std conv to enum type.
17573         * cvt.c (standard_conversion): Fix order of args to DERIVED_FROM_P
17574         for ptm's.
17576         * cvt.c (reference_binding): Bind directly to a base subobject of
17577         a class rvalue.
17579         * cvt.c (build_new_op): Enforce access control.
17581 Tue Jul 30 09:22:53 1996  Bob Manson  <manson@charmed.cygnus.com>
17583         * typeck2.c (process_init_constructor): When scanning the
17584         union for a named field, skip things that aren't FIELD_DECLs.
17586         * method.c (synthesize_method): Don't scan fndecl's rtl if
17587         we're at the end of the file; just assume the function can't
17588         be inlined.
17590 Mon Jul 29 15:48:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17592         * cvt.c (build_builtin_candidate): Stick a dummy conversion in if
17593         it failed.
17595         * cvt.c (build_user_type_conversion_1): Handle overloaded
17596         conversion ops.
17598         * cvt.c (add_builtin_candidates): Don't consider type conversion
17599         operators for the first parameter of operator=.
17601 Mon Jul 29 15:33:55 1996  Bob Manson  <manson@charmed.cygnus.com>
17603         * typeck.c (complete_type): Only call layout_type if we're not
17604         expanding a template.
17606 Mon Jul 29 14:40:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
17608         * cvt.c (compare_ics): Oops.
17610         * cvt.c (op_error): Oops.
17612         * cp-tree.def: Add RVALUE_CONV, rename EXACT_CONV to IDENTITY_CONV.
17613         * cvt.c: Add IDENTITY_RANK before others.  Use real_lvalue_p.
17614         (build_conv): Use them.
17615         (implicit_conversion): Use them.
17616         (convert_like): Handle them.
17617         (build_new_op): Handle builtin COND_EXPR again.
17618         (add_builtin_candidates): Strip cv-quals.  Fix oops.  Include enums
17619         in lists of types for COND_EXPR.
17620         (add_builtin_candidate): Add enum candidates for COND_EXPR.
17622 Mon Jul 29 12:05:40 1996  Bob Manson  <manson@charmed.cygnus.com>
17624         * typeck.c (build_modify_expr): Always attempt to build a call to
17625         the assignment operator, even if we're using a default one.
17626         (convert_for_initialization): Call complete_type.
17628 Mon Jul 29 11:25:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
17630         * cvt.c (reference_binding): A REF_BIND gets the reference type.
17631         (implicit_conversion): Likewise.
17632         (convert_like): Likewise.
17633         (compare_ics): Likewise.
17634         (compare_qual): Likewise.
17635         (print_z_candidates): Handle no candidates.
17636         (build_new_op): Don't handle builtin COND_EXPR for now.
17638 Sat Jul 27 11:27:47 1996  Stan Shebs  <shebs@andros.cygnus.com>
17640         * cvt.c (build_builtin_candidate): Init local var in an ANSI way.
17642 Fri Jul 26 01:07:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
17644         * cvt.c (joust): If the candidates are the same, arbitrarily pick one.
17646         * cvt.c (build_builtin_candidate): Oops.
17647         (build_new_op): Oops.
17649         * method.c (build_opfncall): Pass COND_EXPR on.
17650         * cvt.c (build_builtin_candidate): Reorganize, support COND_EXPR.
17651         (add_builtin_candidate{,s}): Likewise.
17652         (add_builtin_candidates): Likewise.
17653         (print_z_candidates, op_error, build_new_op): Likewise.
17654         (type_decays_to): New fn.
17655         * lex.c (init_lex): Just say ?: for COND_EXPR.
17657 Thu Jul 25 09:33:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
17659         * typeck.c (complete_type): Call layout_type rather than building
17660         a new array type.
17662         * cvt.c (add_builtin_candidate): Pointer arithmetic candidates
17663         only use ptrdiff_t.
17665 Wed Jul 24 12:45:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
17667         * cvt.c: Always compile the new overloading code (but don't use it).
17668         (implicit_conversion): Add a BASE_CONV when converting to
17669         the same class type.
17670         (convert_like): Handle BASE_CONV.
17672 Tue Jul 23 12:46:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17674         * cvt.c (build_new_op): Support {MAX,MIN}_EXPR.
17675         (add_builtin_candidate): Likewise.
17677         NEW_OVER changes:
17678         * typeck.c (build_x_function_call): Try an operator function
17679         whenever we call an object of class type.
17680         * method.c (build_opfncall): Pass CALL_EXPRs through.
17681         * cvt.c (implicit_conversion): Do const-ref case first.
17682         (add_conv_candidate, build_object_call, op_error): New fns.
17683         (ptr_complete_ob, TYPE_PTROB_P): void is not an object type.
17684         ({add,build}_builtin_candidate{,s}, print_z_candidates): Display
17685         builtin candidates.
17686         (build_new_op): Handle CALL_EXPR.  Don't try to decay void.
17687         Fall back on preincrement handling.  Use op_error.
17688         Handle warn_synth.
17689         (convert_like): Pass INDIRECT_BIND.  Don't try to do anything with
17690         an error_mark_node.
17691         (build_over_call): Handle PROMOTE_PROTOTYPES and ellipsis promotions
17692         properly.
17694 Mon Jul 22 16:21:55 1996  Bob Manson  <manson@charmed.cygnus.com>
17696         * pt.c (tsubst_expr): Handle CONTINUE_STMT.
17698 Mon Jul 22 15:38:58 1996  Mike Stump  <mrs@cygnus.com>
17700         * typeck.c (build_component_ref_1): Use build_component_ref
17701         instead of open coding it here.
17703 Mon Jul 22 12:18:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
17705         * g++.c (main): Don't link with -lg++.
17707         NEW_OVER changes:
17708         * cvt.c (convert_to_reference): Don't use convert_from_reference on
17709         result of build_type_conversion.
17710         (cp_convert): Only call build_method_call for ctors if
17711         build_type_conversion failed.
17712         (ptr_complete_ob): New function.
17713         (TYPE_PTR{,OB,MEM}_P): New macros.
17714         ({add,build}_builtin_candidate{,s}): New functions.
17715         (print_z_candidates): Handle builtins.
17716         (build_user_type_conversion_1): Don't use conversion fns for
17717         converting to a base type.
17718         (build_user_type_conversion_1): Set ICS_USER_FLAG on AMBIG_CONVs.
17719         (build_user_type_conversion): Use convert_from_reference.
17720         (build_new_op): New function.
17721         (build_over_call): Fix handling of methods.
17722         (compare_ics): Handle AMBIG_CONV properly.
17723         * typeck2.c: Increment abort count.
17724         * method.c (build_opfncall): Forward most requests to build_new_op.
17725         * cp-tree.h (IS_OVERLOAD_TYPE): Tweak.
17727 Fri Jul 19 17:59:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17729         * error.c (dump_expr, case CONSTRUCTOR, case CAST_EXPR): Take out
17730         invalid second argument to dump_expr_list.
17732 Fri Jul 19 14:04:05 1996  Mike Stump  <mrs@cygnus.com>
17734         * decl.c (lookup_name_real): Make sure we do obj->X::i correctly.
17736 Thu Jul 18 14:48:23 1996  Bob Manson  <manson@charmed.cygnus.com>
17738         * decl2.c (import_export_vtable): ASM_OUTPUT_EXTERNAL, not
17739         ASSEMBLE_EXTERNAL.
17741 Mon Jul 15 17:48:43 1996  Mike Stump  <mrs@cygnus.com>
17743         * typeck2.c (process_init_constructor): New pedwarn for using { }
17744         to initialize a pointer to member function.
17745         * typeck.c (build_ptrmemfunc1): Avoid use of digest_init so that
17746         we can avoid the new error.
17748 Mon Jul 15 15:42:03 1996  Mike Stump  <mrs@cygnus.com>
17750         * typeck.c (build_ptrmemfunc1): New function to hide details of
17751         pointer to member functions better.
17753 Mon Jul 15 14:23:02 1996  Mike Stump  <mrs@cygnus.com>
17755         * init.c (resolve_offset_ref): Resolve OFFSET_REFs that are
17756         methods into the actual method, as we know the implied object is
17757         not used.
17759 Mon Jul 15 13:08:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17761         * parse.y (maybecomma_warn): Only emit the pedwarn if we're not
17762         inside a system header.
17764 Fri Jul 12 16:30:05 1996  Bob Manson  <manson@charmed.cygnus.com>
17766         * call.c (build_method_call): Call complete_type on the
17767         instance type.
17769 Thu Jul 11 17:16:40 1996  Mike Stump  <mrs@cygnus.com>
17771         * typeck.c (build_component_ref): Always build up an OFFSET_REF
17772         for obj_ptr->func so that we can know which object to use in a
17773         method call.
17775 Wed Jul 10 19:36:37 1996  Mike Stump  <mrs@cygnus.com>
17777         * typeck.c (build_ptrmemfunc): Remove sorry, now we can cast
17778         around things.  Also improve maintainability.
17780 Wed Jul 10 18:20:11 1996  Bob Manson  <manson@charmed.cygnus.com>
17782         * decl.c (grokdeclarator): Check for overflow when evaluating an
17783         array dimension.
17785 Wed Jul 10 17:26:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
17787         * cvt.c (cp_convert): Don't check for ambiguity with constructor
17788         if NEW_OVER.
17790         * typeck.c (build_x_function_call): Pass function overload
17791         questions to new overloading code if NEW_OVER.
17792         * init.c (expand_aggr_init_1): Only check for type conversion ops
17793         if we're doing copy-initialization (i.e. LOOKUP_ONLYCONVERTING).
17794         Don't check for ambiguity with constructor if NEW_OVER.
17795         * cvt.c (convert_to_reference): Dereference the result of a type
17796         conversion operator.
17797         (build_conv): Propagate ICS_USER_FLAG.
17798         (implicit_conversion): Call instantiate_type.
17799         Pass LOOKUP_ONLYCONVERTING instead of LOOKUP_NORMAL.
17800         (add_function_candidate): Fix cv-quals on argtype.
17801         (print_z_candidates): New function.
17802         (build_new_function_call): Call it.
17803         (build_user_type_conversion_1): If LOOKUP_ONLYCONVERTING, don't
17804         consider non-converting constructors.
17805         Call print_z_candidates.
17806         Return an AMBIG_CONV for an ambiguous conversion.
17807         (build_user_type_conversion): Handle AMBIG_CONV.
17808         (convert_like): Fix test for building TARGET_EXPR.
17809         Call instantiate_type.
17810         Handle AMBIG_CONV and LVALUE_CONV.
17811         (build_over_call): Handle 0 args and ellipsis.
17812         * cp-tree.def: Add AMBIG_CONV.
17814 Tue Jul  9 17:48:48 1996  Mike Stump  <mrs@cygnus.com>
17816         * decl.c (lookup_name_real): If we find mem in obj when parsing
17817         `obj->mem', make sure we return the right value.
17819 Tue Jul  9 16:11:28 1996  Bob Manson  <manson@charmed.cygnus.com>
17821         * search.c (get_base_distance): Call complete_type.
17823 Tue Jul  9 12:46:34 1996  Mike Stump  <mrs@cygnus.com>
17825         * decl.c (store_bindings): Make static.
17827 Mon Jul  8 16:42:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
17829         * init.c (expand_aggr_init_1): Don't check type conversions if
17830         NEW_OVER.
17832         * cvt.c (z_candidate): Put back template field.
17833         (add_function_candidate): Set it.
17834         (add_template_candidate): Likewise.
17835         (joust): Use it.
17836         (compare_qual): Handle references and pointers to members.
17837         (compare_ics): Handle reference bindings.
17839         * decl.c (duplicate_decls): Propagate DECL_ONE_ONLY.
17841 Mon Jul  8 16:18:56 1996  Bob Manson  <manson@charmed.cygnus.com>
17843         * call.c (compute_conversion_costs): Call complete_type.
17845         * tree.c (vec_binfo_member): Use comptypes instead of comparing
17846         pointers, so we can handle template parameters.
17848 Fri Jul  5 16:51:53 1996  Bob Manson  <manson@charmed.cygnus.com>
17850         * cvt.c (cp_convert_to_pointer): We have to call complete_type
17851         here; let's make it explicit instead of a side effect of an
17852         error check.
17854 Wed Jul  3 16:29:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
17856         * cvt.c (z_candidate): Remove template field.
17857         (reference_binding): Handle binding to temporary.
17858         (implicit_conversion): Likewise.
17859         (add_function_candidate): Handle artificial constructor parms.
17860         Handle functions with too few parms.
17861         (add_template_candidate): New function.
17862         (build_user_type_conversion_1): Handle constructors.
17863         (convert_like): Likewise.
17864         (build_over_call): Likewise.
17865         (build_new_function_call): Support templates.
17866         (compare_ics): Fix reference, inheritance handling.
17868 Mon Jul  1 22:58:18 1996  Bob Manson  <manson@charmed.cygnus.com>
17870         * decl.c: Add signed_size_zero_node.
17871         (init_decl_processing): Build it.
17872         * class.c (prepare_fresh_vtable): Use it instead of size_zero_node
17873         when we're trying to make a negative delta.
17875 Mon Jul  1 17:56:19 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17877         Stop doing this damn index==strchr variable name confusion.
17878         * class.c (add_virtual_function): Change local var INDEX to be
17879         named IDX.
17880         (add_method): Likewise.
17881         * lex.c (print_parse_statistics): Likewise.
17882         * search.c (make_memoized_table_entry): Likewise.
17883         (lookup_fnfields_here): Likewise.
17884         (lookup_field): Likewise.
17885         (lookup_fnfields): Likewise.
17886         (get_baselinks): Likewise.
17887         * sig.c (build_signature_table_constructor): Likewise.
17888         (build_signature_method_call): Likewise.
17889         * typeck.c (build_x_array_ref): Change INDEX parm to be named IDX.
17890         (get_member_function_from_ptrfunc): Likewise.
17891         (build_ptrmemfunc): Change local var INDEX to be IDX.
17892         (c_expand_start_case): Likewise.
17894 Sat Jun 29 14:05:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
17896         * cvt.c (cp_convert_to_pointer): Move user-defined type conversion
17897         handling to before extraction of TYPE_PTRMEMFUNC_FN_TYPE.
17898         (convert_to_reference): Use build_type_conversion to convert to
17899         the reference type directly.
17900         (standard_conversion): Fix void* case, non-conversions.
17901         (reference_binding): Fix expr == 0 case, non-conversions.
17902         (convert_like): Support REF_BIND.
17903         (compare_qual): Split out from compare_ics.
17904         (compare_ics): Use it, handle icses with only a qual_conv.
17906         * init.c (expand_vec_init): Don't crash if decl is NULL.
17908 Fri Jun 28 11:52:51 1996  Stan Shebs  <shebs@andros.cygnus.com>
17910         * mpw-config.in: New file, configury for Mac MPW.
17911         * mpw-make.sed: New file, makefile editing for MPW.
17913 Thu Jun 27 15:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
17915         * pt.c (instantiate_class_template): Call repo_template_used.
17917         * search.c (lookup_conversions): Only lookup conversions in
17918         complete types.
17920 Thu Jun 27 12:59:53 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17922         * cp-tree.def: Renamed from tree.def, to avoid confusion with
17923         gcc's tree.def.
17924         * cp-tree.h, lex.c: Include cp-tree.def.
17925         * Makefile.in (CXX_TREE_H): Reference cp-tree.def.
17927 Wed Jun 26 18:29:47 1996  Bob Manson  <manson@charmed.cygnus.com>
17929         * init.c (build_vec_delete_1): Call complete_type.
17931 Mon Jun 24 17:17:32 1996  Mike Stump  <mrs@cygnus.com>
17933         * except.c (start_anon_func): Make sure anonymous functions are
17934         never external.
17936 Fri Jun 21 15:10:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
17938         * decl.c (finish_function): If function_depth > 1, set nested.
17940         * decl2.c (grokbitfield): Revert Bob's change.
17941         * class.c (finish_struct_1): Fix handling of named bitfield widths.
17943 Thu Jun 20 23:35:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
17945         * pt.c (add_pending_template): Handle types.
17946         (lookup_template_class): With -fexternal-templates, just add the class
17947         to pending_templates instead of instantiating it now.
17948         * decl2.c (finish_file): Handle types in pending_templates.
17950 Thu Jun 20 14:08:40 1996  Bob Manson  <manson@charmed.cygnus.com>
17952         * decl2.c (grokbitfield): Handle constant decls appropriately.
17953         Give an appropriate error message now instead of spewing core
17954         later.
17956 Thu Jun 20 13:01:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
17958         * decl2.c: Don't turn on thunks by default for now.
17960 Wed Jun 19 11:37:04 1996  Jason Merrill  <jason@yorick.cygnus.com>
17962         * typeck.c (complete_type): Handle error_mark_node.
17963         (common_type, OFFSET_TYPE): Handle template_type_parms.
17965 Tue Jun 18 10:02:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
17967         * pt.c (instantiate_decl): If at_eof, call import_export_decl
17968         regardless of DECL_INLINE.
17970         * typeck.c (mark_addressable): Set TREE_ADDRESSABLE on CONSTRUCTORs.
17972         * class.c (finish_struct_bits): Copy TYPE_SIZE.
17974         * rtti.c (build_dynamic_cast): Support templates.
17975         * tree.def: Support DYNAMIC_CAST_EXPR.
17976         * pt.c (tsubst_copy): Likewise.
17977         * decl2.c (build_expr_from_tree): Likewise.
17979 Mon Jun 17 15:23:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17981         * typeck.c (build_static_cast): Support templates.
17982         (build_const_cast): Likewise.
17983         * tree.def: Support CONST/STATIC_CAST_EXPR.
17984         * pt.c (tsubst_copy): Likewise.
17985         * decl2.c (build_expr_from_tree): Likewise.
17987 Sun Jun 16 12:33:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
17989         * decl2.c (finish_vtable_vardecl): Don't trust
17990         TREE_SYMBOL_REFERENCED for vtables of local classes.
17992 Fri Jun 14 18:13:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
17994         * pt.c (tsubst_copy): Handle operator T.
17996 Wed Jun 12 17:52:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
17998         * init.c (build_delete): Move creation of PARMS inside test of
17999         TYPE_HAS_DESTRUCTOR, since it's never used outside of that block.
18001 Tue Jun 11 15:09:18 1996  Bob Manson  <manson@charmed.cygnus.com>
18003         * typeck.c (build_conditional_expr): Don't assume that
18004         the arguments to ?: are always pointers or records.
18006 Tue Jun 11 13:56:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
18008         * decl2.c (import_export_decl): Still emit static/weak/comdat
18009         copies of inline template functions with -fno-implicit-templates.
18011 Tue Jun 11 11:42:13 1996  Bob Manson  <manson@charmed.cygnus.com>
18013         * init.c (build_delete): Determine the complete basetype
18014         path to the destructor we're calling.
18016 Fri Jun  7 15:30:10 1996  Bob Manson  <manson@charmed.cygnus.com>
18018         * decl.c (build_enumerator): Always copy the INTEGER_CST used to
18019         initialize the enum, because we really and truly don't know where
18020         it came from.
18021         (start_enum): Don't copy integer_zero_node because
18022         build_enumerator will do it.
18024 Fri Jun  7 11:11:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18026         * decl.c (finish_function): Do access control on base destructors.
18028         * pt.c (tsubst, case FUNCTION_DECL): Set up
18029         IDENTIFIER_GLOBAL_VALUE for member functions so pushdecl doesn't
18030         hose us.
18032 Fri Jun  7 10:37:33 1996  Mike Stump  <mrs@cygnus.com>
18034         * cvt.c (build_up_reference): If we have already extended the
18035         lifetime of the temporary, don't try it again.
18036         * typeck.c (c_expand_return): Don't try and convert the return
18037         value twice when we want a reference, once is enough.
18039 Tue Jun  4 15:41:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
18041         * pt.c (tsubst_expr, case DECL_STMT): Don't pass
18042         LOOKUP_ONLYCONVERTING at all for now.
18044         * search.c (add_conversions): Put the conversion function in
18045         TREE_VALUE, the basetype in TREE_PURPOSE.
18046         * cvt.c (build_type_conversion): Adjust.
18047         * cvt.c (build_expr_type_conversion): Adjust.
18048         * call.c (user_harshness): Adjust.
18050 Mon Jun  3 15:30:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
18052         * method.c (emit_thunk): Pretend this is a FUNCTION_DECL for the
18053         backend's benefit.
18055 Mon Jun 10 18:58:19 1996  Mike Stump  <mrs@cygnus.com>
18057         * except.c (expand_start_catch_block): Add a dummy region, if we
18058         get an error, so that we can avoid core dumping later.
18060 Fri May 31 14:56:13 1996  Mike Stump  <mrs@cygnus.com>
18062         * cp-tree.h (OFFSET_REF): Remove.
18063         * tree.def (CP_OFFSET_REF): Rename to OFFSET_REF.
18064         * expr.c (cplus_expand_expr): Cleanup callers of expand_expr.
18065         * init.c (expand_aggr_init_1): Likewise.
18066         (build_new): Likewise.
18067         * typeck.c (expand_target_expr): Likewise.
18069 Fri May 31 14:22:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
18071         * typeck.c (build_modify_expr): Don't use TREE_VALUE on a
18072         TARGET_EXPR.
18074 Wed May 29 17:04:33 1996  Mike Stump  <mrs@cygnus.com>
18076         * cvt.c (build_up_reference): Redo how and when temporaries are
18077         created.
18078         * decl.c (grok_reference_init): Don't try and be smart about
18079         running cleanups.
18081 Wed May 29 16:02:08 1996  Mike Stump  <mrs@cygnus.com>
18083         * cvt.c (build_up_reference): Add NULL_TREE to all calls to build
18084         (TARGET_EXPR...), now that it has 4 arguments.
18085         * tree.c (build_cplus_new): Likewise.
18087 Thu May 23 16:40:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
18089         * error.c (dump_expr, case CAST_EXPR): Handle T() properly.
18091         * pt.c (instantiate_decl): Don't call push/pop_cp_function_context.
18092         * decl.c (struct saved_scope): Remove named_labels,
18093         {base,member}_init_list.
18094         (maybe_push_to_top_level): Don't set them.  Call
18095         push_cp_function_context if appropriate.
18096         (pop_from_top_level): Likewise.
18098         * method.c (do_build_assign_ref): Remove obsolete check of
18099         TYPE_HAS_ASSIGN_REF (basetype).
18101         * decl.c (grokfndecl): Diagnose user definition of
18102         implicitly-declared methods.
18104 Thu May 23 12:13:08 1996  Bob Manson  <manson@charmed.cygnus.com>
18106         * method.c (do_build_copy_constructor): Add code to give
18107         meaningful error messages instead of crashing.
18108         (do_build_assign_ref): Don't synthesize assignment operators for
18109         classes containing reference or const members.
18111         * class.c (struct base_info): Remove cant_synth_copy_ctor
18112         and cant_synth_asn_ref.
18113         (finish_base_struct): Remove the code that tries to conditionalize
18114         synthesis of copy constructors & assignment operators based on
18115         access permissions.  Instead, let it fail when it tries to
18116         synthesize the copy constructor.  This will give meaningful error
18117         messages instead of silently generating code to perform a bitcopy.
18119 Wed May 22 11:45:19 1996  Bob Manson  <manson@charmed.cygnus.com>
18121         * lex.c (real_yylex): Remove old-n-crufty #if 0 code for
18122         determining types for constant values.
18124         * decl.c (struct named_label_list): Use instead of stuffing
18125         random items into a TREE_LIST node.
18126         (named_label_uses): Use the new struct.
18127         (poplevel): Likewise.
18128         (lookup_label): Likewise.
18129         (define_label): Add an error message to tell the user the line
18130         where the goto is located in addition to the destination of the
18131         goto.
18132         (init_decl_processing): Use NULL instead of NULL_TREE to initialize
18133         named_label_uses.
18134         (finish_function): Likewise.
18136         (start_decl): Complain about defining a static data member
18137         in a different type from which it was declared.
18139 Wed May 22 09:33:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
18141         * cvt.c (build_expr_type_conversion): Adjust.
18143 Tue May 21 11:21:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
18145         * call.c (build_method_call): Always convert 'this' to the
18146         appropriate type.
18148         * search.c (add_conversions): Put the conversion function in
18149         TREE_VALUE, the type in TREE_PURPOSE.
18150         * cvt.c (build_type_conversion): Adjust.
18151         * call.c (user_harshness): Adjust.
18153         * method.c (emit_thunk): Call temporary_allocation and
18154         permanent_allocation around the ASM_OUTPUT_MI_THUNK case, too.
18156         * tree.c (build_cplus_array_type): Handle tweaking of
18157         TYPE_MAIN_VARIANT here.
18158         * typeck.c (common_type): Not here.
18160         * typeck.c (complete_type): Only try to complete an array type if
18161         it has a domain.
18163 Mon May 20 14:55:59 1996  Jason Merrill  <jason@yorick.cygnus.com>
18165         * decl.c (grokvardecl): Call complete_type.
18166         (grokdeclarator): Call complete_type for PARM_DECLs.
18168 Fri May 17 16:41:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
18170         * pt.c (instantiate_class_template): Re-set
18171         CLASSTYPE_GOT_SEMICOLON after calling finish_struct_1.
18173 Fri May 17 14:56:55 1996  Mike Stump  <mrs@cygnus.com>
18175         * cp-tree.h (cp_expand_decl_cleanup): Remove, the backend is now
18176         smart enough to do it right.
18177         * tree.c (cp_expand_decl_cleanup): Likewise.
18178         * decl.c (cp_finish_decl): Use expand_decl_cleanup instead of
18179         cp_expand_decl_cleanup.
18180         (store_parm_decls): Likewise.
18181         (hack_incomplete_structures): Likewise.
18182         * except.c (push_eh_cleanup): Likewise.
18184 Fri May 17 13:13:51 1996  Mike Stump  <mrs@cygnus.com>
18186         * expr.c (expand_expr, cond UNSAVE_EXPR): Move from the C++
18187         frontend to the backend where it belongs.
18188         * tree.c (unsave_expr): Likewise.
18189         (unsave_expr_now): Likewise.
18190         * tree.def (UNSAVE_EXPR): Likewise.
18191         * cp-tree.h (unsave_expr): Likewise.
18192         (unsave_expr_now): Likewise.
18194 Fri May 17 11:02:41 1996  Mike Stump  <mrs@cygnus.com>
18196         * init.c (emit_base_init): Make sure the partial EH cleanups live
18197         on the function_obstack.
18199 Thu May 16 15:29:33 1996  Bob Manson  <manson@charmed.cygnus.com>
18201         * expr.c (do_case): Don't try to dereference null TREE_TYPEs
18202         when checking for pointer types.
18204 Thu May 16 13:38:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
18206         * pt.c (instantiate_class_template): Remove obsolete check for
18207         access declarations.
18209 Thu May 16 13:34:15 1996  Mike Stump  <mrs@cygnus.com>
18211         * call.c (build_overload_call): Simplify calls to
18212         build_overload_call by removing last parameter.
18213         (build_method_call): Likewise.
18214         * cp-tree.h: Likewise.
18215         * method.c (build_opfncall): Likewise.
18216         * typeck.c (build_x_function_call): Likewise.
18218 Thu May 16 13:15:43 1996  Mike Stump  <mrs@cygnus.com>
18220         * call.c (default_parm_conversions): Factor out common code.
18221         (build_method_call): Use it.
18222         (build_overload_call_real): Use it.
18224 Wed May 15 14:46:14 1996  Mike Stump  <mrs@cygnus.com>
18226         * call.c (build_method_call): Allow implicit & on METHOD_TYPEs,
18227         but pedwarn as the code is bogus.
18228         * typeck.c (decay_conversion): Likewise.
18229         (build_function_call_real): Use build_addr_func instead of
18230         default_conversion.  Don't allow pointer-to-method functions down
18231         here.
18232         (build_unary_op): Use real pointer-to-member functions instead of
18233         fake ones.
18234         (build_ptrmemfunc): Use build_addr_func instead of build_unary_op.
18235         (convert_for_assignment): Removed some obsolete code.
18236         * decl2.c (reparse_absdcl_as_expr): Pass current_class_ref to
18237         build_x_function_call instead of current_class_ptr.  Only call
18238         digest_init once on an initializer, we do this just checking
18239         TREE_TYPE.
18240         (build_expr_from_tree): Pass current_class_ref to
18241         build_x_function_call instead of current_class_ptr.
18242         * init.c (build_member_call): Likewise.
18243         * pase.y: Likewise.
18244         * error.c (dump_expr): Handle OFFSET_REFs better.
18245         * pt.c (unify): Handle pointer-to-member functions better.
18246         * decl.c (finish_function): Clear out current_class_ref just like
18247         we do for current_class_ptr.
18249         * typeck.c (get_delta_difference): Handle virtual bases better.
18251 Tue May 14 16:37:37 1996  Jason Merrill  <jason@yorick.cygnus.com>
18253         * sig.c (build_signature_table_constructor): Use the delta for
18254         the original basetype for this virtual function with thunks.
18255         (build_signature_method_call): We still need to adjust 'this'
18256         with thunks.
18258 Tue May 14 16:27:25 1996  Mike Stump  <mrs@cygnus.com>
18260         * call.c (build_addr_func): New routine.  Used to get the `real'
18261         address of a function or a method.  Needed to avoid getting a
18262         pointer-to-member function.
18263         (build_call): New routine to build CALL_EXPRs.
18264         (build_method_call): Use it.
18265         * cvt.c (convert_to_aggr): Likewise.
18266         * typeck.c (build_function_call_real): Likewise.
18267         * sig.c (build_signature_table_constructor): Use build_addr_func.
18268         * cp-tree.h (build_call, build_addr_func): Declare them.
18270 Tue May 14 12:47:47 1996  Mike Stump  <mrs@cygnus.com>
18272         * cp-tree.h (LOOKUP_AGGR): Remove, unused.
18273         * parse.y: Remove uses of LOOKUP_AGGR.
18275 Tue May 14 12:07:51 1996  Mike Stump  <mrs@cygnus.com>
18277         * *.[chy]: Rename current_class_decl to current_class_ptr, and
18278         C_C_D to current_class_ref.
18280 Mon May 13 16:55:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
18282         * call.c (convert_harshness): Tighten up pointer conversions.
18284 Sat May 11 04:33:50 1996  Doug Evans  <dje@canuck.cygnus.com>
18286         * decl2.c (finish_vtable_vardecl): Surround DECL_ONE_ONLY with ifdef.
18287         (finish_file): Likewise.
18289 Fri May 10 11:09:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
18291         * cvt.c (convert_fn_ptr): We don't use thunks for pmfs.
18293         * method.c (emit_thunk): Set flag_omit_frame_pointer in default
18294         code.
18296 Thu May  9 18:18:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
18298         * decl2.c: Turn on thunks by default where supported.
18300 Tue May  7 20:39:57 1996  Mike Stump  <mrs@cygnus.com>
18302         * cp-tree.h (build_overload_call_maybe): Removed.
18303         * call.c (build_overload_call_real): Invert meaning of last arg to
18304         be require_complete.
18305         (build_overload_call): Likewise.
18306         * typeck.c (build_x_function_call): Use build_overload_call_real
18307         instead of build_overload_call_maybe.
18309 Mon May  6 01:23:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
18311         * decl2.c (finish_file): Don't try to emit functions that haven't
18312         been compiled.
18314 Fri May  3 09:30:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
18316         * decl2.c (finish_vtable_vardecl): Oops.
18318         * decl.c (maybe_push_to_top_level): Do save previous_class_*.
18319         Also store the bindings from previous_class_values.
18320         (pop_from_top_level): Restore them.
18322 Thu May  2 21:56:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
18324         * decl2.c (finish_vtable_vardecl): Only write out vtable if its
18325         symbol has been referenced.
18326         (finish_file): Re-join synthesis/vtable loop with inline emission
18327         loop, disable inlining when an inline is output.
18329 Thu May  2 17:20:02 1996  Mike Stump  <mrs@cygnus.com>
18331         * except.c (init_exception_processing): Setup saved_in_catch.
18332         (push_eh_cleanup): Reset __eh_in_catch.
18333         (expand_start_catch_block): Set __eh_in_catch.
18335 Thu May  2 16:21:17 1996  Mike Stump  <mrs@cygnus.com>
18337         * except.c (push_eh_cleanup): Add tracking for whether or not we
18338         have an active exception object.
18339         (expand_builtin_throw): Use it to make sure a rethrow without an
18340         exception object is caught.
18342 Thu May  2 11:26:41 1996  Jason Merrill  <jason@yorick.cygnus.com>
18344         * decl.c (maybe_push_to_top_level): Clear out class-level bindings
18345         cache.
18347 Wed May  1 11:26:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
18349         * decl2.c (finish_file): Also use sentries for vars with
18350         DECL_ONE_ONLY or DECL_WEAK set (should any such happen to be
18351         created).
18353         * lex.c (handle_cp_pragma): Disable #pragma
18354         interface/implementation if SUPPORTS_ONE_ONLY > 1.
18356 Tue Apr 30 11:25:46 1996  Jason Merrill  <jason@yorick.cygnus.com>
18358         * method.c (emit_thunk): Wrap default case in
18359         temporary/permanent_allocation.
18361         * method.c (make_thunk): Use DECL_ONE_ONLY.
18362         (emit_thunk): Call assemble_end_function.
18364 Mon Apr 29 15:38:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
18366         * decl2.c (import_export_vtable): Use DECL_ONE_ONLY.
18367         (import_export_decl): Likewise.
18368         (finish_prevtable_vardecl): Disable vtable hack if
18369         SUPPORTS_ONE_ONLY > 1.
18371 Mon Apr 29 14:32:47 1996  Mike Stump  <mrs@cygnus.com>
18373         * typeck.c (build_modify_expr): PREINCREMENT_EXPR and
18374         PREDECREMENT_EXPRs take two arguments, not one.
18376 Mon Apr 29 00:27:53 1996  Jason Merrill  <jason@yorick.cygnus.com>
18378         * class.c (build_vtable_entry): Don't build thunks for abstract
18379         virtuals.
18381         * lex.c (real_yylex): Fix handling of __PRETTY_FUNCTION__ like C
18382         frontend.
18384 Sat Apr 27 16:45:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
18386         * class.c (set_rtti_entry): Use size_zero_node.
18387         (build_vtable): Likewise.
18389 Sat Apr 27 14:48:57 1996  Jason Merrill  <jason@phydeaux.cygnus.com>
18391         * class.c (finish_struct_1): Pass size_zero_node to set_rtti_entry.
18392         (prepare_fresh_vtable): Likewise.
18394 Fri Apr 26 13:14:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
18396         * method.c (emit_thunk): Call mark_used on the target function.
18398         * call.c (build_method_call): Don't warn about pending templates.
18400 Thu Apr 25 14:55:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
18402         * decl2.c (finish_file): Fix list walking logic.
18404         * typeck2.c (check_for_new_type): Only warn if -pedantic.
18406 Wed Apr 24 15:41:15 1996  Bob Manson  <manson@charmed.cygnus.com>
18408         * class.c (finish_struct_1): Remove old code for
18409         dont_allow_type_definitions.
18410         * cp-tree.h: Likewise.
18411         * spew.c: Make sure cp-tree.h is included before parse.h, so the
18412         definition of flagged_type_tree is found before it is used.
18413         * lex.c: Likewise.
18414         * parse.y: Added the ftype member to the type union, and changed a
18415         number of rules to use it instead of ttype.  Added calls to
18416         check_for_new_type() as appropriate.
18417         * typeck2.c (check_for_new_type): New function for checking
18418         if a newly defined type appears in the specified tree.
18419         * cp-tree.h: Add new type flagged_type_tree.  Add a prototype
18420         for check_for_new_type().
18422 Wed Apr 24 00:36:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
18424         * decl2.c (finish_file): Only use a sentry if the decl is public.
18426         * pt.c (tsubst_expr, DECL_STMT): If we don't have an initializer,
18427         don't pass LOOKUP_ONLYCONVERTING.
18429 Tue Apr 23 17:18:47 1996  Bob Manson  <manson@charmed.cygnus.com>
18431         * typeck.c (common_type): Fix the ARRAY_TYPE case so it
18432         properly keeps track of const and volatile type modifiers.
18434 Tue Apr 23 10:52:56 1996  Jason Merrill  <jason@yorick.cygnus.com>
18436         * tree.c (cp_tree_equal): C++ version of simple_cst_equal.
18437         * pt.c (comp_template_args): Use it.
18439         * rtti.c (get_tinfo_fn, build_dynamic_cast, expand_*_desc): Call
18440         assemble_external for artificial function decls.
18442         * decl.c (cp_finish_decl): Oops.
18444 Mon Apr 22 17:28:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
18446         * decl2.c (import_export_decl): Put static data member templates
18447         into common storage, or make them weak, depending on whether they
18448         are dynamically or statically initialized.
18449         (get_sentry): New function.
18450         (finish_file): Do import_export_decl for static data members before
18451         building the init/fini functions.  Don't init/fini a variable that's
18452         EXTERNAL.  Use a sentry for variables in common.  Fix mismatching
18453         push/pop_temp_slots.
18454         * decl.c (cp_finish_decl): If DECL_NOT_REALLY_EXTERN, do the
18455         expand_static_init thang.
18456         * method.c (get_id_2): New function.
18458 Mon Apr 22 15:32:45 1996  Bob Manson  <manson@charmed.cygnus.com>
18460         * parse.y (empty_parms): Make sure we use C++-style prototypes
18461         when we're declaring member functions.
18463 Sun Apr 21 10:08:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18465         * Makefile.in (CONFLICTS): 16 s/r conflicts.
18466         * parse.y (self_template_type): New nonterminal.
18468 Thu Apr 18 08:56:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
18470         * decl.c (make_typename_type): Handle getting a TYPE_DECL for a
18471         name.
18472         * parse.y (base_class.1): Allow 'typename foo::bar'.
18474         * lex.c (check_newline): Remove #pragma code that plays with the
18475         input stream, since we now deal with tokens.  Clear nextchar when
18476         we're done.
18477         (handle_cp_pragma): Use real_yylex.
18478         (handle_sysv_pragma): Don't do skipline here.  Only call real_yylex
18479         in one place.
18481         * lex.c (check_for_missing_semicolon): Handle SELFNAME.
18483         * lex.c (handle_cp_pragma): Fix "#pragma implementation".
18485 Wed Apr 17 16:51:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18487         * parse.y: New token SELFNAME for potential constructor.
18488         * spew.c (yylex): Handle it.
18489         * lex.c (identifier_type): Produce it.
18491         * parse.y (complete_type_name): In :: case, don't push class binding.
18492         (complex_type_name): Likewise.
18494 Wed Apr 17 15:02:40 1996  Mike Stump  <mrs@cygnus.com>
18496         * typeck.c (build_reinterpret_cast): Handle pointer to member
18497         functions.
18499 Wed Apr 17 12:28:26 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18501         * lex.c (handle_cp_pragma): New function, with decl, doing the cc1plus
18502         pragmas.
18503         (check_newline): Put the vtable/unit/implementation/interface pragma
18504         code into handle_cp_pragma, replacing it with a call.
18505         (handle_sysv_pragma): Give int return type, and take FINPUT and TOKEN
18506         args.  Get the next token after handling the pragma token.
18508 Wed Apr 17 10:28:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
18510         * cvt.c (cp_convert_to_pointer): Avoid doing base analysis on pmfs.
18511         (convert_to_pointer_force): Likewise.
18513         * init.c (build_new): Fix array new without -fcheck-new.
18515 Tue Apr 16 13:44:58 1996  Jason Merrill  <jason@yorick.cygnus.com>
18517         * cp-tree.h, call.c, class.c, decl.c, parse.y, pt.c, rtti.c,
18518         tree.c: Lose TYPE_NESTED_NAME.
18520         * parse.y (nested_name_specifier_1): Don't treat non-identifiers
18521         as identifiers.
18523         * tree.def: Add VEC_INIT_EXPR.
18524         * expr.c (cplus_expand_expr): Handle it.
18525         * init.c (build_new): Use it instead of the RTL_EXPR nastiness and
18526         the extra file-scope symbol nastiness.
18528 Mon Apr 15 16:21:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
18530         * method.c (make_thunk): Thunks are static.
18531         (emit_thunk): Use ASM_OUTPUT_MI_THUNK if it's defined.
18533         * decl2.c (mark_vtable_entries): Emit thunks as needed.
18534         (finish_file): Don't emit them here.
18536 Sun Apr 14 11:34:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
18538         * rtti.c (build_dynamic_cast): Handle null pointers.
18539         (ifnonnull): New function.
18541 Fri Apr 12 09:08:27 1996  Bob Manson  <manson@charmed.cygnus.com>
18543         * call.c (build_method_call): Remember the original basetype we
18544         were called with.  Give an error message instead of trying
18545         (incorrectly) to call a non-static member function through a
18546         non-inherited class.
18548         * search.c (expand_upcast_fixups): Mark the new fixup as
18549         DECL_ARTIFICIAL.
18551 Thu Apr 11 03:57:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18553         * init.c (build_new): Use a TARGET_EXPR for alloc_expr.
18555         * class.c (set_rtti_entry): Fix for thunks.
18557         * decl2.c (import_export_decl): Still emit typeinfo fns for
18558         cv-variants of builtin types.
18560         * rtti.c (expand_class_desc): Set up base_info_type_node here.
18561         (init_rtti_processing): Instead of here.
18563 Wed Apr 10 14:17:13 1996  Jason Merrill  <jason@yorick.cygnus.com>
18565         * rtti.c (init_rtti_processing): Do init regardless of -frtti.
18566         (build_typeid): Only complain about taking dynamic typeid without
18567         -frtti.
18569         * decl2.c: flag_rtti defaults to 1.
18571         * rtti.c (get_tinfo_var): The general class case is now smaller.
18572         (init_rtti_processing): Pack the latter three fields of base_info
18573         into 32 bits.
18575 Wed Apr 10 13:50:14 1996  Mike Stump  <mrs@cygnus.com>
18577         * init.c (expand_member_init): Don't dump if name is NULL_TREE.
18579 Wed Apr 10 12:56:02 1996  Mike Stump  <mrs@cygnus.com>
18581         * search.c (make_memoized_table_entry): Undefer the pop, if necessary.
18582         (push_memoized_context): Split out code to undefer pop_type_level to
18583         (clear_memoized_cache): here.
18584         (pop_memoized_context): We can only handle one layer of deferral of
18585         pop_type_level so clear the cache, if there was a previous level.
18587 Tue Apr  9 23:06:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18589         * rtti.c (init_rtti_processing): Build up base_info_type_node.
18590         (expand_class_desc): Use one pointer to an array of base_info
18591         structs, passed using a CONSTRUCTOR.
18593 Tue Apr  9 14:20:57 1996  Mike Stump  <mrs@cygnus.com>
18595         * class.c (build_vbase_path): Remove block extern for
18596         flag_assume_nonnull_objects here.
18597         (build_vfn_ref): Split out functionality into build_vtbl_ref.
18598         (build_vtbl_ref): New routine.
18599         (build_vtable): Set up rtti info here.
18600         (add_virtual_function): Note in CLASSTYPE_RTTI the best
18601         place where we can get the rtti pointers from to avoid having to
18602         search around for a place.
18603         (finish_base_struct): Likewise.
18604         (finish_struct_1): Likewise.  Never create totally new vtables
18605         with totally new vtable pointers for rtti.  Disable code to layout
18606         vtable pointers better until we want to break binary
18607         compatibility.
18608         * rtti.c (build_headof_sub): New routine to convert down to a
18609         sub-object that has an rtti pointer in the vtable.
18610         (build_headof): Use it.  Also, use build_vtbl_ref now to be more
18611         maintainable.
18612         (build_dynamic_cast): Make sure we have saved it, if we need to.
18613         * search.c (dfs_init_vbase_pointers): Disable code that deals with
18614         a more efficient vtable layout, enable later.
18615         * call.c (flag_assume_nonnull_objects): Moved declaration to
18616         * cp-tree.h: here.  Declare build_vtbl_ref.
18617         * pt.c (instantiate_class_template): Use NULL_TREE instead of 0 in
18618         function calls that want a tree.
18620 Tue Apr  9 12:10:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
18622         * rtti.c (build_dynamic_cast): Handle downcasting to X* given
18623         other X subobjects in the most derived type.  Ack.
18625         * rtti.c (build_dynamic_cast): No need to strip cv-quals here,
18626         get_typeid will do it for us.
18627         (get_typeid_1): Break out call-building for expand_*_desc to use.
18628         (get_typeid): Call it.
18629         (expand_*_desc): Likewise.
18630         * decl.c (init_decl_processing): Don't set TYPE_BUILT_IN on char *
18631         and void *.
18632         (init_decl_processing): Lose builtin_type_tdescs lossage.
18633         * decl2.c (finish_vtable_vardecl): Remove obsolete code.
18635 Mon Apr  8 17:23:23 1996  Bob Manson  <manson@charmed.cygnus.com>
18637         * pt.c (tsubst): When calling set_nested_typename, use
18638         TYPE_NESTED_NAME (current_class_type) instead of
18639         current_class_name.
18641         * decl.c (pushdecl): Likewise.
18642         (pushdecl_class_level): Likewise.
18643         (grokdeclarator): Use NULL_TREE instead of 0 in the call to
18644         set_nested_typename.
18646 Sun Apr  7 10:44:31 1996  Jason Merrill  <jason@yorick.cygnus.com>
18648         * rtti.c (synthesize_tinfo_fn): Handle arrays.
18650         * cp-tree.h (DECL_REALLY_EXTERN): New macro.
18652 Sat Apr  6 13:56:27 1996  Jason Merrill  <jason@yorick.cygnus.com>
18654         * rtti.c (throw_bad_cast): Use entry point __throw_bad_cast.
18655         (init_rtti_processing): Lose bad_cast_type.
18656         (build_dynamic_cast): Use throw_bad_cast.
18658         * rtti.c (synthesize_tinfo_fn): Handle enums and pmfs.
18660         * decl2.c (finish_file): Don't synthesize artificial functions
18661         that are external and not inline.
18663         * rtti.c (get_tinfo_fn): If at_eof, call import_export_decl.
18665         * decl2.c (finish_file): Handle having new inlines added to
18666         saved_inlines by synthesis.
18668         * rtti.c (get_bad_cast_node): Don't require <typeinfo>.
18670 Fri Apr  5 17:02:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
18672         RTTI rewrite to initialize nodes as needed, not require that
18673         users #include <typeinfo>, complete functionality and reduce wasted
18674         space.
18675         * rtti.c (init_rtti_processing): New fn.
18676         (build_typeid): The vtable entry is now a function.
18677         (get_tinfo_var): New fn.
18678         (get_tinfo_fn): Likewise.
18679         (get_typeid): Use it.
18680         (build_dynamic_cast): Declare and use entry point __dynamic_cast.
18681         (build_*_desc): Rename to expand_*_desc and rewrite to use entry
18682         points __rtti_*.
18683         (add_uninstantiated_desc, get_def_to_follow, build_t_desc): Lose.
18684         (synthesize_tinfo_fn): New fn.
18685         * method.c (build_t_desc_overload): Lose.
18686         (build_overload_with_type): More generic.
18687         * decl.c (init_decl_processing): Call init_rtti_processing.
18688         * class.c (set_rtti_entry): Use get_tinfo_fn.
18689         * decl2.c (mark_vtable_entries): Mark the rtti function.
18690         (finish_prevtable_vardecl): Don't build_t_desc.
18691         (import_export_decl): Handle tinfo functions.
18692         (finish_file): Likewise.
18693         * typeck.c (inline_conversion): New fn.
18694         (build_function_call_real): Use it.
18695         * cp-tree.h: Add decls.
18697         * method.c (hack_identifier): Also convert component_refs from
18698         references.
18700         * lex.c (cons_up_default_function): Use the type, not the name, in
18701         declspecs.
18703         * decl2.c (import_export_vtable): Fix weak vtables.
18705 Fri Apr  5 13:30:17 1996  Bob Manson  <manson@charmed.cygnus.com>
18707         * search.c (get_base_distance_recursive): Fix access checks for
18708         protected bases.
18710 Fri Apr  5 11:02:06 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18712         * call.c (unary_complex_lvalue): Delete unneeded decl, it's in
18713         cp-tree.h.
18714         (convert_harshness): Add prototypes wrapped by PROTO.
18715         * decl2.c (grok_function_init): Likewise.
18716         (do_toplevel_using_decl): Change to void return type.
18717         * class.c (build_vtable_entry): Remove decl of make_thunk.
18718         (merge_overrides): Fix order of arg definitions.
18719         (finish_vtbls): Likewise.
18720         (fixup_vtable_deltas): Likewise.
18721         (modify_all_direct_vtables): Likewise.
18722         (modify_all_indirect_vtables): Likewise.
18723         * search.c (get_base_distance_recursive): Likewise.
18724         (get_abstract_virtuals_1): Likewise.
18725         (fixup_virtual_upcast_offsets): Likewise.
18726         (lookup_fnfields_1): Add prototypes wrapped by PROTO.
18727         * init.c (perform_member_init): Fix order of arg definitions.
18728         (expand_aggr_init_1): Add prototypes wrapped by PROTO.
18729         * cp-tree.h (make_thunk): Add decl.
18730         (overload_template_name, push_template_decl): Add decls.
18731         (do_toplevel_using_decl): Change to void return type.
18732         (vec_binfo_member): Add decl.
18734 Thu Apr  4 13:33:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18736         * typeck.c (mark_addressable, convert_for_assignment,
18737         convert_for_initialization, pointer_int_sum, pointer_diff,
18738         unary_complex_lvalue): Add prototypes wrapped by PROTO.
18739         (convert_sequence): #if 0 fn decl, since definition also is.
18741 Thu Apr  4 11:00:53 1996  Mike Stump  <mrs@cygnus.com>
18743         * rtti.c (build_dynamic_cast): Make sure we strip qualifiers on
18744         cast to pointer types for type searching.
18746 Wed Apr  3 17:10:57 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18748         * typeck.c (get_delta_difference): Use cp_error, not error, in the
18749         case where BINFO == 0.
18751 Wed Apr  3 12:01:02 1996  Mike Stump  <mrs@cygnus.com>
18753         * call.c (build_method_call): Fix wording of error messages so
18754         constructors come out right.
18756 Tue Apr  2 16:06:59 1996  Bob Manson  <manson@charmed.cygnus.com>
18758         * decl.c (push_overloaded_decl): Don't warn about hidden
18759         constructors when both the type and the function are declared
18760         in a system header file.
18762 Mon Apr  1 09:03:13 1996  Bob Manson  <manson@charmed.cygnus.com>
18764         * class.c (finish_struct_1): Propagate the TYPE_PACKED
18765         flag for the type to the type's fields.
18767 Sat Mar 30 12:14:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18769         * parse.y (complex_parmlist, ELLIPSES): Take out ARM-based warning.
18771 Fri Mar 29 15:51:36 1996  Bob Manson  <manson@charmed.cygnus.com>
18773         * class.c (base_info, finish_base_struct): Replace
18774         needs_virtual_dtor with base_has_virtual.
18776         (finish_struct_1): Remove the old code that tried to make default
18777         destructors virtual.  Use base_has_virtual when checking if we need
18778         to add a vtable entry for the rtti code.
18780 Fri Mar 29 14:02:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
18782         * pt.c (push_template_decl): Complain about template decl with
18783         inappropriate declaration.
18785 Fri Mar 29 12:15:35 1996  Bob Manson  <manson@charmed.cygnus.com>
18787         * typeck.c (build_x_unary_op): Remove bogus check for taking
18788         the address of a member function.
18790 Fri Mar 29 11:56:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
18792         * parse.y (constructor_declarator): Only push the class if
18793         we are not already in the class.
18795 Fri Mar 29 09:41:02 1996  Jeffrey A. Law  <law@cygnus.com>
18797         * method.c (emit_thunk): Remove current_call_is_indirect nonsense.
18798         Add additional argument to INIT_CUMULATIVE_ARGS.
18800 Thu Mar 28 16:41:39 1996  Jason Merrill  <jason@yorick.cygnus.com>
18802         * decl.c (shadow_tag): Fix error about anon union with methods.
18804         * parse.y (self_reference): Only generate a self-reference if this
18805         is a non-template class.
18806         (opt.component_decl_list): Only use it if it was generated.
18808         * parse.y (component_decl_1): Use constructor_declarator.
18809         (fn.def2): Likewise.
18810         (notype_component_declarator0): Likewise.
18812 Thu Mar 28 15:11:35 1996  Bob Manson  <manson@charmed.cygnus.com>
18814         * typeck.c (build_x_unary_op): Add checks for taking the address
18815         of a TARGET_EXPR or of a member function, and give appropriate
18816         warnings.
18818 Thu Mar 28 14:49:26 1996  Jason Merrill  <jason@yorick.cygnus.com>
18820         * pt.c (process_template_parm): Allow template type parms to be
18821         used as types for template const parms.
18823 Wed Mar 27 15:51:19 1996  Mike Stump  <mrs@cygnus.com>
18825         * init.c (expand_vec_init): Ensure the eh cleanups are on the
18826         function_obstack.
18828 Wed Mar 27 10:14:30 1996  Jason Merrill  <jason@yorick.cygnus.com>
18830         * decl.c (lookup_name_real): Be even more picky about the
18831         ambiguous lookup warning.
18832         (grokdeclarator): Tweak SCOPE_REF constructor declarators here.
18833         * parse.y (constructor_declarator): Rather than here.
18835         * parse.y (constructor_declarator): New nonterminal.
18836         (fn.def1): Use it.
18837         (explicit_instantiation): Likewise.
18839 Tue Mar 26 13:41:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18841         Add implicit declaration of class name at class scope.
18842         * decl.c (lookup_name_real): Restrict pedwarn about ambiguous lookup.
18843         * parse.y (self_reference): New nonterminal.
18844         (opt.component_decl_list): Use it.
18845         (fn.def1): Add nested_name_specifier type_name cases.
18846         * class.c (build_self_reference): New function.
18847         (finish_struct): Handle access_default later, move self-reference
18848         decl to the end.
18849         * pt.c (lookup_template_class): Handle getting a TYPE_DECL.
18850         * cp-tree.h: Adjust.
18852         * pt.c (do_function_instantiation): Separate handling of member
18853         functions and non-member functions properly.
18855 Mon Mar 25 14:23:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
18857         * pt.c (process_template_parm): Improve error for 'volatile class K'.
18859         * class.c (finish_struct_1): Check the right slot for destructors.
18861         * decl.c (start_enum): Complain about enum templates.
18863 Mon Mar 25 13:25:31 1996  Mike Stump  <mrs@cygnus.com>
18865         * init.c (resolve_offset_ref): Offset pointers to member data by one.
18866         * typeck.c (unary_complex_lvalue): Likewise.
18868 Mon Mar 25 13:30:42 1996  Bob Manson  <manson@charmed.cygnus.com>
18870         * typeck.c (c_expand_return): Check for a returned local
18871         array name, similar to the check for an ADDR_EXPR.
18873 Mon Mar 25 13:07:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
18875         * decl.c (cp_finish_decl): Don't build cleanups for static
18876         variables here.
18878 Fri Mar 22 17:57:55 1996  Mike Stump  <mrs@cygnus.com>
18880         * typeck.c (build_modify_expr): Fix error messages to be more
18881         accurate.
18882         * cp-tree.h (assop_as_string): Parallel to op_as_string, but for
18883         assignment operators.
18884         * error.c (assop_as_string): Likewise.  Add support for `%Q' for
18885         assignment operators.
18887 Fri Mar 22 13:48:29 1996  Jason Merrill  <jason@yorick.cygnus.com>
18889         * decl.c (grokdeclarator): Call bad_specifiers for typedefs.  Also
18890         give an error if initialized.  pedwarn about nested type with the
18891         same name as its enclosing class.
18893         * pt.c (tsubst, case TYPE_DECL): Set DECL_CONTEXT.
18895         * typeck.c (require_complete_type): Be sure to instantiate the
18896         MAIN_VARIANT of the type.
18898         * decl2.c (finish_file): Instantiate pending templates before
18899         processing static constructors and destructors.
18901         * pt.c (instantiate_decl): Don't instantiate functions at toplevel
18902         unless at_eof.
18904 Fri Mar 22 09:30:17 1996  Bob Manson  <manson@beauty.cygnus.com>
18906         * decl2.c (delete_sanity): If error_mark_node is passed
18907         in as an expression, quit while we're ahead.
18909         * decl.c (grokdeclarator): Give an error message if `friend'
18910         is combined with any storage class specifiers.
18912 Wed Mar 20 14:51:55 1996  Jason Merrill  <jason@yorick.cygnus.com>
18914         * parse.y (named_complex_class_head_sans_basetype): Don't crash on
18915         definition of nonexistent nested type.
18917         * error.c (dump_decl, case TYPE_DECL): Fix decision for whether or
18918         not to say 'typedef'.
18920 Wed Mar 20 00:11:47 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
18922         * cp-tree.h (struct lang_type): Make search_slot a tree, not a char*.
18923         * search.c (dfs_walk, dfs_init_vbase_pointers,
18924         expand_upcast_fixups): Remove cast of CLASSTYPE_SEARCH_SLOT.
18925         (dfs_find_vbases): Remove cast for CLASSTYPE_SEARCH_SLOT init.
18927 Tue Mar 19 17:56:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
18929         * except.c (build_throw): Support minimal parse.
18930         * pt.c (tsubst_copy): Support THROW_EXPR.
18931         * decl2.c (build_expr_from_tree): Likewise.
18933         * pt.c (mangle_class_name_for_template): Always allocate
18934         scratch_firstobj.
18936 Tue Mar 19 16:34:31 1996  Bob Manson  <manson@beauty.cygnus.com>
18938         * cvt.c (cp_convert_to_pointer): Give an appropriate error
18939         when trying to cast from an incomplete type.
18941 Tue Mar 19 16:00:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
18943         * pt.c (instantiate_class_template): Don't bother setting up
18944         CLASSTYPE_TAGS explicitly, as the nested types will add
18945         themselves.
18947 Tue Mar 19 15:48:43 1996  Bob Manson  <manson@beauty.cygnus.com>
18949         * decl.c (shadow_tag): Remove old error check for usage of
18950         an enum without a previous declaration.
18951         (xref_tag): Add error message about usage of enums without a
18952         previous declaration.
18954 Tue Mar 19 09:21:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
18956         * lex.c (do_identifier): Only do name consistency check if we're
18957         parsing.
18959         * pt.c (push_template_decl): Don't crash if we get a member defn
18960         that doesn't match.
18962         * decl.c (xref_tag_from_type): New function to do an xref without
18963         always having to figure out code_type_node.
18964         * cp-tree.h: Declare it.
18965         * pt.c (instantiate_class_template): Use it for friend classes.
18966         (lookup_template_class): Use it.
18968         * typeck2.c (build_functional_cast): Pull out a single parm before
18969         passing it to build_c_cast.
18971 Tue Mar 19 09:07:15 1996  Bob Manson  <manson@beauty.cygnus.com>
18973         * expr.c (do_case): Give an error message if a pointer is
18974         given as a case value.
18976 Mon Mar 18 21:57:54 1996  Jason Merrill  <jason@yorick.cygnus.com>
18978         * typeck.c (build_c_cast): Don't pull single TEMPLATE_DECL out of
18979         an overload list.
18981         * lex.c (cons_up_default_function): Really, now, interface hackery
18982         does not apply to synthesized methods.
18984 Mon Mar 18 18:20:57 1996  Mike Stump  <mrs@cygnus.com>
18986         * call.c (build_method_call): Ctors and dtors now have special names
18987         with respect to lookups.
18988         * class.c (add_method): Likewise.
18989         (grow_method): Likewise.
18990         (finish_struct_methods): Likewise.
18991         (warn_hidden): Likewise.
18992         (finish_struct_1): Likewise.
18993         * cvt.c (convert_to_reference): Likewise.
18994         (convert_to_aggr): Likewise.
18995         (cp_convert): Likewise.
18996         * decl2.c (check_classfn): Likewise.
18997         * init.c (expand_member_init): Likewise.
18998         (expand_default_init): Likewise.
18999         (expand_aggr_init_1): Likewise.
19000         (build_offset_ref): Likewise.
19001         (build_new): Likewise.
19002         (build_delete): Likewise.
19003         * lex.c (do_inline_function_hair): Likewise.
19004         * search.c (lookup_field_1): Likewise.
19005         (lookup_fnfields_here): Likewise.
19006         (lookup_field): Likewise.
19007         (lookup_fnfields): Likewise.
19008         (get_virtual_destructor): Likewise.
19009         (dfs_debug_mark): Likewise.
19010         (dfs_pushdecls): Likewise.
19011         (dfs_compress_decls): Likewise.
19012         * tree.c (layout_basetypes): Likewise.
19013         * typeck.c (build_component_ref): Likewise.
19014         (build_x_function_call): Likewise.
19015         (build_modify_expr): Likewise.
19016         (convert_for_initialization): Likewise.
19017         (build_functional_cast): Likewise.
19018         * cp-tree.h (CLASSTYPE_FIRST_CONVERSION): Likewise.
19019         (CTOR_NAME): New.
19020         (DTOR_NAME): New.
19021         * decl.c (ctor_identifier): New.
19022         (dtor_identifier): New.
19023         (init_decl_processing): Set them.
19025 Mon Mar 18 18:00:51 1996  Mike Stump  <mrs@cygnus.com>
19027         * typeck.c (build_component_ref): Don't get confused by fields whose
19028         context has no type name, like pointer to member functions.
19030 Mon Mar 18 13:19:03 1996  Jason Merrill  <jason@yorick.cygnus.com>
19032         * decl.c (grokdeclarator): Handle typedef without declarator.
19034         * pt.c (tsubst): Handle SCOPE_REF in declarator.
19036         * parse.y (bad_parm): Catch another case of missing `typename'.
19038         * lex.c (yyprint): Handle TYPE_DECLs.
19040         * decl.c (start_function): Don't try to be clever.
19042         * lex.c: Lose compiler_error_with_decl.
19043         * typeck2.c: Lose error_with_aggr_type.
19044         (incomplete_type_error): Use cp_* instead of old functions.
19045         (readonly_error): Likewise.
19046         * typeck.c (convert_arguments): Likewise.
19047         * search.c (lookup_nested_field): Likewise.
19048         * method.c (make_thunk): Likewise.
19049         * decl.c (grokparms): Likewise.
19050         * cp-tree.h: Update.
19052         * tree.c (min_tree_cons): Call copy_to_permanent for the purpose
19053         and value.
19055 Mon Mar 18 11:25:52 1996  Bob Manson  <manson@beauty.cygnus.com>
19057         * method.c (build_opfncall): When deleting a pointer to an
19058         array, build a new pointer to the tree past any ARRAY_TYPE
19059         nodes.
19061 Mon Mar 18 10:11:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19063         * decl.c (lookup_name_real): Initialize local var TYPE to NULL_TREE.
19065 Fri Mar 15 11:03:57 1996  Jason Merrill  <jason@yorick.cygnus.com>
19067         * pt.c (instantiate_decl): Only call import_export_decl if at_eof
19068         and ! DECL_INLINE.
19070         * decl.c (finish_function): Don't set nested based on
19071         hack_decl_function_context.
19072         * parse.y (function_try_block): Check for nested function.
19073         (pending_inlines): Likewise.
19075         * decl2.c (build_expr_from_tree): If a unary op already has a
19076         type, just return it.
19078         * decl2.c (finish_prevtable_vardecl): Use ADJUST_VTABLE_LINKAGE.
19080         * decl2.c (walk_vtables): vardecl_fn returns int; return 1 if it does.
19081         (finish_file): Check the return value of walk_vtables.
19082         (finish_prevtable_vardecl): Return int.
19083         (finish_vtable_vardecl): Likewise.
19084         (prune_vtable_vardecl): Likewise.
19085         * lex.c (set_vardecl_interface_info): Likewise.
19086         * cp-tree.h: Adjust return types.
19088         * class.c (delete_duplicate_fields_1): Don't complain about
19089         duplicate nested types if they're the same type.
19090         (finish_struct): Remove check for duplicate.
19091         * decl2.c (grokfield): Don't check for typedef of anonymous type.
19093 Thu Mar 14 10:00:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
19095         * cp-tree.h: Lose SIGNATURE_GROKKING_TYPEDEF.
19097         * decl.c (grokdeclarator): Lose special handling of class-level
19098         typedef.  Lose SIGNATURE_GROKKING_TYPEDEF.  Set
19099         SIGNATURE_HAS_OPAQUE_TYPEDECLS later.
19101         * cvt.c (convert_pointer_to_real): Retain cv-quals in conversion.
19103         * pt.c (tsubst_copy): Strip cv-quals from destructor name types.
19105         * search.c (compute_access): Fix handling of anonymous union
19106         members.
19107         * class.c (finish_struct_anon): Propagate TREE_{PRIVATE,PROTECTED}
19108         from anonymous unions to their members.
19110         * typeck.c (build_x_function_call): For static member functions,
19111         hand off to build_member_call.
19113 Wed Mar 13 14:03:34 1996  Jason Merrill  <jason@yorick.cygnus.com>
19115         * typeck.c (build_component_ref): Handle OFFSET_REFs.
19117         * init.c (expand_vec_init): Fix init == 0 case.
19119 Tue Mar 12 14:36:02 1996  Jason Merrill  <jason@yorick.cygnus.com>
19121         * init.c (build_new): pedwarn about init and array new.
19122         (expand_vec_init): Handle lists, use convert_for_initialization.
19124         * typeck.c (convert_for_initialization): Pass LOOKUP_NO_CONVERSION
19125         when converting to an aggregate type.
19126         * cvt.c (cp_convert): Pass it through.
19128         * typeck.c (build_conditional_expr): Handle user-defined
19129         conversions to slightly different types.
19131         * decl.c (grokdeclarator): Force an array type in a parm to be
19132         permanent.
19134         * decl2.c (do_using_directive): Sorry.
19135         (do_namespace_alias): Likewise.
19136         * lex.c (real_yylex): Warn about using the `namespace' keyword.
19138 Sun Mar 10 22:26:09 1996  Jason Merrill  <jason@yorick.cygnus.com>
19140         * parse.y (datadef): Move call to note_list_got_semicolon up.
19142 Fri Mar  8 11:47:26 1996  Mike Stump  <mrs@cygnus.com>
19144         * tree.c (unsave_expr): Don't unsave, UNSAVE_EXPRs.
19146 Fri Mar  8 11:29:06 1996  Mike Stump  <mrs@cygnus.com>
19148         * decl.c (cp_finish_decl): The exception regions have to be
19149         nested, not overlapping.  We start the exception region for a
19150         decl, after it has been fully built, and all temporaries for it
19151         have been cleaned up.
19153 Thu Mar  7 17:46:06 1996  Mike Stump  <mrs@cygnus.com>
19155         * tree.c (vec_binfo_member): Don't core dump if we have no bases.
19157 Thu Mar  7 14:11:49 1996  Jason Merrill  <jason@yorick.cygnus.com>
19159         * tree.def: Add RETURN_INIT.
19160         * pt.c (instantiate_decl): Handle RETURN_INIT.
19161         * decl.c (store_return_init): Handle minimal_parse_mode.
19163         * tree.c (cp_build_type_variant): Just return an error_mark_node.
19164         * decl.c (make_typename_type): Don't try to get the file and line
19165         of an identifier.
19166         * typeck.c (comptypes): Handle TYPENAME_TYPE.
19168 Wed Mar  6 18:47:50 1996  Per Bothner  <bothner@kalessin.cygnus.com>
19170         * decl.c (poplevel): Make sure we clear out and restore old local
19171         non-VAR_DECL values by default when they go out of scope.
19173 Wed Mar  6 09:57:36 1996  Jason Merrill  <jason@yorick.cygnus.com>
19175         * method.c (build_overload_value): Use DECL_ASSEMBLER_NAME in
19176         referring to addresses of variables and functions.
19178         * error.c (dump_expr): Support SIZEOF_EXPR.
19180         * init.c (do_friend): Use the return value of check_classfn.
19182         * typeck.c (convert_arguments): Call complete_type.
19184         * method.c (hack_identifier): After giving an error, set value to
19185         error_mark_node.
19187 Tue Mar  5 16:00:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
19189         * tree.c (hack_decl_function_context): Kludge around DECL_CONTEXT
19190         lossage for local classes.
19191         * cp-tree.h: Declare it.
19192         * decl.c (lookup_name_real): Evil, painful hack for local classes.
19193         (grokfndecl): Set DECL_CLASS_CONTEXT and DECL_NO_STATIC_CHAIN here.
19194         Use hack_decl_function_context.
19195         (grokdeclarator): Don't set DECL_NO_STATIC_CHAIN here.
19196         (start_function): Use hack_decl_function_context.
19197         (finish_function): Likewise.
19198         * method.c (synthesize_method): Likewise.
19199         * lex.c (process_next_inline): Likewise.
19200         (do_pending_inlines): Likewise.
19201         * decl2.c (finish_file): Unset DECL_STATIC_FUNCTION_P when we're
19202         done with it.
19204 Mon Mar  4 22:38:39 1996  Gerald Baumgartner  <gb@alexander.cs.purdue.edu>
19206         * sig.c (build_signature_pointer_or_reference_type): Align
19207         signature pointers/references on 8-byte boundaries so they can be
19208         grabbed 2 words at a time on a SPARC.
19210 Tue Mar  5 10:21:01 1996  Jason Merrill  <jason@yorick.cygnus.com>
19212         * method.c (hack_identifier): Requiring a static chain is now a
19213         hard error.
19214         * decl.c (grokdeclarator): Set DECL_NO_STATIC_CHAIN on nested
19215         functions.
19217 Mon Mar  4 20:03:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
19219         * init.c (build_offset_ref): Call complete_type.
19221         * decl.c (pop_from_top_level): Always pop previous_class_type.
19223         * parse.y: Handle multiple decls in a for-init-statement.
19224         * pt.c (tsubst_expr): Likewise.
19226         * pt.c (tsubst): Use tsubst_expr for the second operand of an
19227         ARRAY_REF.
19229         * decl.c (maybe_push_to_top_level): Don't save previous_class_type.
19230         (poplevel_class): Set it here.
19231         (pop_from_top_level): Pop it here if we're returning to class scope.
19232         * class.c (pushclass): Don't set it here.
19234         * decl.c (maybe_push_to_top_level): Save current_template_parms,
19235         and clear it if !pseudo.
19236         (pop_from_top_level): Restore it.
19238         * decl2.c (finish_file): Push the dummy each time we walk the list
19239         of vtables.
19241         * error.c (dump_expr): Support LOOKUP_EXPR and actually do
19242         something for CAST_EXPR.
19244 Mon Feb 19 14:49:18 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
19246         * cvt.c (cp_convert): Warn about implicit conversion of the
19247         address of a function to bool, as it is always true.
19249 Fri Feb 23 23:06:01 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
19251         * typeck.c (c_expand_return): Fix warning for local externs returned.
19253 Mon Mar  4 15:03:11 1996  Jason Merrill  <jason@yorick.cygnus.com>
19255         * tree.c (mapcar): Propagate const and volatile properly.
19257         * typeck.c (complete_type): Be sure to instantiate the
19258         MAIN_VARIANT of the type.
19260         * method.c (synthesize_method): Class interface hackery does not
19261         apply to synthesized methods.
19263 Mon Mar  4 14:05:23 1996  Jason Merrill  <jason@yorick.cygnus.com>
19265         * pt.c (comp_template_args): Use comptypes rather than just
19266         checking for TEMPLATE_TYPE_PARM equivalence.
19268         * typeck.c (build_x_function_call): Call complete_type before
19269         checking TYPE_OVERLOADS_CALL_EXPR.
19271 Mon Mar  4 18:48:30 1996  Manfred Hollstein   <manfred@lts.sel.alcatel.de>
19273         * g++.c (main): Check also for new define ALT_LIBM.
19275 Fri Mar  1 13:09:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
19277         * pt.c (instantiate_class_template): If we don't have a pattern
19278         yet, that's OK.
19279         (coerce_template_parms): If we see a local class, bail.
19281         * decl.c (grok_reference_init): Make sure there's a type before
19282         checking its code.
19284         * pt.c (do_function_instantiation): Avoid crashing on invalid decls.
19285         (push_template_decl): Likewise.
19287         * parse.y (named_class_head): Set
19288         CLASSTYPE_TEMPLATE_SPECIALIZATION here if we have basetypes.
19290         * decl.c (xref_tag): Diagnose redeclaration of template
19291         type-parameter name.
19293         * error.c (dump_type): Handle anonymous template type parms.
19295         * pt.c (instantiate_template): Use TYPE_MAIN_DECL instead of
19296         TYPE_STUB_DECL.
19297         (coerce_template_parms): Likewise.
19299 Thu Feb 29 16:26:01 1996  Mike Stump  <mrs@cygnus.com>
19301         * class.c (instantiate_type, case {ARRAY,INDIRECT}_REF,
19302         case ADDR_EXPR): Don't modify rhs if a subinstantiation fails.
19304 Thu Feb 29 08:20:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
19306         * pt.c (instantiate_template): Take the MAIN_VARIANT of the type
19307         before trying to get its STUB_DECL.
19308         (coerce_template_parms): Likewise.
19310         * parse.y (template_type_parm): If they didn't use 'class',
19311         pretend they did after giving an error.
19313         * pt.c (coerce_template_parms): Diagnose use of local class.
19315         * decl.c (grok_reference_init): Use instantiate_type.
19317         * error.c (dump_expr): Handle TEMPLATE_DECLs.
19319         * parse.y (named_class_head): Diagnose mismatching types and tags.
19321         * decl.c (pushdecl): Type decls and class templates clash with
19322         artificial type decls, not hide them.
19324         * decl.c (redeclaration_error_message): Diagnose redefinition of
19325         templates properly.
19326         (duplicate_decls): Diagnose disallowed overloads for template
19327         functions, too.
19329         * decl.c (start_decl): Call complete_type before checking for a
19330         destructor.
19332         * pt.c (tsubst): Use tsubst_expr on the elts of a VEC.
19334         * decl.c (xref_tag): A TEMPLATE_TYPE_PARM is a match.
19336 Wed Feb 28 09:28:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
19338         * decl.c (grok_op_properties): Don't check for operator++(int) in
19339         a template.
19341         * tree.c (perm_manip): Return a copy of variable and function
19342         decls with external linkage.
19344         * tree.def: Change some of the min tree codes to type "1".
19345         * pt.c (uses_template_parms): Handle 'e's, return 1 for LOOKUP_EXPRs.
19346         * method.c (build_overload_int): Emit something arbitrary for
19347         anything but an INTEGER_CST if we're in a template.
19349         * decl.c (cp_finish_decl): Call complete_type before deciding
19350         whether or not to lay out the decl.
19352         * lex.c (do_identifier): Check for DECL_INITIAL before using it.
19354 Tue Feb 27 16:35:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
19356         * typeck2.c (build_x_arrow): Call complete_type.
19358         * pt.c (add_pending_template): Broken out.
19359         (lookup_template_class): If -fexternal-templates, call it for all
19360         the methods of implemented types.
19361         (instantiate_class_template): Instead of instantiating them here.
19362         (instantiate_decl): Handle -fexternal-templates earlier.
19364 Tue Feb 27 15:51:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19366         * search.c, lex.c, decl.c, class.c, cp-tree.h: Don't wrap the
19367         memoized lookup stuff inside GATHER_STATISTICS.
19369 Tue Feb 27 10:38:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19371         * decl.c (start_decl): Complain about array of incomplete type
19372         here.
19373         (grokdeclarator): Not here.
19375         * parse.y (template_parm): Expand full_parm inline so we can set
19376         the rule's precedence.
19378         * pt.c (tsubst_expr): If we're in a template, just do tsubst_copy.
19379         (tsubst): tsubst_expr the DECL_INITIAL of FIELD_DECLs.
19380         * decl2.c (grokbitfield): Don't check for integer constant here.
19381         * class.c (finish_struct_1): Check here.
19383         * decl.c (define_label): Make the min decl go on permanent_obstack.
19385         * pt.c (unify): Don't handle CONST_DECLs.
19386         (uses_template_parms): Don't check DECL_INITIAL on a CONST_DECL.
19387         (tsubst_copy): Likewise.
19389         * lex.c (do_identifier): Do pull the DECL_INITIAL out of a
19390         CONST_DECL for a template parm.
19392 Mon Feb 26 12:48:18 1996  Jason Merrill  <jason@yorick.cygnus.com>
19394         * decl.c (grokdeclarator): Complain about array of incomplete type
19395         here.
19396         (start_decl_1): Not here.
19398         * pt.c (tsubst): Handle pointer-to-function declarators.
19400         * method.c (hack_identifier): If pedantic, diagnose local class
19401         methods that require a static chain.
19403         * decl.c (grok_op_properties): No longer static.
19404         * cp-tree.h: Declare it.
19405         * pt.c (tsubst): Call it for operators.
19406         Use tsubst_copy for TREE_VECs.
19408         * parse.y (template_arg): The expr has precedence like '>'.
19410 Fri Feb 23 14:51:52 1996  Jason Merrill  <jason@yorick.cygnus.com>
19412         * pt.c (coerce_template_parms): Don't coerce an expression using
19413         template parms.
19414         (uses_template_parms): Also check DECL_INITIAL in CONST_DECLs.
19415         (tsubst): Don't use build_index_2_type if the max_value uses template
19416         parms.
19417         * method.c (build_overload_int): Emit something arbitrary for an
19418         expression using template parms.
19420         * parse.y (template_close_bracket): New non-terminal to catch use
19421         of '>>' instead of '> >' in template class names.
19422         (template_type): Use it.
19423         * Makefile.in (CONFLICTS): Causes one more r/r conflict.
19425         * tree.def: Add CAST_EXPR.
19426         * typeck2.c (build_functional_cast): Use CAST_EXPR instead of
19427         CONVERT_EXPR for minimal_parse_mode.
19428         * typeck.c (build_c_cast): Likewise.
19429         * pt.c (tsubst_copy): Likewise.
19430         * decl2.c (build_expr_from_tree): Likewise.
19431         * error.c (dump_expr): Likewise.
19433 Fri Feb 23 10:36:46 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19435         * except.c (SetTerminate, SetUnexpected): Put back global vars.
19436         (init_exception_processing): Put back decl/init of
19437         set_unexpected_fndecl and set_terminate_fndecl, needed to get the
19438         fns from libstdc++.
19440         * decl.c (struct binding_level): Delete ACCEPT_ANY bitfield.
19441         (declare_uninstantiated_type_level, uninstantiated_type_level_p):
19442         Delete unused fns.
19443         * cp-tree.h (declare_uninstantiated_type_level,
19444         uninstantiated_type_level_p): Delete prototypes.
19446 Thu Feb 22 19:36:15 1996  Jason Merrill  <jason@yorick.cygnus.com>
19448         * pt.c (tsubst_expr): Add default return.
19450 Thu Feb 22 16:47:24 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19452         * error.c (fndecl_as_string): Delete unused arg CNAME.
19453         * sig.c (build_signature_table_constructor,
19454         build_signature_method_call): Fix calls.
19456         * class.c (the_null_vtable_entry): Delete var definition.
19457         (init_class_processing): Delete tree the_null_vtable_entry init.
19458         * decl.c (no_print_{functions, builtins}): Declare as static.
19459         (__tp_desc_type_node): #if 0 var definition.
19460         (init_type_desc): #if 0 init of __tp_desc_type_node.
19461         (vb_off_identifier): Move var decl into init_decl_processing.
19462         (current_function_assigns_this): Declare as static.
19463         (int_ftype_ptr_ptr_int, void_ftype_ptr_int_int): Delete var decls.
19464         (init_decl_processing): Delete init of void_ftype_ptr_ptr_int.
19465         Move decls of string_ftype_ptr_ptr and int_ftype_string_string here.
19466         * decl2.c (delete_sanity): Delete definition/mod of local var ELT_SIZE.
19467         * init.c (BI_header_type, BI_header_size): Declare as static.
19468         * pt.c (template_classes): Delete unused var.
19469         (add_pending_template): Delete decl for non-existent fn.
19470         (lookup_template_class): Delete vars CODE and TAG_CODE.
19471         (instantiate_template): Delete unused var TARGS.
19472         * cp-tree.h (vb_off_identifier, current_function_assigns_this):
19473         Delete decls.
19474         (__tp_desc_type_node): #if 0 var decl.
19475         (fndecl_as_string): Fix prototype.
19477 Thu Feb 22 15:56:19 1996  Jason Merrill  <jason@yorick.cygnus.com>
19479         * tree.def: Add GOTO_STMT.
19480         * pt.c (tsubst_expr): Support goto and labels.
19481         * decl.c (define_label): Support minimal parsing.
19482         * parse.y (simple_stmt): Likewise.
19484 Thu Feb 22 15:30:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19486         * xref.c (GNU_xref_member): Only define/set var I if
19487         XREF_SHORT_MEMBER_NAMES is defined, to match when it's actually
19488         used.
19489         (GNU_xref_end_scope): Delete unused fifth arg TRNS.
19490         (GNU_xref_end): Fix call.
19491         * decl.c (poplevel, poplevel_class, finish_method): Fix calls.
19492         * cp-tree.h (GNU_xref_end_scope): Fix prototype.
19494         * tree.c (build_exception_variant): Delete unused vars I, A, T,
19495         T2, and CNAME.
19496         (layout_vbasetypes): Delete unused var NONVIRTUAL_VAR_SIZE.
19497         (mapcar): Delete unused var CODE.
19498         (build_cplus_new): Delete unused arg WITH_CLEANUP_P.
19499         (break_out_cleanups): Fix call.
19500         (bot_manip): Likewise.
19501         * call.c (build_method_call): Likewise.
19502         * cvt.c (build_up_reference, convert_to_reference, cp_convert):
19503         Likewise.
19504         * typeck.c (unary_complex_lvalue, build_modify_expr,
19505         convert_for_initialization): Likewise.
19506         * typeck2.c (build_functional_cast): Likewise.
19507         * cp-tree.h (build_cplus_new): Fix prototype.
19509         * repo.c (open_repo_file): Delete unused var Q.
19510         (repo_compile_flags, repo_template_declared,
19511         repo_template_defined, repo_class_defined, repo_inline_used,
19512         repo_vtable_used, repo_tinfo_used): #if 0 unused fns.
19513         (repo_get_id, repo_vtable_used): Declare as static.
19514         * cp-tree.h (mark_{decl,class}_instantiated, finish_repo): Add
19515         prototypes.
19517 Thu Feb 22 14:53:35 1996  Jason Merrill  <jason@yorick.cygnus.com>
19519         * parse.y (pending_inlines): Add function_try_block case.
19521         * pt.c (unify): Fix for template const parms.
19523 Thu Feb 22 13:24:15 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19525         * lex.c (extract_interface_info): Delete forward decl.
19526         (default_copy_constructor_body, default_assign_ref_body): Delete
19527         decls for non-existent functions.
19528         (synth_firstobj, inline_text_firstobjs): Delete unused vars.
19529         (init_lex): Delete setting them.
19530         (cons_up_default_function): Delete unused vars FUNC_BUF,
19531         FUNC_LEN, and COMPLEX.  Delete code setting COMPLEX.  Delete old
19532         #if 0'd synth code.
19533         (toplevel, expression_obstack): Delete unused extern decls.
19534         (tree_node_kind): Delete unused enum.
19535         (tree_node_counts, tree_node_sizes): Wrap with #ifdef
19536         GATHER_STATISTICS.
19537         (tree_node_kind_names): Delete unused extern decl.
19538         (synth_obstack): Delete unused var.
19539         (init_lex): Don't set it.
19540         (init_parse): Add decl before use.
19541         (reduce_count): Only define #ifdef GATHER_STATISTICS && REDUCE_LENGTH.
19542         (current_unit_{name, language}): Delete unused vars.
19543         (check_newline): Don't bother setting them, just accept the #pragma.
19544         * cp-tree.h (init_repo, peek_yylex): Add prototypes.
19545         (current_unit_{name, language}): Delete decls.
19547         * search.c: Wrap all of the memoized functions, macros, and
19548         variables inside #ifdef GATHER_STATISTICS.
19549         (lookup_field, lookup_fnfields): Likewise.
19550         (init_search_processing): Likewise.
19551         (reinit_search_statistics): Wrap whole function.
19552         * lex.c (reinit_lang_specific): Wrap call to reinit_search_statistics.
19554         * decl.c (finish_function): Only call pop_memoized_context if
19555         GATHER_STATISTICS is defined.
19556         (start_function): Likewise for push_memoized_context.
19557         * class.c (pushclass, popclass): Likewise.
19559         * cp-tree.h (CLASSTYPE_MTABLE_ENTRY): Move definition from here...
19560         * search.c (CLASSTYPE_MTABLE_ENTRY): ... to here.
19562         * cvt.c (cp_convert): Delete unused local var FORM.
19563         * cp-tree.h (can_convert, can_convert_arg, real_lvalue_p): Add
19564         prototypes.
19566 Thu Feb 22 13:19:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
19568         * pt.c (do_poplevel): Oops; really return what we get from
19569         poplevel this time.
19571 Thu Feb 22 11:41:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19573         * cp-tree.h (is_aggr_type): Add prototype.
19575         * cp-tree.h ({push,pop}_cp_function_context): Add decls.
19576         * method.c ({push,pop}_cp_function_context): Delete decls.
19577         * except.c (start_eh_unwinder, end_eh_unwinder): Declare as void.
19578         (SetUnexpected, SetTerminate): Delete unused vars.
19579         (init_exception_processing): Don't set SetUnexpected or
19580         SetTerminate.  Don't set SET_UNEXPECTED_FNDECL or SET_TERMINATE_FNDECL.
19581         (output_exception_table_entry): Delete unused array LABEL.
19582         (expand_internal_throw): Delete unused var PARAMS.
19583         (expand_start_catch_block): Delete unused var CLEANUP.
19584         (emit_exception_table): Delete unused var EH_NODE_DECL.
19585         (expand_builtin_throw): Delete unused vars UNWIND_AND_THROW and
19586         GOTO_UNWIND_AND_THROW.  Don't set them.
19587         (end_eh_unwinder): Add top decl.
19588         (pop_rtl_from_perm): Delete unused decl of PERMANENT_OBSTACK.
19589         (exception_section, push_rtl_perm, do_function_call,
19590         lang_interim_eh, push_eh_cleanup, eh_outer_context,
19591         expand_end_eh_spec, end_eh_unwinder): Declare as static.
19592         (saved_pc, saved_throw_type, saved_throw_value, saved_cleanup,
19593         throw_used): Likewise.
19594         * cp-tree.h (expand_end_eh_spec): Delete prototype.
19596         * search.c (dfs_mark, dfs_mark_vtable_path,
19597         dfs_unmark_vtable_path, dfs_mark_new_vtable,
19598         dfs_unmark_new_vtable, dfs_clear_search_slot,
19599         dfs_search_slot_nonempty_p, bfs_markedp, bfs_unmarkedp,
19600         bfs_marked_vtable_pathp, bfs_unmarked_vtable_pathp,
19601         bfs_marked_new_vtablep, bfs_unmarked_new_vtablep): #if 0 unused
19602         functions.
19603         (n_fields_searched, n_calls_lookup_field, n_calls_lookup_field_1,
19604         n_calls_lookup_fnfields, n_calls_lookup_fnfields_1,
19605         n_calls_get_base_type, n_outer_fields_searched, n_contexts_saved):
19606         Only define #ifdef GATHER_STATISTICS.
19607         (reinit_search_statistics): Only init some vars if GATHER_STATISTICS
19608         is defined.
19609         (vbase_decl): Delete var definition.
19610         (init_search): Delete old decl.
19611         (init_vbase_pointers): Delete building of VBASE_DECL, since it's
19612         never actually used.
19613         (expand_indirect_vtbls_init): Delete init of VBASE_DECL.
19614         (get_base_distance_recursive): Delete unused fourth arg
19615         BASETYPE_PATH.  Fix call .
19616         (get_base_distance): Fix call.
19617         (push_class_decls): Delete unused var ID.
19618         (make_memoized_table_entry): Declare as static.
19619         (breadth_first_search): Declare as static.
19620         (tree_has_any_destructor_p): Declare as static.
19621         (pop_class_decls): Delete unused arg pop_class_decls.
19622         * class.c (popclass): Fix call to pop_class_decls.
19623         * cp-tree.h (make_memoized_table_entry, breadth_first_search,
19624         tree_has_any_destructor_p): Delete prototypes.
19626         * rtti.c (build_ptmf_desc): Delete unused arg TYPE.
19627         (build_t_desc): Fix call.  Delete unused vars ELEMS and TT.
19628         (build_dynamic_cast): Delete unused local vars TMP1 and RETVAL.
19629         (build_user_desc): Delete unused var T.
19630         (build_class_desc): Delete unused vars T and OFF.
19631         (build_t_desc): Delete unused var NAME_STRING.
19632         (build_headof): Make static.
19633         (get_bad_cast_node): Likewise.
19634         (get_def_to_follow): Likewise.
19635         * cp-tree.h (init_type_desc): Add prototype.
19636         (build_headof): Remove prototype.
19638 Thu Feb 22 00:54:22 1996  Jason Merrill  <jason@yorick.cygnus.com>
19640         * pt.c (tsubst): Only look for matching decls at file scope for
19641         non-member functions.
19643         * call.c (build_scoped_method_call): Handle scoped destructor
19644         calls in templates.
19646         * decl.c (*_top_level): Also save previous_class_values.
19648         * pt.c (tsubst_expr): Support do {} while loops.
19649         * parse.y (simple_stmt): Likewise.
19650         * tree.def: Likewise.
19652         * method.c (build_overload_identifier): For a class nested in a
19653         template class, don't mangle in the template parms from our
19654         context.
19656         * lex.c, cp-tree.h: Remove support for template instantiations in
19657         the pending_inlines code.
19658         * pt.c: Remove dead functions and unused arguments.
19659         (uses_template_parms): TYPENAME_TYPEs always use template parms.
19660         * parse.y: Stop passing anything to end_template_decl.
19661         * tree.c (print_lang_statistics): Only print tinst info #ifdef
19662         GATHER_STATISTICS.
19664 Wed Feb 21 16:57:33 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19666         * init.c (expand_recursive_init{,_1}): Delete decls.
19667         (sort_member_init): Delete unused var INIT.
19668         (emit_base_init): Delete unused var X.
19669         (build_offset_ref): Delete unused var CNAME.
19670         (sort_member_init): Delete unused var FIELDS_TO_UNMARK.
19671         (emit_base_init): Delete unused local var BASE.  Delete extern
19672         decl of IN_CHARGE_IDENTIFIER.
19673         (build_delete): Delete unused local var VIRTUAL_SIZE.
19675         * init.c (build_vec_delete): Delete unused third arg ELT_SIZE.
19676         (build_delete): Fix call.
19677         * decl2.c (delete_sanity): Likewise.
19678         * cp-tree.h (build_vec_delete): Update prototype.
19680         * typeck.c (common_base_type): Delete unused var TMP.
19681         (build_binary_op): Delete local var ARGS_SAVE.
19682         (build_array_ref): Delete unused var ITYPE.
19683         (c_expand_return): Delete unused var USE_TEMP.
19685         * typeck.c (compexcepttypes): Delete unused arg STRICT.
19686         (comptypes): Fix calls.
19687         * decl.c (duplicate_decls): Likewise.
19688         * cp-tree.h (compexcepttypes): Delete extra arg.
19690         * decl2.c (check_classfn): Delete unused second arg CNAME.
19691         * decl.c (start_decl, grokfndecl): Fix calls.
19692         * init.c (do_friend): Likewise.
19693         * cp-tree.h (check_classfn): Update prototype.
19695         * cp-tree.h (signature_error, import_export_vtable,
19696         append_signature_fields, id_in_current_class, mark_used,
19697         copy_assignment_arg_p): Add decls.
19698         * decl2.c (mark_used): Delete decl.
19700         * class.c (n_*): Wrap with #ifdef GATHER_STATISTICS.
19702         * class.c (get_vtable_entry): Disable unused function.
19703         (doing_hard_virtuals): Delete unused static global var.
19704         (finish_struct_1): Don't init DOING_HARD_VIRTUALS.
19705         (prepare_fresh_vtable): Delete unused vars PATH and RESULT.
19706         (overrides): Delete unused vars RETTYPE and BASE_RETTYPE.
19707         (modify_one_vtable): Delete unused var OLD_RTTI.
19708         (finish_struct_anon): Delete unused vars OFFSET and X.
19709         (finish_struct_bits): Delete unused var METHOD_VEC.
19710         (get_basefndecls): Delete unused var PURPOSE.  Delete unused
19711         for-scope local variable METHODS.
19713         * call.c (user_harshness): Delete unused/unneeded arg PARM.
19714         (ideal_candidate): Delete unused args BASETYPE and PARMS.
19715         (build_method_call): Delete unused args passed into ideal_candidate.
19716         (build_overload_call_real): Likewise.  Delete unused var OVERLOAD_NAME.
19717         * cp-tree.h (synthesize_method): Add decl.
19719         * decl.c (note_level_for_for): Give void return type.
19720         (pushdecl_nonclass_level): Likewise.
19721         (finish_function): Delete unused vars VFIELDS and ALLOCATED_THIS.
19722         (poplevel): Delete unused var IMPLICIT_TRY_BLOCK.
19723         (suspend_binding_level): Delete unused var LEVEL.
19724         (duplicate_decls): Delete unused var CTYPE.
19725         (duplicate_decls): Delete unused var PREVIOUS_C_DECL.
19726         (init_decl_processing): Delete unused vars FLOAT_ENDLINK and
19727         PTR_ENDLINK.
19728         (grokdeclarator): Delete unused var C.
19729         (grokdeclarator): Delete unused var SIZE_VARIES.
19730         (grokparms): Delete unused var SAW_VOID.
19731         (start_function): Delete unused var OLDDECL.
19732         (cplus_expand_expr_stmt): Delete unused var
19733         REMOVE_IMPLICIT_IMMEDIATELY.
19735         * cp-tree.h (pushdecl_nonclass_level): Fix prototype.
19737         * Makefile.in (CONFLICTS): Update to 12 shift/reduce.
19739 Wed Feb 21 00:06:17 1996  Jason Merrill  <jason@yorick.cygnus.com>
19741         * tree.c (build_min): Set TREE_COMPLEXITY to lineno.
19742         (build_min_nt): Likewise.
19743         * pt.c (do_pushlevel): Emit line note.
19744         (do_poplevel): Return what we get from poplevel.
19745         (tsubst_expr): Set lineno from TREE_COMPLEXITY in stmt nodes.
19746         * parse.y: Use do_pushlevel and do_poplevel.
19747         * cp-tree.h: Declare do_poplevel.
19749         * cp-tree.h: Declare at_eof.
19750         * decl.c (cp_finish_decl): Pass it to rest_of_decl_compilation.
19751         * decl2.c (import_export_decl): Renamed from import_export_inline.
19752         (finish_file): Call it to do interface handling for statics.
19753         * pt.c (tsubst_copy): Call mark_used on variables and functions
19754         used here.
19756         * decl2.c (finish_file): Don't emit statics we can't generate.
19757         * pt.c (instantiate_decl): Don't set interface on instantiations
19758         we can't generate.
19760         * cp-tree.h (struct tinst_level): Change 'classname' to 'decl'.
19761         * tree.c (print_lang_statistics): Print max template depth.
19762         * pt.c (push_tinst_level): Dump entire instantiation context.
19763         (instantiate_class_template): Use it and pop_tinst_level.
19764         (instantiate_decl): Likewise.
19766         * call.c class.c cp-tree.h decl.c decl2.c error.c lex.c method.c
19767         pt.c ptree.c tree.def: Remove all traces of UNINSTANTIATED_P_TYPE.
19769 Tue Feb 20 18:21:51 1996  Jason Merrill  <jason@yorick.cygnus.com>
19771         * call.c class.c cp-tree.h cvt.c decl.c decl2.c error.c expr.c
19772         init.c lex.c method.c parse.y pt.c repo.c search.c spew.c tree.c
19773         tree.def typeck.c typeck2.c xref.c: Massive, systemic changes for
19774         the new template implementation.
19776 Tue Feb 20 17:14:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19778         * decl2.c (check_cp_case_value): Use STRIP_TYPE_NOPS.
19780 Thu Feb 15 18:44:42 1996  Mike Stump  <mrs@cygnus.com>
19782         * decl.c (cp_finish_decl): Delay emitting the debug information for
19783         a typedef that has been installed as the canonical typedef, if the
19784         type has not yet been defined.
19786 Thu Feb 15 09:39:08 1996  Jason Merrill  <jason@yorick.cygnus.com>
19788         * decl2.c (grokfield): Still call pop_nested_class for access decls.
19790 Wed Feb 14 17:30:04 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19792         * decl.c (lookup_label): Call label_rtx.
19794         * decl.c (make_binding_level): New function.
19795         (pushlevel, pushlevel_class): Call it instead of explicit
19796         duplicate calls to xmalloc.
19798         * decl.c (init_decl_processing): Delete useless build_pointer_type
19799         call.
19801         * decl.c (float_ftype_float, ldouble_ftype_ldouble): Add definitions.
19802         (sizet_ftype_string): Delete variable.
19803         (init_decl_processing): Add built-in functions fabsf, fabsl,
19804         sqrtf, sqrtl, sinf, sin, sinl, cosf, cos, cosl.  New local
19805         variable strlen_ftype, used for strlen.
19807 Wed Feb 14 16:21:25 1996  Jason Merrill  <jason@yorick.cygnus.com>
19809         * decl.c (push_to_top_level): Start from current_binding_level
19810         again for now; the stl hacks depend on g++ being broken in this
19811         way, and it'll be fixed in the template rewrite.
19813         * tree.def: Add USING_DECL.
19814         * decl2.c (do_class_using_decl): Implement.
19815         (grokfield): Pass access decls off to do_class_using_decl instead of
19816         grokdeclarator.
19817         * error.c (dump_decl): Handle USING_DECLs.
19818         * decl.c (grokdeclarator): Remove code for handling access decls.
19819         * class.c (finish_struct_1): Adjust accordingly, treat using-decls
19820         as access decls for now.
19821         (finish_struct): Don't check USING_DECLs for other uses of the name.
19823         * search.c (get_matching_virtual): Use cp_error_at.
19825 Wed Feb 14 10:36:58 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19827         * typeck.c (comptypes): Default COMP_TYPE_ATTRIBUTES to 1, to
19828         match c-typeck.c.
19829         (self_promoting_args_p): Move the check that TYPE is non-nil
19830         before trying to look at its main variant.
19831         (unsigned_type, signed_type): Add checking of DI/SI/HI/QI nodes.
19833         * cp-tree.h (DECL_WAITING_FRIENDS, SET_DECL_WAITING_FRIENDS):
19834         Delete macros.
19835         * init.c (xref_friend, embrace_waiting_friends): Delete functions.
19836         (do_friend): Delete call to xref_friend.
19837         * class.c (finish_struct_1): Delete call to embrace_waiting_friends.
19839         * typeck.c (convert_sequence): #if 0 unused function.
19841         * cp-tree.h (DECL_IN_MEMORY_P): New macro w/ the check that used to
19842         be in decl_in_memory_p.
19843         (decl_in_memory_p): Delete decl.
19844         * expr.c (decl_in_memory_p): Delete fn.
19845         * typeck.c (mark_addressable): Use DECL_IN_MEMORY_P.
19847         * decl.c (cp_finish_decl): Use DECL_IN_MEMORY_P.
19849 Tue Feb 13 12:51:21 1996  Jason Merrill  <jason@yorick.cygnus.com>
19851         * class.c (finish_struct_1): Check for a pure-specifier on a
19852         non-virtual function here.
19854         * decl2.c (grok_function_init): Don't check whether the function
19855         is virtual here.
19856         (grokfield): Don't call check_for_override here.
19858         * decl.c (push_to_top_level): Start from inner_binding_level,
19859         check class_shadowed in class levels.
19861 Mon Feb 12 17:46:59 1996  Mike Stump  <mrs@cygnus.com>
19863         * decl.c (resume_level): Ignore things that don't have names, instead
19864         of core dumping.
19866 Mon Feb 12 15:47:44 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19868         * decl2.c (grokfield): Set DECL_VINDEX properly for FUNCTION_DECLs.
19870 Sat Feb 10 17:59:45 1996  Jason Merrill  <jason@yorick.cygnus.com>
19872         * class.c (finish_struct_1): Set DECL_VINDEX properly on a
19873         synthesized dtor.
19875         * parse.y (complete_type_name): Bind global_scope earlier.
19876         (complex_type_name): Likewise.
19877         (qualified_type_name): Remove.
19879 Thu Feb  8 15:15:14 1996  Jason Merrill  <jason@yorick.cygnus.com>
19881         * decl.c (grokfndecl): Move code that looks for virtuals in base
19882         classes...
19883         * class.c (check_for_override): ... to a new function.
19884         (finish_struct_1): Call it.
19886         * cp-tree.h: Declare warn_sign_compare.
19888         * typeck.c (build_binary_op_nodefault): Check warn_sign_compare
19889         rather than extra_warnings to decide whether to warn about
19890         comparison of signed and unsigned.
19892         * decl2.c (lang_decode_option): Handle warn_sign_compare.  -Wall
19893         implies -Wsign-compare.  -Wall doesn't imply -W.
19895 Wed Feb  7 15:27:57 1996  Mike Stump  <mrs@cygnus.com>
19897         * typeck.c (build_component_ref): Fix to handle anon unions in base
19898         classes as well.
19900 Wed Feb  7 14:29:12 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19902         * class.c (resolves_to_fixed_type_p): Delete code dealing with
19903         a WITH_CLEANUP_EXPR, since we don't generate them any more.
19904         * cvt.c (build_up_reference): Likewise.
19905         * decl.c (grok_reference_init): Likewise.
19906         (cp_finish_decl): Likewise.
19907         * error.c (dump_expr): Likewise.
19908         * tree.c (real_lvalue_p): Likewise.
19909         (lvalue_p): Likewise.
19910         (build_cplus_new): Likewise.
19911         (unsave_expr_now): Likewise.
19912         * typeck.c (unary_complex_lvalue, build_modify_expr,
19913         c_expand_return): Likewise.
19915 Tue Feb  6 13:39:22 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19917         Make the C++ front-end pay attention to attributes for structures.
19918         * class.c (finish_struct): New argument ATTRIBUTES, passed down into
19919         finish_struct_1.
19920         (finish_struct_1): New argument ATTRIBUTES; call cplus_decl_attributes.
19921         Take out old round_up_size use and setting the DECL_ALIGN possibly
19922         using it.  Take out setting of TYPE_ALIGN to round_up_size, which
19923         can override what the attribute set.
19924         * cp-tree.h (finish_struct): Update prototype.
19925         * parse.y (template_instantiate_once): Pass a NULL_TREE for the
19926         attributes to finish_struct.
19927         (structsp): For a CLASS decl, add maybe_attribute to rule and pass that
19928         value down into finish_struct.
19929         * Makefile.in (CONFLICTS): Switch to 7 shift/reduce conflicts.
19931 Tue Feb  6 13:12:15 1996  Per Bothner  <bothner@kalessin.cygnus.com>
19933         * decl.c (poplevel):  Re-word dead for local handling.
19934         (pushdecl):  Remove useless DECL_DEAD_FOR_LOCAL test.
19935         (cp_finish_decl):  If is_for_scope, check for duplicates so
19936         we can disable is_for_scope.  Otherwise, preserve_temp_slots.
19938         * lex.c (do_identifier):  Use global binding in preference of
19939         dead for local variable.
19941 Mon Feb  5 17:46:46 1996  Mike Stump  <mrs@cygnus.com>
19943         * init.c (initializing_context): Handle anon union changes, the
19944         context where fields of anon unions can be initialized now has to be
19945         found by walking up the TYPE_CONTEXT chain.
19947 Fri Feb  2 14:54:04 1996  Doug Evans  <dje@charmed.cygnus.com>
19949         * decl.c (start_decl): #ifdef out code to set DECL_COMMON
19950         if ASM_OUTPUT{,_ALIGNED}_BSS is defined.
19951         (obscure_complex_init): If bss is supported, always set
19952         DECL_INITIAL to error_mark_node.
19954 Thu Feb  1 16:19:56 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19956         * init.c (is_friend): Make sure there's a context before we see if
19957         it's an aggr type.
19959 Thu Feb  1 15:44:53 1996  Mike Stump  <mrs@cygnus.com>
19961         * init.c (is_friend): Classes are not friendly with nested classes.
19963 Thu Feb  1 15:27:37 1996  Doug Evans  <dje@charmed.cygnus.com>
19965         * lex.c (check_newline): Pass last character read to HANDLE_PRAGMA,
19966         and record its result.
19968 Thu Feb  1 09:27:01 1996  Mike Stump  <mrs@cygnus.com>
19970         * class.c (finish_struct_anon): Switch around code to not move anon
19971         union elements around, nor mess up their contexts, nor offsets,
19972         instead we now build up the right number of COMPONENT_REFs for all
19973         the anon unions that may be present at build_component_ref time.
19974         * typeck.c (lookup_anon_field): New routine to handle field lookup
19975         on fields without names.  We find them, based upon their unique type
19976         instead.
19977         * typeck.c (build_component_ref): Allow FIELD_DECL components.
19978         Handle finding components in anonymous unions, and ensure that a
19979         COMPONENT_REF is built for each level as necessary.
19981 Tue Jan 30 18:18:23 1996  Mike Stump  <mrs@cygnus.com>
19983         * cvt.c (build_up_reference): Make the INDIRECT_BIND case come after
19984         code that ensures that copy ctors are used if appropriate.
19986 Tue Jan 30 17:35:14 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
19988         * init.c (build_vec_delete): Only give an error if base isn't an
19989         error_mark_node.
19991 Mon Jan 29 17:09:06 1996  Mike Stump  <mrs@cygnus.com>
19993         * spew.c (do_aggr): `new struct S;' isn't a forward declaration.
19994         (yylex): If we see `new', keep slurping.
19996 Thu Jan 25 18:31:36 1996  Mike Stump  <mrs@cygnus.com>
19998         * class.c (finish_struct_1): Move code for handling anon unions...
19999         (finish_struct_anon): to here.  Fixup so that we do the offset
20000         calculations right, and so that the fields are physically moved to
20001         the containers's chain.
20003 Thu Jan 25 18:27:37 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20005         * decl.c (grokdeclarator): Avoid trying to get an operand off an
20006         identifier node.
20008 Wed Jan 24 11:25:30 1996  Jim Wilson  <wilson@chestnut.cygnus.com>
20010         * typeck.c (pointer_int_sum): Use TYPE_PRECISION (sizetype) not
20011         POINTER_SIZE to agree with expr.c.
20013 Thu Jan 25 13:01:23 1996  Mike Stump  <mrs@cygnus.com>
20015         * search.c (lookup_field): Don't report ambiguities if protect is 0,
20016         instead return NULL_TREE.
20018 Wed Jan 24 13:01:26 1996  Mike Stump  <mrs@cygnus.com>
20020         * class.c (finish_struct_1): Call warn_hidden if we want warnings
20021         about overloaded virtual functions.
20022         (warn_hidden): New routine to warn of virtual functions that are
20023         hidden by other virtual functions, that are not overridden.
20024         (get_basefndecls): New routine, used by warn_hidden.
20025         (mark_overriders): New routine, used by warn_hidden.
20026         * search.c (get_matching_virtual): Remove old warning that just
20027         isn't very useful.
20029 Tue Jan 23 12:26:10 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20031         * decl.c (output_builtin_tdesc_entries): #if 0 the function definition.
20033         * typeck.c (null_ptr_cst_p): Delete unused fn.
20034         (build_function_call_maybe): Delete unused fn.
20036         * expr.c (extract_init): #if 0 the code after unconditional return 0
20037         for now.
20039         Delete old cadillac code.
20040         * edsel.c: Remove file.
20041         * Make-lang.in (CXX_SRCS): Take edsel.c off the list.
20042         * Makefile.in (CXX_OBJS): Delete edsel.o.
20043         (edsel.o): Delete rule.
20044         * cp-tree.h (flag_cadillac): Delete var decl.
20045         * lang-options.h: Delete "-fcadillac" and "-fno-cadillac".
20046         * decl2.c (flag_cadillac): Delete var definition.
20047         (lang_decode_option): Delete handling of -fcadillac and -fno-cadillac.
20048         (grokfield): Delete code depending on flag_cadillac.
20049         (finish_anon_union): Likewise.
20050         * class.c (finish_struct_1): Likewise.
20051         (pushclass): Likewise.
20052         (popclass): Likewise.
20053         (push_lang_context): Likewise.
20054         (pop_lang_context): Likewise.
20055         * decl.c (init_decl_processing): Likewise.
20056         (start_decl): Likewise.
20057         (cp_finish_decl): Likewise.
20058         (xref_tag): Likewise.
20059         (finish_enum): Likewise.
20060         (start_function): Likewise.
20061         (finish_function): Likewise.
20062         (finish_stmt): Likewise.
20063         * lex.c (lang_init): Likewise.
20064         (check_newline): Likewise.
20066         * lex.c (do_pending_inlines): Delete synthesized method kludge.
20068         Delete defunct, ancient garbage collection implementation.
20069         * rtti.c: New file with the RTTI stuff from gc.c.
20070         * gc.c: Removed file (moved the remaining stuff into rtti.c).
20071         * Makefile.in (CXX_OBJS): Replace gc.o with rtti.o.
20072         (rtti.o): New rule, replacing gc.o.
20073         * Make-lang.in (CXX_SRCS): Replace gc.c with rtti.c.
20074         * cp-tree.h: Delete gc-related fn decls.
20075         (DECL_GC_OFFSET): Delete macro.
20076         (flag_gc): Delete extern decl.
20077         * decl.c (current_function_obstack_index): Delete var decl.
20078         (current_function_obstack_usage): Delete var decl.
20079         (start_function): Delete clearing of current_function_obstack_index
20080         and current_function_obstack_usage.
20081         (init_decl_processing): Delete code relying on -fgc.
20082         Delete call to init_gc_processing.
20083         (cp_finish_decl): Delete calls to build_static_gc_entry and
20084         type_needs_gc_entry.  Delete gc code setting DECL_GC_OFFSET.
20085         (store_parm_decls): Delete -fgc calls to cp_expand_decl_cleanup
20086         and to expand_expr of a __gc_main call.
20087         (maybe_gc_cleanup): Delete var decl.
20088         (finish_function): Delete call to expand_gc_prologue_and_epilogue.
20089         * decl2.c (flag_gc): Delete var decl.
20090         (lang_f_options): Delete offering of -fgc.
20091         (lang_decode_option): Delete -fgc and -fno-gc handling.
20092         (get_temp_regvar): Delete gc code.
20093         * init.c (build_new): Delete gc code.
20094         * lex.c (init_lex): Delete checking of flag_gc.
20096         * typeck.c (convert_arguments): Delete gc code.
20097         (build_component_addr): Delete -fgc warning.
20098         (build_modify_expr): Delete gc code.
20100         * decl2.c (build_push_scope): Delete fn.
20101         * cp-tree.h (build_push_scope): Delete decl.
20103         * search.c (clear_search_slots): Delete fn.
20104         * cp-tree.h (clear_search_slots): Delete decl.
20106         * search.c (tree_needs_constructor_p): Delete fn.
20107         * cp-tree.h (tree_needs_constructor_p): Delete decl.
20109         * tree.c (id_cmp): Delete fn.
20111         * tree.c (set_fnaddr_from_vtable_entry): Delete fn.
20112         * cp-tree.h (set_fnaddr_from_vtable_entry): Delete decl.
20114         * tree.c (decl_value_member): Delete fn.
20115         * cp-tree.h (decl_value_member): Delete decl.
20117         * tree.c (list_hash_lookup_or_cons): Delete fn.
20118         * cp-tree.h (list_hash_lookup_or_cons): Delete decl.
20120         * method.c (cplus_exception_name): Delete fn.
20121         (EXCEPTION_NAME_{PREFIX, LENGTH}): Delete macros.
20123         * spew.c (shift_tokens): Delete fn.
20125 Mon Jan 22 17:49:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20127         * except.c (init_exception_processing): Pass 1 to needs_pop in calls
20128         to cp_finish_decl.
20129         * parse.y: Likewise.
20131 Mon Jan 22 17:34:29 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20133         * tree.c (build_cplus_staticfn_type): Delete function definition;
20134         never used.
20135         * cp-tree.h (build_cplus_staticfn_type): Delete decl.
20137         * tree.c (virtual_member): Delete function definition; never used.
20138         * cp-tree.h (virtual_member): Delete decl.
20140 Fri Jan 19 18:03:14 1996  Mike Stump  <mrs@cygnus.com>
20142         * typeck.c (build_component_ref): Handle getting vbase pointers
20143         out of complex multiple inheritance better.
20145 Fri Jan 19 16:27:40 1996  Mike Stump  <mrs@cygnus.com>
20147         * typeck.c (build_object_ref): Make sure we use the real type, not
20148         any reference type.
20150 Fri Jan 19 16:01:47 1996  Mike Stump  <mrs@cygnus.com>
20152         * tree.c (build_exception_variant): Don't create new types if we
20153         don't have to, also build new types on the right obstack.
20155 Fri Jan 19 14:09:44 1996  Jason Merrill  <jason@yorick.cygnus.com>
20157         * decl.c (store_bindings): Split out from push_to_top_level.
20158         (push_to_top_level): Call it for b->type_shadowed on class binding
20159         levels.
20161 Fri Jan 19 13:53:14 1996  Mike Stump  <mrs@cygnus.com>
20163         * search.c (expand_upcast_fixups): Fix so that offsets stored in
20164         vbase_offsets are always right.  Fixes a problem where virtual base
20165         upcasting and downcasting could be wrong during conversions on this
20166         during virtual function dispatch at ctor/dtor time when dynamic
20167         vtable fixups for deltas are needed.  This only sounds easier than
20168         it is.  :-)
20169         (fixup_virtual_upcast_offsets): Change to reflect new calling
20170         convention for expand_upcast_fixups.
20172 Fri Jan 19 12:23:08 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20174         * decl2.c (grokbitfield): Strip the NOPs from WIDTH before we
20175         check that it's usable as the bitfield width.
20177 Wed Jan 17 21:22:40 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20179         * decl2.c (grokfield): Call cplus_decl_attributes with the attrlist.
20180         Pass a null tree to grokdeclarator for its ATTRLIST arg, since it's
20181         only ever used for functions in it.
20183 Wed Jan 17 12:10:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
20185         * parse.y (qualified_type_name): Use the TYPE_DECL, not the type.
20186         (nested_type): Likewise.
20187         (nested_name_specifier): Use lastiddecl.
20189         * decl.c (grokdeclarator): Adjust accordingly.
20190         * init.c (expand_member_init): Likewise.
20191         * parse.y (base_class): Likewise.
20192         * typeck2.c (build_functional_cast): Likewise.
20194         * typeck2.c (build_functional_cast): Fill in name after we've
20195         checked for non-aggr type.
20197 Wed Jan 17 10:18:01 1996  Mike Stump  <mrs@cygnus.com>
20199         * decl2.c (warn_pointer_arith): Default to on.
20201 Tue Jan 16 12:45:38 1996  Jason Merrill  <jason@yorick.cygnus.com>
20203         * lex.c (is_rid): New function.
20204         * decl.c (grokdeclarator): Diagnose reserved words used as
20205         declarator-ids.
20207 Tue Jan 16 11:39:40 1996  Jason Merrill  <jason@yorick.cygnus.com>
20209         * tree.c (get_decl_list): Don't lose cv-quals.
20211         * decl.c (grokdeclarator): Fix SCOPE_REF handling and diagnose
20212         typespecs used as declarator-ids.
20214 Tue Jan 16 11:09:42 1996  Mike Stump  <mrs@cygnus.com>
20216         * decl.c (poplevel): When poping a level, don't give a warning for
20217         any subblocks that already exist.
20219 Tue Jan 16 00:25:33 1996  Jason Merrill  <jason@yorick.cygnus.com>
20221         * typeck.c (build_object_ref): Finish what I started.
20223         * parse.y (qualified_type_name): Don't check TYPE_BUILT_IN.
20225         * decl2.c (constructor_name_full): Handle TEMPLATE_TYPE_PARMs.
20227         * decl.c (grokdeclarator): Also accept TEMPLATE_TYPE_PARM as a
20228         scope.
20230 Mon Jan 15 16:19:32 1996  Jason Merrill  <jason@yorick.cygnus.com>
20232         * decl.c (xref_tag): Handle passing a type in directly.
20234         * parse.y (qualified_type_name): Pull out the type.
20235         (nested_type): Likewise.
20236         Take types directly instead of as identifiers.
20237         * call.c (build_scoped_method_call): Take types directly instead of
20238         as identifiers.
20239         * decl.c (xref_basetypes): Likewise.
20240         * init.c (expand_member_init): Likewise.
20241         (build_member_call): Likewise.
20242         (build_offset_ref): Likewise.
20243         * typeck2.c (build_scoped_ref): Likewise, remove bogus code.
20244         * method.c (do_build_assign_ref): Likewise.
20245         * decl.c (grokdeclarator): Handle a type appearing as the
20246         declarator-id for constructors.
20247         * method.c (do_build_copy_constructor): current_base_init_list now
20248         uses the types directly, not their names.
20249         * init.c (sort_base_init): Likewise.
20250         (expand_member_init): Likewise.
20251         * init.c (is_aggr_type): New function, like is_aggr_typedef.
20253 Mon Jan 15 08:45:01 1996  Jeffrey A Law  <law@cygnus.com>
20255         * tree.c (layout_basetypes): Call build_lang_field_decl instead
20256         of build_lang_decl if first arg is a FIELD_DECL.
20258 Thu Jan 11 14:55:07 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20260         * decl.c (cp_finish_decl): Only clear TREE_USED if DECL_NAME is
20261         non-empty.
20262         * except.c (expand_start_catch_block): Set TREE_USED to avoid
20263         warnings about the catch handler.
20265 Mon Jan  8 17:35:12 1996  Jason Merrill  <jason@yorick.cygnus.com>
20267         * typeck.c (build_modify_expr): Use a COMPOUND_EXPR instead of
20268         expand_target_expr.
20270 Thu Jan  4 12:30:32 1996  Brendan Kehoe  <brendan@lisa.cygnus.com>
20272         Fix access control to use trees rather than integers.
20273         * class.c (access_{default, public, protected, private,
20274         default_virtual, public_virtual, private_virtual}_node): Add
20275         definitions.
20276         (init_class_processing): Do creation of those nodes.
20277         * cp-tree.h (access_type): Delete enum decl.
20278         (access_{default, public, protected, private, default_virtual,
20279         public_virtual, private_virtual}_node): Add decls.
20280         (compute_access): Change return type.
20281         * search.c (compute_access): Have tree return type, instead of enum.
20282         (lookup_field): Declare THIS_V and NEW_V to be tree nodes.
20283         * lex.c (real_yylex): Use yylval.ttype for giving the value of the
20284         access_* node for each of RID_{PUBLIC, PRIVATE, PROTECTED}.
20285         * parse.y (VISSPEC): Make ttype rather than itype.
20286         (base_class_access_list): Likewise.
20287         * *.[cy]: Change all refs of `access_public' to `access_public_node',
20288         etc.
20289         * call.c (build_method_call): Make ACCESS be a tree.
20290         * class.c (alter_access, finish_struct_1, filter_struct): Likewise.
20291         * cvt.c (convert_to_aggr): Likewise.
20292         * init.c (build_offset_ref, resolve_offset_ref, build_delete):
20293         Likewise.
20294         * method.c (hack_identifier): Likewise.
20295         * typeck.c (build_component_ref_1, build_component_ref): ): Likewise.
20297 Thu Jan  4 11:02:20 1996  Mike Stump  <mrs@cygnus.com>
20299         * typeck.c (pointer_int_sum, pointer_diff): Make code agree with C
20300         frontend, and make it more consistent with respect to
20301         warn_pointer_arith.
20303 Tue Jan  2 00:13:38 1996  Rusty Russell  <rusty@adelaide.maptek.com.au>
20305         * decl.c (pushdecl): Check for duplicate parameter names.
20307 Wed Jan  3 09:25:48 1996  Mike Stump  <mrs@cygnus.com>
20309         * decl.c (expand_static_init): Call assemble_external for atexit.
20311 Wed Jan  3 07:55:19 1996  Mike Stump  <mrs@cygnus.com>
20313         * except.c (do_unwind): Remove some generated dead code.
20314         (eh_outer_context): New routine, factor out some common code from
20315         expand_builtin_throw and end_eh_unwinder.  Add code to do return
20316         address masking for the PA.
20317         (expand_builtin_throw): Use eh_outer_context instead of open coding
20318         it here.
20319         (end_eh_unwinder): Likewise.
20321 Tue Jan  2 17:00:56 1996  Mike Stump  <mrs@cygnus.com>
20323         * except.c (expand_throw): Call assemble_external for __empty, if we
20324         use it.
20326 Thu Dec 28 11:13:15 1995  Mike Stump  <mrs@cygnus.com>
20328         * except.c (expand_builtin_throw): Use RETURN_ADDR_OFFSET instead of
20329         NORMAL_RETURN_ADDR_OFFSET.
20330         (end_eh_unwinder): Likewise.
20332 Wed Dec 27 22:18:16 1995  Mike Stump  <mrs@cygnus.com>
20334         * gc.c (build_dynamic_cast): Make sure we don't cast away const
20335         when dealing with references, and make sure we handle dynamic
20336         casting to a cv qualified reference.
20338 Thu Dec 21 23:50:35 1995  Mike Stump  <mrs@cygnus.com>
20340         * except.c (struct eh_context): New structure top hold eh context
20341         information.
20342         (push_eh_context): New routine.
20343         (pop_eh_context): Likewise.
20344         * decl.c (push_cp_function_context): Use them.
20345         (pop_cp_function_context): Likewise.
20347 Wed Dec 20 12:42:51 1995  Jason Merrill  <jason@yorick.cygnus.com>
20349         * decl2.c (finish_file): Also prune uninteresting functions in the
20350         inline emission loop.
20352 Wed Dec 20 02:32:07 1995  Jeffrey A Law  <law@cygnus.com>
20354         * sig.c (build_signature_table_constructor): Mark functions
20355         in the signature as referenced.
20357 Tue Dec 19 22:36:56 1995  Jason Merrill  <jason@yorick.cygnus.com>
20359         * decl2.c (finish_file): Do all the vtable/synthesis stuff before
20360         the inline emission stuff.
20362 Mon Dec 18 15:51:33 1995  Jason Merrill  <jason@yorick.cygnus.com>
20364         * cp-tree.h, decl2.c (flag_weak): New flag to control the use of
20365         weak symbols.
20366         * lang-options.h: Add -f{no-,}weak.
20367         * decl.c (init_decl_processing): If the target does not support weak
20368         symbols, don't use them.
20369         * decl2.c, pt.c: s/SUPPORTS_WEAK/flag_weak/.
20371 Sun Dec 17 21:13:23 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
20373         * init.c (expand_member_init): warning for base init after members.
20375 Fri Dec 15 15:32:18 1995  Jason Merrill  <jason@yorick.cygnus.com>
20377         * cvt.c (build_expr_type_conversion): Don't convert to a reference
20378         type.
20380 Thu Dec 14 16:05:58 1995  Mike Stump  <mrs@cygnus.com>
20382         * method.c (report_type_mismatch): Improve wording for volatile
20383         mismatches.
20385 Thu Dec 14 14:16:26 1995  Mike Stump  <mrs@cygnus.com>
20387         * init.c (expand_aggr_init_1): Use expand_aggr_init_1 instead of
20388         expand_assignment, as the later doesn't handle things that have
20389         copy constructors well.  The compiler would do bitwise copying,
20390         instead of ctor calling in some cases.
20392 Wed Dec 13 17:05:54 1995  Paul Eggert  <eggert@twinsun.com>
20394         * g++.c (my_strerror): Return "cannot access" if errno is 0.
20395         (pfatal_with_name, perror_exec): Don't assume that
20396         the returned value from my_strerror contains no '%'s.
20397         (concat): Remove.
20398         (sys_nerror): Declare only if HAVE_STRERROR is not defined.
20400 Wed Dec 13 16:22:38 1995  Jason Merrill  <jason@yorick.cygnus.com>
20402         Lose CLASSTYPE_METHODS/DECL_NEXT_METHOD chain; make
20403         TYPE_METHODS/TREE_CHAIN mean what they used to.
20404         * decl2.c (constructor_name_full): Refer to CLASSTYPE_METHOD_VEC
20405         instead of TYPE_METHODS.
20406         * decl.c (duplicate_decls): Lose references to DECL_NEXT_METHOD.
20407         * tree.c (tree_copy_lang_decl_for_deferred_output): Likewise.
20408         * cp-tree.h (CLASSTYPE_METHODS): Lose.
20409         (CLASSTYPE_METHOD_VEC): Point to lang_spec->methods instead of
20410         TYPE_METHODS.
20411         (struct lang_decl): Lose next_method field.
20412         (DECL_NEXT_METHOD): Lose.
20413         * class.c (finish_struct_methods): Don't mess with TYPE_METHODS.
20414         (finish_struct): Just use TYPE_METHODS; we don't need fn_fields
20415         anymore.
20416         (finish_struct_methods): Don't mess with the TREE_CHAINs in
20417         fn_fields.
20419         * search.c (add_conversions): Don't use TREE_CHAIN to traverse method
20420         vector.
20422         * call.c (build_method_call): Synthesize here even when not inlining.
20423         * typeck.c (build_function_call_real): Likewise.
20425 Wed Dec 13 15:02:39 1995  Ian Lance Taylor  <ian@cygnus.com>
20427         * cp/lex.c (check_newline): If DBX_DEBUGGING_INFO and write_symbols
20428         == DBX_DEBUG, call dbxout_start_new_source_file and
20429         dbxout_resume_previous_source_file when appropriate.
20431 Tue Dec 12 20:38:55 1995  Mike Stump  <mrs@cygnus.com>
20433         * except.c (start_anon_func): Push to the top level.
20434         (end_anon_func): Pop from the top level.
20436 Mon Dec 11 18:56:14 1995  Mike Stump  <mrs@cygnus.com>
20438         * cp-tree.h (build_cleanup): New routine to build cleanups.
20439         * decl.c (expand_static_init): Use build_cleanup to build a cleanup
20440         call at ctor time and use atexit to run it later.
20441         * decl2.c (build_cleanup): New routine, taken from finish_file.
20442         (finish_file): Use build_cleanup instead, and don't put function
20443         local statics in global dtor list.
20445 Wed Dec  6 14:34:29 1995  Mike Stump  <mrs@cygnus.com>
20447         * except.c (expand_throw): Ensure that we have cleanups, if we try
20448         and expand cleanups.
20450 Wed Dec  6 11:48:21 1995  Mike Stump  <mrs@cygnus.com>
20452         * except.c (expand_throw): Add logic to manage dynamic cleanups for
20453         the EH object.
20454         (expand_end_catch_block): Use the magic of expand_goto, instead of
20455         emit_jump so that we get the cleanup for any catch clause parameter
20456         and the cleanup for the exception object.  Update to reflect label
20457         changes.
20458         (push_eh_cleanup): New routine to register a cleanup for an
20459         exception object.
20460         (empty_fndecl): Used to default cleanup actions to
20461         nothing.
20462         (init_exception_processing): Setup empty_fndecl.  Setup
20463         saved_cleanup.
20464         (expand_start_catch_block): Update to reflect label changes.  Call
20465         push_eh_object to register the cleanup for the EH object.
20466         (start_anon_func): New routine to start building lambda expressions
20467         from trees.
20468         (end_anon_func): New routine to end them.
20469         (struct labelNode): Change so that we can use tree labels, or rtx
20470         labels.
20471         (saved_cleanup): Object to check for dynamic cleanups for the
20472         exception handling object.
20473         (push_label_entry): Change so that we can use tree labels, or rtx
20474         labels.
20475         (pop_label_entry): Likewise.
20476         (top_label_entry): Likewise.
20477         (expand_start_all_catch): Use tree label instead of rtx label, so
20478         that we can get the magic of expand_goto.
20479         (expand_end_all_catch): Update to reflect label changes.
20481         * class.c (build_vfn_ref): Remove building_cleanup logic, as we now
20482         use UNSAVE_EXPRs.
20483         * typeck.c (get_member_function_from_ptrfunc): Remove remnants of
20484         building_cleanup logic, as we now use UNSAVE_EXPRs.
20485         * cp-tree.h (unsave_expr): Declare it.
20486         * decl.c (building_cleanup): Remove.
20487         (maybe_build_cleanup): Remove building_cleanup logic, and use
20488         UNSAVE_EXPR instead.
20490 Sun Dec  3 01:34:58 1995  Mike Stump  <mrs@cygnus.com>
20492         * gc.c (build_t_desc): Update error message to say <typeinfo>.
20494 Thu Nov 30 12:30:05 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
20496         * decl.c (pushdecl): Only warn about shadowing a local variable if
20497         warn_shadow is true.
20499 Sun Nov 26 16:06:55 1995  Rusty Russell  <rusty@adelaide.maptek.com.au>
20501         * typeck.c (build_binary_op_nodefault): Added warning about
20502         comparisons between different enum types with -Wall, unless
20503         -fenum-int-equiv set.
20505 Wed Nov 22 15:44:02 1995  Mike Stump  <mrs@cygnus.com>
20507         * class.c (finish_struct_1): Skip down to the inner type in
20508         multidimensional arrays.  Ensures ctors will be made for types that
20509         need constructing.
20511 Wed Nov 22 14:19:22 1995  Mike Stump  <mrs@cygnus.com>
20513         * decl.c (last_dtor_insn): New to track the last compiler generated
20514         insn in a dtor.
20515         (store_parm_decls): Set it.
20516         (finish_function): Use it to see if the dtor is empty.  Avoid doing
20517         vtable setup all the time, if we can.
20518         (struct cp_function): Add last_dtor_insn.
20519         (push_cp_function_context): Save it.
20520         (pop_cp_function_context): Restore it.
20522 Wed Nov 22 11:52:19 1995  Paul Russell  <Rusty.Russell@adelaide.maptek.com.au>
20524         * typeck.c (build_unary_op): Set TREE_NO_UNUSED_WARNING to avoid
20525         warnings.
20527 Tue Nov 21 17:15:23 1995  Mike Stump  <mrs@cygnus.com>
20529         * typeck.c (expand_target_expr): Make sure targets get put into the
20530         current temp_slot_level, so that the free_temp_slots call will reuse
20531         them.
20533 Tue Nov 21 13:32:03 1995  Mike Stump  <mrs@cygnus.com>
20535         * class.c (finish_struct_1): Delay delta fixups for virtual bases
20536         until after we have done the hard virtuals, to avoid a bogus `every
20537         virtual function must have a unique final overrider' for virtual
20538         functions that are only overridden by hard virtuals.
20540 Thu Nov  9 13:35:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
20542         * pt.c (do_function_instantiation): Don't try to find a file-scope
20543         template for a member function.
20545 Tue Nov 14 06:20:35 1995  Mike Stump  <mrs@cygnus.com>
20547         * g++.c (main): Add handling of -nodefaultlibs.
20549 Mon Nov 13 15:45:34 1995  Mike Stump  <mrs@cygnus.com>
20551         * cp-tree.h (INDIRECT_BIND): Add a way for the frontend to
20552         distinguish between direct bindings of reference variables, and
20553         indirect bindings of reference variables.
20554         * cvt.c (build_up_reference): Use it.
20555         * typeck.c (convert_arguments): Use it to indicate this is an
20556         indirect binding.
20557         * decl.c (cp_finish_decl): Ensure that we reuse stack slots as fast
20558         as they are unused.
20559         (expand_static_init): Likewise.
20560         (cplus_expand_expr_stmt): Likewise.
20561         * decl2.c (finish_file): Likewise.
20562         * init.c (perform_member_init): Likewise.
20563         (emit_base_init): Likewise.
20564         (expand_aggr_vbase_init_1): Likewise.
20566 Fri Nov 10 09:18:09 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
20568         * decl.c (push_namespace): Rewrite to use build_lang_decl, so we
20569         get a DECL_LANG_SPECIFIC node.
20570         * cp-tree.h (lang_decl_flags): Add new member `level'.
20571         (NAMESPACE_LEVEL): Don't use decl.arguments, instead use the
20572         decl_flags level member.
20574 Mon Nov  6 18:36:13 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
20576         * call.c (build_method_call): Make sure instance has a
20577         TYPE_LANG_SPECIFIC node before we dive into it.
20579 Sat Nov  4 20:01:52 1995  Jason Molenda  <crash@phydeaux.cygnus.com>
20581         * method.c (make_thunk): Use TREE_SET_CODE to set thunk's tree code.
20583 Thu Nov  2 17:56:57 1995  Mike Stump  <mrs@cygnus.com>
20585         * decl.c (duplicate_decls): When smashing decls, smash staticness in
20586         the usual way.
20588 Thu Nov  2 16:44:02 1995  Mike Stump  <mrs@cygnus.com>
20590         * decl.c (poplevel): Handle the merging of subblocks of cleanups
20591         when finishing blocks that have already been created (usually due to
20592         the fixup goto code).  Fixes bad debugging information.
20594 Wed Nov  1 12:33:53 1995  Jason Merrill  <jason@yorick.cygnus.com>
20596         * method.c (hack_identifier): Don't abort when we get a TREE_LIST
20597         that's not a list of overloaded functions.
20599 Wed Nov  1 11:38:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
20601         * decl2.c (mark_vtable_entries): Check DECL_LANG_SPECIFIC on fn
20602         before trying to use DECL_ABSTRACT_VIRTUAL_P.
20604 Tue Oct 31 11:56:55 1995  Jason Merrill  <jason@yorick.cygnus.com>
20606         * decl2.c (mark_used): New function for hooking into setting of
20607         TREE_USED on decls.
20608         * call.c (build_method_call): Use it.
20609         * class.c (instantiate_type): Likewise.
20610         * init.c (build_offset_ref): Likewise.  Don't call assemble_external
20611         for all like-named functions.
20612         * method.c (hack_identifier): Likewise.
20613         (emit_thunk): Don't call assemble_external.
20614         (make_thunk): Create thunk as a FUNCTION_DECL so that it
20615         gets the right mode and ENCODE_SECTION_INFO works.
20617         * parse.y: Use mark_used.  Pass operator names to do_identifier.
20618         * lex.c (do_identifier): Handle operator names.
20620         * decl2.c (grokclassfn): Tweak __in_chrg attributes.
20622 Thu Oct 26 16:45:58 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
20624         * errfn.c: Include stdio.h.
20625         (cp_sprintf): Take out decl of sprintf, and cast sprintf to errorfn*.
20627 Wed Oct 25 18:58:41 1995  Mike Stump  <mrs@cygnus.com>
20629         * typeck2.c (digest_init): Always convert initializers to the
20630         right type.
20632 Wed Oct 25 13:25:24 1995  Mike Stump  <mrs@cygnus.com>
20634         * init.c (member_init_ok_or_else): Don't allow member initializers
20635         for indirect members, as it is invalid.
20637 Wed Oct 25 11:35:28 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
20639         * decl.c (grokdeclarator): Don't allow `friend signed ()'.
20641 Fri Oct 20 10:30:59 1995  Mike Stump  <mrs@cygnus.com>
20643         * parse.y (for.init.statement): Catch compound statements inside for
20644         initializations, if we're being pedantic.
20646 Fri Oct 20 10:03:42 1995  Mike Stump  <mrs@cygnus.com>
20648         * decl.c (lookup_tag): Return NULL_TREE if we don't find what we are
20649         looking for.
20651 Thu Oct 19 14:26:10 1995  Mike Stump  <mrs@cygnus.com>
20653         * error.c (dump_expr): Don't core dump when a boolean expression is
20654         used as a default argument.
20656 Thu Oct 19 10:36:30 1995  Jason Merrill  <jason@yorick.cygnus.com>
20658         * class.c (finish_struct_bits): Check aggregate_value_p instead of
20659         RETURN_IN_MEMORY.
20661 Wed Oct 18 18:12:32 1995  Jason Merrill  <jason@yorick.cygnus.com>
20663         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE on a
20664         BLKmode type that would otherwise be returned in registers.
20666 Mon Oct 16 12:32:19 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
20668         * g++.c (WITHLIBC): New macro.
20669         (main): Declare saw_libc.  Use WITHLIBC if `-lc' was used; set
20670         saw_libc and pass it at the end if it was set.
20672 Wed Oct 11 16:30:34 1995  Brendan Kehoe  <brendan@lisa.cygnus.com>
20674         * parse.y (fn.def1): Call split_specs_attrs in
20675         declmods notype_declarator case.