OSDN Git Service

* Missed.
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2002-07-25  Neil Booth  <neil@daikokuya.co.uk>
2
3         * decl2.c (cxx_decode_option): Similarly.
4
5 2002-07-25  Gabriel Dos Reis  <gdr@nerim.net>
6
7         * cp-tree.h (cxx_sizeof_nowarn): Now a macro.
8         (cxx_sizeof_or_alignof_type): Take a third argument.
9         (cxx_sizeof): Adjust definition.
10         (cxx_alignof): Likewise.
11         * init.c (build_delete): Use cxx_sizeof_nowarn to reflect reality.
12         * typeck.c (cxx_sizeof_or_alignof_type): Take a third argument for
13         complaining.
14         (c_sizeof_nowarn): Remove definition.
15         (build_unary_op): Use cxx_sizeof_nowarn.
16
17 2002-07-24  Geoffrey Keating  <geoffk@redhat.com>
18
19         * tree.c (cp_build_qualified_type_real): When copying
20         pointer-to-method types, unshare the record that holds
21         the cached pointer-to-member-function type.
22
23 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
24
25         * cp-tree.h (FILE_FUNCTION_PREFIX_LEN): Remove.
26
27 2002-07-23  Gabriel Dos Reis  <gdr@nerim.net>
28
29         Fix PR/7363:
30         * typeck.c (cxx_sizeof_or_alignof_type): New function.
31         (c_sizeof): Remove definition.
32         (expr_sizeof): Use cxx_sizeof.
33         * decl2.c (build_expr_from_tree): Use cxx_sizeof_or_alignof_type.
34         * decl.c (finish_destructor_body): Use cxx_sizeof.
35         * semantics.c (finish_alignof): Likewise.
36         (finish_alignof): Use cxx_alignof.
37         * cp-tree.h (cxx_sizeof, cxx_alignof): New macros.
38         (cxx_sizeof_or_alignof_type): Declare.
39         (my_friendly_assert): Move to ../c-common.h.
40
41 2002-07-23  Neil Booth  <neil@daikokuya.co.uk>
42
43         * class.c, method.c, pt.c, search.c: Don't define obstack macros.
44
45 2002-07-22  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
46
47         PR c++/7347, c++/7348
48         * cp-tree.h (tsubst_flags_t): Add tf_parsing.
49         * decl.c (make_typename_type): Use it.
50         (make_unbound_class_template): Likewise.
51         (lookup_name_real): Don't call type_access_control if scope is
52         template parameter dependent.
53         * parse.y (template_arg): Call make_unbound_class_template with
54         tf_parsing set.
55         (nest_name_specifier): Call make_typename_type with tf_parsing set.
56         (typename_sub0): Likewise.
57         (typename_sub1): Likewise.
58         (instantiate_decl): Push class scope.
59         * pt.c (regenerate_decl_from_template): Call pushclass and popclass
60         for both static variable and member function template.
61         (instantiate_decl) Call pushclass and popclass when tsubst'ing type
62         and arguments.
63         * search.c (type_access_control): Do type access for TEMPLATE_DECL
64         too.
65
66 2002-07-20  Roger Sayle  <roger@eyesopen.com>
67
68         * decl2.c (cxx_decode_option): Simplify -fhandle-exceptions
69         test by using positive_option.  Make whitespace consistent.
70
71 2002-07-20  Gabriel Dos Reis  <gdr@nerim.net>
72
73         * spew.c (struct unparsed_test): Replace 'filename' and 'lineno'
74         members with 'locus'.  Adjust use throughout.
75         (struct feed):  Likewise.
76         (alloc_unparsed_test): Change prototype, take a 'const location_t *'.
77         Adjust use.
78         (snarf_defarg): Use error(), not error_with_file_and_line().
79
80 2002-07-19  Chris Demetriou  <cgd@broadcom.com>
81
82         * lang-specs.h (@c++): Include "%2" (cc1plus_spec) wherever
83         cpp_options is included.
84
85 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
86
87         PR c++/2862, c++/2863
88         * pt.c (determine_specialization): Compare the length of
89         TYPE_ARG_TYPES.  Tidy.
90
91 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
92
93         PR c++/3797
94         * decl.c (duplicate_decls): Don't propagate inlining parameters from
95         olddecl to newdecl when newdecl is a specialization of the 
96         instantiation olddecl.
97
98 2002-07-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
99
100         PR c++/4802, c++/5387
101         * decl.c (make_typename_type): Use enforce_access.
102
103 2002-07-17  Scott Snyder <snyder@fnal.gov>
104
105         PR c++/7320
106         * rtti.c (get_tinfo_decl): Set DECL_COMDAT.
107
108 2002-07-12  Mark Mitchell  <mark@codesourcery.com>
109
110         * class.c (add_method): Correct handling of conversion operators.
111
112 2002-07-11  Mark Mitchell  <mark@codesourcery.com>
113
114         PR c++/7224
115         * class.c (add_method): Simplify.
116
117 2002-07-11  Jason Merrill  <jason@redhat.com>
118
119         PR c++/7279
120         * tree.c (cp_copy_res_decl_for_inlining): Also copy
121         TREE_ADDRESSABLE.
122
123 2002-07-10  Graham Stott  <graham.stott@btinternet.com>
124
125         * pt.c (template_parm_this_level_p, push_template_decl_real):
126         Pass depth as int pointer. 
127
128 2002-07-11  Tim Josling  <tej@melbpc.org.au>
129
130         Remove front end hard coding from gengtype.c.  
131
132         * config-lang.in (gtfiles): Add files needed for this front end.
133
134 2002-07-10  Mark Mitchell  <mark@codesourcery.com>
135
136         * cp-tree.h (unqualified_name_lookup_error): Declare it.
137         (begin_function_definition): Adjust prototype.
138         * lex.c (unqualified_name_lookup_error): New function, split out
139         from ...
140         (do_identifier): ... here.
141         * parse.y (parse_begin_function_definition): New function.
142         (fn.def1): Use it.
143         * semantics.c (begin_function_definition): Accept decl-specifiers
144         and attributes as separate parameters.
145
146 2002-07-10  Jason Merrill  <jason@redhat.com>
147
148         PR c++/6255
149         * decl.c (lookup_name_real): Build a new TYPENAME_TYPE rather than
150         modifying the old one.
151
152 2002-07-09  Mark Mitchell  <mark@codesourcery.com>
153
154         * cp-tree.h (constructor_name_p): Declare it.
155         (check_template_template_default_arg): Likewise.
156         * class.c (handle_using_decl): Use constructor_name_p.
157         * decl.c (grokdeclarator): Likewise.
158         * decl2.c (constructor_name_p): Define it.
159         * init.c (build_member_call): Use constructor_name_p.
160         * parse.y (template_parm): Use check_template_template_default_arg.
161         * pt.c (check_explicit_specialization): Use constructor_name_p.
162         * semantics.c (check_template_template_default_arg): New function.
163         
164 2002-07-08  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
165
166         * pt.c (can_complete_type_without_circularity): Add static to
167         function definition.
168
169 2002-07-08  Mark Mitchell  <mark@codesourcery.com>
170
171         * cp-tree.h (have_extern_spec): Declare it
172         * decl.c (have_extern_spec): Define it.
173         (start_decl): Eliminate use of used_extern_spec.
174         (start_function): Likewise.
175         * parse.y (have_extern_spec): Remove declaration.
176         (used_extern_spec): Likewise.
177         (frob_specs): Eliminate use of used_extern_spec.
178         (.hush_warning): Likewise.
179
180 2002-07-07  Mark Mitchell  <mark@codesourcery.com>
181
182         * Make-lang.in (cp/parse.o): Depend on decl.h.
183         * cp-tree.h (do_decl_instantiation): Change prototype.
184         * parse.y: Include decl.h.
185         (parse_decl_instantiation): New function.
186         (explicit_instantiation): Use it.
187         * pt.c (do_decl_instantiation): Accept a DECL, not a DECLARATOR
188         and DECLSPECS.
189         
190 2002-07-07  Roger Sayle  <roger@eyesopen.com>
191
192         * error.c (dump_function_name): Use DECL_TEMPLATE_RESULT for
193         constructor and destructor tests when passed a TEMPLATE_DECL.
194
195 2002-07-05  Jason Merrill  <jason@redhat.com>
196
197         * cvt.c (cp_convert_to_pointer): Call force_fit_type for null
198         pointers.
199
200         PR optimization/7145
201         * tree.c (cp_copy_res_decl_for_inlining): Also copy DECL_INITIAL.
202
203 2002-07-05  Nathan Sidwell  <nathan@codesourcery.com>
204
205         Repair damage on weak-impared targets caused by my previous patch.
206         * cp-tree.h (import_export_tinfo): Add parameter.
207         * decl2.c (import_export_tinfo): Add parameter, post adjust
208         DECL_COMDAT.
209         * rtti.c (emit_tinfo_decl): DECL_COMDAT is (nearly) always setup by
210         import_export_tinfo.
211
212 2002-07-03  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
213
214         PR c++/6944
215         * init.c (build_aggr_init): Remove qualifiers of init before calling
216         build_vec_init.
217         (build_vec_init): Flatten multi-dimensional array during cleanup.
218         (build_vec_delete_1): Abort if the type of each element is array.
219
220 2002-07-03  Graham Stott  <graham.stott@btinternet.com>
221
222         * pt.c (instantiate_class_template): Fix typo.
223
224 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
225
226         * typeck2.c (cxx_incomplete_type_diagnostic): Fix typo caused
227         by CVS conflict in my last patch.
228
229 2002-07-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
230
231         PR c++/6716
232         * pt.c (can_complete_type_without_circularity): New function.
233         (instantiate_class_template): Use it.
234         * typeck2.c (cxx_incomplete_type_diagnostic): Improve error
235         message due to incomplete fields.
236
237 2002-07-01  Mark Mitchell  <mark@codesourcery.com>
238
239         PR c++/7112
240         * mangle.c (write_expression): Add mangling for sizeof when
241         applied to a type.
242         * operators.def: Remove stale comment.
243
244 2002-06-30  Nathan Sidwell  <nathan@codesourcery.com>
245
246         * cp-tree.h (CPTI_TINFO_DECL_TYPE): Replace with ...
247         (CPTI_TYPE_INFO_PTR_TYPE): ... this.
248         (tinfo_decl_type): Replace with ...
249         (type_info_ptr_type): ... this.
250         (import_export_tinfo): Declare.
251         (tinfo_decl_p): Rename to ...
252         (unemitted_tinfo_decl_p): ... this.
253         * decl2.c (import_export_decl): Break out tinfo handling into ...
254         (import_export_tinfo): ... here. New function.
255         (finish_file): Adjust.
256         * rtti.c (TINFO_REAL_NAME): New macro.
257         (init_rtti_processing): Create the tinfo types.
258         (get_tinfo_decl_dynamic): Use type_info_ptr_type, get_tinfo_ptr.
259         (get_tinfo_decl): Adjust.
260         (get_tinfo_ptr): New function.
261         (get_type_id): Use it.
262         (tinfo_base_init): Create vtable decl here, if it doesn't exist.
263         (ptr_initializer): Use get_tinfo_ptr.
264         (ptm_initializer): Likewise.
265         (synthesize_tinfo_var): Break into ...
266         (get_pseudo_ti_init): ... this. Just create the initializer.
267         (get_pseudo_ti_desc): .. and this.
268         (create_real_tinfo_var): Remove.
269         (create_pseudo_type_info): Don't create the vtable decl here.
270         (get_vmi_pseudo_type_info): Remove.
271         (create_tinfo_types): Adjust.
272         (tinfo_decl_p): Rename to ...
273         (unemitted_tinfo_decl_p): ... here. Adjust.
274         (emit_tinfo_decl): Adjust. Create the initializer.
275
276 2002-06-27  Mark Mitchell  <mark@codesourcery.com>
277
278         PR c++/6695
279         * pt.c (tsubst_friend_class): Substitute into the context of the
280         friend before using it.
281
282 2002-06-26  Mark Mitchell  <mark@codesourcery.com>
283
284         * cp-tree.h (xref_tag): Change prototype.
285         (handle_class_head): Likewise.
286         (build_x_component_ref): Likewise.
287         * decl.c (cxx_init_decl_processing): Adjust call to xref_tag.
288         (xref_tag): Take attributes as a separate parameter.
289         (xref_tag_from_type): Adjust call to xref_tag.
290         * decl2.c (build_expr_from_tree): Adjust call to
291         build_x_component_ref.
292         (handle_class_head): Take attributes as a separate parameter.
293         * parse.y (parse_xref_tag): New function.
294         (parse_handle_class_head): Likewise.
295         (primary): Use parse_xref_tag.
296         (class_head_decl): Use parse_handle_class_head.
297         (class_head_defn): Likewise.
298         * rtti.c (init_rtti_processing): Adjust call to xref_tag.
299         (build_dynamic_cast_1): Likewise.
300         (create_pseudo_type_info): Likewise.
301         (emit_support_tinfos): Likewise.
302         * typeck.c (build_object_ref): Adjust call to
303         build_x_component_ref.
304         (build_x_component_ref): Remove protect parameter.
305         
306 2002-06-25  Mark Mitchell  <mark@codesourcery.com>
307
308         * call.c (build_op_delete_call): Use BASELINK_FUNCTIONS.
309         * class.c (handle_using_decl): Likewise.
310         (instantiate_type): Likewise.
311         * cp-tree.h (BASELINK_FUNCTIONS): New macro.
312         (xref_basetypes): Change prototype.
313         (begin_mem_initializers): New function.
314         (get_overloaded_fn): Likewise.
315         * decl.c (xref_basetypes): Simplify.
316         * error.c (dump_expr): Use BASELINK_FUNCTIONS.
317         * init.c (build_offset_ref): Likewise.
318         * parse.y (base_init): Use begin_mem_initializers().
319         (structsp): Adjust call to xref_basetypes.
320         * pt.c (determine_specialization): Use BASELINK_FUNCTIONS.
321         (instantiate_class_template): Adjust call to xref_basetypes.
322         * semantics.c (begin_mem_initializers): New function.
323         * tree.c (is_overloaded_fn): Use BASELINK_FUNCTIONS.
324         (really_overlaoded_fn): Likewise.
325         (get_overloaded_fn): New function.'
326         (get_first_fn): USe BASELINK_FUNCTIONS.
327         
328 2002-06-24  Mark Mitchell  <mark@codesourcery.com>
329
330         * cp-tree.h (SCALAR_TYPE_P): New macro.
331         (check_for_out_of_scope_variable): New function.
332         (at_class_scope_p): Likewise.
333         (finish_fname): Likewise.
334         * class.c (finish_struct): Use at_function_scope_p.
335         * decl.c (check_for_out_of_scope_variable): New function, split
336         out from do_identifier.
337         (finish_enum): Use at_function_scope_p.
338         * lex.c (do_identifier): Use check_for_out_of_scope_variable.
339         * parse.y (VAR_FUNC_NAME): Give it <ttype>.  Use finish_fname.
340         (primary): Use at_function_scope_p.
341         * search.c (at_class_scope_p): New function.
342         * semantics.c (finish_fname): Likewise.
343         (check_multiple_declarators): Use at_function_scope_p.
344         
345 2002-06-23  Mark Mitchell  <mark@codesourcery.com>
346
347         * parse.y (parse_scoped_id): New function.
348         (primary): Use it.
349         * cp-tree.h (do_scoped_id): Adjust declaration.
350         * lex.c (do_scoped_id): Remove call to yylex.
351         * decl2.c (build_expr_from_tree): Adjust use of do_scoped_id.
352         * typeck2.c (add_exception_specifier): Use tree_cons, rather than
353         expanding it inline.
354         
355 2002-06-23  Matt Thomas  <matt@3am-software.com>
356
357         * decl.c (finish_function): Change "#ifdef VMS_TARGET" to
358         "#if VMS_TARGET".
359
360 2002-06-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
361
362         * mangle.c (integer_type_codes): Const-ify.
363
364 2002-06-20  Richard Henderson  <rth@redhat.com>
365
366         PR c++/6747
367         * typeck.c (mark_addressable): Don't test TREE_ADDRESSABLE early.
368         Call put_var_into_stack.
369
370 2002-06-20  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
371
372         * spew.c (remove_last_token): Use ARRAY_SIZE in lieu of explicit
373         array size calculation.
374
375 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
376
377         PR c++/6892
378         * pt.c (tsubst_expr): Handle FILE_STMT.
379
380 2002-06-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
381
382         PR c++/6723
383         * pt.c (lookup_template_class): Don't build complete argument of
384         BOUND_TEMPLATE_TEMPLATE_PARM if appeared as a default template
385         argument.
386
387 2002-06-19  Akim Demaille  <akim@epita.fr>
388
389         * parse.y (TYPENAME): Rename as tTYPENAME to avoid the clash with
390         decl.h's TYPENAME.
391         * spew.c, lex.c: Adjust.
392         * parse.y (explicit_instantiation): Add empty action to override
393         the default $$ = $1 where it introduces a type clash.
394
395 2002-06-14  Jason Merrill  <jason@redhat.com>
396
397         * semantics.c (begin_for_stmt): Push the 'for' scope before
398         adding the FOR_STMT.
399
400         C++ ABI changes.
401         * class.c (build_base_field): Set DECL_PACKED.
402         (layout_class_type): Don't use tail padding of PODs.
403         * mangle.c (write_unqualified_name): Fix template conversion op
404         mangling.
405
406 2002-06-16  Richard Henderson  <rth@redhat.com>
407
408         PR opt/6793
409         * tree.c (cp_cannot_inline_tree_fn): Don't short-circuit test
410         after template instantiation.
411
412 2002-06-16  Richard Henderson  <rth@redhat.com>
413
414         * cp-tree.h, decl2.c (flag_ms_extensions): Move to c-common.
415
416 2002-06-15  Gabriel Dos Reis  <gdr@codesourcery.com>
417
418         * cp-tree.h (compiler_error): Remove declaration.
419         * lex.c (compiler_error): Remove definition.
420
421 2002-06-14  Steve Ellcey  <sje@cup.hp.com>
422
423         * g++spec.c (LIBUNWIND): New.
424         (lang_specific_driver): Add it if USE_UNWIND_EXCEPTIONS is set.
425
426 2002-06-13  Jessica Han  <jessica@cup.hp.com>
427
428         * class.c (build_vtable): Use TARGET_VTABLE_ENTRY_ALIGN.
429         (build_vtbl_initializer): Honor TARGET_VTABLE_DATA_ENTRY_DISTANCE.
430         (build_vbase_offset_vtbl_entries): Likewise.
431         * rtti.c (build_headof): Likewise.
432         (get_tinfo_decl_dynamic): Likewise.
433         (create_pseudo_type_info): Likewise.
434
435 2002-06-12  Stan Shebs  <shebs@apple.com>
436
437         * mpw-config.in: Remove file, no longer used.
438         * mpw-make.sed: Ditto.
439
440 2002-06-07  Zack Weinberg  <zack@codesourcery.com>
441
442         * decl2.c: Update call to cpp_handle_option.
443
444 2002-06-07  H.J. Lu  (hjl@gnu.org)
445
446         * decl2.c (flag_use_cxa_atexit): Set to DEFAULT_USE_CXA_ATEXIT.
447
448 2002-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
449
450         * error.c (cp_error_at): Fix typo.
451
452 2002-06-04  Gabriel Dos Reis  <gdr@codesourcery.com>
453
454         * error.c (cp_diagnostic_starter): Adjust call.
455         (maybe_print_instantiation_context): Change prototype to take a
456         'diagnostic_info *'.
457         (print_instantiation_full_context): Likewise.
458         (print_instantiation_partial_context): Likewise.
459         (cp_diagnostic_starter): Likewise.
460         (cp_diagnostic_finalizer): Likewise.
461         (cp_print_error_function): Likewise.
462         (cp_printer): Take a secondary parameter as a 'text_info *'.
463         Remove output_state savings.  Adjust calls.
464
465 2002-06-03  Geoffrey Keating  <geoffk@redhat.com>
466
467         * pt.c (inline_parm_levels): Mark for GC.
468
469         * mangle.c (start_mangling): Allocate G.substitutions here...
470         (init_mangle): ... rather than here.
471         (finish_mangling): Clear the varray pointer when done with it.
472         * spew.c (yylexstring): Don't use VARRAY_FREE.
473         * search.c (bfs_walk): Don't use VARRAY_FREE.
474         * decl2.c (pending_statics): Use gengtype to mark.
475         (deferred_fns): Likewise.
476         (ssdf_decls): Likewise.
477         (init_decl2): Delete.
478         * decl.c (pop_from_top_level): Don't use VARRAY_FREE.
479         (cxx_init_decl_processing): Don't call init_decl2.
480         (cxx_pop_function_context): Don't use VARRAY_FREE.
481         * cp-tree.h (struct saved_scope): No need for special marking
482         of varrays.
483         (struct language_function): Likewise.
484         (local_classes): Use gengtype to mark.
485         (init_decl2): Delete prototype.
486         * class.c (init_class_processing): Don't use
487         ggc_add_tree_varray_root.
488         (build_vtbl_initializer): Don't use VARRAY_FREE.
489
490         * decl.c (typename_compare): Don't use same_type_p.
491
492         * decl.c: Include hashtab.h instead of hash.h.
493         (typename_hash): Update to use htab_h.
494         (typename_compare): Likewise.
495         (typename_htab): Use gengtype to mark.
496         (build_typename_type): Update to use htab_h.
497         * Make-lang.in (cp/decl.o): Use HASHTAB_H instead of hash.h.
498
499         * Make-lang.in (gt-cp-tree.h): New rule.
500         (cp/tree.o): Depend on gt-cp-tree.h.
501         * config-lang.in (gtfiles): Add cp/tree.c.
502         * tree.c: Include gt-cp-tree.h.
503         (list_hash_table): Use gengtype to mark.
504         (init_tree): Use gengtype to mark trees.
505
506         * Make-lang.in (cp/decl.o): Add debug.h dependency.
507         * call.c (struct z_candidate): Use gengtype.
508         (USER_CONV_CAND): Use WRAPPER_ZC.
509         (convert_class_to_reference): Use build_zc_wrapper.
510         (build_type_conversion_1): Likewise.
511         (build_over_call): Use WRAPPER_ZC.
512         (add_warning): Use build_zc_wrapper.
513         * cp-lang.c (LANG_HOOKS_MARK_TREE): Delete.
514         * cp-tree.h (struct lang_identifier): Use gengtype.
515         (struct template_parm_index_s): Likewise.
516         (struct ptrmem_cst): Likewise.
517         (struct tree_binding): Likewise.
518         (struct tree_overload): Likewise.
519         (struct tree_srcloc): Likewise.
520         (struct tree_wrapper): Likewise.  Also modify to have a pointer
521         to struct z_candidate rather than void.
522         (enum cp_tree_node_structure_enum): New.
523         (union lang_tree_node): New.
524         (cxx_mark_tree): Delete prototype.
525         (cp_tree_node_structure): New prototype.
526         (build_ptr_wrapper): Delete prototype.
527         (build_int_wrapper): Delete prototype.
528         (build_zc_wrapper): New prototype.
529         * decl.c: Include debug.h
530         (cxx_mark_tree): Delete.
531         (cp_tree_node_structure): New.
532         * tree.c (build_ptr_wrapper): Delete.
533         (build_int_wrapper): Delete.
534         (build_zc_wrapper): New.
535
536         * cp-tree.h [! ENABLE_TREE_CHECKING] (LANG_TYPE_PTRMEM_CHECK):
537         Correct typo.  Patch from k_fukui@highway.ne.jp.
538
539         * semantics.c (current_stmt_tree): Update for change to
540         struct language_function.
541         (finish_mem_initializers): Likewise.
542         * decl.c (cxx_init_decl_processing): Don't set mark_lang_status.
543         * cp-tree.h (struct language_function): Rename from
544         cp_language_function.  Change all uses.
545         (cp_function_chain): Don't need to cast.
546
547         * class.c (duplicate_tag_error): Reset discriminator.
548         (check_bases_and_members): Update for data structure changes.
549         * cp-tree.h (struct lang_id2): Use gengtype.
550         (flagged_type_tree): Likewise.
551         (SET_LANG_ID): Use GGC on struct lang_id2.
552         (struct cp_language_function): Use gengtype.  Remove field
553         'x_vcalls_possible_p'.
554         (current_vcalls_possible_p): Delete.
555         (struct lang_type_header): New.
556         (struct lang_type_class): Rename from struct lang_type.  Include
557         struct lang_type_header.
558         (struct lang_type_ptrmem): New.
559         (struct lang_type): New.
560         (LANG_TYPE_CLASS_CHECK): New.  Use it in all the appropriate macros.
561         (LANG_TYPE_PTRMEM_CHECK): New.  Use it in all the appropriate macros.
562         (TYPE_SET_PTRMEMFUNC_TYPE): Set discriminator, update for changes.
563         (struct lang_decl_flags): Use gengtype.  Add discriminators.
564         (struct lang_decl): Use gengtype.  Add and use discriminators.
565         Update the macros that reference moved fields.
566         (LANG_DECL_U2_CHECK): New function.  Use it when appropriate.
567         (SET_DECL_THUNK_P): Set discriminator too.
568         (clear_inline_text_obstack): Delete prototype.
569         (finish_inline_definitions): Delete prototype.
570         (mark_pending_inlines): Delete prototype.
571         (lang_check_failed): New prototype.
572         * decl.c (struct named_label_use_list): Use gengtype.
573         (struct named_label_list): Likewise.
574         (mark_binding_level): Delete.
575         (mark_named_label_lists): Delete.
576         (push_local_name): Set discriminator on DECL_LANG_SPECIFIC.
577         (cxx_init_decl_processing): Use generated marker routine.
578         (begin_destructor_body): Delete dead set to
579         current_vcalls_possible_p.
580         (mark_lang_function): Delete.
581         (mark_cp_function_context): Delete.
582         (lang_mark_tree): Use generated marker routines.
583         * decl2.c (start_objects): Set discriminator when setting
584         GLOBAL_INIT_PRIORITY.
585         * lex.c (retrofit_lang_decl): Set discriminators.
586         (copy_lang_type): Update for changes to lang_type structure.
587         (cp_make_lang_type): Set discriminator.
588         * parse.y: Use gengtype on YYLVAL.  Don't use dots in identifiers.
589         * search.c: Include ggc.h.
590         * semantics.c (anon_aggr_type_p): Use the macro, don't hand-code it.
591         (finish_inline_definitions): Delete.
592         * spew.c (struct token): Use gengtype.
593         (struct token_chunk): New.
594         (struct unparsed_text): Use gengtype.  Store tokens in chunks.
595         (struct feed): Use gengtype.
596         (feed_obstack): Delete.
597         (feed): Mark as GC root.
598         (pending_inlines): Mark as GC root.
599         (pending_inlines_tail): Likewise.
600         (processing_these_inlines): Likewise.
601         (token_obstack): Make static.
602         (first_token): Likewise.
603         (init_spew): Don't initialise deleted things; use gengtype for roots.
604         (clear_inline_text_obstack): Delete.
605         (feed_input): Use GC for struct feed.  Update for changes to
606         struct unparsed_text.
607         (mark_pending_inlines): Delete.
608         (next_token): Rename from add_token.  Change all callers.  Update
609         for changes to struct unparsed_text.
610         (space_for_token): New.
611         (remove_last_token): New.
612         (alloc_unparsed_text): New.
613         (snarf_block): Take an unparsed_text.  Update for changes to struct
614         unparsed_text.
615         (snarf_method): Update for changes to struct unparsed_text.
616         (snarf_defarg): Update for changes to struct unparsed_text.
617         * tree.c (lang_check_failed): New.
618
619         * Make-lang.in (gt-cp-call.h gt-cp-decl2.h gt-cp-parse.h
620         gt-cp-pt.h gt-cp-repo.h gt-cp-spew.h): New rules.
621         (cp/spew.o): Add dependency on gt-<filename>.h.
622         (cp/decl2.o): Add dependency on gt-<filename>.h.
623         (cp/call.o): Add dependency on gt-<filename>.h.
624         (cp/pt.o): Add dependency on gt-<filename>.h.
625         (cp/repo.o): Add dependency on gt-<filename>.h.
626         (cp/parse.o): Add dependency on gt-<filename>.h.
627         * call.c: Use gengtype for roots.
628         * config-lang.in (gtfiles): Add cp-tree.h decl.h lex.h call.c
629         decl2.c parse.y pt.c repo.c spew.c.
630         * cp-tree.h: Use gengtype for roots.
631         (struct saved_scope): Use GGC, gengtype.
632         (cp_parse_init): Delete prototype.
633         (init_pt): Delete prototype.
634         * decl.c: Use gengtype for roots.
635         (mark_saved_scope): Delete.
636         (cxx_init_decl_processing): Don't call deleted initilisation
637         routines.
638         (signed_size_zero_node): Delete, unused.
639         * decl.h: Use gengtype for roots.
640         * decl2.c: Use gengtype for roots.
641         * lex.h: Use gengtype for roots.
642         * parse.y: Use gengtype for roots.
643         (cp_parse_init): Delete.
644         * pt.c: Use gengtype for roots.
645         (init_pt): Delete.
646         * repo.c: Use gengtype for roots.
647         * spew.c: Use gengtype for roots.
648
649         * Make-lang.in: Allow for filename changes.  Add gtype-cp.h.
650         (cp/decl.o): Add dependency on gtype-cp.h.
651         * decl.c: Remove use of add_deletable_root, use GTY marker instead.
652         Include gtype-cp.h.  Allow for filename changes.
653
654         * Make-lang.in (cp/gt-decl.h): Generate using gengtype.
655         (cp/decl.o): Add cp/gt-decl.h dependency.
656         * config-lang.in (gtfiles): New.
657         * tree.h: Rename struct binding_level to struct cp_binding_level.
658         * decl.c: Rename struct binding_level to struct cp_binding_level.
659         Include cp/gt-decl.h.
660         (struct cp_binding_level): Use gengtype.
661         (make_binding_level): Use GGC on struct cp_binding_level.
662         (mark_binding_level): Use gt_ggc_m_cp_binding_level.
663         (cxx_init_decl_processing): Mark free_binding_level as
664         deletable.
665
666         * decl.c (mark_cp_function_context): Update calling sequence.
667
668         * decl.c (start_function): Don't free 'struct
669         cp_language_function'.
670         (pop_cp_function_context): Likewise.
671         (save_function_data): Allocate it using GC.
672         * semantics.c (genrtl_start_function): Don't free 'struct
673         cp_language_function'.
674
675 2002-05-31  Matthew Woodcraft  <mattheww@chiark.greenend.org.uk>
676
677         * lang-specs.h: Use cpp_debug_options.
678
679 2002-05-28  Zack Weinberg  <zack@codesourcery.com>
680
681         * mangle.c, tree.c: Include real.h.
682         * Make-lang.in: Update dependency lists.
683
684 2002-05-25  Neil Booth  <neil@daikokuya.demon.co.uk>
685
686         * lex.c: Don't include c-lex.h.
687         * parse.y, spew.c: Don't include c-lex.h; include c-pragma.h.
688
689 2002-05-23  Neil Booth  <neil@daikokuya.demon.co.uk>
690
691         * spew.c (yyungetc, snarf_block): Remove indent_level handling.
692
693 2002-05-22  Richard Henderson  <rth@redhat.com>
694
695         * decl.c (obscure_complex_init): Check for VAR_DECL
696         before using DECL_THREAD_LOCAL.
697
698 2002-05-22  Richard Henderson  <rth@redhat.com>
699
700         * decl.c (check_tag_decl): Handle RID_THREAD.
701         (obscure_complex_init): Reject run-time init of tls.
702         (grokvardecl, grokdeclarator): Handle RID_THREAD.
703         * lex.c (reswords): Add __thread.
704         (rid_to_yy): Map RID_THREAD to SCSPEC.
705
706 2002-05-22  Neil Booth  <neil@daikokuya.demon.co.uk>
707
708         * cp-lang.c (LANG_HOOKS_POST_OPTIONS): Use c_common_post_options.
709         * cp-tree.h (cxx_post_options): Kill.
710         * cp-lex.c (cxx_post_options): Kill.
711
712 2002-05-21  Richard Henderson  <rth@redhat.com>
713
714         * lex.c (rid_to_yy): Add RID_THREAD.
715
716 2002-05-21  Alexandre Oliva  <aoliva@redhat.com>
717
718         * init.c (build_vec_init): Test for trivial copy-assignment when
719         copy-assigning arrays.
720
721 2002-05-20  Andreas Jaeger  <aj@suse.de>
722
723         * init.c (build_default_init): Remove unused variable.
724
725 2002-05-20  Alexandre Oliva  <aoliva@redhat.com>
726
727         * call.c (any_strictly_viable): New.
728         (build_new_op): Use it for COMPOUND_EXPR and ADDR_EXPRs.
729
730 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
731
732         * error.c (dump_type) [TYPEOF_TYPE]: Fix parenthesis printing.
733
734 2002-05-19  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
735
736         PR c++/186, DR 259
737         * pt.c (do_decl_instantiation): Don't complain explicit
738         instantiation after explicit specialization.
739         (do_type_instantiation): Likewise.
740
741 2002-05-19  Alexandre Oliva  <aoliva@redhat.com>
742
743         * cp-tree.h (complete_type_or_diagnostic): Changed prototype,
744         renamed from...
745         (complete_type_or_else): ... this.  Redefined as macro.
746         (cxx_incomplete_type_diagnostic): Declare.
747         (cxx_incomplete_type_error): Define as macro.
748         * init.c (build_delete): Warn about incomplete types other than
749         void, and use the built-in operator delete for them.
750         * typeck.c (complete_type_or_diagnostic): Renamed from
751         complete_type_or_else.  Added warn_only argument, passed to...
752         * typeck2.c (cxx_incomplete_type_diagnostic): ... this.  Print
753         warnings or errors depending on new warn_only argument.  Renamed
754         from...
755         (cxx_incomplete_type_error): ... this.  New implementation in
756         terms of cxx_incomplete_type_diagnostic.
757
758 2002-05-18  Jason Merrill  <jason@redhat.com>
759
760         PR c++/6611
761         * decl2.c (import_export_decl): If we clear
762         DECL_NOT_REALLY_EXTERN, make sure DECL_EXTERNAL is set.
763
764 2002-05-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
765
766         PR c++/6620
767         * pt.c (verify_class_unification): Don't check if PARM is template
768         parameter dependent.  Simplify.
769         (unify) [TEMPLATE_PARM_INDEX]: Handle when ARG is a template
770         parameter dependent expression.
771
772 2002-05-14  Jason Merrill  <jason@redhat.com>
773
774         * rtti.c (get_tinfo_decl): Don't call comdat_linkage.
775         Do set DECL_COMDAT.
776         (synthesize_tinfo_var): Take the public decl.
777         (create_real_tinfo_var): Likewise.  Check DECL_COMDAT.
778         (emit_tinfo_decl): Adjust.  Call import_export_decl.
779         * decl2.c (import_export_decl): Simplify tinfo decl handling.
780
781 2002-05-14  Alexandre Oliva  <aoliva@redhat.com>
782
783         * cp-tree.h (struct lang_type): Added non_zero_init.
784         (CLASSTYPE_NON_ZERO_INIT_P): New macro.
785         (zero_init_p, force_store_init_value, build_forced_zero_init): Declare.
786         * class.c (check_field_decls): Test non_zero_init.
787         * cvt.c (convert_to_pointer_force): Use cp_convert_to_pointer for
788         zero-to-NULL conversions.
789         * decl.c (obscure_complex_init): Don't reset DECL_INITIAL of a
790         type that needs zero-initialization without zeros.
791         (check_initializer_decl): Compute zero-initializer for types
792         that require a non-trivial one.
793         * init.c (build_forced_zero_init): New function.
794         (build_default_init): Use it.
795         * tree.c (zero_init_p): New function.
796         * typeck2.c (force_store_init_value): New function.
797         (process_init_constructor): Create non-trivial zero-initializers
798         for array members and class fields.
799
800 2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
801
802         * lang-specs.h: Remove redundant -lang-c++.
803
804 2002-05-13  Jason Merrill  <jason@redhat.com>
805
806         * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
807         (fixed_type_or_null): See through reference vars.
808         (build_base_path): Vtable contents are constant.
809         * typeck.c (get_member_function_from_ptrfunc): Likewise.
810
811 2002-05-12  Jason Merrill  <jason@redhat.com>
812
813         * cp-lang.c (ok_to_generate_alias_set_for_type): Backend-created
814         structs are safe.
815
816 2002-05-09  Neil Booth  <neil@daikokuya.demon.co.uk>
817
818         * cp-tree.h (flag_ansi): Remove.
819         * decl2.c (flag_ansi): Remove.
820         (cxx_decode_option): Set flag_iso and flag_undef.
821
822 2002-05-09  Jason Merrill  <jason@redhat.com>
823
824         * typeck.c (get_member_function_from_ptrfunc): Reorganize.
825         Use subtraction rather than a bitmask to get the index.
826         * cvt.c (cp_convert_to_pointer): Bail on an error_mark_node.
827
828         * pt.c (tsubst_expr) [ASM_STMT]: Copy ASM_INPUT_P.
829
830 2002-05-07  Neil Booth  <neil@daikokuya.demon.co.uk>
831
832         * Make-lang.in (decl2.o): Update.
833         * cp-tree.h (warn_multichar): Remove.
834         * decl2.c: Include c-common.h.
835         (warn_multichar): Remove.
836
837 2002-05-03  Jason Merrill  <jason@redhat.com>
838
839         * tree.c (build_cplus_array_type): Only const and volatile get
840         special handling.
841
842         * decl.c (BOOL_TYPE_SIZE): Move default to defaults.h.
843
844 2002-04-30  Mark Mitchell  <mark@codesourcery.com>
845
846         ABI change, returning simple classes from functions.
847         * class.c (finish_struct_bits): Only mark TREE_ADDRESSABLE if
848         TYPE_HAS_TRIVIAL_INIT_REF is false or
849         TYPE_HAS_NONTRIVIAL_DESTRUCTOR is true.
850
851 2002-04-30  Jason Merrill  <jason@redhat.com>
852
853         PR debug/6436
854         * decl.c (grokdeclarator): Don't override TYPE_NAME of an
855         anonymous class with a typedef if there are attributes.
856
857 2002-04-29  Paul Eggert  <eggert@twinsun.com>
858
859         * parse.y (nomods_initdcl0): Replace $<ttype>3 with $<ttype>$.
860
861 2002-04-29  Jakub Jelinek  <jakub@redhat.com>
862
863         PR c++/6477
864         * decl.c (follow_tag_typedef): Check if TYPE_NAME (original) is
865         non-NULL first.
866
867 2002-04-29  Mark Mitchell  <mark@codesourcery.com>
868
869         PR c++/6492
870         * pt.c (tsubst_friend_class): If the friend has an explicit scope,
871         enter that scope before name lookup.
872
873         PR c++/6486
874         * method.c (do_build_copy_constructor): Avoid building
875         cv-qualified reference types.
876
877 2002-04-29  Nathan Sidwell  <nathan@codesourcery.com>
878
879         PR c++/5719
880         * decl.c (grok_op_properties): Assignment ops don't have to return
881         by value. operator% should.
882
883 2002-04-28  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>
884
885         PR c/6343
886         * decl.c (duplicate_decls): Call merge_weak.
887
888 2002-04-26  Richard Henderson  <rth@redhat.com>
889
890         * parse.y (malloced_yyss, malloced_yyvs): New.
891         (yyoverflow): Re-add.  Set them.
892         (free_parser_stacks): New.
893
894 2002-04-26  Mark Mitchell  <mark@codesourcery.com>
895
896         PR c++/6497
897         * method.c (do_build_assign_ref): Pass a derivation to
898         build_method_call when calling base class assignment operators.
899
900 2002-04-26  Richard Henderson  <rth@redhat.com>
901
902         * parse.y (yyoverflow): Revert.
903
904 2002-04-26  Richard Henderson  <rth@redhat.com>
905
906         PR c/3581
907         * parse.y (string): Remove.  Update all uses to use STRING
908         instead, and not call combine_strings.
909         * rtti.c (tinfo_name): Use fix_string_type.
910         * semantics.c (finish_asm_stmt): Don't call combine_strings.
911         * spew.c (yylexstring): New.
912         (read_token): Use it.
913
914 2002-04-25  Richard Henderson  <rth@redhat.com>
915
916         PR c/2161
917         * parse.y (yyoverflow): New.
918
919 2002-04-25  Jason Merrill  <jason@redhat.com>
920
921         PR c++/5607
922         * search.c (check_final_overrider): No longer static.
923         * class.c (update_vtable_entry_for_fn): Call it.
924         * cp-tree.h: Adjust.
925
926 2002-04-25  Neil Booth  <neil@daikokuya.demon.co.uk>
927
928         * cp-lang.c (LANG_HOOKS_SET_YYDEBUG): Remove.
929         * cp-tree.h (cxx_set_yydebug): Die.
930         * lex.c (YYDEBUG): Get from c-lex.h.
931         (cxx_set_yydebug): Remove.
932         * parse.y: Include c-lex.h.
933         (YYDEBUG): Get from c-lex.h.
934
935 2002-04-24  Mark Mitchell  <mark@codesourcery.com>
936
937         PR c++/6438.
938         * cvt.c (convert_to_void): Don't unconditionally make COND_EXPRs
939         void.
940
941 2002-04-24  Neil Booth  <neil@daikokuya.demon.co.uk>
942
943         * cp-lang.c (LANG_HOOKS_COMMON_ATTRIBUTE_TABLE,
944         LANG_HOOKS_FORMAT_ATTRIBUTE_TABLE, LANG_HOOKS_ATTRIBUTE_TABLE):
945         Redefine.
946         * cp-tree.h (cp_attribute_table): Rename.
947         * decl.c (lang_attribute_table): Remove declaration.
948         (cxx_init_decl_processing): Don't set it.
949         * tree.c (cp_attribute_table): Rename.
950
951 2002-04-24  Jason Merrill  <jason@redhat.com>
952
953         PR c++/6331
954         * method.c (do_build_copy_constructor): Use cp_build_qualified_type.
955         * typeck.c (build_modify_expr): Allow arrays to differ in cv-quals.
956         The pedwarn for array assignment is now unconditional.
957         * tree.c (build_cplus_array_type_1): Still process simple array types
958         normally in templates.
959
960         PR c++/6395
961         * decl.c (make_rtl_for_nonlocal_decl): Don't mess with #pragma i/i
962         stuff for comdats.
963
964 2002-04-23  Jakub Jelinek  <jakub@redhat.com>
965
966         * parse.y (check_class_key): Allow KEY to be union/enum/struct/class
967         node with attributes.
968
969 2002-2-23  David O'Brien  <obrien@FreeBSD.org>
970
971         * g++spec.c (MATH_LIBRARY_PROFILE, LIBSTDCXX_PROFILE): Add.
972         Use MATH_LIBRARY_PROFILE and LIBSTDCXX_PROFILE if profile flag given.
973
974 2002-04-23  Mark Mitchell  <mark@codesourcery.com>
975
976         PR c++/6256:
977         * pt.c (tsubst_friend_class): Handle templates with explicit
978         nested names.
979
980         PR c++/6331:
981         * typeck.c (merge_types): Remember the cv-qualification of pointer
982         types when merging them.
983
984 2002-04-20  Neil Booth  <neil@daikokuya.demon.co.uk>
985
986         * cp-lang.c (LANG_HOOKS_FUNCTION_INIT,
987         LANG_HOOKS_FUNCTION_FREE, LANG_HOOKS_FUNCTION_MARK): Redefine.
988         * cp-tree.h (cxx_push_function_context, cxx_pop_function_context,
989         cxx_mark_function_context): New.
990         * decl.c (push_cp_function_context, pop_cp_function_context,
991         mark_cp_function_context): Rename for consistency.
992         (cxx_init_decl_processing): Don't set old hooks.
993
994 2002-04-19  Neil Booth  <neil@daikokuya.demon.co.uk>
995
996         * call.c (convert_type_from_ellipsis): Rename, update.
997         * cp-lang.c (LANG_HOOKS_TYPE_PROMOTES_TO): Redefine.
998         * cp-tree.h (convert_type_from_ellipsis): Rename.
999         * decl.c (cxx_init_decl_processing): Don't set hook.
1000
1001 2002-04-18  Neil Booth  <neil@daikokuya.demon.co.uk>
1002
1003         * call.c (build_new_method_call): Update.
1004         * cp-lang.c (LANG_HOOKS_INCOMPLETE_TYPE_ERROR): Redefine.
1005         * cp-tree.h (cxx_incomplete_type_error): New.
1006         * decl.c (grokdeclarator, grokparms): Update.
1007         * decl2.c (check_classfn): Update.
1008         * pt.c (tsubst): Update.
1009         * typeck.c (complete_type_or_else, expr_sizeof,
1010         decay_conversion): Update.
1011         * typeck2.c (incomplete_type_error): Rename.
1012         (add_exception_specifier): Update.
1013
1014 2002-04-18  Jason Merrill  <jason@redhat.com>
1015
1016         PR c++/5658
1017         * search.c (setup_class_bindings): A class template qualifies as a
1018         type binding.
1019
1020 2002-04-17  Jakub Jelinek  <jakub@redhat.com>
1021
1022         PR c++/6316
1023         * decl2.c (finish_file): Clear DECL_EXTERNAL in a separate loop
1024         before expanding.
1025
1026 2002-04-16  Mark Mitchell  <mark@codesourcery.com>
1027
1028         * init.c (begin_init_stmts): Remove commented out code.
1029         (finish_init_stmts): Set STMT_EXPR_NO_SCOPE.
1030         * semantics.c (begin_gobal_stmt_expr): Adjust call to
1031         expand_start_stmt_expr.
1032
1033 2002-04-15  Mark Mitchell  <mark@codesourcery.com>
1034
1035         * decl.c (register_dtor_fn): Pass the address of dso_handle, not
1036         dso_handle itself, to __cxa_atexit.
1037
1038 2002-04-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
1039
1040         * error.c (cxx_print_error_function): Adjust call to macros.
1041
1042 2002-04-14  Jakub Jelinek  <jakub@redhat.com>
1043
1044         * class.c (layout_virtual_bases): Do all dsize computation on trees.
1045
1046 2002-04-14  Jason Merrill  <jason@redhat.com>
1047
1048         * typeck.c (get_member_function_from_ptrfunc): Don't do
1049         gratuitious division and multiplication on
1050         ptrmemfunc_vbit_in_delta targets.
1051
1052 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
1053
1054         PR c++/5373.
1055         * semantics.c (finish_expr_stmt): Remember the type of the
1056         expression before any conversions are performed.
1057
1058 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
1059
1060         PR c++/5189.
1061         * call.c (add_template_candidate_real): Do not treat member
1062         templates as copy constructors.
1063
1064 2002-04-12  Mark Mitchell  <mark@codesourcery.com>
1065
1066         * decl.c (duplicate_decls): Do not copy the RTL for a variable
1067         declaration if the old variable had an incomplete type and the new
1068         variable does not.
1069         (complete_vars): Do not call layout_decl for completed variables.
1070
1071 2002-04-12  Richard Sandiford  <rsandifo@redhat.com>
1072
1073         * decl.c (duplicate_decls): Don't try to unify an implicit typedef
1074         with an explicit one.
1075         (follow_tag_typedef): New.
1076         (lookup_tag): Use it to extract the tag of an explicit typedef.
1077         (xref_tag): Likewise.
1078
1079 2002-04-11  Andrew Haley  <aph@redhat.com>
1080
1081         * typeck.c (type_after_usual_arithmetic_conversions):
1082         If two types have the same variant, return immediately.
1083         When two floating-point operands are the same precision:
1084           convert to float if one of the operands is float;
1085           if neither operand is one of the standard types, return the type
1086           of the first operand.
1087
1088 2002-04-10  Nathan Sidwell  <nathan@codesourcery.com>
1089
1090         PR c++/5507
1091         * decl.c (make_typename_type): Remove implicit typenameness.
1092
1093 2002-04-09  Jason Merrill  <jason@redhat.com>
1094
1095         PR optimization/6189
1096         * semantics.c (genrtl_start_function): Don't free
1097         DECL_SAVED_FUNCTION_DATA for inline functions.
1098
1099         * init.c (build_member_call): For now, don't convert to
1100         intermediate base if it would cause an error.
1101
1102 2002-04-08  Paolo Carlini  <pcarlini@unitus.it>
1103
1104         * parse.y (namespace_qualifier, maybe_identifier,
1105         begin_explicit_instantiation, end_explicit_instantiation,
1106         apparent_template_type, .finish_template_type,
1107         do_id, maybe_init, defarg_again, component_decl_1):
1108         Add ending ';', in accordance with POSIX.
1109
1110 2002-04-06  Mark Mitchell  <mark@codesourcery.com>
1111
1112         PR c++/5571
1113         * class.c (layout_class_type): Remember incomplete static
1114         variables.
1115         (finish_struct_1): Call complete_vars, not
1116         hack_incomplete_structures.
1117         * cp-tree.h (hack_incomplete_structures): Rename to ...
1118         (complete_vars): ... this.
1119         (struct saved_scope): Remove incomplete.
1120         (namespace_scope_incomplete): Remove.
1121         * decl.c (struct binding_level): Remove incomplete.
1122         (incomplete_vars): New variable.
1123         (mark_binding_level): Don't mark incomplete.
1124         (print_binding_level): Don't print it.
1125         (mark_saved_scope): Don't mark incomplete.
1126         (pushdecl): Use maybe_register_incopmlete_var.
1127         (cxx_init_decl_processing): Register incomplete_vars for GC.
1128         (start_decl_1): Clarify error message.
1129         (hack_incomplete_vars): Remove.
1130         (maybe_register_incomplete_var): New function.
1131         (complete_vars): Likewise.
1132
1133 2002-04-06  Jason Merrill  <jason@redhat.com>
1134
1135         PR c++/4934
1136         * error.c (dump_expr) [CONVERT_EXPR]: Make sure TREE_TYPE (t) is
1137         set before checking it.
1138
1139         PR c++/525
1140         * init.c (build_member_call): Use build_scoped_ref.
1141         (resolve_offset_ref): Likewise.
1142         * call.c (build_scoped_method_call): Likewise.
1143         * tree.c (maybe_dummy_object): Kludge around current_class_type being
1144         wrong.
1145         * typeck2.c (build_scoped_ref): Return the binfo via binfo_p parm.
1146         * cp-tree.h: Adjust.
1147
1148         * init.c (push_base_cleanups): Just use build_scoped_method_call.
1149
1150         PR c++/6179
1151         * method.c (implicitly_declare_fn): Pass unqualified type to
1152         synthesize_exception_spec.
1153
1154 2002-04-04  Neil Booth  <neil@daikokuya.demon.co.uk>
1155
1156         * cp-lang.c (LANG_HOOKS_TRUTHVALUE_CONVERSION): Redefine.
1157         * cvt.c: Update comment.
1158         * init.c (expand_cleanup_for_base): Update.
1159         * semantics.c (finish_parenthesized_expr): Update.
1160         * typeck.c (cp_truthvalue_conversion): Update.
1161
1162 2002-04-04  Jason Merrill  <jason@redhat.com>
1163
1164         * semantics.c (finish_eh_cleanup): New fn.
1165         * cp-tree.h: Add prototype.
1166         * init.c (perform_member_init, expand_cleanup_for_base): Use
1167         finish_eh_cleanup.
1168         * cp-tree.def (SUBOBJECT, CTOR_STMT): Remove.
1169         * cp-tree.h: Remove references.
1170         * decl.c (begin_constructor_body, end_constructor_body): Likewise.
1171         * dump.c (cp_dump_tree): Likewise.
1172         * pt.c (tsubst_expr): Likewise.
1173         * semantics.c (genrtl_ctor_stmt, genrtl_subobject): Remove.
1174         (cp_expand_stmt): Remove handling of CTOR_STMT and SUBOBJECT.
1175         * tree.c (cp_statement_code_p): Likewise.
1176
1177         * init.c (build_new_1): Set CLEANUP_EH_ONLY on deleting cleanup.
1178
1179         PR c++/5636
1180         * semantics.c (nullify_returns_r): Just set CLEANUP_EH_ONLY on
1181         cleanup for nrv.
1182
1183         PR c++/5104
1184         * typeck.c (comptypes) [FUNCTION_TYPE]: Don't compare exception
1185         specifiers.
1186         [METHOD_TYPE]: Use same code as FUNCTION_TYPE.
1187
1188 2002-04-03  Richard Henderson  <rth@redhat.com>
1189
1190         * cp-lang.c (cxx_warn_unused_global_decl): New.
1191         (LANG_HOOKS_WARN_UNUSED_GLOBAL_DECL): New.
1192
1193 2002-04-03  Neil Booth  <neil@daikokuya.demon.co.uk>
1194
1195         * cp-lang.c (LANG_HOOKS_SET_DECL_ASSEMBLER_NAME): Redefine.
1196         * tree.c (init_tree): Don't set hook.
1197
1198 2002-04-03  Roger Sayle  <roger@eyesopen.com>
1199
1200         PR c++/5998:
1201         * decl.c (duplicate_decls): Don't mess with assembler names when
1202         redeclaring builtin functions as static.
1203
1204 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1205
1206         * call.c (build_addr_func): Update.
1207         * class.c (resolve_address_of_overloaded_function): Update.
1208         * cp-lang.c (LANG_HOOKS_MARK_ADDRESSABLE): Redefine.
1209         * cp-tree.h (cxx_mark_addressable): New.
1210         * decl.c (register_dtor_fn, cxx_maybe_build_cleanup): Update.
1211         * decl2.c (build_cleanup): Update.
1212         * except.c (build_throw): Update.
1213         * init.c (resolve_offset_ref): Update.
1214         * pt.c (convert_nontype_argument): Update.
1215         * semantics.c (finish_asm_stmt, simplify_affr_init_exprs_r): Update.
1216         * typeck.c (decay_conversion, build_array_ref, build_unary_op,
1217         unary_complex_lvalue): Update.
1218         (mark_addressable): Rename.
1219
1220 2002-04-01  Roger Sayle  <roger@eyesopen.com>
1221
1222         PR c++/5998:
1223         * decl.c (duplicate_decls):  Overwrite the RTL when (and only
1224         when) overwriting a built-in function.  Don't use COPY_DECL_RTL,
1225         but follow the SET_DECL_RTL idiom used elsewhere in the function.
1226
1227 2002-04-01  Neil Booth  <neil@daikokuya.demon.co.uk>
1228
1229         * cp-lang.c (LANG_HOOKS_SIGNED_TYPE, LANG_HOOKS_UNSIGNED_TYPE,
1230         LANG_HOOKS_SIGNED_OR_UNSIGNED_TYPE): New.
1231         * decl.c (grokdeclarator): Update.
1232         * mangle.c (write_integer_cst): Update.
1233         * typeck.c (build_binary_op): Update.
1234
1235 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
1236
1237         * cp-lang.c (LANG_HOOKS_UNSAFE_FOR_REEVAL): Redefine.
1238         * lex.c (cxx_init): Don't set hook.
1239
1240 2002-03-31  Neil Booth  <neil@daikokuya.demon.co.uk>
1241
1242         * Make-lang.in (error.o): Update.
1243         * cp-lang.c (LANG_HOOKS_PRINT_ERROR_FUNCTION): Redefine.
1244         * cp-tree.h (struct diagnostic_context): Predeclare.
1245         (cxx_print_error_function): New.
1246         * error.c: Include langhooks-def.h.
1247         (lang_print_error_function): Rename.  Update.
1248         (init_error): Don't set hook.
1249
1250 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
1251
1252         * cp-lang.c (LANG_HOOKS_TYPE_FOR_MODE, LANG_HOOKS_TYPE_FOR_SIZE):
1253         Redefine.
1254         * cvt.c (cp_convert_to_pointer, type_promotes_to): Use new hooks.
1255         * decl.c (finish_enum): Similarly.
1256         * error.c (dump_type): Similarly.
1257         * lex.c (cxx_init): Similarly.
1258         * mangle.c (write_builtin_type): Similarly.
1259         * typeck.c (comptypes): Similarly.
1260
1261 2002-03-28  Roger Sayle  <roger@eyesopen.com>
1262
1263         PR c++/5998:
1264         * decl.c (cxx_init_decl_processing): Re-enable built-in functions
1265         in the g++ front-end.
1266         (duplicate_decl): Allow redefinition of anticipated built-ins.
1267         Fix inlining problem by over-writing the old DECL_RTL.
1268         (lookup_namespace_name): Fail to find an identifier in the
1269         specified namespace if its still anticipated.
1270         (builtin_function_1): New function split out from builtin_function
1271         to create a builtin in the current namespace with given context.
1272         (builtin_function): Call builtin_function_1 to define the
1273         appropriate builtins in both the std and global namespaces.
1274         (select_decl): Don't test for anticipated decls here.
1275         (unqualified_namespace_lookup): Instead ignore them whilst
1276         searching through scopes and namespaces.
1277         * decl2.c (do_nonmember_using_decl): If a using declaration
1278         specifies an anticipated built-in function, mark it as no longer
1279         anticipated in that scope.
1280         (ambiguous_decl):  Avoid resolving to an anticipated decl.
1281         * lex.c (do_scoped_id): Fail to find an identifier in the global
1282         namespace if its still anticipated.
1283
1284 2002-03-29  Neil Booth  <neil@daikokuya.demon.co.uk>
1285
1286         * cp-lang.c (LANG_HOOKS_MAKE_TYPE): Redefine.
1287         * cp-tree.h (cp_make_lang_type): Rename.
1288         * lex.c (cp_make_lang_type): Rename.
1289         (make_aggr_type): Update.
1290         * tree.c (init_tree): Don't set make_lang_type_fn.
1291
1292 2002-03-29  Jakub Jelinek  <jakub@redhat.com>
1293
1294         PR c++/6073
1295         * class.c (finish_struct_1): Update static field's DECL_MODE even
1296         if its type is a variant of t.
1297
1298 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
1299
1300         * cp-lang.c (LANG_HOOKS_INSERT_DEFAULT_ATTRIBUTES): Redefine.
1301         * cp-tree.h (cxx_insert_default_attributes): New.
1302         * decl.c (insert_default_attributes): Rename.
1303
1304 2002-03-27  Mark Mitchell  <mark@codesourcery.com>
1305
1306         PR c++/4884
1307         * call.c (build_op_delete_call): Allow for the fact the placement
1308         may be a COMPOUND_EXPR.
1309
1310 2002-03-27  Neil Booth  <neil@daikokuya.demon.co.uk>
1311
1312         * cp-lang.c (LANG_HOOKS_EXPAND_EXPR): Redefine.
1313         * cp-tree.h (init_cplus_expand): Remove.
1314         (cxx_expand_expr): New.
1315         * expr.c (cplus_expand_expr): Rename cxx_expand_expr,
1316         fix prototype.
1317         (init_cplus_expand): Remove.
1318         * lex.c (cxx_init): Don't call init_cplus_expand.
1319
1320 2002-03-26  Mark Mitchell  <mark@codesourcery.com>
1321
1322         PR c++/4884.
1323         * init.c (build_new_1): Allow for the fact the result of
1324         build_function_call may be a COMPOUND_EXPR.
1325
1326 2002-03-26  Nathan Sidwell  <nathan@codesourcery.com>
1327
1328         PR c++/5682
1329         * cp-tree.h (BINFO_PRIMARY_P): Explain meaning better.
1330         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
1331         (dfs_skip_nonprimary_vbases_markedp): Remove.
1332         * search.c (get_shared_vbase_if_not_primary): Remove.
1333         (dfs_skip_nonprimary_vbases_unmarkedp): Remove.
1334         (dfs_skip_nonprimary_vbases_markedp): Remove.
1335         (dfs_unmarked_real_bases_queue_p): Just get the canonical binfo.
1336         (dfs_marked_real_bases_queue_p): Likewise.
1337
1338 2002-03-26  Neil Booth  <neil@daikokuya.demon.co.uk>
1339
1340         * cp-lang.c (LANG_HOOKS_MARK_TREE): Redefine.
1341         * cp-tree.h (cxx_mark_tree): New.
1342         * decl.c (lang_mark_tree): Rename cxx_mark_tree.
1343
1344 2002-03-25  Neil Booth  <neil@daikokuya.demon.co.uk>
1345
1346         * cp-tree.h (cxx_maybe_build_cleanup): New.
1347         * decl.c (destroy_local_var, hack_incomplete_structures): Update.
1348         (maybe_build_cleanup): Rename cxx_maybe_build_cleanup.
1349         * tree.c (build_target_expr): Update.
1350         * cp-lang.c (LANG_HOOKS_MAYBE_BUILD_CLEANUP): Redefine.
1351
1352 2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
1353
1354         * decl2.c (cxx_decode_option): Handle -E.
1355         * lang-specs.h (default_compilers): Preprocess with cc1plus.
1356         * lex.c (cxx_init): Exit quickly if c_common_init returns NULL.
1357
1358 2002-03-23  Jakub Jelinek  <jakub@redhat.com>
1359
1360         PR c++/6037
1361         * decl.c (start_enum): Don't set TREE_ADDRESSABLE on TREE_LIST node.
1362
1363 2002-03-23  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
1364
1365         * error.c (dump_type): Be careful about implicit typenames.
1366
1367 2002-03-21  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
1368
1369         PR C++/3656
1370         * semantics.c (finish_base_specifier): Handle erronous base
1371         classes.
1372
1373 2002-03-22  Zack Weinberg  <zack@codesourcery.com>
1374
1375         * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
1376         REAL_IS_NOT_DOUBLE.
1377
1378 2002-03-22  Jeff Knaggs  <jknaggs@redhat.com>
1379
1380         * typeck.c (get_member_function_from_ptrfunc): Scale idx down to
1381         an index into the vtable_entry array regardless of
1382         TARGET_PTRMEMFUNC_VBIT_LOCATION.
1383
1384 2002-03-21  Aldy Hernandez  <aldyh@redhat.com>
1385
1386         * tree.c (cp_cannot_inline_tree_fn): Same.
1387
1388 2002-03-21  Neil Booth  <neil@daikokuya.demon.co.uk>
1389
1390         * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
1391         insert_block, getdecls, global_bindings_p): New.
1392
1393 2002-03-20  Nathan Sidwell  <nathan@codesourcery.com>
1394
1395         PR c++/4361
1396         * mangle.c (struct globals) Add internal_mangling_p member.
1397         (write_template_param): Do internal mangling, if needed.
1398         (mangle_conv_op_name_for_type): Request internal mangling.
1399
1400 2002-03-20  Jason Merrill  <jason@redhat.com>
1401
1402         PR c++/2136
1403         * init.c (build_delete): Check access for a member op delete here.
1404         * decl2.c (delete_sanity): Not here.
1405
1406 2002-03-19  Jason Merrill  <jason@redhat.com>
1407
1408         PR c++/5118
1409         * class.c (get_vfield_name): Use the constructor_name.
1410
1411 2002-03-20  Neil Booth  <neil@daikokuya.demon.co.uk>
1412
1413         * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
1414         * cp-tree.h (lang_printable_name): Rename.
1415         * error.c (lang_decl_name): Use new hook.
1416         * lex.c (cxx_init): Remove old hook.
1417         * pt.c (tsubst_decl): Use new hook.
1418         * tree.c (lang_printable_name): Rename.
1419
1420 2002-03-18  Eric Botcazou  <ebotcazou@multimania.com>
1421
1422         PR c++/3882
1423         * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
1424         (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
1425         only after recording the declaration.
1426
1427 2002-03-18  Jason Merrill  <jason@redhat.com>
1428
1429         PR c++/2039
1430         * init.c (resolve_offset_ref): Hand off to build_component_ref.
1431
1432         PR c++/4222, c++/5995
1433         * call.c (build_over_call): Fix empty class logic.
1434
1435         PR c++/3870
1436         * cp-tree.h (struct saved_scope): Add last_parms field.
1437         * decl.c (maybe_push_to_top_level): Save last_function_parms.
1438         (pop_from_top_level): Restore it.
1439
1440         PR c++/4377
1441         * mangle.c (write_expression): Strip NOP_EXPRs sooner.  Also strip
1442         NON_LVALUE_EXPRs.
1443
1444         PR c++/4003
1445         * pt.c (tsubst_friend_function): Use decl_namespace_context.
1446
1447         PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
1448         * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
1449         type with a nontrivial destructor.
1450
1451 2002-03-17  Jason Merrill  <jason@redhat.com>
1452
1453         PR c++/4460
1454         * class.c (build_base_path): Virtual base layout is fixed in
1455         in-charge [cd]tors.
1456
1457 2002-03-17  Neil Booth  <neil@daikokuya.demon.co.uk>
1458
1459         * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
1460         * parse.y (yyparse): Remove macro.
1461
1462 2002-03-17  Jason Merrill  <jason@redhat.com>
1463
1464         PR c++/5757
1465         * init.c (build_new_1): Pass the right pointer to op delete.
1466
1467 2002-03-16  Nathan Sidwell  <nathan@codesourcery.com>
1468
1469         PR c++/4361
1470         * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
1471         conversion operators go.
1472         (struct lang_decl_flags): Add template_conv_p and unused
1473         bitfields.
1474         (DECL_TEMPLATE_CONV_FN_P): New macro.
1475         * call.c (build_user_type_conversion_1): Don't check second type
1476         conversion of overload set first.
1477         * class.c (add_method): Make sure templated conversion operators
1478         all end up on slot 2.
1479         * lex.c (do_identifier): A conversion operator token might be
1480         satisfied by a templated conversion operator.
1481         * pt.c (check_explicit_specialization): Use
1482         CLASSTYPE_FIRST_CONVERSION_SLOT.
1483         (template_parm_this_level_p): New function.
1484         (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
1485         * search.c (lookup_fnfields_1): Template conversions will be on
1486         the first slot.
1487         * typeck.c (build_component_ref): Preserve the type of an
1488         conversion operator name on the overload type.
1489         (build_x_function_call): Retrieve the conversion operator name.
1490
1491 2002-03-15  Richard Henderson  <rth@redhat.com>
1492
1493         * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
1494
1495 2002-03-15  Mark Mitchell  <mark@codesourcery.com>
1496
1497         * cp-tree.h (CLEANUP_DECL): Remove.
1498         (CLEANUP_EXPR): Likewise.
1499         * decl.c (destroy_local_var): Simplify.
1500         (maybe_build_cleanup): Tidy.
1501         * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
1502         * semantics.c (cp_expand_stmt): Likewise.
1503         * cp/tree.c (cp_statement_code_p): Likewise.
1504
1505 2002-03-15  Jason Merrill  <jason@redhat.com>
1506
1507         PR c++/5857
1508         * decl.c (duplicate_decls): Use merge_types instead of common_type.
1509         * typeck.c (common_type): Just hand off to
1510         type_after_usual_arithmetic_conversions and
1511         composite_pointer_type.
1512         (merge_types): New fn.
1513         (commonparms): Use it instead of common_type.
1514         (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
1515         (composite_pointer_type): Also handle attributes.
1516         * cp-tree.h: Declare merge_types.
1517
1518         * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
1519         variables.
1520         * decl2.c (maybe_make_one_only): Also mark the decl as needed.
1521
1522 2002-03-14  Richard Henderson  <rth@redhat.com>
1523
1524         * decl.c: Include c-pragma.h.
1525         (start_decl, start_function): Invoke maybe_apply_pragma_weak.
1526         * Make-lang.in: Update dependencies.
1527
1528 2002-03-14  Jakub Jelinek  <jakub@redhat.com>
1529
1530         PR c++/5908
1531         * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
1532         * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
1533
1534 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
1535
1536         * mangle.c (write_builtin_type): Handle 128-bit integers even if
1537         they are not a standard integer type.
1538
1539 2002-03-12  Richard Sandiford  <rsandifo@redhat.com>
1540
1541         * cp-tree.h (init_init_processing): Remove declaration.
1542         * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
1543         * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
1544
1545 2002-03-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1546
1547         * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
1548         Define.
1549         * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
1550         tree_code_length.
1551         * lex.c (cplus_tree_code_type, cplus_tree_code_length,
1552         cplus_tree_code_name): Delete.
1553         (cxx_init): Don't call add_c_tree_codes, instead set
1554         lang_unsafe_for_reeval.  Don't try to copy into the various
1555         tree_code arrays.
1556
1557 2002-03-12  Nathan Sidwell  <nathan@codesourcery.com>
1558
1559         PR c++/5659
1560         * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
1561         * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
1562         definitions.
1563
1564 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
1565
1566         Revert 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>,
1567         DR209 is now not a defect.
1568         * cp-tree.h (skip_type_access_control): Remove.
1569         * decl.c (grokdeclarator): Do type access control for friend
1570         declarations.
1571         * semantics.c (decl_type_access_control): Don't reset
1572         current_type_lookups.
1573         (save_type_access_control): Always save the lookups.
1574         (skip_type_access_control): Remove.
1575         (finish_class_definition): Don't change type_lookups.
1576
1577 2002-03-11  Nathan Sidwell  <nathan@codesourcery.com>
1578
1579         Revert 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>,
1580         It is incorrect.
1581         * typeck.c (build_static_cast): Compare non-qualified types
1582         with pointer to member conversions.
1583
1584 2002-03-11  Dan Nicolaescu  <dann@ics.uci.edu>
1585             Daniel Berlin  <dan@dberlin.org>
1586
1587         * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
1588         (cxx_get_alias_set): Use it.
1589
1590 2002-03-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1591
1592         * cp-tree.h (stabilize_expr): Prototype.
1593
1594 2002-03-08  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1595
1596         * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
1597         conditional return void.
1598
1599 2002-03-08  Neil Booth  <neil@daikokuya.demon.co.uk>
1600
1601         * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
1602         * cp-tree.h (cxx_unsave): New.
1603         * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
1604         (init_tree): Update.
1605
1606 2002-03-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1607
1608         * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
1609         explicit sizeof/sizeof.
1610         * decl2.c (cxx_decode_option): Likewise.
1611         * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
1612
1613 2002-03-02  Nathan Sidwell  <nathan@codesourcery.com>
1614
1615         PR c++/775
1616         * decl.c (lookup_tag): Only reject enum/class mismatch, not
1617         class/union mismatch.
1618         * parse.y (check_class_key): New function.
1619         (structsp): Call it.
1620
1621 2002-03-01  Michael Matz  <matz@suse.de>
1622
1623         * typeck.c (cp_pointer_int_sum): Complete inner type which is
1624         used later by size_in_bytes().
1625
1626 2002-03-01  Phil Edwards  <pme@gcc.gnu.org>
1627
1628         * cp-tree.h:  Require __GNUC__ to be #defined.
1629         (build_init):  Add missing prototype.
1630
1631 2002-03-01  Jason Merrill  <jason@redhat.com>
1632
1633         * except.c: Don't include decl.h or obstack.h.  Do include
1634         tree-inline.h.
1635         (build_throw): Destroy temporaries from the thrown
1636         expression before calling __cxa_throw.  Construct a thrown
1637         temporary directly into the exception object.
1638         (stabilize_throw_expr): New function.
1639         (wrap_cleanups_r): New function.
1640         * tree.c (stabilize_expr): New function.
1641         * init.c (build_init): New function.
1642         * Make-lang.in (cp/except.o): Adjust .h deps.
1643
1644 2002-02-28  Jason Merrill  <jason@redhat.com>
1645
1646         * search.c (lookup_base_r): Don't clear is_non_public just because
1647         we found a friendly scope.
1648
1649         * decl.c (finish_function): Only warn about missing return
1650         statement with -Wreturn-type.
1651
1652 2002-02-28  Neil Booth  <neil@daikokuya.demon.co.uk>
1653
1654         * class.c (build_clone): Update.
1655         * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
1656         * cp-tree.h (cxx_dup_lang_specific_decl): New.
1657         * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
1658         (copy_decl): Update.
1659         * method.c (make_thunk): Update.
1660
1661 2002-02-27  Zack Weinberg  <zack@codesourcery.com>
1662
1663         * decl2.c: Delete traditional-mode-related code copied from
1664         the C front end but not used, or used only to permit the
1665         compiler to link.
1666
1667 2002-02-24 Craig Rodrigues  <rodrigc@gcc.gnu.org>
1668
1669         PR c++/4093
1670         * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
1671         to void.
1672
1673 2002-02-22  Jakub Jelinek  <jakub@redhat.com>
1674
1675         PR other/5746
1676         * semantics.c (finish_switch_cond): Don't call get_unwidened
1677         if error_mark_node.
1678
1679 2002-02-22  Nathan Sidwell  <nathan@codesourcery.com>
1680
1681         PR c++/2645, DR 295
1682         * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
1683         tf_keep_type_decl.
1684         (make_typename_type): Use tsubst_flags_t.
1685         * decl.c (make_typename_type): Adjust. Return non-artificial
1686         TYPE_DECLs, if required.
1687         (grokdeclarator): Simplify CVR qualification handling. Allow bad
1688         qualifiers on typedef types.
1689         * decl2.c (handle_class_head): Adjust make_typename_type call.
1690         * parse.y (nested_name_specifier): Likewise.
1691         (typename_sub0): Likewise.
1692         (typename_sub1): Likewise.
1693         * pt.c (convert_template_argument): Adjust make_typename_type
1694         return value.
1695         (tsubst): Adjust cp_build_qualified_type_real calls.
1696         (check_cv_quals_for_unify): Cope with alowing bad qualifications
1697         on template type parms.
1698         (instantiate_decl): Recheck substitutions to give warnings on bad
1699         qualifications.
1700         * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
1701
1702 2002-02-21  Aldy Hernandez  <aldyh@redhat.com>
1703
1704         * cp/decl.c (duplicate_decls): Merge always_inline attribute.
1705
1706         * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
1707         unless DECL_ALWAYS_INLINE.
1708
1709 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
1710
1711         * typeck.c (cp_pointer_int_sum): Renamed from
1712         pointer_int_sum, call pointer_int_sum.
1713
1714 2002-02-20  Jakub Jelinek  <jakub@redhat.com>
1715
1716         * decl.c (duplicate_decls): Return 0 if issued error about
1717         redeclaration.
1718
1719 2002-02-19  Jason Merrill  <jason@redhat.com>
1720
1721         ABI change: Mangle `void (A::*)() const' as
1722         M1AKFvvE, not MK1AFvvE.
1723         * mangle.c (write_function_type): Write cv-quals for member
1724         function type here.
1725         (write_pointer_to_member_type): Not here.
1726
1727 2002-02-18  Jason Merrill  <jason@redhat.com>
1728
1729         * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
1730         (do_decl_instantiation): Likewise.
1731
1732 2002-02-17  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1733
1734         PR c++/5685
1735         * decl.c (duplicate_decls): Make warning unconditional
1736         if duplicate default argument declarations are present.
1737
1738 2002-02-17  Jakub Jelinek  <jakub@redhat.com>
1739
1740         * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
1741         shortening.
1742
1743 2002-02-15  Nathan Sidwell  <nathan@codesourcery.com>
1744
1745         * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
1746         remove incorrect comment. Move #if 0'd code to common path. Use
1747         IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
1748
1749 2002-02-13  Jason Merrill  <jason@redhat.com>
1750
1751         * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
1752         (finish_function): Don't warn if current_function_returns_null.
1753
1754         * typeck2.c (digest_init): Do handle values of vector type.
1755
1756         * typeck2.c (digest_init, process_init_constructor): Treat vectors
1757         like arrays.
1758
1759 2002-02-11  Jason Merrill  <jason@redhat.com>
1760
1761         * parse.y (reserved_declspecs): Don't handle attributes.
1762         (reserved_typespecquals): Handle them here.
1763         * Make-lang.in (parse.c): Adjust expected conflicts.
1764
1765 2002-02-08  Jakub Jelinek  <jakub@redhat.com>
1766
1767         * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
1768         instead of compstmt.
1769         (compstmt_or_stmtexpr): Renamed from compstmt.
1770         (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
1771
1772 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
1773
1774         Rename instantiate_type_flags to tsubst_flags_t & expand use.
1775         * cp-tree.h (instantiate_type_flags): Rename to ...
1776         (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
1777         add tf_warning flag.
1778         (instantiate_type): Adjust prototype.
1779         (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
1780         do_type_instantiation, cp_build_qualified_type_real): Likewise.
1781         cp_build_qualified_type: Adjust.
1782         * class.c (instantiate_type): Adjust parameter. Rename itf_* to
1783         tf_*.
1784         * call.c (standard_conversion): Rename itf_* to tf_*.
1785         (reference_binding): Likewise.
1786         (convert_like_real): Likewise.
1787         * cvt.c (cp_convert_to_pointer): Likewise.
1788         (convert_to_reference): Likewise.
1789         * decl.c (lookup_namespace_name): Use tf_* flags.
1790         (make_typename_type): Likewise.
1791         (grokdeclarator): Likewise.
1792         * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
1793         (coerce_template_template_parms, convert_template_argument,
1794         coerce_template_parms, maybe_get_template_decl_from_type_decl,
1795         lookup_template_class, tsubst_friend_function, tsubst_friend_class,
1796         instantiate_class_template, tsubst_template_arg_vector,
1797         tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
1798         tsubst_decl, tsubst_arg_types, tsubst_function_type,
1799         tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
1800         instantiate_template, fn_type_unification,
1801         resolve_overloaded_unification, verify_class_unification,
1802         unify, get_bindings_real, do_type_instantiation,
1803         regenerate_decl_from_template, instantiate_decl,
1804         tsubst_initializer_list, tsubst_enum,
1805         get_mostly_instantiated_function_type,
1806         invalid_nontype_parm_type_p): Likewise.
1807         * tree.c (cp_build_qualified_type_real): Likewise.
1808         * typeck.c (build_binary_op): Rename itf_* to tf_*.
1809         (build_ptrmemfunc): Likewise.
1810         (convert_for_assignment): Likewise.
1811
1812 2002-02-07  Nathan Sidwell  <nathan@codesourcery.com>
1813
1814         PR c++/109
1815         * decl.c (grokdeclarator): Allow friend declarations from
1816         dependent types.
1817         * decl2.c (handle_class_head): Don't push into template parm contexts.
1818         * pt.c (push_template_decl_real): Template parm contexts are never
1819         being defined.
1820
1821 2002-02-05  Alexandre Oliva  <aoliva@redhat.com>
1822
1823         * class.c: Include target.h.
1824         (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
1825         BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
1826         bit-field layout.
1827         * Make-lang.in: Adjust deps.
1828
1829 2002-02-05  Jason Merrill  <jason@redhat.com>
1830
1831         * error.c (dump_type): Be more helpful about VECTOR_TYPE.
1832
1833 2002-02-04  Jakub Jelinek  <jakub@redhat.com>
1834
1835         * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
1836         (finish_switch_cond): Set SWITCH_TYPE.
1837
1838 2002-02-04  Richard Henderson  <rth@redhat.com>
1839
1840         * method.c (use_thunk): Always initialize the block tree.  Reindent.
1841         * semantics.c (expand_body): Emit thunks after function, not before.
1842
1843 2002-02-04  Jason Merrill  <jason@redhat.com>
1844
1845         * decl.c (start_function): Call cplus_decl_attributes immediately
1846         after grokdeclarator.
1847
1848         * decl.c (start_function): Combine DECL_RESULT handling code.
1849
1850 2002-02-03  Jason Merrill  <jason@redhat.com>
1851
1852         * xref.c: Remove.
1853         * Make-lang.in (CXX_OBJS): Remove cp/xref.o
1854         (cp/xref.o): Remove dependencies.
1855         * class.c (finish_struct_1, check_methods): Don't call xref fns.
1856         (finish_struct_1): Likewise.
1857         * friend.c (make_friend_class): Likewise.
1858         * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
1859         * spew.c (read_process_identifier): Likewise.
1860
1861 2002-02-01  Jason Merrill  <jason@redhat.com>
1862
1863         PR c++/4872
1864         * decl.c (finish_function): Warn about a non-void function with
1865         no return statement and no abnormal exit.
1866         * cp-tree.h (struct cp_language_function): Add returns_abnormally.
1867         (current_function_returns_abnormally): New macro.
1868         * call.c (build_call): Set it.
1869
1870         * typeck.c (build_component_ref): Always complain about offsetof
1871         constructs on non-PODs.  Only make it an error for members of
1872         virtual bases.
1873
1874         * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
1875         (dump_function_decl): Always dump parms.
1876
1877         * decl2.c (finish_static_data_member_decl): Complain about a local
1878         class with a static data member.
1879
1880         PR c++/4286
1881         * search.c (lookup_field_1): Don't xref a static data member
1882         just because we looked it up.
1883
1884 2002-01-31  Jason Merrill  <jason@redhat.com>
1885
1886         * Make-lang.in (parse.c): Handle .output file.
1887
1888         PR c++/3395
1889         * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
1890         not TREE_TYPE.
1891         * semantics.c (finish_class_definition): Adjust.
1892
1893         Allow attributes in parms and casts.
1894         * parse.y (named_parm): Don't strip attrs.
1895         (declmods): Remove 'attributes' production.
1896         (nonempty_cv_qualifiers): Accept attributes.
1897         (ATTRIBUTE): Give precedence.
1898         * decl.c (groktypename): Handle attributes.
1899         (grokparms): Likewise.
1900
1901 2002-01-29  Jakub Jelinek  <jakub@redhat.com>
1902
1903         * decl2.c (cxx_decode_option): Pass 0 as last argument to
1904         cpp_handle_option.
1905         * lang-specs.h: Use cpp_unique_options instead of cpp_options
1906         when used together with cc1_options.
1907
1908 2002-01-29  Nathan Sidwell  <nathan@codesourcery.com>
1909
1910         PR c++/5132
1911         * typeck2.c (digest_init): Make sure non-array core type is
1912         instantiated.
1913         * decl2.c (reparse_absdcl_as_casts): Just store the type in the
1914         constructor, rather than build a new one.
1915         (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
1916         PURPOSE of constructor elts.
1917
1918 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
1919
1920         * Make-lang.in (parse.c): Adjust expected number of
1921         shift-reduce conflicts.
1922         (decl.o): Depend on diagnostic.h.
1923         * decl.c: Include diagnostic.h.
1924         (grokdeclarator): Check for null pointer.
1925         (finish_function): Don't abort when
1926         current_binding_level->parm_flag != 1, if errors have
1927         occurred; throw away the statement tree and extra binding
1928         levels, and continue.
1929         * lex.c (note_list_got_semicolon): Check for null pointer.
1930         * method.c (hack_identifier): Just return error_mark_node if
1931         value is error_mark_node.
1932         * parse.y (primary: TYPEID(type_id)): No need to use
1933         TYPE_MAIN_VARIANT here.
1934         (handler_seq): Accept an empty list of catch clauses and
1935         generate a fake handler block to avoid later crashes.
1936         (ansi_raise_identifier): Accept the error token too.
1937         * semantics.c (begin_class_definition,
1938         finish_class_definition): Check for error_mark_node.
1939
1940 2002-01-23  Zack Weinberg  <zack@codesourcery.com>
1941
1942         * typeck2.c (friendly_abort): Delete definition.
1943         * cp-tree.h (friendly_abort): Don't prototype.
1944         (my_friendly_assert): Use fancy_abort.
1945
1946 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1947
1948         * cp-tree.h (my_friendly_abort): Remove.
1949
1950 2002-01-23  Jakub Jelinek  <jakub@redhat.com>
1951
1952         * spew.c (pending_inlines, pending_inlines_tail,
1953         processing_these_inlines): Make static.
1954         (mark_pending_inlines): Remove static.
1955         (begin_parsing_inclass_inline): If in function, save pi
1956         for GC to cp_function_chain->unparsed_inlines instead.
1957         (process_next_inline): Likewise.
1958         * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
1959         (mark_pending_inlines): Add prototype.
1960         * decl.c (spew_debug): Remove unused extern.
1961         (mark_lang_function): Call mark_pending_inlines.
1962
1963 2002-01-23  Craig Rodrigues  <rodrigc@gcc.gnu.org>
1964
1965         * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
1966         init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
1967         semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
1968         Change my_fancy_abort() to abort().
1969
1970 2002-01-23  Jason Merrill  <jason@redhat.com>
1971
1972         PR c++/5453
1973         * class.c (fixed_type_or_null): Fix thinko.
1974
1975         PR c++/3331
1976         * init.c (resolve_offset_ref): Use build_indirect_ref.
1977
1978         * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
1979
1980 2002-01-22  Jason Merrill  <jason@redhat.com>
1981
1982         * parse.y (function_body): Suppress the block for the outermost
1983         curly braces.
1984         * decl.c (pushdecl): Don't try to skip it.
1985         (begin_function_body): Keep the block we create, not the next one.
1986         * init.c (emit_base_init): Don't mess with keep_next_level.
1987
1988         * class.c (build_base_path): Tweak formatting.
1989
1990 2002-01-19  Nathan Sidwell  <nathan@codesourcery.com>
1991
1992         Fix regression introduced with patch for c++/775
1993         * parse.y (class_head_defn): Check for template specializations
1994         with a different class-key.
1995
1996 2002-01-17  Jason Merrill  <jason@redhat.com>
1997
1998         * decl.c (begin_constructor_body, begin_destructor_body): New fns.
1999         (begin_function_body): Call them and keep_next_level.
2000         * init.c (emit_base_init): Call keep_next_level.
2001         * semantics.c (setup_vtbl_ptr): Lose.
2002         * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
2003         (vtbls_set_up_p): Lose.
2004         * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
2005         * method.c (do_build_copy_constructor): Likewise.
2006         (synthesize_method): Call finish_mem_initializers.
2007         * parse.y (nodecls): Likewise.
2008
2009         * error.c (dump_type_suffix): Print the exception specs before
2010         recursing.
2011         (dump_function_decl): Here, too.
2012
2013         * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
2014
2015 2002-01-10  Ira Ruben   <ira@apple.com>
2016
2017         PR c++/907
2018         * decl.c (start_method): Handle attrlist.
2019
2020 2002-01-10  Jakub Jelinek  <jakub@redhat.com>
2021
2022         * decl2.c (max_tinst_depth): Increase default limit to 500.
2023
2024 2002-01-10  Graham Stott  <grahams@redhat.com>
2025
2026         * spew.c (YYCHAR): Uppercase macro parameter and add
2027         parenthesis.
2028         (YYCODE): Likewise.
2029         (NAME): Uppercase macro parameter.
2030
2031 2002-01-09  Graham Stott  <grahams@redhat.com>
2032
2033         * decl.h (grokdeclarator): Wrap long line.
2034
2035         * semantics.c (FINISH_COND): Uppercase macro paramaters and
2036         add parenthesis.
2037
2038 2002-01-08  Graham Stott  <grahams@redhat.com>
2039
2040         * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
2041         (PALLOC): Uppercase macro parameter and whitespace.
2042         (SALLOC): Uppercase macro parameter.
2043         (SFREE): Uppercase macros parameter, add parenthese and
2044         whitespace.
2045         (STREQL): Uppercase macro parameter and whitespace.
2046         (STRNEQ): Likewise.
2047         (STRLSS): Likewise.
2048         (STRLEQ): Likewise.
2049         (STRGTR): Likewise.
2050         (STRGEQ): Likewise.
2051
2052         * call.c (convert_like): Add parenthesis and wrap.
2053         (convert_like_with_context): Likewise.
2054         (ICS_RANK): Whitespace.
2055         (NEED_TEMPORARY_P): Remove parenthesis.
2056
2057         * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
2058         whitespace.
2059         (VTT_MARKED_BINFO_P): Likewise.
2060
2061         * decl.c (BINDING_LEVEL): Add parenthesis.
2062         (DEF_OPERATOR): Likewise.
2063
2064         * mangle.c (MANGLE_TRACE): Add parenthesis.
2065         (MANGLE_TRACE_TREE): Likewise.
2066         (write_signed_number): Likewise.
2067         (write_unsigned_number): Likewise.
2068
2069         * pt.c (ccat): Uppercase macro parameter.
2070         (cat): Likewise
2071
2072         * search.c (SET_BINFO_ACCESS): Add parenthesis.
2073
2074 2002-01-07  Jason Merrill  <jason@redhat.com>
2075
2076         * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
2077         to pedwarn.
2078
2079         PR c++/3536
2080         * method.c (make_thunk): If !flag_weak, give the thunk the
2081         function's linkage.
2082         (use_thunk): Here, too.
2083
2084 2002-01-07  Graham Stott  <grahams@redhat.com>
2085
2086         * error.c: Update copyright date.
2087         (print_scope_operator): Add parenthesis.
2088         (print_left_paren): Likewise.
2089         (print_right_paren): Likewise.
2090         (print_left_bracket): Likewise.
2091         (print_right_bracket): Likewise.
2092         (print_template_argument_list_start): Likewise.
2093         (print_template_argument_list_end): Likewise.
2094         (print_non_consecutive_character): Likewise.
2095         (print_tree_identifier): Likewise.
2096         (print_identifier): Likewise.
2097         (NEXT_CODE): Uppercase macro parameter.
2098         (ident_fndecl): Delete unused.
2099         (GLOBAL_THING): Likewise.
2100
2101 2002-01-06  Graham Stott  <grahams@redhat.com>
2102
2103         * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
2104         (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
2105         (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
2106         (RECORD_OR_UNION_TYPE_CHECK): Likewise.
2107         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
2108         (C_IS_RESERVED_WORD): Uppercase macro parameter.
2109         (C_RID_YYCODE) Likewise.
2110         (ptrmem_cst): Use rtx.
2111         (LOCAL_BINDING_P): Add whitespace.
2112         (INHERITED_VALUE_BINDING_P): Likewise.
2113         (BINDING_SCOPE): Wrap long line.
2114         (BINDING_HAS_LEVEL_P): Remove parenthesis.
2115         (BINDING_VALUE): Wrap long line.
2116         (BINDING_TYPE): Whitespace.
2117         (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
2118         (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
2119         (IDENTIFIER_NAMESPACE_VALUE): Likewise.
2120         (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
2121         (same_type_p): Uppercase macro parameters.
2122         (same_type_ignoring_top_level_qualifiers_p): Likewise.
2123         (OVL_FUNCTION): Wrap long line.
2124         (OVL_CHAIN): Whitespace.
2125         (OVL_CURRENT): Add parenthesis and whitespace.
2126         (OVL_NEXT): Whitespace.
2127         (OVL_USED): Likewise.
2128         (IDENTIFIER_TYPE_VALUE): Likewise.
2129         (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
2130         (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
2131         (LANG_ID_FIELD): Whitespace.
2132         (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
2133         (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
2134         (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
2135         (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
2136         (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
2137         (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
2138         (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
2139         (IDENTIFIER_VIRTUAL_P): Likewise.
2140         (IDENTIFIER_OPNAME_P): Likewise.
2141         (IDENTIFIER_TYPENAME_P): Remove parenthesis.
2142         (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
2143         (C_SET_EXP_ORIGINAL_CODE): Likewise.
2144         (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
2145         (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
2146         (IS_AGGR_TYPE): Uppercase macro parameter.
2147         (CLASS_TYPE_P): Likewise.
2148         (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
2149         (IS_AGGR_TYPE_2): Whitespace.
2150         (TAGGED_TYPE_P): Uppercase macro parameter.
2151         (TYPE_BUILT_IN): Whitespace.
2152         (TYPE_FOR_JAVA): Likewise.
2153         (FUNCTION_ARG_CHAIN): Remove parenthesis.
2154         (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
2155         (FUNCTION_FIRST_USER_PARAM): Likewise.
2156         (PROMOTES_TO_AGGR_TYPE): Whitespace.
2157         (DERIVED_FROM_P): Add parenthesis and wrap.
2158         (UNIQUELY_DERIVED_FROM_P): Likewise.
2159         (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
2160         (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
2161         (CLASSTYPE_USE_TEMPLATE): Whitespace.
2162         (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
2163         (TYPE_GETS_DELETE): Add parenthesis.
2164         (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
2165         (TYPE_HAS_ASSIGN_REF): Likewise,
2166         (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
2167         (TYPE_HAS_INIT_REF): Likewise.
2168         (TYPE_HAS_CONST_INIT_REF): Likewise.
2169         (TYPE_BEING_DEFINED): Likewise.
2170         (TYPE_LANG_SPECIFIC): Likewise.
2171         (CLASSTYPE_RTTI): Likewise.
2172         (TYPE_OVERLOADS_CALL_EXPR): Likewise.
2173         (TYPE_OVERLOADS_ARRAY_REF): Likewise.
2174         (TYPE_OVERLOADS_ARROW): Likewise.
2175         (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
2176         (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
2177         (CLASSTYPE_METHOD_VEC): Likewise.
2178         (CLASSTYPE_MARKED_N): Likewise.
2179         (CLASSTYPE_MARKED): Likewise.
2180         (CLASSTYPE_MARKED2): Likewise.
2181         (CLASSTYPE_MARKED3): Likewise.
2182         (CLASSTYPE_MARKED4): Likewise.
2183         (CLASSTYPE_MARKED5): Likewise.
2184         (CLASSTYPE_MARKED6): Likewise.
2185         (SET_CLASSTYPE_MARKED): Whitespace.
2186         (CLEAR_CLASSTYPE_MARKED): Likewise.
2187         (SET_CLASSTYPE_MARKED2): Likewise.
2188         (CLEAR_CLASSTYPE_MARKED2): Likewise.
2189         (SET_CLASSTYPE_MARKED3): Likewise.
2190         (CLEAR_CLASSTYPE_MARKED3): Likewise.
2191         (SET_CLASSTYPE_MARKED4): Likewise.
2192         (CLEAR_CLASSTYPE_MARKED4): Likewise.
2193         (SET_CLASSTYPE_MARKED5): Likewise.
2194         (CLEAR_CLASSTYPE_MARKED5): Likewise.
2195         (SET_CLASSTYPE_MARKED6): Likewise.
2196         (CLEAR_CLASSTYPE_MARKED6): Likewise.
2197         (CLASSTYPE_TAGS): Likewise.
2198         (CLASSTYPE_VSIZE): Likewise.
2199         (CLASSTYPE_VBASECLASSES): Likewise.
2200         (CANONICAL_BINFO): Add parenthesis.
2201         (CLASSTYPE_SIZE(NODE): Likewise.
2202         (CLASSTYPE_SIZE_UNIT): Likewise.
2203         (CLASSTYPE_ALIGN(NODE): Likewise.
2204         (CLASSTYPE_USER_ALIGN): Likewise.
2205         (TYPE_JAVA_INTERFACE): Likewise.
2206         (CLASSTYPE_PURE_VIRTUALS): Likewise.
2207         (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
2208         (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
2209         (CLASSTYPE_HAS_MUTABLE): Likewise.
2210         (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
2211         (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
2212         (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
2213         (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
2214         (CLASSTYPE_INTERFACE_ONLY): Likewise.
2215         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2216         (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2217         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2218         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2219         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2220         (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
2221         (BINFO_UNSHARED_MARKED): Whitespace.
2222         (BINFO_MARKED): Whitespace and wrap.
2223         (SET_BINFO_MARKED): Likewise.
2224         (CLEAR_BINFO_MARKED): Likewise.
2225         (BINFO_VTABLE_PATH_MARKED): Likewise.
2226         (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
2227         (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
2228         (BINFO_SUBVTT_INDEX): Remove parenthesis.
2229         (BINFO_VPTR_INDEX): Likewise.
2230         (BINFO_PRIMARY_BASE_OF): Likewise,
2231         (CLASSTYPE_VFIELDS): Whitespace.
2232         (VF_DERIVED_VALUE): Wrap long line.
2233         (NAMESPACE_LEVEL): Whitespace.
2234         (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
2235         (DEFARG_POINTER): Whitespace.
2236         (DECL_NEEDED_P): Remove parenthesis.
2237         (DECL_LANGUAGE): Whitespace.
2238         (SET_DECL_LANGUAGE): Add parenthesis.
2239         (DECL_CONSTRUCTOR_P): Whitespace and wrap.
2240         (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
2241         (DECL_IN_AGGR_P): Whitespace.
2242         (DECL_FRIEND_P): Likewise.
2243         (DECL_BEFRIENDING_CLASSES): Likewise.
2244         (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
2245         (DECL_NONCONVERTING_P): Whitespace.
2246         (DECL_PURE_VIRTUAL_P): Likewise.
2247         (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
2248         (DECL_PENDING_INLINE_INFO): Whitespace.
2249         (DECL_SORTED_FIELDS): Likewise.
2250         (DECL_DEFERRED_FN): Likewise.
2251         (DECL_TEMPLATE_INFO): Likewise.
2252         (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
2253         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
2254         (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
2255         (TMPL_ARGS_LEVEL): Likewise.
2256         (SET_TMPL_ARGS_LEVEL): Likewise.
2257         (INNERMOST_TEMPLATE_PARMS): Whitespace.
2258         (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
2259         (INTEGRAL_CODE_P(CODE): Add parenthesis.
2260         (CP_INTEGRAL_TYPE_P): Remove parenthesis.
2261         (TYPE_HAS_CONSTRUCTOR): Whitespace.
2262         (TREE_HAS_CONSTRUCTOR): Likewise.
2263         (TYPE_HAS_DESTRUCTOR): Likewise.
2264         (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
2265         (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
2266         (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
2267         (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
2268         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
2269         (TYPE_PTRMEMFUNC_P): Likewise.
2270         (TYPE_PTRMEMFUNC_FLAG): Likewise.
2271         (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
2272         (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
2273         (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
2274         (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
2275         (DECL_ACCESS): Whitespace.
2276         (DECL_GLOBAL_CTOR_P): Remove parenthesis.
2277         (DECL_GLOBAL_DTOR_P): Likewise.
2278         (GLOBAL_INIT_PRIORITY): Likewise.
2279         (DECL_TEMPLATE_PARMS): Likewise.
2280         (DECL_TEMPLATE_RESULT): Likewise.
2281         (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
2282         (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
2283         (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
2284         (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
2285         (PRIMARY_TEMPLATE_P): Add parenthesis.
2286         (DECL_USE_TEMPLATE): Whitespace.
2287         (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
2288         (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
2289         (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
2290         (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
2291         (CALL_DECLARATOR_PARMS): Remove parenthesis.
2292         (CALL_DECLARATOR_QUALS): Likewise.
2293         (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
2294         (TEMP_NAME_P): Wrap.
2295         (VFIELD_NAME_P): Likewise.
2296         (B_SET): Uppercase macro parameters and add parenthesis.
2297         (B_CLR): Likewise.
2298         (B_TST): Likewise.
2299         (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
2300         (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
2301         (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
2302         (same_or_base_type_p): Likewise.
2303         (cp_deprecated): Likewise.
2304
2305 2002-01-05  Richard Henderson  <rth@redhat.com>
2306
2307         * semantics.c (expand_body): Revert last change.
2308
2309 2002-01-04  Jason Merrill  <jason@redhat.com>
2310
2311         PR c++/4122
2312         * class.c (update_vtable_entry_for_fn): Set delta to zero for a
2313         lost primary.
2314
2315         * class.c (build_vtbl_initializer): Check for a lost primary
2316         before calculating the vtable entry to throw away.
2317
2318 2002-01-02  Jason Merrill  <jason@redhat.com>
2319
2320         * semantics.c (expand_body): Call outlining_inline_function when
2321         emitting an inline function out of line.
2322
2323 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2324
2325         PR c++/5116, c++/764 reversion
2326         * call.c (build_new_op): Revert the instantiations. They are
2327         incorrect.
2328
2329 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2330
2331         PR c++/5089
2332         * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
2333
2334 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2335
2336         PR c++/3716
2337         * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
2338         (tsubst, case POINTER_TYPE): Handle pmfs here.
2339         (tsubst, case OFFSET_TYPE): Check it is not an offset to
2340         reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
2341
2342 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2343
2344         PR c++/35
2345         * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
2346         (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
2347         * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
2348         PARM_DECL.
2349         (tsubst_template_parms): Break up loop statements.
2350         (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
2351         parm PARM_DECLs don't get promoted.
2352
2353 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2354
2355         PR c++/5123
2356         * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
2357         (build_x_function_call): Cope with a COMPONENT_REF containing a
2358         TEMPLATE_ID_EXPR.
2359
2360 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2361
2362         PR c++/5213
2363         * pt.c (convert_template_argument): Be more careful determining
2364         when RECORD_TYPE templates are or are not templates.
2365
2366 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2367
2368         PR c++/775
2369         * cp-tree.h (handle_class_head): Adjust prototype.
2370         * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
2371         parameters. Use for all class heads.
2372         * parse.y (named_class_head_sans_basetype, named_class_head,
2373         named_complex_class_head_sans_basetype,
2374         named_class_head_sans_basetype_defn,
2375         unnamed_class_head): Remove.
2376         (class_head, class_head_apparent_template): Recognize class heads
2377         (class_head_decl, class_head_defn): New reductions. Process class
2378         heads.
2379         (structsp): Adjust class definition and class declaration
2380         reductions.
2381         (maybe_base_class_list): Give diagnostic on empty list.
2382
2383 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2384
2385         PR c++/4379
2386         * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
2387         single non-static member.
2388         (unary_complex_lvalue): If it cannot be a pointer to member, don't
2389         make it so. Check it is not pointer to reference.
2390
2391 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2392
2393         PR c++/5132
2394         * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
2395         are processing a template decl.
2396
2397 2002-01-02  Nathan Sidwell  <nathan@codesourcery.com>
2398
2399         PR c++/5116, c++/764
2400         * call.c (build_new_op): Make sure template class operands are
2401         instantiated. Simplify arglist construction.
2402
2403 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
2404
2405         * call.c (build_user_type_conversion_1): Use my_friendly_assert
2406         rather than if ... abort.
2407         * cvt.c (convert_to_reference): Likewise.
2408         * semantics.c (setup_vtbl_ptr): Likewise.
2409         * pt.c (lookup_template_class): Comment typo.
2410
2411 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
2412
2413         PR c++/5125
2414         * pt.c (push_template_decl_real): Make sure DECL has
2415         DECL_LANG_SPECIFIC.
2416
2417 2001-12-29  Nathan Sidwell  <nathan@codesourcery.com>
2418
2419         PR c++/335
2420         * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
2421         for non-reference fields.
2422         * typeck.c (require_complete_type): Use resolve_offset_ref).
2423
2424 2001-12-26  Nathan Sidwell  <nathan@codesourcery.com>
2425
2426         PR c++/196
2427         * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
2428
2429 2001-12-24  Nathan Sidwell  <nathan@codesourcery.com>
2430
2431         PR c++/160
2432         * typeck.c (build_modify_expr): Remove old unreachable code & tidy
2433         up. Don't stabilize_references when initializing a reference.
2434
2435 2001-12-23  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2436
2437         * decl2.c (lang_f_options): Const-ify.
2438
2439 2001-12-20  Joseph S. Myers  <jsm28@cam.ac.uk>
2440
2441         * config-lang.in (diff_excludes): Remove.
2442
2443 2001-12-19  Nathan Sidwell  <nathan@codesourcery.com>
2444
2445         PR c++/90
2446         * typeck.c (build_function_call_real): Use original function
2447         expression for errors.
2448
2449 2001-12-18  Jason Merrill  <jason@redhat.com>
2450
2451         PR c++/3242
2452         * class.c (add_method): Do compare 'this' quals when trying to match a
2453         used function.  Don't defer to another used function.
2454
2455 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
2456
2457         * pt.c (instantiate_clone): Remove, fold into ...
2458         (instantiate_template): ... here. Simplify by removing mutual
2459         recursion.
2460         * typeck2.c (build_m_component_ref): Don't cv qualify the function
2461         pointed to by a pointer to function.
2462         * class.c (delete_duplicate_fields_1): Typo.
2463
2464 2001-12-18  Jason Merrill  <jason@redhat.com>
2465
2466         C++ ABI change: destroy value arguments in caller.
2467         * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
2468         create an extra binding level for the parameters.
2469         * decl.c (store_parm_decls): Don't do parameter cleanups.
2470
2471 2001-12-18  Nathan Sidwell  <nathan@codesourcery.com>
2472
2473         * call.c (build_new_method_call): Use '%#V'.
2474         * error.c (cv_to_string): Use V parameter to determine padding.
2475
2476 2001-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
2477
2478         * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
2479         spellings in messages.
2480
2481 2001-12-17  Zack Weinberg  <zack@codesourcery.com>
2482
2483         * cp-tree.h: Delete #defines for cp_error, cp_warning,
2484         cp_pedwarn, and cp_compiler_error.
2485         * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
2486         except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
2487         rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
2488         typeck2.c: Change calls to the above macros to use their
2489         language-independent equivalents: error, warning, pedwarn, and
2490         internal_error respectively.
2491
2492 2001-12-16  Neil Booth  <neil@daikokuya.demon.co.uk>
2493
2494         * decl2.c (finish_file): Remove back_end_hook.
2495
2496 2001-12-16  Joseph S. Myers  <jsm28@cam.ac.uk>
2497
2498         * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
2499         cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
2500         pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
2501
2502 2001-12-15  Joseph S. Myers  <jsm28@cam.ac.uk>
2503
2504         * lang-options.h: Use American spelling in messages.
2505
2506 2001-12-13  Jason Merrill  <jason@redhat.com>
2507
2508         * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
2509
2510         Use cleanups to run base and member destructors.
2511         * init.c (push_base_cleanups): New function, split out from...
2512         (build_delete): ...here.  Lose !TYPE_HAS_DESTRUCTOR code.
2513         * decl.c (finish_destructor_body): Move vbase destruction code to
2514         push_base_cleanups.
2515         (begin_function_body, finish_function_body): New fns.
2516         (finish_function): Move [cd]tor handling and call_poplevel to
2517         finish_function_body.
2518         (pushdecl): Skip the new level.
2519         * semantics.c (genrtl_try_block): Don't call end_protect_partials.
2520         (setup_vtbl_ptr): Call push_base_cleanups.
2521         * method.c (synthesize_method): Call {begin,end}_function_body.
2522         * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
2523         * cp-tree.h: Declare new fns.
2524         * parse.y (function_body, .begin_function_body): New nonterminals.
2525         (fndef, pending_inline, function_try_block): Use function_body.
2526         (ctor_initializer_opt, function_try_block): No longer has a value.
2527         (base_init): Remove .set_base_init token.
2528         (.set_base_init, compstmt_or_error): Remove.
2529         * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
2530
2531         * optimize.c (maybe_clone_body): Fix parameter updating.
2532
2533 2001-12-12  Jason Merrill  <jason@redhat.com>
2534
2535         * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
2536         * semantics.c (genrtl_start_function): Don't pass
2537         parms_have_cleanups or push an extra binding level.
2538         (genrtl_finish_function): Lose cleanup_label cruft.
2539
2540         * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
2541         (ctor_label): Remove.
2542         * semantics.c (finish_return_stmt): Lose ctor_label support.
2543         * decl.c (finish_constructor_body, mark_lang_function): Likewise.
2544         * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
2545         dtor_label.
2546
2547         * call.c (build_new_method_call): Let resolves_to_fixed_type_p
2548         check for [cd]tors.
2549         * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
2550
2551         * decl.c (finish_function): Check VMS_TARGET, not VMS.
2552
2553         * decl.c (start_cleanup_fn): Remove redundant pushlevel.
2554         (end_cleanup_fn): And poplevel.
2555
2556         * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
2557         if we're in a template.
2558
2559 2001-12-12  Jakub Jelinek  <jakub@redhat.com>
2560
2561         * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
2562         ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
2563         THIS_NAME_P): Delete.
2564         * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
2565         THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
2566         with internal naming scheme.
2567         * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
2568
2569 2001-12-12  Nathan Sidwell  <nathan@codesourcery.com>
2570
2571         * decl.c (grokdeclarator): Deprecated implicit typename use.
2572
2573 2001-12-11  Nathan Sidwell  <nathan@codesourcery.com>
2574
2575         PR g++/51
2576         * parse.y (frob_specs): Indicate it is a language linkage which
2577         contained the extern.
2578         * decl.c (grokdeclarator): Allow extern language linkage with
2579         other specifiers.
2580
2581 2001-12-10  Nathan Sidwell  <nathan@codesourcery.com>
2582
2583         PR g++/72
2584         * decl.c (add_binding): Don't reject duplicate typedefs involving
2585         template parameters.
2586
2587 2001-12-10  Neil Booth  <neil@daikokuya.demon.co.uk>
2588
2589         * parse.y, semantics.c: Similarly.
2590
2591 2001-12-09  Nathan Sidwell  <nathan@codesourcery.com>
2592
2593         PR g++/87
2594         * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
2595         (copy_args_p): Rename to ...
2596         (copy_fn_p): ... here.
2597         (grok_special_member_properties): New function.
2598         (grok_op_properties): Lose VIRTUALP parameter.
2599         (copy_assignment_arg_p): Remove.
2600         * call.c (build_over_call): Use copy_fn_p.
2601         * decl.c (grokfndecl): Reformat. Adjust call to
2602         grok_op_properties.
2603         (copy_args_p): Rename to ...
2604         (copy_fn_p): ... here. Reject template functions. Check for pass
2605         by value.
2606         (grok_special_member_properties): Remember special functions.
2607         (grok_ctor_properties): Don't remember them here, just check.
2608         (grok_op_properties): Likewise.
2609         (start_method): Call grok_special_member_properties.
2610         * decl2.c (grokfield): Likewise.
2611         (copy_assignment_arg_p): Remove.
2612         (grok_function_init): Don't remember abstract assignment here.
2613         * pt.c (instantiate_class_template): Call
2614         grok_special_member_properties.
2615         (tsubst_decl): Adjust grok_op_properties call.
2616
2617 2001-12-08  Aldy Hernandez  <aldyh@redhat.com>
2618
2619         * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
2620         RID_TYPES_COMPATIBLE_P.
2621
2622 2001-12-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
2623
2624         * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
2625         call to build_aggr_init.
2626         * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
2627
2628 2001-12-08  Neil Booth  <neil@daikokuya.demon.co.uk>
2629
2630         * parse.y: Replace uses of the string non-terminal with STRING.
2631         Don't perform string concatentaion here.
2632         (string): Remove non-terminal.
2633         * semantics.c (finish_asm_stmt): Don't concatenate strings here.
2634
2635 2001-12-05  Jason Merrill  <jason@redhat.com>
2636
2637         * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
2638         (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
2639         * tree.c (cp_start_inlining, cp_end_inlining): New fns.
2640         * pt.c (push_tinst_level): No longer static.
2641         * cp-tree.h: Declare them.
2642
2643         * init.c (resolve_offset_ref): Don't check access for the base
2644         conversion to access a FIELD_DECL.
2645
2646         * cp-tree.h (TYPE_REFFN_P): New macro.
2647         * decl.c (bad_specifiers): Check it, too.
2648
2649         * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
2650         on the __*_type_info type if we haven't seen a definition.
2651
2652 2001-12-05  Neil Booth  <neil@daikokuya.demon.co.uk>
2653
2654         * decl.c: Include c-common.h.
2655         (shadow_warning): Move to c-common.c.
2656
2657 Wed Dec  5 17:00:49 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2658
2659         * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
2660
2661 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
2662
2663         * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
2664
2665 2001-12-04  Nathan Sidwell  <nathan@codesourcery.com>
2666
2667         PR g++/164
2668         * init.c (sort_base_init): Allow binfos to be directly specified.
2669         * method.c (do_build_copy_constructor): Explicitly convert to the
2670         base instance.
2671         (do_build_assign_ref): Likewise.
2672
2673 2001-12-03  Hans-Peter Nilsson  <hp@bitrange.com>
2674
2675         * decl.c (xref_basetypes): Don't use C99 construct in tag_code
2676         declaration and initialization.
2677
2678 2001-12-03  Neil Booth  <neil@daikokuya.demon.co.uk>
2679
2680         * typeck2.c: Remove leading capital from diagnostic messages, as
2681         per GNU coding standards.
2682
2683 2001-12-03  Mumit Khan  <khan@nanotech.wisc.edu>
2684
2685         PR c++/3394
2686         * decl.c (xref_basetypes): Handle attributes between
2687         'class' and name.
2688
2689 2001-12-03  Nathan Sidwell  <nathan@codesourcery.com>
2690
2691         PR g++/3381
2692         * parse.y (named_complex_class_head_sans_basetype): Add new
2693         reduction.
2694         * Make-lang.in (parse.c): Adjust expected conflict count.
2695
2696 2001-12-03  Jason Merrill  <jason@redhat.com>
2697
2698         * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
2699         immediate binfos for our virtual bases.
2700
2701 2001-12-02  Neil Booth  <neil@daikokuya.demon.co.uk>
2702
2703         * call.c (build_java_interface_fn_ref): Similarly.
2704         * except.c (is_admissible_throw_operand): Similarly.
2705         * init.c (build_java_class_ref): Similarly.
2706         * xref.c (open_xref_file): Similarly.
2707
2708 2001-12-01  Neil Booth  <neil@daikokuya.demon.co.uk>
2709
2710         * class.c (finish_struct): Remove trailing periods from messages.
2711         * decl.c (check_tag_decl): Similarly.
2712         * lex.c (cxx_set_yydebug): Similarly.
2713         * typeck2.c (friendly_abort): Similarly.
2714
2715 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
2716
2717         PR c++/3048
2718         * cp-tree.h (ovl_member): Remove.
2719         * decl2.c (merge_functions): Handle extern "C" functions
2720         specially.
2721         * tree.c (ovl_member): Remove.
2722
2723 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
2724
2725         PR c++/4842
2726         * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
2727         FUNCTION_DECL, as input.
2728         (mark_overriders): Remove.
2729         (warn_hidden): Rework for the new ABI.
2730
2731 2001-11-29  Mark Mitchell  <mark@codesourcery.com>
2732
2733         PR c++/3471
2734         * call.c (convert_like_real): Do not build additional temporaries
2735         for rvalues of class type.
2736
2737 2001-11-28  Nathan Sidwell  <nathan@codesourcery.com>
2738
2739         * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
2740         (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
2741         (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
2742         (DERIVED_FROM_P): Likewise.
2743         (enum base_access): Renumber, add ba_quiet bit mask.
2744         (get_binfo): Remove.
2745         (get_base_distance): Remove.
2746         (binfo_value): Remove.
2747         (ACCESSIBLY_DERIVED_FROM_P): Remove.
2748         * call.c (standard_conversion): Use lookup_base.
2749         * class.c (strictly_overrides): Likewise.
2750         (layout_virtual_bases): Likewise.
2751         (warn_about_ambiguous_direct_bases): Likewise.
2752         (is_base_of_enclosing_class): Likewise.
2753         (add_vcall_offset_vtbl_entries_1): Likewise.
2754         * cvt.c (build_up_reference): Adjust comment.
2755         * init.c (build_member_call): Reformat.
2756         * search.c (get_binfo): Remove.
2757         (get_base_distance_recursive): Remove.
2758         (get_base_distance): Remove.
2759         (lookup_base_r): Tweak.
2760         (lookup_base): Add ba_quiet control. Complete the types here.
2761         (covariant_return_p): Use lookup_base.
2762         * tree.c (binfo_value): Remove.
2763         (maybe_dummy_object): Use lookup_base.
2764         * typeck.c (build_static_cast): Use lookup_base.
2765         (get_delta_difference): Likewise.
2766         * typeck2.c (binfo_or_else): Use lookup_base.
2767         (build_scoped_ref): Add back error_mark_check.
2768         (build_m_component_ref): Use lookup_base.
2769
2770 2001-11-29  Joseph S. Myers  <jsm28@cam.ac.uk>
2771
2772         * Make-lang.in (c++.generated-manpages): New dummy target.
2773
2774 Tue Nov 27 09:03:47 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2775
2776         * Make-lang.in (cp-lang.o): Depends on c-common.h.
2777         * cp-lang.c (c-common.h): Include.
2778         (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
2779         * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
2780         * expr.c (init_cplus_expand): Don't set lang_expand_constant.
2781
2782 2001-11-26  Neil Booth  <neil@daikokuya.demon.co.uk>
2783
2784         * decl2.c (c_language): Move to c-common.c.
2785         * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
2786         functions.
2787         (cxx_init): Update.
2788
2789 2001-11-26  Jason Merrill  <jason@redhat.com>
2790
2791         * call.c (joust): Remove COND_EXPR hack.
2792
2793 2001-11-25  Aldy Hernandez  <aldyh@redhat.com>
2794
2795         * search.c (lookup_base_r): Declare bk in variable declaration
2796         space.
2797
2798 2001-11-25  Nathan Sidwell  <nathan@codesourcery.com>
2799
2800         PR g++/3145
2801         * class.c (build_vbase_pointer): Remove.
2802         (build_vbase_path): Remove.
2803         (build_base_path): New function.
2804         * cp-tree.h (base_access, base_kind): New enumerations.
2805         (build_base_path): Declare.
2806         (convert_pointer_to_real): Remove.
2807         (convert_pointer_to): Remove.
2808         (lookup_base): Declare.
2809         (convert_pointer_to_vbase): Remove.
2810         * call.c (build_scoped_method_call): Use lookup_base &
2811         build_base_path instead of convert_pointer_to_real,
2812         get_base_distance & get_binfo.
2813         (build_over_call): Likewise.
2814         * cvt.c (cp_convert_to_pointer): Likewise.
2815         (convert_to_pointer_force): Likewise.
2816         (build_up_reference): Likewise.
2817         (convert_pointer_to_real): Remove.
2818         (convert_pointer_to): Remove.
2819         * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
2820         instead of convert_pointer_to_vbase & build_vbase_path.
2821         (emit_base_init): Use build_base_path instead of
2822         convert_pointer_to_real.
2823         (expand_virtual_init): Lose unrequired conversions.
2824         (resolve_offset_ref): Use lookup_base and build_base_path
2825         instead of convert_pointer_to.
2826         * rtti.c (build_dynamic_cast_1): Use lookup_base &
2827         build_base_path instead of get_base_distance & build_vbase_path.
2828         * search.c (get_vbase_1): Remove.
2829         (get_vbase): Remove.
2830         (convert_pointer_to_vbase): Remove.
2831         (lookup_base_r): New function.
2832         (lookup_base): New function.
2833         * typeck.c (require_complete_type): Use lookup_base &
2834         build_base_path instead of convert_pointer_to.
2835         (build_component_ref): Likewise.
2836         (build_x_function_call): Likewise.
2837         (get_member_function_from_ptrfunc): Likewise.
2838         (build_component_addr): Likewise.
2839         * typeck2.c (build_scoped_ref): Likewise.
2840
2841 2001-11-22  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>
2842
2843         * cp-tree.h (CP_TYPE_QUALS): Removed.
2844         * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
2845         * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
2846         LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
2847         * dump.c (cp_dump_tree): Use void* dump_info argument to match
2848         lang-hooks prototype.
2849         * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
2850         rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
2851         CP_TYPE_QUALS changed to cp_type_quals.
2852         * Make-lang.in: References to c-dump.h changed to tree-dump.h.
2853         (CXX_C_OBJS): Remove c-dump.o.
2854
2855 2001-11-21  Mark Mitchell  <mark@codesourcery.com>
2856
2857         PR c++/3637
2858         * pt.c (lookup_template_class): Ensure that all specializations
2859         are registered on the list corresponding to the most general
2860         template.
2861
2862 2001-11-20  Mark Mitchell  <mark@codesourcery.com>
2863
2864         * call.c (non_reference): Add documentation.
2865         (convert_class_to_reference): Do not strip reference types
2866         from conversion operators.
2867         (maybe_handle_ref_bind): Simplify.
2868         (compare_ics): Correct handling of references.
2869
2870 2001-11-19  John Wilkinson <johnw@research.att.com>
2871
2872         * dump.c (dump_op): New function.
2873         (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION.  Use
2874         dump_op.  Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
2875         DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
2876
2877 2001-11-19  Mark Mitchell  <mark@codesourcery.com>
2878
2879         PR4629
2880         * semantics.c (finish_sizeof): Make sure that expression created
2881         while processing a template do not have a type.
2882         (finish_alignof): Likewise.
2883         * typeck.c (c_sizeof): Likewise.
2884         (expr_sizeof): Likewise.
2885
2886 2001-11-18  Neil Booth  <neil@daikokuya.demon.co.uk>
2887
2888         * lex.c (cxx_finish): Call c_common_finish.
2889         (finish_parse): Remove.
2890
2891 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2892
2893         * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
2894         when displaying error message about missing array bounds.
2895
2896 2001-11-17  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2897
2898         * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
2899         CONST_CAST_EXPR.
2900         * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
2901
2902 2001-11-16  Neil Booth  <neil@daikokuya.demon.co.uk>
2903
2904         * cp-tree.h (print_class_statistics): Restore.
2905
2906 2001-11-15  Jason Merrill  <jason@redhat.com>
2907
2908         * method.c (use_thunk): Don't emit debugging information for thunks.
2909
2910         * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
2911         * decl.c (make_typename_type): Handle getting a class template.
2912         * search.c (lookup_field_r): A class template is good enough for
2913         want_type.
2914
2915         * call.c (convert_like_real): Only use cp_convert for the bad part.
2916         (standard_conversion): Also allow bad int->enum.
2917         * typeck.c (ptr_reasonably_similar): Also allow functions to
2918         interconvert.  Pointers to same-size integers are reasonably
2919         similar.
2920
2921         * cvt.c (convert_to_void): If we build a new COND_EXPR, always
2922         give it void type.
2923
2924 2001-11-15  Nathan Sidwell  <nathan@codesourcery.com>
2925
2926         PR g++/3154
2927         * init.c (sort_base_init): Remove unreachable code.
2928         (expand_member_init): Adjust comment to reflect reality. Simplify
2929         and remove unreachable code.
2930
2931 2001-11-15  Neil Booth  <neil@daikokuya.demon.co.uk>
2932
2933         * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
2934         (cxx_init): Update prototype.
2935         * decl.c (init_decl_processing): Rename.  Move null node init
2936         to its creation time.
2937         * lex.c (cxx_init_options): Update.
2938         (cxx_init): Combine with old init_parse; also call
2939         cxx_init_decl_processing.
2940
2941 2001-11-14  Richard Sandiford  <rsandifo@redhat.com>
2942
2943         * decl.c (check_initializer): Try to complete the type of an
2944         array element before checking whether it's complete.  Don't
2945         complain about arrays with complete element types but an
2946         unknown size.
2947         (cp_finish_decl): Build the hierarchical constructor before
2948         calling maybe_deduce_size_from_array_init.
2949
2950 2001-11-14  Joseph S. Myers  <jsm28@cam.ac.uk>
2951
2952         * Make-lang.in: Change all uses of $(manext) to $(man1ext).
2953
2954 2001-11-13  Nathan Sidwell  <nathan@codesourcery.com>
2955
2956         PR g++/4206
2957         * parse.y (already_scoped_stmt): Remove.
2958         (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
2959
2960 2001-11-12  H.J. Lu <hjl@gnu.org>
2961
2962         * cvt.c (ocp_convert): Don't warn the address of a weak
2963         function is always `true'.
2964
2965 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2966
2967         * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
2968         LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
2969         LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
2970         * cp-tree.h (print_class_statistics): Remove.
2971         (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
2972         cxx_print_identifier, cxx_set_yydebug): New.
2973         * lex.c (set_yydebug): Rename c_set_yydebug.
2974         * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
2975         lang_print_xnode): Rename.
2976         * tree.c (print_lang_statistics): Rename.
2977
2978 2001-11-09  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2979
2980         * class.c (dump_array): Fix format specifier warning.
2981
2982 2001-11-09  Neil Booth  <neil@daikokuya.demon.co.uk>
2983
2984         * cp-lang.c (LANG_HOOKS_NAME): Override.
2985         (struct lang_hooks): Constify.
2986         * lex.c (cxx_init_options): Update.
2987         (lang_identify): Remove.
2988         * parse.y (language_string): Remove.
2989
2990 2001-11-08  Andreas Franck  <afranck@gmx.de>
2991
2992         * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
2993         DEMANGLER_CROSS_NAME): Handle program_transform_name the way
2994         suggested by autoconf.
2995         (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
2996         (c++.install-common): Use the transformed target alias names.
2997
2998 2001-11-06  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
2999
3000         * Make-lang.in: Update.
3001         * cp-lang.c: Include langhooks-def.h.
3002
3003 2001-11-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3004
3005         * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
3006
3007 2001-11-03  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3008
3009         * lex.c (copy_lang_type): Add static prototype.
3010
3011 2001-11-02  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3012
3013         * pt.c (unify): Handle SCOPE_REF.
3014
3015 2001-11-01  Jakub Jelinek  <jakub@redhat.com>
3016
3017         * tree.c (cp_copy_res_decl_for_inlining): Adjust
3018         DECL_ABSTRACT_ORIGIN for the return variable.
3019
3020 2001-10-31  Zack Weinberg  <zack@codesourcery.com>
3021
3022         *  Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
3023
3024 2001-10-28  Joseph S. Myers  <jsm28@cam.ac.uk>
3025
3026         * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
3027         semantics.c, spew.c: Fix spelling errors.
3028
3029 2001-10-27  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3030
3031         * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
3032
3033 2001-10-25  Zack Weinberg  <zack@codesourcery.com>
3034
3035         * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
3036         pop_everything.
3037
3038 Tue Oct 23 14:00:20 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3039
3040         * cp-lang.c (cxx_get_alias_set): New function.
3041         Point LANG_HOOKS_GET_ALIAS_SET to it.
3042
3043 2001-10-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3044
3045         * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
3046         * cp-tree.h (make_unbound_class_template): Prototype new function.
3047         * decl.c (make_unbound_class_template): New function.
3048         * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
3049         * error.c (dump_type): Likewise.
3050         * mangle.c (write_type): Likewise.
3051         * parse.y (template_parm): Likewise.
3052         (template_argument): Use make_unbound_class_template.
3053         * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
3054         (tsubst): Likewise.
3055         (tsubst_copy): Likewise.
3056         (unify): Likewise.
3057         * tree.c (walk_tree): Likewise.
3058         * typeck.c (comptypes): Likewise.
3059
3060 2001-10-21  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3061
3062         * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
3063         extra calls into fewer ones.
3064
3065 2001-10-18  Alexandre Oliva  <aoliva@redhat.com>
3066
3067         * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
3068         Warn when merging inline with attribute noinline.
3069         (start_decl, start_function): Warn if inline and attribute
3070         noinline appear in the same declaration.
3071
3072 2001-10-16  H.J. Lu <hjl@gnu.org>
3073
3074         * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
3075         for tree checking disabled.
3076
3077 2001-10-16  Hans-Peter Nilsson  <hp@axis.com>
3078
3079         * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
3080         NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
3081
3082 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
3083
3084         * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
3085         (unify): Only handle MINUS_EXPR specially if the above flag is set
3086         and the subtracted constant is 1.  Clear the flag on recursive calls.
3087         Set it when unifying the maximum value in an INTEGER_TYPE's range.
3088
3089 2001-10-15  Richard Sandiford  <rsandifo@redhat.com>
3090
3091         * decl.c (bad_specifiers): Don't allow exception specifications
3092         on any typedefs.
3093
3094 2001-10-14  Neil Booth  <neil@daikokuya.demon.co.uk>
3095
3096         * cp/lex.c (init_cp_pragma): Similarly.
3097
3098 2001-10-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3099
3100         * pt.c (lookup_template_class): Build complete template arguments
3101         for BOUND_TEMPLATE_TEMPLATE_PARM.
3102
3103 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3104
3105         * cp-tree.h (TYPE_BINFO): Update comment.
3106         (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
3107         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
3108         (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
3109         (copy_type): Prototype new function.
3110         * lex.c (copy_lang_decl): Gather tree node statistics.
3111         (copy_lang_type): New function.
3112         (copy_type): Likewise.
3113         (cp_make_lang_type): Create lang_type for
3114         BOUND_TEMPLATE_TEMPLATE_PARM.  Set TYPE_BINFO for TYPENAME_TYPE
3115         and BOUND_TEMPLATE_TEMPLATE_PARM.
3116         * pt.c (tsubst): Use copy_type instead of copy_node.
3117         * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
3118
3119 2001-10-12  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3120
3121         * pt.c (determine_specialization): Ignore functions without
3122         DECL_TEMPLATE_INFO.
3123
3124 2001-10-12  Nathan Sidwell  <nathan@codesourcery.com>
3125
3126         PR g++/4476
3127         * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
3128
3129 2001-10-11  Jason Merrill  <jason_merrill@redhat.com>
3130
3131         * typeck2.c (store_init_value): Don't re-digest a bracketed
3132         initializer.
3133
3134         * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
3135         ANON_AGGR_TYPE_P.
3136
3137 2001-10-11  Richard Henderson  <rth@redhat.com>
3138
3139         * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
3140         of an asm statement.
3141         (build_vtbl_ref_1): Split out from build_vtbl_ref.
3142         (build_vfn_ref): Use it to handle vtable descriptors before
3143         calling build_vtable_entry_ref.
3144         * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
3145
3146 2001-10-10  Richard Henderson  <rth@redhat.com>
3147
3148         * parse.y (asm_operand): Allow named operands.
3149         * semantics.c (finish_asm_stmt): Tweek for changed location
3150         of the operand constrant.
3151
3152 2001-10-09  Jason Merrill  <jason_merrill@redhat.com>
3153
3154         * call.c (standard_conversion): Add bad conversion between
3155         integers and pointers.
3156         (convert_like_real): Don't use convert_for_initialization for bad
3157         conversions; complain here and use cp_convert.
3158         (build_over_call): Don't handle bad conversions specially.
3159         (perform_implicit_conversion): Allow bad conversions.
3160         (can_convert_arg_bad): New fn.
3161         * cp-tree.h: Declare it.
3162         * typeck.c (convert_for_assignment): Use it.
3163         (ptr_reasonably_similar): Any target type is similar to void.
3164
3165 2001-10-08  Alexandre Oliva  <aoliva@redhat.com>
3166
3167         * Make-lang.in (CXX_OBJS): Added cp-lang.o.
3168         (cp/cp-lang.o): New rule.
3169         * cp-tree.h: Declare hooks.
3170         * tree.c: Make hooks non-static.
3171         (init_tree): Don't initialize hooks here.
3172         * lex.c: Likewise.  Move definition of lang_hooks to...
3173         * cp-lang.c: ... new file.
3174
3175 2001-10-08  Richard Henderson  <rth@redhat.com>
3176
3177         * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
3178         (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
3179
3180 2001-10-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3181
3182         * class.c (build_vtable_entry_ref): Const-ify.
3183         * decl.c (predefined_identifier,
3184         initialize_predefined_identifiers): Likewise.
3185         * init.c (build_new_1): Likewise.
3186         * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
3187         Likewise.
3188
3189 2001-10-05  Alexandre Oliva  <aoliva@redhat.com>
3190
3191         * optimize.c (struct inline_data): Moved to ../tree-inline.c.
3192         (INSNS_PER_STMT): Likewise.
3193         (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
3194         (copy_body, initialize_inlined_parameters): Likewise.
3195         (declare_return_variable, inlinable_function_p): Likewise.
3196         (expand_call_inline, expand_calls_inline): Likewise.
3197         (optimize_inline_calls, clone_body): Likewise.
3198         * tree.c (walk_tree): Moved to ../tree-inline.c.
3199         (walk_tree_without_duplicates): Likewise.
3200         (copy_tree_r, remap_save_expr): Likewise.
3201
3202 2001-10-04  Alexandre Oliva  <aoliva@redhat.com>
3203
3204         * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
3205         (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
3206         * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
3207         (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
3208         (flag_inline_trees): Moved declaration to ../tree-inline.h.
3209         (walk_tree): Moved declaration to ../tree-inline.h.
3210         (walk_tree_without_duplicates, copy_tree_r): Likewise.
3211         (remap_save_expr): Likewise.
3212         * decl.c: Include tree-inline.h.
3213         (lang_mark_tree): Don't mark inlined_fns.
3214         * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
3215         * optimize.c: Include tree-inline.h.
3216         (optimize_inline_calls): Move declaration to ../tree.h, as
3217         non-static.
3218         (remap_decl): Use language-independent constructs and hooks.
3219         (remap_block, copy_body_r, declare_return_variable): Likewise.
3220         (inlinable_function_p): Likewise.  Don't test for
3221         DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
3222         no longer language-specific.
3223         (optimize_inline_calls): Likewise.  Make it non-static.  Moved
3224         call of dump_function to...
3225         (optimize_function): Here...
3226         (clone_body): New function, extracted from...
3227         (maybe_clone_body): ... here.  Build decl_map locally and pass
3228         it on to clone_body.
3229         * pt.c, semantics.c: Include tree-inline.h.
3230         * tree.c: Likewise.
3231         (cp_walk_subtrees): New language-specific hook for tree inlining.
3232         (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
3233         cp_is_overload_p, cp_auto_var_in_fn_p,
3234         cp_copy_res_decl_for_inlining): Likewise.
3235         (walk_tree): Move language-specific constructs into...
3236         (cp_walk_subtrees): this new function.
3237         (copy_tree_r): Use language-independent constructs and hooks.
3238         (init_tree): Initialize tree inlining hooks.
3239         (remap_save_expr): Adjust prototype so that the declaration
3240         does not require the definition of splay_tree.
3241
3242 2001-10-03  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3243
3244         * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
3245         to build the declaration instead of the declaration itself.
3246
3247 2001-10-02  Jason Merrill  <jason_merrill@redhat.com>
3248
3249         * decl2.c (cxx_decode_option): Add 'else'.
3250
3251         * spew.c (end_input): No longer static.
3252         * cp-tree.h: Declare it.
3253         * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
3254
3255 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
3256
3257         * call.c (build_over_call), typeck.c (build_function_call_real):
3258         Pass type attributes to check_function_format rather than name or
3259         assembler name.  Don't require there to be a name or assembler
3260         name to check formats.
3261
3262 2001-10-02  Joseph S. Myers  <jsm28@cam.ac.uk>
3263
3264         * decl.c (init_decl_processing): Don't call
3265         init_function_format_info.  Initialize lang_attribute_table
3266         earlier.
3267         (builtin_function): Call decl_attributes.
3268         (insert_default_attributes): New.
3269
3270 2001-10-01  Jason Merrill  <jason_merrill@redhat.com>
3271
3272         * decl.c (grokdeclarator): Copy array typedef handling from C
3273         frontend.
3274
3275         * decl.c (grokdeclarator): Copy too-large array handling from C
3276         frontend.
3277
3278 2001-09-29  Alexandre Oliva  <aoliva@redhat.com>
3279
3280         * config-lang.in (target_libs): Added target-gperf, so that we
3281         don't try to build it if C++ is disabled.
3282
3283 2001-09-23  Zack Weinberg  <zack@codesourcery.com>
3284
3285         * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
3286         (cp/errfn.o): Delete rule.
3287         (cp/error.o): Depend on flags.h.
3288         * errfn.c: Delete file.
3289         * cp-tree.h: Declare warn_deprecated.  Remove definitions of
3290         TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
3291         and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
3292         cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
3293         internal_error respectively.  Make cp_deprecated into a macro.
3294         Don't define cp_printer typedef or declare cp_printers.
3295         * error.c: Include flags.h.
3296         Delete: struct tree_formatting_info, print_function_argument_list,
3297         print_declaration, print_expression, print_function_declaration,
3298         print_function_parameter, print_type_id, print_cv_qualifier_seq,
3299         print_type_specifier_seq, print_simple_type_specifier,
3300         print_elaborated_type_specifier, print_rest_of_abstract_declarator,
3301         print_parameter_declaration_clause, print_exception_specification,
3302         print_nested_name_specifier, and definition of cp_printers.
3303         (locate_error): New function.
3304         (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
3305         rewritten in terms of locate_error and diagnostic.c.
3306         (cp_tree_printer): Rename cp_printer; wire up to *_to_string
3307         instead of deleted print_* routines.  Handle %C, %L, %O, %Q also.
3308         (init_error): Adjust to match.
3309
3310 Sat Sep 22 09:15:31 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3311
3312         * Make-lang.in (CXX_C_OBJS): Add attribs.o.
3313
3314 2001-09-21  Richard Henderson  <rth@redhat.com>
3315
3316         * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
3317         (build_vtbl_initializer): Likewise.
3318         (build_vfn_ref): New.
3319         * cp-tree.h: Declare it.
3320         * call.c (build_over_call): Use it.
3321         * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
3322         * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
3323
3324 Fri Sep 21 08:16:19 2001  J"orn Rennecke <amylaar@redhat.com>
3325
3326         * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
3327
3328 2001-09-21  Joseph S. Myers  <jsm28@cam.ac.uk>
3329
3330         Table-driven attributes.
3331         * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
3332         * decl2.c (cplus_decl_attributes): Only take one attributes
3333         parameter.
3334         * cp-tree.c (cplus_decl_attributes): Update prototype.
3335         * class.c (finish_struct), decl.c (start_decl, start_function),
3336         decl2.c (grokfield), friend.c (do_friend), parse.y
3337         (parse_bitfield): Update calls to cplus_decl_attributes.
3338         * decl.c (grokdeclarator): Take a pointer to a single ordinary
3339         attribute list.
3340         * decl.h (grokdeclarator): Update prototype.
3341         * decl2.c (grokfield): Take a single ordinary attribute list.
3342         * friend.c (do_friend): Likewise.
3343         * decl.c (shadow_tag, groktypename, start_decl,
3344         start_handler_parms, grokdeclarator, grokparms, start_function,
3345         start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
3346         parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
3347         (process_template_parm, do_decl_instantiation): Pass single
3348         ordinary attribute lists around.
3349         * decl.c (grokdeclarator): Correct handling of nested attributes.
3350         Revert the patch
3351         1998-10-18  Jason Merrill  <jason@yorick.cygnus.com>
3352                 * decl.c (grokdeclarator): Embedded attrs bind to the right,
3353                 not the left.
3354         .
3355         * cp-tree.h (cp_valid_lang_attribute): Remove declaration
3356         (cp_attribute_table): Declare.
3357         * decl.c (valid_lang_attribute): Don't define.
3358         (lang_attribute_table): Define.
3359         (init_decl_processing): Initialize lang_attribute_table instead of
3360         valid_lang_attribute.
3361         * tree.c (cp_valid_lang_attribute): Remove.
3362         (handle_java_interface_attribute, handle_com_interface_attribute,
3363         handle_init_priority_attribute): New functions.
3364         (cp_attribute_table): New array.
3365         * decl2.c (import_export_class): Don't use
3366         targetm.valid_type_attribute.
3367
3368 2001-09-15  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3369
3370         * Make-lang.in (cp/error.o): Depend on real.h
3371         * error.c: #include "real.h"
3372
3373 2001-09-15  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3374
3375         * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
3376         xmalloc/strcpy/strcat.
3377
3378 2001-09-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3379
3380         * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
3381         Const-ification.
3382         * pt.c (tsubst_decl): Likewise.
3383
3384 2001-09-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3385
3386         * decl2.c (lang_f_options): Const-ification.
3387         * lex.c (cplus_tree_code_name): Likewise.
3388         * spew.c (yyerror): Likewise.
3389
3390 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
3391
3392         PR c++/3986
3393         * class.c (force_canonical_binfo_r): Check & move an indirect
3394         primary base first.
3395         (force_canonical_binfo): Check that it's not already
3396         canonical.
3397         (mark_primary_virtual_base): Remove BINFO parameter.
3398         (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
3399
3400 2001-09-06  Nathan Sidwell  <nathan@codesourcery.com>
3401
3402         Remove TYPE_NONCOPIED_PARTS.
3403         * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
3404         CLASSTYPE_PURE_VIRTUALS.
3405         (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
3406         * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
3407         (layout_class_type): Don't call fixup_inline_methods here ...
3408         (finish_struct_1): ... call it here.
3409
3410 2001-09-04  Mark Mitchell  <mark@codesourcery.com>
3411
3412         * decl.c (duplicate_decls): Remove code deadling with
3413         DECL_SAVED_INSNS.
3414         * decl2.c (finish_file): Likewise.
3415         * pt.c (instantiate_decl): Likewise.
3416         * semantics.c (expand_body): Don't defer local functions if
3417         they wouldn't be deferred for some other reason.  Don't
3418         generate RTL for functions that will not be emitted.
3419         (genrtl_start_function): Remove code deadling with
3420         DECL_SAVED_INSNS.
3421         (genrtl_finish_function): Likewise.
3422
3423 2001-09-04  Nathan Sidwell  <nathan@codesourcery.com>
3424
3425         PR c++/4203
3426         * call.c (build_over_call): Do not optimize any empty base
3427         construction.
3428
3429 2001-08-31  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3430
3431         * error.c (dump_template_decl): Output template parameters
3432         together with their specifiers.
3433         Output `class' prefix for template template parameter.
3434         (dump_decl): Fix formatting.
3435
3436 2001-08-30  Kurt Garloff  <garloff@suse.de>
3437
3438         * optimize.c (inlinable_function_p): Allow only smaller single
3439         functions. Halve inline limit after reaching recursive limit.
3440
3441 2001-08-30  Joern Rennecke <amylaar@redhat.com>
3442             Jason Merrill  <jason_merrill@redhat.com>
3443
3444         * class.c (build_vtable_entry_ref): Subtract in char*, not
3445         ptrdiff_t.
3446
3447 2001-08-23  Jason Merrill  <jason_merrill@redhat.com>
3448
3449         * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
3450         (build_cplus_array_type): Use cp_build_qualified_type, not
3451         TYPE_MAIN_VARIANT, to get an unqualified version.
3452
3453         * decl2.c (grok_alignof): Lose.
3454         (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
3455         * typeck.c (c_alignof): Lose.
3456         * semantics.c (finish_sizeof, finish_alignof): New.
3457         * parse.y: Use them.
3458         * cp-tree.h: Declare them.
3459
3460 2001-08-22  Jason Merrill  <jason_merrill@redhat.com>
3461
3462         * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
3463         Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
3464         * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
3465
3466 2001-08-19  Jakub Jelinek  <jakub@redhat.com>
3467
3468         * typeck2.c (add_exception_specifier): Only require complete type if
3469         not in processing template declaration.
3470
3471 2001-08-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3472
3473         * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
3474         GNU_xref_start_scope and GNU_xref_end_scope.
3475
3476         * tree.c (TYPE_HASH): Moved to ../tree.h.
3477
3478 2001-08-16  Mark Mitchell  <mark@codesourcery.com>
3479
3480         * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
3481         on COMPOUND_EXPRs.
3482
3483 2001-08-14  Richard Henderson  <rth@redhat.com>
3484
3485         * class.c, cp-tree.h (build_vfn_ref): Remove.
3486         * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
3487
3488 2001-08-13  Mark Mitchell  <mark@codesourcery.com>
3489
3490         * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
3491         empty class assignment as having side-effects to avoid
3492         spurious warnings.
3493
3494 2001-08-13  Zack Weinberg  <zackw@panix.com>
3495
3496         * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
3497         * except.c: Include libfuncs.h.
3498
3499 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3500
3501         * decl.c (grokdeclarator): Clarify diagnostic message.
3502
3503 2001-08-13  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3504
3505         * decl2.c (do_nonmember_using_decl): Replace using directive
3506         with using declaration in the error message.
3507
3508 2001-08-11  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3509
3510         * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
3511         criterion to avoid rebuilding expression tree instead of
3512         processing_template_decl.
3513
3514 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
3515
3516         Support named return value optimization for inlines, too.
3517         * decl.c (finish_function): Nullify returns here.
3518         * semantics.c (genrtl_start_function): Not here.
3519         (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
3520         (nullify_returns_r): No longer static.  Just clear RETURN_EXPR.
3521         Also nullify the CLEANUP_STMT for the nrv.
3522         * cp-tree.h: Declare it.
3523         * optimize.c (declare_return_variable): Replace the nrv with the
3524         return variable.
3525         * typeck.c (check_return_expr): Be more flexible on alignment check.
3526         Ignore cv-quals when checking for a matching type.
3527
3528 2001-08-09  Richard Henderson  <rth@redhat.com>
3529
3530         * decl2.c (finish_objects): Use target hooks instead of
3531         assemble_constructor and assemble_destructor.
3532
3533 2001-08-08  John David Anglin  <dave@hiauly1.hia.nrc.ca>
3534
3535         * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
3536
3537 2001-08-07  Nathan Sidwell  <nathan@codesourcery.com>
3538
3539         PR c++/3820
3540         Stop using TYPE_NONCOPIED_PARTS.
3541         * call.c (build_over_call): Be careful when copy constructing
3542         or assigning to an empty class.
3543         * class.c (check_bases_and_members): It has a
3544         COMPLEX_ASSIGN_REF if it has a vptr.
3545         (layout_class_type): Don't add empty class padding to
3546         TYPE_NONCOPIED_PARTS.
3547         (finish_struct_1): Don't add the VFIELD either.
3548         * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
3549         initialization.
3550
3551 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
3552
3553         * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
3554
3555 2001-08-06  Richard Henderson  <rth@redhat.com>
3556
3557         * decl2.c (finish_objects): Pass a symbol_ref and priority to
3558         assemble_{constructor,destructor}.  Remove priority handling.
3559
3560 2001-08-05  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
3561
3562         Don't allow template-id in using-declaration.
3563         * decl2.c (validate_nonmember_using_decl): Handle template-ids.
3564         (do_class_using_decl): Likewise.
3565
3566 2001-08-04  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
3567
3568         * cp/spew.c (read_token): No need to pop buffers.
3569
3570 2001-08-02  Stan Shebs  <shebs@apple.com>
3571
3572         * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
3573         (fnaddr_from_vtable_entry): Remove decl.
3574         * method.c (use_thunk): Update comment.
3575
3576 2001-08-01  Andrew Cagney  <ac131313@redhat.com>
3577
3578         * repo.c (get_base_filename): Change return value to const char
3579         pointer.
3580
3581 2001-08-02  Nathan Sidwell  <nathan@codesourcery.com>
3582
3583         Kill -fhonor-std.
3584         * NEWS: Document.
3585         * cp-tree.h (flag_honor_std): Remove.
3586         (CPTI_FAKE_STD): Remove.
3587         (std_node): Remove comment about it being NULL.
3588         (fake_std_node): Remove.
3589         * decl.c (in_fake_std): Remove.
3590         (walk_namespaces_r): Remove fake_std_node check.
3591         (push_namespace): Remove in_fake_std code.
3592         (pop_namespace): Likewise.
3593         (lookup_name_real): Remove fake_std_node check.
3594         (init_decl_processing): Always create std_node. Always add
3595         std:: things there.
3596         (builtin_function): Always put non '_' fns in std.
3597         * decl2.c (flag_honor_std): Remove.
3598         (lang_f_options): Remove honor-std.
3599         (unsupported_options): Add honor-std.
3600         (set_decl_namespace): Remove fake_std_node check.
3601         (validate_nonmember_using_decl): Likewise.
3602         (do_using_directive): Likewise.
3603         (handle_class_head): Likewise.
3604         * dump.c (cp_dump_tree): Likewise.
3605         * except.c (init_exception_processing): Adjust.
3606         * init.c (build_member_call): Remove fake_std_node check.
3607         (build_offset_ref): Likewise.
3608         * lang-options.h: Remove -fhonor-std, -fno-honor-std.
3609         * rtti.c (init_rtti_processing): Adjust.
3610
3611 2001-07-31  Alexandre Petit-Bianco  <apbianco@redhat.com>
3612
3613         * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
3614         operand while calling cp_tree_equal.
3615
3616 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
3617
3618         The 3.0 ABI no longer has vbase pointer fields.
3619         * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
3620         FORMAT_VBASE_NAME): Remove.
3621         * method.c (do_build_copy_constructor): Adjust.
3622         (do_build_assign_ref): Adjust.
3623         * search.c (lookup_field_r): Adjust.
3624         * typeck.c (build_component_ref): Adjust.
3625
3626         The 3.0 ABI always has a vtable pointer at the start of every
3627         polymorphic class.
3628         * rtti.c (build_headof_sub): Remove.
3629         (build_headof): Adjust.
3630         (get_tinfo_decl_dynamic): No need to check flag_rtti
3631         here. Adjust.
3632         (create_real_tinfo_var): Explain why we need a hidden name.
3633
3634 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
3635
3636         PR c++/3631
3637         * class.c (update_vtable_entry_for_fn): The fixed adjustment
3638         of a virtual thunk should be from declaring base.
3639
3640 2001-07-31  Nathan Sidwell  <nathan@codesourcery.com>
3641
3642         * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
3643         the shared virtual base, so preserving inheritance graph order.
3644
3645 2001-07-30  Andreas Jaeger  <aj@suse.de>
3646
3647         * decl2.c: Remove unused var global_temp_name_counter.
3648
3649 2001-07-28  Richard Henderson  <rth@redhat.com>
3650
3651         * method.c (pending_inlines): Remove.
3652
3653 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
3654
3655         * class.c (mark_primary_virtual_base): Don't adjust base
3656         offsets here.
3657         (dfs_unshared_virtual_bases): Adjust them here.
3658         (mark_primary_bases): Explain why we adjust at the end.
3659
3660 2001-07-27  Nathan Sidwell  <nathan@codesourcery.com>
3661
3662         * class.c (finish_struct_1): When copying the primary base's
3663         VFIELD, make sure we find it is at offset zero.
3664
3665 2001-07-26  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3666
3667         * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
3668         tsubst_expr for default template arguments.
3669
3670 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
3671
3672         PR c++/3621
3673         * spew.c (yylex): Only copy the token's lineno, if it is
3674         non-zero.
3675
3676 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
3677
3678         PR c++/3624
3679         * call.c (resolve_args): Simplify, call
3680         convert_from_reference.
3681         (build_new_op): Resolve and convert from reference ARG1
3682         earlier. Adjust ARG2 & ARG3 resolve and conversion.
3683
3684 2001-07-26  Nathan Sidwell  <nathan@codesourcery.com>
3685
3686         * decl.c (last_function_parm_tags): Remove.
3687         (current_function_parm_tags): Remove.
3688         (init_decl_processing): Adjust.
3689         (start_function): Adjust.
3690         (store_parm_decls): Adjust.
3691
3692         PR c++/3152
3693         * decl.c (grokdeclarator): Detect when a function typedef is
3694         declaring a function, and create last_function_parms correctly.
3695
3696 2001-07-25  Jason Merrill  <jason_merrill@redhat.com>
3697
3698         * call.c (joust): Only prefer a non-builtin candidate to a builtin
3699         one if they have the same signature.
3700
3701         * cvt.c (build_up_reference): Take DECL parm.  Check TREE_STATIC on
3702         it rather than toplevel_bindings_p.  Give it a mangled name if static.
3703         (convert_to_reference): Adjust.
3704         * decl2.c (get_temp_name): Lose.
3705         * mangle.c (mangle_ref_init_variable): New fn.
3706         (mangle_guard_variable): Strip the ref-init header.
3707         * cp-tree.h: Adjust.
3708         * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
3709         initializer.
3710         (grok_reference_init): Always use DECL_INITIAL.
3711
3712 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3713
3714         PR c++/3416
3715         * call.c (build_conditional_expr): Recheck args after
3716         conversions.
3717         * cp-tree.h (build_conditional_expr): Move to correct file.
3718         * typeck.c (decay_conversion): Diagnose any unknown types
3719         reaching here.
3720         (build_binary_op): Don't do initial decay or default
3721         conversions on overloaded functions.
3722         (build_static_cast): Don't do a decay conversion here.
3723
3724 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3725
3726         PR c++/3543
3727         * typeck.c (condition_conversion): Resolve an OFFSET_REF.
3728         * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
3729
3730 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3731
3732         * class.c (build_vtbl_or_vbase_field): Remove, move into ...
3733         (create_vtbl_ptr): ... here.
3734
3735 2001-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3736
3737         * class.c (build_vbase_offset_vbtl_entries): Look for
3738         non-primary base of which we are a sub vtable.
3739
3740 2001-07-24  Phil Edwards  <pme@sources.redhat.com>
3741
3742         * semantics.c (finish_this_expr):  Remove unused code.
3743
3744 2001-07-24  Nathan Sidwell  <nathan@codesourcery.com>
3745
3746         Simplify rtti, now we've only one ABI.
3747         * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
3748         CPTI_TINFO_VAR_ID.
3749         (tinfo_decl_id, tinfo_var_id): Remove.
3750         (get_typeid_1): Remove.
3751         * rtti.c
3752         (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
3753         (typeid_ok_p): New function.
3754         (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
3755         (get_tinfo_decl): Remove old abi documentation.
3756         (tinfo_from_decl): Remove.
3757         (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
3758         (get_typeid_1): Remove.
3759         (get_base_offset): Remove.
3760         (synthesize_tinfo_var): Absorb get_base_offset.
3761         (create_real_tinfo_var): Don't use tinfo_decl_id.
3762
3763 2001-07-23  Graham Stott  <grahams@redhat.com>
3764
3765         * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
3766         variable has_two_argument_delete_p.
3767
3768 2001-07-21  Nathan Sidwell  <nathan@codesourcery.com>
3769
3770         Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
3771         * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
3772         (CPTI_INDEX_IDENTIFIER): Remove.
3773         (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
3774         (delta2_identifier): Remove.
3775         (index_identifier): Remove.
3776         (pfn_or_delta2_identifier): Remove.
3777         (flag_vtable_thunks): Remove.
3778         (VTABLE_DELTA2_NAME): Remove.
3779         (VTABLE_INDEX_NAME): Remove.
3780         (FNADDR_FROM_VTABLE_ENTRY): Adjust.
3781         (vfunc_ptr_type_node): Adjust.
3782         (VTABLE_NAME_PREFIX): Adjust.
3783         (build_vfn_ref): Lose first parameter.
3784         (fixup_all_virtual_upcast_offsets): Remove.
3785         * decl.c (initialize_predefined_identifiers): Remove
3786         delta2_identifier, index_identifier, pfn_or_delta2_identifier.
3787         (init_decl_processing): Remove no-vtable-thunk code.
3788         * decl2.c (flag_vtable_thunks): Remove.
3789         (mark_vtable_entries): Remove no-vtable-thunk code.
3790         * error.c (dump_decl): Remove no-vtable-thunk code.
3791         (dump_expr): Adjust ptr to member function code.
3792         * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
3793         code.
3794         * rtti.c (build_headof): Remove no-vtable-thunk code.
3795         (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
3796         * search.c (get_base_distance): Remove expand_upcast_fixups case.
3797         (virtual_context) Remove.
3798         (expand_upcast_fixups): Remove.
3799         (fixup_virtual_upcast_offsets): Remove.
3800         (fixup_all_virtual_upcast_offsets): Remove.
3801         * typeck.c (get_member_function_from_ptrfunc): Remove
3802         no-vtable-thunk code.
3803         * call.c (build_over_call): Adjust call to build_vfn_ref.
3804         * class.c (build_vfn_ref): Lose first parameter. Remove
3805         no-vtable-thunk code.
3806         (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
3807         (build_vtable_entry): Remove no-vtable-thunk code.
3808
3809 2001-07-20  Nathan Sidwell  <nathan@codesourcery.com>
3810
3811         Remove old-abi remnants. Remove comments about old abi
3812         behaviour. Remove references to 'new-abi' in comments.
3813         * cp-tree.h: Adjust comments.
3814         (vbase_offsets_in_vtable_p): Delete.
3815         (vcall_offsets_in_vtable_p): Delete.
3816         (vptrs_present_everywhere_p): Delete.
3817         (all_overridden_vfuns_in_vtables_p): Delete.
3818         (merge_primary_and_secondary_vtables_p): Delete.
3819         (TYPE_CONTAINS_VPTR_P): Adjust.
3820         (VTT_NAME_PREFIX): Remove.
3821         (CTOR_VTBL_NAME_PREFIX): Remove.
3822         (init_vbase_pointers): Remove.
3823         * class.c: Adjust coments.
3824         (build_vbase_pointer_fields): Delete.
3825         (build_vbase_pointer): Remove old-abi code.
3826         (build_secondary_vtable): Likewise.
3827         (modify_all_vtables): Likewise.
3828         (create_vtable_ptr): Likewise.
3829         (layout_class_type): Likewise.
3830         (finish_struct_1): Likewise.
3831         (finish_vtbls): Likewise.
3832         (dfs_finish_vtbls): Delete.
3833         (build_vbase_offset_vtbl_entries): Remove old-abi code.
3834         * cvt.c: Adjust comments.
3835         * decl.c: Adjust comments.
3836         * decl2.c: Adjust comments.
3837         * init.c: Adjust comments.
3838         (construct_virtual_bases): Remove old-abi code.
3839         * lang-specs.h: Remove -fno-new-abi.
3840         * mangle.c: Adjust comments.
3841         * rtti.c: Adjust comments.
3842         (get_base_offset): Remove old-abi-code.
3843         * search.c: Adjust comments.
3844         (dfs_init_vbase_pointers): Remove.
3845         (dfs_vtable_path_unmark): Remove.
3846         (init_vbase_pointers): Remove.
3847         * semantics.c: Adjust comments.
3848         (emit_associated_thunks): Remove old-abi code.
3849         * typeck.c: Adjust comments.
3850
3851 2001-07-20  Daniel Berlin  <dan@cgsoftware.com>
3852
3853         * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
3854         params.h.
3855
3856 2001-07-19  Mark Mitchell  <mark@codesourcery.com>
3857
3858         * class.c (finish_struct_anon): Forbid nested classes.
3859
3860 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3861
3862         * decl2.c: Don't include dwarfout.h and dwarf2out.h.
3863         * optimize.c: Include debug.h.
3864         (maybe_clone_body): Use debug hook.
3865         * semantics.c: Include debug.h.
3866         (expand_body): Use debug hook.
3867
3868 2001-07-19  Neil Booth  <neil@daikokuya.demon.co.uk>
3869
3870         * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
3871
3872 2001-07-18  Mark Mitchell  <mark@codesourcery.com>
3873
3874         * class.c (type_requires_array_cookie): New function.
3875         (check_methods): Don't try to figure out whether the type needs a
3876         cookie here.
3877         (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
3878         * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
3879         (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
3880         * pt.c (instantiate_class_template): Don't set
3881         TYPE_VEC_DELETE_TAKES_SIZE.
3882         * NEWS: Document ABI changes from GCC 3.0.
3883
3884 2001-07-18  Xavier Delacour <xavier@fmaudio.net>,
3885             Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
3886
3887         * NEWS (Changes in GCC 3.0): Fix typo.
3888
3889 2001-07-13  Joseph S. Myers  <jsm28@cam.ac.uk>
3890
3891         * decl2.c (cplus_decl_attributes): Take a pointer to the node to
3892         which attributes are to be attached, and a flags argument.  Update
3893         call to decl_attributes.
3894         (grokfield): Update call to decl_attributes.
3895         * class.c (finish_struct): Update call to cplus_decl_attributes.
3896         * cp-tree.h (cplus_decl_attributes): Update prototype.
3897         * decl.c (start_decl, grokdeclarator, start_function): Update
3898         calls to decl_attributes and cplus_decl_attributes.
3899         * friend.c (do_friend): Update call to cplus_decl_attributes.
3900         * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
3901
3902 2001-07-12  Mark Mitchell  <mark@codesourcery.com>
3903
3904         * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
3905         for `register' variables with an asm-specification.
3906
3907 2001-07-11  Mark Mitchell  <mark@codesourcery.com>
3908
3909         * semantics.c (finish_asm_stmt): Mark the output operands
3910         to an asm addressable, if necessary.
3911
3912 2001-07-11  Ben Elliston  <bje@redhat.com>
3913
3914         * Revert this change -- there is a subtle bug.
3915
3916         PR c++/80
3917         * decl.c (finish_enum): New "attributes" argument; pass it to
3918         cplus_decl_attributes.  Use a narrower type if the enum is packed.
3919         * cp-tree.h (finish_enum): Adjust prototype.
3920         * parse.y (enum_head): New non-terminal.
3921         (structsp): Use it. Enums now may be preceded or followed by
3922         optional attributes -- pass their chained tree to finish_enum().
3923         * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
3924
3925 2001-07-10  Mark Mitchell  <mark@codesourcery.com>
3926
3927         * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
3928         variables.
3929
3930 2001-07-10  Jason Merrill  <jason_merrill@redhat.com>
3931
3932         * semantics.c (cp_expand_stmt): Fix for null
3933         current_function_return_value.
3934
3935 2001-07-10  Jan van Male  <jan.vanmale@fenk.wau.nl>
3936
3937         * call.c (build_op_delete_call): Initialize fn.
3938         (convert_like_real): Delete conditional.
3939         (joust): Initialize *w and *l.
3940         * class.c: Add prototype for binfo_ctor_vtable.
3941         (get_primary_binfo): Initialize result.
3942         * init.c (build_java_class_ref): Initialize name.
3943
3944 2001-07-09  Erik Rozendaal  <dlr@acm.org>
3945
3946         * typeck.c (unary_complex_lvalue): Do not duplicate the
3947         argument to modify, pre-, or post-increment when used as an
3948         lvalue and when the argument has side-effects.
3949
3950 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
3951
3952         * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
3953         (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES.  Call
3954         cplus_decl_attributes even if attrs is NULL.
3955         * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
3956
3957 2001-07-08  Joseph S. Myers  <jsm28@cam.ac.uk>
3958
3959         * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
3960         calls to decl_attributes.
3961
3962 2001-07-06  Ira Ruben   <ira@apple.com>
3963
3964         * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
3965         be DECL_TEMPLATE_RESULT.
3966
3967 2001-07-05  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
3968
3969         * cp-tree.h (copy_template_template_parm): Rename to ...
3970         (bind_template_template_parm): ... here.
3971         * tree.c (copy_template_template_parm): Rename to ...
3972         (bind_template_template_parm): ... here.  Remove the case when
3973         NEWARGS is NULL_TREE.
3974         (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
3975         BOUND_TEMPLATE_TEMPLATE_PARM.
3976         * pt.c (lookup_template_class): Adjust.
3977
3978 2001-07-05  Jason Merrill  <jason_merrill@redhat.com>
3979
3980         * cvt.c (convert_lvalue): New fn.
3981         * cp-tree.h: Declare it.
3982         * method.c (do_build_assign_ref): Use it.
3983         (do_build_copy_constructor): Convert parm to base types
3984         before calling base constructors.
3985
3986         * typeck.c (check_return_expr): Check DECL_ALIGN instead of
3987         DECL_USER_ALIGN.  Check flag_elide_constructors instead of
3988         optimize.
3989         * semantics.c (cp_expand_stmt): Don't destroy the named return value.
3990
3991 2001-07-02  Nathan Sidwell  <nathan@codesourcery.com>
3992
3993         * optimize.c (optimize_inline_calls): New function, broken out
3994         of ...
3995         (optimize_function): ... here. Call it. Don't inline if it is
3996         a thunk.
3997         (dump_function): Print name of dump flag causing this dump.
3998         * semantics.c (expand_body): Move thunk inline check to
3999         optimize_function.
4000
4001 2001-06-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4002
4003         * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
4004         (comptypes): Use target.comp_type_attributes.
4005
4006 2001-06-29  Nathan Sidwell  <nathan@codesourcery.com>
4007
4008         * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
4009
4010 2001-06-28  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
4011
4012         * error.c (lang_print_error_function): Add a `diagnostic_context *'
4013         parameter. Tweak.
4014
4015 2001-06-27  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
4016
4017         * decl2.c (import_export_class): Update.
4018
4019 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
4020
4021         * error.c (init_error): Adjust settings.
4022
4023 2001-06-26  Gabriel Dos Reis  <gdr@codesourcery.com>
4024
4025         * error.c (init_error): Adjust settings.
4026
4027 2001-06-19  Richard Sandiford  <rsandifo@redhat.com>
4028
4029         * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
4030         return pointers to data members by reference rather than by value.
4031
4032 2001-06-18  Jason Merrill  <jason_merrill@redhat.com>
4033
4034         Implement the Named Return Value optimization.
4035         * cp-tree.h (struct cp_language_function): Add x_return_value.
4036         (current_function_return_value): Now a macro.
4037         * decl.c: Don't define it.
4038         (define_label, finish_case_label): Don't clear it.
4039         (init_decl_processing): Don't register it with GC.
4040         * semantics.c (genrtl_finish_function): Don't check it for
4041         no_return_label.  Copy the RTL from the return value to
4042         current_function_return_value and walk, calling...
4043         (nullify_returns_r): ...this new fn.
4044         * typeck.c (check_return_expr): Set current_function_return_value.
4045
4046 2001-06-15  Jason Merrill  <jason_merrill@redhat.com>
4047
4048         * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
4049         sharing a ctor vtable with.  Merge code for cases 1 and 2.
4050         (binfo_ctor_vtable): New fn.
4051         (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
4052
4053 2001-06-14  Jason Merrill  <jason_merrill@redhat.com>
4054
4055         * class.c (dfs_find_final_overrider): Fix logic.
4056
4057         * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
4058         virtual thunk instead of non-virtual.
4059         (get_matching_virtual): Uncomment.
4060
4061         * pt.c (unify): Don't recurse between the POINTER_TYPE and the
4062         OFFSET_TYPE.  If we're adding cv-quals, the extra ones would be on
4063         PARM, not ARG.
4064
4065 2001-06-14  Nathan Sidwell  <nathan@codesourcery.com>
4066
4067         * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
4068         we've not emerged from the hierarchy of RTTI_BINFO on reaching
4069         a non-virtual base.
4070
4071 2001-06-13  Mark Mitchell  <mark@codesourcery.com>
4072
4073         * NEWS: Update release number.
4074
4075 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
4076
4077         PR c++/3130, c++/3131, c++/3132
4078         * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
4079         * class.c (force_canonical_binfo_r): Move
4080         BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
4081         virtual bases unless they're primary and what they're primary
4082         too has been moved.
4083         (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
4084         with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
4085         BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
4086         derived binfo.
4087         (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
4088         (layout_nonempty_base_or_field): Add most derived type
4089         parameter. Adjust.
4090         (layout_empty_base): Likewise.
4091         (build_base_field): Likewise.
4092         (build_base_fields): Likewise.
4093         (propagate_binfo_offsets): Add most derived type
4094         parameter. Skip non canonical virtual bases too.
4095         (dfs_set_offset_for_unshared_vbases): Don't skip primary
4096         bases. Do skip canonical bases.
4097         (layout_virtual_bases): Adjust.
4098         (layout_class_type): Adjust.
4099         (dfs_get_primary_binfo): Build list of virtual primary base
4100         candidates.
4101         (get_primary_binfo): Check that the shared virtual primary
4102         base candidate was found first.
4103         (accumulate_vtbl_inits): Don't do anything for non-vptr
4104         containing binfos. For case 1 primary virtual bases, keep
4105         checking that we've not emerged from the hierarchy of RTTI_BINFO.
4106
4107 2001-06-12  Nathan Sidwell  <nathan@codesourcery.com>
4108
4109         PR c++/3089
4110         * class.c (dfs_accumulate_vtbl_inits): Always walk down the
4111         hierarchy looking for primary bases for a ctor
4112         vtable. Recursively call oneself, if we meet our primary via
4113         this route and haven't met it yet via inheritance graph order.
4114
4115 2001-06-11  Mark Mitchell  <mark@codesourcery.com>
4116
4117         * lang-options.h: Emit documentation for -fno-honor-std, not
4118         -fhonor-std.
4119
4120 2001-06-10  Alexandre Oliva  <aoliva@redhat.com>
4121
4122         * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
4123         Don't clobber delta.
4124         (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
4125
4126 2001-06-10  Mark Mitchell <mark@codesourcery.com>
4127             Gabriel Dos Reis  <gdr@codesourcery.com>
4128
4129         * Make-lang.in (cp/call.o): Depend on diagnostic.h
4130         (cp/typeck.o): Depend on diagnostic.h
4131         (cp/typeck2.o): Depend on diagnostic.h
4132         (cp/repo.o): Depend on dignostic.h
4133         * typeck.c: #include diagnostic.h
4134         (convert_for_initialization): Remove extern declaration for
4135         warningcount and errorcount.
4136
4137         * call.c: #include diagnostic.h
4138         (convert_like_real): Remove extern declaration for warnincount and
4139         errorcount.
4140
4141         * repo.c: #include diagnostic.h
4142         * typeck2.c: #include diagnostic.h
4143
4144 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
4145
4146         * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
4147         in previous change.
4148
4149 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
4150
4151         PR c++/2929
4152         * friend.c (do_friend): Use push_decl_namespace for classes at
4153         namespace scope.
4154
4155 2001-06-08  Nathan Sidwell  <nathan@codesourcery.com>
4156             Jason Merrill <jason_merrill@redhat.com>
4157
4158         PR c++/3061
4159         * class.c (build_secondary_vtable): Use assert, rather than an error
4160         message.
4161         (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
4162         (dfs_accumulate_vtbl_inits): A lost primary virtual base may
4163         be between ORIG_BINFO and RTTI_BINFO, but neither of them.
4164         Don't set BINFO_VTABLE for a primary virtual base.
4165
4166 2001-06-07  Mark Mitchell  <mark@codesourcery.com>
4167
4168         * decl.c (duplicate_decls): Update source position information
4169         when a template function is defined.
4170
4171 2001-06-07  Phil Edwards  <pme@sources.redhat.com>
4172
4173         * lang-specs.h:  Move -D_GNU_SOURCE to config/linux.h.
4174
4175 2001-06-07  Nathan Sidwell  <nathan@codesourcery.com>
4176
4177         PR c++/2914
4178         * decl.c (pushtag): Don't push into a complete type's scope.
4179
4180 2001-06-06  Jason Merrill  <jason_merrill@redhat.com>
4181
4182         * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
4183         (struct lang_decl_flags): Lose generate_with_vtable_p.
4184         (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
4185         * class.c (copy_virtuals): Adjust.
4186         * decl2.c (mark_vtable_entries): Adjust.
4187         * method.c (make_thunk, build_vtable_entry): Adjust.
4188         * class.c (update_vtable_entry_for_fn): Only look as far as the
4189         first defining class.
4190         (build_vtbl_initializer): Put nothing in the slot for a function only
4191         defined in a lost primary virtual base.
4192         (add_vcall_offset_vtbl_entries_1): Use the same code for
4193         the lost primary case and the normal case.
4194         (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
4195         (get_vfield_offset, get_derived_offset): Lose.
4196         (dfs_find_final_overrider): Use look_for_overrides_here.
4197         (get_matching_virtual): New fn.
4198         * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
4199         not BV_VCALL_INDEX.
4200         * search.c (look_for_overrides_here): Split out from...
4201         (look_for_overrides_r): Here.
4202
4203         * class.c (find_final_overrider): Return error_mark_node on error.
4204
4205         * decl2.c (key_method): #if 0 accidental change.
4206
4207 2001-06-06  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4208
4209         * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
4210         (build_over_call): Likewise.
4211         * decl.c (grokparms): Likewise.
4212         * pt.c (tsubst_decl): Likewise.
4213         * typeck.c (convert_arguments): Likewise.
4214
4215 2001-06-05  Mark Mitchell  <mark@codesourcery.com>
4216
4217         * semantics.c (begin_class_definition): Robustify.
4218
4219         * pt.c (instantiate_decl): Tell the repository code about the
4220         clones, not the cloned functions.
4221         * repo.c (repo_template_used): Explicitly instantiate the cloned
4222         function, not the clones.
4223
4224 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
4225
4226         * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
4227         ICS_BAD_FLAG on created conversion.
4228         (compare_ics): Break out rank.
4229
4230 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
4231
4232         * decl.c (xref_tag): Remove extraneous %s on dependent name
4233         lookup warning.
4234
4235 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
4236
4237         * class.c (layout_vtable_decl): Fix off by one error on
4238         build_index_type.
4239         (build_vtt): Likewise.
4240         (build_ctor_vtbl_group): Likewise.
4241
4242 2001-06-05  Nathan Sidwell  <nathan@codesourcery.com>
4243
4244         * class.c (maybe_indent_hierarchy): New function.
4245         (dump_class_hierarchy_r): Add flags. Dump extra binfo
4246         information, if enabled. Use maybe_indent_hierarchy. Adjust
4247         output format.
4248         (dump_class_hierarchy): Adjust prototype. Adjust output format.
4249         (dump_array, dump_vtable, dump_vtt): New functions.
4250         (finish_struct_1): Adjust hierarchy dumping.
4251         (initialize_vtable): Call dump_vtable.
4252         (build_vtt): Call dump_vtt.
4253         (build_ctor_vtbl_group): Call dump_vtable.
4254         * decl2.c (flag_dump_class_layout): Remove.
4255         (cxx_decode_option): Remove dump translation unit
4256         and dump class hierarchy check. Call dump_switch_p.
4257         (finish_file): Adjust dumping.
4258         (dump.c): Only dump base classes if not TDF_SLIM.
4259         Only dump namespace members if not TDF_SLIM.
4260         * optimize.c (dump_function): New function.
4261         (optimize_function): Call dump_function.
4262         * semantics.c (expand_body): Use dump_enabled_p.
4263
4264 2001-06-01  Nathan Sidwell  <nathan@codesourcery.com>
4265
4266         PR g++/2936
4267         Part missed from first commit
4268         * decl2.c (finish_anon_union): Copy context.
4269
4270 2001-05-30  Nathan Sidwell  <nathan@codesourcery.com>
4271
4272         PR g++/2936
4273         * optimize.c (remap_decl): Remap anonymous aggregate members too.
4274
4275 2001-05-26  Nathan Sidwell  <nathan@codesourcery.com>
4276
4277         PR g++/2823
4278         * semantics.c (expand_body): Don't optimize thunks.
4279
4280 2001-05-25  Sam TH  <sam@uchicago.edu>
4281
4282         * cp-tree.h lex.h: Fix header include guards.
4283
4284 2001-05-25  Mark Mitchell <mark@codesourcery.com>
4285
4286         * decl.c (init_decl_processing): Tweak.
4287
4288 2001-05-24  Mark Mitchell  <mark@codesourcery.com>
4289
4290         * decl.c (duplicate_decls): Tidy.
4291         (init_decl_processing): Always set flag_no_builtin.
4292
4293 2001-05-24  Nathan Sidwell  <nathan@codesourcery.com>
4294
4295         PR c++/2184
4296         * decl2.c (do_local_using_decl): Push the decls, even in a
4297         template.
4298
4299 2001-05-22  Mark Mitchell  <mark@codesourcery.com>
4300
4301         * optimize.c (initialize_inlined_parameters): Don't set
4302         TREE_READONLY for a VAR_DECL taking the place of an inlined
4303         PARM_DECL.
4304
4305 2001-05-22  Jason Merrill  <jason_merrill@redhat.com>
4306
4307         * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
4308         * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
4309         attribute.
4310
4311 2001-05-22  Joseph S. Myers  <jsm28@cam.ac.uk>
4312
4313         * parse.y: Refer to compound literals as such, not as
4314         constructor-expressions.
4315
4316 2001-05-21  Mark Mitchell  <mark@codesourcery.com>
4317
4318         * call.c (build_op_delete_call): Ignore exception-specifications
4319         when looking for matching delete operators.
4320         * init.c (build_new_1): Compute whether or not the allocation
4321         function used is a placement allocation function or not, and
4322         communicate this information to build_op_delete_call.
4323
4324 2001-05-21  Jason Merrill  <jason_merrill@redhat.com>
4325
4326         * class.c (build_vtable_entry_ref): Lose vtbl parm.  Fix for new abi.
4327         (build_vtbl_ref): Adjust.
4328         (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
4329         * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
4330         Re-add vtable-gc.
4331         (unsupported_options): Correspondingly.
4332
4333         * decl2.c (maybe_make_one_only): Check flag_weak, not
4334         supports_one_only().
4335
4336         * cp-tree.def (START_CATCH_STMT): Lose.
4337         * dump.c (cp_dump_tree): Don't dump it.  Do dump HANDLER_PARMS.
4338         * tree.c (cp_statement_code_p): Don't case it.
4339         * semantics.c (cp_expand_stmt): Likewise.
4340         * cp-tree.h (START_CATCH_TYPE): Lose.
4341         (HANDLER_TYPE): New.
4342         * except.c (expand_start_catch_block): Don't start any blocks.
4343         Return the type.
4344         (expand_end_catch_block): Don't end any blocks.
4345         * parse.y (handler): Don't pass anything from finish_handler_parms
4346         to finish_handler.
4347         * pt.c (tsubst_expr): Likewise.
4348         * semantics.c (begin_handler): Call note_level_for_catch here.
4349         (finish_handler_parms): Don't return anything.
4350         (genrtl_catch_block, begin_catch_block): Lose.
4351         (genrtl_handler): Call expand_start_catch here.
4352
4353 2001-05-18  Jason Merrill  <jason_merrill@redhat.com>
4354
4355         * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
4356         (get_vtable_decl, build_vtt): Not here.
4357
4358 2001-05-20  Nathan Sidwell  <nathan@codesourcery.com>
4359
4360         PR c++/2781
4361         * optimize.c (update_cloned_parm): Copy addressability and other
4362         flags.
4363
4364 2001-05-20  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
4365
4366         * pt.c (determine_specialization): Ignore artificial functions.
4367
4368 2001-05-20  Neil Booth  <neil@daikokuya.demon.co.uk>
4369
4370         * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
4371         (C_RID_CODE): Remove.
4372         * lex.c (cxx_init_options): Call set_identifier_size.  Update.
4373         (init_parse): Don't do it here.
4374
4375 2001-05-18  Diego Novillo  <dnovillo@redhat.com>
4376
4377         * decl2.c (finish_objects): Use the original SYMBOL_REF from the
4378         function declaration to avoid stripping the symbol's attributes.
4379
4380 2001-05-18  Nathan Sidwell  <nathan@codesourcery.com>
4381
4382         * decl.c (pushdecl): Adjust error string.
4383         (xref_tag): Adjust friend class injection warning. Remove the
4384         inherited name from the class shadowed scope.
4385
4386 2001-05-17  Mark Mitchell  <mark@codesourcery.com>
4387
4388         * except.c (cp_protect_cleanup_actions): New function.
4389         (init_exception_processing): Don't set protect_cleanup_actions
4390         here.  Do set lang_protect_cleanup_actions.
4391
4392 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
4393
4394         * spew.c (read_token): Call yyerror on all unexpected tokens.
4395
4396 2001-05-16  Nathan Sidwell  <nathan@codesourcery.com>
4397
4398         * init.c (member_init_ok_or_else): Take a tree rather than
4399         string for name.
4400         (expand_member_init): Adjust.
4401
4402 2001-05-14  Nick Clifton  <nickc@cambridge.redhat.com>
4403
4404         * decl.c (duplicate_decls): Suppress warning about duplicate
4405         decls if the first decl is a friend.
4406
4407 2001-05-12  Zack Weinberg  <zackw@stanford.edu>
4408
4409         * except.c (choose_personality_routine): Export.  Add
4410         explanatory comment.  Take an enum languages, not a boolean.
4411         (initialize_handler_parm): Adjust to match.
4412         * cp-tree.h: Prototype choose_personality_routine.
4413         * lex.c (handle_pragma_java_exceptions): New function.
4414         (init_cp_pragma): Register #pragma GCC java_exceptions.
4415
4416 2001-05-12  Neil Booth  <neil@cat.daikokuya.demon.co.uk>
4417
4418         * method.c (build_mangled_C99_name): Remove unused prototype.
4419
4420 2001-05-12  Alexandre Oliva  <aoliva@redhat.com>
4421
4422         * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
4423         * typeck.c (get_member_function_from_ptrfunc,
4424         build_ptrmemfunc, expand_ptrmemfunc_cst): Take
4425         TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
4426
4427         Reverted Geoff Keating's 2001-05-03's patch.
4428
4429 2001-05-11  Ira Ruben   <ira@apple.com>
4430
4431         * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
4432
4433 2001-05-11  Neil Booth  <neil@daikokuya.demon.co.uk>
4434
4435         * cp-tree.h (finish_label_expr, lookup_label): Delete.
4436         * parse.y: Update for '&&'; don't issue warning here.
4437         * semantics.c (finish_label_expr): Delete.
4438
4439 2001-05-07  Mark Mitchell  <mark@codesourcery.com>
4440
4441         * splay-tree.h (splay_tree_max): New function.
4442         (splay_tree_min): Likewise.
4443
4444 2001-05-03  Geoffrey Keating  <geoffk@redhat.com>
4445
4446         * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
4447         (pfn_vflag_identifier): Define.
4448         Update comment about layout of pointer functions.
4449         (build_ptrmemfunc1): Update prototype.
4450         (expand_ptrmemfunc_cst): Update prototype.
4451         * decl.c (initialize_predefined_identifiers): Initialize
4452         pfn_vflag_identifier.
4453         (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
4454         an extra field to the type.
4455         * expr.c (cplus_expand_constant): Pass 'flag' between
4456         expand_ptrmemfunc_cst and build_ptrmemfunc1.
4457         * typeck.c (get_member_function_from_ptrfunc): When
4458         FUNCTION_BOUNDARY < 16, look at additional field to determine
4459         if a pointer-to-member is a real pointer or a vtable offset.
4460         (build_ptrmemfunc1): Add new parameter to contain extra field.
4461         (build_ptrmemfunc): Pass the extra field around.
4462         (expand_ptrmemfunc_cst): Add new parameter to return extra field.
4463         (pfn_from_ptrmemfunc): Ignore the extra field.
4464
4465 2001-05-03  Mark Mitchell  <mark@codesourcery.com>
4466
4467         * cp-tree.h (flag_inline_trees): Update documentation.
4468         * decl.c (init_decl_processing): Adjust handling of
4469         flag_inline_functions and flag_inline_trees to support -O3.
4470         (grokfndecl): Set DECL_INLINE on all functions if that's what
4471         the user requested.
4472         (save_function_data): Clear DECL_INLINE in
4473         current_function_cannot_inline is non-NULL.
4474         * decl2.c (flag_inline_trees): Update documentation.
4475
4476 2001-05-03  Nathan Sidwell  <nathan@codesourcery.com>
4477
4478         * dump.c (cp_dump_tree, USING_STMT case): New case.
4479         * tree.c (cp_statement_code_p): Add USING_STMT.
4480         * decl2.c (do_using_directive): Add the using directive statement.
4481
4482         * tree.c (walk_tree): Reformat an if block.
4483
4484 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
4485
4486         * decl.c (compute_array_index_type): Don't try to do anything with
4487         the indices when processing a template.
4488
4489 2001-05-02  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4490
4491         * call.c: NULL_PTR -> NULL.
4492         * class.c: Likewise.
4493         * cvt.c: Likewise.
4494         * decl.c: Likewise.
4495         * decl2.c: Likewise.
4496         * except.c: Likewise.
4497         * init.c: Likewise.
4498         * rtti.c: Likewise.
4499         * search.c: Likewise.
4500         * tree.c: Likewise.
4501         * typeck.c: Likewise.
4502         * typeck2.c: Likewise.
4503
4504 2001-05-02  Mark Mitchell  <mark@codesourcery.com>
4505
4506         * decl2.c (do_using_directive): Revert previous patch.
4507
4508 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4509
4510         * cp-tree.def (USING_STMT): New statement node.
4511         * cp-tree.h (USING_STMT_NAMESPACE): New macro.
4512         * decl2.c (do_using_directive): Add USING_STMT to statement
4513         tree. Don't emit errors when processing template decl.
4514         * pt.c (tsubst_expr, USING_STMT case): New case.
4515         * semantics.c (cp_expand_stmt, USING_STMT case): New case.
4516
4517 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4518
4519         * call.c (build_new_op): Convert args from reference here.
4520         (build_conditional_expr): Don't convert here.
4521
4522 2001-05-01  Nathan Sidwell  <nathan@codesourcery.com>
4523
4524         * spew.c (last_token_id): New static variable.
4525         (read_token): Set it here.
4526         (yyerror): Use it here.
4527
4528 2001-04-30  Richard Henderson  <rth@redhat.com>
4529
4530         * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
4531         * decl.c: Likewise.
4532
4533 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
4534
4535         * gxxint.texi: Remove.
4536         * Make-lang.in: Remove all traces of gxxint.texi.
4537
4538 Mon Apr 30 16:14:10 2001  Mark P Mitchell  <mark@codesourcery.com>
4539
4540         * decl2.c (start_static_initialization_or_destruction): Correct
4541         logic to handle the -fno-use-cxa-atexit case.
4542
4543 2001-04-30  Mark Mitchell  <mark@codesourcery.com>
4544
4545         * optimize.c (update_cloned_parm): New function.
4546         (maybe_clone_body): Use it.  Update the `this' parameter too.
4547
4548 2001-04-29  Joseph S. Myers  <jsm28@cam.ac.uk>
4549
4550         * decl2.c (unsupported_options): Add new-abi.
4551         * lang-options.h: Remove no longer supported options.
4552
4553 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
4554
4555         * except.c (can_convert_eh): Don't check template parms,
4556         typename types etc.
4557
4558 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
4559
4560         * optimize.c (maybe_clone_body): Copy parameter names and locations.
4561
4562 2001-04-27  Nathan Sidwell  <nathan@codesourcery.com>
4563
4564         * cp-tree.h (adjust_clone_args): Prototype new function.
4565         * class.c (adjust_clone_args): New function.
4566         * decl.c (start_function): Call it for in charge ctors.
4567
4568 2001-04-26  Mark Mitchell  <mark@codesourcery.com>
4569
4570         * method.c (use_thunk): Make sure that thunks really are emitted
4571         when requested.
4572
4573 2001-04-26  Nathan Sidwell <nathan@codesourcery.com>
4574
4575         * mangle.c (write_chars): New macro.
4576         (hwint_to_ascii): New function
4577         (write_number): Use it.
4578         (write_integer_cst): Deal with really big numbers.
4579
4580 2001-04-25  Mark Mitchell  <mark@codesourcery.com>
4581
4582         * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
4583         the clone.
4584
4585 2001-04-25  Nathan Sidwell  <nathan@codesourcery.com>
4586
4587         * decl.c (grokdeclarator): Set context of namespace scope
4588         TYPE_DECLS.
4589
4590 2001-04-24  Zack Weinberg  <zackw@stanford.edu>
4591
4592         * cp/optimize.c: Include hashtab.h.
4593         (struct inline_data): Add tree_pruner.
4594         (expand_call_inline, expand_calls_inline): Use it when calling
4595         walk_tree.
4596         (optimize_function): Initialize and free tree_pruner.
4597
4598 2001-04-24  Nathan Sidwell <nathan@codesourcery.com>
4599
4600         Lazy __FUNCTION__ generation.
4601         * cp-tree.def (FUNCTION_NAME): Remove.
4602         * cp-tree.h (function_name_declared_p): Remove.
4603         (cp_fname_init): Prototype.
4604         * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
4605         don't call declare_function_name. Call start_fname_decls.
4606         (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
4607         clobber the line number.
4608         (cp_fname_init): New function.
4609         (start_function): Call start_fname_decls.
4610         (finish_function): Call finish_fname_decls.
4611         * lex.c (reswords): Add slots for __FUNCTION__ et al.
4612         (rid_to_yy): Add mappings for __FUNCTION__ et al.
4613         * optimize.c (maybe_clone_body): Remove function_name_declared_p.
4614         * parse.y (VAR_FUNC_NAME): New token.
4615         (primary): Add VAR_FUNC_NAME.
4616         * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
4617         generation.
4618         (tsubst, FUNCTION_NAME case): Remove.
4619         (tsubst_copy, FUNCTION_NAME case): Remove.
4620         (tsubst_expr, DECL_STMT case): Be careful with a
4621         DECL_PRETTY_FUNCTION_P.
4622         (instantiate_decl): Remove function_name_declared_p.
4623         * semantics.c (begin_compound_statement): Don't call
4624         declare_function_name here.
4625         (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
4626         (finish_translation_unit): Call finish_fname_decls.
4627         (expand_body): Remove function_name_declared_p.
4628         * typeck2.c (digest_init): Allow any ERROR_MARK.
4629
4630 2001-04-24  Nathan Sidwell  <nathan@codesourcery.com>
4631
4632         * pt.c (tsubst_decl): Use VOID_TYPE_P.
4633         * semantics.c: Fix some typos.
4634
4635 2001-04-23  Phil Edwards  <pme@sources.redhat.com>
4636
4637         * cp/decl2.c (flag_honor_std):  Always initialize to 1.
4638
4639 2001-04-22  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4640
4641         * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
4642
4643 2001-04-23  Jason Merrill  <jason_merrill@redhat.com>
4644
4645         * except.c (build_throw): Wrap the initialization of the exception
4646         object in a MUST_NOT_THROW_EXPR.
4647         (do_free_exception): #if 0.
4648
4649 2001-04-20  Mark Mitchell  <mark@codesourcery.com>
4650
4651         * cp-tree.h (finish_enum): Change prototype.
4652         * decl.c (finish_enum): Reorganize.
4653         * parse.y (structsp): Adjust calls to finish_enum.
4654
4655 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4656
4657         * tree.c (cp_tree_equal): Adjust final switch formatting. Add
4658         't' case.
4659
4660 2001-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4661
4662         * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
4663         (layout_empty_base): Return at end flag.
4664         (build_base_field): Likewise.
4665         (build_base_fields): Likewise.
4666         (layout_virtual_bases): Don't add 1 to eoc value.
4667         (end_of_class): Use full size for empty bases.
4668         (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
4669         empty bases. Don't add 1 to eoc value. Only add trailing padding
4670         if we're an empty class with no empty bases.
4671         (dump_class_hierarchy): Dump size and alignment.
4672
4673 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
4674
4675         * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
4676         ICS_BAD_FLAG.
4677
4678 2001-04-20  Jakub Jelinek  <jakub@redhat.com>
4679
4680         * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
4681         is found, look first if name does not match the structure name.
4682
4683 2001-04-19  Mark Mitchell  <mark@codesourcery.com>
4684
4685         * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
4686         set.
4687         (SET_DECL_LANGUAGE): New macro.
4688         * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
4689         (pushdecl): Likewise.
4690         (build_library_fn_1): Likewise.
4691         (build_cp_library_fn): Likewise.
4692         (grokfndecl): Likewise.
4693         (grokvardecl): Mark `extern "C"' variables as having C linkage.
4694         * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
4695         * lex.c (retrofit_lang_decl): Likewise.
4696         * mangle.c (mangle_decl_string): Don't mangle the names of
4697         variables declared with C language linkage.
4698         * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
4699
4700 2001-04-18  John David Anglin  <dave@hiauly1.hia.nrc.ca>
4701
4702         * semantics.c (simplify_aggr_init_exprs_r): Don't restore
4703         flag_access_control from uninitialized storage.
4704
4705 2001-04-15  Mark Mitchell  <mark@codesourcery.com>
4706
4707         * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
4708         * mangle.c (write_pointer_to_member_type): Fix mangling of
4709         pointers to cv-qualified member function types.
4710
4711         * init.c (build_delete): Create a SAVE_EXPR for the address if
4712         we're going to use it more than once.
4713
4714 2001-04-13  Mark Mitchell  <mark@codesourcery.com>
4715
4716         * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
4717         (expand_ptremfunc_cst): Change prototype.
4718         (delta2_from_ptrmemfunc): Remove.
4719         * expr.c (cplus_expand_constant): Adjust call to
4720         expand_ptrmemfunc_cst.
4721         * typeck.c (build_ptrmemfunc1): Simplify.
4722         (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
4723         results in a constant.
4724         (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
4725         (delta2_from_ptrmemfunc): Remove.
4726         (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
4727
4728 2001-04-12  Jason Merrill  <jason_merrill@redhat.com>
4729
4730         * cp-tree.h (decl_namespace_list): New macro.
4731         (struct saved_scope): Add decl_ns_list.
4732         * decl.c (mark_saved_scope): Mark it.
4733         * decl2.c: Lose static decl_namespace_list.
4734         (init_decl2): Don't save it.
4735
4736 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4737
4738         * cp-tree.h (warn_return_type, yylex): Delete redundant
4739         declarations.
4740
4741         * decl.c (current_class_depth, global_namespace): Likewise.
4742
4743         * decl2.c (current_class_depth, flag_gnu_xref): Likewise
4744
4745         * repo.c (flag_use_repository): Likewise.
4746
4747 2001-04-12  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4748
4749         * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
4750         set_block, pushdecl, getdecls, gettags, init_decl_processing,
4751         maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
4752         lvalue_or_else, print_lang_statistics, comp_target_types,
4753         unsigned_type, signed_type, signed_or_unsigned_type,
4754         build_function_call, mark_addressable, incomplete_type_error):
4755         Delete redundant declarations.
4756
4757 2001-04-11  Jason Merrill  <jason_merrill@redhat.com>
4758
4759         * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
4760         (TYPE_ANONYMOUS_P): New macro.
4761         (TAGGED_TYPE_P): New macro.
4762         * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
4763         (grokfndecl, grokvardecl, grokdeclarator): Likewise.
4764         * tree.c (no_linkage_helper): Likewise.
4765         * semantics.c (begin_class_definition): Likewise.
4766         * pt.c (convert_template_argument): Likewise.
4767         * lex.c (check_for_missing_semicolon): Likewise.
4768
4769 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
4770
4771         * class.c (dfs_unshared_virtual_bases): New function.
4772         (mark_primary_bases): Call it.
4773         (check_bases): Ignore virtual bases when determining
4774         nearly-emptiness.
4775
4776 2001-04-12  Nathan Sidwell  <nathan@codesourcery.com>
4777
4778         * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
4779
4780 2001-04-11  Mark Mitchell  <mark@codesourcery.com>
4781
4782         * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
4783         cloned function to the clone.
4784
4785 2001-04-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4786
4787         * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
4788
4789         * semantics.c: Include expr.h.
4790
4791 2001-04-11  Nathan Sidwell  <nathan@codesourcery.com>
4792
4793         * method.c (implicitly_declare_fn): Commonize code for copy ctor
4794         and assignment op. Set TREE_USED for parameter.
4795
4796 2001-04-10  Mark Mitchell  <mark@codesourcery.com>
4797
4798         * class.c (find_final_overrider_data): Add `candidates'.
4799         (dfs_find_final_overrider): Don't issue error messages
4800         prematurely.
4801         (find_final_overrider): Issue error messages here.
4802         (build_base_field): Don't warn about amgibuous direct bases here.
4803         (warn_about_ambiguous_direct_bases): New function.
4804         (layout_class_type): Use it.
4805
4806 2001-04-10  Richard Henderson  <rth@redhat.com>
4807
4808         * typeck.c (build_array_ref): Push the array reference inside
4809         COMPOUND_EXPR and COND_EXPR.
4810
4811 2001-04-05  Mark Mitchell  <mark@codesourcery.com>
4812
4813         * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
4814         * decl.c (duplicate_decls): Adjust accordingly.
4815         (maybe_commonize_var): Likewise.
4816         (grokfndecl): Likewise.
4817         (start_function): Likewise.
4818         (start_method): Likewise.
4819         * decl2.c (key_method): Likewise.
4820         (import_export_decl): Likewise.
4821         * method.c (implicitly_declare_fn): Likewise.
4822         * optimize.c (maybe_clone_body): Likewise.
4823
4824 2001-04-05  Benjamin Kosnik  <bkoz@redhat.com>
4825
4826         * lang-specs.h: Add __DEPRECATED.
4827
4828 Thu Apr  5 16:54:29 2001  J"orn Rennecke <amylaar@redhat.com>
4829
4830         * search.c (get_dynamic_cast_base_type): When building a new
4831         constant, set its type to ssizetype.
4832
4833 2001-04-04  Jakub Jelinek  <jakub@redhat.com>
4834
4835         * optimize.c (expand_call_inline): Only add newly inlined statements
4836         into inlined_stmts.
4837
4838 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
4839
4840         * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
4841         (OPERATOR_FORMAT): Likewise.
4842         (OPERATOR_TYPENAME_FORMAT): Likewise.
4843         * operators.def: Remove old name-mangling information.
4844         * decl.c (grok_op_properties): Adjust accordingly.
4845         * lex.c (init_operators): Likewise.
4846         * rtti.c (get_tinfo_decl): Issue error messages about types that
4847         have variable size.
4848
4849 2001-04-03  Mark Mitchell  <mark@codesourcery.com>
4850
4851         * decl2.c (import_export_decl): Don't call import_export_class
4852         when processing an inline member function.
4853         * semantics.c (expand_body): Call import_export_decl before
4854         emitting inline functions.
4855
4856 2001-03-28  Richard Henderson  <rth@redhat.com>
4857
4858         IA-64 ABI Exception Handling:
4859         * cp-tree.def (EH_SPEC_BLOCK): New.
4860         (MUST_NOT_THROW_EXPR): New.
4861         * cp-tree.h: Update changed function declarations.
4862         (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
4863         (CPTI_CALL_UNEXPECTED): New.
4864         (struct cp_language_function): Rename x_eh_spec_try_block
4865         to x_eh_spec_block.
4866         (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
4867         * decl.c (current_binding_level): If no current function
4868         bindings, revert to scope_chain.
4869         (initialize_predefined_identifiers): Remove __cp_push_exception.
4870         (store_parm_decls): Use begin_eh_spec_block.
4871         (finish_function): Use finish_eh_spec_block.
4872         (mark_lang_function): Update for name changes.
4873         * decl2.c (finish_file): No mark_all_runtime_matches.
4874         * dump.c (cp_dump_tree): Handle new tree codes.
4875         * error.c (dump_expr) [BIND_EXPR]: Fix typo.
4876         * except.c (catch_language_init, catch_language): Remove.
4877         (init_exception_processing): Don't set language code.
4878         Initialize call_unexpected_node, protect_cleanup_actions,
4879         eh_personality_libfunc, lang_eh_runtime_type.
4880         (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
4881         (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
4882         (prepare_eh_type): Split out type canonicalizations ...
4883         (build_eh_type_type): ... from here.
4884         (build_eh_type_type_ref): Remove.
4885         (mark_all_runtime_matches): Remove.
4886         (build_exc_ptr): New.
4887         (do_begin_catch, do_end_catch): New.
4888         (do_pop_exception): Remove.
4889         (build_terminate_handler): Remove.
4890         (choose_personality_routine): Split out language choice from ...
4891         (initialize_handler_parm): ... here.
4892         Use MUST_NOT_THROW_EXPR.
4893         (expand_start_catch_block): Use do_begin_catch.  Simplify Java
4894         exception object handling.
4895         (expand_start_eh_spec, expand_end_eh_spec): Remove.
4896         (expand_exception_blocks, alloc_eh_object): Remove.
4897         (begin_eh_spec_block, finish_eh_spec_block): New.
4898         (do_allocate_exception, do_free_exception): New.
4899         (expand_throw): Merge into ...
4900         (build_throw): ... here.  Update for abi.
4901         * expr.c (cplus_expand_expr): No expand_internal_throw.
4902         Handle MUST_NOT_THROW_EXPR.
4903         * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
4904         * semantics.c (*) Update for except.h name changes.
4905         (genrtl_try_block): No protect_with_terminate.
4906         (genrtl_eh_spec_block): New.
4907         (genrtl_handler): Don't emit the goto here.
4908         (cp_expand_stmt): Handle EH_SPEC_BLOCK.
4909         (genrtl_finish_function): Don't expand_exception_blocks.
4910         * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
4911
4912 2001-03-28  Richard Henderson  <rth@redhat.com>
4913
4914         * decl.c (struct named_label_list): Rename eh_region to
4915         in_try_scope, add in_catch_scope.
4916         (struct binding_level): Rename eh_region to is_try_scope,
4917         add is_catch_scope.
4918         (note_level_for_try): Rename from note_level_for_eh.
4919         (note_level_for_catch): New.
4920         (poplevel): Copy both is_try_scope and is_catch_scope to
4921         the named_label_list struct.
4922         (check_previous_goto_1): Don't check for catch block via
4923         DECL_ARTIFICIAL; use in_try_scope instead.
4924         (check_goto): Likewise.
4925         * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
4926         * except.c (expand_start_catch_block): Call note_level_for_catch.
4927         * semantics.c (begin_compound_stmt): Update for note_level_for_try.
4928
4929 2001-03-27  Richard Henderson  <rth@redhat.com>
4930
4931         * except.c: Use USING_SJLJ_EXCEPTIONS instead of
4932         exceptions_via_longjmp.
4933
4934 2001-03-27  Phil Edwards  <pme@sources.redhat.com>
4935
4936         * pt.c (check_default_tmpl_args):  Make error messages clearer.
4937
4938 2001-03-26  Phil Edwards  <pme@sources.redhat.com>
4939
4940         * error.c:  Also undefine 'A' macro used for cp_printers definition.
4941
4942 2001-03-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4943
4944         * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
4945
4946 2001-03-26  Mike Yang <yang@research.att.com>
4947             Mark Mitchell  <mark@codesourcery.com>
4948
4949         * dump.c (dump_access): New function.
4950         (cp_dump_tree): Use it.  Dump basetype information for class
4951         types.
4952
4953 2001-03-26  Mark Mitchell  <mark@codesourcery.com>
4954
4955         * Makefile.in (optimize.o): Depend on params.h.
4956         (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
4957         (init_decl_processing): Set flag_no_inline when doing
4958         inlining-on-trees.
4959         * optimize.c: Include params.h.
4960         (struct inline_data): Improve documentation of FNS.  Add
4961         FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
4962         (INSNS_PER_STMT): New macro.
4963         (remap_block): Use CLONING_P.
4964         (inlinable_function_p): Don't inline big functions.
4965         (expand_call_inline): Keep track of how much inlining we've done.
4966         (optimize_function): Set FIRST_INLINED_FN.
4967         (maybe_clone_body): Set CLONING_P.
4968         * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
4969         tree nodes.
4970         (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
4971         rest_of_compilation.  Clear DECL_RTL for local variables
4972         afterwards.
4973         (clear_decl_rtl): New function.
4974
4975 2001-03-26  Nathan Sidwell  <nathan@codesourcery.com>
4976
4977         Implement DR 209
4978         * cp-tree.h (skip_type_access_control,
4979         reset_type_access_control): Prototype.
4980         * decl.c (grokdeclarator): Access of friends is not checked.
4981         * parse.y (component_decl_list): Reset type access control.
4982         * semantics.c (decl_type_access_control): Clear
4983         current_type_lookups.
4984         (save_type_access_control): Don't save if not deferring.
4985         (skip_type_access_control, reset_type_access_control): New
4986         functions.
4987         (begin_class_definition): Do type access control for basetypes.
4988         Start deferred access control.
4989         (finish_class_definition): Resume immediate access control if
4990         this is a local class.
4991
4992 2001-03-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4993
4994         * class.c (add_method): Use memcpy/memmove, not bcopy.
4995
4996         * decl.c (duplicate_decls): Likewise.
4997
4998 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
4999
5000         * mangle.c (write_discriminator): Use `_0' for discriminator 1,
5001         not `_'.
5002
5003 2001-03-23  Jakub Jelinek  <jakub@redhat.com>
5004
5005         * decl.c (local_names): Define.
5006         (push_local_name): New.
5007         (grok_reference_init): Return init if initializing static reference
5008         variable with non-constant instead of emitting it.
5009         Move expand_static_init call to cp_finish_decl.
5010         (layout_var_decl): Call push_local_name.
5011         (maybe_commonize_var): Allow inlining functions even if they have
5012         static local variables, use comdat_linkage for them if flag_weak.
5013         (check_initializer): Call obscure_complex_init if
5014         grok_reference_init returned non-zero.
5015         (save_function_data): Clear x_local_names.
5016         (pop_cp_function_context): Free x_local_names.
5017         (mark_inlined_fns): Remove.
5018         (mark_lang_function): Mark x_local_names.
5019         (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
5020         Mark inlined_fns as tree, remove call to mark_inlined_fns.
5021         * class.c (alter_access): Ensure DECL_ACCESS is never set if
5022         DECL_DISCRIMINATOR_P.
5023         * cp-tree.h (cp_language_function): Add x_local_names.
5024         (lang_decl_flags): Add discriminator into u2.
5025         (lang_decl_inlined_fns): Remove.
5026         (lang_decl): inlined_fns is now a TREE_VEC.
5027         (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
5028         * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
5029         TREE_VEC, not a custom structure.
5030         (optimize_function): Likewise.
5031         * mangle.c (discriminator_for_local_entity): Discriminate among
5032         VAR_DECL local entities.
5033         * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
5034         is not valid.
5035
5036 2001-03-22  Bryce McKinlay  <bryce@albatross.co.nz>
5037
5038         Add support for Java interface method calls.
5039         * cp-tree.h (struct lang_type): Add java_interface flag.
5040         (TYPE_JAVA_INTERFACE): New macro.
5041         * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
5042         by setting TYPE_JAVA_INTERFACE.
5043         * call.c (java_iface_lookup_fn): New static.
5044         (build_over_call): If calling a method declared in a
5045         TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
5046         expression which resolves the function address.
5047         (build_java_interface_fn_ref): New function.
5048
5049 2001-03-22  Richard Henderson  <rth@redhat.com>
5050
5051         * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
5052         * except.c: Don't include it.
5053
5054 2001-03-22  Gerald Pfeifer  <pfeifer@dbai.tuwien.ac.at>
5055             based on an idea from Joe Buck <jbuck@synopsys.com>
5056
5057         * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
5058         New nonterminals.
5059         (data_def, component_decl): Add reductions to bad_decl.
5060
5061 2001-03-22  Jakub Jelinek  <jakub@redhat.com>
5062
5063         * method.c (do_build_assign_ref): Don't use build_modify_expr for
5064         anonymous aggregates, since they don't have assignment operator
5065         method.
5066         * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
5067         assignment operators for anonymous structure fields.
5068
5069 2001-03-21  Jason Merrill  <jason@redhat.com>
5070
5071         * pt.c (instantiate_decl): Abort if we see a member constant
5072         instantiation that doesn't already have its initializer.
5073         Downgrade explicit instantiation without definition to pedwarn.
5074
5075         * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
5076         * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
5077         (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
5078
5079         * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
5080         (pending_vtables): Remove.
5081         * decl2.c (pending_vtables): Remove.
5082         (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
5083         CLASSTYPE_VTABLE_NEEDS_WRITING.
5084         (import_export_class): Likewise.
5085         (init_decl2): Don't mark pending_vtables.
5086         * lex.c (handle_pragma_vtable): Just sorry.
5087         * pt.c (instantiate_class_template): Don't mess with
5088         CLASSTYPE_VTABLE_NEEDS_WRITING.
5089         (mark_class_instantiated): Likewise.
5090         * ptree.c (print_lang_type): Don't print it.
5091         * semantics.c (begin_class_definition): Don't set it.
5092
5093         * pt.c (template_tail): Replace with last_pending_template.
5094         (maybe_templates, maybe_template_tail): Remove.
5095         (add_pending_template): Adjust.
5096         (instantiate_pending_templates): Adjust.
5097
5098         * cp-tree.h (struct saved_scope): Remove lang_stack field.
5099         (current_lang_stack): Remove.
5100         * decl.c (maybe_push_to_top_level): Don't initialize it.
5101         (duplicate_decls): Use current_lang_depth.
5102         (xref_basetypes): Likewise.
5103         * class.c (current_lang_depth): New fn.
5104         (push_lang_context): Use more varray functionality.
5105         (pop_lang_context): Likewise.
5106
5107         * error.c (GLOBAL_THING): Always use '__'.
5108
5109 2001-03-21  Mark Mitchell  <mark@codesourcery.com>
5110
5111         * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
5112
5113         * mangle.c (mangle_decl_string): Mangle the names of overloaded
5114         operators, even when they have `extern "C"' linkage.
5115
5116 2001-03-19  Mark Mitchell  <mark@codesourcery.com>
5117
5118         * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
5119         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
5120         where it's not necessary.
5121         (add_method): Remove optimization involving comparison of
5122         DECL_ASSEMBLER_NAME.
5123         (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
5124         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
5125         where it's not necessary.
5126         (check_methods): Likewise.
5127         (build_clone): Likewise.
5128         (built_vtt): Likewise.
5129         * cp-tree.h (DECL_NEEDED_P): Likewise.
5130         * decl.c (pushtag): Likewise.
5131         (duplicate_decls): Likewise.
5132         (pushdecl): Likewise.
5133         (builtin_function): Likewise.
5134         (build_library_fn_1): Set DECL_LANGUAGE for library functions.
5135         (build_cp_library_fn): Likewise.
5136         (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
5137         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
5138         where it's not necessary.
5139         (make_rtl_for_nonlocal_decl): Likewise.
5140         (cp_finish_decl): Likewise.
5141         (grokfndecl): Likewise.
5142         (grokvardecl): Likewise.
5143         (grokdeclarator): Likewise.
5144         (start_function): Likewise.
5145         (cp_missing_return_ok_p): Likewise.
5146         * decl2.c (grokclassfn): Likewise.
5147         (check_classfn): Likewise.
5148         (finish_static_data_member_decl): Likewise.
5149         (grokfield): Likewise.
5150         * error.c (GLOBAL_IORD_P): Remove.
5151         (dump_global_iord): Improve output.
5152         (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
5153         * except.c (nothrow_libfn_p): Summarily reject any function not in
5154         namespace-scope.
5155         * init.c (build_java_class_ref): Don't explicitly set
5156         DECL_ASSEMBLER_NAME after calling mangle_decl.
5157         * mangle.c (mangle_decl_string): Handle extern "C" functions.
5158         (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
5159         * method.c (set_mangled_name_for_decl): Don't explicitly set
5160         DECL_ASSEMBLER_NAME after calling mangle_decl.
5161         (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
5162         IDENTIFIER_GLOBAL_VALUE for the thunk.
5163         * pt.c (set_mangled_name_for_template_decl): Remove.
5164         (check_explicit_specialization): Don't use it.
5165         (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
5166         (tsubst_friend_function): Likewise.
5167         (tsubst_decl): Likewise.
5168         (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
5169         * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
5170         COPY_DECL_ASSEMBLER_NAME, etc.  Don't set DECL_ASSEMBLER_NAME
5171         where it's not necessary.
5172         (tinfo_base_init): Likewise.
5173         (create_real_tinfo_var): Likewise.
5174         * search.c (looup_field_1): Likewise.
5175         * semantics.c (finish_named_return_value): Likewise.
5176         * tree.c (init_tree): Set lang_set_decl_assembler_name.
5177
5178 2001-03-15  Gabriel Dos Reis  <gdr@codesourcery.com>
5179
5180         Correct semantics restrictions checking in throw-expression.
5181         * except.c (is_admissible_throw_operand): New function.
5182         (build_throw): Use it.
5183
5184 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
5185
5186         * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
5187         and its ilk.
5188
5189 2001-03-14  Mark Mitchell  <mark@codesourcery.com>
5190
5191         * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5192         * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
5193         * decl.c (duplicate_decls): Likewise.
5194         (builtin_function): Likewise.
5195         (build_library_fn): Likewise.
5196         (build_cp_library_fn): Likewise.
5197         (check_initializer): Likewise.
5198         (cp_finish_decl): Likewise.
5199         * decl2.c (grokfield): Likewise.
5200         (grok_function_init): Remove #if 0'd code.
5201         (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
5202         * friend.c (do_friend): Likewise.
5203         * init.c (get_temp_regvar): Likewise.
5204         * method.c (make_thunk): Likewise.
5205         * pt.c (tsubst_friend_function): Likewise.
5206         (tsubst_decl): Likewise.
5207         (regenerate_decl_from_template): Likewise.
5208         * semantics.c (genrtl_named_return_value): Likewise.
5209         (expand_body): Likewise.
5210         (genrtl_finish_function): Likewise.
5211         * tree.c (cp_tree_equal): Likewise.
5212
5213 2001-03-12  Nathan Sidwell  <nathan@codesourcery.com>
5214
5215         * call.c (convert_like_real): Add extra semantics to INNER
5216         parameter. Don't convert to temporary if a user conversion
5217         gives us an lvalue that we're about to bind to a reference.
5218         Set INNER to indicate pending reference binding on recursive
5219         calls.
5220
5221 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
5222
5223         * cp/lex.c: Delete duplicate pending_lang_change.
5224
5225 2001-03-10  Neil Booth  <neil@daikokuya.demon.co.uk>
5226
5227         * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
5228         Similarly.
5229         * cp/repo.c (get_base_filename, open_repo_file): Similarly.
5230         * cp/cp-tree.h: Remove file_name_nondirectory prototype.
5231
5232 2001-03-09  Zack Weinberg  <zackw@stanford.edu>
5233
5234         * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
5235
5236 2001-03-08  Stan Shebs  <shebs@apple.com>
5237
5238         * cp-tree.h (set_identifier_local_value): Remove unused decl.
5239
5240 2001-03-06  Zack Weinberg  <zackw@stanford.edu>
5241
5242         * spew.c: Remove references to CPP_OSTRING.
5243
5244 2001-03-06  Andrew Haley  <aph@redhat.com>
5245
5246         * typeck.c (convert_arguments): Check that we have an fndecl.
5247
5248 2001-03-05  Andrew Haley  <aph@redhat.com>
5249
5250         * typeck.c (convert_arguments): Don't do ellipsis conversion for
5251         __built_in_constant_p.
5252
5253 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
5254
5255         * typeck.c (build_static_cast): Allow enum to enum conversions
5256         as per DR 128.
5257
5258 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
5259
5260         * class.c (check_field_decls): Pointers to member do not a
5261         non-pod struct make, as per DR 148.
5262
5263 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
5264
5265         * call.c (joust): cp_pedwarn when using gnu extension concerning
5266         worst conversion sequences.
5267
5268 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5269
5270         * decl.c: Replace all uses of 'boolean' with 'bool'.
5271
5272 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
5273
5274         * lang-specs.h: Add zero initializer for cpp_spec field to
5275         all array elements that need one.  Don't put an #ifdef inside
5276         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
5277         use it.
5278
5279 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
5280
5281         Implement using decls inside template functions.
5282         * decl2.c (validate_nonmember_using_decl): Don't special case
5283         fake_std_node in the global namespace. Don't reject early when
5284         processing a template.
5285         (do_local_using_decl): Add to statement tree. Don't do further
5286         processing when building a template.
5287         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
5288
5289 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
5290
5291         * decl2.c (do_nonmember_using_decl): Don't complain if we find
5292         same function. Do complain about ambiguating extern "C"
5293         declarations.
5294
5295 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
5296
5297         Remove floating point and complex type template constant parms.
5298         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
5299         COMPLEX_TYPE extensions.
5300         (invalid_nontype_parm_type_p): Likewise.
5301
5302 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
5303
5304         * except.c (call_eh_info): Revert "match_function"'s type.
5305
5306 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
5307
5308         Fix ctor vtable vcall offsets.
5309         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
5310         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
5311         (get_matching_base): Remove.
5312         (get_original_base): New function.
5313         (build_vtbl_initializer): Initialize vid.rtti_binfo.
5314         Use a virtual thunk for a ctor vtable with an index
5315         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
5316         primary base within a constructor vtable. Only set
5317         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
5318         when primary base has been lost.
5319         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
5320
5321 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
5322
5323         * call.c (joust): Ensure more_specialized()'s argument length
5324         parameter has correct value for constructors.
5325
5326 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
5327
5328         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
5329
5330         * decl.c (mark_inlined_fns): Prototype.
5331
5332 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
5333
5334         * spew.c (yylex): Correct handling of friends.
5335
5336 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
5337
5338         * mangle.c (write_encoding): Pass write_function_type the
5339         FUNCTION_DECL for the function being encoded.
5340         (write_function_type): Pass it along to write_bare_function_type.
5341         (write_bare_function_type): Pass it along to write_method_parms.
5342         (write_method_parms): Don't mangle the compiler-generated
5343         parameters to a constructor or destructor.
5344
5345 2001-02-22  Andreas Jaeger  <aj@suse.de>
5346
5347         * optimize.c: Include toplev.h for
5348         note_deferral_of_defined_inline_function prototype.
5349
5350 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
5351
5352         * cp-tree.h (struct lang_decl_inlined_fns): New.
5353         (struct lang_decls): Add inlined_fns.
5354         (DECL_INLINED_FNS): New macro.
5355         * optimize.c (struct inline_data): Add inlined_fns.
5356         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
5357         (inlinable_function_p): Likewise, fix typo in comment,
5358         function is not inlinable if it already inlined function currently
5359         being optimized.
5360         (expand_call_inline): Add fn to inlined_fns if necessary.
5361         (optimize_function): Initialize inlined_fns.
5362         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
5363         * decl.c (mark_inlined_fns): New function.
5364         (lang_mark_tree): Call it.
5365
5366 2001-02-21  Jason Merrill  <jason@redhat.com>
5367
5368         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
5369         (DECL_UNINLINABLE): Move to middle-end.
5370
5371         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
5372         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
5373         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
5374         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
5375         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
5376
5377         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
5378         second parm of op=.
5379
5380 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
5381
5382         * decl2.c (set_decl_namespace): Allow explicit instantiations in
5383         any namespace.
5384
5385 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5386
5387         * optimize.c (expand_call_inline): Don't walk subtrees of type
5388         nodes.
5389
5390 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
5391
5392         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
5393         for a destructor.
5394
5395 2001-02-18  Jason Merrill  <jason@redhat.com>
5396
5397         Do put the VTT parameter in DECL_ARGUMENTS.
5398         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
5399         (current_vtt_parm): New macro.
5400         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
5401         (DECL_HAS_VTT_PARM_P): New macro.
5402         (DECL_VTT_PARM): Remove.
5403         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
5404         * decl.c (duplicate_decls): Only copy the operator code if
5405         appropriate.
5406         (start_function): Set current_vtt_parm.
5407         (lang_mark_tree): Don't mark vtt_parm.
5408         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
5409         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
5410         * class.c (build_clone): Maybe remove the VTT parm.
5411         * optimize.c (maybe_clone_body): Set up the VTT parm.
5412         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
5413         * call.c (build_over_call): Just allow the VTT arg.
5414         * method.c (make_thunk): Don't set DECL_VTT_PARM.
5415         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
5416         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
5417         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
5418         * error.c (dump_function_decl): Likewise.
5419         * call.c (build_user_type_conversion_1, convert_like_real): Abort
5420         if we try to call a constructor with in-charge or VTT parms.
5421         * method.c (skip_artificial_parms_for): New fn.
5422         * call.c (add_function_candidate, build_over_call): Call it.
5423         * call.c (build_new_method_call): Use current_vtt_parm.
5424         * init.c (expand_virtual_init): Likewise.
5425         * class.c (same_signature_p): No longer static.
5426         * cp-tree.h: Declare it.
5427         * search.c (look_for_overrides_r): Use it.
5428
5429 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
5430
5431         * cp-tree.h (new_abi_rtti_p): Remove.
5432         (name_mangling_version): Likewise.
5433         (flag_do_squangling): Likewise.
5434         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
5435         * decl.c (grokfndecl): Likewise.
5436         * decl2.c (name_mangling_version): Remove.
5437         (flag_do_squangling): Likewise.
5438         (lang_f_options): Remove `squangle'.
5439         (unsupported_options): Add `squangle'.
5440         (cxx_decode_option): Issue a warning about uses of
5441         -fname-mangling-version.
5442         (finish_file): Remove old ABI support.
5443         * pt.c (check_explicit_specialization): Likewise.
5444         (tsubst_decl): Likewise.
5445         * rtti.c (init_rtti_processing): Likewise.
5446         (build_headof): Likewise.
5447         (get_tinfo_decl_dynamic): Likewise.
5448         (tinfo_from_decl): Likewise.
5449         (build_dynamic_cast_1): Likewise.
5450         (synthesize_tinfo_var): Likewise.
5451         * init.c (build_new): Allow enumeration types for the array-bounds
5452         in a direct-new-declarator.
5453
5454         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
5455
5456         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
5457         TREE_PROTECTED from the template being specialized.
5458
5459 2001-02-17  Jason Merrill  <jason@redhat.com>
5460
5461         * decl2.c (build_artificial_parm): Set TREE_READONLY.
5462
5463         * decl.c (bad_specifiers): Allow throw specs on things with
5464         pointer-to-function or -member-function type.
5465         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
5466         a pmf.
5467
5468 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
5469
5470         * call.c (check_dtor_name): Handle template names correctly.
5471
5472 2001-02-16  Jason Merrill  <jason@redhat.com>
5473
5474         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
5475         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
5476         * optimize.c (maybe_clone_body): Don't substitute it.
5477         * call.c (build_new_method_call): Check in_chrg instead.
5478         * init.c (expand_virtual_init): Likewise.
5479
5480 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
5481
5482         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
5483         class-type introduces at least a type-name.
5484
5485 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
5486
5487         * call.c (convert_like_real): Create a temporary for non-lvalue.
5488
5489 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
5490
5491         * cp-tree.h: Fix typos in comments.
5492
5493 2001-02-16  Jason Merrill  <jason@redhat.com>
5494
5495         * optimize.c (remap_block): If we're compiling a clone, pass the
5496         new block to insert_block.
5497
5498 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
5499
5500         * semantics.c (finish_asm_stmt): Robustify.
5501
5502 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
5503
5504         * pt.c (push_template_decl_real): Don't remangle the name of a
5505         class template.
5506
5507 2001-02-15  Jim Meyering  <meyering@lucent.com>
5508
5509         * Make-lang.in (c++.install-common): Depend on installdirs.
5510         (c++.install-info): Likewise.
5511         (c++.install-man): Likewise.
5512
5513 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
5514
5515         * typeck2.c (build_m_component_ref): Robustify.
5516
5517 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
5518
5519         * friend.c (do_friend): Don't take the nested [template] class
5520         into account when deciding whether to warn about the friend
5521         function not referring to a template function.
5522
5523 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
5524
5525         * typeck.c (build_unary_op): Clarify error message.
5526
5527 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
5528
5529         * parse.y (component_constructor_declarator): allow optional
5530         parentheses around constructor class name.
5531
5532 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5533
5534         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
5535         section.
5536         * init.c (emit_base_init): Remove incorrect comment about
5537         virtual bases.
5538         * method.c (make_thunk): Fix comment alignment.
5539
5540 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5541
5542         Kill remnants of this is variable.
5543         * cp-tree.h (flag_this_is_variable): Remove.
5544         * decl2.c (flag_this_is_variable): Remove.
5545         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
5546         (build_vbase_path): The path is non-static, even in a cdtor.
5547         (resolves_to_fixed_type_p): Add additional return value.
5548         * search.c (init_vbase_pointers): Adjust.
5549         * tree.c (lvalue_p_1): Adjust.
5550         * typeck.c (mark_addressable): Adjust.
5551
5552 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5553
5554         * pt.c (unify): Don't check cv quals of array types.
5555
5556 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
5557
5558         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
5559         check whether we already have the type.
5560
5561 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
5562
5563         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
5564         * call.c (build_op_delete_call): Simplify to remove duplicate
5565         code.
5566         * class.c (clone_function_decl): Don't build the deleting variant
5567         of a non-virtual destructor.
5568         * decl.c (finish_destructor_body): Don't call delete if this is a
5569         non-virtual destructor.
5570         * init.c (build_delete): Explicitly call `operator delete' when
5571         deleting an object with a non-virtual destructor.
5572
5573 2001-02-13  Jason Merrill  <jason@redhat.com>
5574
5575         * lang-specs.h: Add more __EXCEPTIONS.
5576
5577 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
5578
5579         * typeck2.c (process_init_constructor): Check
5580         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
5581
5582 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
5583
5584         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
5585         Remove spurious information in comment. Allow further
5586         adjustments of REFERENCE_TYPE args.
5587
5588 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
5589
5590         * errfn.c (cp_deprecated): Tweak diagnostic text.
5591         * parse.y (new_initializer): Deprecate initializer lists
5592         extension.
5593
5594 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
5595
5596         Remove old ABI support.
5597
5598 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
5599
5600         * decl2.c (flag_vtable_thunks): Always set it to 1.
5601         (flag_new_abi): Likewise.
5602         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
5603
5604         * Makefile.in (g++spec.o): Fix typo.
5605
5606 2001-02-09  Jason Merrill  <jason@redhat.com>
5607
5608         * lang-specs.h: Restore definition of __EXCEPTIONS.
5609
5610 2001-02-08  Jason Merrill  <jason@redhat.com>
5611
5612         * search.c (shared_member_p): New function.
5613         (lookup_field_r): Use it.
5614         * cp-tree.h (SHARED_MEMBER_P): Remove.
5615
5616         * method.c (process_overload_item): Handle template-dependent array
5617         bounds.
5618         * pt.c (type_unification_real): If we end up with undeduced nontype
5619         parms, try again.
5620
5621         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
5622         types.
5623
5624         * typeck2.c (friendly_abort): Don't say anything if we have
5625         earlier errors or sorries.
5626
5627         * decl.c (check_tag_decl): Notice attempts to redefine bool and
5628         wchar_t.  Ignore if in_system_header.
5629
5630         * decl.c (maybe_push_cleanup_level): New fn...
5631         (start_decl_1): ...split out from here.
5632         * cvt.c (build_up_reference): Use it.
5633         * cp-tree.h: Declare it.
5634
5635 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
5636
5637         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
5638         spec.
5639
5640 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
5641
5642         * pt.c (lookup_template_class): Make sure it's a primary
5643         template or template_template_parm when called from the parser.
5644         (instantiate_template_class): Add assertion.
5645
5646 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
5647
5648         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
5649         from error_mark_node.
5650
5651 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
5652
5653         Fix specification and implementation bugs in V3 ABI
5654         construction vtables.
5655         * cp-tree.h (flag_dump_class_layout): New flag.
5656         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
5657         (BINFO_LOST_PRIMARY_P): New flag.
5658         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
5659         (BINFO_PRIMARY_MARKED_P): Rename to ...
5660         (BINFO_PRIMARY_P): ... here.
5661         (binfo_via_virtual): New prototype.
5662         * decl2.c (flag_dump_class_layout): New flag.
5663         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
5664         use `=' as a file name separator.
5665         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
5666         bases.
5667         (build_vtbl_address): If this is a virtual primary base, then
5668         get the vtbl of what it is ultimately primary for.
5669         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
5670         for BINFO_PRIMARY_P.
5671         (dfs_skip_nonprimary_vbases_markedp): Likewise.
5672         (get_shared_vbase_if_not_primary): Likewise.
5673         (dfs_get_pure_virtuals): Likewise.
5674         (expand_upcast_fixups): Likewise.
5675         (fixup_virtual_upcast_offsets): Likewise.
5676         (dfs_find_vbase_instance): Likewise.
5677         (find_vbase_instance): Likewise.
5678         (binfo_from_vbase): Adjust comment to reflect reality.
5679         (binfo_via_virtual): New function.
5680         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
5681         for binfo walking during VTT construction.
5682         (dfs_mark_primary_bases): Remove.
5683         (force_canonical_binfo_r): New function.
5684         (force_canonical_binfo): New function.
5685         (mark_primary_virtual_base): New function.
5686         (mark_primary_bases): Walk in inheritance graph order, use
5687         mark_primary_virtual_base.
5688         (determine_primary_base): Use some more intermediate variables.
5689         (dfs_find_final_overrider): Don't check for overriding along a
5690         virtual path.
5691         (dfs_modify_vtables): Walk into primary virtual bases too.
5692         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
5693         (build_base_fields): Likewise.
5694         (dfs_set_offset_for_unshared_vbases): Likewise.
5695         (layout_virtual_bases): Likewise.
5696         (end_of_class): Likewise.
5697         (finish_struct_1): Call dump_class_hierarchy, if requested.
5698         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
5699         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
5700         (dump_class_hierarchy): Add file parameter. Append to file, if
5701         required.
5702         (finish_vtbls): Adjust accumulate_vtbl_inits call.
5703         Use canonical base for virtual bases.
5704         (build_vtt): Add more comments. Adjust build_vtt_inits call.
5705         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
5706         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
5707         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
5708         virtual VTTs.
5709         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
5710         from DATA.  We want virtual primary bases and all bases via virtual.
5711         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
5712         virtual base when not a construction vtable.
5713         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
5714         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
5715         Use canonical bases when processing virtual bases.
5716         (accumulate_vtbl_inits): We're interested in any base via a
5717         virtual path.
5718         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
5719         within a construction vtable, determine what is being overridden.
5720         (build_vtbl_initializer): Add more comments
5721         (add_vcall_offset_vtbl_entries_1): Adjust comment.
5722         (build_rtti_vtbl_entries): Check if the base has lost its
5723         primary.
5724
5725 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
5726
5727         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
5728
5729 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5730
5731         * decl.c (pushdecl): Call abort instead of fatal.
5732         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
5733         * init.c (build_new_1): Likewise.
5734         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
5735         * decl.c (build_typename_type): hash_table_init now returns void.
5736         decl.c (init_decl_processing): Make an error non-fatal.
5737
5738 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
5739
5740         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
5741         Document.
5742         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
5743         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
5744         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
5745         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
5746         * decl.c (maybe_commonize_var): Use the new name-mangling where
5747         appropriate.
5748         * decl2.c (comdat_linkage): Enhance comments.  Make all
5749         compiler-generated things static, if COMDAT is not available.
5750         (get_tinfo_decl): Do not make typeinfo objects that belong in the
5751         library COMDAT.
5752         (tinfo_base_init): Use the correct mangled name for typeinfo
5753         strings, and push them into the global scope.
5754         (typeinfo_in_lib_p): New function.
5755         (synthesize_tinfo_var): Use it.
5756         (create_real_tinfo_var): Likewise.
5757
5758 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
5759
5760         * decl.c (push_class_binding): Use context_for_name_lookup instead
5761         of CP_DECL_CONTEXT.
5762         * search.c (context_for_name_lookup): Remove static.  Check for NULL
5763         context in the loop.
5764         * cp-tree.h (context_for_name_lookup): Add prototype.
5765
5766 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
5767
5768         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
5769         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
5770         Remove.
5771         * call.c (convert_class_to_reference, build_user_type_conversion_1,
5772         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
5773
5774 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
5775
5776         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
5777         of macros used when compiling g++spec.c.
5778         * g++spec.c (lang_specific_driver): Link with the shared
5779         libgcc by default.
5780
5781 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
5782
5783         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
5784         make_reference_declarator, make_call_declarator), method.c
5785         (implicitly_declare_fn), parse.y (namespace_using_decl,
5786         notype_unqualified_id, expr_or_declarator, new_type_id,
5787         after_type_declarator, direct_after_type_declarator,
5788         notype_declarator, complex_notype_declarator,
5789         complex_direct_notype_declarator, qualified_id,
5790         notype_qualified_id, overqualified_id, direct_new_declarator,
5791         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
5792         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
5793         instead of build_parse_node.
5794
5795 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5796
5797         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
5798         (minus_one_node): Moved to top level gcc directory.  Renamed
5799         to integer_minus_one_node.
5800
5801         * init.c (init_init_processing): Don't set minus_one_node.
5802         (build_vec_init): Use integer_minus_one_node.
5803
5804         * rtti.c (get_tinfo_decl_dynamic): Likewise.
5805
5806 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
5807
5808         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
5809         identical and they would be replaced with constant, remove
5810         MODIFY_EXPR from the tree.
5811
5812 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5813
5814         * Make-lang.in: Remove all dependencies on defaults.h.
5815         * call.c: Don't include defaults.h.
5816         * decl.c: Likewise.
5817         * decl2.c: Likewise.
5818         * except.c: Likewise.
5819         * pt.c: Likewise.
5820         * rtti.c: Likewise.
5821         * tree.c: Likewise.
5822         * typeck.c: Likewise.
5823
5824 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
5825
5826         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
5827         operators even in "C" linkage.
5828         * method.c (set_mangled_name_for_decl): Likewise.
5829         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
5830         overloaded operators in "C" linkage.
5831
5832 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
5833
5834         * pt.c (tsubst_decl): Remove IN_DECL parameter.
5835         (tsubst_arg_types): Check parameter is not void.
5836         (tsubst): Adjust tsubst_decl call.
5837
5838 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
5839
5840         * call.c (add_builtin_candidate): Quote std properly, from
5841         previous change.
5842
5843 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5844
5845         * pt.c (check_explicit_specialization): Clone constructors and
5846         destructors.
5847
5848 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
5849
5850         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
5851         indicates anything special about template depth. Make sure we
5852         only count the user visible template classes.
5853
5854 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
5855
5856         * call.c (build_conv): Typo in comment.
5857         (add_builtin_candidate): Add more explanation.
5858         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
5859         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
5860         when we have enumeral types.
5861         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
5862         candidates for relops and eqops.
5863         (joust): Simplify control flow. Allow a non-template user
5864         function to hide a builtin.
5865
5866 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
5867
5868         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
5869         (more_specialized): Add deduction parameter.
5870         * call.c (joust): Adjust more_specialized call.
5871         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
5872         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
5873         (get_bindings_order): Remove.
5874         (get_bindings_real): Add DEDUCE parameter.
5875         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
5876         REFERENCE_TYPE jig for DEDUCE_ORDER.
5877         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
5878         maybe_adjust_types_for_deduction.
5879         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
5880         directly.
5881         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
5882         (check_cv_quals_for_unify): Use new unify qualifier flags.
5883         (unify): Clear new unify qualifier flags.
5884         (get_bindings_real): Add DEDUCE parameter.
5885         (get_bindings): Adjust call to get_bindings_real.
5886         (get_bindings_overload): Likewise.
5887         (most_specialized_instantiation): Adjust call to
5888         more_specialized.
5889
5890 2001-01-19  Jason Merrill  <jason@redhat.com>
5891
5892         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
5893
5894         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
5895         -fnew-abi.
5896
5897 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
5898
5899         * decl2.c (arg_assoc_class): Fix double iteration logic.
5900
5901 2001-01-19  Jason Merrill  <jason@redhat.com>
5902
5903         * init.c (build_delete): Always call convert_force to strip cv-quals.
5904
5905         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
5906         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
5907         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
5908
5909 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5910
5911         * search.c (get_vbase_1): Count only virtual bases.
5912
5913 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5914
5915         * class.c (duplicate_tag_error): Robustify flag clearing.
5916
5917 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5918
5919         * cp-tree.h (lookup_template_class): Add complain parm.
5920         * decl.c (lookup_namespace_name): Adjust call to
5921         lookup_template_class.
5922         (make_typename_type): Likewise.
5923         * semantics.c (finish_template_type): Likewise.
5924         * pt.c (lookup_template_class): Add complain parm. Adjust.
5925         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
5926         (tsubst): Likewise.
5927
5928 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
5929
5930         * pt.c (copy_default_args_to_explicit_spec): Preserve
5931         object's CV quals. Reorganize.
5932
5933 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5934
5935         * typeck.c (build_modify_expr): Say `initialization' for
5936         INIT_EXPRs.
5937         * init.c (build_default_init): Convert to enumeral type, if
5938         needed.
5939
5940 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
5941
5942         * parse.y (nomods_initdcl0): Properly set things up for
5943         initdcl0_innards.
5944
5945 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5946
5947         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
5948         (type_unification_real): Set it.
5949         (unify): Use it.
5950
5951 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5952
5953         * decl.c (finish_destructor_body): Convert to vbase pointer here.
5954
5955 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5956
5957         * semantics.c (begin_class_definition): Check we're not inside a
5958         template parm list.
5959
5960 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
5961
5962         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
5963         BASELINK_P.
5964
5965 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
5966
5967         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
5968         * call.c (build_over_call): Add comment.
5969
5970 2001-01-16 Daniel Berlin <dberlin@redhat.com>
5971
5972         * cvt.c (ocp_convert): Handle vector type conversion
5973         * typeck2.c (digest_init): Handle vector type initializations
5974
5975 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
5976
5977         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
5978           was given.
5979
5980 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
5981
5982         * pt.c (check_nontype_parm): Rename to ...
5983         (invalid_nontype_parm_type_p): ... here.
5984         (process_template_parm): Adjust.
5985         (convert_template_argument): Adjust.
5986
5987 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
5988
5989         * pt.c (check_nontype_parm): New function.
5990         (process_template_parm): Use it.
5991         (convert_template_argument): Use it.
5992         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
5993         member.
5994
5995 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
5996
5997         * tree.c: Add defaults.h
5998         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
5999         * Make-lang.in (cp/tree.o): Add defaults.h.
6000
6001 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6002
6003         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
6004
6005 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6006
6007         * g++.1: Change to be ".so man1/gcc.1".
6008
6009 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6010
6011         * Make-lang.in (c++.info, c++.install-info): Build and install g++
6012         internals info.
6013         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
6014         ($(srcdir)/cp/g++int.info): New target.
6015         * gxxint.texi: Add info directory entry.  Use @@ in email address.
6016         * .cvsignore: Update.
6017
6018 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
6019
6020         * typeck.c (build_c_cast): Do template processing earlier.
6021         Always pedwarn on array casts.
6022
6023 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
6024
6025         * friend.c (make_friend_class): Make sure a templated class is
6026         actually a template.
6027
6028 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
6029
6030         * decl2.c (get_guard): Set linkage from guarded decl.
6031
6032 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
6033
6034         * call.c (convert_default_arg): Check for unprocessed
6035         DEFAULT_ARG.
6036         * cp-tree.h (replace_defarg): Move to spew.c.
6037         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
6038         spew.c, which is where they really are.
6039         (done_pending_defargs): Declare.
6040         (unprocessed_defarg_fn): Declare.
6041         * decl.c (replace_defarg): Move to spew.c
6042         * parse.y (structsp): Call done_pending_defargs.
6043         * spew.c (defarg_fns): Rearrange list structure.
6044         (defarg_fnsdone): New static variable.
6045         (defarg_depfns): New static variable.
6046         (init_spew): Adjust.
6047         (add_defarg_fn): Store the type in TREE_TYPE.
6048         (do_pending_defargs): Detect and deal with ordering constraints
6049         and circularity.
6050         (done_pending_defargs): New function.
6051         (unprocessed_defarg_fn): New function.
6052         (replace_defarg): Moved from decl.c. Robustify. Don't save
6053         if circularity detected.
6054
6055 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
6056
6057         * pt.c (unify): Check array has a domain, before checking
6058         whether it is variable sized.
6059
6060 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
6061
6062         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
6063         parameters with pointers to arrays of unknown bound.
6064
6065 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
6066
6067         * parse.y (template_parm_header, template_spec_header): New
6068         reductions. Split out from ...
6069         (template_header): ... here. Use them.
6070         (template_template_parm): Use template_parm_header.
6071         * semantics.c (finish_template_template_parm): Add assert.
6072
6073 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
6074
6075         * mangle.c (write_builtin_type): Fix thinko.
6076
6077         * pt.c (copy_default_args_to_explicit_spec_1): New function.
6078         (copy_default_args_to_explicit_spec): Likewise.
6079         (check_explicit_specialization): Use it.
6080
6081         * class.c (finish_struct_1):  Remove last argument in call to
6082         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
6083         * decl.c (builtin_function): Likewise.
6084         (build_cp_library_fn): Likewise.
6085         (check_initializer): Likewise.
6086         (make_rtl_for_nonlocal_decl): Likewise.
6087         (cp_finish_decl): Likewise.
6088         (start_function): Likewise.
6089         * decl2.c (finish_anon_union): Likewise.
6090         * friend.c (do_friend): Likewise.
6091         * init.c (build_java_class_ref): Likewise.
6092         * method.c (make_thunk): Likewise.
6093         * pt.c (tsubst_friend_function): Likewise.
6094         * semantics.c (expand_body): Likewise.
6095
6096 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
6097
6098         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
6099         looking at DECL_CLONED_FUNCTION for non-functions.
6100
6101 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
6102
6103         * error.c (dump_template_parameter): Use parm to determine how
6104         to print default value.
6105
6106 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
6107
6108         * class.c (duplicate_tag_error): Clear more flags.
6109
6110 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
6111
6112         * call.c (build_new_method_call): Use binfo_for_vbase.
6113
6114 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
6115
6116         * cp-tree.h (flag_cond_mismatch): Don't declare.
6117         * decl2.c (flag_cond_mismatch): Don't define.
6118         (lang_f_options): Remove cond-mismatch.
6119         (unsupported_options): Add cond-mismatch.
6120
6121 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
6122
6123         * class.c (handle_using_decl): Reject using of constructor name
6124         of sourcing class. Allow injecting of a method with same name as
6125         nested class. Fixup error messages.
6126
6127 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
6128
6129         * decl2.c (lang_decode_option): Handle -Wformat=2.
6130
6131 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
6132
6133         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
6134         initialized_in_class.
6135         (DECL_DEFINED_IN_CLASS_P): Rename to ...
6136         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
6137         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
6138         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
6139         * pt.c (check_default_tmpl_args): Adjust for
6140         DECL_INITIALIZED_IN_CLASS_P.
6141         (instantiate_class_template): Likewise.
6142         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
6143
6144         * class.c (finish_struct): Constify saved_filename.
6145
6146 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
6147
6148         * class.c (duplicate_tag_error): Adjust diagnostic.
6149         (finish_struct): Locally set location to start of struct.
6150         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
6151
6152 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
6153
6154         * decl.c (struct binding_level): Adjust class_shadowed comments
6155         to reflect reality.
6156         (push_class_level_binding): Adjust comments to reflect reality.
6157         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
6158         Don't set TREE_VALUE on the class_shadowed list.
6159
6160 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
6161
6162         * decl2.c (acceptable_java_type): Allow references too.
6163         * init.c (build_java_class_ref): When using the new ABI, search
6164         `class$' and have it mangled with `mangle_decl.'
6165         * mangle.c (write_java_integer_type_codes): New function.
6166         (write_builtin_type): Detect and mangle Java integer and real
6167         types.
6168
6169 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
6170
6171         * decl2.c (grokfield): Don't accept `asm' specifiers for
6172         non-static data members.
6173
6174 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6175
6176         * expr.c (cplus_expand_expr): Don't reset `target'.
6177
6178 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
6179
6180         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
6181
6182 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
6183
6184         * parse.y (template_datadef): Check for error_mark_node.
6185
6186 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
6187
6188         * cp-tree.def (DEFAULT_ARG): Make `x' class.
6189
6190 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
6191
6192         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
6193         (record_builtin_type): Make non-static.
6194         (flag_short_double): Don't declare.
6195         (init_decl_processing): Remove the creation of many tree nodes now
6196         in c_common_nodes_and_builtins.
6197         (build_void_list_node): New function.
6198         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
6199         * cp-tree.h (flag_short_wchar): Don't declare.
6200
6201 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
6202
6203         * call.c (build_conv): Don't use build1 for USER_CONV.
6204         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
6205
6206 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
6207
6208         * lex.c (lang_init): Call c_common_lang_init.
6209
6210 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
6211
6212         * search.c (lookup_fnfields_here): Remove.
6213         (look_for_overrides_r): Use lookup_fnfields_1.
6214         Ignore functions from using declarations.
6215
6216 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
6217
6218         Implement exceptions specifiers for implicit member functions.
6219         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
6220         * method.c (synthesize_exception_spec): New function.
6221         (locate_dtor, locate_ctor, locate_copy): New functions.
6222         (implicitly_declare_fn): Generate the exception spec too.
6223         * search.c (check_final_overrider): Check artificial functions
6224         too.
6225         * typeck2.c (merge_exception_specifiers): New function.
6226
6227 2001-01-03  Jason Merrill  <jason@redhat.com>
6228
6229         * init.c (build_default_init): New fn.
6230         (perform_member_init): Split out from here.
6231         (build_new_1): Use it.  Simplify initialization logic.
6232         (build_vec_init): Take an array, rather than a pointer and maxindex.
6233         Speed up simple initializations.  Don't clean up if we're assigning.
6234         * cp-tree.h: Adjust.
6235         * decl2.c (do_static_initialization): Remove TREE_VEC case.
6236         * parse.y (new_initializer): Return void_zero_node for ().
6237         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
6238         * typeck2.c (digest_init): Only complain about user-written
6239         CONSTRUCTORs.
6240
6241 2000-12-22  Mike Stump  <mrs@wrs.com>
6242
6243         * decl2.c: (max_tinst_depth): Increase to 50.
6244
6245 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
6246
6247         * class.c (invalidate_class_lookup_cache): Zero the
6248         previous_class_values.
6249         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
6250         TREE_INT_CST_HIGH.
6251         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
6252         * decl.c (free_bindings): New variable.
6253         (push_binding): Don't create a new binding if we have one on the
6254         free list.
6255         (pop_binding): Put old bindings on the free list.
6256         (init_decl_processing): Use size_int, not build_int_2.
6257         Register free_bindings as a GC root.
6258         (cp_make_fname_decl): Use size_int, not build_int_2.
6259         (push_inline_template_parms_recursive): Likewise.
6260         (end_template_parm_list): Likewise.
6261         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
6262         (tsubst_template_parms): Use size_int, not build_int_2.
6263         (tsubst): Likewise.
6264         * rtti.c (get_vmi_pseudo_type_info): Likewise.
6265
6266 2001-01-02  Richard Henderson  <rth@redhat.com>
6267
6268         * parse.y (asm): Set ASM_INPUT_P.
6269
6270 2001-01-02  Jason Merrill  <jason@redhat.com>
6271
6272         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
6273         for v3 ABI.
6274
6275         * typeck.c (cp_truthvalue_conversion): New fn.
6276         * cvt.c (ocp_convert): Use it.
6277
6278         * cp-tree.h: Lose c-common.c decls.
6279
6280         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
6281         * cvt.c (convert_to_void): Use type_unknown_p.
6282
6283         * typeck.c (strip_all_pointer_quals): Also strip quals from
6284         pointer-to-member types.
6285
6286         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
6287         parse.y as C.
6288
6289         * call.c (build_new_method_call): Do evaluate the object parameter
6290         when accessing a static member.
6291         * typeck.c (build_component_ref): Likewise.
6292
6293 2001-01-02  Andreas Jaeger  <aj@suse.de>
6294
6295         * decl.c (cp_missing_noreturn_ok_p): New.
6296         (init_decl_processing): Set lang_missing_noreturn_ok_p.
6297
6298 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
6299
6300         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
6301
6302 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
6303
6304         * class.c (pushclass): Remove #if 0'd code.
6305         * cp-tree.h (overload_template_name): Remove.
6306         * decl.c (store_bindings): Simplify.
6307         (pop_from_top_level): Likewise.
6308         * pt.c (overload_template_name): Remove.
6309         (instantiate_decl): Don't call push_to_top_level if it's not
6310         needed.
6311
6312 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
6313
6314         * pt.c (register_local_specialization): Don't return a value.
6315         (lookup_template_class): Use move-to-front heuristic when looking
6316         up template instantiations.
6317         (instantiate_decl): Only push_to_top_level when we're actually
6318         going to instantiate the template.
6319
6320 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
6321
6322         * search.c (binfo_for_vtable): Return least derived class, not
6323         most.  Handle secondary vtables.
6324
6325 2000-12-22  Jason Merrill  <jason@redhat.com>
6326
6327         * pt.c (more_specialized): Don't optimize len==0.
6328         (fn_type_unification): If we're adding the return type, increase len.
6329
6330         * typeck.c (build_binary_op): Fix pmf comparison logic.
6331
6332         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
6333         DECL_STATIC_FUNCTION_P.
6334
6335         * semantics.c (genrtl_finish_function): Don't try to jump to
6336         return_label unless it exists.
6337
6338         In partial ordering for a call, ignore parms for which we don't have
6339         a real argument.
6340         * call.c (joust): Pass len to more_specialized.
6341         (add_template_candidate_real): Strip 'this', pass len.
6342         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
6343         (get_bindings_order): New fn.  Pass len down.
6344         (get_bindings_real): Strip 'this', pass len.
6345         (fn_type_unification): Likewise.
6346         (type_unification_real): Succeed after checking 'len' args.
6347         (most_specialized_instantiation): Lose explicit_args parm.
6348         * class.c (resolve_address_of_overloaded_function): Strip 'this',
6349         pass len.
6350
6351 2000-12-21  Jason Merrill  <jason@redhat.com>
6352
6353         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
6354         DECL_TEMPLATE_RESULT.
6355
6356         * search.c (lookup_field_r): Call lookup_fnfields_1, not
6357         lookup_fnfields_here.
6358
6359         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
6360
6361         * call.c (build_object_call): Also allow conversions that return
6362         reference to pointer to function.
6363         (add_conv_candidate): Handle totype being ref to ptr to fn.
6364         (build_field_call): Also allow members of type reference to function.
6365         Lose support for calling pointer to METHOD_TYPE fields.
6366
6367         * error.c (dump_expr): Handle *_CAST_EXPR.
6368
6369         * typeck2.c (build_scoped_ref): Always convert to the naming class.
6370
6371         * tree.c (break_out_cleanups): Lose.
6372         * cp-tree.h: Remove prototype.
6373         * typeck.c (build_component_ref): Don't break_out_cleanups.
6374         (build_compound_expr): Likewise.
6375         * semantics.c (finish_expr_stmt): Likewise.
6376
6377 2000-12-20  Richard Henderson  <rth@redhat.com>
6378
6379         * cp-tree.h: Update declarations.
6380         * decl.c (finish_case_label): Return the new stmt node.
6381         * semantics.c (finish_goto_stmt): Likewise.
6382         (finish_expr_stmt, finish_return_stmt): Likewise.
6383         (finish_break_stmt, finish_continue_stmt): Likewise.
6384         (finish_asm_stmt): Likewise.
6385         * parse.y (already_scoped_stmt): Set STMT_LINENO.
6386         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
6387         (simple_if, simple_stmt): Return the new stmt node.
6388         (save_lineno): New.
6389
6390 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
6391
6392         * cp-tree.h: Don't declare warn_long_long.
6393
6394 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6395
6396         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
6397         IS_AGGR_TYPE.
6398
6399 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6400
6401         * pt.c (unify): Handle when both ARG and PARM are
6402         BOUND_TEMPLATE_TEMPLATE_PARM.
6403
6404 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6405
6406         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
6407         DECL_TEMPLATE_PARM_P.
6408
6409 2000-12-15  Jason Merrill  <jason@redhat.com>
6410
6411         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
6412
6413         * init.c (build_new_1): Don't strip quals from type.
6414
6415         * decl.c (pushdecl): Don't check for linkage on a non-decl.
6416
6417         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
6418
6419         * call.c (build_new_function_call): Lose space before paren in
6420         error message.
6421         (build_new_method_call): Likewise.
6422
6423         * typeck2.c (build_m_component_ref): Propagate quals from datum.
6424
6425 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6426
6427         * pt.c (check_explicit_specialization): Propagate default
6428         function arguments to explicit specializations.
6429
6430 2000-12-13  DJ Delorie  <dj@redhat.com>
6431
6432         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
6433         and <? operators.
6434
6435 2000-12-08  Jason Merrill  <jason@redhat.com>
6436
6437         * error.c (dump_function_name): Don't let the user see __comp_ctor.
6438
6439         Clean up copy-initialization in overloading code.
6440         * call.c (build_user_type_conversion_1): Die if we are asked to
6441         convert to the same or a base type.
6442         (implicit_conversion): Avoid doing so.  Lose reference binding code.
6443         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
6444         direct-initialization.  Also do direct-init part of copy-init.
6445         (build_user_type_conversion): Don't provide context to convert_like.
6446         * cvt.c (ocp_convert): build_user_type_conversion will now provide
6447         the constructor call for copy-init.
6448
6449         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
6450         instantiation of a member template.
6451         (do_decl_instantiation): Not here.
6452
6453 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
6454
6455         * class.c (check_field_decls): Don't special case anonymous
6456         fields in error messages.
6457         (note_name_declared_in_class): Use %D on diagnostic.
6458
6459         * tree.c (pod_type_p): Use strip_array_types.
6460         (cp_valid_lang_attribute): Likewise.
6461         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
6462         multiple evaluations.
6463         (cp_has_mutable_p): Use strip_array_types.
6464
6465 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
6466
6467         * cp-tree.h (sufficient_parms_p): Declare new function.
6468         * call.c (sufficient_parms_p): New function, broken out of ...
6469         (add_function_candidate): ... here. Use it.
6470         (add_conv_candidate): Use it.
6471         * decl.c (grok_ctor_properties): Use it.
6472
6473 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
6474
6475         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
6476
6477 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6478
6479         * decl2.c (lang_decode_option): Handle -Wformat-security.
6480
6481 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6482
6483         * pt.c (verify_class_unification): New function.
6484         (get_class_bindings): Use it.
6485         (try_class_unification): Tidy.
6486         (unify): Handle when argument of a template-id is not
6487         template parameter dependent.
6488         (template_args_equal): Handle when TREE_CODE's do not match.
6489
6490 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
6491
6492         * lang-specs.h (c++): When invoking the stand-alone preprocessor
6493         for -save-temps, pass all relevant -Defines to it, and then don't
6494         pass them to cc1plus.
6495
6496 2000-12-05  Will Cohen  <wcohen@redhat.com>
6497
6498         * decl.c (finish_case_label): Cleared
6499         more_cleanups_ok in surrounding function scopes.
6500         (define_label): Likewise.
6501
6502 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
6503
6504         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
6505         (get_matching_virtual): Remove.
6506         (look_for_overrides): Declare new function.
6507         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
6508         DECL_VINDEX here.
6509         * class.c (check_for_override): Move base class iteration code
6510         to look_for_overrides.
6511         * search.c (next_baselink): Remove.
6512         (get_virtuals_named_this): Remove.
6513         (get_virtual_destructor): Remove.
6514         (tree_has_any_destructors_p): Remove.
6515         (struct gvnt_info): Remove.
6516         (check_final_overrider): Remove `virtual' from error messages.
6517         (get_matching_virtuals): Remove. Move functionality to ...
6518         (look_for_overrides): ... here, and ...
6519         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
6520         to be overriding.
6521
6522 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
6523
6524         * typeck.c (get_delta_difference): If via a virtual base,
6525         return zero.
6526         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
6527         adjustment.
6528
6529 2000-12-04  Richard Henderson  <rth@redhat.com>
6530
6531         * error.c (dump_tree): Use output_add_string not OB_PUTS.
6532
6533 2000-12-04  Jason Merrill  <jason@redhat.com>
6534
6535         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
6536         (write_builtin_type): Pass intSI_type_node and the like through
6537         type_for_mode.
6538         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
6539         Pass intSI_type_node and the like through type_for_mode.
6540         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
6541         * pt.c (tsubst, unify): Likewise.
6542         * tree.c (walk_tree): Likewise.
6543         * error.c (dump_type): Likewise.
6544         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
6545
6546         * Make-lang.in: Tweak top comment for emacs.
6547         (cp/TAGS): Restore.
6548
6549         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
6550
6551         * class.c (clone_function_decl): Robustify.
6552
6553 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
6554
6555         * decl.c (store_bindings): Only search in the non modified
6556         old_bindings for duplicates.
6557
6558 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
6559
6560         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
6561         TYPE_POLYMORPHIC_P.
6562
6563         * typeck.c (build_static_cast): Remove unused variable.
6564
6565 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
6566
6567         * pt.c: Fix typo in comment.
6568
6569 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
6570
6571         * decl2.c (warn_format): Remove definition.
6572         (lang_decode_option): Handle -Wformat-nonliteral,
6573         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
6574
6575 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
6576
6577         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
6578         (init_decl_processing): Don't create string_type_node,
6579         const_string_type_node, wint_type_node, intmax_type_node,
6580         uintmax_type_node, default_function_type, ptrdiff_type_node and
6581         unsigned_ptrdiff_type_node.  Adjust position of call to
6582         c_common_nodes_and_builtins.
6583         (identifier_global_value): New function.
6584
6585 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
6586
6587         * call.c (standard_conversion): Reject pointer to member
6588         conversions from ambiguous, inaccessible or virtual bases.
6589         * typeck.c (build_static_cast): Don't check pointers to members
6590         specially.
6591
6592 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
6593
6594         * method.c (do_build_copy_constructor): Preserve cv
6595         qualifications when accessing source object members.
6596         (do_build_assign_ref): Likewise. Remove separate diagnostics for
6597         unnamed fields.
6598
6599 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
6600
6601         * method.c (do_build_assign_ref): Construct appropriately
6602         CV-qualified base reference. Don't allow const casts in base
6603         conversion.
6604
6605 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
6606
6607         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
6608         incomplete return type.
6609
6610 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6611
6612         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
6613         * semantics.c (finish_base_specifier): Accept a _TYPE not a
6614         _DECL.
6615
6616 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6617
6618         * spew.c (yyerror): Cope if yylval.ttype is NULL.
6619
6620 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6621
6622         * decl.c (grokdeclarator): Diagnose undefined template contexts.
6623
6624 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
6625
6626         * decl.c (grokdeclarator): Do type access control on friend
6627         class.
6628
6629 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
6630
6631         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
6632         bison parser ickiness.
6633         * pt.c (tsubst_friend_function): Enter namespace scope when
6634         tsubsting the function name.
6635         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
6636
6637 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
6638
6639         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
6640         * cvt.c (cp_convert_to_pointer): Add force parameter.
6641         Allow conversions via virtual base if forced.
6642         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
6643         (ocp_convert): Likewise.
6644         * search.c (binfo_from_vbase): Return the virtual base's binfo.
6645         * typeck.c (get_delta_difference): Adjust handling of virtual
6646         bases.
6647
6648 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
6649
6650         * tree.c (struct list_hash): Remove.
6651         (list_hash_table): Make it be an htab.
6652         (struct list_proxy): New type.
6653         (list_hash_eq): New function.
6654         (list_hash_pieces): Renamed from ...
6655         (list_hash): ... this.
6656         (list_hash_lookup): Remove.
6657         (list_hash_add): Remove.
6658         (hash_tree_cons): Use the generic hashtable.
6659         (mark_list_hash): Remove.
6660         (init_tree): Create the hashtable.
6661
6662 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
6663
6664         * method.c (build_mangled_C9x_name): Rename to
6665         build_mangled_C99_name.  Change C9X references in comments to
6666         refer to C99.
6667
6668 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
6669
6670         * parse.y (unary_expr): Move VA_ARG from here ...
6671         (primary): ... to here.
6672
6673 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
6674
6675         * semantics.c (finish_id_expr): If type is error_mark, return
6676         error_mark.
6677
6678 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
6679
6680         * pt.c (lookup_template_class): Simplify loop exit constructs.
6681         Cope when there is no partial instantiation of a template
6682         template member.
6683
6684 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
6685
6686         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
6687
6688 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
6689
6690         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
6691         prefix.
6692
6693         * pt.c (do_decl_instantiate): Explicitly clone constructors and
6694         destructors that haven't already been cloned.
6695
6696 2000-11-20  Richard Henderson  <rth@redhat.com>
6697
6698         * parse.y (yyparse_1): Rename the parser entry point.
6699
6700 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
6701
6702         * mangle.c (write_name): Use <unscoped-name> for names directly in
6703         function scope.
6704         (write_unscoped_name): Accept names directly in function scope.
6705
6706 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
6707
6708         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
6709         * parse.y (extdef): Add EXPORT reduction.
6710         * spew.c (yylex): Don't skip export here.
6711
6712 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
6713
6714         * decl.c (init_decl_processing): Correct name of pure virtual
6715         function under the new ABI.
6716         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
6717         (throw_bad_typeid): Likewise for bad typeid function.
6718
6719 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
6720
6721         * decl.c (grokparms): Don't even function types of `void' type,
6722         either.
6723         * mangle.c (write_type): Don't crash when confronted with the
6724         error_mark_node.
6725
6726         * decl.c (grokparms): Don't create parameters of `void' type.
6727
6728 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
6729
6730         * lex.c (mark_impl_file_chain): Delete.
6731         (init_parse): Remove call to ggc_add_string_root.  No need to
6732         ggc_strdup a string constant.  Do not add impl_file_chain to GC
6733         roots.
6734         (handle_pragma_implementation): No need to ggc_strdup main_filename.
6735
6736 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
6737
6738         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
6739
6740 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
6741
6742         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
6743         * decl.c (grokdeclarator): Don't reject void parms here.
6744         (require_complete_types_for_parms): Simplify, use
6745         complete_type_or_else.
6746         (grokparms): Remove bitrot. Remove funcdef parm.
6747         Deal with ellipsis parm lists here.
6748         * semantics.c (finish_parmlist): Don't append void_list_node
6749         here. Set PARMLIST_ELLIPSIS_P.
6750
6751 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
6752
6753         * typeck2.c (incomplete_type_error): Reorganise to avoid
6754         excessive diagnostics.
6755
6756 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
6757
6758         * lex.c (struct impl_files, internal_filename): Constify a char *.
6759
6760 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
6761
6762         * mangle.c (write_special_name_constructor): Don't generate
6763         assembler junk when confronted with an old-style constructor.
6764         (write_special_name_destructor): Likewise.
6765         (mangle_decl_string): Do it here instead.
6766
6767 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
6768
6769         * call.c (op_error): Make error messages clearer.
6770
6771 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
6772
6773         * decl.c (wrapup_globals_for_namespace): Don't mark things
6774         TREE_ASM_WRITTEN when they're not.
6775
6776 2000-11-15  Jason Merrill  <jason@redhat.com>
6777
6778         * typeck2.c (friendly_abort): Uncount the error before handing
6779         off to fancy_abort.
6780
6781 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
6782
6783         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
6784
6785 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
6786
6787         * class.c (build_vtbl_initializer): Fix typo in comment.
6788         * typeck.c (expr_sizeof): Don't crash on errors.
6789
6790 2000-11-14  Jim Wilson  <wilson@redhat.com>
6791
6792         * lang-specs.h: Add %2 after %(cc1_options).
6793
6794 2000-11-14  Richard Henderson  <rth@redhat.com>
6795
6796         * typeck.c (c_sizeof): Be strict about casting result value
6797         back to c_size_type_node.
6798         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
6799
6800 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
6801
6802         * typeck.c (build_unary_op): Use boolean_increment from
6803         c-common.c, moving the relevant code there.
6804
6805 2000-11-11  Jason Merrill  <jason@redhat.com>
6806
6807         * typeck.c (mark_addressable): Don't call put_var_into_stack.
6808
6809         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
6810         in inlines.
6811
6812 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6813
6814         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
6815         * lex.c (copy_lang_decl): Likewise.
6816
6817 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
6818
6819         * dump.c (cp_dump_tree): Don't dump function bodies here.
6820
6821         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
6822         (dump.o): Update dependency list.
6823         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
6824         (flag_dump_translation_unit): Likewise.
6825         (CP_TYPE_QUALS): Adjust definition.
6826         (DECL_C_BIT_FIELD): Remove.
6827         (SET_DECL_C_BIT_FIELD): Likewise.
6828         (CLEAR_DECL_C_BIT_FIELD): Likewise.
6829         (add_maybe_template): Likewise.
6830         (strip_array_types): Likewise.
6831         (dump_node_to_file): Likewise.
6832         (cp_dump_tree): New function.
6833         * decl.c (init_decl_processing): Set lang_dump_tree.
6834         * decl2.c (flag_dump_translation_unit): Remove.
6835         * dump.c: Move most of it to ../c-dump.c.
6836         (cp_dump_tree): New function.
6837         * pt.c (add_maybe_template): Remove.
6838         * typeck.c (strip_array_types): Likewise.
6839
6840 2000-11-07  Eric Christopher  <echristo@redhat.com>
6841
6842         * decl.c (init_decl_processing): Change definition of
6843         __wchar_t to wchar_t.  Remove artificial declaration of
6844         wchar_t.
6845         * lex.c: Change instances of __wchar_t to wchar_t.
6846
6847 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
6848
6849         * lex.c (do_identifier): Don't lookup_name for operators.
6850         * parse.y (operator): Save looking_for_typename.
6851         (unoperator): Restore it.
6852         * spew.c (frob_opname): Use nth_token for lookahead.
6853
6854 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
6855
6856         * decl.c (grok_op_properties): Always use coerce_new_type and
6857         coerce_delete_type.
6858         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
6859         exception specification. Tidy up.
6860         (coerce_delete_type): Preserve exception specification. Tidy up.
6861
6862 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
6863
6864         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
6865         (push_binding_level), error.c (cp_tree_printer), pt.c
6866         (process_partial_specialization, tsubst_template_arg_vector),
6867         search.c (lookup_member): Use memset () instead of bzero ().
6868
6869 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
6870
6871         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
6872
6873 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
6874
6875         * Make-lang.in (c++.distdir): Remove.
6876
6877 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
6878
6879         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
6880         declarations from different namespaces to be combined.
6881
6882 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
6883
6884         * decl.c: Include tm_p.h.
6885
6886 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
6887
6888         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
6889
6890 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
6891
6892         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
6893         (build_overload_value), repo.c (open_repo_file), xref.c
6894         (open_xref_file): Use strchr () and strrchr () instead of index ()
6895         and rindex ().
6896
6897 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
6898
6899         * call.c (build_over_call): Call fold on the CALL_EXPR.
6900
6901 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
6902
6903         * error.c (dump_template_decl): Separate template hearders with
6904         space not comma.
6905
6906 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
6907
6908         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
6909         TS_* flags with corresponding TFF_*.  Adjust prototypes of
6910         functions (which used to take a tree_string_flags) to take an int.
6911
6912         * cp-tree.h (enum tree_string_flags): Remove
6913         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
6914         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
6915         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
6916         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
6917         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
6918         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
6919         (type_as_string, decl_as_string, expr_as_string,
6920         context_as_string): Adjust prototype.
6921
6922         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
6923         instead of TS_PLAIN.
6924
6925         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
6926         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
6927         plain `0'.
6928
6929 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
6930
6931         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
6932         (linkage_kind): New enumeration.
6933         (decl_linkage): New function.
6934         * decl2.c (comdat_linkage): Extend comment.
6935         * error.c (dump_function_decl): Print the arguments used to
6936         instantiate a template, even when not printing the type of the
6937         function.
6938         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
6939         not TREE_PUBLIC, to test for external linkage.
6940         * tree.c (decl_linkage): New function.
6941
6942 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
6943
6944         * pt.c (instantiate_decl): Always instantiate static data members
6945         initialized in-class.
6946
6947 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
6948
6949         * Make-lang.in: Move all build rules here from Makefile.in,
6950         adapt to new context.  Wrap all rules that change the current
6951         directory in parentheses.  Expunge all references to $(P).
6952         When one command depends on another and they're run all at
6953         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
6954         all object-file generation rules.  Delete obsolete variables.
6955
6956         * Makefile.in: Delete.
6957         * config-lang.in: Delete outputs= line.
6958
6959 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
6960
6961         * error.c (dump_function_decl): Print no space between
6962         `ptr-operator' the `type-specifier' of the return type.
6963         (dump_type_prefix): Make sure we put space at the appropriate
6964         place.
6965
6966 2000-10-23  Jason Merrill  <jason@redhat.com>
6967
6968         * call.c (equal_functions): Also call decls_match for extern "C" fns.
6969
6970 2000-10-22  Jason Merrill  <jason@redhat.com>
6971
6972         * call.c (build_conditional_expr): Use ocp_convert to force
6973         rvalue conversion.
6974
6975 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
6976
6977         * call.c (standard_conversion): Use RVALUE_CONVs for all
6978         expressions that satisfy lvalue_p, not just those that satisfy
6979         real_lvalue_p.
6980
6981         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
6982
6983         * typeck.c (c_sizeof): Return an expression of `size_t' type,
6984         not one with TYPE_IS_SIZETYPE set.
6985         (dubious_conversion_warnings): Remove special-case code.
6986
6987 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
6988
6989         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
6990         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
6991         (dump_type_prefix): Print vector-of-int as 'int vector'.
6992         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
6993         * tree.c (walk_tree): Handle VECTOR_TYPE.
6994
6995         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
6996
6997 2000-10-21  Jason Merrill  <jason@redhat.com>
6998
6999         * parse.y (operator): Set got_object from got_scope.
7000         Set looking_for_typename.
7001         * decl.c (lookup_name_real): Clear val after setting from_obj.
7002         Reorganize diagnostic.
7003
7004 2000-10-20  Jason Merrill  <jason@redhat.com>
7005
7006         * tree.c (walk_tree): Don't walk into default args.
7007
7008         * error.c (dump_expr): Use host_integerp.
7009
7010 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
7011
7012         * typeck2.c (abstract_virtuals_error): Use "because" instead of
7013         "since" in error message.
7014
7015 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7016
7017         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
7018
7019 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
7020
7021         * decl.c (revert_static_member_fn): Fixed typo.
7022
7023 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
7024
7025         * class.c (subobject_offset_fn): New type.
7026         (dfs_record_base_offsets): Remove.
7027         (record_base_offsets): Likewise.
7028         (dfs_search_base_offsets): Likewise.
7029         (record_subobject_offset): New function.
7030         (check_subobject_offset): Likewise.
7031         (walk_subobject_offsets): Likewise.
7032         (record_subobject_offsets): Likewise.
7033         (layout_conflict_p): Reimplement.
7034         (layout_nonempty_base_or_field): Correct handling of type
7035         conflicts during layout.
7036         (layout_empty_base): Likewise.
7037         (build_base_field): Adjust to handle new representation of empty
7038         base offset table.
7039         (build_base_fields): Likewise.
7040         (layout_virtual_bases): Likewise.
7041         (splay_tree_compare_integer_csts): New function.
7042         (layout_class_type): Use a splay_tree, rather than a varray, to
7043         represent the offsets of empty bases.
7044
7045         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
7046         * decl.c (select_decl): Don't return declarations that are
7047         DECL_ANTICIPATED.
7048
7049 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
7050
7051         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
7052         (fake_std_node): New macro.
7053         * decl.c (in_std): Rename to ...
7054         (in_fake_std): ... this.
7055         (flag_no_builtin): Remove.
7056         (flag_no_nonansi_builtin): Likewise.
7057         (walk_namespaces_r): Use fake_std_node.
7058         (push_namespace): Use std_identifier.
7059         (pop_namespace): Use in_fake_std.
7060         (lookup_name_real): Use fake_std_node.
7061         (init_decl_processing): When -fhonor-std, create the `std'
7062         namespace.  Don't create a dummy fake_std_node in that case.
7063         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
7064         (builtin_function): Put builtins whose names don't begin
7065         with `_' in the std namespace.
7066         * decl2.c (flag_no_builtin): Remove.
7067         (flag_no_nonansi_builtin): Likewise.
7068         (set_decl_namespace): Use fake_std_node.
7069         (validate_nonmember_using_decl): Likewise.
7070         (do_using_directive): Likewise.
7071         (handle_class_head): Likewise.
7072         * dump.c (dequeue_and_dump): Likewise.
7073         * except.c (init_exception_processing): Use std_identifier.
7074         * init.c (build_member_call): Use fake_std_node.
7075         * rtti.c (init_rtti_processing): Use std_identifier.
7076
7077 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
7078
7079         * cp-tree.h (back_end_hook): Remove declaration.
7080         * decl2.c (back_end_hook): Remove definition.
7081
7082         * dump.c (dequeue_and_dump): Dump TREE_USED.
7083
7084 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
7085
7086         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
7087
7088 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
7089
7090         * decl.c (WINT_TYPE): Define.
7091         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
7092         c_size_type_node, signed_size_type_node and wint_type_node.
7093
7094 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
7095
7096         * decl2.c (warn_missing_format_attribute): New variable.
7097         (lang_decode_option): Decode -Wmissing-format-attribute.
7098
7099 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
7100
7101         * typeck.c (qualify_type): Remove.
7102         (composite_pointer_type): Fix handling of conversions to `cv void*'.
7103
7104 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7105
7106         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
7107
7108 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7109
7110         * Makefile.in (parse.c, parse.h): Create atomically.
7111
7112 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
7113
7114         * class.c (current_obstack): Remove.
7115         * decl.c (ggc_p): Remove.
7116         (start_decl): Don't use decl_tree_cons.
7117         (grokdeclarator): Don't use build_decl_list.
7118         (start_function): Don't use decl_tree_cons.
7119         (finish_function): Don't mess with obstacks.
7120         * decl2.c (grok_x_components): Don't use build_decl_list.
7121         * lex.c (make_call_declarator): Don't call decl_tree_cons.
7122         (implicitly_declare_fn): Don't call build_decl_list.
7123         * parse.y (frob_specs): Don't call build_decl_list or
7124         decl_tree_cons.
7125         (expr_or_declarator_intern): Don't call decl_tree_cons.
7126         (primary): Don't call build_decl_list.
7127         (fcast_or_absdcl): Likewise.
7128         (typed_declspecs): Don't call decl_tree_cons.
7129         (reserved_declspecs): Don't call build_decl_list.
7130         (declmods): Likewise.
7131         (reserved_typespecquals): Likewise.
7132         (aggr): Likewise.
7133         (new_type_id): Likewise.
7134         (cv_qualifiers): Likewise.
7135         (after_type_declarator_intern): Likewise.
7136         (notype_declarator_intern): Likewise.
7137         (absdcl_intern): Likewise.
7138         (named_parm): Likewise.
7139         * pt.c (most_specialized_class): Likewise.
7140         * repo.c (temporary_obstack): Make it a structure, not a pointer.
7141         (init_repo): Initialize it.
7142         * search.c (current_obstack): Remove.
7143         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
7144
7145 2000-10-09  Richard Henderson  <rth@cygnus.com>
7146
7147         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
7148         (c++ language support bits for libgcc): Remove.
7149         (c++.clean): Remove cplib2.txt cleanup.
7150         * config-lang.in (headers, lib2funcs): Remove.
7151
7152         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
7153         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
7154         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
7155         * inc/new.h, inc/typeinfo: Remove files.
7156
7157 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
7158
7159         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
7160         defined.
7161         (init_decl_processing): Initialize intmax_type_node and
7162         uintmax_type_node.
7163
7164 2000-10-06  Richard Henderson  <rth@cygnus.com>
7165
7166         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
7167         (original_result_rtx): Remove.
7168         * decl.c (save_function_data): Don't clear x_result_rtx.
7169         (mark_lang_function): Don't mark it either.
7170         * expr.c (fixup_result_decl): Remove.
7171         * semantics.c (genrtl_named_return_value): Frob the return decl
7172         before calling emit_local_var.
7173         (genrtl_finish_function): Don't call fixup_result_decl.
7174         Always emit the jump to return_label.
7175
7176 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
7177
7178         * pt.c (lookup_template_class): Set current access for enum.
7179         (tsubst_enum): Set file & line for enum decl.
7180
7181         * spew.c (yylex): Remove unused variable.
7182
7183 2000-10-05  Richard Henderson  <rth@cygnus.com>
7184
7185         * semantics.c (genrtl_finish_function): Don't init or check
7186         can_reach_end; remove noreturn and return value checks.
7187
7188 2000-10-05  Tom Tromey  <tromey@cygnus.com>
7189
7190         * init.c (build_java_class_ref): Use `build_static_name' with a
7191         suffix, not a prefix, to build the class object's name.
7192
7193 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
7194
7195         * cp-tree.h (access_kind): Fix comment typo.
7196         * decl2.c (grokfield): Fix diagnostic typo.
7197         * semantics.c (finish_template_type): Fix comment typo.
7198         (finish_qualified_object_call_expr): Likewise.
7199
7200 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
7201
7202         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
7203         tsubsting fails.
7204
7205 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
7206
7207         * spew.c (frob_id): New static function.
7208         (frob_opname): Use it.
7209         (yylex): Use it.
7210
7211 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
7212
7213         * decl.c (lang_mark_false_label_stack): Remove.
7214         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
7215
7216 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
7217
7218         * gxxint.texi: Use @email for formatting email addresses.
7219
7220 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
7221
7222         * error.c: Remove direct obstack manipulation.  Replace with
7223         output_buffer-based formatting.  Adjust calls to removed macros.
7224         (obstack_chunk_alloc, obstack_chunk_free): Remove.
7225         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
7226         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
7227
7228 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
7229
7230         * ir.texi: Move to ../c-tree.texi.
7231
7232 2000-09-20  Jason Merrill  <jason@redhat.com>
7233
7234         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
7235
7236 2000-09-21  Andreas Jaeger  <aj@suse.de>
7237
7238         * errfn.c: Move declaration of cp_printer and cp_printers to ...
7239         * cp-tree.h: ... here.
7240
7241         * error.c: Remove declaration of cp_printer.
7242
7243 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
7244
7245         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
7246
7247 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
7248
7249         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
7250         users.
7251
7252 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
7253
7254         * decl.c (start_function): Robustify.
7255
7256 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7257
7258         * cp-tree.h (check_function_format): Accept a `status' parameter.
7259
7260         * call.c, typeck.c: Updates calls to `check_function_format'.
7261
7262 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
7263
7264         * decl2.c (handle_class_head): Always push some scope even
7265         in the error case.
7266
7267 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
7268
7269         * cp-tree.h (struct cp_language_function): Remove
7270         x_scope_stmt_stack and name_declared.
7271         (current_scope_stmt_stack): Remove.
7272         (function_name_declared_p): New macro.
7273         (struct lang_decl_flags): Use c_lang_decl as a base class.
7274         (context): Remove.
7275         (struct lang_decl): Replace saved_tree with context.
7276         (DECL_FRIEND_CONTEXT): Adjust accordingly.
7277         (SET_DECL_FRIEND_CONTEXT): Likewise.
7278         (DECL_VIRTUAL_CONTEXT): Likewise.
7279         (DECL_SAVED_TREE): Remove.
7280         (C_DECLARED_LABEL_FLAG): Likewise.
7281         (cplus_expand_expr_stmt): Don't declare.
7282         (add_decl_stmt): Likewise.
7283         (add_scope_stmt): Likewise.
7284         * decl.c (mark_stmt_tree): Remove.
7285         (case_compare): Likewise.
7286         (finish_case_label): Use c_add_case_label.
7287         (init_decl_processing): Set more language-specific hooks.
7288         (build_enumerator): Fix typo in comment.
7289         (cplus_expand_expr_stmt): Remove.
7290         (mark_lang_function): Use mark_c_language_function.
7291         (lang_mark_tree): Use c_mark_lang_decl.
7292         * decl2.c: Change order of inclusion.
7293         * except.c: Likewise.
7294         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
7295         back on c_expand_expr.
7296         * friend.c: Include expr.h.
7297         * init.c: Change order of inclusion.
7298         * Makefile.in: Update dependencies.
7299         * lex.h (free_lang_decl_chain): Remove.
7300         * optimize.c (maybe_clone_body): Use function_name_declared_p.
7301         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
7302         it doesn't exist.
7303         (instantiate_decl): Use function_name_declared_p.
7304         * semantics.c (lang_expand_expr_stmt): Remove.
7305         (set_current_function_name_declared): Likewise.
7306         (current_function_name_declared): Likewise.
7307         (begin_compound_stmt): Use function_name_declared_p.
7308         (add_decl_stmt): Remove.
7309         (setup_vtbl_ptr): Use function_name_declared_p.
7310         (add_scope_stmt): Remove.
7311         (current_scope_stmt_stack): New function.
7312         (cp_expand_stmt): Don't handle SCOPE_STMTs.
7313         (expand_body): Use function_name_declared_p.
7314         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
7315         * typeck.c: Change order of includes.
7316         (convert_sequence): Remove.
7317
7318 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
7319
7320         * lex.c (reswords): Add _Complex.
7321
7322 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7323
7324         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
7325
7326 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
7327
7328         * init.c (begin_init_stmts): Don't use // comments.
7329
7330 2000-09-12  Jason Merrill  <jason@redhat.com>
7331
7332         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
7333         all non-extern arrays.
7334
7335         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
7336         typenames, too.  Downgrade complaint to pedwarn.
7337         (xref_tag): Warn about surprising behavior of 'friend struct T'.
7338         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
7339         'class This::Inherited'.
7340
7341 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
7342
7343         * decl.c (finish_case_label): Given the LABEL_DECL a
7344         DECL_CONTEXT.
7345
7346 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
7347
7348         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
7349         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
7350         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
7351         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
7352         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
7353         New macros.
7354         (sorry_for_unsupported_tree, print_scope_operator,
7355         print_left_paren, print_right_paren, print_left_bracket,
7356         print_right_bracket, print_whitespace): Likewise.
7357         (aggr_variety): Rename to class_key_or_enum.
7358         (print_type): Rename to print_type_id.
7359         (print_type_specifier_seq, print_simple_type_specifier,
7360         print_elaborated_type_specifier,
7361         print_rest_of_abstract_declarator,
7362         print_parameter_declaration_clause, print_exception_specification,
7363         print_nested_name_specifier, print_template_id,
7364         typedef_original_name,  print_template_argument_list_start,
7365         print_template_argument_list_end): New functions.
7366
7367 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
7368
7369         * ir.texi: Add more documentation.
7370
7371 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
7372
7373         * cp-tree.h (struct saved_scope): Remove x_function_parms.
7374         (current_function_parms): Don't define.
7375         (struct cp_language_function): Remove parms_stored.
7376         (current_function_just_assigned_this): Don't define.
7377         (current_function_parms_stored): Likewise.
7378         (static_ctors): Declare.
7379         (static_dtors): Likewise.
7380         (SF_EXPAND): Don't define.
7381         (expand_start_early_try_stmts): Remove declaration.
7382         (store_parm_decls): Likewise.
7383         * decl.c (static_ctors): Don't declare.
7384         (static_dtors): Likewise.
7385         (struct binding_level): Remove this_block.
7386         (poplevel): Remove dead code.
7387         (set_block): Likewise.
7388         (mark_binding_level): Don't mark this_block.
7389         (mark_saved_scope): Don't mark x_function_parms.
7390         (init_decl_processing): Don't add current_function_parms as a GC
7391         root.
7392         (check_function_type): Change prototype.
7393         (start_function): Remove RTL-generation code.
7394         (expand_start_early_try_stmts): Remove.
7395         (store_parm_decls): Give it internal linkage.  Remove
7396         RTL-generation code.
7397         (finish_function): Remove RTL-generation code.
7398         * decl2.c (static_ctors): Fix formatting.
7399         (static_dtors): Likewise.
7400         * method.c (use_thunk): Don't call store_parm_decls.
7401         (synthesize_method): Likewise.
7402         * optimize.c (maybe_clone_body): Likewise.
7403         * parse.y (fn.def2): Likewise.
7404         (.set_base_init): Likewise.
7405         (nodecls): Likewise.
7406         * pt.c (instantiate_decl): Likewise.
7407         * rtti.c (synthesize_tinfo_fn): Likewise.
7408         * semantics.c (genrtl_try_block): Simplify.
7409         (expand_body): Use genrtl_start_function and
7410         genrtl_finish_function.
7411         (genrtl_start_function): New function.
7412         (genrtl_finish_function): Likewise.
7413
7414 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
7415
7416         * error.c (cp_tree_printer, case 'P'): Append break.
7417
7418 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
7419
7420         * cp-tree.h (frob_opname): Declare.
7421         * parse.y (saved_scopes): New static variable.
7422         (cp_parse_init): Adjust.
7423         (do_id): If lastiddecl is NULL, do do_identifier.
7424         (operator): Save scope information.
7425         (unoperator): New reduction. Restore scope information.
7426         (operator_name): Append unoperator. Call frob_opname.
7427         * spew.c (frob_opname): Define.
7428
7429 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
7430
7431         * decl.c, rtti.c: Include defaults.h if not already included.
7432         Don't define the *_TYPE_SIZE macros.
7433
7434 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
7435
7436         * cp-tree.h (push_switch): Change prototype.
7437         (check_cp_case_value): Remove declaration.
7438         (decl_constant_value): Likewise.
7439         * decl.c (struct cp_switch): Add switch_stmt and cases.
7440         (case_compare): New function.
7441         (push_switch): Set switch_stmt.  Initialize cases.
7442         (pop_switch): Clean up cases.
7443         (define_case_label): Rename to ...
7444         (finish_case_label): ... this.  Do semantic analysis for case
7445         labels here.
7446         (start_function): Correct comment.
7447         * decl2.c (check_cp_case_value): Remove.
7448         * expr.c (do_case): Remove.
7449         * pt.c (tsubst_expr): Adjust call to finish_case_label.
7450         * semantics.c (genrtl_do_poplevel): Remove declaration.
7451         (RECHAIN_STMTS): Remove.
7452         (finish_break_stmt): Use build_break_stmt.
7453         (finish_continue_stmt): Use build_continue_stmt.
7454         (finish_switch_cond): Adjust condition here, rater than in
7455         c_expand_start_case.
7456         (finish_case_label): Remove.
7457         * typeck.c (c_expand_return): Remove.
7458         (c_expand_start_case): Likewise.
7459
7460 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
7461
7462         * ir.texi: Document type nodes.
7463
7464 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
7465
7466         * cp-tree.h (init_cp_semantics): Declare.
7467         (genrtl_try_block): Don't declare.
7468         (genrtl_handler): Likewise.
7469         (genrtl_catch_block): Likewise.
7470         (genrtl_ctor_stmt): Likewise.
7471         (genrtl_subobject): Likewise.
7472         (genrtl_do_poplevel): Likewise.
7473         (genrtl_named_return_value): Likewise.
7474         * lex.c (init_parse): Call init_cp_semantics.
7475         * semantics.c (genrtl_try_block): Give it internal linkage.
7476         (genrtl_handler): Likewise.
7477         (genrtl_catch_block): Likewise.
7478         (genrtl_ctor_stmt): Likewise.
7479         (genrtl_subobject): Likewise.
7480         (genrtl_do_poplevel): Likewise.
7481         (genrtl_named_return_value): Likewise.
7482         (lang_expand_stmt): Rename to ...
7483         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
7484         (init_cp_semantics): Define.
7485
7486         * decl.c (initialize_local_var): Remove RTL-generating code.
7487         * semantics.c (genrtl_try_block): Fix formatting.
7488
7489         Move statement-tree facilities from C++ to C front-end.
7490         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
7491         (void_zero_node): Remove.
7492         (stmt_tree): Likewise.
7493         (scope_chain): Adjust.
7494         (language_function): Rename to cp_language_function.
7495         (cp_function_chain): Adjust.
7496         (current_stmt_tree): Remove.
7497         (last_tree): Likewise.
7498         (last_expr_type): Likewise.
7499         (struct lang_decl): Adjust.
7500         (STMT_IS_FULL_EXPR_P): Remove.
7501         (add_tree): Remove.
7502         (begin_stmt_tree): Likewise.
7503         (finish_stmt_tree): Likewise.
7504         (walk_tree_fn): Likewise.
7505         (walk_stmt_tree): Likewise.
7506         * class.c (finish_struct): Replace use of add_tree with add_stmt.
7507         * decl.c (mark_stmt_tree): Adjust type.
7508         (init_decl_processing): Don't build void_zero_node.
7509         (initialize_local_var): Adjust usage of current_stmt_tree.
7510         (finish_enum): Use add_stmt, not add_tree.
7511         (save_function_data): Adjust use of language_function.
7512         (finish_constructor_body): Use add_stmt, not add_tree.
7513         (finish_destructor_body): Likewise.
7514         (push_cp_function_context): Adjust use of language_function.
7515         (pop_cp_function_context): Likewise.
7516         (mark_lang_function): Likewise.
7517         (mark_cp_function_context): Likewise.
7518         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
7519         (build_vec_init): Likewise.
7520         * semantics.c (SET_LAST_STMT): Remove.
7521         (RECHAIN_STMTS): Don't use it.
7522         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
7523         (current_stmt_tree): Define.
7524         (add_tree): Remove.
7525         (finish_goto_stmt): Use add_stmt, not add_tree.
7526         (finish_expr_stmt): Likewise.
7527         (begin_if_stmt): Likewise.
7528         (finish_then_clause): Likewise.
7529         (begin_while_stmt): Likewise.
7530         (begin_do_stmt): Likewise.
7531         (finish_return_stmt): Likewise.
7532         (begin_for_stmt): Likewise.
7533         (finish_break_stmt): Likewise.
7534         (finish_continue_stmt): Likewise.
7535         (begin_switch_stmt): Likewise.
7536         (finish_case_label): Likewise.
7537         (begin_try_block): Likewise.
7538         (begin_function_try_block): Likewise.
7539         (begin_handler): Likewise.
7540         (begin_catch_block): Likewise.
7541         (begin_compound_stmt): Likewise.
7542         (begin_asm_stmt): Likewise.
7543         (finish_asm_stmt): Likewise.
7544         (finish_label_stmt): Likewise.
7545         (add_decl_stmt): Likewise.
7546         (finish_subobject): Likewise.
7547         (finish_decl_cleanup): Likewise.
7548         (finish_named_return_value): Likewise.
7549         (setup_vtbl_ptr): Likewise.
7550         (add_scope_stmt): Likewise.
7551         (finish_stmt_expr): Likewise.
7552         (prune_unused_decls): Remove.
7553         (begin_stmt_tree): Likewise.
7554         (finish_stmt_tree): Likewise.
7555         (prep_stmt): Adjust use of current_stmt_tree.
7556         (lang_expand_stmt): Likewise.
7557         * tree.c (statement_code_p): Remove.
7558         (cp_statement_code_p): New function.
7559         (walk_stmt_tree): Remove.
7560         (init_tree): Set lang_statement_code_p.
7561
7562 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
7563
7564         Integrated preprocessor.
7565
7566         * Make-lang.in, Makefile.in: Remove all references to input.c,
7567         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
7568         * gxx.gperf, hash.h, input.c: Delete.
7569         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
7570         initialized properly.
7571
7572         * class.c (fixup_pending_inline): Take a tree, not a
7573         struct pending_inline *.  All callers changed.
7574         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
7575         RID_PROTECTED entries in ridpointers[] array here.
7576         * decl.c (duplicate_decls): Do not refer to struct
7577         pending_inline.
7578         (record_builtin_type, init_decl_processing): Use RID_MAX not
7579         CP_RID_MAX.
7580         (grokdeclarator): Use C_IS_RESERVED_WORD.
7581         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
7582         cpplib.
7583         (grok_x_components): Do not inspect pending_inlines chain.
7584
7585         * cp-tree.h (struct lang_identifier): Add rid_code entry.
7586         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
7587         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
7588         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
7589         TIME_IDENTIFIER_FILEINFO): Kill.
7590         Update prototypes.
7591         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
7592         single 32-bit word.
7593         * parse.y: Call do_pending_inlines unconditionally.
7594         reinit_parse_for_method is now snarf_method.  fn.defpen is no
7595         longer necessary.  Remove unnecessary <itype> annotation on
7596         SCOPE.  Do not refer to end_of_file or struct pending_inline.
7597         * semantics.c (begin_inline_definitions): Call
7598         do_pending_inlines unconditionally.
7599
7600         * lex.c: Remove all code now shared with C front end.
7601         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
7602         into the get_identifier table.  Rewrite pragma handling to
7603         work with the registry.  Move code to save tokens for later
7604         processing to spew.c.
7605
7606         * spew.c: Rewrite everything in terms of token streams instead
7607         of text.  Move routines here from lex.c / input.c as
7608         appropriate.  GC-mark trees hanging off the pending inlines
7609         chain.
7610
7611 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
7612
7613         * NEWS: Mention that the named return value extension has been
7614         deprecated.
7615         * cp-tree.h (original_result_rtx): Define.
7616         (TREE_REFERENCE_EXPR): Remove.
7617         (DECL_VPARENT): Likewise.
7618         (pushdecl_nonclass_level): Likewise.
7619         (store_return_init): Likewise.
7620         (reinit_lang_specific): Likewise.
7621         (genrtl_named_return_value): Change prototype.
7622         * decl.c (original_result_rtx): Remove.
7623         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
7624         Do not generate RTL for local variables here.
7625         (store_return_init): Remove.
7626         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
7627         store_return_init.
7628         (finish_named_return_value): Adjust accordingly.  Warn that this
7629         extension is deprecated.
7630         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
7631
7632 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7633
7634         * pt.c (type_unification_real): Replace switch with if.
7635         (unify): Tsubst non-type parms before comparing.
7636
7637 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7638
7639         * error.c (dump_typename): New function, broken out of ...
7640         (dump_type): ... here. Use it.
7641         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
7642
7643 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7644
7645         * init.c (build_offset_ref): Deal with namespace scoped
7646         TEMPLATE_ID_EXPRs.
7647
7648 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
7649
7650         * class.c (resolve_address_of_overloaded_function): Add
7651         explanation message.
7652         * decl.c (define_case_label): Reformat explanation.
7653         * decl2.c (finish_static_data_member_decl): Likewise.
7654         (grokfield): Likewise.
7655         * friend.c (do_friend): Likewise.
7656
7657 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
7658
7659         * tree.c (walk_tree): Expose tail recursion.
7660         (walk_stmt_tree): New function.
7661         * cp-tree.h: Prototype walk_stmt_tree.
7662         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
7663         the BLOCKs directly.  If a BLOCK has no variables after
7664         pruning, discard it.
7665         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
7666         restore the line number.
7667
7668 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
7669
7670         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
7671         (pt.o): Remove dependency on HTAB_H.
7672         * cp-tree.h: Include hashtab.h.
7673         (walk_tree): Change prototype.
7674         (walk_tree_without_duplicates): New function.
7675         * decl.c (check_default_argument): Use it.
7676         * optimize.c (remap_decl): Adjust calls to walk_tree.
7677         (copy_body): Likewise.
7678         (expand_calls_inline): Likewise.
7679         (calls_setjmp_p): Use walk_tree_without_duplicates.
7680         * pt.c: Don't include hashtab.h.
7681         (for_each_template_parm): Use walk_tree_without_duplicates.
7682         * semantics.c (finish-stmt_tree): Likewise.
7683         (expand_body): Likewise.
7684         * tree.c (walk_tree): Add additional parameter.
7685         (walk_tree_without_duplicates): New function.
7686         (count_trees): Use it.
7687         (verify_stmt_tree): Adjust call to walk_tree.
7688         (find_tree): Use walk_tree_without_duplicates.
7689         (no_linkage_check): Likewise.
7690         (break_out_target_exprs): Adjust call to walk_tree.
7691         (cp_unsave): Likewise.
7692
7693 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
7694
7695         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
7696         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
7697         * cp-tree.h (TYPE_BINFO): Adjust comment.
7698         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
7699         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
7700         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
7701         (TYPE_TEMPLATE_INFO): Likewise.
7702         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
7703         * class.c (push_nested_class): Likewise.
7704         * decl.c (lookup_name_real): Likewise.
7705         (grokdeclarator): Likewise.
7706         (grok_op_properties): Likewise.
7707         (xref_tag): Likewise.
7708         (xref_basetypes): Likewise.
7709         * decl2.c (constructor_name_full): Likewise.
7710         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
7711         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
7712         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
7713         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
7714         (dump_type_suffix): Likewise.
7715         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
7716         instead.
7717         (get_aggr_from_typedef): Likewise.
7718         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
7719         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
7720         (write_template_parm): Likewise.
7721         (write_template_template_parm): Check tree code instead of
7722         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7723         * method.c (build_overload_nested_name): Add
7724         BOUND_TEMPLATE_TEMPLATE_PARM.
7725         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
7726         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
7727         * pt.c (convert_template_argument): Check tree code instead of
7728         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7729         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
7730         (for_each_template_parm): Adjust comment.
7731         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
7732         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
7733         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
7734         template_args_equal to compare template template parameter cases.
7735         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
7736         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
7737         instead.
7738         * tree.c (copy_template_template_parm): Decide whether to create
7739         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
7740         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
7741         (copy_tree_r): Likewise.
7742         * typeck.c (comptypes): Likewise.  Check tree code instead of
7743         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
7744
7745 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
7746
7747         * decl.c (finish_function): Move the code for handling functions
7748         marked with the constructor and destructor attributes inside the
7749         expand_p block.
7750
7751 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7752
7753         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
7754
7755 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7756
7757         * pt.c (lookup_template_class): Remove abort.
7758         * tree.c (get_type_decl): Allow error_mark_node.
7759
7760 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
7761
7762         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
7763         TEMPLATE_ID_EXPRs.
7764
7765 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
7766
7767         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
7768         new ABI mangling.
7769
7770 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
7771
7772         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
7773         union tag mismatch error reporting.
7774
7775 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
7776
7777         * call.c (build_scoped_method_call): Check it is not a namespace.
7778
7779 2000-08-30  Jason Merrill  <jason@redhat.com>
7780
7781         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
7782
7783         * tree.c (bot_manip): Check TREE_CONSTANT rather than
7784         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
7785         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
7786
7787         * decl.c (start_function): Always call make_function_rtl.
7788
7789 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
7790
7791         * semantics.c (prune_unused_decls): New function.
7792         (finish_stmt_tree): Call it via walk_tree.
7793
7794 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
7795
7796         * class.c (build_secondary_vtable): Constify a char *.
7797         * decl.c (init_decl_processing): Initialize function_id_node,
7798         pretty_function_id_node, and func_id_node.
7799         * input.c (struct input_source): Constify 'str'.
7800         (feed_input): Constify first argument.
7801         * mangle.c (write_identifier): Constify argument.
7802         * pt.c (mangle_class_name_for_template): Constify argument.
7803
7804 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
7805
7806         * typeck.c (mark_addressable): Remove code that pokes around in
7807         RTL.
7808
7809 2000-08-28  Jason Merrill  <jason@redhat.com>
7810
7811         * lex.c (file_name_nondirectory): Move to toplev.c.
7812
7813         * cp-tree.h (LOCAL_CLASS_P): New macro.
7814         * class.c (finish_struct_1): Use it.
7815
7816 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
7817
7818         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
7819         (write_encoding): Pass another argument to write_name.
7820         (write_name): Add ignore_local_scope parameter.  Fix handling of
7821         local names.
7822         (write_nested_name): Use write_unqualified_name.
7823         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
7824         (write_template_prefix): Use write_unqualified_name.
7825         (write_component): Remove.
7826         (write_local_name): Add parameter.  Use direct local entity to
7827         discriminator calculation.
7828         (write_class_enum_type): Pass another argument to write_name.
7829         (write_template_template_arg): Likewise.
7830         (make_guard_variable): Likewise.
7831
7832 2000-08-27  Jason Merrill  <jason@redhat.com>
7833
7834         * decl.c (pushdecl): Matching decls for local externs are found in
7835         the current level.  Propagate linkage information from previous
7836         declarations.
7837
7838 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
7839
7840         * ir.texi (Expressions): Fix typo.
7841
7842 2000-08-25  Greg McGary  <greg@mcgary.org>
7843
7844         * tree.c (init_tree): Use ARRAY_SIZE.
7845
7846 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
7847
7848         * error.c (cp_tree_printer): Rework.
7849
7850 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
7851
7852         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
7853         dyn-string.o.
7854         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
7855         (cp-demangle.o): Remove target.
7856         (dyn-string.o): Likewise.
7857
7858         * decl.c (grokfndecl): Require that `main' return an `int'.
7859         * mangle.c (write_encoding): Don't mangle return types for
7860         conversion functions.
7861
7862 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
7863
7864         * error.c (tree_formatting_info): New data type.
7865         (tree_being_formatted): New macro.
7866         (tree_formatting_flags): Likewise.
7867         (put_whitespace): Likewise.
7868         (print_tree_identifier): Likewise.
7869         (print_identifier): Likewise.
7870         (cp_tree_printer, print_function_argument_list, print_declaration,
7871         print_expression, print_function_declaration,
7872         print_function_parameter, print_type, print_cv_qualifier): New
7873         functions.
7874         (init_error): Initialize lang_printer.
7875
7876 2000-08-24  Jason Merrill  <jason@redhat.com>
7877
7878         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
7879         adjustment necessary.
7880
7881 2000-08-24  Greg McGary  <greg@mcgary.org>
7882
7883         * cp-tree.h (MAIN_NAME_P): Remove macro.
7884
7885 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
7886
7887         * error.c (print_instantiation_context): Don't forget to flush the
7888         buffer.
7889
7890 2000-08-23  Jason Merrill  <jason@redhat.com>
7891
7892         * typeck.c (build_ptrmemfunc): Save the input pmf.
7893
7894         * method.c (process_modifiers): Use same_type_p.
7895
7896 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
7897
7898         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
7899         * mangle.c (write_function_type): Change prototype.
7900         (write_encoding): Don't mangle return types for
7901         constructors or destructors.
7902         (write_type): Adjust call to write_function_type.
7903         * pt.c (instantiate_template): Instantiate alternate entry points
7904         when instantiating the main function.
7905
7906 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
7907
7908         * error.c (cp_print_error_function): Don't use embedded '\n' in
7909         output_printf.
7910
7911 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
7912
7913         * decl.c (init_decl_processing): Remove bogus initialization.
7914         * error.c (lang_print_error_function): Restore here.
7915         (init_error): Initialize print_error_function.
7916
7917 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
7918
7919         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
7920
7921 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
7922
7923         * Makefile.in (error.o): Depends on diagnostic.h
7924
7925         * cp-tree.h (problematic_instantiation_changed,
7926         record_last_problematic_instantiation, current_instantiation,
7927         print_instantiation_context): Declare.
7928         (maybe_print_template_context): Remove.
7929
7930         * decl.c (init_decl_processing): Set print_error_function to NULL.
7931         (lang_print_error_function): Remove, since we're using a new
7932         machinery.
7933
7934         * error.c: #include diagnostic.h
7935         (function_category): New function.
7936         (cp_diagnostic_starter): Likewise.
7937         (cp_diagnostic_finalizer): Likewise.
7938         (cp_print_error_function): Likewise.
7939         (maybe_print_instantiation_context): Likewise.
7940         (print_instantiation_full_context): Likewise.
7941         (print_instantiation_partial_context): Likewise.
7942         (print_instantiation_context): Define.
7943         (init_error): Initialize diagnostic pager and finalizer.
7944
7945         * pt.c (problematic_instantiation_changed): Define.
7946         (record_last_problematic_instantiation): Likewise.
7947         (current_instantiation): Likewise.
7948         (maybe_print_template_context): Remove.
7949         (print_template_context): Likewise.
7950         (current_tinst_level): Make static to reflect Brendan Kehoe's
7951         change of 1995-04-13.
7952         (push_tinst_level): Call print_instantiation_context.
7953
7954 2000-08-21  Nix  <nix@esperi.demon.co.uk>
7955
7956         * lang-specs.h: Do not process -o or run the assembler if
7957         -fsyntax-only.
7958
7959 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
7960
7961         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
7962         variables.
7963         * decl2.c (lang_decode_option): Disable gettext attributes for
7964         -ansi.
7965
7966 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
7967
7968         * lex.c (lang_init_options): Default diagnostic message maximum
7969         length to 80, when line-wrapping.
7970
7971 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
7972
7973         * class.c (build_vtbl_initializer): Clear the entire
7974         vtbl_init_data.  Start keeping track of the functions for which we
7975         have created vcall offsets here.
7976         (dfs_build_vcall_offset_vtbl_entries): Remove.
7977         (build_vcall_offset_vtbl_entries): Reimplement.
7978         (add_vcall_offset_vtbl_entries_r): New function.
7979         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
7980         computing when vcall offsets are necessary.
7981
7982 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7983
7984         * decl.c (member_function_or_else): Use cp_error ... %T.
7985         (grokdeclarator): Likewise.
7986         (start_method): Likewise.
7987         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
7988
7989 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7990
7991         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
7992         TYPE_DECLs.
7993
7994 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
7995
7996         * cp-tree.h (PTRMEM_OK_P): New macro.
7997         (itf_ptrmem_ok): New enumeration value.
7998         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
7999         argument. Diagnose implicit pointer to member.
8000         (instantiate_type): Don't diagnose implicit pointer to member
8001         here. Pass itf_ptrmem_ok if ok. Adjust calls to
8002         resolve_address_of_overloaded_function.
8003         * init.c (build_offset_ref): Set PTRMEM_OK_P.
8004         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
8005         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
8006         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
8007         (build_unary_op): Deal with single non-static member in
8008         microsoft-land.
8009
8010 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
8011
8012         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
8013
8014 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
8015
8016         * cp-tree.h (enum_name_string): Remove prototype.
8017         (report_case_error): Remove prototype.
8018         * cp/typeck2.c (enum_name_string): Remove.
8019         (report_case_error): Remove.
8020         * error.c (dump_expr): Deal with enum values directly.
8021         Correctly negate integer constant.
8022
8023 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
8024
8025         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
8026         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
8027         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
8028         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
8029         (__cxa_vec_new): Use __cxa_vec_new2.
8030         (__cxa_vec_delete): Use __cxa_vec_delete2.
8031
8032 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
8033
8034         * vec.cc (__cxa_vec_new): Set "C" linkage.
8035         (__cxa_vec_ctor): Likewise.
8036         (__cxa_vec_cctor): Likewise.
8037         (__cxa_vec_dtor): Likewise.
8038         (__cxa_vec_delete): Likewise.
8039         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
8040         (__cxa_vec_ctor): Likewise.
8041         (__cxa_vec_cctor): Likewise.
8042         (__cxa_vec_dtor): Likewise.
8043         (__cxa_vec_delete): Likewise.
8044
8045 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
8046
8047         * class.c (instantiate_type): Reinstate local variable
8048         deleted in previous change.
8049
8050         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
8051         itf_no_attributes.
8052
8053 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
8054
8055         * cp-tree.h (instantiate_type_flags): New enumeration.
8056         (instantiate_type): Change parameter.
8057         * class.c (instantiate_type): Adjust prototype. Adjust.
8058         * call.c (standard_conversion): Adjust instantiate_type call.
8059         (reference_binding): Likewise.
8060         (build_op_delete_call): Likewise.
8061         (convert_like_real): Likewise.
8062         * cvt.c (cp_convert_to_pointer): Likewise.
8063         (convert_to_reference): Likewise.
8064         * pt.c (convert_nontype_argument): Likewise.
8065         * typeck.c (build_binary_op): Likewise.
8066         (build_ptrmemfunc): Likewise.
8067         (convert_for_assignment): Likewise.
8068
8069 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
8070
8071         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
8072         (current_aggr): Define.
8073         * decl.c (grokdeclarator): Make sure a friend class is an
8074         elaborated type specifier.
8075         * parse.y (current_aggr): Remove static definition.
8076         (cp_parse_init): Adjust.
8077         (structsp): Clear and restore current_aggr.
8078         (component_decl_list): Clear current_aggr.
8079
8080         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
8081         aggregate tag on the typename's context.
8082
8083         * pt.c (tsubst_friend_class): Return error_mark_node, if
8084         parms becomes NULL.
8085         (instantiate_class_template): Ignore error_mark_node friend types.
8086
8087 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
8088
8089         * cvt.c (warn_ref_binding): New static function, broken out of ...
8090         (convert_to_reference): ... here. Use it.
8091
8092 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
8093
8094         * parse.y (template_arg): Add rule for template qualified with
8095         global scope.
8096
8097 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8098
8099         * decl2.c (add_function): Reorganize.
8100         (arg_assoc): Do not consider function template decls.
8101
8102 2000-08-11  Jason Merrill  <jason@redhat.com>
8103
8104         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
8105         looking inside.
8106
8107 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
8108
8109         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
8110         (lookup_nested_tag): Likewise.
8111
8112         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
8113         can be produced.
8114
8115 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
8116
8117         * parse.y (named_complex_class_head_sans_basetype): Remove
8118         always true if.
8119
8120 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
8121
8122         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
8123         explicit TEMPLATE_ID_EXPR args.
8124         (build_expr_from_tree, case CALL_EXPR): Likewise.
8125
8126 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
8127
8128         * decl.c (check_tag_decl): Diagnose typename's which don't
8129         declare anything.
8130
8131 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
8132
8133         * init.c (build_aggr_init): Reject bogus array initializers
8134         early.
8135
8136 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
8137
8138         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
8139         runtime.
8140         * cp/tinfo.cc (__dynamic_cast): Likewise.
8141         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
8142
8143 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
8144
8145         * cvt.c (convert_to_pointer_force): Fix error message when
8146         attempting to cast from ambiguous base.
8147
8148 2000-08-08  Jason Merrill  <jason@redhat.com>
8149
8150         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
8151         (tsubst_template_arg_vector): Likewise.
8152
8153         * decl2.c (build_anon_union_vars): Choose the largest field; don't
8154         assume that one will be as large as the union.
8155
8156 2000-08-07  Kazu Hirata  <kazu@hxi.com>
8157
8158         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
8159         * decl.c (pop_labels): Likewise.
8160
8161 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
8162
8163         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
8164         specifications.
8165         (__pointer_to_member_type_info): Likewise.
8166         (__base_class_info): Likewise.
8167         (__class_type_info): Likewise.
8168         (__si_class_type_info): Likewise.
8169         (__vmi_class_type_info): Likewise.
8170         * tinfo.cc (__si_class_type_info::__do_find_public_src):
8171         Changed member names to match specifications.
8172         (__vmi_class_type_info::__do_find_public_src): Likewise.
8173         (__si_class_type_info::__do_dyncast): Likewise.
8174         (__vmi_class_type_info::__do_dyncast): Likewise.
8175         (__si_class_type_info::__do_upcast): Likewise.
8176         (__vmi_class_type_info::__do_upcast): Likewise.
8177         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
8178         (__pbase_type_info::__pointer_catch): Likewise.
8179         (__pointer_type_info::__pointer_catch): Likewise.
8180         (__pointer_to_member_type_info::__pointer_catch): Likewise.
8181
8182 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
8183
8184         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
8185         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
8186         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
8187
8188 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
8189
8190         * cp-tree.h (add_method): Change prototype.
8191         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
8192         Don't double the size of the method vector in the error case.
8193         (handle_using_decl): Adjust call to add_method.
8194         (add_implicitly_declared_members): Likewise.
8195         (clone_function_decl): Likewise.
8196         * decl2.c (check_classfn): Likewise.
8197         * semantics.c (finish_member_declaration): Likewise.
8198
8199 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
8200
8201         * decl.c (flag_isoc94): New variable.
8202
8203 2000-08-02  Jason Merrill  <jason@redhat.com>
8204
8205         * pt.c (do_type_instantiation): Add complain parm; don't complain
8206         if called recursively.
8207         * cp-tree.h, parse.y: Adjust.
8208
8209 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
8210
8211         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
8212         -Wno-strict-prototypes.
8213
8214         * g++spec.c: Adjust type of second argument to
8215         lang_specific_driver, and update code as necessary.
8216
8217         * cp-tree.h: Don't prototype min_precision here.
8218         (my_friendly_assert): Cast expression to void.
8219         * semantics.c (do_poplevel): Initialize scope_stmts.
8220
8221 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
8222
8223         * cp-tree.h (DECL_NEEDED_P): Tweak.
8224
8225 2000-07-28  Jason Merrill  <jason@redhat.com>
8226
8227         * lang-specs.h: Use %i in rule for .ii files.
8228
8229 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
8230
8231         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
8232
8233 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
8234
8235         Allow indirect primary bases.
8236         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
8237         primary_base.
8238         (CLASSTYPE_VFIELD_PARENT): Remove.
8239         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
8240         (BINFO_PRIMARY_BINFO): Remove.
8241         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
8242         (BINFO_VBASE_PRIMARY_P): Likewise.
8243         (BINFO_PRIMARY_BASE_OF): New macro.
8244         (BINFO_INDIRECT_PRIMARY_P): Likewise.
8245         (get_primary_binfo): New function.
8246         * decl.c (lang_mark_tree): Make lang_type::primary_base.
8247         * class.c (vcall_offset_data_s): Rename to ...
8248         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
8249         and add ctor_vtbl_p.
8250         (get_derived_offset): Use get_primary_binfo.
8251         (dfs_mark_primary_bases): Adjust handling of virtual primary
8252         bases.
8253         (mark_primary_bases): Likewise.
8254         (set_primary_base): Take a binfo, not an integer, as a
8255         representation of the primary base.
8256         (indirect_primary_base_p): Remove.
8257         (determine_primary_base): Adjust for indirect primary bases.
8258         (dfs_find_final_overrider): Fix typo in coment.
8259         (update_vtable_entry_for_fn): Use get_primary_binfo.
8260         (layout_nonempty_base_or_field): Tweak.
8261         (build_base_fields): Adjust for new primary base semantics.
8262         (dfs_propagate_binfo_offsets): Remove.
8263         (propagate_binfo_offsets): Rewrite.
8264         (dfs_set_offset_for_shared_vbases): Remove.
8265         (layout_virtual_bases): Don't use it.
8266         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
8267         ABI.
8268         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
8269         CLASSTYPE_VFIELD_PARENT.
8270         (dfs_get_primary_binfo): New function.
8271         (get_primary_binfo): Likewise.
8272         (dump_class_hierarchy_r): Tweak printing of primary bases.
8273         (build_vtbl_initializer): Fix typo in comments.  Use
8274         vtbl_init_data.
8275         (build_vcall_and_vbase_vtbl_entries): Likewise.
8276         (build_vbaes_offset_vtbl_entries): Likewise.
8277         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
8278         BV_VCALL_INDEX to handle indirect primary bases.
8279         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
8280         (build_rtti_vtbl_entries): Likewise.
8281         * search.c (get_shared_vbase_if_not_primary): Tweak.
8282         (find_vbase_instance): Likewise.
8283         (binfo_for_vtable): Simplify.
8284         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
8285         (make_binfo): Make it have 11 entries.
8286
8287 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
8288
8289         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
8290         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
8291         ascertaining primaryness.
8292         (G): Remove template_args.
8293         (decl_is_template_id): New function.
8294         (write_encoding): Use decl_is_template_id.
8295         (write_name): Likewise.  Handle type_decls.  Get main variant of
8296         type decls.
8297         (write_nested_name): Likewise.
8298         (write_prefix): Likewise.
8299         (write_template_prefix): Likewise.
8300         (write_special_name_constructor): Remove defunct production from
8301         comment.
8302         (write_bare_function_type): Remove comment about absent parameter.
8303         (write_template_template_arg): Add missing grammar production to
8304         comment.
8305
8306 2000-07-27  Jason Merrill  <jason@redhat.com>
8307
8308         * decl.c (duplicate_decls): If common_type produces a non-typedef
8309         type for a typedef, just use the old type.
8310
8311 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
8312
8313         * cp-tree.h (function_depth): Declare.
8314         (verify_stmt_tree): Likewise.
8315         (find_tree): Likewise.
8316         * decl.c (function_depth): Give it external linkage.
8317         * optimize.c (optimize_function): Increment and decrement it.
8318         * tree.c (verify_stmt_tree_r): New function.
8319         (verify_stmt_tree): Likewise.
8320         (find_tree_r): Likewise.
8321         (find_tree): Likewise.
8322
8323 2000-07-27  Jason Merrill  <jason@redhat.com>
8324
8325         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
8326         TYPE_PTRMEMFUNC_P.
8327         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
8328
8329 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
8330
8331         * decl.c (start_cleanup_fn): Mark the function as `inline'.
8332         * decl2.c (get_guard): Call cp_finish_decl, not
8333         rest_of_decl_compilation, for local guards.
8334         * lex.c (do_identifier): Remove unused variable.
8335
8336 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
8337
8338         * parse.y:  Add missing ';'.
8339
8340 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
8341
8342         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
8343         of `extern "C++"'.
8344
8345 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8346
8347         Kill strict_prototype. Backwards compatibility only for
8348         non NO_IMPLICIT_EXTERN_C systems.
8349         * cp-tree.h (flag_strict_prototype): Remove.
8350         (strict_prototype): Remove.
8351         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
8352         * decl.c (maybe_push_to_top_level): Adjust.
8353         (pop_from_top_level): Adjust.
8354         (decls_match): Only allow sloppy parm matching for ancient
8355         system headers.
8356         (init_decl_processing): Adjust.
8357         (grokdeclarator): Adjust.
8358         * decl2.c (flag_strict_prototype): Remove.
8359         (strict_prototype): Remove.
8360         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
8361         (lang_f_options): Remove "strict-prototype".
8362         (unsupported-options): Add "strict-prototype".
8363         * lex.c (do_identifier): Adjust.
8364         (do_scoped_id): Adjust.
8365         * parse.y (empty_parms): Adjust.
8366         * class.c (push_lang_context): Adjust.
8367         (pop_lang_context): Adjust.
8368         * typeck.c (comp_target_parms): Adjust.
8369
8370 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
8371
8372         * decl.c (poplevel): Deal with anonymous variables at for scope.
8373         (maybe_inject_for_scope_var): Likewise.
8374
8375 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
8376
8377         * decl.c: Remove all signal handling code, now done in toplev.c.
8378
8379 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
8380
8381         * decl.c (make_rtl_for_nonlocal_decl): Rework.
8382
8383         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
8384         correctly.
8385
8386 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
8387
8388         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
8389         Define my_friendly_assert and my_friendly_abort as macros
8390         which may call friendly_abort.  Prototype friendly abort, not
8391         my_friendly_abort or my_friendly_assert.
8392         * decl.c (signal_catch): Report the signal caught in the error
8393         message.  Call fatal directly.
8394         * typeck2.c (ack, my_friendly_assert): Delete.
8395         (my_friendly_abort): Rename to friendly_abort.  Expect file,
8396         line, and function parameters.  Report the abort code, then
8397         call fancy_abort.  Do not mask an abort if errors have
8398         already occurred.
8399
8400 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
8401
8402         * typeck.c (comp_target_parms): Remove obsolete parameter.
8403         (comp_target_types): Adjust.
8404
8405 2000-07-17  Jason Merrill  <jason@redhat.com>
8406
8407         * typeck.c (mark_addressable): Never set TREE_USED.
8408         * call.c (build_call): Don't abort on calls to library functions
8409         that have been declared normally.
8410
8411         * typeck.c (build_binary_op): Fix grammar in warning.
8412
8413         * exception.cc (__eh_free): Fix prototype.
8414
8415         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
8416
8417         * decl.c (pushdecl): Handle seeing an OVERLOAD in
8418         IDENTIFIER_NAMESPACE_VALUE.
8419
8420 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
8421
8422         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
8423         * method.c (use_thunk): Correct handling of vcall offsets.
8424
8425 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
8426
8427         * .cvsignore: parse.h and parse.c have no cp- prefix.
8428
8429 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
8430
8431         * .cvsignore: New file.
8432
8433 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
8434
8435         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
8436
8437 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
8438
8439         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
8440         * parse.c: Remove.
8441         * parse.h: Likewise.
8442
8443 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
8444
8445         * class.c (layout_class_type): Add pointers to virtual bases after
8446         base classes under the old ABI.
8447
8448 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
8449
8450         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
8451         (finish_continue_stmt): Likewise.
8452         (begin_for_stmt): Remove call to note_level_for_for.
8453         (finish_goto_stmt): Change call from build_min_nt
8454         to build_stmt.
8455         (finish_expr_stmt): Likewise.
8456         (begin_if_stmt): Likewise.
8457         (begin_while_stmt): Likewise.
8458         (finish_while_stmt): Likewise.
8459         (finish_return_stmt): Likewise.
8460         (begin_for_stmt): Likewise.
8461         (finish_for_stmt): Likewise.
8462         (finish_break_stmt): Likewise.
8463         (begin_switch_stmt): Likewise.
8464         (finish_case_label): Likewise.
8465         (genrtl_try_block): Likewise.
8466         (begin_try_block): Likewise.
8467         (begin_handler): Likewise.
8468         (begin_compound_stmt): Likewise.
8469         (finish_asm_stmt): Likewise.
8470         (finish_label_stmt): Likewise.
8471         (add_decl_stmt): Likewise.
8472         (finish_subobject): Likewise.
8473         (finish_decl_cleanup): Likewise.
8474         (finish_named_return_value): Likewise.
8475         (setup_vtbl_ptr): Likewise.
8476         (add_scope_stmt): Likewise.
8477         * decl.c (finish_constructor_body): Likewise.
8478         (finish_destructor_body): Likewise.
8479         * optimize.c (copy_body_r): Likewise.
8480         (initialize_inlined_parameters): Likewise.
8481         (declare_return_variable): Likewise.
8482         (expand_call_inline): Likewise.
8483
8484 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
8485
8486         * semantics.c (expand_body): Sync interface information
8487         at the end of function body expansion.
8488
8489 2000-07-09  Jason Merrill  <jason@redhat.com>
8490
8491         * init.c (build_new_1): Bail early if the call to new fails.
8492
8493         * decl.c (compute_array_index_type): Check specifically for
8494         an INTEGER_CST, not just TREE_CONSTANT.
8495
8496         * decl.c (duplicate_decls): Don't call duplicate_decls on
8497         the DECL_TEMPLATE_RESULT.
8498         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
8499         codes.
8500
8501         * error.c (dump_template_bindings): Don't crash if we had an
8502         invalid argument list.
8503
8504         * typeck.c (c_expand_start_case): Do narrowing here.
8505         * semantics.c (finish_switch_cond): Not here.
8506
8507 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
8508
8509         * parse.y (asm_clobbers): Do string concatenation.
8510
8511 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
8512
8513         * decl.c (pushtag): Don't put local classes in template functions
8514         on the local_classes list.
8515
8516 2000-07-04  Scott Snyder  <snyder@fnal.gov>
8517
8518         * decl2.c (get_guard): Add missing return for old ABI local
8519         variable case.
8520
8521 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
8522
8523         * cp-tree.h (char_type_p): New function.
8524         * decl.c (init_decl_processing): Don't initialize
8525         signed_wchar_type_node or unsigned_wchar_type_node.
8526         (complete_array_type): Handle brace-enclosed string-constants.
8527         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
8528         * tree.c (char_type_p): New function.
8529         * typeck2.c (digest_init): Use char_type_p.
8530
8531 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
8532
8533         * pt.c (tsubst): Don't layout type, if it's error_mark.
8534
8535 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
8536
8537         * pt.c (instantiate_pending_templates): Reset template level.
8538
8539 2000-07-05  Jason Merrill  <jason@redhat.com>
8540
8541         * call.c (joust): Don't complain about `operator char *()' beating
8542         `operator const char *() const'.
8543
8544 2000-07-04  scott snyder  <snyder@fnal.gov>
8545             Jason Merrill  <jason@redhat.com>
8546
8547         * repo.c (repo_get_id): Handle the case where a class with virtual
8548         bases has a null TYPE_BINFO_VTABLE.
8549
8550 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
8551             Jason Merrill  <jason@redhat.com>
8552
8553         * parse.y (member_init): Just pass in the type.
8554         * init.c (expand_member_init): Handle getting a type.
8555
8556 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8557             Jason Merrill  <jason@redhat.com>
8558
8559         * decl.c (finish_function): Warn if a function has no return
8560         statement.
8561         Suggested by Andrew Koenig.
8562         * typeck.c (check_return_expr): Do set current_function_returns_value
8563         if we got an error_mark_node.
8564
8565 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
8566
8567         * decl2.c (push_decl_namespace): Push the original namespace.
8568
8569 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
8570
8571         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
8572         * semantics.c (begin_class_definition): Clear it.
8573
8574 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
8575
8576         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
8577         (genrtl_expr_stmt): Likewise.
8578         (genrtl_decl_stmt): Likewise.
8579         (genrtl_if_stmt): Likewise.
8580         (genrtl_while_stmt): Likewise.
8581         (genrtl_do_stmt): Likewise.
8582         (genrtl_return_stmt): Likewise.
8583         (genrtl_for_stmt): Likewise.
8584         (genrtl_break_stmt): Likewise.
8585         (genrtl_continue_stmt): Likewise.
8586         (genrtl_scope_stmt): Likewise.
8587         (genrtl_switch_stmt): Likewise.
8588         (genrtl_case_label): Likewise.
8589         (genrtl_begin_compound_stmt): Likewise.
8590         (genrtl_finish_compound_stmt): Likewise.
8591         (genrtl_compound_stmt): Likewise.
8592         (genrtl_asm_stmt): Likewise.
8593
8594         * init.c (begin_init_stmts): Remove call to
8595         genrtl_begin_compound_stmt.
8596         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
8597
8598         * semantics.c (lang_expand_stmt): Changed call to
8599         genrtl_compound_stmt to ignore return value.
8600
8601 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
8602
8603         * mangle.c (canonicalize_for_substitution): Return the canonical
8604         variant of a type.
8605
8606         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
8607         TYPE_DECL.
8608         * typeck.c (commonparms): Remove obstack manipulations.
8609
8610 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
8611
8612         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
8613
8614         * Makefile.in (OBJS): Added ../c-semantics.o.
8615         (OBJDEPS): Likewise.
8616
8617         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
8618         ../c-common.h.
8619         (struct stmt_tree): Added comment.
8620         (current_function_name_declared): Removed.
8621         (stmts_are_full_exprs_p): Likewise.
8622         (genrtl_do_pushlevel): Likewise.
8623         (genrtl_clear_out_block): Likewise.
8624         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
8625         (DECL_ANON_UNION_ELEMS): Likewise.
8626         (emit_local_var): Likewise.
8627         (make_rtl_for_local_static): Likewise.
8628         (do_case): Likewise.
8629         (expand_stmt): Likewise.
8630         (genrtl_decl_cleanup): Likewise.
8631         (c_expand_asm_operands): Likewise.
8632         (c_expand_return): Likewise.
8633         (c_expand_start_case): Likewise.
8634
8635         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
8636         (emit_local_var): Likewise.
8637         (initialize_local_var): Change reference to
8638         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
8639         Change reference to stmts_are_full_exprs_p to
8640         current_stmt_tree->stmts_are_full_exprs_p.
8641         (push_cp_function_context): Likewise.
8642
8643         * expect.c (expand_throw): Change reference to
8644         stmts_are_full_exprs_p.
8645
8646         * init.c (build_aggr_init): Change reference to
8647         stmts_are_full_exprs_p.
8648         (build_vec_init): Likewise.
8649
8650         * optimize.c (maybe_clone_body): Change reference to
8651         current_function_name_declared to
8652         cp_function_chain->name_declared.
8653
8654         * pt.c (instantiate_decl): Change reference to
8655         current_function_name_declared to
8656         cp_function_chain->name_declared.
8657
8658         * semantics.c (expand_cond): Moved declaration to c-common.h.
8659         (genrtl_do_pushlevel): Moved to c-semantics.c.
8660         (genrtl_clear_out_block): Likewise.
8661         (genrtl_goto_stmt): Likewise.
8662         (genrtl_expr_stmt): Likewise.
8663         (genrtl_decl_stmt): Likewise.
8664         (gerntl_if_stmt): Likewise.
8665         (genrtl_while_stmt): Likewise.
8666         (genrtl_do_stmt): Likewise.
8667         (genrtl_return_stmt): Likewise.
8668         (genrtl_for_stmt): Likewise.
8669         (genrtl_break_stmt): Likewise.
8670         (genrtl_continue_stmt): Likewise.
8671         (genrtl_scope_stmt): Likewise.
8672         (genrtl_switch_stmt): Likewise.
8673         (genrtl_case_label): Likewise.
8674         (genrtl_begin_compound_stmt): Likewise.
8675         (genrtl_finish_compound_stmt): Likewise.
8676         (genrtl_compound_stmt): Likewise.
8677         (genrtl_asm_stmt): Likewise.
8678         (genrtl_decl_cleanup): Likewise.
8679         (expand_cond): Likewise.
8680         (expand_stmt): Renamed to ...
8681         (lang_expand_stmt): ... this.
8682         (lang_expand_expr_stmt): Initialize.
8683         (set_current_function_name_declared): Likewise.
8684         (stmts_are_full_exprs_p): Likewise.
8685         (current_function_name_declared): Likewise.
8686         (anon_aggr_type_p): Likewise.
8687         (do_poplevel): Change reference to
8688         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
8689         Change reference to stmts_are_full_exprs_p to
8690         current_stmt_tree->stmts_are_full_exprs_p.
8691         (add_tree): Likewise.
8692         (finish_expr_stmt): Likewise.
8693         (prep_stmt): Likewise.
8694         (lang_expand_stmt): Likewise.
8695         (begin_compound_stmt): Change reference to
8696         current_function_name_declared to
8697         cp_function_chain->name_declared and call to
8698         current_function_name_declared().
8699         (setup_vtbl_ptr): Likewise.
8700         (genrtl_do_poplevel): Removed.
8701
8702 2000-06-30  Jason Merrill  <jason@redhat.com>
8703
8704         * init.c (init_init_processing): Go back to aligning like
8705         double_type_node for old ABI.
8706         (get_cookie_size): Make cookie larger if we get a type that needs
8707         more alignment.
8708         (build_vec_delete): Call it.
8709
8710         * typeck.c (qualify_type_recursive): New fn.
8711         (composite_pointer_type): Use it.
8712         (build_binary_op): Use composite_pointer_type.
8713
8714 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
8715             Jason Merrill  <jason@redhat.com>
8716
8717         * typeck.c (check_return_expr): Don't complain about returning
8718         NULL from operator new if -fcheck-new.
8719         * cp-tree.h: Declare flag_check_new here.
8720         * init.c: Not here.
8721
8722 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
8723
8724         * mangle.c (find_substitution): Use same_type_p.
8725         (write_encoding): Don't check for substitutions.
8726
8727 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8728
8729         * parse.y (expr_no_comma_rangle): New non-terminal.
8730         (template_parm): Use it for default parameter case.
8731         (template_arg): Use it.
8732         (expr_no_commas): Remove commented out undefined extensions.
8733         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
8734         * parse.h, parse.c: Rebuilt.
8735
8736 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
8737
8738         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
8739         (finish_asm_stmt): Do it here, instead.
8740
8741         * cp-tree.h (ridpointers): Don't declare.
8742         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
8743         (record_builtin_java_type): Likewise.
8744         (init_decl_processing): Likewise.
8745         * lex.c: Move inclusion of lex.h.
8746         (ridpointers): Don't define.
8747         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
8748         RID_MAX.
8749         * lex.h (enum rid): Rename to ...
8750         (enum cp_rid): ... this.
8751         (ridpointers): Don't declare.
8752         * parse.y: Move inclusion of lex.h.
8753         * parse.c: Regenerated.
8754         * spew.c: Move inclusion of lex.h.
8755
8756         * cp-tree.h (struct language_function): Remove temp_name_counter.
8757         (temp_name_counter): Remove.
8758         (get_temp_name): Change prototype.
8759         (get_guard): New function.
8760         (get_guard_cond): Likewise.
8761         (set_guard): Likewise.
8762         * cvt.c (build_up_reference): Adjust call to get_temp_name.
8763         * decl.c (expand_static_init): Use get_guard and friends to
8764         implement guard variables.
8765         * decl2.c (get_temp_name): Assume that the variables created are
8766         always static.
8767         (get_sentry): Rename to ...
8768         (get_guard): ... this.  Implement new ABI guard variables.
8769         (get_guard_bits): New function.
8770         (get_guard_cond): Likewise.
8771         (set_guard): Likewise.
8772         (start_static_initialization_or_destruction): Use them.
8773         (do_static_initialization): Replace sentry with guard throughout.
8774         (do_static_destruction): Likewise.
8775         * init.c (create_temporary_var): Add comment.
8776
8777 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
8778
8779         * mangle.c (find_substitution): Use same_type_p.
8780         (write_encoding): Don't check for substitutions.
8781
8782 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
8783
8784         * parse.y (expr_no_comma_rangle): New non-terminal.
8785         (template_parm): Use it for default parameter case.
8786         (template_arg): Use it.
8787         (expr_no_commas): Remove commented out undefined extensions.
8788         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
8789         * parse.h, parse.c: Rebuilt.
8790
8791 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
8792
8793         * cp-tree.h (flag_const_strings): Remove.
8794         (warn_parentheses): Likewise.
8795         (warn_format): Likewise.
8796         (common_type): Likewise.
8797         (default_conversion): Likewise.
8798         (build_binary_op): Likewise.
8799         (cp_build_binary_op): New macro.
8800         * call.c (build_new_op): Use cp_build_binary_op instead of
8801         build_binary_op.
8802         * class.c (build_vtable_entry_ref): Likewise.
8803         * decl.c (expand_static_init): Likewise.
8804         (compute_array_index_type): Likewise.
8805         (build_enumerator): Likewise.
8806         * decl2.c (delete_sanity): Likewise.
8807         (start_static_initialization_or_destruction): Likewise.
8808         * error.c (dump_type_suffix): Likewise.
8809         * init.c (resolve_offset_ref): Likewise.
8810         (build_new): Likewise.
8811         (build_new_1): Likewise.
8812         (build_vec_delete_1): Likewise.
8813         (build_vec_init): Likewise.
8814         (build_delete): Likewise.
8815         * rtti.c (synthesize_tinfo_fn): Likewise.
8816         (synthesize_tinfo_var): Likewise.
8817         * search.c (expand_upcast_fixups): Likewise.
8818         (fixup_all_virtual_upcast_offsets): Likewise.
8819         * typeck.c (build_array_ref): Likewise.
8820         (get_member_function_from_ptrfunc): Likewise.
8821         (build_binary_op): Add parameter.
8822         (pointer_int_sum): Use cp_build_binary_op.
8823         (pointer_diff): Likewise.
8824         (build_modify_expr): Likewise.
8825         (get_delta_difference): Likewise.
8826         (build_ptrmemfunc): Likewise.
8827
8828 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
8829
8830         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
8831         * decl.c (create_implicit_typedef): Adjust.
8832         * decl2.c (build_artificial_parm): Adjust.
8833         * method.c (implicitly_declare_fn): Adjust.
8834         * pt.c (push_inline_template_parms_recursive): Adjust.
8835         (process_template_parm): Adjust.
8836         (overloaded_template_name): Adjust.
8837         * semantics.c (finish_template_template_parm): Adjust.
8838
8839 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
8840
8841         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
8842         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
8843         where to emit thunks.
8844         (build_vtt): Adjust call to build_vtt_inits.
8845         (build_vtt_inits): Add parameter to indicate whether or not
8846         sub-VTTs for virtual bases should be included.  Adjust handling of
8847         construction vtables.
8848         (get_matching_base): New function.
8849         (dfs_build_vtt_inits): Rename to ...
8850         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
8851         construction vtables.
8852         (dfs_fixup_binfo_vtbls): Likewise.
8853         (build_ctor_vtbl_groups): Build construction vtables for virtual
8854         bases, too.
8855         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
8856         to build construction vtbls.
8857         (dfs_accumulate_vtbl_inits): Adjust handling of
8858         construction vtables.
8859
8860         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
8861         types correctly.
8862
8863 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
8864
8865         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
8866
8867 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
8868
8869         * search.c (hides): Remove.
8870         (is_subobject_of_p): Add most_derived parameter. Use
8871         CANONICAL_BINFO.
8872         (lookup_field_queue_p): Adjust.
8873         (lookup_field_r): Adjust.
8874
8875 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
8876
8877         * decl2.c (handle_class_head): Bash typedefs to the type's main
8878         decl.
8879
8880 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
8881
8882         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
8883         (begin_global_stmt_expr): ... this.
8884         (genrtl_finish_stmt_expr): Rename to ...
8885         (finish_global_stmt_expr): ... this.
8886         * init.c (begin_init_stmts): Adjust calls.
8887         (finish_init_stmts): Likewise.
8888         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
8889         (begin_global_stmt_expr): ... this.
8890         (genrtl_finish_stmt_expr): Rename to ...
8891         (finish_global_stmt_expr): ... this.
8892
8893 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8894
8895         * search.c (lookup_member): Fix typo in comment.
8896
8897 2000-06-24  Jason Merrill  <jason@redhat.com>
8898
8899         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
8900         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
8901
8902 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8903
8904         * parse.y (complex_direct_notype_declarator): Support global_scope.
8905         * Makefile.in: Adjust conflict count.
8906
8907 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
8908
8909         * parse.y (template_arg): Convert TEMPLATE_DECL
8910         that is a template template parameter to
8911         TEMPLATE_TEMPLATE_PARM here.
8912
8913         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
8914         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
8915         (copy_template_template_parm): Adjust prototype.
8916         * decl.c (grokdeclarator): Remove dead code.
8917         * pt.c (process_template_parm): Tidy.
8918         (lookup_template_class): Construct nodes in
8919         copy_template_template_parm.
8920         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
8921         lookup_template_class.  Use TYPE_TI_TEMPLATE.
8922         * tree.c (copy_template_template_parm): Add NEWARGS
8923         parameter.
8924         (mapcar): Adjust call to copy_template_template_parm.
8925         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
8926         * method.c (build_template_template_parm_names): Change error
8927         code to avoid compilation warning.
8928
8929         * gxxint.texi: Document template template parameter
8930         name mangling.
8931
8932 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
8933
8934         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
8935         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
8936         (cp-demangle.o): New rule.
8937         (dyn-string.o): Likewise.
8938         * inc/cxxabi.h (__cxa_demangle): New declaration.
8939
8940 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
8941
8942         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
8943         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
8944         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
8945         a tree, not an int.
8946         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
8947         (make_thunk): Change prototype.
8948         (emit_thunk): Rename to use_thunk.
8949         (mangle_thunk): Change prototype.
8950         * class.c (get_derived_offset): Simplify.
8951         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
8952         BV_GENERATE_THUNK_WITH_VTABLE_P.
8953         (build_primary_vtable): Simplify.
8954         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
8955         (dfs_find_base): Remove.
8956         (update_vtable_entry_for_fn): Correct bug in finding the base
8957         where a virtual function was first declared.  Figure out whether
8958         or not to emit a vcall-thunk with the vtables in which it appears.
8959         Correct logic for deciding whether to use an ordinary thunk, or a
8960         vcall thunk.
8961         (finish_struct_1): Remove unnecssary code.
8962         (build_vtbl_initializer): Use ssize_int for the running counter of
8963         negative indices.
8964         (build_vtbl_initializer): Only use vcall thunks where necessary.
8965         Mark thunks as needing to be emitted with their vtables, or not.
8966         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
8967         indices.  Use size_binop.
8968         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
8969         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
8970         size_binop.
8971         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
8972         (build_vtable_entry): Mark thunks as needing to be emitted with
8973         their vtables, or not.
8974         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
8975         * decl2.c (mark_vtable_entries): Use use_thunk instead of
8976         emit_thunk.
8977         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
8978         information.
8979         * error.c (dump_expr): Use BV_FN.
8980         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
8981         not an int.
8982         * method.c (make_thunk): Likewise.
8983         (emit_thunk): Rename to use_thunk.  Allow callers to decide
8984         whether or not to actually emit the thunk.  Adjust for changes in
8985         representation of vcall offsets.
8986         * search.c (dfs_get_pure_virtuals): Use BV_FN.
8987         * semantics.c (emit_associated_thunks): New function.
8988         (expand_body): Use it.
8989         * ir.texi: Adjust decriptions of thunks.
8990
8991 2000-06-22  Jason Merrill  <jason@redhat.com>
8992
8993         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
8994         (tsubst_friend_function): Copy it here.
8995
8996         * decl.c (grok_op_properties): Fix typo.
8997
8998         * decl2.c (delete_sanity): Clarify warning, avoid failure on
8999         deleting void*.
9000
9001         * pt.c (check_explicit_specialization): Clarify error.
9002
9003         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
9004         an old OVERLOAD when we're declaring a non-function.
9005         (pushdecl, destroy_local_var): Check for error_mark_node.
9006         (warn_extern_redeclared_static): Also bail early if
9007         we're a CONST_DECL.
9008         (push_overloaded_decl): Ignore an old error_mark_node.
9009
9010 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
9011
9012         * call.c (build_x_va_arg): Check if in a template decl.
9013         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
9014
9015 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
9016
9017         * class.c (push_lang_context): TYPE_NAME gets you to the Java
9018         types DECLs.
9019         * decl.c (check_goto): Computed gotos assumed OK.
9020
9021 2000-06-20  Jason Merrill  <jason@redhat.com>
9022
9023         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
9024         for which we don't need to look for instantiations.
9025
9026 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
9027
9028         * parse.y (program): Always call finish_translation_unit.
9029         * parse.c, parse.h: Rebuilt.
9030
9031 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
9032
9033         * method.c: Don't include hard-reg-set.h.
9034
9035 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
9036
9037         * rtti.c (get_base_offset): Cope when vbase field is in a base.
9038
9039 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
9040
9041         * call.c (build_conditional_expr): Use VOID_TYPE_P.
9042         * cvt.c (cp_convert_to_pointer): Likewise.
9043         (convert_to_void): Likewise.
9044         * error.c (dump_expr): Likewise.
9045         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
9046         * init.c (build_delete): Likewise.
9047         * method.c (emit_thunk): Likewise.
9048         * optmize.c (declare_return_variable): Likewise.
9049         * rtti.c (get_tinfo_decl_dynamic): Likewise.
9050         (get_typeid): Likewise.
9051         (build_dynamic_cast_1): Likewise.
9052         * typeck.c (composite_pointer_type): Likewise.
9053         (common_type): Likewise.
9054         (build_indirect_ref): Likewise.
9055         (build_binary_op): Likewise.
9056         (build_x_compound_expr): Likewise.
9057         (check_return_expr): Likewise.
9058         * typeck2.c (add_exception_specifier): Likewise.
9059
9060         * mangle.c (write_method_parms): Use direct comparison for end
9061         of parmlist.
9062
9063 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
9064
9065         * cp-tree.h (genrtl_try_block): Declare function.
9066         (genrtl_handler): Likewise.
9067         (genrtl_catch_block): Likewise.
9068         (genrtl_ctor_stmt): Likewise.
9069         (genrtl_subobject): Likewise.
9070         (genrtl_decl_cleanup): Likewise.
9071         (genrtl_do_poplevel): Likewise.
9072         (genrtl_do_pushlevel): Likewise.
9073         (genrtl_clear_out_block): Likewise.
9074         (genrtl_goto_stmt): Likewise.
9075         (genrtl_expr_stmt): Likewise.
9076         (genrtl_decl_stmt): Likewise.
9077         (genrtl_if_stmt): Likewise.
9078         (genrtl_while_stmt): Likewise.
9079         (genrtl_do_stmt): Likewise.
9080         (genrtl_return_stmt): Likewise.
9081         (genrtl_for_stmt): Likewise.
9082         (genrtl_break_stmt): Likewise.
9083         (genrtl_continue_stmt): Likewise.
9084         (genrtl_scope_stmt): Likewise.
9085         (genrtl_switch_stmt): Likewise.
9086         (genrtl_case_label): Likewise.
9087         (genrtl_begin_compound_stmt): Likewise.
9088         (genrtl_finish_compound_stmt): Likewise.
9089         (genrtl_compound_stmt): Likewise.
9090         (genrtl_asm_stmt): Likewise.
9091         (genrtl_named_return_value): Likewise.
9092         (genrtl_begin_stmt_expr): Likewise.
9093         (genrtl_finish_stmt_expr): Likewise.
9094         (finish_for_stmt): Removed first argument.
9095         (finish_switch_stmt): Likewise.
9096
9097         * semantics.c (genrtl_try_block): Define function.
9098         (genrtl_handler): Likewise.
9099         (genrtl_catch_block): Likewise.
9100         (genrtl_ctor_stmt): Likewise.
9101         (genrtl_subobject): Likewise.
9102         (genrtl_decl_cleanup): Likewise.
9103         (genrtl_do_poplevel): Likewise.
9104         (genrtl_do_pushlevel): Likewise.
9105         (genrtl_clear_out_block): Likewise.
9106         (genrtl_goto_stmt): Likewise.
9107         (genrtl_expr_stmt): Likewise.
9108         (genrtl_decl_stmt): Likewise.
9109         (genrtl_if_stmt): Likewise.
9110         (genrtl_while_stmt): Likewise.
9111         (genrtl_do_stmt): Likewise.
9112         (genrtl_return_stmt): Likewise.
9113         (genrtl_for_stmt): Likewise.
9114         (genrtl_break_stmt): Likewise.
9115         (genrtl_continue_stmt): Likewise.
9116         (genrtl_scope_stmt): Likewise.
9117         (genrtl_switch_stmt): Likewise.
9118         (genrtl_case_label): Likewise.
9119         (genrtl_begin_compound_stmt): Likewise.
9120         (genrtl_finish_compound_stmt): Likewise.
9121         (genrtl_compound_stmt): Likewise.
9122         (genrtl_asm_stmt): Likewise.
9123         (genrtl_named_return_value): Likewise.
9124         (genrtl_begin_stmt_expr): Likewise.
9125         (genrtl_finish_stmt_expr): Likewise.
9126         (finish_for_stmt): Removed first argument and generate rtl
9127         specific code.
9128         (finish_switch_stmt): Likewise.
9129         (do_poplevel): Removed generate rtl specific code.
9130         (do_pushlevel): Likewise.
9131         (add_tree): Likewise.
9132         (finish_goto_stmt): Likewise.
9133         (finish_expr_stmt): Likewise.
9134         (begin_if_stmt): Likewise.
9135         (finish_if_stmt_cond): Likewise.
9136         (finish_then_clause): Likewise.
9137         (begin_else_clause): Likewise.
9138         (finish_else_clause): Likewise.
9139         (finish_if_stmt): Likewise.
9140         (clear_out_block): Likewise.
9141         (begin_while_stmt): Likewise.
9142         (finish_while_stmt_cond): Likewise.
9143         (finish_while_stmt): Likewise.
9144         (begin_do_stmt): Likewise.
9145         (finish_do_body): Likewise.
9146         (finish_do_stmt): Likewise.
9147         (finish_return_stmt): Likewise.
9148         (begin_for_stmt): Likewise.
9149         (finish_for_init_stmt): Likewise.
9150         (finish_for_cond): Likewise.
9151         (finish_for_expr): Likewise.
9152         (finish_break_stmt): Likewise.
9153         (finish_continue_stmt): Likewise.
9154         (begin_switch_stmt): Likewise.
9155         (finish_switch_cond): Likewise.
9156         (finish_case_label): Likewise.
9157         (begin_try_block): Likewise.
9158         (begin_function_try_block): Likewise.
9159         (finish_try_block): Likewise.
9160         (finish_cleanup_try_block): Likewise.
9161         (finish_cleanup): Likewise.
9162         (finish_function_try_block): Likewise.
9163         (finish_handler_sequence): Likewise.
9164         (finish_function_handler_sequence): Likewise.
9165         (begin_handler): Likewise.
9166         (finish_handler_parms): Likewise.
9167         (begin_catch_block): Likewise.
9168         (finish_handler): Likewise.
9169         (begin_compound_stmt): Likewise.
9170         (finish_compound_stmt): Likewise.
9171         (finish_asm_stmt): Likewise.
9172         (finish_label_stmt): Likewise.
9173         (finish_label_decl): Likewise.
9174         (finish_subobject): Likewise.
9175         (finish_decl_cleanup): Likewise.
9176         (finish_named_return_value): Likewise.
9177         (begin_stmt_expr): Likewise.
9178         (finish_stmt_expr): Likewise.
9179
9180         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
9181         to call genrtl_expr_stmt when appropriate.
9182
9183         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
9184         begin_compound_expr to call genrtl_begin_stmt_expr and
9185         genrtl_begin_compound_expr when appropriate.
9186         (finish_init_stmts): Changed calls to finish_compound_expr and
9187         finish_stmt_expr to call genrtl_finish_compound_expr and
9188         genrtl_finish_stmt_expr when appropriate.
9189         (expand_default_init): Changed call to finish_expr_stmt to call
9190         genrtl_expr_stmt when appropriate.
9191         (build_vec_init): Likewise.
9192
9193         * parse.y (simple_stmt): Removed first argument from call to
9194         finish_for_stmt. Removed first argument from call to
9195         finish_switch_stmt.
9196
9197         * parse.c: Regenerated.
9198
9199         * pt.c (tsubst_expr): Removed first argument from call to
9200         finish_for_stmt. Removed first argument from call to
9201         finish_switch_stmt.
9202
9203 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
9204
9205         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
9206         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
9207
9208         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
9209         (cplus_tree_code_length[]): Likewise.
9210         (cplus_tree_code_name[]): Likewise.
9211         (init_parse): Added call to add_c_tree_codes. Changed
9212         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
9213
9214 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
9215
9216         * cp-tree.h (finish_mem_initializers): Declare.
9217         (count_trees): Likewise.
9218         * parse.y (base_init): Use finish_mem_initializers.
9219         * semantics.c (finish_mem_initializers): New function.
9220
9221         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
9222         the number of trees.
9223         (n_trees): Remove.
9224         (count_trees): Don't use it.
9225
9226 2000-06-15  Jason Merrill  <jason@redhat.com>
9227
9228         * tree.c (count_trees): New debugging function.
9229
9230         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
9231         * init.c (build_member_call): Pull out the name of a DECL.
9232
9233         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
9234         * semantics.c (expand_body): Push to TV_INTEGRATION here.
9235         * optimize.c (optimize_function): Not here.
9236         * pt.c (instantiate_decl): Push to TV_PARSE.
9237
9238 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
9239
9240         * cp-tree.h (struct language_function): Remove x_base_init_list
9241         and x_member_init_list.
9242         (current_base_init_list): Remove.
9243         (current_member_init_list): Likewise.
9244         (setup_vtbl_ptr): Change prototype.
9245         (emit_base_init): Likewise.
9246         (expand_member_init): Likewise.
9247         (reinit_parse_for_function): Remove.
9248         * decl.c (save_function_data): Don't clear x_base_init_list and
9249         x_member_init_list.
9250         (mark_language_function): Don't mark them.
9251         * init.c (perform_member_init): Tweak comment.
9252         (sort_member_init): Take the list of initializers as an argument.
9253         (sort_base_init): Likewise.
9254         (emit_base_init): Likewise.
9255         (expand_member_init): Return the initializer.  Don't use global
9256         variables.
9257         * lex.c (reinit_parse_for_function): Remove.
9258         * method.c (build_template_parm_names): Correct substitution.
9259         (do_build_copy_constructor): Don't use current_member_init_list
9260         and current_base_init_list.
9261         (synthesize_method): Likewise.
9262         * parse.y (base_init): Split mem-initializers into
9263         base-initializers and field-initializers.
9264         (member_init_list): Build up the list here.
9265         (member_init): Return the initializer.
9266         (fn.depfn): Don't use reinit_parse_for_function.
9267         * parse.c: Regenerated.
9268         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
9269         ERROR_MARK.
9270         (tsubst_expr): Don't use current_member_init_list
9271         and current_base_init_list.
9272         (tsubst_expr_values): Rename to ...
9273         (tsubst_initializer_list): ... this.  Use convert_from_reference.
9274         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
9275         and current_base_init_list.
9276         (begin_function_definition): Don't call reinit_parse_for_function.
9277
9278         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
9279
9280         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
9281         correctly.
9282
9283         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
9284
9285 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
9286
9287         * cp-tree.h (IF_COND): Move to c-common.h.
9288         (THEN_CLAUSE): Likewise.
9289         (ELSE_CLAUSE): Likewise.
9290         (WHILE_COND): Likewise.
9291         (WHILE_BODY): Likewise.
9292         (DO_COND): Likewise.
9293         (DO_BODY): Likewise.
9294         (RETURN_EXPR): Likewise.
9295         (EXPR_STMT_EXPR): Likewise.
9296         (FOR_INIT_STMT): Likewise.
9297         (FOR_COND): Likewise.
9298         (FOR_EXPR): Likewise.
9299         (FOR_BODY): Likewise.
9300         (SWITCH_COND): Likewise.
9301         (SWITCH_BODY): Likewise.
9302         (CASE_LOW): Likewise.
9303         (CASE_HIGH): Likewise.
9304         (GOTO_DESTINATION): Likewise.
9305         (COMPOUND_BODY): Likewise.
9306         (ASM_CV_QUAL): Likewise.
9307         (ASM_STRING): Likewise.
9308         (ASM_OUTPUTS): Likewise.
9309         (ASM_INPUTS): Likewise.
9310         (ASM_CLOBBERS): Likewise.
9311         (DECL_STMT_DECL): Likewise.
9312         (STMT_EXPR_STMT): Likewise.
9313         (LABEL_STMT_LABEL): Likewise.
9314         (SCOPE_BEGIN_P): Likewise.
9315         (SCOPE_END_P): Likewise.
9316         (SCOPE_STMT_BLOCK): Likewise.
9317         (SCOPE_NULLIFIED_P): Likewise.
9318         (SCOPE_NO_CLEANUPS_P): Likewise.
9319         (SCOPE_PARTIAL_P): Likewise.
9320         (ASM_VOLATILE_P): Likewise.
9321         (STMT_LINENO): Likewise.
9322         (STMT_LINENO_FOR_FN_P): Likewise.
9323
9324         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
9325         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
9326         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
9327         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
9328         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
9329
9330         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
9331
9332         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
9333         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
9334
9335         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
9336         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
9337         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
9338
9339 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
9340
9341         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
9342         * class.c (dfs_find_final_overrider): Set it appropriately.
9343         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
9344         avoid unneeded secondary vptrs.
9345
9346 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
9347
9348         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
9349         (check_bitfield_decl, check_field_decl): Likewise.
9350         (build_vtbl_or_vbase_field, build_base_field): Likewise.
9351         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
9352         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
9353         (xfer_tag, finish_enum): Likewise.
9354         * decl2.c (finish_builtin_type): Likewise.
9355         * init.c (init_init_processing): Likewise.
9356         * pt.c (instantiate_class_template): Likewise.
9357         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
9358         * cp-tree.h (struct lang_type): Add user_align member.
9359         (CLASSTYPE_USER_ALIGN): Define.
9360
9361 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
9362
9363         * Make-lang.in (c++.install-common): Install g++-cross in
9364         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
9365         $(target_alias)-g++ and $(target_alias)-c++.
9366
9367 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
9368
9369         * class.c (vcall_offset_data_s): Add last_init and fns.
9370         (overrides): Rename to same_signature_p.
9371         (dfs_find_final_overrider): Adjust accordingly.
9372         (mark_overriders): Likewise.
9373         (warn_hidden): Likewise.
9374         (build_vtbl_initializer): Reorganize machinery for building things
9375         at negative offsets.
9376         (build_vcall_and_vbase_vtbl_entries): Likewise.
9377         (build_vbase_offset_vtbl_entries): Likewise.
9378         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
9379         offset entries.  Do not create two entries for functions with the
9380         same signature.
9381         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
9382         (build_rtti_vtbl_entries): Reorganize machinery for building things
9383         at negative offsets.
9384
9385         * optimize.c (expand_call_inline): Don't recurse into the code
9386         used to initialize the parameters more than once.
9387
9388 2000-06-11  Mark Mitchell <mark@codesourcery.com>
9389
9390         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
9391         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
9392         (find_substitution): Only use the `Sa' substitution for
9393         std::allocator, not instantiations of it.
9394         (write_template_prefix): Move comment.  Only use a TREE_LIST to
9395         represent substitutions for a member template.
9396         (write_array_type): Mangle array dimensions correctly.
9397         * optimize.c (maybe_clone_body): Copy more information from the
9398         cloned function.
9399         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
9400         on the regenerated declaration.
9401
9402 2000-06-11  Chip Salzenberg  <chip@valinux.com>
9403             Mark Mitchell <mark@codesourcery.com>
9404
9405         * class.c (build_vtable): Clarify comment.
9406         (build_ctor_vtbl_group): Pass the most derived type to
9407         build_vtable.
9408
9409 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
9410
9411         * decl2.c (compare_options): Don't needlessly cast away const-ness.
9412
9413 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
9414
9415         * decl.c (add_binding): Handle duplicate declarations of external
9416         variables.
9417
9418 2000-06-09  Chip Salzenberg  <chip@valinux.com>
9419             Mark Mitchell <mark@codesourcery.com>
9420
9421         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
9422         argument.
9423         (write_signed_number): New macro.
9424         (write_unsigned_number): Likewise.
9425         (write_source_name): Use them.
9426         (write_number): Handle signed and unsigned values.
9427         (write_integer_cst): Use tree_int_cst_sgn, and use
9428         write_unsigned_number or write_signed_number as appropriate.
9429         (write_discriminator): Use write_unsigned_number or
9430         write_signed_number as appropriate.
9431         (write_template_arg_literal): Likewise.
9432         (write_array_type): Use tree_low_cst.
9433         (write_template_parm):  Use write_unsigned_number or
9434         write_signed_number as appropriate.
9435         (write_substitution): Adjust call to write_number.
9436         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
9437         (write_expression): Handle non-type template arguments of
9438         reference type correctly.
9439         (mangle_thunk): Use write_signed_number.
9440
9441 2000-06-09  Chip Salzenberg  <chip@valinux.com>
9442
9443         * mangle.c (find_substition): Don't mangle objects with typename
9444         substitutions (e.g. "cin" as "Si").
9445
9446 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
9447
9448         * call.c (add_candidate): Use ggc_alloc_cleared.
9449         * decl.c (lookup_label): Likewise.
9450         * lex.c (retrofit_lang_decl): Likewise.
9451
9452 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
9453
9454         * semantics.c (expand_body): Push to TV_EXPAND.
9455         * optimize.c (optimize_function): Push to TV_INTEGRATION.
9456         * decl.c (start_function): Always call announce_function.
9457
9458         * tinfo2.cc: Just declare abort.
9459
9460 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
9461
9462         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
9463         whenever @ is a symbolic name.
9464
9465 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
9466
9467         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
9468
9469 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
9470
9471         * decl.c (pushdecl): Look up functions by DECL_NAME, not
9472         DECL_ASSEMBLER_NAME.
9473
9474 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
9475
9476         * decl2.c (c_language): Define.
9477
9478 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
9479
9480         * lex.c (lang_init_options): Tweak.
9481
9482         * decl2.c: Remove #inclusion of diagnostic.h
9483         (lang_decode_option): Move diagnostic formatting options to
9484         toplevel.
9485
9486         * lang-options.h: Remove documentation for diagnostic options.
9487
9488         * Makefile.in (lex.o): Depends upon diagnostic.h
9489
9490 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
9491
9492         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
9493         the same DECL_RESULT, it's not a redefinition.
9494         * pt.c (tsubst_decl): Remove code to handle illegal
9495         specializations.
9496
9497 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
9498
9499         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
9500
9501 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
9502
9503         * search.c (maybe_suppress_debug_info): Don't check
9504         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
9505
9506         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
9507         here if extern_p.
9508
9509         Remember instantiation context in deferred instantiations.
9510         * cp-tree.h (struct tinst_level): Remove.
9511         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
9512         * pt.c (current_tinst_level): Now a tree.
9513         (print_template_context, push_tinst_level, pop_tinst_level,
9514         tinst_for_decl): Adjust.
9515         (reopen_tinst_level): New fn.
9516         (init_pt): Register current_tinst_level as a root.
9517         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
9518         of the pending templates list.
9519         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
9520         * lex.c (extract_interface_info): Adjust.
9521         * decl2.c (warn_if_unknown_interface): Adjust.
9522
9523 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
9524
9525         * class.c (indirect_primary_base_p): New function.
9526         (determine_primary_base): Use it.
9527
9528 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
9529
9530         Update new-abi dynamic cast algorithm.
9531         * tinfo.cc (__class_type_info::__dyncast_result): Add
9532         whole_details. Adjust constructor.
9533         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
9534         Avoid unnecessary searching.
9535         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
9536
9537 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9538
9539         * decl.c (init_decl_processing): Don't call record_component_aliases.
9540         * tree.c (build_cplus_array_type_1): Likewise.
9541
9542 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
9543
9544         * ir.texi: Correct typo.
9545         * mangle.c (write_expression): Handle non-type template arguments
9546         with reference type.
9547         * method.c (build_overload_value): Likewise.
9548         * pt.c (convert_nontype_argument): Explicitly represent conversion
9549         to a reference with an ADDR_EXPR.
9550         (unify): Always unify arguments in left-to-right order.
9551
9552 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
9553             Mark Mitchell  <mark@codesourcery.com>
9554
9555         * Make-lang.in (CXX_SRCS): Add mangle.c.
9556         * Makefile.in (CXX_OBJS): Add mangle.o.
9557         (mangle.o): New rule.
9558
9559         * class.c (local_classes): New variable.
9560         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
9561         (get_vtt_name): Use mangle_vtt_name for new ABI.
9562         (init_class_processing): Initialize local_classes.
9563         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
9564         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
9565         (std_identifier): New macro.
9566         (DECL_VOLATILE_MEMFUNC_P): New macro.
9567         (DECL_NAMESPACE_STD_P): Likewise.
9568         (local_classes): Declare.
9569         (get_mostly_instantiated_function_type): Declare.
9570         (init_mangle): Declare.
9571         (mangle_decl): Likewise.
9572         (mangle_type_string): Likewise.
9573         (mangle_type): Likewise.
9574         (mangle_typeinfo_for_type): Likewise.
9575         (mangle_typeinfo_string_for_type): Likewise.
9576         (mangle_vtbl_for_type): Likewise.
9577         (mangle_vtt_for_type): Likewise.
9578         (mangle_ctor_vtbl_for_type): Likewise.
9579         (mangle_thunk): Likewise.
9580         (mangle_conv_op_name_for_type): Likewise.
9581         (mangle_guard_variable): Likewise.
9582         * decl.c (pushtag): Keep track of local classes.
9583         (initialize_predefined_identifiers): Initialize std_identifier.
9584         (init_decl_processing): Use std_identifier.
9585         (start_decl): Don't treat instantiations as specializations.
9586         (grokdeclarator): Likewise.
9587         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
9588         name for fully-instantiated templates.
9589         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
9590         destructors with the new ABI.
9591         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
9592         (grokfield): Use mangle_type for new ABI.
9593         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
9594         (get_sentry): Use mangle_guard_variable for new ABI.
9595         (start_static_initialization_or_destruction): Likewise.
9596         * expr.c (extract_aggr_init): Remove.
9597         (extract_scalar_init): Likewise.
9598         (extract_init): Remove #if 0'd code.
9599         * mangle.c: New function.
9600         * method.c (build_mangled_name): Assert not flag_new_abi.
9601         (build_static_name): Likewise.
9602         (build_decl_overload_real): Likewise.
9603         (build_typename_overload): Likewise.
9604         (build_overload_with_type): Likewise.
9605         (build_overload_name): Likewise.
9606         (get_ctor_vtbl_name): Likewise.
9607         (start_squangling): Likewise.
9608         (get_id_2): Likewise.
9609         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
9610         (init_method): Call init_mangle for new ABI.
9611         (make_thunk): Call mangle_thunk for new ABI.
9612         * operators.def: Correct new ABI manglings for the `%' operator.
9613         Add `::' operator.
9614         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
9615         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
9616         (lookup_template_class): Call mangle_decl for new ABI.
9617         (get_mostly_instantiated_function_type): New function.
9618         (set_mangled_name_for_template_decl): Use it.
9619         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
9620         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
9621         conversion op names.
9622         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
9623         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
9624         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
9625         mangle_typeinfo_string_for_type.
9626
9627 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
9628
9629         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
9630         (INNERMOST_TEMPLATE_ARGS): New macro.
9631         (innermost_args): Remove.
9632         (get_innermost_template_args): New function.
9633         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
9634         * error.c (dump_function_decl): Be caution when using
9635         most_general_template.
9636         * method.c (build_template_parm_names):  Use
9637         INNERMOST_TEMPLATE_ARGS.
9638         * pt.c (add_to_template_args): Tidy comment
9639         (get_innermost_template_args): New function.
9640         (check_explicit_specialization): Clear DECL_INITIAL for a new
9641         specialization.
9642         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
9643         Tidy.
9644         (push_template_decl): Always register specializations of the most
9645         general template.
9646         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
9647         (coerce_template_parms): Likewise.
9648         (lookup_template_class): Likewise.
9649         (innermost_args): Remove.
9650         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
9651         (tsubst_decl): Handle tricky specializations.  Use
9652         get_innermost_template_args.
9653         (instantiate_template): Simplify handling of partial
9654         instantiations.
9655         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
9656         (most_general_template): Reimplement, in a more straightforward
9657         manner.
9658         (regenerate_decl_from_template): Tweak formatting.  Use
9659         TMPL_ARGS_DEPTH for clarity.
9660         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
9661
9662         * dump.c (dequeue_and_dump): Dump information about thunks.
9663
9664 2000-06-01  Richard Henderson  <rth@cygnus.com>
9665
9666         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
9667
9668 2000-06-01  Richard Henderson  <rth@cygnus.com>
9669
9670         * decl2.c (unsupported_options): Fix typo, make const.
9671         (lang_decode_option): Fix bsearch argument order.
9672
9673 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
9674
9675         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
9676         on FIELD_DECLs.
9677
9678 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9679
9680         * cp-tree.h (c_get_alias_set): Deleted.
9681         * Makefile.in (decl.o): Include ../expr.h.
9682         * decl.c (expr.h): Include.
9683         (init_decl_processing): Call record_component_aliases for arrays.
9684         (grokdeclarator): Likewise.
9685         Set TREE_ADDRESSABLE for fields that aren't bitfields.
9686         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
9687
9688 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
9689
9690         Remove guiding declaration support.
9691         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
9692         (flag_guiding_decls): Remove.
9693         * call.c (build_user_type_conversion_1): Remove support for
9694         guiding decls.
9695         (build_new_function_call): Likewise.
9696         (build_new_op): Likewise.
9697         (build_new_method_call): Likewise.
9698         * decl.c (start_function): Likewise.
9699         * friend.c (is_friend): Likewise.
9700         (do_friend): Likewise.
9701         * decl2.c ((flag_dump_translation_unit): Make it const.
9702         (flag_guiding_decls): Remove.
9703         (unsupported_options): New variable
9704         (compare_options): New function.
9705         (lang_decode_option): Use them.
9706
9707         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
9708
9709         * method.c (mangle_expression): Adjust test for legal expression
9710         operators.
9711
9712         * pt.c (instantiate_decl): Save and restore the local
9713         specializations list.
9714
9715 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
9716
9717         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
9718
9719 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
9720
9721         * call.c (add_template_candidate_real): Handle member template
9722         constructors for classes with virtual bases.
9723         (build_user_type_conversion_1): Use in_charge_arg_for_name.
9724         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
9725
9726         * ir.texi: Update thunk documentation.
9727
9728         * call.c (joust): Fix handling of overloaded builtin operators.
9729
9730 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
9731
9732         * cp-tree.h (DECL_ANTICIPATED): New macro.
9733         Document new use of DECL_LANG_FLAG_7.
9734         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
9735         in the user namespace.
9736         * lex.c (do_identifier): If the identifier's declaration has
9737         DECL_ANTICIPATED on, it has not yet been declared.  But do not
9738         replace it with an ordinary implicit declaration.
9739
9740         * tinfo2.cc: Include stdlib.h.
9741
9742 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
9743
9744         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
9745         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
9746         CLASSTYPE_ALIGN.
9747
9748 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
9749
9750         * decl2.c (lang_decode_option): Use skip_leading_substring instead
9751         of plain strncmp.
9752
9753 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
9754
9755         * operators.def (<?): Duplicated, should have been...
9756         (>?): this.  Fixed.
9757
9758 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
9759             Mark Mitchell  <mark@codesourcery.com>
9760
9761         * cp-tree.h (ansi_opname): Make it a macro.
9762         (ansi_assopname): Likewise.
9763         (struct lang_decl_flags): Add assignment_operator_p.
9764         (struct lang_decl): Add operator_code.
9765         (DECL_VTT_PARM): Adjust.
9766         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
9767         overloaded operator.
9768         (SET_OVERLOADED_OPERATOR_CODE): New macro.
9769         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
9770         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
9771         (opname_tab): Remove.
9772         (assignop_tab): Likewise.
9773         (operator_name_info_t): New type.
9774         (operator_name_info): New variable.
9775         (assignment_operator_name_info): Likewise.
9776         (build_cp_library_fn): Remove declaration.
9777         (push_cp_library_fn): Likewise.
9778         (operator_name_string): Likewise.
9779         (build_decl_overload): Likewise.
9780         * call.c (print_z_candidates): Simplify.
9781         (build_object_call): Adjust usage of ansi_opname.  Use
9782         DECL_OVERLOADED_OPERATOR_P.
9783         (op_error): Adjust operator name lookup.
9784         (build_conditional_expr): Adjust usage of ansi_opname.
9785         (build_new_op): Likewise.
9786         (build_op_delete_call): Likewise.
9787         (build_over_call): Likewise.
9788         (joust): Use DECL_OVERLOADED_OPERATOR_P.
9789         * decl.c (duplicate_decls): Copy operator_code.
9790         (init_decl_processing): Adjust parameters to push_cp_library_fn.
9791         (builtin_function): Adjust parameters to build_library_fn_1.
9792         (build_library_fn_1): Accept an overloaded operator code.
9793         (build_library_fn): Pass ERROR_MARK.
9794         (build_cp_library_fn): Accept an overloaded operator code.
9795         (push_cp_library_fn): Likewise.
9796         (grokfndecl): Tweak.
9797         (grokdeclarator): Simplify code to compute names of overloaded
9798         operators.  Adjust use of ansi_opname.
9799         (ambi_op_p): Work on tree_codes, not identifiers.
9800         (unary_op_p): Likewise.
9801         (grok_op_properties): Likewise.
9802         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
9803         (lang_mark_tree): Don't try to mark the operator_code.
9804         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
9805         * error.c (dump_decl): Remove special handling for operator
9806         names.
9807         (dump_function_name): Likewise.
9808         (dump_expr): Adjust name lookup of operators.
9809         (op_to_string): Simplify.
9810         (assop_to_string): Likewise.
9811         * init.c (build_new_1): Adjust use of ansi_opname.
9812         * lex.c (opname_tab): Remove.
9813         (assignop_tab): Likewise.
9814         (ansi_opname): Likewise.
9815         (ansi_assopname): Likewise.
9816         (operator_name_string): Likewise.
9817         (reinit_lang_specific): Likewise.
9818         (operator_name_info): New variable.
9819         (assignment_operator_name_info): Likewise.
9820         (init_operators): New function.
9821         (init_parse): Use it.
9822         (do_identifier): Adjust use of ansi_opname.
9823         * method.c (mangle_expression): Don't use ansi_opname for
9824         mangling.
9825         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
9826         (build_decl_overload): Remove.
9827         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
9828         (do_build_assign_ref): Adjust use of ansi_opname.
9829         (synthesize_method): Likewise.
9830         (implicitly_declare_fn): Likewise.
9831         * operators.def: New file.
9832         * parse.y (operator): Adjust use of ansi_opname.
9833         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
9834         (set_mangled_name_for_template_decl): Don't play games with
9835         current_namespace.
9836         (special_function_p): Adjust use of ansi_opname.
9837         * typeck.c (check_return_expr): Likewise.
9838         * Make-lang.in (cc1plus): Depend on operators.def.
9839         * Makefile.in (lex.o): Likewise.
9840         (decl.o): Likewise.
9841
9842 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
9843
9844         * Make-lang.in (cplib2.ready): Eradicate.
9845
9846 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
9847
9848         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
9849         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
9850         (built_min, cp_tree_equal): Likewise.
9851
9852 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
9853
9854         * class.c (layout_nonempty_base_or_field): Replace
9855         `record_layout_info' with `record_layout_info_s'.
9856
9857 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
9858
9859         Fix goto checking.
9860         * cp-tree.h (struct language_function): x_named_labels is now
9861         a struct named_label_list*.
9862         * decl.c (struct named_label_use_list): Renamed from...
9863         (struct named_label_list): ...this.  New struct.
9864         (push_binding_level): Don't set eh_region.
9865         (note_level_for_eh): New fn.
9866         (pop_label): Take label and old value directly.
9867         (pop_labels): Adjust for new named_labels format.
9868         (lookup_label): Likewise.
9869         (poplevel): Note characteristics of a binding level containing a
9870         named label.  Mess with named label lists earlier.
9871         (mark_named_label_lists): New fn.
9872         (mark_lang_function): Call it.
9873         (use_label): New fn, split out from...
9874         (make_label_decl): ...here.  Don't call it.
9875         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
9876         check_previous_gotos): New fns, split out from...
9877         (define_label): ...here.
9878         (check_switch_goto): New fn.
9879         (define_case_label): Call it.
9880         (check_goto): New fn.
9881         * semantics.c (finish_goto_stmt): Call it and use_label.
9882         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
9883         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
9884
9885 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
9886
9887         * class.c (build_vtable_entry_ref): Correct usage of
9888         get_vtbl_decl_for_binfo.
9889
9890         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
9891         * method.c (implicitly_declare_fn): Not here.
9892
9893 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
9894
9895         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
9896         (CPTI_PTMD_DESC_TYPE): ... here.
9897         (ptmd_desc_type_node): Rename to ...
9898         (ptm_desc_type_node): ... here.
9899         * decl.c: Likewise.
9900         * rtti.c (ptmd_initializer): Rename to ...
9901         (ptm_initializer): ... here.
9902         (sythesize_tinfo_var): Adjust. Deal with pointer to member
9903         function.
9904         (create_tinfo_types): Adjust.
9905
9906 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
9907
9908         Finish implementation of VTTs.
9909         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
9910         CPTI_VTT_PARM_IDENTIFIER.
9911         (vtt_parm_identifier): New macro.
9912         (vtt_parm_type): Likewise.
9913         (BINFO_SUBVTT_INDEX): Likewise.
9914         (BINFO_VPTR_INDEX): Likewise.
9915         (struct lang_decl): Add vtt_parm.
9916         (DECL_VTT_PARM): New macro.
9917         (DECL_USE_VTT_PARM): Likewise.
9918         (DECL_NEEDS_VTT_PARM_P): Likewise.
9919         (get_vtt_name): Declare.
9920         (build_artificial_parm): Likewise.
9921         (fixup_all_virtual_upcast_offsets): Likewise.
9922         (expand_indirect_vtbls_init): Remove.
9923         * call.c (build_new_method_call): Pass the vtt to subobject
9924         constructors and destructors.
9925         * class.c (get_vtt_name): Give it external linkage.
9926         (build_clone): Handle the magic VTT parameters for clones.
9927         (clone_function_decl): Fix typo in comment.
9928         (build_vtt): Keep track of the indices in the VTTs where various
9929         entities are stored.
9930         (build_vtt_inits): Likewise.
9931         (dfs_build_vtt_inits): Likewise.
9932         (build_ctor_vtbl_group): Tweak type of construction vtables.
9933         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
9934         primary bases, when building construction vtables.
9935         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
9936         (initialize_predefined_identifiers): Add vtt_parm_identifier.
9937         (init_decl_processing): Initialize vtt_parm_type.
9938         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
9939         (lang_mark_tree): Make vtt_parm.
9940         * decl2.c (build_artificial_parm): New function.
9941         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
9942         (grokclassfn): Use build_artificial_parm.
9943         * init.c (initialize_vtbl_ptrs): Call
9944         fixup_all_virtual_upcast_offsets directly.
9945         (perform_member_init): Use the complete subobject destructor for
9946         member cleanups.
9947         (build_vtbl_address): New function.
9948         (expand_virtual_init): Handle VTTs.
9949         * optimize (maybe_clone_body): Likewise.
9950         * search.c (fixup_all_virtual_upcast_offsets): Give it external
9951         linkage.
9952         (expand_indirect_vtbls_init): Remove.
9953         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
9954         * tree.c (make_binfo): Make them bigger.
9955
9956 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
9957
9958         * inc/cxxabi.h (__pbase_type_info): Define, based on
9959         __pointer_type_info.
9960         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
9961         (__pointer_to_member_type_info): Likewise.
9962         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
9963         (__pointer_to_member_type_info::__is_pointer_p): Remove.
9964         (__pointer_type_info::__do_catch): Rename to ...
9965         (__pbase_type_info::__do_catch): ... here. Adjust.
9966         (__pbase_type_info::__pointer_catch): Implement.
9967         (__pointer_type_info::__pointer_catch): Adjust.
9968         (__pointer_to_member_type_info::__pointer_catch): Adjust.
9969
9970 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
9971
9972         * tinfo.h (__user_type_info::contained_virtual_p): New
9973         predicate.
9974         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
9975         shaped hierarchy.
9976         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
9977         diamond shaped hierarchy. Add early out for mixed diamond and
9978         duplicate shaped hierarchy.
9979
9980 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
9981
9982         * cp-tree.h (build_delete): Change prototype.
9983         (build_vec_delete): Likewise.
9984         * call.c (build_scoped_method_call): Use special_function_kind
9985         values to indicate the kind of destruction to be done.
9986         (build_method_call): Likewise.
9987         * decl.c (finish_destructor_body): Likewise.
9988         (maybe_build_cleanup_1): Likewise.  Rename to ...
9989         (maybe_build_cleanup): ... this.
9990         * decl2.c (delete_sanity): Use special_function_kind
9991         values to indicate the kind of destruction to be done.
9992         (build_cleanup): Likewise.
9993         * init.c (perform_member_init): Likewise.
9994         (build_vec_delete_1): Likewise.
9995         (build_dtor_call): Simplify.
9996         (build_delete): Use special_function_kind
9997         values to indicate the kind of destruction to be done.
9998         (build_vbase_delete): Likewise.
9999         (build_vec_delete): Likewise.
10000
10001         * init.c (sort_member_init): Fix typo in error message generation
10002         code.
10003
10004 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
10005
10006         * semantics.c (begin_class_definition): make the packed
10007         attribute be sensitive to the "-fpack-struct" command line flag
10008
10009 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
10010
10011         Update new-abi upcast algorithm.
10012         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
10013         prototype and meaning of return value.
10014         (__si_class_type_info::__do_upcast): Likewise.
10015         (__vmi_class_type_info::__do_upcast): Likewise.
10016         * tinfo.cc (__class_type_info::__upcast_result): Replace
10017         whole2dst with part2dst. Adjust ctor.
10018         (__class_type_info::__do_upcast): Adjust call of worker function.
10019         (__class_type_info::__do_upcast): Adjust.
10020         (__si_class_type_info::__do_upcast): Adjust. Use parent's
10021         __do_upcast.
10022         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
10023         virtual base in diamond hierarchy bug.
10024
10025 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
10026
10027         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
10028         and bitfield to tinfo_fn_p.
10029         (DECL_TINFO_FN_P): Adjust.
10030         (SET_DECL_TINFO_FN_P): Likewise.
10031         (DECL_MUTABLE_P): Likewise.
10032         (DECL_C_BIT_FIELD): Likewise.
10033         (SET_DECL_C_BIT_FIELD): Likewise.
10034         (CLEAR_DECL_C_BIT_FIELD): Likewise.
10035         (DECL_UNINLINABLE): Likewise.
10036         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
10037         (handle_using_decl): Remove assertion.
10038         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
10039         to build FIELD_DECLs.
10040         (build_base_field): Likewise.
10041         (layout_class_type): Likewise.
10042         * decl.c (init_decl_processing): Likewise.
10043         (build_ptrmemfunc_type): Likewise.
10044         (grokdeclarator): Likewise.
10045         * decl2.c (grok_x_components): Likewise.
10046         * except.c (call_eh_info): Likewise.
10047         * init.c (init_init_processing): Likewise.
10048         * rtti.c (expand_class_desc): Likewise.
10049         (create_pseudo_type_info): Likewise.
10050         (get_vmi_pseudo_type_info): Likewise.
10051         (create_tinfo_types): Likewise.
10052         * ptree.c (print_lang_decl): Adjust.
10053         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
10054         before checking DECL_MUTABLE_P.
10055
10056         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
10057         parameters for template functions.
10058         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
10059         destructors as well as constructors.
10060
10061 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
10062
10063         * class.c (build_ctor_vtbl_group): Set inits.
10064         * optimize.c (maybe_clone_body): Set DECL_INLINE and
10065         DECL_THIS_INLINE appropriately for clones.
10066
10067         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
10068         (DECL_CONV_FN_P): Simplify.
10069         (DECL_OPERATOR): Remove.
10070         (language_to_string): Declare.
10071         * decl.c (duplicate_decls): Fix typo in comment.
10072         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
10073         (grok_op_properties): Use DECL_CONV_FN_P instead of
10074         IDENTIFIER_TYPENAME_P.
10075         * dump.c (dequeue_and_dump): Dump the language linkage of
10076         declarations.
10077         * error.c (language_to_string): Give it external linkage.
10078         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
10079         (implicitly_declare_fn): Set DECL_LANGUAGE.
10080         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
10081         IDENTIFIER_TYPENAME_P.
10082         (tsubst_decl): Likewise.
10083         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
10084         * semantics.c (finish_member_declaration): Don't mark members of
10085         classes declared in an extern "C" region as extern "C".
10086
10087 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10088
10089         * decl2.c (qualified_lookup_using_namespace): Look through
10090         namespace aliases.
10091
10092         * decl.c (push_using_decl): Return the old decl on namespace level.
10093
10094 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
10095
10096         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
10097         (VTT_NAME_PREFIX): New macro.
10098         (CTOR_VTBL_NAME_PREFIX): Likewise.
10099         (get_ctor_vtbl_name): New function.
10100         * class.c (get_vtable_name): Simplify.
10101         (get_vtt_name): New function.
10102         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
10103         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
10104         when a virtual base becomes primary.
10105         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
10106         VTTs.
10107         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
10108         additional parameters.
10109         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
10110         (initialize_array): New function.
10111         (build_vtt): Likewise.
10112         (build_vtt_inits): Likewise.
10113         (dfs_build_vtt_inits): Likewise.
10114         (dfs_fixup_binfo_vtbls): Likewise.
10115         (build_ctor_vtbl_group): Likewise.
10116         (initialize_vtable): Use initialize_array.
10117         (accumulate_vtbl_inits): Reimplement to handle construction
10118         vtables.
10119         (dfs_accumulate_vtbl_inits): Likewise.
10120         (bulid_vtbl_initializer): Adjust parameter name.
10121         * method.c (build_typename_overload): Remove #if 0'd code.
10122         (get_ctor_vtbl_name): New function.
10123         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
10124         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
10125
10126         * cp-tree.h (struct lang_type): Remove search_slot.
10127         (CLASSTYPE_SEARCH_SLOT): Remove.
10128         (emit_base_init): Change prototype.
10129         (initialize_vtbl_ptrs): Likewise.
10130         (expand_indirect_vtbls_init): Likewise.
10131         (clear_search_slots): Remove.
10132         * decl.c (lang_mark_tree): Don't mark search_slot.
10133         * init.c (initialize_vtbl_ptrs): Simplify.
10134         (emit_base_init): Likewise.
10135         * search.c (struct vbase_info): Document decl_ptr.
10136         (convert_pointer_to_single_level): Remove.
10137         (dfs_find_vbases): Remove.
10138         (dfs_init_base_pointers): Simplify.
10139         (dfs_clear_vbase_slots): Remove.
10140         (dfs_vtable_path_unmark): New function.
10141         (init_vbase_pointers): Simplify.
10142         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
10143         (expand_indirect_vtbls_init): Simplify.  Don't call
10144         mark_all_temps_used.
10145         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
10146         initialize_vtbl_ptrs.
10147
10148 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
10149
10150         * except.c: Add static prototypes.
10151
10152 2000-05-20  H.J. Lu  <hjl@gnu.org>
10153
10154         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
10155
10156 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
10157
10158         Don't create a separate copy of virtual bases for the
10159         CLASSTYPE_VBASECLASSES list.
10160         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
10161         (BINFO_FOR_VBASE): Remove.
10162         (CANONICAL_BINFO): Adjust.
10163         (binfo_for_vbase): New function.
10164         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
10165         instead of BINFO_FOR_VBASE.
10166         (build_vbase_pointer): Likewise.
10167         (build_secondary_vtable): Likewise.
10168         (dfs_mark_primary_bases): Likewise.
10169         (mark_primary_bases): Likewise.
10170         (layout_nonempty_base_or_field): Likewise.
10171         (dfs_set_offset_for_shared_vbases): Likewise.
10172         (dfs_set_offset_for_unshared_vbases): Likewise.
10173         (layout_virtual_bases): Likewise.  Adjust for changes to the
10174         CLASSTYPE_VBASECLASSES list.
10175         (dump_class_hierarchy_r): Use binfo_for_vbase
10176         instead of BINFO_FOR_VBASE.
10177         (dump_class_hierarchy): Likewise.
10178         (finish_vtbls): Likewise.
10179         (build_vtbl_initializer): Adjust for changes to the
10180         CLASSTYPE_VBASECLASSES list.
10181         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
10182         * decl.c (finish_destructor_body): Adjust for changes to the
10183         CLASSTYPE_VBASECLASSES list.
10184         * init.c (sort_base_init): Use binfo_for_vbase.
10185         (construct_virtual_bases): Adjust for changes to the
10186         CLASSTYPE_VBASECLASSES list.
10187         (expand_member_init): Use binfo_for_vbase.
10188         (build_vbase_delete):  Adjust for changes to the
10189         CLASSTYPE_VBASECLASSES list.
10190         * method.c (do_build_copy_constructor): Likewise.
10191         * rtti.c (get_base_offset): Use binfo_for_vbase.
10192         (expand_class_desc): Remove #if 0'd code.
10193         * search.c (struct vbase_info): Remove vbase_types.
10194         (get_base_distance):  Use binfo_for_vbase.
10195         (lookup_field_queue_p): Use CANONICAL_BINFO.
10196         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
10197         (get_pure_virtuals): Adjust for changes to the
10198         CLASSTYPE_VBASECLASSES list.
10199         (dfs_find_vbases): Use binfo_for_vbase.
10200         (dfs_init_vbase_pointers): Likewise.
10201         (init_vbase_pointers): Don't initialize vi.vbase_types.
10202         (virtual_context): Use binfo_for_vbase.
10203         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
10204         CLASSTYPE_VBASECLASSES list.
10205         (expand_indirect_vtbls_init): Simplify.
10206         (dfs_get_vbase_types): Don't replicate virtual bases.
10207         (find_vbase_instance): Use binfo_for_vbase.
10208         (binfo_for_vbase): New function.
10209         * typeck.c (get_delta_difference): Use binfo_for_vbase.
10210
10211 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
10212
10213         * decl2.c (finish_anon_union): Generalize error messages to handle
10214         anonymous structures.
10215         * init.c (perform_member_init): Remove `name' parameter.
10216         (build_field_list): New function.
10217         (sort_member_init): Handle anonymous union initialization order
10218         correctly.  Check for multiple initializations of the same union.
10219         (emit_base_init): Don't look up fields by name here.
10220         (expand_member_init): Record the result of name lookup for future
10221         reference.
10222         * typeck.c (build_component_ref): Fix formatting.
10223
10224 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
10225
10226         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
10227         * typeck.c (build_x_compound_expr): Replace warn_unused with
10228         warn_unused_value.
10229
10230         * decl2.c (lang_decode_option): Update -Wall unused flags by
10231         calling set_Wunused.
10232
10233 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
10234
10235         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
10236         * init.c (dfs_vtable_path_unmark): Remove.
10237         * search.c (marked_new_vtable_p): Likewise.
10238         (unmarked_new_vtable_p): Likewise.
10239         (dfs_search_slot_nonempty_p): Likewise.
10240         (dfs_mark): Likewise.
10241         (dfs_vtable_path_unmark): Likewise.
10242         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
10243         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
10244         (dfs_init_vbase_pointers): Remove special-case new ABI code.
10245         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
10246         (init_vbase_pointers): Simplify.
10247         (expand_indirect_vtbls_init): Likewise.
10248
10249         * class.c (copy_virtuals): New function.
10250         (build_primary_table): Use it.
10251         (build_secondary_vtable): Likewise.
10252         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
10253         indicate that no vcall offset is required.
10254         (add_virtual_function): Likewise.
10255         (modify_all_vtables): Likewise.
10256         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
10257         (dfs_accumulate_vtbl_inits): Likewise.
10258         (build_vtbl_initializer): Make changes to handle construction
10259         vtables.
10260         (dfs_build_vcall_offset_vtbl_entries): Likewise.
10261         (build_rtti_vtbl_entries): Likewise.
10262         (build_vtable_entries): Handle a NULL vcall_index.
10263
10264 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
10265
10266         * decl2.c (lang_decode_option): Fix thinko.
10267
10268 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
10269
10270         * except.c (check_handlers): New fn.
10271         * cp-tree.h: Declare it.
10272         * semantics.c (finish_handler_sequence): Call it.
10273         (finish_function_handler_sequence): Likewise.
10274         (finish_handler_parms): Set TREE_TYPE on the handler.
10275         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
10276         * search.c (get_base_distance_recursive): If protect>1, ignore
10277         special access.
10278         (get_base_distance): Don't reduce watch_access.
10279
10280 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
10281
10282         * lex.c: #include diagnostic.h.
10283         (lang_init_options): Set default prefixing rules.
10284
10285         * lang-options.h: Add -fdiagnostics-show-location=.
10286
10287         * decl2.c: #include diagnostic.h.
10288         (lang_decode_option): Handle -fdiagnostics-show-location=.
10289
10290 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
10291
10292         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
10293         * vec.cc: Revert my 2000-05-07 change.
10294
10295 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
10296
10297         * class.c (check_field_decls): Complain about non-static data
10298         members with same name as class in class with constructor.
10299
10300 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
10301
10302         * decl.c (grokdeclarator): Allow non-static data members with
10303         same name as class.
10304
10305 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
10306
10307         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
10308         and pending_inline.filename.  Update prototypes.
10309         * decl.c (define_label): Constify filename parameter.
10310         * decl2.c (warn_if_unknown_interface): Constify local char *.
10311         * input.c Constify input_source.filename. Don't declare
10312         input_filename or lineno.  Constify filename parameter to feed_input.
10313         * lex.c (init_parse): Constify parameter and return value.
10314         (cp_pragma_interface, cp_pragma_implementation): Constify
10315         filename argument.
10316         (reinit_parse_for_method, reinit_parse_for_block,
10317         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
10318         Constify local char *.
10319         * pt.c: Don't declare lineno or input_filename.
10320         (print_template_context, tsubst_friend_function, tsubst_decl,
10321         tsubst, instantiate_decl): Constify local char *.
10322         * semantics.c (expand_body): Constify local char *.
10323         * tree.c (build_srcloc): Constify filename parameter.
10324         * typeck.c (c_expand_asm_operands): Constify filename
10325         parameter.
10326
10327 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
10328
10329         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
10330         offsetof expansion.
10331
10332 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
10333
10334         * inc/cxxabi.h:  Fix typos in comment.
10335         (__base_class_info::__offset): Use a static_cast.
10336
10337 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
10338
10339         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
10340         of std::size_t and std::ptrdiff_t respectively.
10341         * tinfo.cc: Likewise.
10342         * vec.cc: Likewise.
10343
10344 2000-05-06  Richard Henderson  <rth@cygnus.com>
10345
10346         * typeck.c (build_c_cast): Don't warn integer->pointer size
10347         mismatch for constants.
10348
10349 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
10350
10351         * rtti.c (ptmd_initializer): Set non-public, if class is
10352         incomplete.
10353
10354         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
10355         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
10356         __cxa_vec_delete): Likewise.
10357         * tinfo.cc (__dynamic_cast): Likewise.
10358         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
10359         __cxa_vec_delete): Likewise.
10360
10361 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
10362
10363         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
10364         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
10365         (lang_decl_flags): Add vcall_offset.
10366         (THUNK_VCALL_OFFSET): Use it.
10367         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
10368         * method.c (make_thunk): Create the lang_decl here, not in
10369         emit_thunk.
10370         (emit_thunk): Make generic thunks into ordinary functions once
10371         they have been fed to expand_body.
10372         * semantics.c (expand_body): Set current_function_is_thunk here.
10373
10374 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
10375
10376         * class.c (update_vtable_entry_for_fn): Prototype.
10377
10378         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
10379         and `tmpl'.
10380
10381         * search.c (dfs_build_inheritance_graph_order): Prototype.
10382
10383 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
10384
10385         * cp-tree.h (special_function_kind): Add various kinds of
10386         destructors.
10387         (special_function_p): New function.
10388         * class.c (overrides): Don't let one kind of destructor override
10389         another.
10390         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
10391         whether or not to instantiate a template.
10392         * tree.c (special_function_p): Define.
10393
10394 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
10395
10396         * cp-tree.def (THUNK_DECL): Remove.
10397         * cp-tree.h (DECL_THUNK_P): New macro.
10398         (DECL_NON_THUNK_FUNCTION_P): Likewise.
10399         (DECL_EXTERN_C_FUNCTION_P): Likewise.
10400         (SET_DECL_THUNK_P): Likewise.
10401         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
10402         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
10403         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
10404         * decl.c (decls_match): Use DECL_EXTERN_C_P.
10405         (duplicate_decls): Likewise.
10406         (pushdecl): Likewise.  Adjust thunk handling.
10407         (grokfndecl): Use DECL_EXTERN_C_P.
10408         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
10409         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
10410         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
10411         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
10412         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
10413         DECL_NO_STATIC_CHAIN.
10414         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
10415         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
10416         * search.c (covariant_return_p): Remove THUNK_DECL handling.
10417         * ir.texi: Update.
10418
10419 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
10420
10421         * tree.c (walk_tree): Set lineno.
10422
10423 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
10424
10425         * exception.cc: Update license notice.
10426         * new.cc: Likewise.
10427         * new1.cc: Likewise.
10428         * new2.cc: Likewise.
10429         * tinfo.cc: Likewise.
10430         * tinfo2.cc: Likewise.
10431         * vec.cc: Likewise.
10432         * inc/cxxabi.h: Likewise.
10433         * inc/exception: Likewise.
10434         * inc/new: Likewise.
10435         * inc/new.h: Likewise.
10436         * inc/typeinfo: Likewise.
10437
10438 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
10439
10440         * tree.c (build_target_expr_with_type): If we already have a
10441         TARGET_EXPR, just return it.
10442
10443         * optimize.c (initialize_inlined_parameters): Don't generate an
10444         EXPR_STMT if we can just use DECL_INITIAL.
10445         * decl.c (emit_local_var): Only make the initialization a
10446         full-expression if stmts_are_full_exprs_p.
10447
10448 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
10449
10450         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
10451         macro.
10452         * call.c (standard_conversion): Use it.
10453         (direct_reference_binding): Likewise.
10454         (build_over_call): Likewise.
10455         (is_properly_derived_from): Likewise.
10456         (compare_ics): Likewise.
10457         * class.c (resolves_to_fixed_type_p): Likewise.
10458         * optimize.c (declare_return_variable): Likewise.
10459         * pt.c (is_specialization_of): Likewise.
10460         (unify): Likewise.
10461         * typeck.c (comp_target_parms): Likeiwse.
10462         (build_static_cast): Likewise.
10463         (build_reinterpret_cast): Likewise.
10464         (build_const_cast): Likewise.
10465         (comp_ptr_ttypes_real): Likewise.
10466         (comp_ptr_ttypes_const): Likewise.
10467         * typeck2.c (process_init_constructor): Likewise.
10468
10469 2000-04-30  Scott Snyder <snyder@fnal.gov>
10470
10471         * decl.c (finish_destructor_body): Use the base destructor when
10472         destroying virtual bases.
10473
10474 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
10475
10476         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
10477         STMT_EXPRs.
10478         * optimize.c (struct inline_data): Add target_exprs field.
10479         (declare_return_variable): When a function returns an aggregate,
10480         use the variable declared in the TARGET_EXPR as the remapped
10481         DECL_RESULT.
10482         (expand_call_inline): Update the pending target_exprs stack.
10483         (optimize_function): Initialize the stack.
10484
10485         * decl2.c (finish_file): Fix typo in comment.
10486
10487         * method.c (emit_thunk): Don't try to return a `void' value.
10488
10489         * optimize.c (initialize_inlined_parameters): If the parameter is
10490         addressable, we need to make a new VAR_DECL, even if the
10491         initializer is constant.
10492
10493 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
10494
10495         * decl.c (grok_op_properties): Add an extra check of argtypes.
10496
10497 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
10498
10499         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
10500         variables.
10501         (initialize_inlined_parameters): Try to avoid creating new
10502         VAR_DECLs.
10503
10504 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
10505
10506         * lex.c (my_get_run_time): Remove.
10507         (init_filename_times): Use get_run_time instead of my_get_run_time.
10508         (check_newline): Likewise.
10509         (dump_time_statistics): Likewise.
10510         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
10511         of computing elapsed time explicitly.
10512
10513 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
10514
10515         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
10516         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
10517         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
10518         before calling decl_constant_value.
10519         * class.c (check_bitfield_decl): Likewise.
10520         * cvt.c (ocp_convert): Likewise.
10521         (convert): Likewise.
10522         * decl.c (compute_array_index_type): Likewise.
10523         (build_enumerator): Likewise.
10524         * decl2.c (check_cp_case_value): Likewise.
10525         * pt.c (convert_nontype_argument): Likewise.
10526         (tsubst): Likewise.
10527         * typeck.c (decay_conversion): Likewise.
10528         (build_compound_expr): Likewise.
10529         (build_reinterpret_cast): Likewise.
10530         (build_c_cast): Likewise.
10531         (convert_for_assignment): Likewise.
10532
10533 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
10534
10535         * decl.c (finish_function): Don't play games with DECL_INLINE.
10536
10537 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
10538
10539         * ir.texi: Correct typo.
10540
10541 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10542
10543         * decl.c (grokdeclarator): Reject VLAs as members.
10544
10545 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
10546
10547         * call.c (standard_conversion): Accept conversion between
10548         COMPLEX_TYPEs.
10549
10550         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
10551
10552 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
10553
10554         * decl2.c (finish_file): Remove double setup for accounting
10555         compile time.
10556
10557 2000-04-24  Robert Lipe <robertlipe@usa.net>
10558
10559         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
10560
10561 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
10562
10563         * new.cc (set_new_handler): Needs to be in std::.
10564
10565 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
10566
10567         * cp-tree.h (lang_decl): Remove pretty_function_p.
10568         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
10569         language-specific node.
10570         * decl.c (cp_make_fname_decl): Use build_decl, not
10571         build_lang_decl, to build the variables.
10572         (grokvardecl): Don't call build_lang_decl for local variables in
10573         templates.
10574         (grokdeclarator): Don't call build_lang_decl for local type
10575         declarations in templates.
10576         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
10577         zero'd memory, rather than calling memset.
10578         * pt.c: Include hashtab.h.
10579         (local_specializations): New variable.
10580         (retrieve_local_specialization): Use it.
10581         (register_local_specialization): Likewise.
10582         (tsubst_decl): Don't assume local variables have
10583         DECL_LANG_SPECIFIC.
10584         (instantiate_decl): Set up local_specializations.
10585         * Makefile.in (HTAB_H): New variable.
10586
10587 2000-04-23  Richard Henderson  <rth@cygnus.com>
10588
10589         * typeck.c (c_expand_asm_operands): Restore the original
10590         contents of the output list.
10591
10592 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
10593
10594         * ir.texi:  Document complex number representation.
10595
10596 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
10597
10598         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
10599         (target_incomplete_p): New function.
10600         (tinfo_base_init): Create comdat NTBS name variable.
10601         (ptr_initializer): Add non_public parameter. Calculate it.
10602         (ptmd_initializer): Likewise.
10603         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
10604         (create_real_tinfo_var): Add non_public parameter. Use it.
10605         Push proxy into global namespace.
10606         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
10607         New enumeration.
10608         * inc/typeinfo (type_info::before, type_info::operator==):
10609         Compare __name addresses.
10610
10611         * tinfo2.cc: Remove new-abi builtins comment.
10612
10613 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
10614
10615         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
10616
10617         * call.c (joust): Exit early if we get the same function, too.
10618
10619         * decl2.c (key_method): Return NULL_TREE for template classes.
10620         (import_export_class): Don't need to check for template classes.
10621
10622 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
10623
10624         * lex.c: Remove references to cccp.c.
10625
10626 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
10627
10628         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
10629         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
10630         (DECL_DESTRUCTOR_P): Use destructor_attr.
10631         (DECL_CONST_MEMFUNC_P): Reimplement.
10632         (DECL_VOLATILE_MEMFUNC_P): Remove.
10633         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
10634         (overrides): Use DECL_DESTRUCTOR_P.
10635         (check_for_override): Likewise.
10636         * decl.c (start_function): Likewise.
10637         * decl2.c (grokfclassfn): Likewise.
10638         (check_classfn): Likewise.
10639         (grok_function_init): Likewise.
10640
10641 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
10642
10643         * decl2.c (grokfield): Issue error on illegal data member
10644         declaration.
10645
10646 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
10647
10648         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
10649
10650 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
10651
10652         * class.c (build_vtable_entry): Don't build thunks for type-info
10653         functions.
10654
10655 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
10656
10657         * decl.c (decls_match): Allow a redeclaration of a builtin to
10658         specify args while the builtin did not.
10659
10660 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
10661
10662         * cp-tree.def (THUNK_DECL): Add to documentation.
10663         * cp-tree.h (flag_huge_objects): Declare.
10664         * class.c (modify_vtable_entry): Tidy.
10665         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
10666         Calculate delta appropriately for the new ABI.
10667         (dfs_modify_vtables): Use it.
10668         (modify_all_vtables): Fix thinko in code to add overriding copies
10669         of functions to primary vtables.
10670         (build_clone): Fix typo in comment.
10671         (clone_function_decl): Correct order of destructors in vtable.
10672         (build_vbase_offset_vtbl_entries): Adjust comment.
10673         (dfs_vcall_offset_queue_p): Remove.
10674         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
10675         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
10676         (build_vtable_entry): Correct check for pure virtual functions.
10677         Don't declare flag_huge_objects.
10678         * decl.c (flag_huge_objects): Remove declaration.
10679         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
10680         Use int_size_in_bytes.
10681         (emit_thunk): Handle vcall offset thunks.
10682
10683 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
10684
10685         * decl2.c (parse_time, varconst_time): Delete declarations.
10686         (finish_file): Delete LINENO declaration.
10687         START_TIME and THIS_TIME now long.
10688
10689 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
10690
10691         * class.c (build_base_field): Reformat comment.
10692
10693         * inc/cxxabi.h (stddef.h): Comment inclusion.
10694         (__base_class_info::__offset): Comment shift.
10695
10696 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
10697
10698         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
10699         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
10700         (cp_push_exception_identifier): New macro.
10701         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
10702         (DECL_BASE_DESTRUCTOR_P): Likewise.
10703         (DECL_DELETING_DESTRUCTOR_P): Likewise.
10704         (get_vtbl_decl_for_binfo): Fix formatting.
10705         (in_charge_arg_for_name): New macro.
10706         (maybe_build_cleanup_and_delete): Remove declaration.
10707         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
10708         (in_charge_arg_for_name): New function.
10709         (build_new_method_call): Use it.  Handle cloned destructors.
10710         (build_clone): Don't make the base constructor virtual.
10711         Automatically defer generated functions.
10712         (clone_function_decl): Handle destructors, too.
10713         (clone_constructors_and_destructors): Likewise.
10714         (create_vtable_ptr): Don't create a vtable entry for a cloned
10715         function.
10716         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
10717         (initialize_predefined_identifiers): Update appropriately.
10718         (finish_destructor_body): Simplify.
10719         (maybe_build_cleanup_and_delete): Remove.
10720         * except.c (expand_throw): Handle new-ABI destructors.
10721         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
10722         (build_dtor_call): New function.
10723         (build_delete): Use it.  Simplify.
10724         * optimize.c (maybe_clone_body): Handle destructors.
10725         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
10726
10727         * exception.cc (cleanup_fn): New typedef.
10728         (CALL_CLEANUP): New macro.
10729         (cp_eh_info): Use them.
10730         (__cp_push_exception): Likewise.
10731         (__cp_pop_exception): Likewise.
10732
10733 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
10734
10735         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
10736         (complete_dtor_identifier): New macro.
10737         (CLASSTYPE_FIRST_CONVERSION): Remove.
10738         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
10739         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
10740         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
10741         (CLASSTYPE_CONSTRUCTORS): Likewise.
10742         (CLASSTYPE_DESTRUCTORS): Likewise.
10743         (lang_decl): Add cloned_function.
10744         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
10745         (DECL_BASE_CONSTRUCTOR_P): Likewise.
10746         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
10747         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
10748         (DECL_CLONED_FUNCTION_P): Likewise.
10749         (DECL_CLONED_FUNCTION): Likewise.
10750         (clone_function_decl): Declare.
10751         (maybe_clone_body): Likewise.
10752         * call.c (build_user_type_conversion_1): Call complete object
10753         constructors in the new ABI.
10754         (build_new_method_call): Don't add in-charge parameters under the
10755         new ABI.
10756         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
10757         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
10758         CLASSTYPE_DESTRUCTOR_SLOT.
10759         (build_clone): New function.
10760         (clone_function_decl): Likewise.
10761         (clone_constructors_and_destructors): Likewise.
10762         (check_bases_and_members): Use it.
10763         * decl.c (iniitialize_predefined_identifiers): Initialize
10764         complete_dtor_identifier.
10765         (finish_function): Don't add extra code to a clone.
10766         (lang_mark_tree): Mark cloned_function.
10767         * decl2.c (mark_used): Don't bother trying to instantiate things
10768         we synthesized.
10769         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
10770         * method.c (set_mangled_name_for_decl): Don't treat clones as
10771         constructors.
10772         (synthesize_method): Sythesize cloned functions, not the clones.
10773         * optimize.c (inline_data): Update comment on ret_label.
10774         (remap_block): Don't assume DECL_INITIAL exists.
10775         (copy_body_r): Allow ret_label to be NULL.
10776         (maybe_clone_body): Define.
10777         * pt.c (tsubst_decl): Handle clones.
10778         (instantiate_clone): New function.
10779         (instantiate_template): Use it.
10780         (set_mangled_name_for_template_decl): Don't treat clones as
10781         constructors.
10782         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
10783         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
10784         * semantics.c (expand_body): Clone function bodies as necessary.
10785
10786         * optimize.c (remap_decl): Avoid sharing structure for arrays
10787         whose size is only known at run-time.
10788         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
10789
10790         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
10791         to has_in_charge_parm_p.
10792         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
10793         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
10794         (DECL_COPY_CONSTRUCTOR_P): New macro.
10795         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
10796         (build_user_type_conversion_1): Likewise.
10797         (convert_like_real): Likewise.
10798         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
10799         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
10800         (copy_args_p): Likewise.
10801         (grok_ctor_properties): Likewise.
10802         (start_function): Likewise.
10803         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
10804         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
10805         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
10806         * method.c (do_build_copy_constructor): Use
10807         DECL_HAS_IN_CHARGE_PARM_P.
10808         (synthesize_method): Likewise.
10809         * pt.c (instantiate_template): Remove goto.
10810         * tree.c (build_cplus_method_type): Remove mention of obstacks in
10811         comment.
10812
10813         * cp-tre.h (finish_function): Change prototype.
10814         * decl.c (end_cleanup_fn): Adjust caller.
10815         (finish_function): Take only one parameter.
10816         * decl2.c (finish_objects): Adjust caller.
10817         (finish_static_storage_duration_function): Likewise.
10818         * method.c (emit_thunk): Likewise.
10819         * parse.y: Likewise.
10820         * parse.c: Regenerated.
10821         * pt.c (instantiate_decl): Likewise.
10822         * rtti.c (synthesize_tinfo_fn): Likewise.
10823         * semantics.c (expand_body): Likewise.
10824
10825         * cp-tree.h (copy_decl): New function.
10826         * class.c (finish_struct_1): Use it.
10827         * lex.c (copy_decl): Define it.
10828         * pt.c (tsubst_decl): Likewise.
10829         * tree.c (copy_template_template_parm): Likewise.
10830
10831         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
10832         has_nonpublic_assign_ref.
10833         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
10834         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
10835         * class.c (finish_struct_methods): Don't set
10836         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
10837         (interface_only): Don't declare.
10838         (interface_unknown): Likewise.
10839
10840 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10841
10842         * tree.h (HAVE_TEMPLATES): Remove definition.
10843         * lang-options.h (-fthis-is-variable): Remove documentation.
10844
10845 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
10846
10847         * class.c (instantiate_type): Handle object-relative template-id.
10848
10849         * semantics.c (finish_expr_stmt): Call convert_to_void here.
10850         * decl.c (cplus_expand_expr_stmt): Not here.
10851
10852         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
10853         Initialize exprtype earlier.
10854
10855         * parse.y (fn.def1): Check for defining types in return types.
10856
10857         * decl.c (check_tag_decl): Notice extra fundamental types.
10858         Diagnose empty decls in classes, too.
10859
10860         * decl.c (grokdeclarator): Don't override an anonymous name if no
10861         declarator was given.
10862
10863         * cvt.c (convert_to_void): Call resolve_offset_ref.
10864
10865         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
10866
10867         * decl2.c (decl_namespace): Handle getting a type.
10868
10869         * typeck.c (build_c_cast): Re-enable warning for cast between
10870         pointer and integer of different size.
10871
10872 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
10873
10874         * inc/cxxabi.h (__pointer_type_info): Add restrict and
10875         incomplete flags.
10876         (__pointer_type_info::__pointer_catch): New virtual function.
10877         (__pointer_to_member_type_info): Derive from
10878         __pointer_type_info. Adjust.
10879         (__pointer_to_member_type_info::__do_catch): Remove.
10880         (__pointer_to_member_type_info::__is_pointer_p): Declare.
10881         (__pointer_to_member_type_info::__pointer_catch): Declare.
10882         * rtti.c (qualifier_flags): Add restrict flag.
10883         (ptmd_initializer): Reorder members.
10884         (create_tinfo_types): Expand comments. Reorder
10885         ptmd_desc_type_node members.
10886         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
10887         Implement.
10888         (__pointer_type_info::__do_catch): Move specific code into
10889         __pointer_catch. Call it.
10890         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
10891         specific catch checking. Fix void conversion check.
10892         (__pointer_to_member_type_info::__do_catch): Remove.
10893         (__pointer_to_member_type_info::__pointer_catch): Implement.
10894
10895 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
10896
10897         * lex.c (init_parse): Remove traces of classof and headof.
10898         * decl2.c (flag_operator_names): Default to 1.
10899         (lang_decode_option): Do not set it for -ansi.
10900
10901 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
10902
10903         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
10904         (DECL_MAIN_VARIANT): Remove.
10905         * decl.c (duplicate_decls): Don't set it.
10906         (start_function): Likewise.
10907         (lang_mark_tree): Don't mark it.
10908         * decl2.c (defer_fn): Don't use it.
10909         * lex.c (retrofit_lang_decl): Don't set it.
10910         * pt.c (tsubst_decl): Likewise.
10911         * ptree.c (print_lang_decl): Don't print it.
10912         * typeck.c (mark_addressable): Don't use it.
10913
10914 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
10915
10916         * vec.cc: Include <new> and <exception>.
10917         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
10918         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
10919         terminate.
10920         (__cxa_vec_delete): Catch dtor exceptions.
10921
10922 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
10923
10924         Prepend __ to implementation defined names.
10925         * inc/typeinfo (type_info): Rename _name to __name.
10926         (type_info::type_info): Rename parameter.
10927         (type_info::operator==, type_info::operator!=,
10928         type_info::before): Likewise.
10929         (type_info::is_pointer_p, type_info::is_function_p,
10930         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
10931         parameters.
10932         * inc/cxxabi.h
10933         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
10934         (__pointer_type_info::__pointer_type_info): Likewise.
10935         (__pointer_type_info::is_pointer_p,
10936         __pointer_type_info::do_catch): Prepend __. Rename parameters.
10937         (__array_type_info::__array_type_info): Rename parameters.
10938         (__function_type_info::__function_type_info): Likewise.
10939         (__function_type_info::is_function_p): Prepend __.
10940         (__enum_type_info::__enum_type_info): Rename parameters.
10941         (__pointer_to_member_type_info::__pointer_to_member_type_info):
10942         Likewise.
10943         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
10944         parameters.
10945         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
10946         (__class_type_info::__class_type_info): Rename parameters.
10947         (__class_type_info::sub_kind): Prepend __. Adjust member names.
10948         (__class_type_info::upcast_result,
10949         __class_type_info::dyncast_result): Prepend __. Move definition
10950         into tinfo.cc.
10951         (__class_type_info::do_upcast, __class_type_info::do_catch,
10952         __class_type_info::find_public_src,
10953         __class_type_info::do_dyncast,
10954         __class_type_info::do_find_public_src): Prepend __. Rename
10955         parameters.
10956         (__si_class_type_info::__si_class_type_info): Rename parameters.
10957         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
10958         __si_class_type_info::do_find_public_src): Prepent __. Rename
10959         parameters.
10960         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
10961         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
10962         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
10963         parameters.
10964         (__dynamic_cast): Rename parameters.
10965         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
10966         type_info::do_catch, type_info::do_upcast): Prepend __.
10967         (contained_p, public_p, virtual_p, contained_public_p,
10968         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
10969         (__class_type_info::do_catch,
10970         __class_type_info::do_upcast): Prepend __. Adjust.
10971         (__class_type_info::__upcast_result,
10972         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
10973         Adjust.
10974         (__class_type_info::find_public_src): Prepend __. Adjust.
10975         (__class_type_info::do_find_public_src,
10976         __si_class_type_info::do_find_public_src,
10977         __vmi_class_type_info::do_find_public_src): Likewise.
10978         (__class_type_info::do_dyncast,
10979         __si_class_type_info::do_dyncast,
10980         __vmi_class_type_info::do_dyncast): Likewise.
10981         (__class_type_info::do_upcast,
10982         __si_class_type_info::do_upcast,
10983         __vmi_class_type_info::do_upcast): Likewise.
10984         (__dynamic_cast): Adjust.
10985         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
10986         (__function_type_info::is_function_p): Likewise.
10987         (__pointer_type_info::do_catch): Likewise. Adjust.
10988         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
10989         (__throw_type_match_rtti_2): Adjust.
10990         (__is_pointer): Adjust.
10991
10992 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
10993
10994         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
10995         (complete_ctor_identifier): New macro.
10996         (special_function_kind): Add sfk_copy_constructor and
10997         sfk_assignment_operator.
10998         (LOOKUP_HAS_IN_CHARGE): Remove.
10999         (cons_up_default_function): Rename to ...
11000         (implicitly_declare_fn): ... this.
11001         * call.c (build_new_method_call): Add in-charge parameters for
11002         constructors here.
11003         * class.c (add_implicitly_declared_members): Change parameter name
11004         from cant_have_assignment to cant_have_const_assignment.
11005         Replace calls to cons_up_default_function to implicitly_declare_fn.
11006         * cvt.c (ocp_convert): Use complete_ctor_identifier.
11007         * decl.c (initialize_predefined_identifiers): Initialize it.
11008         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
11009         complex expression.
11010         * init.c (expand_default_init): Don't calculate the in-charge
11011         parameter here.
11012         (build_new_1): Likewise.
11013         * lex.c (cons_up_default_function): Move to method.c.
11014         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
11015         (implicitly_declare_fn): New function.
11016         * typeck.c (build_static_cast): Use complete_ctor_identifier.
11017         (build_modify_expr): Likewise.
11018         * typeck2.c (build_functional_cast): Likewise.
11019
11020         Under the new ABI, constructors don't return `this'.
11021         * cp-tree.h (warn_reorder): Declare.
11022         (special_function_kind): New enum.
11023         (global_base_init_list): Remove declaration.
11024         (emit_base_init): Don't return a value.
11025         (check_base_init): Don't declare.
11026         (is_aggr_typedef): Likewise.
11027         * decl.c (check_special_function_return_type): New function.
11028         (return_types): Remove.
11029         (grokdeclarator): Use check_special_function_return_type.
11030         (start_function): Don't initialize ctor_label under the new ABI.
11031         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
11032         * init.c (begin_init_stmts): Move to top of file.
11033         (finish_init_stmts): Likewise.
11034         (warn_reorder): Don't declare.
11035         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
11036         value.
11037         (check_base_init): Remove.
11038         (is_aggr_typedef): Likewise.
11039         (build_new_1): Don't use the return value of a constructor.
11040         * semantics.c (setup_vtbl_ptr): Don't use the return value
11041         of emit_base_init.
11042         * typeck.c (check_return_expr): Don't magically convert return
11043         statements into `return this' in constructors under the new ABI.
11044
11045         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
11046         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
11047         (base_ctor_identifier): New macro.
11048         (base_dtor_identifier): Likewise.
11049         (deleting_dtor_identifier): Likewise.
11050         * decl.c: Don't include obstack.h.
11051         (obstack_chunk_alloc): Don't define.
11052         (obstack_chunk_free): Likewise.
11053         (struct predefined_identifier): New type.
11054         (initialize_predefined_identifiers): New function.
11055         (init_decl_processing): Use it.
11056         (debug_temp_inits): Remove.
11057         (start_method): Don't call preserve_data.
11058         (hack_incomplete_structures): Update comment.
11059         * init.c (init_init_processing): Don't initialize
11060         nelts_identifier.
11061         (build_offset_rf): Remove dead code.
11062         (build_delete): Use CLASSTYPE_N_BASECLASSES.
11063         * search.c (init_search_processing): Don't initialize
11064         vptr_identifier.
11065
11066 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11067
11068         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
11069         some sign_compare warnings.
11070
11071 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
11072
11073         Rename abi::__vmi_class_type_info members.
11074         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
11075         base_list, detail_masks members to vmi_flags, vmi_base_count,
11076         vmi_bases and vmi_flags_masks respectively.
11077         (__vmi_class_type_info::vmi_flags_masks): Rename
11078         details_unknown_mask to flags_unknown_mask.
11079         * tinfo.cc (__class_type_info::do_upcast): Adjust.
11080         (__vmi_class_type_info::do_find_public_src): Adjust.
11081         (__vmi_class_type_info::do_dyncast): Adjust.
11082         (__vmi_class_type_info::do_upcast): Adjust.
11083
11084 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
11085
11086         * tinfo.cc (convert_to_base): New function.
11087         (get_vbase_offset): Remove. Move into convert_to_base.
11088         (__vmi_class_type_info::do_find_public_src): Adjust.
11089         (__vmi_class_type_info::do_dyncast): Adjust.
11090         (__vmi_class_type_info::do_upcast): Adjust.
11091
11092 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
11093
11094         * tinfo.cc (operator=): Use __builtin_strcmp.
11095         * tinfo2.cc (before): Likewise.
11096
11097 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
11098
11099         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
11100         (DECL_SAVED_INLINE): Rename to ...
11101         (DECL_DEFERRED_FN): ... this.
11102         (in_function_p): Remove declaration.
11103         (mark_inline_for_output): Rename to ...
11104         (defer_fn): ... this.
11105         * decl.c (finish_function): Adjust call to mark_inline_for_output.
11106         (in_function_p): Remove definition.
11107         * decl2.c (saved_inlines): Rename to ...
11108         (deferred_fns): ... this.
11109         (saved_inlines_used): Rename to ...
11110         (deferred_fns_used): ... this.
11111         (mark_inline_for_output): Rename to ...
11112         (defer_fn): ... this.
11113         (finish_file): Adjust accordingly.
11114         (init_decl2): Likewise.
11115         * lex.c (cons_up_default_function): Likewise.
11116         * pt.c (mark_decl_instantiated): Likewise.
11117         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
11118         circumstances.
11119         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
11120         * semantics.c (expand_body): Defer more functions.
11121
11122 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
11123
11124         * vec.cc: New file.
11125         * Make-lang.in (CXX_LIB2FUNCS): Add it.
11126         (vec.o): Build it.
11127         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
11128         __cxa_vec_delete): Declare.
11129
11130 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
11131
11132         * rtti.c (dfs_class_hint_mark): New static function.
11133         (dfs_class_hint_unmark): New static function.
11134         (class_hint_flags): Use them.
11135
11136 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
11137
11138         * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
11139
11140 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
11141
11142         * cp-tree.h (instantiate_decl): Change prototype.
11143         * decl2.c (mark_used): Adjust call.
11144         * optimize.c (inlinable_function_p): Adjust handling of templates.
11145         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
11146         (do_type_instantiation): Likewise.
11147         (instantiate_decl): Defer more templates.
11148         (instantiate_pending_templates): Adjust logic to handle inline
11149         friend functions.
11150
11151         * Makefile.in (GGC_H): New variable.  Use it throughout in place
11152         of ggc.h.
11153
11154         * call.c: Don't include obstack.h.  Include ggc.h.
11155         (obstack_chunk_alloc): Don't define.
11156         (obstack_chunk_free): Likewise.
11157         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
11158         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
11159         (pop_switch): Free it.
11160
11161         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
11162
11163         * dump.c (dequeue_and_dump): Don't try to print the bit_position
11164         if we don't have a DECL_FIELD_OFFSET.
11165
11166 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
11167
11168         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
11169         special_function_p.
11170
11171 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11172
11173         * cfns.gperf (hash, libc_name_p): Prototype.
11174
11175         * rtti.c (build_dynamic_cast_1): Constification.
11176
11177         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
11178
11179         * semantics.c (deferred_type_access_control): Prototype.
11180
11181 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
11182
11183         Correct many new ABI issues regarding vbase and vcall offset
11184         layout.
11185         * cp-tree.h (BINFO_VTABLE): Document.
11186         (struct lang_type): Tweak formatting.
11187         (BINFO_PRIMARY_BINFO): Add to documentation.
11188         (CLASSTYPE_VSIZE): Fix typo in comment.
11189         (CLASSTYPE_VBASECLASSES): Update documentation.
11190         (BINFO_VBASE_MARKED): Remove.
11191         (SET_BINFO_VBASE_MARKED): Likewise.
11192         (CLEAR_BINFO_VBASE_MARKED): Likewise.
11193         (BINFO_FIELDS_MARKED): Remove.
11194         (SET_BINFO_FIELDS_MARKED): Likewise.
11195         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
11196         (enum access_kind): New enumeration.
11197         (num_extra_vtbl_entries): Remove declaration.
11198         (size_extra_vtbl_entries): Likewise.
11199         (get_vtbl_decl_for_binfo): New function.
11200         (dfs_vbase_unmark): Remove declaration.
11201         (mark_primary_bases): Likewise.
11202         * class.c (SAME_FN): Remove.
11203         (struct vcall_offset_data_s): Move definition.
11204         (build_vbase_pointer): Use `build', not `build_binary_op', to
11205         access the vbase pointer under the new ABI.
11206         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
11207         (build_primary_vtable): Likewise.
11208         (dfs_mark_primary_bases): Move here from search.c.
11209         (mark_primary_bases): Likewise.
11210         (determine_primary_bases): Under the new ABI, don't make a base
11211         class a primary base just because we don't yet have any virtual
11212         functions.
11213         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
11214         (num_vfun_entries): Remove.
11215         (dfs_count_virtuals): Likewise.
11216         (num_extra_vtbl_entries): Likewise.
11217         (size_extra_vtbl_entries): Likewise.
11218         (layout_virtual_bases): Iterate in inheritance graph order under
11219         the new ABI.
11220         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
11221         indicate that a vfield is present.
11222         (init_class_processing): Initialize access_public_node, etc., from
11223         ak_public, etc.
11224         (get_vtbl_decl_for_binfo): New function.
11225         (dump_class_hierarchy_r): Likewise.
11226         (dump_class_hierarchy): Use it.
11227         (finish_vtbls): Build the vtbls in inheritance graph order.
11228         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
11229         (initialize_vtable): Use get_vtbl_decl_for_binfo.
11230         (accumulate_vtbl_inits): Add comments explaining why a pre-order
11231         walk is required.
11232         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
11233         where the vptr points, even for primary vtables.
11234         (build_vtbl_initializer): Adjust handling of vbase and vcall
11235         offsets.
11236         (build_vcall_and_vbase_vtable_entries): New function.
11237         (dfs_build_vbase_offset_vtbl_entries): Remove.
11238         (build_vbase_offset_vtbl_entries): Reimplement.
11239         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
11240         were already handled in a primary base class vtable.
11241         (build_vcall_offset_vtbl_entries): Adjust.
11242         (build_rtti_vtbl_entries): Adjust.
11243         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
11244         * init.c (expand_virtual_init): Simplify.
11245         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
11246         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
11247         * search.c (BINFO_ACCESS): New macro.
11248         (SET_BINFO_ACCESS): Likewise.
11249         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
11250         (access_in_type): Likewise.
11251         (dfs_accessible_p): Likewise.
11252         (protected_accessible_p): Likewise.
11253         (lookup_fnfields_1): Adjust documentation.
11254         (dfs_mark_primary_bases): Move to class.c
11255         (mark_primary_bases): Likewise.
11256         (dfs_vbase_unmark): Remove.
11257         (virtual_context): Use BINFO_FOR_VBASE.
11258         (dfs_get_vbase_types): Simplify.
11259         (dfs_build_inheritance_graph_order): New function.
11260         (get_vbase_types): Use it.
11261         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
11262
11263         * tinfo.cc (get_vbase_offset): New function.
11264         (__vmi_class_type_info::do_find_public_src): Use it.
11265         (__vmi_class_type_info::do_dyncast): Likewise.
11266         (__vmi_class_type_info::do_upcast): Likewise.
11267
11268 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
11269
11270         * lang-specs.h: Pass -fno-show-column to the preprocessor.
11271
11272 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
11273
11274         * rtti.c (class_hint_flags): Rename flags.
11275         (class_initializer): Remove flags.
11276         (synthesize_tinfo_var): Combine offset and flags. Add flags
11277         for __vmi_class_type_info.
11278         (create_tinfo_types): Remove flags from __class_type_info and
11279         __si_class_type_info. Merge flags and offset from
11280         base_class_type_info.
11281         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
11282         (__base_class_info::is_virtual_p): Adjust.
11283         (__base_class_info::is_public_p): Adjust.
11284         (__base_class_info::offset): New accessor.
11285         (__class_type_info::details): Remove member.
11286         (__class_type_info::__class_type_info): Lose details.
11287         (__class_type_info::detail_masks): Remove.
11288         (__si_class_type_info::__si_class_type_info): Lose details.
11289         (__vmi_class_type_info::details): New member.
11290         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
11291         (__vmi_class_type_info::detail_masks): New member.
11292         * tinfo.cc (__class_type_info::do_upcast): Initialize result
11293         with unknown_details_mask.
11294         (__vmi_class_type_info::do_find_public_src): Adjust
11295         (__vmi_class_type_info::do_dyncast): Adjust.
11296         (__vmi_class_type_info::do_upcast): Set result details, if
11297         needed. Adjust.
11298         (__dynamic_cast): Temporarily #if out optimization.
11299
11300 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
11301
11302         * rtti.c (get_tinfo_decl): Mark used.
11303         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
11304         mark as dealt with, if we output it.
11305
11306 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
11307
11308         * class.c: Reorganize to put virtual function table initialization
11309         machinery at the end of the file.
11310
11311 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
11312
11313         * class.c (finish_struct): Use bitsize_zero_node.
11314         * pt.c (instantiate_class_template): Likewise.
11315
11316 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
11317
11318         Put RTTI entries at negative offsets in new ABI.
11319         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
11320         vbase offset at index -3, not -1.
11321         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
11322         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
11323         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
11324         (build_rtti_vtbl_entries): New function.
11325         (set_rtti_entry): Remove.
11326         (build_primary_vtable): Don't use it.
11327         (build_secondary_vtable): Likewise.
11328         (start_vtable): Remove.
11329         (first_vfun_index): New function.
11330         (set_vindex): Likewise.
11331         (add_virtual_function): Don't call start_vtable.  Do call
11332         set_vindex.
11333         (set_primary_base): Rename parameter.
11334         (determine_primary_base): Likewise.
11335         (num_vfun_entries): Don't use skip_rtti_stuff.
11336         (num_extra_vtbl_entries): Include RTTI information.
11337         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
11338         (skip_rtti_stuff): Remove.
11339         (dfs_modify_vtables): Don't use it.
11340         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
11341         (layout_nonempty_base_or_field): Update size handling.
11342         (create_vtable_ptr): Tweak.
11343         (layout_class_type): Adjust parameter names.
11344         (finish_struct_1): Simplify.
11345         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
11346         (skip_rtti_stuff): Remove.
11347         (first_vfun_index): New function.
11348         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
11349         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
11350         (marked_vtable_pathp): Declare.
11351         (unmarked_vtable_pathp): Likewise.
11352         * error.c (dump_expr): Use first_vfun_index to calculate vtable
11353         offsets.
11354         * rtti.c (build_headof): Look for RTTI at negative offsets.
11355         (get_tinfo_decl_dynamic): Likewise.
11356         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
11357         here.
11358         (create_pseudo_type_info): Do it here instead.  Adjust so that
11359         vptr points at first virtual function.
11360         * search.c (marked_vtable_pathp): Make it global.
11361         (unmarked_vtable_pathp): Likewise.
11362         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
11363         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
11364         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
11365         (get_pure_virtuals): Likewise.
11366         (expand_upcast_fixups): Likewise.
11367         * tree.c (debug_binfo): Likewise.
11368         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
11369         negative offset.
11370
11371 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11372
11373         * class.c (check_field_decl): Fix typo.
11374         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
11375         (check_methods): Likewise.
11376         (check_field_decls): Likewise.
11377         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
11378         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
11379         Use DECL_RESULT_FLD, not DECL_RESULT.
11380         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
11381         * lex.c (identifier_type): Likewise.
11382         * pt.c (determine_specialization, lookup_template_class): Likewise.
11383         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
11384         (resolve_overloaded_unification, more_specialized): Likewise.
11385         * semantics.c (finish_member_declaration): Likewise.
11386         * typeck.c (build_x_function_call): Likewise.
11387
11388 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
11389
11390         * class.c (layout_empty_base): Handle empty bases with non-byte
11391         alignment.
11392         (build_base_field): Likewise.
11393         (layout_virtual_bases): Likewise.
11394
11395         * class.c (finish_struct_1): Fix typo in this change:
11396
11397         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11398
11399 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
11400
11401         * decl.c (grokdeclarator): Count partial specializations when
11402         keeping track of how many template classes have been seen.
11403
11404         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
11405
11406 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11407
11408         * class.c (build_vbase_pointer_fields): layout_field now place_field.
11409         (get_vfield_offset): Use byte_position.
11410         (set_rtti_entry): Set OFFSET to ssizetype zero.
11411         (get_binfo_offset_as_int): Deleted.
11412         (dfs_record_base_offsets): Use tree_low_cst.
11413         (dfs_search_base_offsets): Likewise.
11414         (layout_nonempty_base_or_field): Reflect changes in RLI format
11415         and call byte_position.
11416         (layout_empty_base): Convert offset to ssizetype.
11417         (build_base_field): use rli_size_unit_so_far.
11418         (dfs_propagate_binfo_offsets): Do computation in proper type.
11419         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
11420         (layout_class_type): Reflect changes in RLI names and fields.
11421         (finish_struct_1): Set DECL_FIELD_OFFSET.
11422         * dump.c (dequeue_and_dump): Call bit_position.
11423         * expr.c (cplus_expand_constant): Use byte_position.
11424         * rtti.c (expand_class_desc): Use bitsize_one_node.
11425         * typeck.c (build_component_addr): Use byte_position and don't
11426         special case for zero offset.
11427
11428 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
11429
11430         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
11431
11432         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
11433         tinfo object.
11434         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
11435         vtable.
11436
11437 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11438
11439         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
11440         DECL_P macros.
11441         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
11442         make_typename_type, check_initializer, cp_finish_decl,
11443         xref_tag): Likewise.
11444         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
11445         decl_namespace, arg_assoc_template_arg, arg_assoc,
11446         validate_nonmember_using_decl, do_class_using_decl): Likewise.
11447         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
11448         args_to_string): Likewise.
11449         * friend.c (is_friend): Likewise.
11450         * lex.c (note_got_semicolon, note_list_got_semicolon,
11451         is_global): Likewise.
11452         * method.c (build_overload_nested_name, build_overload_value,
11453         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
11454         * parse.y (typename_sub, typename_sub1): Likewise.
11455         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
11456         process_partial_specialization, convert_template_argument,
11457         template_args_equal, add_pending_template, lookup_template_class,
11458         for_each_template_parm_r, maybe_fold_nontype_arg,
11459         tsubst, instantiate_template, type_unification_real, unify,
11460         instantiate_pending_templates, set_mangled_name_for_template_decl):
11461         Likewise.
11462         * repo.c (repo_get_id, repo_template_used): Likewise.
11463         * search.c (lookup_field_1): Likewise.
11464         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
11465         * xref.c (classname): Likewise.
11466
11467 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
11468
11469         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
11470         (CANONICAL_BINFO): New macro.
11471         (BINFO_NEW_VTABLE_MARKED): Use it.
11472         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
11473         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
11474         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
11475         not TREE_TYPE.
11476         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
11477         (build_secondary_vtable): Likewise.
11478         (dfs_finish_vtbls): Likewise.
11479         (dfs_accumulate_vtbl_inits): Likewise.
11480         (accumulate_vtbl_inits): New function.
11481         (finish_vtbls): Make sure that virtual bases come after
11482         non-virtual bases in the vtable group.
11483         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
11484         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
11485         * search.c (struct vbase_info): Move definition.
11486         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
11487         (unmarked_new_vtable_p): Likewise.
11488         (dfs_mark_vtable_path): Remove.
11489         (dfs_mark_new_vtable): Remove.
11490         (dfs_unmark_new_vtable): Likewise.
11491         (dfs_clear_search_slot): Likewise.
11492         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
11493         (dfs_clear_vbase_slots): Likewise.
11494         (init_vbase_pointers): LIkewise.
11495
11496 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
11497
11498         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
11499         SIZETYPE to a non-SIZETYPE.
11500
11501 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
11502
11503         * class.c (layout_virtual_bases): Adjust names in conditionally
11504         compiled code.
11505
11506         * class.c (record_base_offsets): New function.
11507         (layout_conflict_p): Likewise.
11508         (layout_nonempty_base_or_field): Use it.
11509         (layout_empty_base): New function.
11510         (build_base_field): Use it.
11511         (build_base_fields): Update comment.
11512         (layout_virtual_bases): Fold in a little code form
11513         layout_basetypes.  Use layout_empty_base.
11514         (layout_basetypes): Remove.
11515         (end_of_class): New function.
11516         (layout_class_type): Use it.  Adjust.
11517
11518         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
11519         (fntype_p): Remove.
11520         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
11521         comment.
11522         (dfs_skip_nonprimary_vbases_markedp): Likewise.
11523         * typeck.c (fntype_p): Remove.
11524
11525         * cp-tree.h (TI_SPEC_INFO): Remove.
11526         (CLASSTYPE_TI_SPEC_INFO): Likewise.
11527         * pt.c (process_partial_specialization): Likewise.
11528
11529         * class.c (build_base_field): Fix thinko in computation of binfo
11530         offsets.
11531
11532         * tree.c (mark_local_for_remap_p): Mark variables declared in
11533         TARGET_EXPRs as well.
11534
11535 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
11536
11537         * typeck.c (require_complete_type, complete_type,
11538         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
11539         build_array_ref, convert_arguments, pointer_diff,
11540         build_x_unary_op, build_unary_op, build_c_cast,
11541         build_modify_expr): Use COMPLETE_TYPE_P etc.
11542         * call.c (is_complete, convert_like_real,
11543         build_new_method_call): Likewise.
11544         * class.c (build_vbase_pointer_fields, check_bases,
11545         build_base_field, finish_struct_1, pushclass): Likewise.
11546         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
11547         * decl.c (maybe_process_template_type_declaration, pushtag,
11548         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
11549         layout_var_decl, check_initializer, cp_finish_decl,
11550         grokdeclarator, require_complete_types_for_parms,
11551         grok_op_properties, xref_tag, xref_basetypes,
11552         check_function_type): Likewise.
11553         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
11554         * friend.c (do_friend): Likewise.
11555         * init.c (build_offset_ref): Likewise.
11556         * parse.y (structsp): Likewise.
11557         * pt.c (maybe_process_partial_specialization,
11558         tsubst_friend_function, instantiate_class_template, tsubst,
11559         do_type_instantiation, instantiate_pending_templates): Likewise.
11560         * repo.c (repo_get_id): Likewise.
11561         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
11562         synthesize_tinfo_var, emit_support_tinfos): Likewise.
11563         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
11564         * semantics.c (begin_class_definition): Likewise.
11565         * tree.c (build_cplus_method_type): Likewise.
11566         * typeck2.c (digest_init, build_functional_cast,
11567         add_exception_specifier): Likewise.
11568         * parse.h, parse.c: Regenerated.
11569
11570 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
11571
11572         * inc/cxxabi.h: New header file. Define new-abi entry points.
11573         (__pointer_type_info::target): Rename member to ...
11574         (__pointer_type_info::type): ... here.
11575         (__base_class_info::type): Rename member to ...
11576         (__base_class_info::base): ... here.
11577         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
11578         * cp-tree.h (CPTI_ABI): New global tree enumeration.
11579         (abi_node): New global tree node.
11580         * decl.c (abi_node): Document.
11581         (init_decl_processing): Initialize abi_node.
11582         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
11583         (get_vmi_pseudo_type_info): Likewise.
11584         (create_tinfo_types): Likewise.
11585         (emit_support_tinfos): Likewise.
11586         * tinfo.h (cxxabi.h): Include for new-abi.
11587         Move rtti class definitions to new header file.
11588         * tinfo.cc (abi): Use the namespace.
11589         (std): Move new abi rtti classes from here ...
11590         (__cxxabiv1): ... to here.
11591         * tinfo2.cc (cxxabi.h): Include for new-abi.
11592         Move rtti class definitions to new header file.
11593         (std): Move new abi rtti classes from here ...
11594         (__cxxabiv1): ... to here.
11595         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
11596         namespace.
11597
11598 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
11599             Jason Merrill  <jason@casey.cygnus.com>
11600
11601         * method.c (build_overload_int): Use host_integerp.
11602
11603 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
11604
11605         * init.c (build_offset_ref): Handle the case of a templated member
11606         function.
11607
11608 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11609
11610         * except.c (expand_exception_blocks): Clear catch_clauses_last.
11611
11612 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
11613
11614         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
11615         * class.c (check_bitfield_decl): Turn illegal bitfields into
11616         non-bitfields.
11617         (dfs_propagate_binfo_offsets): Adjust for new size_binop
11618         semantics.
11619         (dfs_offset_for_unshared_vbases): Likewise.
11620         * cvt.c (cp_convert_to_pointer): Convert NULL to a
11621         pointer-to-member correctly under the new ABI.
11622         * expr.c (cplus_expand_constant): Don't use cp_convert when
11623         turning an offset into a pointer-to-member.
11624         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
11625         when dereferencing them under the new ABI.
11626         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
11627         of pointers-to-members under the new ABI.
11628
11629         * class.c (check_bitfield_decl): Remove restriction on really long
11630         bitfields.
11631         (layout_class_type): Implement new ABI handling of bitfields
11632         longer than their types.
11633
11634 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
11635
11636         * parse.y (extdefs): Call ggc_collect.
11637         * parse.c: Regenerated.
11638
11639 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
11640
11641         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
11642         (note_name_declared_in_class): Use OVL_CURRENT to get at a
11643         potential overload.
11644
11645 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11646
11647         * class.c (build_vbase_path): Use integer_zerop.
11648         (build_vtable_entry): Use tree_low_cst.
11649         (get_vfield_offset): Use bit_position.
11650         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
11651         Use tree_low_cst.
11652         (check_bitfield_decl): Set DECL_SIZE using convert.
11653         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
11654         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
11655         Use tree_low_cst.
11656         (finish_struct_1): Use bit_position.
11657         (dump_class_hierarchy): Use tree_low_cst.
11658         * cp-tree.h (min_precision): Add declaration.
11659         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
11660         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
11661         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
11662         * expr.c (cplus_expand_constant): Use bit_position.
11663         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
11664         * rtti.c (get_base_offset): Use bit_position.
11665         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
11666         host_integerp, and tree_low_cst.
11667         (pointer_int_sum): Use integer_zerop.
11668         (build_component_addr): Use bit_position.
11669
11670 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
11671
11672         * typeck.c (require_complete_type): Don't assume size_zero_node.
11673         (complete_type_or_else): Likewise.
11674
11675 2000-03-16  Steven Grady <grady@digitaldeck.com>
11676             Jason Merrill  <jason@casey.cygnus.com>
11677
11678         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
11679
11680 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
11681
11682         * decl2.c (grokfield): Bail out if type is error_mark_node.
11683
11684 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
11685
11686         * tinfo2.cc (__ptr_to_member_data): Rename to ...
11687         (__pointer_to_member_data): ... here. Adjust.
11688         * rtti.c (create_tinfo_types): Adjust.
11689
11690 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
11691
11692         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
11693         * decl.c (ref_desc_type_node): Undocument.
11694         * rtti.c (ptr_ref_initializer): Rename to ...
11695         (ptr_initializer): ... here. Adjust comments.
11696         (ptmd_initializer): Fix comment thinko.
11697         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
11698         (create_tinfo_types): Remove ref_desc_type_node init.
11699         * tinfo2.cc (__reference_type_info): Remove.
11700
11701 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
11702
11703         * decl.c (cp_finish_decl): Remove obsolete comment.
11704
11705         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
11706
11707 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
11708
11709         * cp-tree.h: Tweak documentation.
11710         * class.c (build_vbase_pointer_fields): Layout the fields, too.
11711         (avoid_overlap): Remove.
11712         (get_binfo_offset_as_int): New function.
11713         (dfs_serach_base_offsets): Likewise.
11714         (layout_nonempty_base_or_field): Likewise.
11715         (build_base_field): Layout fields here.  Avoid placing two objects
11716         of the same type at the same address, under the new ABI.
11717         (build_base_fields): Adjust accordingly.
11718         (create_vtable_ptr): Return the new field, but don't attach it to
11719         TYPE_FIELDS.
11720         (remove_base_field): Remove.
11721         (remove_base_fields): Remove.
11722         (layout_basetypes): Adjust accordingly.
11723         (layout_class_type): Call layout_field for each field, rather than
11724         just making a wholesale call to layout_type.
11725
11726 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
11727
11728         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
11729
11730 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
11731
11732         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
11733
11734         * except.c (dtor_nothrow): New fn.
11735         (do_pop_exception): Use it.  Take type parm.
11736         (push_eh_cleanup): Take type parm.
11737         (expand_start_catch_block): Pass it.
11738         (build_eh_type_type_ref): Accept null type.
11739
11740 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
11741
11742         * cp-tree.h (revert_static_member_fn): Change prototype.
11743         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
11744         (grok_op_properties): Likewise.
11745         (start_function): Likewise.
11746         (revert_static_member_fn): Simplify.
11747         * pt.c (check_explicit_specialization): Adjust call to
11748         revert_static_member_fn.
11749
11750 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
11751
11752         * cp-tree.h (scope_kind): New type.
11753         (tmpl_spec_kind): Likewise.
11754         (declare_pseudo_global_level): Remove.
11755         (pseudo_global_level_p): Rename to template_parm_scope_p.
11756         (pushlevel): Remove declaration.
11757         (begin_scope): New function.
11758         (finish_scope): Likewise.
11759         (current_tmpl_spec_kind): Likewise.
11760         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
11761         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
11762         Add template_spec_p.
11763         (toplevel_bindings_p): Adjust.
11764         (declare_pseudo_global_level): Remove.
11765         (pseudo_global_level_p): Rename to template_parm_scope_p.
11766         (current_tmpl_spec_kind): New function.
11767         (begin_scope): Likewise.
11768         (finish_scope): Likewise.
11769         (maybe_push_to_top_level): Adjust.
11770         (maybe_process_template_type_declaration): Likewise.
11771         (pushtag): Likewise.
11772         (pushdecl_nonclass_level): Likewise.
11773         (lookup_tag): Likewise.
11774         (grokfndecl): Handle member template specializations.  Share
11775         constructor and non-constructor code.
11776         * decl2.c (check_classfn): Handle member template specializations.
11777         * pt.c (begin_template_parm_list): Use begin_scope.
11778         (begin_specialization): Likewise.
11779         (end_specialization): Likewise.
11780         (check_explicit_specialization): Use current_tmpl_spec_kind.
11781         Handle member template specializations.
11782         (end_template_decl): Use finish_scope.  Remove call to
11783         get_pending_sizes.
11784         (push_template_decl_real): Remove bogus error message.
11785         (tsubst_decl): Fix typo in code contained in comment.
11786         (instantiate_template): Handle member template specializations.
11787         (most_general_template): Likewise.
11788
11789 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
11790
11791         * lex.c (whitespace_cr): Compress consecutive calls to warning().
11792         (do_identifier): Ditto for error().
11793
11794         * pt.c (convert_nontype_argument): Ditto for cp_error().
11795         (convert_template_argument): Ditto for cp_pedwarn().
11796
11797 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
11798
11799         * exception.cc (__check_null_eh_spec): New fn.
11800         * except.c (expand_end_eh_spec): Call it if the spec is throw().
11801
11802 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
11803
11804         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
11805         * except.c (expand_end_eh_spec): Add the return type.
11806         * rtti.c (throw_bad_cast): Add the parmtypes.
11807         (throw_bad_typeid): Likewise.
11808
11809         * semantics.c (expand_stmt): Only leave out rtl for unused
11810         artificials, and set DECL_IGNORED_P on them as well.
11811         * decl.c (wrapup_globals_for_namespace): Likewise.
11812
11813 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
11814
11815         * decl.c (maybe_commonize_var): Skip all artificial decls.
11816         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
11817
11818 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
11819
11820         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
11821         * cp-tree.h: Declare flag_enforce_eh_specs.
11822         * decl.c (store_parm_decls, finish_function): Check it.
11823
11824         C library functions don't throw.
11825         * Makefile.in (cfns.h): New target.
11826         (except.o): Depend on it.
11827         * Make-lang.in (cc1plus): Depend on cfns.gperf.
11828         * cfns.gperf: New file.
11829         * cfns.h: Generated.
11830         * except.c: Include it.
11831         (nothrow_libfn_p): New fn.
11832         * decl.c (grokfndecl): Use it.
11833         * cp-tree.h: Declare it.
11834
11835         * decl.c (push_overloaded_decl_1, auto_function,
11836         define_function): Lose.
11837         (build_library_fn_1): New static fn.
11838         (builtin_function): Use it.
11839         (get_atexit_node): Use build_library_fn_ptr.
11840         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
11841         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
11842         push_void_library_fn, push_throw_library_fn): New fns.
11843         * cp-tree.h: Declare them.
11844         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
11845         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
11846         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
11847         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
11848         * rtti.c (build_runtime_decl): Lose.
11849         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
11850         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
11851         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
11852
11853         * call.c (build_call): Remove result_type parm.
11854         Call mark_used on unused artificial fns.
11855         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
11856
11857 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
11858
11859         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
11860         appropriate.
11861         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
11862         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
11863         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
11864         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
11865         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
11866         expand_generic_desc): Likewise.
11867
11868 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11869
11870         * exception.cc (__cp_pop_exception): Cleanup the original object.
11871
11872 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11873
11874         * decl.c (grok_op_properties): Merge conversion to void warning
11875         with other silly op warnings.
11876
11877 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
11878
11879         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
11880         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
11881
11882 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11883
11884         * decl.c (cp_make_fname_decl): New function.
11885         (wrapup_globals_for_namespace): Don't emit unused static vars.
11886         (init_decl_processing): Remove comment about use of
11887         array_domain_type. Set make_fname_decl.
11888         (cp_finish_decl): Remove __FUNCTION__ nadgering.
11889         * semantics.c (begin_compound_stmt): Remove
11890         current_function_name_declared flagging.
11891         (expand_stmt): Don't emit unused local statics.
11892         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
11893         specially.
11894
11895 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
11896
11897         * typeck.c (convert_for_assignment): Don't look at array
11898         initializer.
11899         * call.c (convert_like_real): Likewise.
11900
11901 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
11902
11903         Add initial support for '\uNNNN' specifier.
11904         * lex.c (read_ucs): New fn.
11905         (readescape, skip_white_space): Call it.
11906         (is_extended_char, is_extended_char_1): New fns.
11907         (utf8_extend_token): New fn, #if 0'd out.
11908         (real_yylex): Treat extended chars like letters.
11909
11910         * search.c (note_debug_info_needed): Walk the bases even if we
11911         weren't deferring the type itself.
11912
11913 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11914
11915         * decl2.c (finish_objects): Constify a char*.
11916
11917         * method.c (emit_thunk): Likewise.
11918
11919 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
11920
11921         * typeck.c (dubious_conversion_warnings): Look through
11922         REFERENCE_TYPE.
11923
11924 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
11925
11926         * class.c (dfs_modify_vtables): I is now unsigned.
11927         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
11928         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
11929         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
11930         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
11931         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
11932         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
11933         Call integer_all_onesp.
11934         * typeck2.c (process_init_constructor): Use compare_tree_int.
11935
11936         * lang-specs.h (as): Don't call if -syntax-only.
11937
11938 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
11939
11940         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
11941         RTL_EXPR_HAS_NO_SCOPE after all.
11942
11943 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
11944
11945         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
11946         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
11947         RTL_EXPR_HAS_NO_SCOPE.
11948
11949         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
11950         later.
11951
11952         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
11953
11954 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
11955
11956         * call.c (convert_like): Macrofy.
11957         (convert_like_with_context): New macro.
11958         (convert_like_real): Renamed from convert_like.  Add calling
11959         context parameters, for diagnostics. Add recursive flag.  Call
11960         dubious_conversion_warnings for outer conversion.
11961         (build_user_type_conversion): Use convert_like_with_context.
11962         (build_over_call): Likewise. Don't warn about dubious
11963         conversions here. Adjust convert_default_arg calls.
11964         (convert_default_arg): Add context parameters for diagnostics.
11965         Pass through to convert_like_with_context.
11966         * cp-tree.h (convert_default_arg): Add context parameters.
11967         (dubious_conversion_warnings): Prototype new function.
11968         * typeck.c (convert_arguments): Adjust convert_default_arg call.
11969         (dubious_conversion_warnings): New function, broken
11970         out of convert_for_assignment.
11971         (convert_for_assignment): Adjust.
11972
11973 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
11974
11975         * decl2.c (key_method): Break out from...
11976         (import_export_vtable, import_export_class): ...here.
11977
11978         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
11979         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
11980
11981         * search.c (note_debug_info_needed, dfs_debug_mark,
11982         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
11983         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
11984
11985 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
11986
11987         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
11988         typos.
11989
11990 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
11991
11992         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
11993         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
11994         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
11995         (lang_type): Split gets_new into has_new and has_array_new.
11996         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
11997         (TYPE_GETS_NEW): Split into ...
11998         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
11999         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
12000         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
12001         (build_op_new_call): Don't declare.
12002         (build_new_1): Likewise.
12003         * call.c (build_op_new_call): Remove.
12004         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
12005         instead of TYPE_NEEDS_DESTRUCTOR.
12006         (finish_struct_bits): Likewise.
12007         (add_implicitly_declared_members): Likewise.
12008         (check_field_decl): Likewise.
12009         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
12010         correctly under the new ABI.
12011         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
12012         instead of TYPE_NEEDS_DESTRUCTOR.
12013         (initialize_local_var): Likewise.
12014         (destroy_local_var): Likewise.
12015         (cp_finish_decl): Likewise.
12016         (register_dtor_fn): Likewise.
12017         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
12018         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
12019         TYPE_VEC_DELETE_TAKES_SIZE here.
12020         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
12021         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
12022         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12023         (finish_destructor_body): Likewise.
12024         (maybe_build_cleanup_1): Likewise.
12025         * decl2.c (do_static_destruction): Likewise.
12026         * init.c (build_new_1): Make it static.
12027         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12028         (expand_cleanup_for_base): Likewise.
12029         (get_cookie_size): New function.
12030         (build_new_1): Handle array-new cookies correctly under the new
12031         ABI.
12032         (build_vec_delete_1): Likewise.
12033         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12034         (build_delete): Likewise.
12035         (build_vec_delete): Handle array-new cookies correctly under the new
12036         ABI.
12037         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12038         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
12039         TYPE_HAS_ARRAY_NEW_OPERATOR.
12040         * ptree.c (print_lang_type): Check them.
12041         * search.c (context_for_name_lookup): Fix typo in comment.
12042         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
12043         * tree.c (break_out_cleanups): Likewise.
12044         (build_cplus_array_test_1): Likewise.
12045         (cp_build_qualified_type_real): Likewise.
12046         * typeck.c (complete_type): Likewise.
12047
12048         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
12049         the command-line, not the end.
12050
12051 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
12052
12053         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
12054
12055 2000-03-02  Tom Tromey  <tromey@cygnus.com>
12056
12057         * cp-tree.h (build_java_class_ref): Declare.
12058         * init.c (build_java_class_ref): No longer static.
12059         * except.c (expand_throw): Generate a Java-style `throw' if the
12060         thrown object is a "Java" object.
12061         (initialize_handler_parm): Generate a Java-style lookup of
12062         exception info if the caught object is a "Java" object.
12063         (catch_language, catch_language_init): New globals.
12064         (decl_is_java_type): New function.
12065         (expand_start_catch_block): Don't call push_eh_info() or
12066         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
12067         class reference to build_catch_block.
12068
12069 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12070
12071         * typeck.c (comptypes): Treat sizetype like its language equivalent.
12072
12073 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
12074
12075         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
12076         to merge reference/pointer code and fix incorrect warnings.
12077
12078 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
12079
12080         * search.c (protected_accessible_p): Use context_for_name_lookup.
12081
12082         * init.c (construct_virtual_bases): Fix thinko.
12083         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
12084
12085 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12086
12087         * decl.c (current_function_decl): Move to toplev.c.
12088
12089 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
12090
12091         * pt.c (fn_type_unification): Unify return type, whenever
12092         provided.
12093         (get_bindings_real): Only pass return type when necessary.
12094         Remove explicit return type check.
12095         * class.c (resolve_address_of_overloaded_function): Pass desired
12096         return type to fn_type_unification.
12097
12098 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12099
12100         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
12101         DECL_FIELD_SIZE.
12102         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
12103         DECL_FIELD_SIZE.
12104         * rtti.c (expand_class_desc): Likewise.
12105         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
12106         (THUNK_VCALL_OFFSET): Likewise.
12107         (THUNK_DELTA): Reflect changes in ../tree.h.
12108
12109 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
12110
12111         * search.c (protected_accessible_p): Also allow the access if
12112         the member is public in DERIVED.  Lose TYPE parm.
12113         (friend_accessible_p): Lose TYPE parm.
12114         (accessible_p): Adjust.
12115
12116 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12117
12118         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
12119         on things that are not sizes; ssize_binop deleted.
12120         Call size_diffop when appropriate.
12121         (dfs_build_vcall_offset_vtbl_entries): Likewise.
12122         (build_primary_vtable, build_secondary_vtable): Likewise.
12123         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
12124         Variable I is HOST_WIDE_INT.
12125         (get_vfield_offset): Pass proper types to size_binop.
12126         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
12127         (finish_struct_1): Likewise.
12128         (skip_rtti_stuff): Arg N is now pointer to signed.
12129         (layout_class_type): Use size_zero_node.
12130         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
12131         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
12132         * decl.c (complete_arry_type): Pass proper types to size_binop.
12133         (xref_basetypes): BINFO_OFFSET is sizetype.
12134         * error.c (dump_expr): Don't use size_binop non-sizes.
12135         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
12136         * init.c (construct_virtual_bases): Fix type error.
12137         (build_vec_delete_1): Pass proper type to size_binop and don't
12138         fold result.
12139         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
12140         * rtti.c (get_base_offset): Pass proper type to size_binop.
12141         * search.c (dfs_find_vbases): Fix type error.
12142         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
12143         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
12144         * tree.c (debug_binfo): Variable N is signed.
12145         Use HOST_WIDE_INT_PRINT_DEC.
12146         * typeck.c (comptypes): sizetype is same as equivalent integer type.
12147         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
12148         size_one_node and size_zero_node.
12149         (c_alignof): Use size_one_node.
12150         (build_component_addr): Pass proper types to size_binop.
12151         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
12152
12153 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
12154
12155         Implement class scope using-declarations for functions.
12156         * class.c (handle_using_decl): Call add_method for used functions.
12157         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
12158         (add_method): Used functions are hidden by local functions.
12159         (check_bases_and_members): Handle using-decls before finalizing
12160         CLASSTYPE_METHOD_VEC.
12161         * call.c (add_function_candidate): Add ctype parm; if non-zero,
12162         override the type of 'this' accordingly.
12163         (add_template_candidate, add_template_candidate_real): Add ctype parm.
12164         (convert_class_to_reference, build_user_type_conversion_1,
12165         build_new_function_call, build_object_call, build_new_op,
12166         build_new_method_call): Pass ctype parm.
12167
12168         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
12169         the baselink.
12170         * call.c (convert_class_to_reference, build_user_type_conversion_1,
12171         build_new_function_call, build_object_call, build_new_op,
12172         build_new_method_call, build_op_delete_call): Don't get basetype_path
12173         from a baselink.
12174         * typeck.c (build_component_ref): Likewise.
12175         * init.c (build_offset_ref): Likewise.
12176         (resolve_offset_ref): Don't call enforce_access.
12177         Call build_scoped_ref.
12178         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
12179         would cause an error or if -pedantic.
12180         * class.c (alter_access): Lose binfo parm.
12181
12182 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
12183
12184         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
12185         types.
12186
12187 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
12188
12189         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
12190         pseudo_type_info creation into the std namespace
12191
12192 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
12193
12194         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
12195         (import_export_class): Remove declaration.
12196         * decl2.c (import_export_class): Make it static.
12197         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
12198         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
12199         EXPR_WITH_FILE_LOCATION.
12200         * lex.c (check_newline): Tweak filename/lineno setting.
12201         * semantics.c (begin_while_stmt): Fix typo in comment.
12202
12203 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12204
12205         * lang-options.h (-fmessage-length=): Add missing option.
12206
12207         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
12208
12209 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
12210
12211         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
12212
12213 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
12214
12215         * optimize.c (expand_call_inline): Emit the return label before
12216         evaluating the return value.
12217
12218 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
12219
12220         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
12221         than duplicating functionality here.
12222         * optimize.c: Include input.h.
12223         (expand_call_inline): Use push_srcloc and pop_srcloc.
12224         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
12225         * parse.c: Regenerated.
12226         * Makefile.in (lex.o): Depend on input.h.
12227         (optimize.o): Likewise.
12228
12229 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
12230
12231         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
12232         function type, rather than ICE.
12233
12234 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
12235
12236         * decl.c (grokdeclarator): Call decl_type_access_control.
12237         * parse.y (parse_end_decl): Don't call decl_type_access_control if
12238         decl is null.
12239
12240 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
12241
12242         * decl.c (decls_match): Remove obsolete static member nadgering.
12243
12244 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
12245
12246         * decl.c (grokdeclarator): Change ANSI to ISO.
12247         * lex.c (consume_string, readescape, do_identifier): Likewise.
12248         (parse_float, real_yylex): Likewise.
12249         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
12250         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
12251         new_type_id, maybe_label_decls, simple_stmt,
12252         for.init.statement): Likewise.
12253         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
12254         * semantics.c (finish_named_return_value): Likewise.
12255         * parse.c: Regenerate.
12256
12257 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
12258
12259         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
12260         (CPTI_CLASS_STAR_TYPE): Remove.
12261         (vtable_index_type): Likewise.
12262         (class_star_type_node): Remove.
12263         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
12264         (build_binary_op_nodefault): Remove.
12265         * call.c (build_new_op): Use build_binary_op instead of
12266         build_binary_op_nodefault.
12267         * decl.c (init_decl_processing): Remove class_star_type_node
12268         initialization.  Make delta_type_node ptrdiff_type_node under the
12269         new ABI.  Initialize vtable_index_type.
12270         (build_ptrmemfunc_type): Build different structures for the new
12271         ABI.
12272         (build_enumerator): Use build_binary_op instead of
12273         build_binary_op_nodefault.
12274         * method.c (build_overload_value): Mangle pointers-to-members
12275         appropriately under the new ABI.
12276         * typeck.c (build_array_ref): Use build_binary_op instead of
12277         build_binary_op_nodefault.
12278         (get_member_function_from_ptrfunc): Adjust for the new ABI.
12279         (build_binary_op_nodefault): Rename to ...
12280         (build_binary_op): ... this.  Remove old version.  Adjust for
12281         pointer-to-member comparisons under the new ABI.
12282         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
12283         (build_ptrmemfunc): Adjust for the new ABI.
12284         (expand_ptrmemfunc_cst): Likewise.
12285         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
12286         (pfn_from_ptrmemfunc): Adjust for the new ABI.
12287
12288 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
12289
12290         * call.c (build_object_call): Compress consecutive calls to
12291         cp_error.
12292         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
12293         (build_op_delete_call): Adjust message formatting.
12294
12295         * class.c (check_bases): Compress consecutive calls to
12296         cp_pedwarn.
12297         (finish_struct_anon): Say 'ISO C++'.
12298
12299         * decl.c (start_decl): Same here.
12300         (grok_reference_init): Likewise.
12301         (grokfndecl): Correct message formatting.
12302         (grokfndecl): Improve diagnostic.
12303         (check_static_variable_definition): Likewise. Say 'ISO C++'
12304         (compute_array_index_type): Say 'ISO C++'
12305         (create_array_type_for_decl): Compress consecutive calls to
12306         cp_error.
12307         (grokdeclarator): Say 'ISO C++'
12308         (grok_op_properties): Likewise.
12309
12310         * decl2.c (delete_sanity): Clairify diagnostic.
12311         (check_member_template): Same here.
12312         (grok_function_init): Use consistent terminology.
12313
12314         * expr.c (do_case): Say 'ISO C++'
12315
12316         * friend.c (do_friend): Compress consecutive calls to warning.
12317
12318 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
12319
12320         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
12321         * class.c (build_secondary_vtable): Reorganize.  Don't create a
12322         new vtable under the new ABI.
12323         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
12324         computing the size.
12325         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
12326         the initializing elements.
12327         (initialize_vtable): New function.
12328         (dfs_finish_vtbls): Use it.
12329         (dfs_accumulate_vtbl_inits): New function.
12330         (finish_vtbls): Merge primary and secondary vtables under the new
12331         ABI.
12332         (finish_struct_1): Remove redundant call to layout_vtable_decl.
12333         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
12334         aren't VAR_DECLs.
12335
12336         * class.c (build_vtable): New function, split out from ...
12337         (get_vtable_decl): ... here, and ...
12338         (build_secondary_vtable): ... here.
12339
12340         * pt.c (tsubst_decl): Fix formatting.
12341
12342 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
12343
12344         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
12345         (avoid_overlap, build_base_field): Likewise.
12346         (build_base_field, build_base_fields, is_empty_class):
12347         Test DECL_SIZE with integer_zero.
12348         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
12349         * cp-tree.h (struct lang_type): New field size_unit.
12350         (CLASSTYPE_SIZE_UNIT): New macro.
12351         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
12352         (cp_finish_decl): Delete -Wlarger-than processing.
12353         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
12354         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
12355         * tree.c (make_binfo): binfo vector is one entry longer.
12356         (walk_tree): Walk DECL_SIZE_UNIT.
12357
12358 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
12359
12360         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
12361         comment.
12362         (build_vtable_entry): Don't assume all vtable entries are
12363         functions.
12364         (build_vtbl_initializer): Adjust accordingly.
12365         (get_vtable_decl): Fix formatting.
12366
12367 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
12368
12369         * semantics.c (deferred_type_access_control): Walk the entire
12370         type_lookups list.
12371         (save_type_access_control): Rename from
12372         initial_deferred_type_access_control.  Just remember the value.
12373         (decl_type_access_control): New fn.
12374         (begin_function_definition): Use deferred_type_access_control, after
12375         we've started the function.  Set type_lookups to error_mark_node.
12376         * parse.y (frob_specs, fn.def1): Adjust.
12377         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
12378         (parse_end_decl, parse_bitfield0, parse_method): New fns.
12379         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
12380         (after_type_component_declarator0): Likewise.
12381         (after_type_component_declarator): Likewise.
12382         (notype_component_declarator): Likewise.
12383         * cp-tree.h: Adjust.
12384
12385         * decl.c (redeclaration_error_message): Allow redeclaration of
12386         namespace-scope decls.
12387
12388 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
12389
12390         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
12391
12392 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
12393
12394         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
12395         * decl2.c (grokclassfn): Likewise.
12396
12397         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
12398
12399         * decl2.c (lang_decode_option): Don't set default message length
12400         here.
12401         * lex.c (lang_init_options): Set it here.
12402
12403 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
12404
12405         Make DECL_CONTEXT mean the class in which a member function was
12406         declared, even for a virtual function.
12407         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
12408         (DECL_FRIEND_CONTEXT): New macro.
12409         (DECL_REAL_CONTEXT): Remove.
12410         (SET_DECL_FRIEND_CONTEXT): Likewise.
12411         (DECL_VIRTUAL_CONTEXT): Adjust.
12412         (DECL_CLASS_SCOPE_P): Use TYPE_P.
12413         (add_friends): Remove.
12414         (hack_decl_function_context): Likewise.
12415         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
12416         CP_DECL_CONTEXT.
12417         (build_over_call): Fix indentation.  Use DECL_CONTEXT
12418         instead of DECL_CLASS_CONTEXT.
12419         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
12420         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
12421         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
12422         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
12423         (build_base_field): Likewise.
12424         (finish_struct_1): Likewise.
12425         (build_self_reference): Likewise.
12426         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
12427         DECL_REAL_CONTEXT.
12428         (pushtag): Use decl_function_context, not
12429         hack_decl_function_context.
12430         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
12431         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
12432         (pushdecl): Remove bogus code.
12433         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
12434         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
12435         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
12436         Use decl_function_context, nothack_decl_function_context.
12437         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
12438         (grokdeclarator): Likewise.  Use decl_function_context, not
12439         hack_decl_function_context.
12440         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
12441         (start_function): Use DECL_FRIEND_CONTEXT, not
12442         DECL_CLASS_CONTEXT.  Use decl_function_context, not
12443         hack_decl_function_context.
12444         (finish_function): Use decl_function_context, not
12445         hack_decl_function_context.
12446         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
12447         DECL_CLASS_CONTEXT.
12448         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
12449         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
12450         (grokfield): Likewise.
12451         (finish_builtin_type): Likewise.
12452         (finish_vtable_vardec): Use decl_function_context, not
12453         hack_decl_function_context.
12454         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
12455         (start_static_initialization_or_destruction): Likewise.
12456         (finish_static_initialization_or_destruction): Likewise.
12457         (mark_used): Adjust logic for deciding when to synthesize methods.
12458         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
12459         DECL_REAL_CONTEXT.
12460         * error.c (dump_function_decl): Use DECL_CONTEXT, not
12461         DECL_CLASS_CONTEXT.
12462         * friend.c (is_friend): Likewise.
12463         (add_friends): Remove.
12464         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
12465         * lex.c (begin_definition_of_inclass_inline): Use
12466         decl_function_context, not hack_decl_function_context.
12467         (process_next_inline): Likewise.
12468         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
12469         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
12470         DECL_CLASSS_CONTEXT.
12471         (hack_identifier): Likewise.
12472         (synthesize_method):  Use decl_function_context, not
12473         hack_decl_function_context.
12474         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
12475         DECL_REAL_CONTEXT.
12476         (is_member_template): Use decl_function_context, not
12477         hack_decl_function_context.  Use DECL_CONTEXT, not
12478         DECL_CLASS_CONTEXT.
12479         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
12480         DECL_CLASS_CONTEXT.
12481         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
12482         DECL_REAL_CONTEXT.
12483         (push_template_decl_real): Likewise.
12484         (instantiate_class_template): Don't call add_friends.
12485         (tsubst_default_argument): Use DECL_CONTEXT, not
12486         DECL_REAL_CONTEXT.
12487         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
12488         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
12489         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
12490         DECL_CLASS_CONTEXT.
12491         * repo.c (repo_inline_used): Likewise.
12492         * search.c (current_scope): Adjust for new _CONTEXT macros.
12493         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
12494         DECL_REAL_CONTEXT.
12495         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
12496         (lookup_fnfields_here):Likewise.
12497         (check_final_overrider): Likewise.
12498         (init_vbase_pointers): Likewise.
12499         (virtual_context): Likewise.
12500         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
12501         (expand_body): Use decl_function_context, not
12502         hack_decl_function_context.
12503         * tree.c (hack_decl_function_context): Remove.
12504         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
12505         DECL_CLASS_CONTEXT.
12506         * typeck2.c (error_not_base_type): Likewise.
12507
12508 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
12509
12510         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
12511
12512 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12513
12514         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
12515
12516 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
12517
12518         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
12519
12520 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
12521
12522         * decl2.c (lang_decode_option): Enable automatic line wrapping.
12523
12524 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
12525
12526         * parse.y (frob_specs): Split out...
12527         (parse_decl): From here.
12528         (fn.def2): Call initial_deferred_type_access_control.
12529         (after_type_component_declarator0): Call frob_specs.
12530         (notype_component_declarator0): Likewise.
12531         * search.c (friend_accessible_p): Nested classes are friends of their
12532         enclosing classes.
12533
12534 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
12535
12536         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
12537         used to create an implicit temporary.
12538
12539         * class.c (dfs_modify_vtables): Tweak calculation of functions to
12540         override.
12541
12542 2000-02-08  Nathan Sidwell  <nathan@acm.org>
12543
12544         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
12545         strip array element qualifiers too.
12546
12547 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
12548
12549         * decl.c (store_parm_decls): Don't build cleanups for parameters
12550         while processing_template_decl.
12551
12552 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
12553
12554         * cp-tree.h (struct saved_scope): Add incomplete field.
12555         (namespace_scope_incomplete): New macro.
12556         * decl.c (pushdecl): Use it.
12557         (hack_incomplete_structures): Use it.  See through artificial
12558         binding levels.
12559         (mark_saved_scope): Mark it.
12560
12561         Implement access control for nested types.
12562         * search.c (type_access_control): New fn.
12563         (accessible_p): Now we do perform access control for types.
12564         * semantics.c (deferred_type_access_control): New fn.
12565         (initial_deferred_type_access_control): New fn.
12566         (begin_function_definition): Call it.  Add lookups parm.
12567         * decl.c (struct binding_level): Add this_class field.
12568         (pushlevel_class): Set it.
12569         (mark_binding_level): Mark it.
12570         (lookup_name_real): Use it.  Call type_access_control.
12571         (mark_saved_scope): Mark lookups field.
12572         * cp-tree.h (flagged_type_tree): Add lookups field.
12573         (struct saved_scope): Add lookups field.
12574         (type_lookups): New macro.
12575         * parse.y (declmods): Now <ftype>.
12576         (parse_decl): Add lookups parm.  Call
12577         initial_deferred_type_access_control.
12578         (lang_extdef): Clear type_lookups.
12579         (typed_declspecs, declmods, typespec): Set lookups field.
12580         (initdcl): Call deferred_type_access_control.
12581         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
12582         component_decl_1, named_parm): Adjust.
12583         * friend.c (is_friend): Nested classes are friends of their
12584         enclosing classes.
12585
12586         * class.c (currently_open_derived_class): New fn.
12587         * method.c (hack_identifier): Use it.
12588
12589         * lex.c (do_identifier): Remove obsolete code.
12590
12591         * parse.y (typed_typespecs): Propagate new_type_flag properly.
12592
12593 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
12594
12595         * tinfo.h: Remove apostrophes from C++ comment (xgettext
12596         thinks this file is plain C).
12597
12598 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12599
12600         * Makefile.in (call.o): Depend on $(EXPR_H).
12601
12602         * call.c: Include "expr.h".
12603
12604         * class.c (dump_class_hierarchy): Add prototype.
12605
12606         * search.c (dfs_get_pure_virtuals): Likewise.
12607
12608 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
12609
12610         * parse.y (simple_stmt): Allow :: token in asm parameter list.
12611         * parse.c: Rebuilt.
12612
12613 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
12614
12615         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
12616         Store it in DECL_FCONTEXT.
12617         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
12618
12619 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
12620
12621         * tinfo.h (old abi): #include "tconfig.h".
12622         * tinfo.cc (convert_to_base): Move into old abi section.
12623
12624 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
12625
12626         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
12627         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
12628         (BINFO_PRIMARY_BINFO): New macro.
12629         (BF_DELTA): Rename to ...
12630         (BV_DELTA): ... this.
12631         (BF_VCALL_INDEX): Rename to ...
12632         (BV_VCALL_INDEX): ... this.
12633         (BF_FN): Rename to ...
12634         (BV_FN): ... this.
12635         * class.c (build_vbase_path): Adjust for changes to reverse_path.
12636         (set_rtti_entry): Rename BF_ macros to BV_ variants.
12637         (modify_vtable_entry): Simplify.
12638         (add_virtual_function): Rename BF_ macros to BV_ variants.
12639         (build_vtable_initializer): Likewise.
12640         (get_class_offset_1): Remove.
12641         (dfs_get_class_offset): Likewise.
12642         (get_class_offset): Likewise.
12643         (dfs_find_final_overrider): New function.
12644         (find_final_overrider): Likewise.
12645         (modify_one_vtable): Remove.
12646         (dfs_find_base): New function.
12647         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
12648         find_final_overrider.
12649         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
12650         virtuals.
12651         (dfs_fixup_vtable_deltas): Remove.
12652         (override_one_vtable): Remove.
12653         (merge_overrides): Likewise.
12654         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
12655         unreal chilren of virtual bases.
12656         (finish_struct_1): Don't use merge_overrides.  Don't use
12657         dfs_fixup_vtable_deltas.
12658         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
12659         BINFOs.
12660
12661 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
12662             Jason Merrill  <jason@yorick.cygnus.com>
12663
12664         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
12665
12666 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
12667
12668         * exception.cc (__throw_bad_typeid): Add missing std::.
12669
12670 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12671
12672         * cp-tree.h (make_thunk): PROTO -> PARAMS.
12673
12674 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
12675
12676         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
12677
12678         Runtime support for new-abi rtti.
12679         * inc/typeinfo (type_info::operator!=): Define in class.
12680         (type_info::before, type_info::name, type_info::operator==,
12681         type_info::operator!=): Define new ABI implementations.
12682         (type_info::is_pointer_p, type_info::is_function_p): Declare
12683         new virtual functions.
12684         (type_info::do_catch, type_info::do_upcast): Likewise.
12685
12686         * tinfo.h (__base_class_info): Define new class.
12687         (__class_type_info): Likewise.
12688         (__si_class_type_info): Likewise.
12689         (__vmi_class_type_info): Likewise.
12690         (__dynamic_cast): Prototype.
12691
12692         * tinfo.cc: Conditionalize old and new rtti mechanisms.
12693         (type_info::is_pointer_p): Define new function.
12694         (type_info::is_function_p): Likewise.
12695         (type_info::do_catch): Likewise.
12696         (type_info::do_upcast): Likewise.
12697         (vtable_prefix): New structure for vtable access.
12698         (adjust_pointer): Define new template function.
12699         (contained_p, public_p, virtual_p, contained_public_p,
12700         contained_nonpublic_p, contained_nonvirtual_p): Define new
12701         functions.
12702         (nonvirtual_base_type): New local variable.
12703         (__class_type_info::~__class_type_info): Define.
12704         (__si_class_type_info::~__si_class_type_info): Likewise.
12705         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
12706         (__class_type_info::do_catch): Define new function.
12707         (__class_type_info::do_upcast): Likewise.
12708         (__class_type_info::find_public_src): Likewise.
12709         (__class_type_info::do_find_public_src): Likewise.
12710         (__si_class_type_info::do_find_public_src): Likewise.
12711         (__vmi_class_type_info::do_find_public_src): Likewise.
12712         (__class_type_info::do_dyncast): Likewise.
12713         (__si_class_type_info::do_dyncast): Likewise.
12714         (__vmi_class_type_info::do_dyncast): Likewise.
12715         (__class_type_info::do_upcast): Likewise.
12716         (__si_class_type_info::do_upcast): Likewise.
12717         (__vmi_class_type_info::do_upcast): Likewise.
12718         (__dynamic_cast): Likewise.
12719
12720         * tinfo2.cc (__fundamental_type_info): Define new class.
12721         (__pointer_type_info): Likewise.
12722         (__reference_type_info): Likewise.
12723         (__array_type_info): Likewise.
12724         (__function_type_info): Likewise.
12725         (__enum_type_info): Likewise.
12726         (__ptr_to_member_type_info): Likewise.
12727         (__fundamental_type_info::~__fundamental_type_info): Define.
12728         (__pointer_type_info::~__pointer_type_info): Likewise.
12729         (__reference_type_info::~__reference_type_info): Likewise.
12730         (__array_type_info::~__array_type_info): Likewise.
12731         (__function_type_info::~__function_type_info): Likewise.
12732         (__enum_type_info::~__enum_type_info): Likewise.
12733         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
12734         (__pointer_type_info::do_catch): Define new function.
12735         (__ptr_to_member_type_info::do_catch): Define new function.
12736
12737         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
12738         (__is_pointer): Likewise.
12739
12740         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
12741
12742 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
12743
12744         * cp/class.c (build_vtable): Rename to build_primary_vtable.
12745         (prepare_fresh_vtable): Rename to build_secondary_vtable.
12746         (make_new_vtable): New function.
12747         (modify_vtable_entry): Handle generation of new vtables correctly.
12748         (modify_one_vtable): Remove unused parameter.
12749         (dfs_fixup_vtable_deltas): Likewise.
12750         (override_one_vtable): Use build_secondary_vtable.
12751         (finish_struct_1): Use build_primary_vtable and
12752         build_secondary_vtable.
12753
12754 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
12755
12756         * cp/decl.c: Adjust variable names, comments, help strings.
12757
12758 2000-01-29  Nathan Sidwell  <nathan@acm.org>
12759
12760         * new2.cc (operator delete[]): Use operator delete, don't assume
12761         implementation.
12762
12763 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
12764
12765         * class.c (build_vtbl_initializer): Add argument to
12766         build_vtable_entry call.
12767
12768 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
12769
12770         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
12771         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
12772         (BF_DELTA): New macro.
12773         (BF_VCALL_INDEX): Likewise.
12774         (BF_FN): Likewise.
12775         (THUNK_VCALL_OFFSET): Likewise.
12776         (make_thunk): Change prototype.
12777         * class.c (build_vtable_entry): Integrate
12778         build_vtable_entry_for_fn.  Handle vcall indices.
12779         (build_vtable_entry_for_fn): Remove.
12780         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
12781         BF_VCALL_INDEX, BF_FN.
12782         (modify_vtable_entry): Integrate common code from
12783         modify_one_vtable and dfs_fixup_vtable_deltas.
12784         (add_virtual_function): Set BF_VCALL_INDEX.
12785         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
12786         and BF_FN.
12787         (modify_one_vtable): Simplify.
12788         (dfs_fixup_vtable_deltas): Likewise.
12789         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
12790         * method.c (make_thunk): Handle vcall indices.
12791
12792 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
12793
12794         Compiler side new abi rtti (not enabled).
12795         * cp-tree.h (new_abi_rtti_p): New macro.
12796         (emit_support_tinfos): Prototype new function.
12797         (tinfo_decl_p): Likewise.
12798         (emit_tinfo_decl): Likwise.
12799         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
12800         macros.
12801         (doing_runtime): New local static.
12802         (init_rtti_processing): Add new-abi initializer.
12803         (get_tinfo_decl): Add new-abi logic.
12804         (tinfo_from_decl): Likewise.
12805         (build_dynamic_cast_1): Likewise.
12806         (qualifier_flags): New static function.
12807         (tinfo_base_init): Likewise.
12808         (generic_initializer): Likewise.
12809         (ptr_ref_initializer): Likewise.
12810         (ptmd_initializer): Likewise.
12811         (class_hint_flags): Likewise.
12812         (class_initializer): Likewise.
12813         (synthesize_tinfo_var): Likewise.
12814         (create_real_tinfo_var): Likewise.
12815         (create_pseudo_type_info): Likewise.
12816         (get_vmi_pseudo_type_info): Likewise.
12817         (create_tinfo_types): Likewise.
12818         (emit_support_tinfos): New global function.
12819         (tinfo_decl_p): New global predicate.
12820         (emit_tinfo_decl): New global function.
12821         * class.c (set_rtti_entry): Generalize for old and new rtti.
12822         (build_vtbl_initializer): Likewise.
12823         * decl2.c (finish_file): Likewise.
12824
12825 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
12826
12827         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
12828         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
12829
12830 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
12831
12832         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
12833         for scopes.
12834
12835 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
12836
12837         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
12838
12839 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
12840
12841         * optimize.c (calls_setjmp_r): Supply new argument
12842         to special_function_p.
12843
12844 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12845
12846         * call.c: PROTO -> PARAMS.
12847         * class.c: Likewise.
12848         * cp-tree.h: Likewise.
12849         * cvt.c: Likewise.
12850         * decl.c: Likewise.
12851         * decl.h: Likewise.
12852         * decl2.c: Likewise.
12853         * dump.c: Likewise.
12854         * errfn.c: Likewise.
12855         * error.c: Likewise.
12856         * except.c: Likewise.
12857         * expr.c: Likewise.
12858         * init.c: Likewise.
12859         * input.c: Likewise.
12860         * lex.c: Likewise.
12861         * lex.h: Likewise.
12862         * method.c: Likewise.
12863         * optimize.c: Likewise.
12864         * parse.y: Likewise.
12865         * pt.c: Likewise.
12866         * repo.c: Likewise.
12867         * rtti.c: Likewise.
12868         * search.c: Likewise.
12869         * semantics.c: Likewise.
12870         * spew.c: Likewise.
12871         * tree.c: Likewise.
12872         * typeck.c: Likewise.
12873         * typeck2.c: Likewise.
12874         * xref.c: Likewise.
12875
12876 2000-01-25  Richard Henderson  <rth@cygnus.com>
12877
12878         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
12879
12880 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
12881
12882         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
12883         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
12884         (struct vcall_offset_data_s): New type.
12885         (dfs_vcall_offset_queue_p): New function.
12886         (dfs_build_vcall_offset_vtbl_entries): Likewise.
12887         (build_vcall_offset_vtbl_entries): Likewise.
12888         (layout_vtable_decl): Likewise.
12889         (num_vfun_entries): Likewise.
12890         (num_extra_vtbl_entries): Add the entries for vcall offsets.
12891         (build_vtbl_initializer): Likewise.
12892         (dfs_finish_vtabls): Use layout_vtable_decl.
12893         (modify_one_vtables): Always duplicate vtables under the new ABI.
12894         (finish_struct_1): Use layout_vtable_decl.
12895
12896 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
12897
12898         * decl.c (member_function_or_else): Change third arg from a format
12899         specifier to an `enum overload_flags'.  Callers changed.
12900
12901 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
12902
12903         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
12904         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
12905         build_const_cast, get_delta_difference, check_return_expr): Avoid
12906         ANSI string concatenation usage.
12907
12908 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
12909
12910         * class.c (layout_class_type): Put the fields required to make a
12911         class non-empty at the end, not the beginning, of the TYPE_FIELDs
12912         list.
12913
12914 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
12915
12916         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
12917         template.
12918
12919         * decl2.c (mark_used): Do instantiate inlines that have been
12920         explicitly instantiated.
12921
12922 2000-01-24  Richard Henderson  <rth@cygnus.com>
12923
12924         * call.c (build_over_call): Use expand_tree_builtin.
12925         * typeck.c (build_function_call_real): Likewise.
12926         (build_binary_op_nodefault): Handle unordered compares.
12927
12928 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
12929
12930         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
12931         cp_tree_index values.
12932         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
12933         New global node #defines for them.
12934         * rtti.c (call_void_fn): Replace with ...
12935         (build_runtime_decl): ... new static function.
12936         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
12937         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
12938         (build_dynamic_cast_1): Always produce correctly typed result.
12939         Explicitly produce type_info addresses. Use dynamic_cast_node.
12940         * exception.cc (__throw_bad_cast): Return `void *'.
12941         (__throw_bad_typeid): Return `const type_info &'.
12942
12943 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
12944
12945         * cp-tree.h (get_vtable_decl): Prototype new function.
12946         * class.c (get_vtable_decl): New function. Broken out from ...
12947         (build_vtable): ... here. Use it.
12948         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
12949         by get_vtable_decl.
12950
12951 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
12952
12953         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
12954         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
12955         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
12956         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
12957         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
12958         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
12959         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
12960         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
12961         (CPTI_TINFO_VAR_ID): New enumeration.
12962         (__tp_desc_type_node, __access_mode_type_node,
12963         __bltn_desc_type_node, __user_desc_type_node,
12964         __class_desc_type_node, __ptr_desc_type_node,
12965         __attr_desc_type_node, __func_desc_type_node,
12966         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
12967         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
12968         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
12969         enum_desc_type_node, class_desc_type_node,
12970         si_class_desc_type_node, vmi_class_desc_type_node,
12971         ptmd_desc_type_node, base_desc_type_node): New #defines.
12972         (tinfo_fn_id, tinfo_fn_type): Rename to ...
12973         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
12974         (tinfo_var_id): New enumeration.
12975         (DECL_TINFO_FN_P): Augment comment.
12976         * decl.c (cp_global_trees): Adjust documentation.
12977         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
12978         tinfo_decl_type and tinfo_var_id.
12979         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
12980         (build_typeid): Remove unused variable.
12981         (get_tinfo_var): Use tinfo_var_id.
12982         (tinfo_name): New static function.
12983         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
12984         (tinfo_from_decl): Likewise.
12985         (get_base_offset): New static function, broken out of
12986         expand_class_desc.
12987         (expand_si_desc): Use tinfo_name.
12988         (expand_class_desc): Likewise. Lose local static variable.
12989         Use base_desc_type_node. Use get_base_offset.
12990         (expand_ptr_desc): Use tinfo_name.
12991         (expand_attr_desc): Likewise.
12992         (expand_generic_desc): Likewise.
12993
12994         * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
12995         * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
12996
12997 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
12998
12999         * cp-tree.h (__eprintf): Remove declaration.
13000         * tree.c (__eprintf): Remove definition.
13001
13002 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
13003             Mark Mitchell  <mark@codesourcery.com>
13004
13005         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
13006         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
13007
13008 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
13009
13010         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
13011
13012 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
13013
13014         * cp-tree.h (register_dtor_fn): New function.
13015         * decl.c (destroy_local_static): Rename to ...
13016         (register_dtor_fn): ... this.  Give it external linkage.
13017         (expand_static_init): Use it.
13018         * decl2.c (do_static_initialization): Likewise, if using
13019         __cxa_atexit.
13020         (do_static_destruction): Check that __cxa_atexit is not in use.
13021         (finish_file): Don't call do_static_destruction if using
13022         __cxa_atexit.
13023
13024         * typeck.c (convert_arguments): Restore two-message error
13025         reporting.
13026
13027 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
13028
13029         Remap dynamic cast hint values to be consistent across ABIs.
13030         * search.c (dynamic_cast_base_recurse): Remap generated value.
13031         (get_dynamic_cast_base_type): Adjust documentation.
13032         * tinfo.h (__user_type_info::dyncast): Likewise.
13033         (__user_type_info::find_public_subobj): Remap BOFF meaning.
13034         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
13035         (__class_type_info::do_dyncast): Likewise.
13036         (__class_type_info::do_find_public_subobj): Likewise.
13037         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
13038
13039 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
13040
13041         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
13042
13043         * typeck2.c (incomplete_type_error): Restore previous
13044         cp_error and cp_error_at call sequence.
13045
13046 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
13047
13048         * class.c (dump_class_hierarchy): Make format agree with argument;
13049         cast pointer to unsigned long and print with %lx.
13050
13051 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
13052
13053         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
13054
13055         * typeck.c (composite_pointer_type, common_type,
13056         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
13057         build_function_call_real, convert_arguments,
13058         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
13059         build_unary_op, mark_addressable, build_compound_expr,
13060         build_static_cast, build_reinterpret_cast, build_const_cast,
13061         build_c_cast, build_modify_expr, get_delta_difference,
13062         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
13063         'ISO C++'.  Fusion consecutive calls to diagnostic message routines
13064         into a single one.
13065         * typeck2.c (readonly_error, abstract_virtuals_error,
13066         process_init_constructor, check_for_new_type): Likewise.
13067
13068 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
13069
13070         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
13071         VAR_DECLs.
13072
13073 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
13074
13075         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
13076         (build_x_typeid): Likewise.
13077         (get_tinfo_fn): Likewise.
13078         (get_tinfo_fn_unused): Rename to ...
13079         (get_tinfo_decl): ... here.
13080         * rtti.c (build_headof): Replace logic error with assertion.
13081         (get_tinfo_fn_dynamic): Rename to ...
13082         (get_tinfo_decl_dynamic): ... here. Make static. Use
13083         complete_type_or_else.
13084         (build_x_typeid): Move into ...
13085         (build_typeid): ... here. Adjust call to
13086         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
13087         throw_bad_typeid expression.
13088         (get_tinfo_fn_unused): Rename to ...
13089         (get_tinfo_decl): ... here. Adjust comment.
13090         (get_tinfo_fn): Delete.
13091         (tinfo_from_decl): New static function.
13092         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
13093         (get_typeid): Use complete_type_or_else.
13094         (build_dynamic_cast_1): Adjust calls to
13095         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
13096         * parse.y (primary): Adjust call to build_typeid.
13097         * except.c (build_eh_type_type_ref): Adjust call to
13098         get_tinfo_decl. Mark as used.
13099         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
13100         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
13101         * parse.c: Regenerated.
13102
13103 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
13104
13105         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
13106         calling convention.
13107         (resolves_to_fixed_type_p): Document calling convention.
13108         * rtti.c (build_x_typeid): Initialize NONNULL.
13109
13110         * cp-tree.h (build_shared_int_cst): New function.
13111         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
13112         * class.c (modify_vtable_entry): Likewise.
13113         (add_virtual_function): Split out code to generated shared
13114         INTEGER_CSTs to build_share_int_cst.
13115         (modify_all_vtables): Handle all the overridden functions here.
13116         Add overridden functions from non-primary virtual bases to the
13117         primary vtable.
13118         (finish_struct_1): Adjust call to modify_all_vtables.  Add
13119         overridden functions from non-primary bases to the vtable.
13120         * tree.c (build_shared_int_cst): New function.
13121
13122         * cp-tree.h (scratchalloc): Remove.
13123         (build_scratch_list): Likewise.
13124         * call.c (convert_class_to_reference): Replace build_scratch_list
13125         and build_expr_list with build_tree_list.
13126         (add_candidate): Replace scratchalloc with expralloc.  Note memory
13127         leak.
13128         (build_user_type_conversion_1):  Replace build_scratch_list
13129         and build_expr_list with build_tree_list.
13130         (build_new_op): Likewise.
13131         (build_op_delete_call): Likewise.
13132         (convert_like): Likewise.
13133         * cvt.c (ocp_convert): Likewise.
13134         * decl.c (start_decl): Likewise.
13135         (start_function): Likewise.
13136         (finish_destructor_body): Likewise.
13137         (maybe_build_cleanup_1): Likewise.
13138         * decl2.c (reparse_decl_as_expr): Likewise.
13139         * init.c (perform_member_init): Likewise.
13140         (expand_cleanup_for_base): Likewise.
13141         (build_builtin_delete_call): Likewise.
13142         (build_new_1): Likewise.
13143         (build_delete): Likewise.
13144         * method.c (do_build_assign_ref): Likewise.
13145         * parse.y (already_scoped_stmt): Likewise.
13146         (nontrivial_exprlist): Likewise.
13147         (net_initializer): Likewise.
13148         (initlist): Likewise.
13149         * parse.c: Regenerated.
13150         * rtti.c (build_x_typeid): Likewise.
13151         (build_dynamic_cast_1): Likewise.
13152         * typeck.c (build_x_compound_expr): Likewise.
13153         (build_static_cast): Likewise.
13154         (build_modify_expr): Likewise.
13155
13156         * cp-tree.h (DECL_VINDEX): Add documentation.
13157         * class.c (build_vtable_entry): Likewise.
13158         (start_vtable): Add comment.
13159         (add_virtual_function): Replace pending_hard_virtuals with
13160         overridden_virtuals and pending_virtuals with new_virtuals.
13161         Replace redundant assignments with assertions.
13162         (check_for_override): Add comment.
13163         (check_bases_and_members): Replace pending_hard_virtuals with
13164         overridden_virtuals and pending_virtuals with new_virtuals.
13165         (create_vtbl_ptr): Likewise.
13166         (layout_class_type): Likewise.
13167         (finish_struct_1): Likewise.  Add comments.
13168
13169 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
13170
13171         * class.c (finish_struct_1): Replace redundant code with
13172         assertions.
13173
13174         * cp-tree.h (flag_new_abi): Move.
13175         (flag_use_cxa_atexit): Likewise.
13176         (flag_honor_std): Likewise.
13177         (flag_rtti): Likewise.
13178         (vbase_offsets_in_vtable_p): Define.
13179         (vptrs_present_everywhere_p): Likewise.
13180         (TYPE_CONTAINS_VPTR_P): Likewise.
13181         (dfs_walk_real): Declare.
13182         * class.c (build_vbase_pointer_fields): Check
13183         vbase_offsets_in_vtable_p.
13184         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
13185         BINFO_VPTR_FIELD.
13186         (build_vbase_offset_vtbl_entries): Simplify.
13187         (build_vbase_offset_vtbl_entries): Adjust.
13188         (build_vbase_pointer): Add ability to look up vbase offsets in
13189         vtable.
13190         (start_vtable): New function.
13191         (add_virtual_function): Use it.
13192         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
13193         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
13194         (build_vtbl_initializer): Take the type of the complete object as
13195         input.  Use it to correctly calculate vbase offsets.
13196         (dfs_finish_vtbls): Pass the complete type to
13197         build_vtbl_initializer.
13198         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
13199         (create_vtable_ptr): Create a vtable even if there are no
13200         new virtual functions, under the new ABI.
13201         (finish_struct_1): Likewise.
13202         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
13203         * decl.c (exapnd_static_init): Remove call to
13204         preserve_initializer.
13205         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
13206         vtables.
13207         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
13208         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
13209         (construct_virtual_bases): Don't initialize virtual base pointers
13210         under the new ABI.
13211         (build_aggr_init): Clean up comment.
13212         (expand_aggr_init_1): Likewise.
13213         * rtti.c (expand_class_desc): Store the virtual function table
13214         index where the vbase offset lives in the offset field.
13215         * search.c (dfs_walk_real): Make it global.
13216         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
13217         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
13218
13219         * tinfo.h (USItype): Make it signed under the new ABI.
13220         * tinfo.cc (convert_to_base): New function.  Encapsulate base
13221         conversion logic here.
13222         (__class_type_info::do_upcast): Use it.
13223         (__class_type_info::do_dyncast): Likewise.
13224         (__class_type_info::do_find_public_subobj): Likewise.
13225
13226         * init.c (construct_virtual_bases): Don't look up the addresses of
13227         virtual bases at run-time.
13228
13229         * class.c (build_vbase_pointer): Relocate.
13230         (build_vbase_pointer_fields): Likewise.
13231         (dfs_build_vbase_offset_vtbl_entries): Likewise.
13232         (build_vbase_offset_vtbl_entries): Likewise.
13233
13234         * decl.c (init_decl_processing): Complain if -fnew-abi
13235         -fno-vtable-thunks is used.
13236
13237         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
13238         flag_new_abi.
13239
13240 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
13241
13242         * cp-tree.h (num_extra_vtbl_entries): New function.
13243         (size_extra_vtbl_entries): Likewise.
13244         (dfs_vtable_path_unmark): Likewise.
13245         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
13246         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
13247         * class.c (num_extra_vtbl_entries): New function.
13248         (size_extra_vtbl_entries): Likewise.
13249         (dfs_build_vbase_offset_vtbl_entries): New function.
13250         (build_vbase_offset_vtbl_entries): Likewise.
13251         (build_vtbl_initializer): Use it.
13252         (finish_struct_1): Adjust vtable sizes (using
13253         num_extra_vtbl_entries).
13254         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
13255         THUNK_DECL is non-NULL before expanding it.
13256         * init.c (expand_virtual_init): Adjust the vtable pointer by
13257         size_extra_vtbl_entries before storing it.
13258         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
13259         Handle TREE_LIST parameters here, not in the dfs_* functions.
13260         (dfs_unmarked_real_bases_queue_p): Adjust.
13261         (dfs_marked_real_bases_queue_p): Likewise.
13262         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
13263         (dfs_vtable_path_marked_real_bases_queue_p): New function.
13264         (dfs_vtable_path_unmark): Likewise.
13265
13266 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
13267
13268         * optimize.c (copy_body_r): Clear the operand three of a
13269         TARGET_EXPR when copying it.
13270
13271 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13272
13273         * method.c (build_decl_overload_real): Check whether we are in ::
13274         before returning __builtin_new/delete.
13275
13276 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
13277
13278         * pt.c (tsubst_friend_function): Improve comment.
13279         (instantiate_decl): Avoid crashing when a "nested" function is
13280         instantiated from the top level.
13281
13282         * dump.c (dqeueue_and_dump): Dump
13283         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
13284
13285 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13286
13287         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
13288
13289 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
13290
13291         * g++spec.c (lang_specific_driver): Add -fnew-abi if
13292         ENABLE_NEW_GXX_ABI defined.
13293         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
13294         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
13295         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
13296
13297 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
13298
13299         * decl.c (start_cleanup_fn): Call pushdecl.
13300
13301         * call.c (convert_class_to_reference): Fix typos.
13302         (build_conditional_expr): Handle errors gracefully.
13303         * class.c (push_nested_class): Likewise.
13304         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
13305         (DECL_THIS_EXTERN): Use it.
13306         (DECL_THIS_STATIC): Likewise.
13307         * cvt.c (convert_to_void): Handle errors gracefully.
13308         (build_expr_type_conversion): Likewise.
13309         * decl.c (maybe_push_decl): Likewise.
13310         (start_decl_1): Likewise.
13311         (require_complete_types_for_parms): Likewise.
13312         * parse.y (structsp): Likewise.
13313         (base_class): Likewise.
13314         * parse.c: Regenerated.
13315         * pt.c (finish_member_template_decl): Likewise.
13316         * typeck.c (decay_conversion): Likewise.
13317
13318         * cp-tree.h (dfs_skip_vbases): New function.
13319         (find_vbase_instance): Likewise.
13320         * class.c (determine_primary_base): Allow a nearly empty base to
13321         serve as a primary base class under the new ABI.
13322         (get_class_offset_1): Rename to ...
13323         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
13324         messages here.
13325         (get_class_offset): Use it.  Issue error messages here.
13326         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
13327         find the right copies of virtual bases.
13328         (fixup_vtable_deltas1): Rename to ...
13329         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
13330         bases as primary bases.
13331         (fixup_vtable_deltas): Remove.
13332         (override_one_vtable): Handle virtual bases as primary bases.
13333         (merge_overrides): Likewise.
13334         (finish_struct_1): Likewise.
13335         (dump_class_hierarchy): Dump primary-ness of bases as well.
13336         * search.c (mark_primary_bases): Use a pre-order traversal to
13337         handle primary virtual bases.
13338         (dfs_skip_vbases): New fiunction.
13339         (expand_upcast_fixups): Adjust to handle primary virtual bases.
13340         (fixup_virtual_upcast_offsets): Likewise.
13341         (fixup_all_virtual_upcast_offsets): Likewise.
13342         (dfs_find_vbase_instances): New function.
13343         (find_vbase_instance): Likewise.
13344
13345 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
13346
13347         * lex.c (DIR_SEPARATOR): Delete macro.
13348
13349 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
13350
13351        * decl2.c (lang_decode_option): Handle automatic line wrapping
13352        option.
13353
13354 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
13355
13356         * friend.c (do_friend): Don't resolve scopes when processing
13357         template declarations, even if the qualifying scope doesn't
13358         involve template parameters.
13359
13360 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
13361
13362         * class.c (dfs_modify_vtables_queue_p): Remove.
13363         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
13364         and dfs_marked_real_bases_queue_p instead of
13365         dfs_modify_vtables_queue_p.
13366
13367         * class.c (build_vbase_path): Simplify.
13368         (dfs_propagate_binfo_offsets): New function.
13369         (propagate_binfo_offsets): Use it.
13370         (remove_base_field): Simplify.
13371         (dfs_set_offset_for_vbases): Remove.
13372         (dfs_set_offset_for_shared_vbases): New function.
13373         (dfs_set_offset_for_unshared_vbases): Likewise.
13374         (layout_virtual_bases): Use them.
13375         (layout_basetypes): Don't call propagate_binfo_offsets.
13376         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
13377         for the vbases.
13378
13379         * class.c (build_base_field): New function, split out from ...
13380         (build_base_fields): ... here.  Use it.  Allocate primary bases
13381         first, under the new ABI.
13382         (get_vtable_entry): Remove.
13383         (remove_base_field): New function, split out from ...
13384         (remove_base_fields): ... here.  Adjust since primary bases come
13385         first under the new ABI.
13386
13387         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
13388         (initialize_vtbl_ptrs): New function.
13389         (expand_indirect_vtbls_init): Change prototype.
13390         (convert_pointer_to_vbase): Declare.
13391         * init.c (expand_direct_vtbls_init): Remove.
13392         (dfs_initialize_vtbl_ptrs): New function.
13393         (initialize_vtbl_ptrs): Likewise.
13394         (emit_base_init): Use initialize_vtbl_ptrs.
13395         * search.c (convert_pointer_to_vbase): Make it global.
13396         (expand_indirect_vtbls_init): Remove vtable initialization code.
13397         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
13398
13399         * class.c (dfs_finish_vtbls): New function.
13400         (finish_vtbls): Use it.
13401         (dump_class_hierarchy): New function.
13402
13403         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
13404         (BINFO_VBASE_PRIMARY_P): New macro.
13405         (BINFO_VIRTUALS): Add to documentation.
13406         (SET_BINFO_PRIMARY_MARKED_P): Remove.
13407         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
13408         (dfs_mark_primary_bases_queue_p): Likewise.
13409         (dfs_unmarked_real_bases_queue_p): New function.
13410         (dfs_marked_real_bases_queue_p): Likewise.
13411         * search.c (dfs_mark_primary_bases): Adjust.
13412         (mark_primary_bases): Likewise.
13413         (get_shared_vbase_if_not_primary): New function.
13414         (dfs_unmarked_real_bases_queue_p): Likewise.
13415         (dfs_marked_real_bases_queue_p): Likewise.
13416         (dfs_get_pure_virtuals): Simplify.
13417         (get_pure_virtuals): Likewise.
13418
13419 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13420
13421         * lex.c: Include tm_p.h.
13422
13423 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
13424
13425         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
13426
13427 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
13428
13429         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
13430         * pt.c (instantiate_decl): Defer comdat templates that might not be
13431         needed.
13432
13433         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
13434         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
13435         (finish_file): Likewise.
13436
13437         * decl2.c (import_export_class): Undo 12/14 change.
13438
13439         * error.c (dump_decl): operator new, not operatornew.
13440
13441         * class.c (field_decl_cmp): A nontype is "greater" than a type.
13442         * search.c (lookup_field_1): Look for the last field with the
13443         desired name.
13444
13445 2000-01-05  Nathan Sidwell  <nathan@acm.org>
13446
13447         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
13448         FUNCTION_DECL.
13449
13450 2000-01-05  Nathan Sidwell  <nathan@acm.org>
13451
13452         * typeck.c (build_static_cast): Don't strip target qualifiers
13453         when casting from a class.
13454
13455 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
13456
13457         * class.c (warn_hidden): Initialize variable `fndecl'.
13458
13459 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
13460
13461         * decl.c (flag_isoc9x): New variable to be able to use code in
13462         c-common.c.  For now always zero.
13463
13464 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
13465
13466         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
13467         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
13468         or unshare_base_binfos for virtual bases here.
13469         * search.c (dfs_get_vbase_types): Do it here.
13470         (get_vbase_types): Adjust.
13471
13472 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
13473
13474         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
13475         (BINFO_PRIMARY_MARKED_P): Use flag 5.
13476         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
13477         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
13478         (unmark_primary_bases): Remove declaration.
13479         (unmarkedp): Declare.
13480         (dfs_vbase_unmark): Likewise.
13481         * class.c (determine_primary_base): Return immediately if there
13482         are no base classes.  Call mark_primary_bases here.
13483         (modify_all_direct_vtables): Remove.
13484         (modify_all_indirect_vtables): Remove.
13485         (dfs_modify_vtables_queue_p): New function.
13486         (dfs_modify_vtables): New function.
13487         (modify_all_vtables): Use them.
13488         (build_base_fields): Build FIELD_DECLs for primary virtual base
13489         classes.
13490         (create_vtable_ptr): Don't call determine_primary_base here.
13491         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
13492         (dfs_set_offset_for_vbases): ... this.
13493         (layout_virtual_bases): Use it.
13494         (layout_class_type): Call determine_primary_base here.
13495         * search.c (unmarkedp): Make it global.
13496         (shared_marked_p): Simplify.
13497         (shared_unmarked_p): Likewise.
13498         (dfs_primary_bases_queue_p): Remove.
13499         (dfs_unmark_primary_bases): Likewise.
13500         (unmark_primary_bases): Likewise.
13501         (mark_primary_bases): Simplify.
13502         (get_pure_virtuals): Don't call mark_primary_bases here.
13503         (dfs_vbase_unmark): New function.
13504         (get_vbase_types): Simplify.
13505
13506         * class.c (struct base_info): Remove.
13507         (determine_primary_base): Take has_virtual_p rather than a
13508         base_info as input.  Don't calculate max_has_virtual.
13509         (finish_struct_bits): Remove max_has_virtual argument.
13510         (create_vtable_ptr): Remove max_has_virtual_p argument.
13511         (layout_virtual_bases): Remove max argument.
13512         (layout_basetypes): Likewise.
13513         (layout_class_type): Remove max_has_virtual_p argument.
13514         (finish_struct_1): Remove max_has_virtual.
13515
13516         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
13517         (layout_basetypes): Remove.
13518         * class.c (propagate_binfo_offsets): Moved here from tree.c.
13519         Update to handle primary virtual bases.
13520         (remove_base_fields): New function, split out from
13521         layout_basetypes.
13522         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
13523         (layout_virtual_bases): New function, split out from
13524         layout_basetypes.  Update to handle primary virtual bases.
13525         (layout_basetypes): Moved here from tree.c.  Use
13526         remove_base_fields and layout_virtual_bases.
13527         * search.c (dfs_mark_primary_bases_queue_p): New function.
13528         (mark_primary_bases): Use it.
13529         * tree.c (CEIL): Remove.
13530         (propagate_binfo_offsets): Remove.
13531         (layout_basetypes): Remove.
13532
13533 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
13534
13535         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
13536         (BINFO_PRIMARY_MARKED_P): New macro.
13537         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
13538         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
13539         (mark_primary_bases): New function.
13540         (unmark_primary_bases): Likewise.
13541         * search.c (get_abstract_virtuals_1): Remove.
13542         (dfs_mark_primary_bases): New function.
13543         (mark_primary_bases): Likewise.
13544         (dfs_unmark_primary_bases): Likewise.
13545         (unmark_primary_bases): Likewise.
13546         (dfs_get_pure_virtuals): Likewise.
13547
13548 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
13549
13550         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
13551         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
13552         (modify_one_vtable): Adjust.
13553         (fixup_vtable_deltas1): Likewise.
13554         (override_one_vtable): Likewise.
13555         * search.c (get_abstract_virtuals_1): Likewise.
13556         (get_pure_virtuals): Likewise.
13557         (expand_upcast_fixups): Likewise.
13558         * tree.c (debug_binfo): Likewise.
13559
13560         * class.c (build_vtable): Don't return a value.  Don't rebuild
13561         vtables for bases that have already been handled.
13562         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
13563         already been handled.
13564         (modify_one_vtable): Adjust accordingly.
13565         (fixup_vtable_deltas1): Likewise.
13566         (finish_struct_1): Likewise.
13567
13568 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
13569
13570         * call.c (build_new_method_call): Also check destructors.