OSDN Git Service

8f0617f4fcb9e6493e7730fd515ab91f0849ae8b
[pf3gnuchains/gcc-fork.git] / gcc / cp / ChangeLog
1 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
2
3         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
4         (write_encoding): Pass another argument to write_name.
5         (write_name): Add ignore_local_scope parameter.  Fix handling of
6         local names.
7         (write_nested_name): Use write_unqualified_name.
8         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
9         (write_template_prefix): Use write_unqualified_name.
10         (write_component): Remove.
11         (write_local_name): Add parameter.  Use direct local entity to
12         discriminator calculation.
13         (write_class_enum_type): Pass another argument to write_name.   
14         (write_template_template_arg): Likewise.
15         (make_guard_variable): Likewise.
16         
17 2000-08-27  Jason Merrill  <jason@redhat.com>
18
19         * decl.c (pushdecl): Matching decls for local externs are found in
20         the current level.  Propagate linkage information from previous
21         declarations.
22
23 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
24
25         * ir.texi (Expressions): Fix typo.
26
27 2000-08-25  Greg McGary  <greg@mcgary.org>
28
29         * tree.c (init_tree): Use ARRAY_SIZE.
30
31 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
32
33         * error.c (cp_tree_printer): Rework.
34
35 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
36
37         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
38         dyn-string.o.
39         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
40         (cp-demangle.o): Remove target.
41         (dyn-string.o): Likewise.
42
43         * decl.c (grokfndecl): Require that `main' return an `int'.
44         * mangle.c (write_encoding): Don't mangle return types for
45         conversion functions.
46
47 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
48
49         * error.c (tree_formatting_info): New data type.
50         (tree_being_formatted): New macro.
51         (tree_formatting_flags): Likewise.
52         (put_whitespace): Likewise.
53         (print_tree_identifier): Likewise.
54         (print_identifier): Likewise.
55         (cp_tree_printer, print_function_argument_list, print_declaration,
56         print_expression, print_function_declaration,
57         print_function_parameter, print_type, print_cv_qualifier): New
58         functions. 
59         (init_error): Initialize lang_printer.
60
61 2000-08-24  Jason Merrill  <jason@redhat.com>
62
63         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
64         adjustment necessary.
65
66 2000-08-24  Greg McGary  <greg@mcgary.org>
67
68         * cp-tree.h (MAIN_NAME_P): Remove macro.
69
70 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
71
72         * error.c (print_instantiation_context): Don't forget to flush the
73         buffer.
74
75 2000-08-23  Jason Merrill  <jason@redhat.com>
76
77         * typeck.c (build_ptrmemfunc): Save the input pmf.
78
79         * method.c (process_modifiers): Use same_type_p.
80
81 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
82
83         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
84         * mangle.c (write_function_type): Change prototype.
85         (write_encoding): Don't mangle return types for
86         constructors or destructors.
87         (write_type): Adjust call to write_function_type.
88         * pt.c (instantiate_template): Instantiate alternate entry points
89         when instantiating the main function.
90         
91 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
92
93         * error.c (cp_print_error_function): Don't use embedded '\n' in
94         output_printf. 
95
96 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
97
98         * decl.c (init_decl_processing): Remove bogus initialization.
99         * error.c (lang_print_error_function): Restore here.
100         (init_error): Initialize print_error_function. 
101         
102 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
103
104         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
105
106 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
107
108         * Makefile.in (error.o): Depends on diagnostic.h
109
110         * cp-tree.h (problematic_instantiation_changed,
111         record_last_problematic_instantiation, current_instantiation,
112         print_instantiation_context): Declare.
113         (maybe_print_template_context): Remove.
114
115         * decl.c (init_decl_processing): Set print_error_function to NULL.
116         (lang_print_error_function): Remove, since we're using a new
117         machinery.
118
119         * error.c: #include diagnostic.h
120         (function_category): New function.
121         (cp_diagnostic_starter): Likewise.
122         (cp_diagnostic_finalizer): Likewise.
123         (cp_print_error_function): Likewise.
124         (maybe_print_instantiation_context): Likewise.
125         (print_instantiation_full_context): Likewise.
126         (print_instantiation_partial_context): Likewise.
127         (print_instantiation_context): Define.
128         (init_error): Initialize diagnostic pager and finalizer.
129
130         * pt.c (problematic_instantiation_changed): Define.
131         (record_last_problematic_instantiation): Likewise.
132         (current_instantiation): Likewise.
133         (maybe_print_template_context): Remove.
134         (print_template_context): Likewise.
135         (current_tinst_level): Make static to reflect Brendan Kehoe's
136         change of 1995-04-13.
137         (push_tinst_level): Call print_instantiation_context. 
138         
139 2000-08-21  Nix  <nix@esperi.demon.co.uk>
140         
141         * lang-specs.h: Do not process -o or run the assembler if
142         -fsyntax-only.
143
144 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
145
146         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
147         variables.
148         * decl2.c (lang_decode_option): Disable gettext attributes for
149         -ansi.
150
151 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
152
153         * lex.c (lang_init_options): Default diagnostic message maximum
154         length to 80, when line-wrapping.
155
156 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
157
158         * class.c (build_vtbl_initializer): Clear the entire
159         vtbl_init_data.  Start keeping track of the functions for which we
160         have created vcall offsets here.
161         (dfs_build_vcall_offset_vtbl_entries): Remove.
162         (build_vcall_offset_vtbl_entries): Reimplement.
163         (add_vcall_offset_vtbl_entries_r): New function.
164         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
165         computing when vcall offsets are necessary.
166
167 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
168
169         * decl.c (member_function_or_else): Use cp_error ... %T.
170         (grokdeclarator): Likewise.
171         (start_method): Likewise.
172         * friend.c (make_friend_class): Use cp_pedwarn ... %T.  
173
174 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
175
176         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
177         TYPE_DECLs.     
178
179 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
180
181         * cp-tree.h (PTRMEM_OK_P): New macro.
182         (itf_ptrmem_ok): New enumeration value.
183         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
184         argument. Diagnose implicit pointer to member.
185         (instantiate_type): Don't diagnose implicit pointer to member
186         here. Pass itf_ptrmem_ok if ok. Adjust calls to
187         resolve_address_of_overloaded_function.
188         * init.c (build_offset_ref): Set PTRMEM_OK_P.
189         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
190         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
191         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
192         (build_unary_op): Deal with single non-static member in
193         microsoft-land.
194
195 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
196
197         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
198
199 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
200
201         * cp-tree.h (enum_name_string): Remove prototype.
202         (report_case_error): Remove prototype.
203         * cp/typeck2.c (enum_name_string): Remove.
204         (report_case_error): Remove.
205         * error.c (dump_expr): Deal with enum values directly.
206         Correctly negate integer constant.
207
208 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
209
210         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
211         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
212         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
213         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
214         (__cxa_vec_new): Use __cxa_vec_new2.
215         (__cxa_vec_delete): Use __cxa_vec_delete2.
216
217 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
218
219         * vec.cc (__cxa_vec_new): Set "C" linkage.
220         (__cxa_vec_ctor): Likewise.
221         (__cxa_vec_cctor): Likewise.
222         (__cxa_vec_dtor): Likewise.
223         (__cxa_vec_delete): Likewise.
224         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
225         (__cxa_vec_ctor): Likewise.
226         (__cxa_vec_cctor): Likewise.
227         (__cxa_vec_dtor): Likewise.
228         (__cxa_vec_delete): Likewise.
229
230 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
231
232         * class.c (instantiate_type): Reinstate local variable
233         deleted in previous change.
234         
235         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
236         itf_no_attributes.
237
238 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
239
240         * cp-tree.h (instantiate_type_flags): New enumeration.
241         (instantiate_type): Change parameter.
242         * class.c (instantiate_type): Adjust prototype. Adjust.
243         * call.c (standard_conversion): Adjust instantiate_type call.
244         (reference_binding): Likewise.
245         (build_op_delete_call): Likewise.
246         (convert_like_real): Likewise.
247         * cvt.c (cp_convert_to_pointer): Likewise.
248         (convert_to_reference): Likewise.
249         * pt.c (convert_nontype_argument): Likewise.
250         * typeck.c (build_binary_op): Likewise.
251         (build_ptrmemfunc): Likewise.
252         (convert_for_assignment): Likewise.
253
254 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
255
256         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
257         (current_aggr): Define.
258         * decl.c (grokdeclarator): Make sure a friend class is an
259         elaborated type specifier.
260         * parse.y (current_aggr): Remove static definition.
261         (cp_parse_init): Adjust.
262         (structsp): Clear and restore current_aggr.
263         (component_decl_list): Clear current_aggr.
264         
265         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
266         aggregate tag on the typename's context.
267         
268         * pt.c (tsubst_friend_class): Return error_mark_node, if
269         parms becomes NULL.
270         (instantiate_class_template): Ignore error_mark_node friend types.
271
272 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
273
274         * cvt.c (warn_ref_binding): New static function, broken out of ...
275         (convert_to_reference): ... here. Use it.       
276
277 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
278
279         * parse.y (template_arg): Add rule for template qualified with
280         global scope.
281
282 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
283
284         * decl2.c (add_function): Reorganize.
285         (arg_assoc): Do not consider function template decls.
286
287 2000-08-11  Jason Merrill  <jason@redhat.com>
288
289         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
290         looking inside.
291
292 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
293
294         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
295         (lookup_nested_tag): Likewise.
296         
297         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
298         can be produced.
299
300 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
301
302         * parse.y (named_complex_class_head_sans_basetype): Remove
303         always true if.
304
305 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
306
307         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
308         explicit TEMPLATE_ID_EXPR args.
309         (build_expr_from_tree, case CALL_EXPR): Likewise.
310
311 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
312
313         * decl.c (check_tag_decl): Diagnose typename's which don't
314         declare anything.
315
316 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
317
318         * init.c (build_aggr_init): Reject bogus array initializers
319         early.
320
321 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
322
323         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
324         runtime.
325         * cp/tinfo.cc (__dynamic_cast): Likewise.
326         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.   
327
328 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
329
330         * cvt.c (convert_to_pointer_force): Fix error message when
331         attempting to cast from ambiguous base. 
332
333 2000-08-08  Jason Merrill  <jason@redhat.com>
334
335         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
336         (tsubst_template_arg_vector): Likewise.
337
338         * decl2.c (build_anon_union_vars): Choose the largest field; don't
339         assume that one will be as large as the union.
340
341 2000-08-07  Kazu Hirata  <kazu@hxi.com>
342
343         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
344         * decl.c (pop_labels): Likewise.
345
346 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
347
348         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
349         specifications.
350         (__pointer_to_member_type_info): Likewise.
351         (__base_class_info): Likewise.
352         (__class_type_info): Likewise.
353         (__si_class_type_info): Likewise.
354         (__vmi_class_type_info): Likewise.
355         * tinfo.cc (__si_class_type_info::__do_find_public_src):
356         Changed member names to match specifications.
357         (__vmi_class_type_info::__do_find_public_src): Likewise.
358         (__si_class_type_info::__do_dyncast): Likewise.
359         (__vmi_class_type_info::__do_dyncast): Likewise.
360         (__si_class_type_info::__do_upcast): Likewise.
361         (__vmi_class_type_info::__do_upcast): Likewise.
362         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
363         (__pbase_type_info::__pointer_catch): Likewise.
364         (__pointer_type_info::__pointer_catch): Likewise.
365         (__pointer_to_member_type_info::__pointer_catch): Likewise.
366
367
368 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
369
370         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
371         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
372         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
373
374 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
375
376         * cp-tree.h (add_method): Change prototype.
377         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
378         Don't double the size of the method vector in the error case.
379         (handle_using_decl): Adjust call to add_method.
380         (add_implicitly_declared_members): Likewise.
381         (clone_function_decl): Likewise.
382         * decl2.c (check_classfn): Likewise.
383         * semantics.c (finish_member_declaration): Likewise.
384         
385 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
386
387         * decl.c (flag_isoc94): New variable.
388
389 2000-08-02  Jason Merrill  <jason@redhat.com>
390
391         * pt.c (do_type_instantiation): Add complain parm; don't complain
392         if called recursively.
393         * cp-tree.h, parse.y: Adjust.
394
395 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
396
397         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
398         -Wno-strict-prototypes.
399
400         * g++spec.c: Adjust type of second argument to
401         lang_specific_driver, and update code as necessary.
402
403         * cp-tree.h: Don't prototype min_precision here.
404         (my_friendly_assert): Cast expression to void.
405         * semantics.c (do_poplevel): Initialize scope_stmts.
406
407 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
408
409         * cp-tree.h (DECL_NEEDED_P): Tweak.
410
411 2000-07-28  Jason Merrill  <jason@redhat.com>
412
413         * lang-specs.h: Use %i in rule for .ii files.
414
415 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
416
417         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
418
419 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
420
421         Allow indirect primary bases.
422         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
423         primary_base.
424         (CLASSTYPE_VFIELD_PARENT): Remove.
425         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
426         (BINFO_PRIMARY_BINFO): Remove.
427         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
428         (BINFO_VBASE_PRIMARY_P): Likewise.
429         (BINFO_PRIMARY_BASE_OF): New macro.
430         (BINFO_INDIRECT_PRIMARY_P): Likewise.
431         (get_primary_binfo): New function.
432         * decl.c (lang_mark_tree): Make lang_type::primary_base.
433         * class.c (vcall_offset_data_s): Rename to ...
434         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
435         and add ctor_vtbl_p.
436         (get_derived_offset): Use get_primary_binfo.
437         (dfs_mark_primary_bases): Adjust handling of virtual primary
438         bases.
439         (mark_primary_bases): Likewise.
440         (set_primary_base): Take a binfo, not an integer, as a
441         representation of the primary base.
442         (indirect_primary_base_p): Remove.
443         (determine_primary_base): Adjust for indirect primary bases.
444         (dfs_find_final_overrider): Fix typo in coment.
445         (update_vtable_entry_for_fn): Use get_primary_binfo.
446         (layout_nonempty_base_or_field): Tweak.
447         (build_base_fields): Adjust for new primary base semantics.
448         (dfs_propagate_binfo_offsets): Remove.
449         (propagate_binfo_offsets): Rewrite.
450         (dfs_set_offset_for_shared_vbases): Remove.
451         (layout_virtual_bases): Don't use it.
452         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
453         ABI.
454         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
455         CLASSTYPE_VFIELD_PARENT.
456         (dfs_get_primary_binfo): New function.
457         (get_primary_binfo): Likewise.
458         (dump_class_hierarchy_r): Tweak printing of primary bases.
459         (build_vtbl_initializer): Fix typo in comments.  Use
460         vtbl_init_data.
461         (build_vcall_and_vbase_vtbl_entries): Likewise.
462         (build_vbaes_offset_vtbl_entries): Likewise.
463         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
464         BV_VCALL_INDEX to handle indirect primary bases.
465         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
466         (build_rtti_vtbl_entries): Likewise.
467         * search.c (get_shared_vbase_if_not_primary): Tweak.
468         (find_vbase_instance): Likewise.
469         (binfo_for_vtable): Simplify.
470         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
471         (make_binfo): Make it have 11 entries.
472         
473 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
474
475         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
476         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
477         ascertaining primaryness.
478         (G): Remove template_args.
479         (decl_is_template_id): New function.
480         (write_encoding): Use decl_is_template_id.
481         (write_name): Likewise.  Handle type_decls.  Get main variant of
482         type decls.
483         (write_nested_name): Likewise.
484         (write_prefix): Likewise.
485         (write_template_prefix): Likewise.
486         (write_special_name_constructor): Remove defunct production from
487         comment.
488         (write_bare_function_type): Remove comment about absent parameter.
489         (write_template_template_arg): Add missing grammar production to
490         comment.
491
492 2000-07-27  Jason Merrill  <jason@redhat.com>
493
494         * decl.c (duplicate_decls): If common_type produces a non-typedef
495         type for a typedef, just use the old type.
496
497 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
498
499         * cp-tree.h (function_depth): Declare.
500         (verify_stmt_tree): Likewise.
501         (find_tree): Likewise.
502         * decl.c (function_depth): Give it external linkage.
503         * optimize.c (optimize_function): Increment and decrement it.
504         * tree.c (verify_stmt_tree_r): New function.
505         (verify_stmt_tree): Likewise.
506         (find_tree_r): Likewise.
507         (find_tree): Likewise.
508
509 2000-07-27  Jason Merrill  <jason@redhat.com>
510
511         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
512         TYPE_PTRMEMFUNC_P.
513         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
514
515 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
516
517         * decl.c (start_cleanup_fn): Mark the function as `inline'.
518         * decl2.c (get_guard): Call cp_finish_decl, not
519         rest_of_decl_compilation, for local guards.
520         * lex.c (do_identifier): Remove unused variable.
521
522 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
523
524         * parse.y:  Add missing ';'.
525
526 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
527
528         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
529         of `extern "C++"'.
530
531 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
532
533         Kill strict_prototype. Backwards compatibility only for
534         non NO_IMPLICIT_EXTERN_C systems.
535         * cp-tree.h (flag_strict_prototype): Remove.
536         (strict_prototype): Remove.
537         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
538         * decl.c (maybe_push_to_top_level): Adjust.
539         (pop_from_top_level): Adjust.
540         (decls_match): Only allow sloppy parm matching for ancient
541         system headers.
542         (init_decl_processing): Adjust.
543         (grokdeclarator): Adjust.
544         * decl2.c (flag_strict_prototype): Remove.
545         (strict_prototype): Remove.
546         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
547         (lang_f_options): Remove "strict-prototype".
548         (unsupported-options): Add "strict-prototype".
549         * lex.c (do_identifier): Adjust.
550         (do_scoped_id): Adjust.
551         * parse.y (empty_parms): Adjust.
552         * class.c (push_lang_context): Adjust.
553         (pop_lang_context): Adjust.
554         * typeck.c (comp_target_parms): Adjust.
555
556 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
557
558         * decl.c (poplevel): Deal with anonymous variables at for scope.
559         (maybe_inject_for_scope_var): Likewise.
560
561 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
562
563         * decl.c: Remove all signal handling code, now done in toplev.c.
564
565 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
566
567         * decl.c (make_rtl_for_nonlocal_decl): Rework.
568
569         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
570         correctly.
571
572 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
573
574         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
575         Define my_friendly_assert and my_friendly_abort as macros
576         which may call friendly_abort.  Prototype friendly abort, not
577         my_friendly_abort or my_friendly_assert.
578         * decl.c (signal_catch): Report the signal caught in the error
579         message.  Call fatal directly.
580         * typeck2.c (ack, my_friendly_assert): Delete.
581         (my_friendly_abort): Rename to friendly_abort.  Expect file,
582         line, and function parameters.  Report the abort code, then
583         call fancy_abort.  Do not mask an abort if errors have
584         already occurred.
585
586 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
587
588         * typeck.c (comp_target_parms): Remove obsolete parameter.
589         (comp_target_types): Adjust.
590
591 2000-07-17  Jason Merrill  <jason@redhat.com>
592
593         * typeck.c (mark_addressable): Never set TREE_USED.
594         * call.c (build_call): Don't abort on calls to library functions
595         that have been declared normally.
596
597         * typeck.c (build_binary_op): Fix grammar in warning.
598
599         * exception.cc (__eh_free): Fix prototype.
600
601         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
602
603         * decl.c (pushdecl): Handle seeing an OVERLOAD in 
604         IDENTIFIER_NAMESPACE_VALUE.
605
606 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
607
608         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
609         * method.c (use_thunk): Correct handling of vcall offsets.
610
611 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
612
613         * .cvsignore: parse.h and parse.c have no cp- prefix.
614
615 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
616
617         * .cvsignore: New file.
618
619 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
620
621         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
622
623 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
624
625         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
626         * parse.c: Remove.
627         * parse.h: Likewise.
628
629 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
630
631         * class.c (layout_class_type): Add pointers to virtual bases after
632         base classes under the old ABI.
633
634 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
635
636         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
637         (finish_continue_stmt): Likewise.
638         (begin_for_stmt): Remove call to note_level_for_for.
639         (finish_goto_stmt): Change call from build_min_nt
640         to build_stmt.
641         (finish_expr_stmt): Likewise.
642         (begin_if_stmt): Likewise.
643         (begin_while_stmt): Likewise.
644         (finish_while_stmt): Likewise.
645         (finish_return_stmt): Likewise.
646         (begin_for_stmt): Likewise.
647         (finish_for_stmt): Likewise.
648         (finish_break_stmt): Likewise.
649         (begin_switch_stmt): Likewise.
650         (finish_case_label): Likewise.
651         (genrtl_try_block): Likewise.
652         (begin_try_block): Likewise.
653         (begin_handler): Likewise.
654         (begin_compound_stmt): Likewise.
655         (finish_asm_stmt): Likewise.
656         (finish_label_stmt): Likewise.
657         (add_decl_stmt): Likewise.
658         (finish_subobject): Likewise.
659         (finish_decl_cleanup): Likewise.
660         (finish_named_return_value): Likewise.
661         (setup_vtbl_ptr): Likewise.
662         (add_scope_stmt): Likewise.
663         * decl.c (finish_constructor_body): Likewise.
664         (finish_destructor_body): Likewise.
665         * optimize.c (copy_body_r): Likewise.
666         (initialize_inlined_parameters): Likewise.
667         (declare_return_variable): Likewise.
668         (expand_call_inline): Likewise.
669         
670 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
671
672         * semantics.c (expand_body): Sync interface information
673         at the end of function body expansion.
674
675 2000-07-09  Jason Merrill  <jason@redhat.com>
676
677         * init.c (build_new_1): Bail early if the call to new fails.
678
679         * decl.c (compute_array_index_type): Check specifically for 
680         an INTEGER_CST, not just TREE_CONSTANT.
681
682         * decl.c (duplicate_decls): Don't call duplicate_decls on 
683         the DECL_TEMPLATE_RESULT.
684         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
685         codes.
686
687         * error.c (dump_template_bindings): Don't crash if we had an
688         invalid argument list.
689
690         * typeck.c (c_expand_start_case): Do narrowing here.
691         * semantics.c (finish_switch_cond): Not here.
692
693 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
694
695         * parse.y (asm_clobbers): Do string concatenation.
696
697 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
698
699         * decl.c (pushtag): Don't put local classes in template functions
700         on the local_classes list.
701
702 2000-07-04  Scott Snyder  <snyder@fnal.gov>
703
704         * decl2.c (get_guard): Add missing return for old ABI local
705         variable case.
706
707 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
708
709         * cp-tree.h (char_type_p): New function.
710         * decl.c (init_decl_processing): Don't initialize
711         signed_wchar_type_node or unsigned_wchar_type_node.
712         (complete_array_type): Handle brace-enclosed string-constants.
713         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
714         * tree.c (char_type_p): New function.
715         * typeck2.c (digest_init): Use char_type_p.
716
717 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
718
719         * pt.c (tsubst): Don't layout type, if it's error_mark.
720
721 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
722
723         * pt.c (instantiate_pending_templates): Reset template level.
724
725 2000-07-05  Jason Merrill  <jason@redhat.com>
726
727         * call.c (joust): Don't complain about `operator char *()' beating
728         `operator const char *() const'.
729
730 2000-07-04  scott snyder  <snyder@fnal.gov>
731             Jason Merrill  <jason@redhat.com>
732
733         * repo.c (repo_get_id): Handle the case where a class with virtual 
734         bases has a null TYPE_BINFO_VTABLE.
735
736 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
737             Jason Merrill  <jason@redhat.com>
738
739         * parse.y (member_init): Just pass in the type.
740         * init.c (expand_member_init): Handle getting a type.
741
742 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
743             Jason Merrill  <jason@redhat.com>
744
745         * decl.c (finish_function): Warn if a function has no return
746         statement.
747         Suggested by Andrew Koenig.
748         * typeck.c (check_return_expr): Do set current_function_returns_value
749         if we got an error_mark_node.
750
751 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
752
753         * decl2.c (push_decl_namespace): Push the original namespace.
754
755 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
756
757         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
758         * semantics.c (begin_class_definition): Clear it.
759
760 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
761
762         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
763         (genrtl_expr_stmt): Likewise.
764         (genrtl_decl_stmt): Likewise.
765         (genrtl_if_stmt): Likewise.
766         (genrtl_while_stmt): Likewise.
767         (genrtl_do_stmt): Likewise.
768         (genrtl_return_stmt): Likewise.
769         (genrtl_for_stmt): Likewise.
770         (genrtl_break_stmt): Likewise.
771         (genrtl_continue_stmt): Likewise.
772         (genrtl_scope_stmt): Likewise.
773         (genrtl_switch_stmt): Likewise.
774         (genrtl_case_label): Likewise.
775         (genrtl_begin_compound_stmt): Likewise.
776         (genrtl_finish_compound_stmt): Likewise.
777         (genrtl_compound_stmt): Likewise.
778         (genrtl_asm_stmt): Likewise.
779
780         * init.c (begin_init_stmts): Remove call to
781         genrtl_begin_compound_stmt.
782         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
783
784         * semantics.c (lang_expand_stmt): Changed call to
785         genrtl_compound_stmt to ignore return value.
786         
787 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
788
789         * mangle.c (canonicalize_for_substitution): Return the canonical
790         variant of a type.
791
792         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
793         TYPE_DECL.
794         * typeck.c (commonparms): Remove obstack manipulations.
795
796 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
797
798         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
799         
800         * Makefile.in (OBJS): Added ../c-semantics.o.
801         (OBJDEPS): Likewise.
802         
803         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
804         ../c-common.h.
805         (struct stmt_tree): Added comment. 
806         (current_function_name_declared): Removed.
807         (stmts_are_full_exprs_p): Likewise.
808         (genrtl_do_pushlevel): Likewise.
809         (genrtl_clear_out_block): Likewise.
810         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
811         (DECL_ANON_UNION_ELEMS): Likewise.
812         (emit_local_var): Likewise.
813         (make_rtl_for_local_static): Likewise.
814         (do_case): Likewise.
815         (expand_stmt): Likewise.
816         (genrtl_decl_cleanup): Likewise.
817         (c_expand_asm_operands): Likewise.
818         (c_expand_return): Likewise.
819         (c_expand_start_case): Likewise.
820
821         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
822         (emit_local_var): Likewise.
823         (initialize_local_var): Change reference to
824         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
825         Change reference to stmts_are_full_exprs_p to
826         current_stmt_tree->stmts_are_full_exprs_p.
827         (push_cp_function_context): Likewise.
828
829         * expect.c (expand_throw): Change reference to
830         stmts_are_full_exprs_p. 
831
832         * init.c (build_aggr_init): Change reference to
833         stmts_are_full_exprs_p. 
834         (build_vec_init): Likewise.
835
836         * optimize.c (maybe_clone_body): Change reference to
837         current_function_name_declared to
838         cp_function_chain->name_declared.
839
840         * pt.c (instantiate_decl): Change reference to
841         current_function_name_declared to
842         cp_function_chain->name_declared.
843
844         * semantics.c (expand_cond): Moved declaration to c-common.h.
845         (genrtl_do_pushlevel): Moved to c-semantics.c.
846         (genrtl_clear_out_block): Likewise.
847         (genrtl_goto_stmt): Likewise.
848         (genrtl_expr_stmt): Likewise.
849         (genrtl_decl_stmt): Likewise.
850         (gerntl_if_stmt): Likewise.
851         (genrtl_while_stmt): Likewise.
852         (genrtl_do_stmt): Likewise.
853         (genrtl_return_stmt): Likewise.
854         (genrtl_for_stmt): Likewise.
855         (genrtl_break_stmt): Likewise.
856         (genrtl_continue_stmt): Likewise.
857         (genrtl_scope_stmt): Likewise.
858         (genrtl_switch_stmt): Likewise.
859         (genrtl_case_label): Likewise.
860         (genrtl_begin_compound_stmt): Likewise.
861         (genrtl_finish_compound_stmt): Likewise.
862         (genrtl_compound_stmt): Likewise.
863         (genrtl_asm_stmt): Likewise.
864         (genrtl_decl_cleanup): Likewise.
865         (expand_cond): Likewise.
866         (expand_stmt): Renamed to ...
867         (lang_expand_stmt): ... this. 
868         (lang_expand_expr_stmt): Initialize.
869         (set_current_function_name_declared): Likewise.
870         (stmts_are_full_exprs_p): Likewise.
871         (current_function_name_declared): Likewise.
872         (anon_aggr_type_p): Likewise.
873         (do_poplevel): Change reference to
874         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
875         Change reference to stmts_are_full_exprs_p to
876         current_stmt_tree->stmts_are_full_exprs_p.
877         (add_tree): Likewise.
878         (finish_expr_stmt): Likewise.
879         (prep_stmt): Likewise.
880         (lang_expand_stmt): Likewise.
881         (begin_compound_stmt): Change reference to
882         current_function_name_declared to
883         cp_function_chain->name_declared and call to
884         current_function_name_declared().
885         (setup_vtbl_ptr): Likewise.
886         (genrtl_do_poplevel): Removed.
887         
888 2000-06-30  Jason Merrill  <jason@redhat.com>
889
890         * init.c (init_init_processing): Go back to aligning like
891         double_type_node for old ABI.
892         (get_cookie_size): Make cookie larger if we get a type that needs
893         more alignment.
894         (build_vec_delete): Call it.
895
896         * typeck.c (qualify_type_recursive): New fn.
897         (composite_pointer_type): Use it.
898         (build_binary_op): Use composite_pointer_type.
899
900 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
901             Jason Merrill  <jason@redhat.com>
902
903         * typeck.c (check_return_expr): Don't complain about returning
904         NULL from operator new if -fcheck-new.
905         * cp-tree.h: Declare flag_check_new here.
906         * init.c: Not here.
907
908 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
909
910         * mangle.c (find_substitution): Use same_type_p.
911         (write_encoding): Don't check for substitutions.
912
913 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
914
915         * parse.y (expr_no_comma_rangle): New non-terminal.
916         (template_parm): Use it for default parameter case.
917         (template_arg): Use it.
918         (expr_no_commas): Remove commented out undefined extensions.
919         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
920         * parse.h, parse.c: Rebuilt.
921
922 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
923
924         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
925         (finish_asm_stmt): Do it here, instead.
926
927         * cp-tree.h (ridpointers): Don't declare.
928         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
929         (record_builtin_java_type): Likewise.
930         (init_decl_processing): Likewise.
931         * lex.c: Move inclusion of lex.h.
932         (ridpointers): Don't define.
933         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
934         RID_MAX.
935         * lex.h (enum rid): Rename to ...
936         (enum cp_rid): ... this.
937         (ridpointers): Don't declare.
938         * parse.y: Move inclusion of lex.h.
939         * parse.c: Regenerated.
940         * spew.c: Move inclusion of lex.h.
941         
942         * cp-tree.h (struct language_function): Remove temp_name_counter.
943         (temp_name_counter): Remove.
944         (get_temp_name): Change prototype.
945         (get_guard): New function.
946         (get_guard_cond): Likewise.
947         (set_guard): Likewise.
948         * cvt.c (build_up_reference): Adjust call to get_temp_name.
949         * decl.c (expand_static_init): Use get_guard and friends to
950         implement guard variables.
951         * decl2.c (get_temp_name): Assume that the variables created are
952         always static.
953         (get_sentry): Rename to ...
954         (get_guard): ... this.  Implement new ABI guard variables.
955         (get_guard_bits): New function.
956         (get_guard_cond): Likewise.
957         (set_guard): Likewise.
958         (start_static_initialization_or_destruction): Use them.
959         (do_static_initialization): Replace sentry with guard throughout.
960         (do_static_destruction): Likewise.
961         * init.c (create_temporary_var): Add comment.
962         
963 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
964
965         * mangle.c (find_substitution): Use same_type_p.
966         (write_encoding): Don't check for substitutions.
967
968 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
969
970         * parse.y (expr_no_comma_rangle): New non-terminal.
971         (template_parm): Use it for default parameter case.
972         (template_arg): Use it.
973         (expr_no_commas): Remove commented out undefined extensions.
974         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
975         * parse.h, parse.c: Rebuilt.
976
977 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
978
979         * cp-tree.h (flag_const_strings): Remove.
980         (warn_parentheses): Likewise.
981         (warn_format): Likewise.
982         (common_type): Likewise.
983         (default_conversion): Likewise.
984         (build_binary_op): Likewise.
985         (cp_build_binary_op): New macro.
986         * call.c (build_new_op): Use cp_build_binary_op instead of
987         build_binary_op.
988         * class.c (build_vtable_entry_ref): Likewise.
989         * decl.c (expand_static_init): Likewise.
990         (compute_array_index_type): Likewise.
991         (build_enumerator): Likewise.
992         * decl2.c (delete_sanity): Likewise.
993         (start_static_initialization_or_destruction): Likewise.
994         * error.c (dump_type_suffix): Likewise.
995         * init.c (resolve_offset_ref): Likewise.
996         (build_new): Likewise.
997         (build_new_1): Likewise.
998         (build_vec_delete_1): Likewise.
999         (build_vec_init): Likewise.
1000         (build_delete): Likewise.
1001         * rtti.c (synthesize_tinfo_fn): Likewise.
1002         (synthesize_tinfo_var): Likewise.
1003         * search.c (expand_upcast_fixups): Likewise.
1004         (fixup_all_virtual_upcast_offsets): Likewise.
1005         * typeck.c (build_array_ref): Likewise.
1006         (get_member_function_from_ptrfunc): Likewise.
1007         (build_binary_op): Add parameter.
1008         (pointer_int_sum): Use cp_build_binary_op.
1009         (pointer_diff): Likewise.
1010         (build_modify_expr): Likewise.
1011         (get_delta_difference): Likewise.
1012         (build_ptrmemfunc): Likewise.
1013         
1014 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
1015
1016         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
1017         * decl.c (create_implicit_typedef): Adjust.
1018         * decl2.c (build_artificial_parm): Adjust.
1019         * method.c (implicitly_declare_fn): Adjust.
1020         * pt.c (push_inline_template_parms_recursive): Adjust.
1021         (process_template_parm): Adjust.
1022         (overloaded_template_name): Adjust.
1023         * semantics.c (finish_template_template_parm): Adjust.
1024
1025 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
1026
1027         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
1028         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
1029         where to emit thunks.
1030         (build_vtt): Adjust call to build_vtt_inits.
1031         (build_vtt_inits): Add parameter to indicate whether or not
1032         sub-VTTs for virtual bases should be included.  Adjust handling of
1033         construction vtables.
1034         (get_matching_base): New function.
1035         (dfs_build_vtt_inits): Rename to ...
1036         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
1037         construction vtables.
1038         (dfs_fixup_binfo_vtbls): Likewise.
1039         (build_ctor_vtbl_groups): Build construction vtables for virtual
1040         bases, too.
1041         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
1042         to build construction vtbls.
1043         (dfs_accumulate_vtbl_inits): Adjust handling of
1044         construction vtables.
1045
1046         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
1047         types correctly.
1048         
1049 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
1050
1051         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
1052
1053 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
1054
1055         * search.c (hides): Remove.
1056         (is_subobject_of_p): Add most_derived parameter. Use
1057         CANONICAL_BINFO.
1058         (lookup_field_queue_p): Adjust.
1059         (lookup_field_r): Adjust.
1060
1061 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
1062
1063         * decl2.c (handle_class_head): Bash typedefs to the type's main
1064         decl.
1065
1066 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
1067
1068         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
1069         (begin_global_stmt_expr): ... this.
1070         (genrtl_finish_stmt_expr): Rename to ...
1071         (finish_global_stmt_expr): ... this.
1072         * init.c (begin_init_stmts): Adjust calls.
1073         (finish_init_stmts): Likewise.
1074         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
1075         (begin_global_stmt_expr): ... this.
1076         (genrtl_finish_stmt_expr): Rename to ...
1077         (finish_global_stmt_expr): ... this.
1078
1079 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1080
1081         * search.c (lookup_member): Fix typo in comment.
1082
1083 2000-06-24  Jason Merrill  <jason@redhat.com>
1084
1085         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
1086         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
1087
1088 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
1089
1090         * parse.y (complex_direct_notype_declarator): Support global_scope.
1091         * Makefile.in: Adjust conflict count.
1092
1093 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
1094
1095         * parse.y (template_arg): Convert TEMPLATE_DECL
1096         that is a template template paramter to
1097         TEMPLATE_TEMPLATE_PARM here.
1098
1099         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1100         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
1101         (copy_template_template_parm): Adjust prototype.
1102         * decl.c (grokdeclarator): Remove dead code.
1103         * pt.c (process_template_parm): Tidy.
1104         (lookup_template_class): Construct nodes in
1105         copy_template_template_parm.
1106         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
1107         lookup_template_class.  Use TYPE_TI_TEMPLATE.
1108         * tree.c (copy_template_template_parm): Add NEWARGS
1109         parameter.
1110         (mapcar): Adjust call to copy_template_template_parm.
1111         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
1112         * method.c (build_template_template_parm_names): Change error
1113         code to avoid compilation warning.
1114
1115         * gxxint.texi: Document template template parameter
1116         name mangling.
1117
1118 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
1119
1120         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
1121         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
1122         (cp-demangle.o): New rule.
1123         (dyn-string.o): Likewise.
1124         * inc/cxxabi.h (__cxa_demangle): New declaration.
1125
1126 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
1127
1128         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
1129         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
1130         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
1131         a tree, not an int.
1132         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
1133         (make_thunk): Change prototype.
1134         (emit_thunk): Rename to use_thunk.
1135         (mangle_thunk): Change prototype.
1136         * class.c (get_derived_offset): Simplify.
1137         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
1138         BV_GENERATE_THUNK_WITH_VTABLE_P.
1139         (build_primary_vtable): Simplify.
1140         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
1141         (dfs_find_base): Remove.
1142         (update_vtable_entry_for_fn): Correct bug in finding the base
1143         where a virtual function was first declared.  Figure out whether
1144         or not to emit a vcall-thunk with the vtables in which it appears.
1145         Correct logic for deciding whether to use an ordinary thunk, or a
1146         vcall thunk.
1147         (finish_struct_1): Remove unnecssary code.
1148         (build_vtbl_initializer): Use ssize_int for the running counter of
1149         negative indices.
1150         (build_vtbl_initializer): Only use vcall thunks where necessary.
1151         Mark thunks as needing to be emitted with their vtables, or not.
1152         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
1153         indices.  Use size_binop.
1154         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
1155         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
1156         size_binop.
1157         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
1158         (build_vtable_entry): Mark thunks as needing to be emitted with
1159         their vtables, or not.
1160         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
1161         * decl2.c (mark_vtable_entries): Use use_thunk instead of
1162         emit_thunk.
1163         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
1164         information.
1165         * error.c (dump_expr): Use BV_FN.
1166         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
1167         not an int.
1168         * method.c (make_thunk): Likewise.
1169         (emit_thunk): Rename to use_thunk.  Allow callers to decide
1170         whether or not to actually emit the thunk.  Adjust for changes in
1171         representation of vcall offsets.
1172         * search.c (dfs_get_pure_virtuals): Use BV_FN.
1173         * semantics.c (emit_associated_thunks): New function.
1174         (expand_body): Use it.
1175         * ir.texi: Adjust decriptions of thunks.
1176
1177 2000-06-22  Jason Merrill  <jason@redhat.com>
1178
1179         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
1180         (tsubst_friend_function): Copy it here.
1181
1182         * decl.c (grok_op_properties): Fix typo.
1183
1184         * decl2.c (delete_sanity): Clarify warning, avoid failure on
1185         deleting void*.
1186
1187         * pt.c (check_explicit_specialization): Clarify error.
1188
1189         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
1190         an old OVERLOAD when we're declaring a non-function.
1191         (pushdecl, destroy_local_var): Check for error_mark_node.
1192         (warn_extern_redeclared_static): Also bail early if 
1193         we're a CONST_DECL.
1194         (push_overloaded_decl): Ignore an old error_mark_node.
1195
1196 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
1197
1198         * call.c (build_x_va_arg): Check if in a template decl.
1199         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
1200
1201 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
1202
1203         * class.c (push_lang_context): TYPE_NAME gets you to the Java
1204         types DECLs.
1205         * decl.c (check_goto): Computed gotos assumed OK.
1206
1207 2000-06-20  Jason Merrill  <jason@redhat.com>
1208
1209         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs 
1210         for which we don't need to look for instantiations.
1211
1212 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
1213
1214         * parse.y (program): Always call finish_translation_unit.
1215         * parse.c, parse.h: Rebuilt.
1216
1217 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
1218
1219         * method.c: Don't include hard-reg-set.h.
1220
1221 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1222
1223         * rtti.c (get_base_offset): Cope when vbase field is in a base.
1224
1225 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
1226
1227         * call.c (build_conditional_expr): Use VOID_TYPE_P.
1228         * cvt.c (cp_convert_to_pointer): Likewise.
1229         (convert_to_void): Likewise.
1230         * error.c (dump_expr): Likewise.
1231         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
1232         * init.c (build_delete): Likewise.
1233         * method.c (emit_thunk): Likewise.
1234         * optmize.c (declare_return_variable): Likewise.
1235         * rtti.c (get_tinfo_decl_dynamic): Likewise.
1236         (get_typeid): Likewise.
1237         (build_dynamic_cast_1): Likewise.
1238         * typeck.c (composite_pointer_type): Likewise.
1239         (common_type): Likewise.
1240         (build_indirect_ref): Likewise.
1241         (build_binary_op): Likewise.
1242         (build_x_compound_expr): Likewise.
1243         (check_return_expr): Likewise.
1244         * typeck2.c (add_exception_specifier): Likewise.
1245         
1246         * mangle.c (write_method_parms): Use direct comparison for end
1247         of parmlist.
1248
1249 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
1250
1251         * cp-tree.h (genrtl_try_block): Declare function.
1252         (genrtl_handler): Likewise.
1253         (genrtl_catch_block): Likewise.
1254         (genrtl_ctor_stmt): Likewise.
1255         (genrtl_subobject): Likewise.
1256         (genrtl_decl_cleanup): Likewise.
1257         (genrtl_do_poplevel): Likewise.
1258         (genrtl_do_pushlevel): Likewise.
1259         (genrtl_clear_out_block): Likewise.
1260         (genrtl_goto_stmt): Likewise.
1261         (genrtl_expr_stmt): Likewise.
1262         (genrtl_decl_stmt): Likewise.
1263         (genrtl_if_stmt): Likewise.
1264         (genrtl_while_stmt): Likewise.
1265         (genrtl_do_stmt): Likewise.
1266         (genrtl_return_stmt): Likewise.
1267         (genrtl_for_stmt): Likewise.
1268         (genrtl_break_stmt): Likewise.
1269         (genrtl_continue_stmt): Likewise.
1270         (genrtl_scope_stmt): Likewise.
1271         (genrtl_switch_stmt): Likewise.
1272         (genrtl_case_label): Likewise.
1273         (genrtl_begin_compound_stmt): Likewise.
1274         (genrtl_finish_compound_stmt): Likewise.
1275         (genrtl_compound_stmt): Likewise.
1276         (genrtl_asm_stmt): Likewise.
1277         (genrtl_named_return_value): Likewise.
1278         (genrtl_begin_stmt_expr): Likewise.
1279         (genrtl_finish_stmt_expr): Likewise.
1280         (finish_for_stmt): Removed first argument.
1281         (finish_switch_stmt): Likewise.
1282
1283         * semantics.c (genrtl_try_block): Define function.
1284         (genrtl_handler): Likewise.
1285         (genrtl_catch_block): Likewise.
1286         (genrtl_ctor_stmt): Likewise.
1287         (genrtl_subobject): Likewise.
1288         (genrtl_decl_cleanup): Likewise.
1289         (genrtl_do_poplevel): Likewise.
1290         (genrtl_do_pushlevel): Likewise.
1291         (genrtl_clear_out_block): Likewise.
1292         (genrtl_goto_stmt): Likewise.
1293         (genrtl_expr_stmt): Likewise.
1294         (genrtl_decl_stmt): Likewise.
1295         (genrtl_if_stmt): Likewise.
1296         (genrtl_while_stmt): Likewise.
1297         (genrtl_do_stmt): Likewise.
1298         (genrtl_return_stmt): Likewise.
1299         (genrtl_for_stmt): Likewise.
1300         (genrtl_break_stmt): Likewise.
1301         (genrtl_continue_stmt): Likewise.
1302         (genrtl_scope_stmt): Likewise.
1303         (genrtl_switch_stmt): Likewise.
1304         (genrtl_case_label): Likewise.
1305         (genrtl_begin_compound_stmt): Likewise.
1306         (genrtl_finish_compound_stmt): Likewise.
1307         (genrtl_compound_stmt): Likewise.
1308         (genrtl_asm_stmt): Likewise.
1309         (genrtl_named_return_value): Likewise.
1310         (genrtl_begin_stmt_expr): Likewise.
1311         (genrtl_finish_stmt_expr): Likewise.
1312         (finish_for_stmt): Removed first argument and generate rtl 
1313         specific code.
1314         (finish_switch_stmt): Likewise.
1315         (do_poplevel): Removed generate rtl specific code.
1316         (do_pushlevel): Likewise.
1317         (add_tree): Likewise.
1318         (finish_goto_stmt): Likewise.
1319         (finish_expr_stmt): Likewise.
1320         (begin_if_stmt): Likewise.
1321         (finish_if_stmt_cond): Likewise.
1322         (finish_then_clause): Likewise.
1323         (begin_else_clause): Likewise.
1324         (finish_else_clause): Likewise.
1325         (finish_if_stmt): Likewise.
1326         (clear_out_block): Likewise.
1327         (begin_while_stmt): Likewise.
1328         (finish_while_stmt_cond): Likewise.
1329         (finish_while_stmt): Likewise.
1330         (begin_do_stmt): Likewise.
1331         (finish_do_body): Likewise.
1332         (finish_do_stmt): Likewise.
1333         (finish_return_stmt): Likewise.
1334         (begin_for_stmt): Likewise.
1335         (finish_for_init_stmt): Likewise.
1336         (finish_for_cond): Likewise.
1337         (finish_for_expr): Likewise.
1338         (finish_break_stmt): Likewise.
1339         (finish_continue_stmt): Likewise.
1340         (begin_switch_stmt): Likewise.
1341         (finish_switch_cond): Likewise.
1342         (finish_case_label): Likewise.
1343         (begin_try_block): Likewise.
1344         (begin_function_try_block): Likewise.
1345         (finish_try_block): Likewise.
1346         (finish_cleanup_try_block): Likewise.
1347         (finish_cleanup): Likewise.
1348         (finish_function_try_block): Likewise.
1349         (finish_handler_sequence): Likewise.
1350         (finish_function_handler_sequence): Likewise.
1351         (begin_handler): Likewise.
1352         (finish_handler_parms): Likewise.
1353         (begin_catch_block): Likewise.
1354         (finish_handler): Likewise.
1355         (begin_compound_stmt): Likewise.
1356         (finish_compound_stmt): Likewise.
1357         (finish_asm_stmt): Likewise.
1358         (finish_label_stmt): Likewise.
1359         (finish_label_decl): Likewise.
1360         (finish_subobject): Likewise.
1361         (finish_decl_cleanup): Likewise.
1362         (finish_named_return_value): Likewise.
1363         (begin_stmt_expr): Likewise.
1364         (finish_stmt_expr): Likewise.
1365         
1366         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
1367         to call genrtl_expr_stmt when appropriate.
1368
1369         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
1370         begin_compound_expr to call genrtl_begin_stmt_expr and
1371         genrtl_begin_compound_expr when appropriate.
1372         (finish_init_stmts): Changed calls to finish_compound_expr and
1373         finish_stmt_expr to call genrtl_finish_compound_expr and
1374         genrtl_finish_stmt_expr when appropriate.
1375         (expand_default_init): Changed call to finish_expr_stmt to call
1376         genrtl_expr_stmt when appropriate.
1377         (build_vec_init): Likewise.
1378
1379         * parse.y (simple_stmt): Removed first argument from call to 
1380         finish_for_stmt. Removed first argument from call to 
1381         finish_switch_stmt.
1382
1383         * parse.c: Regenerated.
1384
1385         * pt.c (tsubst_expr): Removed first argument from call to 
1386         finish_for_stmt. Removed first argument from call to 
1387         finish_switch_stmt.
1388         
1389 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
1390
1391         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
1392         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
1393
1394         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
1395         (cplus_tree_code_length[]): Likewise.
1396         (cplus_tree_code_name[]): Likewise.
1397         (init_parse): Added call to add_c_tree_codes. Changed 
1398         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
1399         
1400 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
1401
1402         * cp-tree.h (finish_mem_initializers): Declare.
1403         (count_trees): Likewise.
1404         * parse.y (base_init): Use finish_mem_initializers.
1405         * semantics.c (finish_mem_initializers): New function.
1406
1407         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
1408         the number of trees.
1409         (n_trees): Remove.
1410         (count_trees): Don't use it.
1411         
1412 2000-06-15  Jason Merrill  <jason@redhat.com>
1413
1414         * tree.c (count_trees): New debugging function.
1415
1416         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
1417         * init.c (build_member_call): Pull out the name of a DECL.
1418
1419         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
1420         * semantics.c (expand_body): Push to TV_INTEGRATION here.
1421         * optimize.c (optimize_function): Not here.
1422         * pt.c (instantiate_decl): Push to TV_PARSE.
1423
1424 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
1425
1426         * cp-tree.h (struct language_function): Remove x_base_init_list
1427         and x_member_init_list.
1428         (current_base_init_list): Remove.
1429         (current_member_init_list): Likewise.
1430         (setup_vtbl_ptr): Change prototype.
1431         (emit_base_init): Likewise.
1432         (expand_member_init): Likewise.
1433         (reinit_parse_for_function): Remove.
1434         * decl.c (save_function_data): Don't clear x_base_init_list and
1435         x_member_init_list.
1436         (mark_language_function): Don't mark them.
1437         * init.c (perform_member_init): Tweak comment.
1438         (sort_member_init): Take the list of initializers as an argument.
1439         (sort_base_init): Likewise.
1440         (emit_base_init): Likewise.
1441         (expand_member_init): Return the initializer.  Don't use global
1442         variables.
1443         * lex.c (reinit_parse_for_function): Remove.
1444         * method.c (build_template_parm_names): Correct substitution.
1445         (do_build_copy_constructor): Don't use current_member_init_list
1446         and current_base_init_list.
1447         (synthesize_method): Likewise.
1448         * parse.y (base_init): Split mem-initializers into
1449         base-initializers and field-initializers.
1450         (member_init_list): Build up the list here.
1451         (member_init): Return the initializer.
1452         (fn.depfn): Don't use reinit_parse_for_function.
1453         * parse.c: Regenerated.
1454         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
1455         ERROR_MARK.
1456         (tsubst_expr): Don't use current_member_init_list
1457         and current_base_init_list.
1458         (tsubst_expr_values): Rename to ...
1459         (tsubst_initializer_list): ... this.  Use convert_from_reference.
1460         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
1461         and current_base_init_list.
1462         (begin_function_definition): Don't call reinit_parse_for_function.
1463         
1464         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
1465
1466         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
1467         correctly.
1468         
1469         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
1470
1471 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
1472
1473         * cp-tree.h (IF_COND): Move to c-common.h.
1474         (THEN_CLAUSE): Likewise.
1475         (ELSE_CLAUSE): Likewise.
1476         (WHILE_COND): Likewise.
1477         (WHILE_BODY): Likewise.
1478         (DO_COND): Likewise.
1479         (DO_BODY): Likewise.
1480         (RETURN_EXPR): Likewise.
1481         (EXPR_STMT_EXPR): Likewise.
1482         (FOR_INIT_STMT): Likewise.
1483         (FOR_COND): Likewise.
1484         (FOR_EXPR): Likewise.
1485         (FOR_BODY): Likewise.
1486         (SWITCH_COND): Likewise.
1487         (SWITCH_BODY): Likewise.
1488         (CASE_LOW): Likewise.
1489         (CASE_HIGH): Likewise.
1490         (GOTO_DESTINATION): Likewise.
1491         (COMPOUND_BODY): Likewise.
1492         (ASM_CV_QUAL): Likewise.
1493         (ASM_STRING): Likewise.
1494         (ASM_OUTPUTS): Likewise.
1495         (ASM_INPUTS): Likewise.
1496         (ASM_CLOBBERS): Likewise.
1497         (DECL_STMT_DECL): Likewise.
1498         (STMT_EXPR_STMT): Likewise.
1499         (LABEL_STMT_LABEL): Likewise.
1500         (SCOPE_BEGIN_P): Likewise.
1501         (SCOPE_END_P): Likewise.
1502         (SCOPE_STMT_BLOCK): Likewise.
1503         (SCOPE_NULLIFIED_P): Likewise.
1504         (SCOPE_NO_CLEANUPS_P): Likewise.
1505         (SCOPE_PARTIAL_P): Likewise.
1506         (ASM_VOLATILE_P): Likewise.
1507         (STMT_LINENO): Likewise.
1508         (STMT_LINENO_FOR_FN_P): Likewise.
1509
1510         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
1511         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
1512         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
1513         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
1514         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
1515
1516         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
1517
1518         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
1519         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
1520         
1521         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
1522         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
1523         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
1524         
1525 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
1526
1527         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
1528         * class.c (dfs_find_final_overrider): Set it appropriately.
1529         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
1530         avoid unneeded secondary vptrs.
1531
1532 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
1533
1534         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
1535         (check_bitfield_decl, check_field_decl): Likewise.
1536         (build_vtbl_or_vbase_field, build_base_field): Likewise.
1537         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
1538         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
1539         (xfer_tag, finish_enum): Likewise.
1540         * decl2.c (finish_builtin_type): Likewise.
1541         * init.c (init_init_processing): Likewise.
1542         * pt.c (instantiate_class_template): Likewise.
1543         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
1544         * cp-tree.h (struct lang_type): Add user_align member.
1545         (CLASSTYPE_USER_ALIGN): Define.
1546
1547 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
1548
1549         * Make-lang.in (c++.install-common): Install g++-cross in
1550         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
1551         $(target_alias)-g++ and $(target_alias)-c++.
1552
1553 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
1554
1555         * class.c (vcall_offset_data_s): Add last_init and fns.
1556         (overrides): Rename to same_signature_p.
1557         (dfs_find_final_overrider): Adjust accordingly.
1558         (mark_overriders): Likewise.
1559         (warn_hidden): Likewise.
1560         (build_vtbl_initializer): Reorganize machinery for building things
1561         at negative offsets.
1562         (build_vcall_and_vbase_vtbl_entries): Likewise.
1563         (build_vbase_offset_vtbl_entries): Likewise.
1564         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
1565         offset entries.  Do not create two entries for functions with the
1566         same signature.
1567         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
1568         (build_rtti_vtbl_entries): Reorganize machinery for building things
1569         at negative offsets.
1570
1571         * optimize.c (expand_call_inline): Don't recurse into the code
1572         used to initialize the parameters more than once.
1573
1574 2000-06-11  Mark Mitchell <mark@codesourcery.com>
1575         
1576         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
1577         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
1578         (find_substitution): Only use the `Sa' substitution for
1579         std::allocator, not instantiations of it.
1580         (write_template_prefix): Move comment.  Only use a TREE_LIST to
1581         represent substitutions for a member template.
1582         (write_array_type): Mangle array dimensions correctly.
1583         * optimize.c (maybe_clone_body): Copy more information from the
1584         cloned function.
1585         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
1586         on the regenerated declaration.
1587
1588 2000-06-11  Chip Salzenberg  <chip@valinux.com>
1589             Mark Mitchell <mark@codesourcery.com>
1590
1591         * class.c (build_vtable): Clarify comment.
1592         (build_ctor_vtbl_group): Pass the most derived type to
1593         build_vtable.
1594         
1595 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1596
1597         * decl2.c (compare_options): Don't needlessly cast away const-ness.
1598
1599 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
1600
1601         * decl.c (add_binding): Handle duplicate declarations of external
1602         variables.
1603
1604 2000-06-09  Chip Salzenberg  <chip@valinux.com>
1605             Mark Mitchell <mark@codesourcery.com>
1606
1607         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
1608         argument.
1609         (write_signed_number): New macro.
1610         (write_unsigned_number): Likewise.
1611         (write_source_name): Use them.
1612         (write_number): Handle signed and unsigned values.
1613         (write_integer_cst): Use tree_int_cst_sgn, and use
1614         write_unsigned_number or write_signed_number as appropriate.
1615         (write_discriminator): Use write_unsigned_number or
1616         write_signed_number as appropriate.
1617         (write_template_arg_literal): Likewise.
1618         (write_array_type): Use tree_low_cst.
1619         (write_template_parm):  Use write_unsigned_number or
1620         write_signed_number as appropriate.
1621         (write_substitution): Adjust call to write_number.
1622         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
1623         (write_expression): Handle non-type template arguments of
1624         reference type correctly.
1625         (mangle_thunk): Use write_signed_number.
1626
1627 2000-06-09  Chip Salzenberg  <chip@valinux.com>
1628
1629         * mangle.c (find_substition): Don't mangle objects with typename
1630         substitutions (e.g. "cin" as "Si").
1631
1632 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
1633
1634         * call.c (add_candidate): Use ggc_alloc_cleared.
1635         * decl.c (lookup_label): Likewise.
1636         * lex.c (retrofit_lang_decl): Likewise.
1637
1638 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
1639
1640         * semantics.c (expand_body): Push to TV_EXPAND.
1641         * optimize.c (optimize_function): Push to TV_INTEGRATION.
1642         * decl.c (start_function): Always call announce_function.
1643
1644         * tinfo2.cc: Just declare abort.
1645
1646 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
1647
1648         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
1649         whenever @ is a symbolic name.
1650
1651 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
1652
1653         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
1654
1655 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
1656
1657         * decl.c (pushdecl): Look up functions by DECL_NAME, not
1658         DECL_ASSEMBLER_NAME.
1659
1660 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
1661
1662         * decl2.c (c_language): Define.
1663
1664 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
1665
1666         * lex.c (lang_init_options): Tweak.
1667
1668         * decl2.c: Remove #inclusion of diagnostic.h
1669         (lang_decode_option): Move diagnostic formatting options to
1670         toplevel. 
1671
1672         * lang-options.h: Remove documentation for diagnostic options.
1673
1674         * Makefile.in (lex.o): Depends upon diagnostic.h
1675
1676 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
1677
1678         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
1679         the same DECL_RESULT, it's not a redefinition.
1680         * pt.c (tsubst_decl): Remove code to handle illegal
1681         specializations.
1682
1683 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
1684
1685         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
1686
1687 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
1688
1689         * search.c (maybe_suppress_debug_info): Don't check
1690         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
1691
1692         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
1693         here if extern_p.
1694
1695         Remember instantiation context in deferred instantiations.
1696         * cp-tree.h (struct tinst_level): Remove.
1697         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
1698         * pt.c (current_tinst_level): Now a tree.
1699         (print_template_context, push_tinst_level, pop_tinst_level,
1700         tinst_for_decl): Adjust.
1701         (reopen_tinst_level): New fn.
1702         (init_pt): Register current_tinst_level as a root.
1703         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
1704         of the pending templates list.
1705         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
1706         * lex.c (extract_interface_info): Adjust.
1707         * decl2.c (warn_if_unknown_interface): Adjust.
1708
1709 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
1710
1711         * class.c (indirect_primary_base_p): New function.
1712         (determine_primary_base): Use it.
1713
1714 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
1715
1716         Update new-abi dynamic cast algorithm.
1717         * tinfo.cc (__class_type_info::__dyncast_result): Add
1718         whole_details. Adjust constructor.
1719         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
1720         Avoid unnecessary searching.
1721         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
1722
1723 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1724
1725         * decl.c (init_decl_processing): Don't call record_component_aliases.
1726         * tree.c (build_cplus_array_type_1): Likewise.
1727
1728 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
1729
1730         * ir.texi: Correct typo.
1731         * mangle.c (write_expression): Handle non-type template arguments
1732         with reference type.
1733         * method.c (build_overload_value): Likewise.
1734         * pt.c (convert_nontype_argument): Explicitly represent conversion
1735         to a reference with an ADDR_EXPR.
1736         (unify): Always unify arguments in left-to-right order.
1737
1738 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
1739             Mark Mitchell  <mark@codesourcery.com>
1740
1741         * Make-lang.in (CXX_SRCS): Add mangle.c.
1742         * Makefile.in (CXX_OBJS): Add mangle.o.
1743         (mangle.o): New rule.
1744
1745         * class.c (local_classes): New variable.
1746         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
1747         (get_vtt_name): Use mangle_vtt_name for new ABI.
1748         (init_class_processing): Initialize local_classes.
1749         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
1750         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
1751         (std_identifier): New macro.
1752         (DECL_VOLATILE_MEMFUNC_P): New macro.
1753         (DECL_NAMESPACE_STD_P): Likewise.
1754         (local_classes): Declare.
1755         (get_mostly_instantiated_function_type): Declare.
1756         (init_mangle): Declare.
1757         (mangle_decl): Likewise.
1758         (mangle_type_string): Likewise.
1759         (mangle_type): Likewise.
1760         (mangle_typeinfo_for_type): Likewise.
1761         (mangle_typeinfo_string_for_type): Likewise.
1762         (mangle_vtbl_for_type): Likewise.
1763         (mangle_vtt_for_type): Likewise.
1764         (mangle_ctor_vtbl_for_type): Likewise.
1765         (mangle_thunk): Likewise.
1766         (mangle_conv_op_name_for_type): Likewise.
1767         (mangle_guard_variable): Likewise.
1768         * decl.c (pushtag): Keep track of local classes.
1769         (initialize_predefined_identifiers): Initialize std_identifier.
1770         (init_decl_processing): Use std_identifier.
1771         (start_decl): Don't treat instantiations as specializations.
1772         (grokdeclarator): Likewise.
1773         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
1774         name for fully-instantiated templates.
1775         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
1776         destructors with the new ABI.   
1777         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
1778         (grokfield): Use mangle_type for new ABI.
1779         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
1780         (get_sentry): Use mangle_guard_variable for new ABI.
1781         (start_static_initialization_or_destruction): Likewise.
1782         * expr.c (extract_aggr_init): Remove.
1783         (extract_scalar_init): Likewise.
1784         (extract_init): Remove #if 0'd code.
1785         * mangle.c: New function.
1786         * method.c (build_mangled_name): Assert not flag_new_abi.
1787         (build_static_name): Likewise.
1788         (build_decl_overload_real): Likewise.
1789         (build_typename_overload): Likewise.
1790         (build_overload_with_type): Likewise.
1791         (build_overload_name): Likewise.
1792         (get_ctor_vtbl_name): Likewise.
1793         (start_squangling): Likewise.
1794         (get_id_2): Likewise.
1795         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
1796         (init_method): Call init_mangle for new ABI.
1797         (make_thunk): Call mangle_thunk for new ABI.
1798         * operators.def: Correct new ABI manglings for the `%' operator.
1799         Add `::' operator.
1800         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
1801         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
1802         (lookup_template_class): Call mangle_decl for new ABI.
1803         (get_mostly_instantiated_function_type): New function.
1804         (set_mangled_name_for_template_decl): Use it.
1805         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
1806         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
1807         conversion op names.
1808         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
1809         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
1810         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
1811         mangle_typeinfo_string_for_type.
1812         
1813 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
1814
1815         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
1816         (INNERMOST_TEMPLATE_ARGS): New macro.
1817         (innermost_args): Remove.
1818         (get_innermost_template_args): New function.
1819         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
1820         * error.c (dump_function_decl): Be caution when using
1821         most_general_template.
1822         * method.c (build_template_parm_names):  Use
1823         INNERMOST_TEMPLATE_ARGS.
1824         * pt.c (add_to_template_args): Tidy comment
1825         (get_innermost_template_args): New function.
1826         (check_explicit_specialization): Clear DECL_INITIAL for a new
1827         specialization.
1828         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
1829         Tidy.
1830         (push_template_decl): Always register specializations of the most
1831         general template.
1832         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
1833         (coerce_template_parms): Likewise.
1834         (lookup_template_class): Likewise.
1835         (innermost_args): Remove.
1836         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
1837         (tsubst_decl): Handle tricky specializations.  Use
1838         get_innermost_template_args.
1839         (instantiate_template): Simplify handling of partial
1840         instantiations.
1841         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
1842         (most_general_template): Reimplement, in a more straightforward
1843         manner.
1844         (regenerate_decl_from_template): Tweak formatting.  Use
1845         TMPL_ARGS_DEPTH for clarity.
1846         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
1847         
1848         * dump.c (dequeue_and_dump): Dump information about thunks.
1849
1850 2000-06-01  Richard Henderson  <rth@cygnus.com>
1851
1852         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
1853
1854 2000-06-01  Richard Henderson  <rth@cygnus.com>
1855
1856         * decl2.c (unsupported_options): Fix typo, make const.
1857         (lang_decode_option): Fix bsearch argument order.
1858
1859 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
1860
1861         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
1862         on FIELD_DECLs.
1863
1864 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1865
1866         * cp-tree.h (c_get_alias_set): Deleted.
1867         * Makefile.in (decl.o): Include ../expr.h.
1868         * decl.c (expr.h): Include.
1869         (init_decl_processing): Call record_component_aliases for arrays.
1870         (grokdeclarator): Likewise.
1871         Set TREE_ADDRESSABLE for fields that aren't bitfields.
1872         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
1873
1874 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
1875
1876         Remove guiding declaration support.
1877         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
1878         (flag_guiding_decls): Remove.
1879         * call.c (build_user_type_conversion_1): Remove support for
1880         guiding decls.
1881         (build_new_function_call): Likewise.
1882         (build_new_op): Likewise.
1883         (build_new_method_call): Likewise.
1884         * decl.c (start_function): Likewise.
1885         * friend.c (is_friend): Likewise.
1886         (do_friend): Likewise.
1887         * decl2.c ((flag_dump_translation_unit): Make it const.
1888         (flag_guiding_decls): Remove.
1889         (unsupported_options): New variable
1890         (compare_options): New function.
1891         (lang_decode_option): Use them.
1892         
1893         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
1894
1895         * method.c (mangle_expression): Adjust test for legal expression
1896         operators.
1897
1898         * pt.c (instantiate_decl): Save and restore the local
1899         specializations list.
1900
1901 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
1902
1903         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
1904
1905 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
1906
1907         * call.c (add_template_candidate_real): Handle member template
1908         constructors for classes with virtual bases.
1909         (build_user_type_conversion_1): Use in_charge_arg_for_name.
1910         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
1911
1912         * ir.texi: Update thunk documentation.
1913         
1914         * call.c (joust): Fix handling of overloaded builtin operators.
1915
1916 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
1917
1918         * cp-tree.h (DECL_ANTICIPATED): New macro.
1919         Document new use of DECL_LANG_FLAG_7.
1920         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
1921         in the user namespace.
1922         * lex.c (do_identifier): If the identifier's declaration has
1923         DECL_ANTICIPATED on, it has not yet been declared.  But do not
1924         replace it with an ordinary implicit declaration.             
1925
1926         * tinfo2.cc: Include stdlib.h.
1927
1928 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
1929
1930         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
1931         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
1932         CLASSTYPE_ALIGN.
1933
1934 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
1935
1936         * decl2.c (lang_decode_option): Use skip_leading_substring instead
1937         of plain strncmp.
1938
1939 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
1940
1941         * operators.def (<?): Duplicated, should have been...
1942         (>?): this.  Fixed.
1943
1944 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
1945             Mark Mitchell  <mark@codesourcery.com>
1946
1947         * cp-tree.h (ansi_opname): Make it a macro.
1948         (ansi_assopname): Likewise.
1949         (struct lang_decl_flags): Add assignment_operator_p.
1950         (struct lang_decl): Add operator_code.
1951         (DECL_VTT_PARM): Adjust.
1952         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
1953         overloaded operator.
1954         (SET_OVERLOADED_OPERATOR_CODE): New macro.
1955         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
1956         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
1957         (opname_tab): Remove.
1958         (assignop_tab): Likewise.
1959         (operator_name_info_t): New type.
1960         (operator_name_info): New variable.
1961         (assignment_operator_name_info): Likewise.
1962         (build_cp_library_fn): Remove declaration.
1963         (push_cp_library_fn): Likewise.
1964         (operator_name_string): Likewise.
1965         (build_decl_overload): Likewise.
1966         * call.c (print_z_candidates): Simplify.
1967         (build_object_call): Adjust usage of ansi_opname.  Use
1968         DECL_OVERLOADED_OPERATOR_P.
1969         (op_error): Adjust operator name lookup.
1970         (build_conditional_expr): Adjust usage of ansi_opname.
1971         (build_new_op): Likewise.
1972         (build_op_delete_call): Likewise.
1973         (build_over_call): Likewise.
1974         (joust): Use DECL_OVERLOADED_OPERATOR_P.
1975         * decl.c (duplicate_decls): Copy operator_code.
1976         (init_decl_processing): Adjust parameters to push_cp_library_fn.
1977         (builtin_function): Adjust parameters to build_library_fn_1.
1978         (build_library_fn_1): Accept an overloaded operator code.
1979         (build_library_fn): Pass ERROR_MARK.
1980         (build_cp_library_fn): Accept an overloaded operator code.
1981         (push_cp_library_fn): Likewise.
1982         (grokfndecl): Tweak.
1983         (grokdeclarator): Simplify code to compute names of overloaded
1984         operators.  Adjust use of ansi_opname.
1985         (ambi_op_p): Work on tree_codes, not identifiers.
1986         (unary_op_p): Likewise.
1987         (grok_op_properties): Likewise.
1988         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
1989         (lang_mark_tree): Don't try to mark the operator_code.
1990         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
1991         * error.c (dump_decl): Remove special handling for operator
1992         names.
1993         (dump_function_name): Likewise.
1994         (dump_expr): Adjust name lookup of operators.
1995         (op_to_string): Simplify.
1996         (assop_to_string): Likewise.
1997         * init.c (build_new_1): Adjust use of ansi_opname.
1998         * lex.c (opname_tab): Remove.
1999         (assignop_tab): Likewise.
2000         (ansi_opname): Likewise.
2001         (ansi_assopname): Likewise.
2002         (operator_name_string): Likewise.
2003         (reinit_lang_specific): Likewise.
2004         (operator_name_info): New variable.
2005         (assignment_operator_name_info): Likewise.
2006         (init_operators): New function.
2007         (init_parse): Use it.
2008         (do_identifier): Adjust use of ansi_opname.
2009         * method.c (mangle_expression): Don't use ansi_opname for
2010         mangling.
2011         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
2012         (build_decl_overload): Remove.
2013         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
2014         (do_build_assign_ref): Adjust use of ansi_opname.
2015         (synthesize_method): Likewise.
2016         (implicitly_declare_fn): Likewise.
2017         * operators.def: New file.
2018         * parse.y (operator): Adjust use of ansi_opname.
2019         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
2020         (set_mangled_name_for_template_decl): Don't play games with
2021         current_namespace.
2022         (special_function_p): Adjust use of ansi_opname.
2023         * typeck.c (check_return_expr): Likewise.
2024         * Make-lang.in (cc1plus): Depend on operators.def.
2025         * Makefile.in (lex.o): Likewise.
2026         (decl.o): Likewise.
2027
2028 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
2029
2030         * Make-lang.in (cplib2.ready): Eradicate.
2031
2032 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2033
2034         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
2035         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
2036         (built_min, cp_tree_equal): Likewise.
2037
2038 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
2039
2040         * class.c (layout_nonempty_base_or_field): Replace
2041         `record_layout_info' with `record_layout_info_s'.
2042
2043 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
2044
2045         Fix goto checking.
2046         * cp-tree.h (struct language_function): x_named_labels is now
2047         a struct named_label_list*.
2048         * decl.c (struct named_label_use_list): Renamed from...
2049         (struct named_label_list): ...this.  New struct.
2050         (push_binding_level): Don't set eh_region.
2051         (note_level_for_eh): New fn.
2052         (pop_label): Take label and old value directly.
2053         (pop_labels): Adjust for new named_labels format.
2054         (lookup_label): Likewise.
2055         (poplevel): Note characteristics of a binding level containing a
2056         named label.  Mess with named label lists earlier.
2057         (mark_named_label_lists): New fn.
2058         (mark_lang_function): Call it.
2059         (use_label): New fn, split out from...
2060         (make_label_decl): ...here.  Don't call it.
2061         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1, 
2062         check_previous_gotos): New fns, split out from...
2063         (define_label): ...here.
2064         (check_switch_goto): New fn.
2065         (define_case_label): Call it.
2066         (check_goto): New fn.
2067         * semantics.c (finish_goto_stmt): Call it and use_label.
2068         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
2069         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
2070
2071 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
2072
2073         * class.c (build_vtable_entry_ref): Correct usage of
2074         get_vtbl_decl_for_binfo.
2075
2076         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
2077         * method.c (implicitly_declare_fn): Not here.
2078
2079 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
2080
2081         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
2082         (CPTI_PTMD_DESC_TYPE): ... here.
2083         (ptmd_desc_type_node): Rename to ...
2084         (ptm_desc_type_node): ... here.
2085         * decl.c: Likewise.
2086         * rtti.c (ptmd_initializer): Rename to ...
2087         (ptm_initializer): ... here.
2088         (sythesize_tinfo_var): Adjust. Deal with pointer to member
2089         function.
2090         (create_tinfo_types): Adjust.   
2091
2092 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
2093
2094         Finish implementation of VTTs.
2095         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
2096         CPTI_VTT_PARM_IDENTIFIER.
2097         (vtt_parm_identifier): New macro.
2098         (vtt_parm_type): Likewise.
2099         (BINFO_SUBVTT_INDEX): Likewise.
2100         (BINFO_VPTR_INDEX): Likewise.
2101         (struct lang_decl): Add vtt_parm.
2102         (DECL_VTT_PARM): New macro.
2103         (DECL_USE_VTT_PARM): Likewise.
2104         (DECL_NEEDS_VTT_PARM_P): Likewise.
2105         (get_vtt_name): Declare.
2106         (build_artifical_parm): Likewise.
2107         (fixup_all_virtual_upcast_offsets): Likewise.
2108         (expand_indirect_vtbls_init): Remove.
2109         * call.c (build_new_method_call): Pass the vtt to subobject
2110         constructors and destructors.
2111         * class.c (get_vtt_name): Give it external linkage.
2112         (build_clone): Handle the magic VTT parameters for clones.
2113         (clone_function_decl): Fix typo in comment.
2114         (build_vtt): Keep track of the indices in the VTTs where various
2115         entities are stored.
2116         (build_vtt_inits): Likewise.
2117         (dfs_build_vtt_inits): Likewise.
2118         (build_ctor_vtbl_group): Tweak type of construction vtables.
2119         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
2120         primary bases, when building construction vtables.
2121         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
2122         (initialize_predefined_identifiers): Add vtt_parm_identifier.
2123         (init_decl_processing): Initialize vtt_parm_type.
2124         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
2125         (lang_mark_tree): Make vtt_parm.
2126         * decl2.c (build_artificial_parm): New function.
2127         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
2128         (grokclassfn): Use build_artificial_parm.
2129         * init.c (initialize_vtbl_ptrs): Call
2130         fixup_all_virtual_upcast_offsets directly.
2131         (perform_member_init): Use the complete subobject destructor for
2132         member cleanups.
2133         (build_vtbl_address): New function.
2134         (expand_virtual_init): Handle VTTs.
2135         * optimize (maybe_clone_body): Likewise.
2136         * search.c (fixup_all_virtual_upcast_offsets): Give it external
2137         linkage.
2138         (expand_indirect_vtbls_init): Remove.
2139         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
2140         * tree.c (make_binfo): Make them bigger.
2141         
2142 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
2143
2144         * inc/cxxabi.h (__pbase_type_info): Define, based on
2145         __pointer_type_info.
2146         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
2147         (__pointer_to_member_type_info): Likewise.
2148         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
2149         (__pointer_to_member_type_info::__is_pointer_p): Remove.
2150         (__pointer_type_info::__do_catch): Rename to ...
2151         (__pbase_type_info::__do_catch): ... here. Adjust.
2152         (__pbase_type_info::__pointer_catch): Implement.
2153         (__pointer_type_info::__pointer_catch): Adjust.
2154         (__pointer_to_member_type_info::__pointer_catch): Adjust.
2155
2156 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
2157
2158         * tinfo.h (__user_type_info::contained_virtual_p): New
2159         predicate.
2160         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
2161         shaped heirarchy.
2162         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
2163         diamond shaped heirarchy. Add early out for mixed diamond and
2164         duplicate shaped heirarchy.
2165
2166 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
2167
2168         * cp-tree.h (build_delete): Change prototype.
2169         (build_vec_delete): Likewise.
2170         * call.c (build_scoped_method_call): Use special_function_kind
2171         values to indicate the kind of destruction to be done.
2172         (build_method_call): Likewise.
2173         * decl.c (finish_destructor_body): Likewise.
2174         (maybe_build_cleanup_1): Likewise.  Rename to ...
2175         (maybe_build_cleanup): ... this.
2176         * decl2.c (delete_sanity): Use special_function_kind
2177         values to indicate the kind of destruction to be done.
2178         (build_cleanup): Likewise.
2179         * init.c (perform_member_init): Likewise.
2180         (build_vec_delete_1): Likewise.
2181         (build_dtor_call): Simplify.
2182         (build_delete): Use special_function_kind
2183         values to indicate the kind of destruction to be done.
2184         (build_vbase_delete): Likewise.
2185         (build_vec_delete): Likewise.
2186         
2187         * init.c (sort_member_init): Fix typo in error message generation
2188         code.
2189
2190 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
2191
2192         * semantics.c (begin_class_definition): make the packed
2193         attribute be sensitive to the "-fpack-struct" command line flag
2194
2195 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
2196
2197         Update new-abi upcast algorithm.
2198         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
2199         prototype and meaning of return value.
2200         (__si_class_type_info::__do_upcast): Likewise.
2201         (__vmi_class_type_info::__do_upcast): Likewise.
2202         * tinfo.cc (__class_type_info::__upcast_result): Replace
2203         whole2dst with part2dst. Adjust ctor.
2204         (__class_type_info::__do_upcast): Adjust call of worker function.
2205         (__class_type_info::__do_upcast): Adjust.
2206         (__si_class_type_info::__do_upcast): Adjust. Use parent's
2207         __do_upcast.
2208         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
2209         virtual base in diamond heirarchy bug.
2210
2211 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
2212
2213         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
2214         and bitfield to tinfo_fn_p.
2215         (DECL_TINFO_FN_P): Adjust.
2216         (SET_DECL_TINFO_FN_P): Likewise.
2217         (DECL_MUTABLE_P): Likewise.
2218         (DECL_C_BIT_FIELD): Likewise.
2219         (SET_DECL_C_BIT_FIELD): Likewise.
2220         (CLEAR_DECL_C_BIT_FIELD): Likewise.
2221         (DECL_UNINLINABLE): Likewise.
2222         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
2223         (handle_using_decl): Remove assertion.
2224         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
2225         to build FIELD_DECLs.
2226         (build_base_field): Likewise.
2227         (layout_class_type): Likewise.
2228         * decl.c (init_decl_processing): Likewise.
2229         (build_ptrmemfunc_type): Likewise.
2230         (grokdeclarator): Likewise.
2231         * decl2.c (grok_x_components): Likewise.
2232         * except.c (call_eh_info): Likewise.
2233         * init.c (init_init_processing): Likewise.
2234         * rtti.c (expand_class_desc): Likewise.
2235         (create_pseudo_type_info): Likewise.
2236         (get_vmi_pseudo_type_info): Likewise.
2237         (create_tinfo_types): Likewise.
2238         * ptree.c (print_lang_decl): Adjust.
2239         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
2240         before checking DECL_MUTABLE_P.
2241         
2242         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
2243         parameters for template functions.
2244         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
2245         destructors as well as constructors.
2246
2247 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
2248
2249         * class.c (build_ctor_vtbl_group): Set inits.
2250         * optimize.c (maybe_clone_body): Set DECL_INLINE and
2251         DECL_THIS_INLINE appropriately for clones.
2252
2253         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
2254         (DECL_CONV_FN_P): Simplify.
2255         (DECL_OPERATOR): Remove.
2256         (language_to_string): Declare.
2257         * decl.c (duplicate_decls): Fix typo in comment.
2258         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
2259         (grok_op_properties): Use DECL_CONV_FN_P instead of
2260         IDENTIFIER_TYPENAME_P.
2261         * dump.c (dequeue_and_dump): Dump the language linkage of
2262         declarations.
2263         * error.c (language_to_string): Give it external linkage.
2264         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
2265         (implicitly_declare_fn): Set DECL_LANGUAGE.
2266         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
2267         IDENTIFIER_TYPENAME_P.
2268         (tsubst_decl): Likewise.
2269         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
2270         * semantics.c (finish_member_declaration): Don't mark members of
2271         classes declared in an extern "C" region as extern "C".
2272         
2273 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2274
2275         * decl2.c (qualified_lookup_using_namespace): Look through
2276         namespace aliases.
2277
2278         * decl.c (push_using_decl): Return the old decl on namespace level.
2279
2280 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
2281
2282         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
2283         (VTT_NAME_PREFIX): New macro.
2284         (CTOR_VTBL_NAME_PREFIX): Likewise.
2285         (get_ctor_vtbl_name): New function.
2286         * class.c (get_vtable_name): Simplify.
2287         (get_vtt_name): New function.
2288         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
2289         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
2290         when a virtual base becomes primary.
2291         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
2292         VTTs.
2293         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
2294         additional parameters.
2295         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
2296         (initialize_array): New function.
2297         (build_vtt): Likewise.
2298         (build_vtt_inits): Likewise.
2299         (dfs_build_vtt_inits): Likewise.
2300         (dfs_fixup_binfo_vtbls): Likewise.
2301         (build_ctor_vtbl_group): Likewise.
2302         (initialize_vtable): Use initialize_array.
2303         (accumulate_vtbl_inits): Reimplement to handle construction
2304         vtables.
2305         (dfs_accumulate_vtbl_inits): Likewise.
2306         (bulid_vtbl_initializer): Adjust parameter name.
2307         * method.c (build_typename_overload): Remove #if 0'd code.
2308         (get_ctor_vtbl_name): New function.
2309         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
2310         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
2311         
2312         * cp-tree.h (struct lang_type): Remove search_slot.
2313         (CLASSTYPE_SEARCH_SLOT): Remove.
2314         (emit_base_init): Change prototype.
2315         (initialize_vtbl_ptrs): Likewise.
2316         (expand_indirect_vtbls_init): Likewise.
2317         (clear_search_slots): Remove.
2318         * decl.c (lang_mark_tree): Don't mark search_slot.
2319         * init.c (initialize_vtbl_ptrs): Simplify.
2320         (emit_base_init): Likewise.
2321         * search.c (struct vbase_info): Document decl_ptr.
2322         (convert_pointer_to_single_level): Remove.
2323         (dfs_find_vbases): Remove.
2324         (dfs_init_base_pointers): Simplify.
2325         (dfs_clear_vbase_slots): Remove.
2326         (dfs_vtable_path_unmark): New function.
2327         (init_vbase_pointers): Simplify.
2328         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
2329         (expand_indirect_vtbls_init): Simplify.  Don't call
2330         mark_all_temps_used.
2331         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
2332         initialize_vtbl_ptrs.
2333
2334 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
2335
2336         * except.c: Add static prototypes.
2337
2338 2000-05-20  H.J. Lu  <hjl@gnu.org>
2339
2340         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
2341
2342 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
2343
2344         Don't create a separate copy of virtual bases for the
2345         CLASSTYPE_VBASECLASSES list.
2346         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
2347         (BINFO_FOR_VBASE): Remove.
2348         (CANONICAL_BINFO): Adjust.
2349         (binfo_for_vbase): New function.
2350         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
2351         instead of BINFO_FOR_VBASE.
2352         (build_vbase_pointer): Likewise.
2353         (build_secondary_vtable): Likewise.
2354         (dfs_mark_primary_bases): Likewise.
2355         (mark_primary_bases): Likewise.
2356         (layout_nonempty_base_or_field): Likewise.
2357         (dfs_set_offset_for_shared_vbases): Likewise.
2358         (dfs_set_offset_for_unshared_vbases): Likewise.
2359         (layout_virtual_bases): Likewise.  Adjust for changes to the
2360         CLASSTYPE_VBASECLASSES list.
2361         (dump_class_hierarchy_r): Use binfo_for_vbase
2362         instead of BINFO_FOR_VBASE.
2363         (dump_class_hierarchy): Likewise.
2364         (finish_vtbls): Likewise.
2365         (build_vtbl_initializer): Adjust for changes to the
2366         CLASSTYPE_VBASECLASSES list.
2367         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
2368         * decl.c (finish_destructor_body): Adjust for changes to the
2369         CLASSTYPE_VBASECLASSES list.
2370         * init.c (sort_base_init): Use binfo_for_vbase.
2371         (construct_virtual_bases): Adjust for changes to the
2372         CLASSTYPE_VBASECLASSES list.
2373         (expand_member_init): Use binfo_for_vbase.
2374         (build_vbase_delete):  Adjust for changes to the
2375         CLASSTYPE_VBASECLASSES list.
2376         * method.c (do_build_copy_constructor): Likewise.
2377         * rtti.c (get_base_offset): Use binfo_for_vbase.
2378         (expand_class_desc): Remove #if 0'd code.
2379         * search.c (struct vbase_info): Remove vbase_types.
2380         (get_base_distance):  Use binfo_for_vbase.
2381         (lookup_field_queue_p): Use CANONICAL_BINFO.
2382         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
2383         (get_pure_virtuals): Adjust for changes to the
2384         CLASSTYPE_VBASECLASSES list.
2385         (dfs_find_vbases): Use binfo_for_vbase.
2386         (dfs_init_vbase_pointers): Likewise.
2387         (init_vbase_pointers): Don't initialize vi.vbase_types.
2388         (virtual_context): Use binfo_for_vbase.
2389         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
2390         CLASSTYPE_VBASECLASSES list.
2391         (expand_indirect_vtbls_init): Simplify.
2392         (dfs_get_vbase_types): Don't replicate virtual bases.
2393         (find_vbase_instance): Use binfo_for_vbase.
2394         (binfo_for_vbase): New function.
2395         * typeck.c (get_delta_difference): Use binfo_for_vbase.
2396         
2397 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
2398
2399         * decl2.c (finish_anon_union): Generalize error messages to handle
2400         anonymous structures.
2401         * init.c (perform_member_init): Remove `name' parameter.
2402         (build_field_list): New function.
2403         (sort_member_init): Handle anonymous union initialization order
2404         correctly.  Check for multiple initializations of the same union.
2405         (emit_base_init): Don't look up fields by name here.
2406         (expand_member_init): Record the result of name lookup for future
2407         reference.
2408         * typeck.c (build_component_ref): Fix formatting.
2409         
2410 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
2411
2412         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
2413         * typeck.c (build_x_compound_expr): Replace warn_unused with
2414         warn_unused_value.
2415
2416         * decl2.c (lang_decode_option): Update -Wall unused flags by
2417         calling set_Wunused.
2418
2419 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
2420
2421         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
2422         * init.c (dfs_vtable_path_unmark): Remove.
2423         * search.c (marked_new_vtable_p): Likewise.
2424         (unmarked_new_vtable_p): Likewise.
2425         (dfs_search_slot_nonempty_p): Likewise.
2426         (dfs_mark): Likewise.
2427         (dfs_vtable_path_unmark): Likewise.
2428         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
2429         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
2430         (dfs_init_vbase_pointers): Remove special-case new ABI code.
2431         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
2432         (init_vbase_pointers): Simplify.
2433         (expand_indirect_vtbls_init): Likewise.
2434
2435         * class.c (copy_virtuals): New function.
2436         (build_primary_table): Use it.
2437         (build_secondary_vtable): Likewise.
2438         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
2439         indicate that no vcall offset is required.
2440         (add_virtual_function): Likewise.
2441         (modify_all_vtables): Likewise.
2442         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
2443         (dfs_accumulate_vtbl_inits): Likewise.
2444         (build_vtbl_initializer): Make changes to handle construction
2445         vtables.
2446         (dfs_build_vcall_offset_vtbl_entries): Likewise.
2447         (build_rtti_vtbl_entries): Likewise.
2448         (build_vtable_entries): Handle a NULL vcall_index.
2449
2450 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
2451
2452         * decl2.c (lang_decode_option): Fix thinko.
2453
2454 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
2455
2456         * except.c (check_handlers): New fn.
2457         * cp-tree.h: Declare it.
2458         * semantics.c (finish_handler_sequence): Call it.
2459         (finish_function_handler_sequence): Likewise.
2460         (finish_handler_parms): Set TREE_TYPE on the handler.
2461         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
2462         * search.c (get_base_distance_recursive): If protect>1, ignore
2463         special access.
2464         (get_base_distance): Don't reduce watch_access.
2465
2466 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
2467
2468         * lex.c: #include diagnostic.h.
2469         (lang_init_options): Set default prefixing rules.
2470
2471         * lang-options.h: Add -fdiagnostics-show-location=.
2472         
2473         * decl2.c: #include diagnostic.h.
2474         (lang_decode_option): Handle -fdiagnostics-show-location=.
2475
2476 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
2477
2478         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
2479         * vec.cc: Revert my 2000-05-07 change.
2480
2481 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
2482
2483         * class.c (check_field_decls): Complain about non-static data
2484         members with same name as class in class with constructor.
2485
2486 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
2487
2488         * decl.c (grokdeclarator): Allow non-static data members with
2489         same name as class.
2490
2491 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
2492
2493         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
2494         and pending_inline.filename.  Update prototypes.
2495         * decl.c (define_label): Constify filename parameter.
2496         * decl2.c (warn_if_unknown_interface): Constify local char *.
2497         * input.c Constify input_source.filename. Don't declare
2498         input_filename or lineno.  Constify filename parameter to feed_input.
2499         * lex.c (init_parse): Constify parameter and return value.
2500         (cp_pragma_interface, cp_pragma_implementation): Constify
2501         filename argument.
2502         (reinit_parse_for_method, reinit_parse_for_block,
2503         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
2504         Constify local char *.
2505         * pt.c: Don't declare lineno or input_filename.
2506         (print_template_context, tsubst_friend_function, tsubst_decl,
2507         tsubst, instantiate_decl): Constify local char *.
2508         * semantics.c (expand_body): Constify local char *.
2509         * tree.c (build_srcloc): Constify filename parameter.
2510         * typeck.c (c_expand_asm_operands): Constify filename
2511         parameter.
2512
2513 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
2514
2515         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
2516         offsetof expansion.
2517
2518 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
2519
2520         * inc/cxxabi.h:  Fix typos in comment.
2521         (__base_class_info::__offset): Use a static_cast.
2522
2523 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
2524
2525         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
2526         of std::size_t and std::ptrdiff_t respectively.
2527         * tinfo.cc: Likewise.
2528         * vec.cc: Likewise.
2529
2530 2000-05-06  Richard Henderson  <rth@cygnus.com>
2531
2532         * typeck.c (build_c_cast): Don't warn integer->pointer size
2533         mismatch for constants.
2534
2535 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
2536
2537         * rtti.c (ptmd_initializer): Set non-public, if class is
2538         incomplete.
2539         
2540         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
2541         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2542         __cxa_vec_delete): Likewise.
2543         * tinfo.cc (__dynamic_cast): Likewise.
2544         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
2545         __cxa_vec_delete): Likewise.
2546
2547 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
2548
2549         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
2550         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
2551         (lang_decl_flags): Add vcall_offset.
2552         (THUNK_VCALL_OFFSET): Use it.
2553         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
2554         * method.c (make_thunk): Create the lang_decl here, not in
2555         emit_thunk.
2556         (emit_thunk): Make generic thunks into ordinary functions once
2557         they have been fed to expand_body.
2558         * semantics.c (expand_body): Set current_function_is_thunk here.
2559
2560 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2561
2562         * class.c (update_vtable_entry_for_fn): Prototype.
2563
2564         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
2565         and `tmpl'.
2566
2567         * search.c (dfs_build_inheritance_graph_order): Prototype.
2568
2569 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
2570
2571         * cp-tree.h (special_function_kind): Add various kinds of
2572         destructors.
2573         (special_function_p): New function.
2574         * class.c (overrides): Don't let one kind of destructor override
2575         another.
2576         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
2577         whether or not to instantiate a template.
2578         * tree.c (special_function_p): Define.
2579
2580 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
2581
2582         * cp-tree.def (THUNK_DECL): Remove.
2583         * cp-tree.h (DECL_THUNK_P): New macro.
2584         (DECL_NON_THUNK_FUNCTION_P): Likewise.
2585         (DECL_EXTERN_C_FUNCTION_P): Likewise.
2586         (SET_DECL_THUNK_P): Likewise.
2587         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
2588         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
2589         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
2590         * decl.c (decls_match): Use DECL_EXTERN_C_P.
2591         (duplicate_decls): Likewise.
2592         (pushdecl): Likewise.  Adjust thunk handling.
2593         (grokfndecl): Use DECL_EXTERN_C_P.
2594         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
2595         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
2596         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
2597         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
2598         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
2599         DECL_NO_STATIC_CHAIN.
2600         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
2601         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
2602         * search.c (covariant_return_p): Remove THUNK_DECL handling.
2603         * ir.texi: Update.
2604         
2605 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
2606
2607         * tree.c (walk_tree): Set lineno.
2608
2609 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
2610
2611         * exception.cc: Update license notice.
2612         * new.cc: Likewise.
2613         * new1.cc: Likewise.
2614         * new2.cc: Likewise.
2615         * tinfo.cc: Likewise.
2616         * tinfo2.cc: Likewise.
2617         * vec.cc: Likewise.
2618         * inc/cxxabi.h: Likewise.
2619         * inc/exception: Likewise.
2620         * inc/new: Likewise.
2621         * inc/new.h: Likewise.
2622         * inc/typeinfo: Likewise.
2623
2624 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
2625
2626         * tree.c (build_target_expr_with_type): If we already have a
2627         TARGET_EXPR, just return it.
2628
2629         * optimize.c (initialize_inlined_parameters): Don't generate an
2630         EXPR_STMT if we can just use DECL_INITIAL.
2631         * decl.c (emit_local_var): Only make the initialization a
2632         full-expression if stmts_are_full_exprs_p.
2633
2634 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
2635
2636         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
2637         macro.
2638         * call.c (standard_conversion): Use it.
2639         (direct_reference_binding): Likewise.
2640         (build_over_call): Likewise.
2641         (is_properly_derived_from): Likewise.
2642         (compare_ics): Likewise.
2643         * class.c (resolves_to_fixed_type_p): Likewise.
2644         * optimize.c (declare_return_variable): Likewise.
2645         * pt.c (is_specialization_of): Likewise.
2646         (unify): Likewise.
2647         * typeck.c (comp_target_parms): Likeiwse.
2648         (build_static_cast): Likewise.
2649         (build_reinterpret_cast): Likewise.
2650         (build_const_cast): Likewise.
2651         (comp_ptr_ttypes_real): Likewise.
2652         (comp_ptr_ttypes_const): Likewise.
2653         * typeck2.c (process_init_constructor): Likewise.
2654
2655 2000-04-30  Scott Snyder <snyder@fnal.gov>
2656
2657         * decl.c (finish_destructor_body): Use the base destructor when
2658         destroying virtual bases.
2659
2660 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
2661
2662         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
2663         STMT_EXPRs.
2664         * optimize.c (struct inline_data): Add target_exprs field.
2665         (declare_return_variable): When a function returns an aggregate,
2666         use the variable declared in the TARGET_EXPR as the remapped
2667         DECL_RESULT.
2668         (expand_call_inline): Update the pending target_exprs stack.
2669         (optimize_function): Initialize the stack.
2670         
2671         * decl2.c (finish_file): Fix typo in comment.
2672
2673         * method.c (emit_thunk): Don't try to return a `void' value.
2674
2675         * optimize.c (initialize_inlined_parameters): If the parameter is
2676         addressable, we need to make a new VAR_DECL, even if the
2677         initializer is constant.
2678
2679 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
2680
2681         * decl.c (grok_op_properties): Add an extra check of argtypes.
2682
2683 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
2684
2685         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
2686         variables.
2687         (initialize_inlined_parameters): Try to avoid creating new
2688         VAR_DECLs.
2689
2690 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
2691
2692         * lex.c (my_get_run_time): Remove.
2693         (init_filename_times): Use get_run_time instead of my_get_run_time.
2694         (check_newline): Likewise.
2695         (dump_time_statistics): Likewise.
2696         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
2697         of computing elapsed time explicitly.
2698
2699 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
2700
2701         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
2702         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
2703         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
2704         before calling decl_constant_value.
2705         * class.c (check_bitfield_decl): Likewise.
2706         * cvt.c (ocp_convert): Likewise.
2707         (convert): Likewise.
2708         * decl.c (compute_array_index_type): Likewise.
2709         (build_enumerator): Likewise.
2710         * decl2.c (check_cp_case_value): Likewise.
2711         * pt.c (convert_nontype_argument): Likewise.
2712         (tsubst): Likewise.
2713         * typeck.c (decay_conversion): Likewise.
2714         (build_compound_expr): Likewise.
2715         (build_reinterpret_cast): Likewise.
2716         (build_c_cast): Likewise.
2717         (convert_for_assignment): Likewise.
2718         
2719 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
2720
2721         * decl.c (finish_function): Don't play games with DECL_INLINE.
2722
2723 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
2724
2725         * ir.texi: Correct typo.
2726
2727 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2728
2729         * decl.c (grokdeclarator): Reject VLAs as members.
2730
2731 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
2732
2733         * call.c (standard_conversion): Accept conversion between
2734         COMPLEX_TYPEs.
2735
2736         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
2737
2738 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
2739
2740         * decl2.c (finish_file): Remove double setup for accounting
2741         compile time.
2742
2743 2000-04-24  Robert Lipe <robertlipe@usa.net>
2744
2745         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
2746
2747 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
2748
2749         * new.cc (set_new_handler): Needs to be in std::.
2750
2751 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
2752
2753         * cp-tree.h (lang_decl): Remove pretty_function_p.
2754         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
2755         language-specific node.
2756         * decl.c (cp_make_fname_decl): Use build_decl, not
2757         build_lang_decl, to build the variables.
2758         (grokvardecl): Don't call build_lang_decl for local variables in
2759         templates.
2760         (grokdeclarator): Don't call build_lang_decl for local type
2761         declarations in templates.
2762         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
2763         zero'd memory, rather than calling memset.
2764         * pt.c: Include hashtab.h.
2765         (local_specializations): New variable.
2766         (retrieve_local_specialization): Use it.
2767         (register_local_specialization): Likewise.
2768         (tsubst_decl): Don't assume local variables have
2769         DECL_LANG_SPECIFIC.
2770         (instantiate_decl): Set up local_specializations.
2771         * Makefile.in (HTAB_H): New variable.
2772
2773 2000-04-23  Richard Henderson  <rth@cygnus.com>
2774
2775         * typeck.c (c_expand_asm_operands): Restore the original
2776         contents of the output list.
2777
2778 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
2779
2780         * ir.texi:  Document complex number representation.
2781         
2782 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
2783
2784         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
2785         (target_incomplete_p): New function.
2786         (tinfo_base_init): Create comdat NTBS name variable.
2787         (ptr_initializer): Add non_public parameter. Calculate it.
2788         (ptmd_initializer): Likewise.
2789         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
2790         (create_real_tinfo_var): Add non_public parameter. Use it.
2791         Push proxy into global namespace.
2792         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
2793         New enumeration.
2794         * inc/typeinfo (type_info::before, type_info::operator==):
2795         Compare __name addresses.
2796         
2797         * tinfo2.cc: Remove new-abi builtins comment.
2798
2799 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
2800
2801         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
2802
2803         * call.c (joust): Exit early if we get the same function, too.
2804
2805         * decl2.c (key_method): Return NULL_TREE for template classes.
2806         (import_export_class): Don't need to check for template classes.
2807
2808 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
2809
2810         * lex.c: Remove references to cccp.c.
2811
2812 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
2813
2814         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
2815         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
2816         (DECL_DESTRUCTOR_P): Use destructor_attr.
2817         (DECL_CONST_MEMFUNC_P): Reimplement.
2818         (DECL_VOLATILE_MEMFUNC_P): Remove.
2819         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
2820         (overrides): Use DECL_DESTRUCTOR_P.
2821         (check_for_override): Likewise.
2822         * decl.c (start_function): Likewise.
2823         * decl2.c (grokfclassfn): Likewise.
2824         (check_classfn): Likewise.
2825         (grok_function_init): Likewise.
2826
2827 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
2828
2829         * decl2.c (grokfield): Issue error on illegal data member
2830         declaration.
2831
2832 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
2833
2834         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
2835
2836 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
2837
2838         * class.c (build_vtable_entry): Don't build thunks for type-info
2839         functions.
2840
2841 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
2842
2843         * decl.c (decls_match): Allow a redeclaration of a builtin to
2844         specify args while the builtin did not.
2845
2846 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
2847
2848         * cp-tree.def (THUNK_DECL): Add to documentation.
2849         * cp-tree.h (flag_huge_objects): Declare.
2850         * class.c (modify_vtable_entry): Tidy.
2851         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
2852         Calculate delta appropriately for the new ABI.
2853         (dfs_modify_vtables): Use it.
2854         (modify_all_vtables): Fix thinko in code to add overriding copies
2855         of functions to primary vtables.
2856         (build_clone): Fix typo in comment.
2857         (clone_function_decl): Correct order of destructors in vtable.
2858         (build_vbase_offset_vtbl_entries): Adjust comment.
2859         (dfs_vcall_offset_queue_p): Remove.
2860         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
2861         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
2862         (build_vtable_entry): Correct check for pure virtual functions.
2863         Don't declare flag_huge_objects.
2864         * decl.c (flag_huge_objects): Remove declaration.
2865         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
2866         Use int_size_in_bytes.
2867         (emit_thunk): Handle vcall offset thunks.
2868         
2869 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2870
2871         * decl2.c (parse_time, varconst_time): Delete declarations.
2872         (finish_file): Delete LINENO declaration.
2873         START_TIME and THIS_TIME now long.
2874
2875 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
2876
2877         * class.c (build_base_field): Reformat comment.
2878         
2879         * inc/cxxabi.h (stddef.h): Comment inclusion.
2880         (__base_class_info::__offset): Comment shift.
2881
2882 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
2883
2884         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
2885         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
2886         (cp_push_exception_identifier): New macro.
2887         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
2888         (DECL_BASE_DESTRUCTOR_P): Likewise.
2889         (DECL_DELETING_DESTRUCTOR_P): Likewise.
2890         (get_vtbl_decl_for_binfo): Fix formatting.
2891         (in_charge_arg_for_name): New macro.
2892         (maybe_build_cleanup_and_delete): Remove declaration.
2893         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
2894         (in_charge_arg_for_name): New function.
2895         (build_new_method_call): Use it.  Handle cloned destructors.
2896         (build_clone): Don't make the base constructor virtual.
2897         Automatically defer generated functions.
2898         (clone_function_decl): Handle destructors, too.
2899         (clone_constructors_and_destructors): Likewise.
2900         (create_vtable_ptr): Don't create a vtable entry for a cloned
2901         function.
2902         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
2903         (initialize_predefined_identifiers): Update appropriately.
2904         (finish_destructor_body): Simplify.
2905         (maybe_build_cleanup_and_delete): Remove.
2906         * except.c (expand_throw): Handle new-ABI destructors.
2907         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
2908         (build_dtor_call): New function.
2909         (build_delete): Use it.  Simplify.
2910         * optimize.c (maybe_clone_body): Handle destructors.
2911         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
2912         
2913         * exception.cc (cleanup_fn): New typedef.
2914         (CALL_CLEANUP): New macro.
2915         (cp_eh_info): Use them.
2916         (__cp_push_exception): Likewise.
2917         (__cp_pop_exception): Likewise.
2918         
2919 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
2920
2921         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
2922         (complete_dtor_identifier): New macro.
2923         (CLASSTYPE_FIRST_CONVERSION): Remove.
2924         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
2925         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
2926         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
2927         (CLASSTYPE_CONSTRUCTORS): Likewise.
2928         (CLASSTYPE_DESTRUCTORS): Likewise.
2929         (lang_decl): Add cloned_function.
2930         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
2931         (DECL_BASE_CONSTRUCTOR_P): Likewise.
2932         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
2933         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
2934         (DECL_CLONED_FUNCTION_P): Likewise.
2935         (DECL_CLONED_FUNCTION): Likewise.
2936         (clone_function_decl): Declare.
2937         (maybe_clone_body): Likewise.
2938         * call.c (build_user_type_conversion_1): Call complete object
2939         constructors in the new ABI.
2940         (build_new_method_call): Don't add in-charge parameters under the
2941         new ABI.
2942         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
2943         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
2944         CLASSTYPE_DESTRUCTOR_SLOT.
2945         (build_clone): New function.
2946         (clone_function_decl): Likewise.
2947         (clone_constructors_and_destructors): Likewise.
2948         (check_bases_and_members): Use it.
2949         * decl.c (iniitialize_predefined_identifiers): Initialize
2950         complete_dtor_identifier.
2951         (finish_function): Don't add extra code to a clone.
2952         (lang_mark_tree): Mark cloned_function.
2953         * decl2.c (mark_used): Don't bother trying to instantiate things
2954         we synthesized.
2955         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
2956         * method.c (set_mangled_name_for_decl): Don't treat clones as
2957         constructors.
2958         (synthesize_method): Sythesize cloned functions, not the clones.
2959         * optimize.c (inline_data): Update comment on ret_label.
2960         (remap_block): Don't assume DECL_INITIAL exists.
2961         (copy_body_r): Allow ret_label to be NULL.
2962         (maybe_clone_body): Define.
2963         * pt.c (tsubst_decl): Handle clones.
2964         (instantiate_clone): New function.
2965         (instantiate_template): Use it.
2966         (set_mangled_name_for_template_decl): Don't treat clones as
2967         constructors.
2968         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
2969         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
2970         * semantics.c (expand_body): Clone function bodies as necessary.
2971         
2972         * optimize.c (remap_decl): Avoid sharing structure for arrays
2973         whose size is only known at run-time.
2974         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
2975
2976         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
2977         to has_in_charge_parm_p.
2978         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
2979         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
2980         (DECL_COPY_CONSTRUCTOR_P): New macro.
2981         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
2982         (build_user_type_conversion_1): Likewise.
2983         (convert_like_real): Likewise.
2984         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
2985         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
2986         (copy_args_p): Likewise.
2987         (grok_ctor_properties): Likewise.
2988         (start_function): Likewise.
2989         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
2990         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
2991         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
2992         * method.c (do_build_copy_constructor): Use
2993         DECL_HAS_IN_CHARGE_PARM_P.
2994         (synthesize_method): Likewise.
2995         * pt.c (instantiate_template): Remove goto.
2996         * tree.c (build_cplus_method_type): Remove mention of obstacks in
2997         comment.
2998         
2999         * cp-tre.h (finish_function): Change prototype.
3000         * decl.c (end_cleanup_fn): Adjust caller.
3001         (finish_function): Take only one parameter.
3002         * decl2.c (finish_objects): Adjust caller.
3003         (finish_static_storage_duration_function): Likewise.
3004         * method.c (emit_thunk): Likewise.
3005         * parse.y: Likewise.
3006         * parse.c: Regenerated.
3007         * pt.c (instantiate_decl): Likewise.
3008         * rtti.c (synthesize_tinfo_fn): Likewise.
3009         * semantics.c (expand_body): Likewise.
3010
3011         * cp-tree.h (copy_decl): New function.
3012         * class.c (finish_struct_1): Use it.
3013         * lex.c (copy_decl): Define it.
3014         * pt.c (tsubst_decl): Likewise.
3015         * tree.c (copy_template_template_parm): Likewise.
3016         
3017         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
3018         has_nonpublic_assign_ref.
3019         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
3020         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
3021         * class.c (finish_struct_methods): Don't set
3022         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
3023         (interface_only): Don't declare.
3024         (interface_unknown): Likewise.
3025
3026 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3027
3028         * tree.h (HAVE_TEMPLATES): Remove definition.
3029         * lang-options.h (-fthis-is-variable): Remove documentation.
3030
3031 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
3032
3033         * class.c (instantiate_type): Handle object-relative template-id.
3034
3035         * semantics.c (finish_expr_stmt): Call convert_to_void here.
3036         * decl.c (cplus_expand_expr_stmt): Not here.
3037
3038         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
3039         Initialize exprtype earlier.
3040
3041         * parse.y (fn.def1): Check for defining types in return types.
3042
3043         * decl.c (check_tag_decl): Notice extra fundamental types.
3044         Diagnose empty decls in classes, too.
3045
3046         * decl.c (grokdeclarator): Don't override an anonymous name if no 
3047         declarator was given.
3048
3049         * cvt.c (convert_to_void): Call resolve_offset_ref.
3050
3051         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
3052
3053         * decl2.c (decl_namespace): Handle getting a type.
3054
3055         * typeck.c (build_c_cast): Re-enable warning for cast between
3056         pointer and integer of different size.
3057
3058 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
3059
3060         * inc/cxxabi.h (__pointer_type_info): Add restrict and
3061         incomplete flags.
3062         (__pointer_type_info::__pointer_catch): New virtual function.
3063         (__pointer_to_member_type_info): Derive from
3064         __pointer_type_info. Adjust.
3065         (__pointer_to_member_type_info::__do_catch): Remove.
3066         (__pointer_to_member_type_info::__is_pointer_p): Declare.
3067         (__pointer_to_member_type_info::__pointer_catch): Declare.
3068         * rtti.c (qualifier_flags): Add restrict flag.
3069         (ptmd_initializer): Reorder members.
3070         (create_tinfo_types): Expand comments. Reorder
3071         ptmd_desc_type_node members.
3072         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
3073         Implement.
3074         (__pointer_type_info::__do_catch): Move specific code into
3075         __pointer_catch. Call it.
3076         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
3077         specific catch checking. Fix void conversion check.
3078         (__pointer_to_member_type_info::__do_catch): Remove.
3079         (__pointer_to_member_type_info::__pointer_catch): Implement.
3080         
3081 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3082
3083         * lex.c (init_parse): Remove traces of classof and headof.
3084         * decl2.c (flag_operator_names): Default to 1.
3085         (lang_decode_option): Do not set it for -ansi.
3086
3087 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
3088
3089         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
3090         (DECL_MAIN_VARIANT): Remove.
3091         * decl.c (duplicate_decls): Don't set it.
3092         (start_function): Likewise.
3093         (lang_mark_tree): Don't mark it.
3094         * decl2.c (defer_fn): Don't use it.
3095         * lex.c (retrofit_lang_decl): Don't set it.
3096         * pt.c (tsubst_decl): Likewise.
3097         * ptree.c (print_lang_decl): Don't print it.
3098         * typeck.c (mark_addressable): Don't use it.
3099         
3100 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
3101
3102         * vec.cc: Include <new> and <exception>.
3103         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
3104         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
3105         terminate.
3106         (__cxa_vec_delete): Catch dtor exceptions.
3107
3108 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
3109
3110         Prepend __ to implementation defined names.
3111         * inc/typeinfo (type_info): Rename _name to __name.
3112         (type_info::type_info): Rename parameter.
3113         (type_info::operator==, type_info::operator!=,
3114         type_info::before): Likewise.
3115         (type_info::is_pointer_p, type_info::is_function_p,
3116         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
3117         parameters.
3118         * inc/cxxabi.h
3119         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
3120         (__pointer_type_info::__pointer_type_info): Likewise.
3121         (__pointer_type_info::is_pointer_p,
3122         __pointer_type_info::do_catch): Prepend __. Rename parameters.
3123         (__array_type_info::__array_type_info): Rename parameters.
3124         (__function_type_info::__function_type_info): Likewise.
3125         (__function_type_info::is_function_p): Prepend __.
3126         (__enum_type_info::__enum_type_info): Rename parameters.
3127         (__pointer_to_member_type_info::__pointer_to_member_type_info):
3128         Likewise.
3129         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
3130         parameters.
3131         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
3132         (__class_type_info::__class_type_info): Rename parameters.
3133         (__class_type_info::sub_kind): Prepend __. Adjust member names.
3134         (__class_type_info::upcast_result,
3135         __class_type_info::dyncast_result): Prepend __. Move definition
3136         into tinfo.cc.
3137         (__class_type_info::do_upcast, __class_type_info::do_catch,
3138         __class_type_info::find_public_src,
3139         __class_type_info::do_dyncast,
3140         __class_type_info::do_find_public_src): Prepend __. Rename
3141         parameters.
3142         (__si_class_type_info::__si_class_type_info): Rename parameters.
3143         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
3144         __si_class_type_info::do_find_public_src): Prepent __. Rename
3145         parameters.
3146         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
3147         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
3148         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
3149         parameters.
3150         (__dynamic_cast): Rename parameters.
3151         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
3152         type_info::do_catch, type_info::do_upcast): Prepend __.
3153         (contained_p, public_p, virtual_p, contained_public_p,
3154         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
3155         (__class_type_info::do_catch,
3156         __class_type_info::do_upcast): Prepend __. Adjust.
3157         (__class_type_info::__upcast_result,
3158         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
3159         Adjust.
3160         (__class_type_info::find_public_src): Prepend __. Adjust.
3161         (__class_type_info::do_find_public_src, 
3162         __si_class_type_info::do_find_public_src, 
3163         __vmi_class_type_info::do_find_public_src): Likewise.
3164         (__class_type_info::do_dyncast,
3165         __si_class_type_info::do_dyncast,
3166         __vmi_class_type_info::do_dyncast): Likewise.
3167         (__class_type_info::do_upcast,
3168         __si_class_type_info::do_upcast,
3169         __vmi_class_type_info::do_upcast): Likewise.
3170         (__dynamic_cast): Adjust.
3171         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
3172         (__function_type_info::is_function_p): Likewise.
3173         (__pointer_type_info::do_catch): Likewise. Adjust.
3174         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
3175         (__throw_type_match_rtti_2): Adjust.
3176         (__is_pointer): Adjust.
3177
3178 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
3179
3180         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
3181         (complete_ctor_identifier): New macro.
3182         (special_function_kind): Add sfk_copy_constructor and
3183         sfk_assignment_operator.
3184         (LOOKUP_HAS_IN_CHARGE): Remove.
3185         (cons_up_default_function): Rename to ...
3186         (implicitly_declare_fn): ... this.
3187         * call.c (build_new_method_call): Add in-charge parameters for
3188         constructors here.
3189         * class.c (add_implicitly_declared_members): Change parameter name
3190         from cant_have_assignment to cant_have_const_assignment.
3191         Replace calls to cons_up_default_function to implicitly_declare_fn.
3192         * cvt.c (ocp_convert): Use complete_ctor_identifier.
3193         * decl.c (initialize_predefined_identifiers): Initialize it.
3194         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
3195         complex expression.
3196         * init.c (expand_default_init): Don't calculate the in-charge
3197         parameter here.
3198         (build_new_1): Likewise.
3199         * lex.c (cons_up_default_function): Move to method.c.
3200         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
3201         (implicitly_declare_fn): New function.
3202         * typeck.c (build_static_cast): Use complete_ctor_identifier.
3203         (build_modify_expr): Likewise.
3204         * typeck2.c (build_functional_cast): Likewise.
3205         
3206         Under the new ABI, constructors don't return `this'.
3207         * cp-tree.h (warn_reorder): Declare.
3208         (special_function_kind): New enum.
3209         (global_base_init_list): Remove declaration.
3210         (emit_base_init): Don't return a value.
3211         (check_base_init): Don't declare.
3212         (is_aggr_typedef): Likewise.
3213         * decl.c (check_special_function_return_type): New function.
3214         (return_types): Remove.
3215         (grokdeclarator): Use check_special_function_return_type.
3216         (start_function): Don't initialize ctor_label under the new ABI.
3217         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
3218         * init.c (begin_init_stmts): Move to top of file.
3219         (finish_init_stmts): Likewise.
3220         (warn_reorder): Don't declare.
3221         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
3222         value.
3223         (check_base_init): Remove.
3224         (is_aggr_typedef): Likewise.
3225         (build_new_1): Don't use the return value of a constructor.
3226         * semantics.c (setup_vtbl_ptr): Don't use the return value
3227         of emit_base_init.
3228         * typeck.c (check_return_expr): Don't magically convert return
3229         statements into `return this' in constructors under the new ABI.
3230         
3231         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
3232         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
3233         (base_ctor_identifier): New macro.
3234         (base_dtor_identifier): Likewise.
3235         (deleting_dtor_identifier): Likewise.
3236         * decl.c: Don't include obstack.h.
3237         (obstack_chunk_alloc): Don't define.
3238         (obstack_chunk_free): Likewise.
3239         (struct predefined_identifier): New type.
3240         (initialize_predefined_identifiers): New function.
3241         (init_decl_processing): Use it.
3242         (debug_temp_inits): Remove.
3243         (start_method): Don't call preserve_data.
3244         (hack_incomplete_structures): Update comment.
3245         * init.c (init_init_processing): Don't initialize
3246         nelts_identifier.
3247         (build_offset_rf): Remove dead code.
3248         (build_delete): Use CLASSTYPE_N_BASECLASSES.
3249         * search.c (init_search_processing): Don't initialize
3250         vptr_identifier.
3251         
3252 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3253
3254         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
3255         some sign_compare warnings.
3256
3257 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
3258
3259         Rename abi::__vmi_class_type_info members.
3260         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
3261         base_list, detail_masks members to vmi_flags, vmi_base_count,
3262         vmi_bases and vmi_flags_masks respectively.
3263         (__vmi_class_type_info::vmi_flags_masks): Rename
3264         details_unknown_mask to flags_unknown_mask.
3265         * tinfo.cc (__class_type_info::do_upcast): Adjust.
3266         (__vmi_class_type_info::do_find_public_src): Adjust.
3267         (__vmi_class_type_info::do_dyncast): Adjust.
3268         (__vmi_class_type_info::do_upcast): Adjust.
3269         
3270 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
3271
3272         * tinfo.cc (convert_to_base): New function.
3273         (get_vbase_offset): Remove. Move into convert_to_base.
3274         (__vmi_class_type_info::do_find_public_src): Adjust.
3275         (__vmi_class_type_info::do_dyncast): Adjust.
3276         (__vmi_class_type_info::do_upcast): Adjust.
3277
3278 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
3279
3280         * tinfo.cc (operator=): Use __builtin_strcmp.
3281         * tinfo2.cc (before): Likewise.
3282
3283 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
3284
3285         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
3286         (DECL_SAVED_INLINE): Rename to ...
3287         (DECL_DEFERRED_FN): ... this.
3288         (in_function_p): Remove declaration.
3289         (mark_inline_for_output): Rename to ... 
3290         (defer_fn): ... this.
3291         * decl.c (finish_function): Adjust call to mark_inline_for_output.
3292         (in_function_p): Remove definition.
3293         * decl2.c (saved_inlines): Rename to ...
3294         (deferred_fns): ... this.
3295         (saved_inlines_used): Rename to ...
3296         (deferred_fns_used): ... this.
3297         (mark_inline_for_output): Rename to ...
3298         (defer_fn): ... this.
3299         (finish_file): Adjust accordingly.
3300         (init_decl2): Likewise.
3301         * lex.c (cons_up_default_function): Likewise.
3302         * pt.c (mark_decl_instantiated): Likewise.
3303         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
3304         circumstances.
3305         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
3306         * semantics.c (expand_body): Defer more functions.
3307
3308 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
3309
3310         * vec.cc: New file.
3311         * Make-lang.in (CXX_LIB2FUNCS): Add it.
3312         (vec.o): Build it.
3313         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3314         __cxa_vec_delete): Declare.
3315
3316 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
3317
3318         * rtti.c (dfs_class_hint_mark): New static function.
3319         (dfs_class_hint_unmark): New static function.
3320         (class_hint_flags): Use them.
3321
3322 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
3323
3324         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
3325
3326 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
3327
3328         * cp-tree.h (instantiate_decl): Change prototype.
3329         * decl2.c (mark_used): Adjust call.
3330         * optimize.c (inlinable_function_p): Adjust handling of templates.
3331         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
3332         (do_type_instantiation): Likewise.
3333         (instantiate_decl): Defer more templates.
3334         (instantiate_pending_templates): Adjust logic to handle inline
3335         friend functions.
3336
3337         * Makefile.in (GGC_H): New variable.  Use it throughout in place
3338         of ggc.h.
3339         
3340         * call.c: Don't include obstack.h.  Include ggc.h.
3341         (obstack_chunk_alloc): Don't define.
3342         (obstack_chunk_free): Likewise.
3343         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
3344         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
3345         (pop_switch): Free it.
3346
3347         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
3348
3349         * dump.c (dequeue_and_dump): Don't try to print the bit_position
3350         if we don't have a DECL_FIELD_OFFSET.
3351
3352 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
3353
3354         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
3355         special_function_p.
3356
3357 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3358
3359         * cfns.gperf (hash, libc_name_p): Prototype.
3360
3361         * rtti.c (build_dynamic_cast_1): Constification.
3362
3363         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
3364
3365         * semantics.c (deferred_type_access_control): Prototype.
3366
3367 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
3368
3369         Correct many new ABI issues regarding vbase and vcall offset
3370         layout.
3371         * cp-tree.h (BINFO_VTABLE): Document.
3372         (struct lang_type): Tweak formatting.
3373         (BINFO_PRIMARY_BINFO): Add to documentation.
3374         (CLASSTYPE_VSIZE): Fix typo in comment.
3375         (CLASSTYPE_VBASECLASSES): Update documentation.
3376         (BINFO_VBASE_MARKED): Remove.
3377         (SET_BINFO_VBASE_MARKED): Likewise.
3378         (CLEAR_BINFO_VBASE_MARKED): Likewise.
3379         (BINFO_FIELDS_MARKED): Remove.
3380         (SET_BINFO_FIELDS_MARKED): Likewise.
3381         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
3382         (enum access_kind): New enumeration.
3383         (num_extra_vtbl_entries): Remove declaration.
3384         (size_extra_vtbl_entries): Likewise.
3385         (get_vtbl_decl_for_binfo): New function.
3386         (dfs_vbase_unmark): Remove declaration.
3387         (mark_primary_bases): Likewise.
3388         * class.c (SAME_FN): Remove.
3389         (struct vcall_offset_data_s): Move definition.
3390         (build_vbase_pointer): Use `build', not `build_binary_op', to
3391         access the vbase pointer under the new ABI.
3392         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
3393         (build_primary_vtable): Likewise.
3394         (dfs_mark_primary_bases): Move here from search.c.
3395         (mark_primary_bases): Likewise.
3396         (determine_primary_bases): Under the new ABI, don't make a base
3397         class a primary base just because we don't yet have any virtual
3398         functions.
3399         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
3400         (num_vfun_entries): Remove.
3401         (dfs_count_virtuals): Likewise.
3402         (num_extra_vtbl_entries): Likewise.
3403         (size_extra_vtbl_entries): Likewise.
3404         (layout_virtual_bases): Iterate in inheritance graph order under
3405         the new ABI.
3406         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
3407         indicate that a vfield is present.
3408         (init_class_processing): Initialize access_public_node, etc., from
3409         ak_public, etc.
3410         (get_vtbl_decl_for_binfo): New function.
3411         (dump_class_hierarchy_r): Likewise.
3412         (dump_class_hierarchy): Use it.
3413         (finish_vtbls): Build the vtbls in inheritance graph order.
3414         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
3415         (initialize_vtable): Use get_vtbl_decl_for_binfo.
3416         (accumulate_vtbl_inits): Add comments explaining why a pre-order
3417         walk is required.
3418         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
3419         where the vptr points, even for primary vtables.
3420         (build_vtbl_initializer): Adjust handling of vbase and vcall
3421         offsets.
3422         (build_vcall_and_vbase_vtable_entries): New function.
3423         (dfs_build_vbase_offset_vtbl_entries): Remove.
3424         (build_vbase_offset_vtbl_entries): Reimplement.
3425         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
3426         were already handled in a primary base class vtable.
3427         (build_vcall_offset_vtbl_entries): Adjust.
3428         (build_rtti_vtbl_entries): Adjust.
3429         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
3430         * init.c (expand_virtual_init): Simplify.
3431         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
3432         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
3433         * search.c (BINFO_ACCESS): New macro.
3434         (SET_BINFO_ACCESS): Likewise.
3435         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
3436         (access_in_type): Likewise.
3437         (dfs_accessible_p): Likewise.
3438         (protected_accessible_p): Likewise.
3439         (lookup_fnfields_1): Adjust documentation.
3440         (dfs_mark_primary_bases): Move to class.c
3441         (mark_primary_bases): Likewise.
3442         (dfs_vbase_unmark): Remove.
3443         (virtual_context): Use BINFO_FOR_VBASE.
3444         (dfs_get_vbase_types): Simplify.
3445         (dfs_build_inheritance_graph_order): New function.
3446         (get_vbase_types): Use it.
3447         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
3448
3449         * tinfo.cc (get_vbase_offset): New function.
3450         (__vmi_class_type_info::do_find_public_src): Use it.
3451         (__vmi_class_type_info::do_dyncast): Likewise.
3452         (__vmi_class_type_info::do_upcast): Likewise.
3453         
3454 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
3455
3456         * lang-specs.h: Pass -fno-show-column to the preprocessor.
3457
3458 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
3459
3460         * rtti.c (class_hint_flags): Rename flags.
3461         (class_initializer): Remove flags.
3462         (synthesize_tinfo_var): Combine offset and flags. Add flags
3463         for __vmi_class_type_info.
3464         (create_tinfo_types): Remove flags from __class_type_info and
3465         __si_class_type_info. Merge flags and offset from
3466         base_class_type_info.
3467         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
3468         (__base_class_info::is_virtual_p): Adjust.
3469         (__base_class_info::is_public_p): Adjust.
3470         (__base_class_info::offset): New accessor.
3471         (__class_type_info::details): Remove member.
3472         (__class_type_info::__class_type_info): Lose details.
3473         (__class_type_info::detail_masks): Remove.
3474         (__si_class_type_info::__si_class_type_info): Lose details.
3475         (__vmi_class_type_info::details): New member.
3476         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
3477         (__vmi_class_type_info::detail_masks): New member.
3478         * tinfo.cc (__class_type_info::do_upcast): Initialize result
3479         with unknown_details_mask.
3480         (__vmi_class_type_info::do_find_public_src): Adjust
3481         (__vmi_class_type_info::do_dyncast): Adjust.
3482         (__vmi_class_type_info::do_upcast): Set result details, if
3483         needed. Adjust.
3484         (__dynamic_cast): Temporarily #if out optimization.
3485
3486 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
3487
3488         * rtti.c (get_tinfo_decl): Mark used.
3489         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
3490         mark as dealt with, if we output it.
3491
3492 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
3493
3494         * class.c: Reorganize to put virtual function table initialization
3495         machinery at the end of the file.
3496
3497 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
3498
3499         * class.c (finish_struct): Use bitsize_zero_node.
3500         * pt.c (instantiate_class_template): Likewise.
3501
3502 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
3503
3504         Put RTTI entries at negative offsets in new ABI.
3505         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
3506         vbase offset at index -3, not -1.
3507         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
3508         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
3509         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
3510         (build_rtti_vtbl_entries): New function.
3511         (set_rtti_entry): Remove.
3512         (build_primary_vtable): Don't use it.
3513         (build_secondary_vtable): Likewise.
3514         (start_vtable): Remove.
3515         (first_vfun_index): New function.
3516         (set_vindex): Likewise.
3517         (add_virtual_function): Don't call start_vtable.  Do call
3518         set_vindex.
3519         (set_primary_base): Rename parameter.
3520         (determine_primary_base): Likewise.
3521         (num_vfun_entries): Don't use skip_rtti_stuff.
3522         (num_extra_vtbl_entries): Include RTTI information.
3523         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
3524         (skip_rtti_stuff): Remove.
3525         (dfs_modify_vtables): Don't use it.
3526         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
3527         (layout_nonempty_base_or_field): Update size handling.
3528         (create_vtable_ptr): Tweak.
3529         (layout_class_type): Adjust parameter names.
3530         (finish_struct_1): Simplify.
3531         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
3532         (skip_rtti_stuff): Remove.
3533         (first_vfun_index): New function.
3534         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3535         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
3536         (marked_vtable_pathp): Declare.
3537         (unmarked_vtable_pathp): Likewise.
3538         * error.c (dump_expr): Use first_vfun_index to calculate vtable
3539         offsets.
3540         * rtti.c (build_headof): Look for RTTI at negative offsets.
3541         (get_tinfo_decl_dynamic): Likewise.
3542         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
3543         here.
3544         (create_pseudo_type_info): Do it here instead.  Adjust so that
3545         vptr points at first virtual function.
3546         * search.c (marked_vtable_pathp): Make it global.
3547         (unmarked_vtable_pathp): Likewise.
3548         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
3549         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
3550         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
3551         (get_pure_virtuals): Likewise.
3552         (expand_upcast_fixups): Likewise.
3553         * tree.c (debug_binfo): Likewise.
3554         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
3555         negative offset.
3556         
3557 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3558
3559         * class.c (check_field_decl): Fix typo.
3560         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
3561         (check_methods): Likewise.
3562         (check_field_decls): Likewise.
3563         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
3564         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
3565         Use DECL_RESULT_FLD, not DECL_RESULT.
3566         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
3567         * lex.c (identifier_type): Likewise.
3568         * pt.c (determine_specialization, lookup_template_class): Likewise.
3569         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
3570         (resolve_overloaded_unification, more_specialized): Likewise.
3571         * semantics.c (finish_member_declaration): Likewise.
3572         * typeck.c (build_x_function_call): Likewise.
3573         
3574 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
3575
3576         * class.c (layout_empty_base): Handle empty bases with non-byte
3577         alignment.
3578         (build_base_field): Likewise.
3579         (layout_virtual_bases): Likewise.
3580
3581         * class.c (finish_struct_1): Fix typo in this change:
3582         
3583         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3584
3585 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
3586
3587         * decl.c (grokdeclarator): Count partial specializations when
3588         keeping track of how many template classes have been seen.
3589
3590         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
3591         
3592 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3593
3594         * class.c (build_vbase_pointer_fields): layout_field now place_field.
3595         (get_vfield_offset): Use byte_position.
3596         (set_rtti_entry): Set OFFSET to ssizetype zero.
3597         (get_binfo_offset_as_int): Deleted.
3598         (dfs_record_base_offsets): Use tree_low_cst.
3599         (dfs_search_base_offsets): Likewise.
3600         (layout_nonempty_base_or_field): Reflect changes in RLI format
3601         and call byte_position.
3602         (layout_empty_base): Convert offset to ssizetype.
3603         (build_base_field): use rli_size_unit_so_far.
3604         (dfs_propagate_binfo_offsets): Do computation in proper type.
3605         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
3606         (layout_class_type): Reflect changes in RLI names and fields.
3607         (finish_struct_1): Set DECL_FIELD_OFFSET.
3608         * dump.c (dequeue_and_dump): Call bit_position.
3609         * expr.c (cplus_expand_constant): Use byte_position.
3610         * rtti.c (expand_class_desc): Use bitsize_one_node.
3611         * typeck.c (build_component_addr): Use byte_position and don't
3612         special case for zero offset.
3613         
3614 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
3615
3616         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
3617         
3618         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
3619         tinfo object.
3620         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
3621         vtable.
3622
3623 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3624
3625         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
3626         DECL_P macros.
3627         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
3628         make_typename_type, check_initializer, cp_finish_decl,
3629         xref_tag): Likewise.
3630         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
3631         decl_namespace, arg_assoc_template_arg, arg_assoc,
3632         validate_nonmember_using_decl, do_class_using_decl): Likewise.
3633         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
3634         args_to_string): Likewise.
3635         * friend.c (is_friend): Likewise.
3636         * lex.c (note_got_semicolon, note_list_got_semicolon,
3637         is_global): Likewise.
3638         * method.c (build_overload_nested_name, build_overload_value,
3639         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
3640         * parse.y (typename_sub, typename_sub1): Likewise.
3641         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
3642         process_partial_specialization, convert_template_argument,
3643         template_args_equal, add_pending_template, lookup_template_class,
3644         for_each_template_parm_r, maybe_fold_nontype_arg,
3645         tsubst, instantiate_template, type_unification_real, unify,
3646         instantiate_pending_templates, set_mangled_name_for_template_decl):
3647         Likewise.
3648         * repo.c (repo_get_id, repo_template_used): Likewise.
3649         * search.c (lookup_field_1): Likewise.
3650         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
3651         * xref.c (classname): Likewise.
3652         
3653 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
3654
3655         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
3656         (CANONICAL_BINFO): New macro.
3657         (BINFO_NEW_VTABLE_MARKED): Use it.
3658         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
3659         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
3660         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
3661         not TREE_TYPE.
3662         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3663         (build_secondary_vtable): Likewise.
3664         (dfs_finish_vtbls): Likewise.
3665         (dfs_accumulate_vtbl_inits): Likewise.
3666         (accumulate_vtbl_inits): New function.
3667         (finish_vtbls): Make sure that virtual bases come after
3668         non-virtual bases in the vtable group.
3669         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
3670         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3671         * search.c (struct vbase_info): Move definition.
3672         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
3673         (unmarked_new_vtable_p): Likewise.
3674         (dfs_mark_vtable_path): Remove.
3675         (dfs_mark_new_vtable): Remove.
3676         (dfs_unmark_new_vtable): Likewise.
3677         (dfs_clear_search_slot): Likewise.
3678         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
3679         (dfs_clear_vbase_slots): Likewise.
3680         (init_vbase_pointers): LIkewise.
3681         
3682 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
3683
3684         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
3685         SIZETYPE to a non-SIZETYPE.
3686
3687 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
3688
3689         * class.c (layout_virtual_bases): Adjust names in conditionally
3690         compiled code.
3691         
3692         * class.c (record_base_offsets): New function.
3693         (layout_conflict_p): Likewise.
3694         (layout_nonempty_base_or_field): Use it.
3695         (layout_empty_base): New function.
3696         (build_base_field): Use it.
3697         (build_base_fields): Update comment.
3698         (layout_virtual_bases): Fold in a little code form
3699         layout_basetypes.  Use layout_empty_base.
3700         (layout_basetypes): Remove.
3701         (end_of_class): New function.
3702         (layout_class_type): Use it.  Adjust.
3703
3704         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
3705         (fntype_p): Remove.
3706         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
3707         comment. 
3708         (dfs_skip_nonprimary_vbases_markedp): Likewise.
3709         * typeck.c (fntype_p): Remove.
3710
3711         * cp-tree.h (TI_SPEC_INFO): Remove.
3712         (CLASSTYPE_TI_SPEC_INFO): Likewise.
3713         * pt.c (process_partial_specialization): Likewise.
3714
3715         * class.c (build_base_field): Fix thinko in computation of binfo
3716         offsets.
3717
3718         * tree.c (mark_local_for_remap_p): Mark variables declared in
3719         TARGET_EXPRs as well.
3720
3721 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
3722
3723         * typeck.c (require_complete_type, complete_type,
3724         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
3725         build_array_ref, convert_arguments, pointer_diff,
3726         build_x_unary_op, build_unary_op, build_c_cast,
3727         build_modify_expr): Use COMPLETE_TYPE_P etc.
3728         * call.c (is_complete, convert_like_real,
3729         build_new_method_call): Likewise.
3730         * class.c (build_vbase_pointer_fields, check_bases,
3731         build_base_field, finish_struct_1, pushclass): Likewise.
3732         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
3733         * decl.c (maybe_process_template_type_declaration, pushtag,
3734         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
3735         layout_var_decl, check_initializer, cp_finish_decl,
3736         grokdeclarator, require_complete_types_for_parms,
3737         grok_op_properties, xref_tag, xref_basetypes,
3738         check_function_type): Likewise.
3739         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
3740         * friend.c (do_friend): Likewise.
3741         * init.c (build_offset_ref): Likewise.
3742         * parse.y (structsp): Likewise.
3743         * pt.c (maybe_process_partial_specialization,
3744         tsubst_friend_function, instantiate_class_template, tsubst,
3745         do_type_instantiation, instantiate_pending_templates): Likewise.
3746         * repo.c (repo_get_id): Likewise.
3747         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
3748         synthesize_tinfo_var, emit_support_tinfos): Likewise.
3749         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
3750         * semantics.c (begin_class_definition): Likewise.
3751         * tree.c (build_cplus_method_type): Likewise.
3752         * typeck2.c (digest_init, build_functional_cast,
3753         add_exception_specifier): Likewise.
3754         * parse.h, parse.c: Regenerated.
3755
3756 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
3757
3758         * inc/cxxabi.h: New header file. Define new-abi entry points.
3759         (__pointer_type_info::target): Rename member to ...
3760         (__pointer_type_info::type): ... here.
3761         (__base_class_info::type): Rename member to ...
3762         (__base_class_info::base): ... here.
3763         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
3764         * cp-tree.h (CPTI_ABI): New global tree enumeration.
3765         (abi_node): New global tree node.
3766         * decl.c (abi_node): Document.
3767         (init_decl_processing): Initialize abi_node.
3768         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
3769         (get_vmi_pseudo_type_info): Likewise.
3770         (create_tinfo_types): Likewise.
3771         (emit_support_tinfos): Likewise.
3772         * tinfo.h (cxxabi.h): Include for new-abi.
3773         Move rtti class definitions to new header file.
3774         * tinfo.cc (abi): Use the namespace.
3775         (std): Move new abi rtti classes from here ...
3776         (__cxxabiv1): ... to here.
3777         * tinfo2.cc (cxxabi.h): Include for new-abi.
3778         Move rtti class definitions to new header file.
3779         (std): Move new abi rtti classes from here ...
3780         (__cxxabiv1): ... to here.
3781         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
3782         namespace.
3783
3784 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
3785             Jason Merrill  <jason@casey.cygnus.com>
3786
3787         * method.c (build_overload_int): Use host_integerp.
3788
3789 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3790
3791         * init.c (build_offset_ref): Handle the case of a templated member
3792         function.
3793     
3794 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3795
3796         * except.c (expand_exception_blocks): Clear catch_clauses_last.
3797
3798 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
3799
3800         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
3801         * class.c (check_bitfield_decl): Turn illegal bitfields into
3802         non-bitfields.
3803         (dfs_propagate_binfo_offsets): Adjust for new size_binop
3804         semantics.
3805         (dfs_offset_for_unshared_vbases): Likewise.
3806         * cvt.c (cp_convert_to_pointer): Convert NULL to a
3807         pointer-to-member correctly under the new ABI.
3808         * expr.c (cplus_expand_constant): Don't use cp_convert when
3809         turning an offset into a pointer-to-member.
3810         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
3811         when dereferencing them under the new ABI.
3812         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
3813         of pointers-to-members under the new ABI.
3814         
3815         * class.c (check_bitfield_decl): Remove restriction on really long
3816         bitfields.
3817         (layout_class_type): Implement new ABI handling of bitfields
3818         longer than their types.
3819
3820 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3821
3822         * parse.y (extdefs): Call ggc_collect.
3823         * parse.c: Regenerated.
3824
3825 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
3826
3827         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
3828         (note_name_declared_in_class): Use OVL_CURRENT to get at a
3829         potential overload.
3830
3831 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3832
3833         * class.c (build_vbase_path): Use integer_zerop.
3834         (build_vtable_entry): Use tree_low_cst.
3835         (get_vfield_offset): Use bit_position.
3836         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
3837         Use tree_low_cst.
3838         (check_bitfield_decl): Set DECL_SIZE using convert.
3839         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
3840         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
3841         Use tree_low_cst.
3842         (finish_struct_1): Use bit_position.
3843         (dump_class_hierarchy): Use tree_low_cst.
3844         * cp-tree.h (min_precision): Add declaration.
3845         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
3846         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
3847         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
3848         * expr.c (cplus_expand_constant): Use bit_position.
3849         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
3850         * rtti.c (get_base_offset): Use bit_position.
3851         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
3852         host_integerp, and tree_low_cst.
3853         (pointer_int_sum): Use integer_zerop.
3854         (build_component_addr): Use bit_position.
3855         
3856 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
3857
3858         * typeck.c (require_complete_type): Don't assume size_zero_node.
3859         (complete_type_or_else): Likewise.
3860
3861 2000-03-16  Steven Grady <grady@digitaldeck.com>
3862             Jason Merrill  <jason@casey.cygnus.com>
3863
3864         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
3865
3866 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
3867
3868         * decl2.c (grokfield): Bail out if type is error_mark_node.
3869
3870 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
3871
3872         * tinfo2.cc (__ptr_to_member_data): Rename to ...
3873         (__pointer_to_member_data): ... here. Adjust.
3874         * rtti.c (create_tinfo_types): Adjust.
3875
3876 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
3877
3878         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
3879         * decl.c (ref_desc_type_node): Undocument.
3880         * rtti.c (ptr_ref_initializer): Rename to ...
3881         (ptr_initializer): ... here. Adjust comments.
3882         (ptmd_initializer): Fix comment thinko.
3883         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
3884         (create_tinfo_types): Remove ref_desc_type_node init.
3885         * tinfo2.cc (__reference_type_info): Remove.
3886
3887 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
3888
3889         * decl.c (cp_finish_decl): Remove obsolete comment.
3890         
3891         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
3892
3893 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
3894
3895         * cp-tree.h: Tweak documentation.
3896         * class.c (build_vbase_pointer_fields): Layout the fields, too.
3897         (avoid_overlap): Remove.
3898         (get_binfo_offset_as_int): New function.
3899         (dfs_serach_base_offsets): Likewise.
3900         (layout_nonempty_base_or_field): Likewise.
3901         (build_base_field): Layout fields here.  Avoid placing two objects
3902         of the same type at the same address, under the new ABI.
3903         (build_base_fields): Adjust accordingly.
3904         (create_vtable_ptr): Return the new field, but don't attach it to
3905         TYPE_FIELDS.
3906         (remove_base_field): Remove.
3907         (remove_base_fields): Remove.
3908         (layout_basetypes): Adjust accordingly.
3909         (layout_class_type): Call layout_field for each field, rather than
3910         just making a wholesale call to layout_type.
3911
3912 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
3913
3914         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
3915
3916 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
3917
3918         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
3919
3920         * except.c (dtor_nothrow): New fn.
3921         (do_pop_exception): Use it.  Take type parm.
3922         (push_eh_cleanup): Take type parm.
3923         (expand_start_catch_block): Pass it.
3924         (build_eh_type_type_ref): Accept null type.
3925
3926 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
3927
3928         * cp-tree.h (revert_static_member_fn): Change prototype.
3929         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
3930         (grok_op_properties): Likewise.
3931         (start_function): Likewise.
3932         (revert_static_member_fn): Simplify.
3933         * pt.c (check_explicit_specialization): Adjust call to
3934         revert_static_member_fn.
3935
3936 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
3937
3938         * cp-tree.h (scope_kind): New type.
3939         (tmpl_spec_kind): Likewise.
3940         (declare_pseudo_global_level): Remove.
3941         (pseudo_global_level_p): Rename to template_parm_scope_p.
3942         (pushlevel): Remove declaration.
3943         (begin_scope): New function.
3944         (finish_scope): Likewise.
3945         (current_tmpl_spec_kind): Likewise.
3946         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
3947         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
3948         Add template_spec_p.
3949         (toplevel_bindings_p): Adjust.
3950         (declare_pseudo_global_level): Remove.
3951         (pseudo_global_level_p): Rename to template_parm_scope_p.
3952         (current_tmpl_spec_kind): New function.
3953         (begin_scope): Likewise.
3954         (finish_scope): Likewise.
3955         (maybe_push_to_top_level): Adjust.
3956         (maybe_process_template_type_declaration): Likewise.
3957         (pushtag): Likewise.
3958         (pushdecl_nonclass_level): Likewise.
3959         (lookup_tag): Likewise.
3960         (grokfndecl): Handle member template specializations.  Share
3961         constructor and non-constructor code.
3962         * decl2.c (check_classfn): Handle member template specializations.
3963         * pt.c (begin_template_parm_list): Use begin_scope.
3964         (begin_specialization): Likewise.
3965         (end_specialization): Likewise.
3966         (check_explicit_specialization): Use current_tmpl_spec_kind.
3967         Handle member template specializations.
3968         (end_template_decl): Use finish_scope.  Remove call to
3969         get_pending_sizes.
3970         (push_template_decl_real): Remove bogus error message.
3971         (tsubst_decl): Fix typo in code contained in comment.
3972         (instantiate_template): Handle member template specializations.
3973         (most_general_template): Likewise.
3974         
3975 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
3976
3977         * lex.c (whitespace_cr): Compress consecutive calls to warning().
3978         (do_identifier): Ditto for error().
3979
3980         * pt.c (convert_nontype_argument): Ditto for cp_error().
3981         (convert_template_argument): Ditto for cp_pedwarn().
3982
3983 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
3984
3985         * exception.cc (__check_null_eh_spec): New fn.
3986         * except.c (expand_end_eh_spec): Call it if the spec is throw().
3987
3988 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
3989
3990         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
3991         * except.c (expand_end_eh_spec): Add the return type.
3992         * rtti.c (throw_bad_cast): Add the parmtypes.
3993         (throw_bad_typeid): Likewise.
3994
3995         * semantics.c (expand_stmt): Only leave out rtl for unused
3996         artificials, and set DECL_IGNORED_P on them as well.
3997         * decl.c (wrapup_globals_for_namespace): Likewise.
3998
3999 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
4000
4001         * decl.c (maybe_commonize_var): Skip all artificial decls.
4002         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
4003
4004 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
4005
4006         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
4007         * cp-tree.h: Declare flag_enforce_eh_specs.
4008         * decl.c (store_parm_decls, finish_function): Check it.
4009
4010         C library functions don't throw.
4011         * Makefile.in (cfns.h): New target.
4012         (except.o): Depend on it.
4013         * Make-lang.in (cc1plus): Depend on cfns.gperf.
4014         * cfns.gperf: New file.
4015         * cfns.h: Generated.
4016         * except.c: Include it.
4017         (nothrow_libfn_p): New fn.
4018         * decl.c (grokfndecl): Use it.
4019         * cp-tree.h: Declare it.
4020         
4021         * decl.c (push_overloaded_decl_1, auto_function, 
4022         define_function): Lose.
4023         (build_library_fn_1): New static fn.
4024         (builtin_function): Use it.
4025         (get_atexit_node): Use build_library_fn_ptr.
4026         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
4027         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
4028         push_void_library_fn, push_throw_library_fn): New fns.
4029         * cp-tree.h: Declare them.
4030         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
4031         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
4032         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
4033         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
4034         * rtti.c (build_runtime_decl): Lose.
4035         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl, 
4036         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
4037         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
4038
4039         * call.c (build_call): Remove result_type parm.
4040         Call mark_used on unused artificial fns.
4041         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
4042
4043 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
4044
4045         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
4046         appropriate.
4047         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
4048         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
4049         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
4050         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
4051         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
4052         expand_generic_desc): Likewise.
4053
4054 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
4055
4056         * exception.cc (__cp_pop_exception): Cleanup the original object.
4057
4058 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
4059
4060         * decl.c (grok_op_properties): Merge conversion to void warning
4061         with other silly op warnings.
4062
4063 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
4064
4065         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
4066         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
4067
4068 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
4069
4070         * decl.c (cp_make_fname_decl): New function.
4071         (wrapup_globals_for_namespace): Don't emit unused static vars.
4072         (init_decl_processing): Remove comment about use of
4073         array_domain_type. Set make_fname_decl.
4074         (cp_finish_decl): Remove __FUNCTION__ nadgering.
4075         * semantics.c (begin_compound_stmt): Remove
4076         current_function_name_declared flagging.
4077         (expand_stmt): Don't emit unused local statics.
4078         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
4079         specially.
4080
4081 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
4082
4083         * typeck.c (convert_for_assignment): Don't look at array
4084         initializer.
4085         * call.c (convert_like_real): Likewise. 
4086
4087 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
4088
4089         Add initial support for '\uNNNN' specifier.
4090         * lex.c (read_ucs): New fn.
4091         (readescape, skip_white_space): Call it.
4092         (is_extended_char, is_extended_char_1): New fns.
4093         (utf8_extend_token): New fn, #if 0'd out.
4094         (real_yylex): Treat extended chars like letters.
4095
4096         * search.c (note_debug_info_needed): Walk the bases even if we 
4097         weren't deferring the type itself.
4098
4099 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4100
4101         * decl2.c (finish_objects): Constify a char*.
4102
4103         * method.c (emit_thunk): Likewise.
4104
4105 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
4106
4107         * typeck.c (dubious_conversion_warnings): Look through
4108         REFERENCE_TYPE.
4109
4110 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4111
4112         * class.c (dfs_modify_vtables): I is now unsigned.
4113         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
4114         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
4115         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
4116         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
4117         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
4118         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
4119         Call integer_all_onesp.
4120         * typeck2.c (process_init_constructor): Use compare_tree_int.
4121
4122         * lang-specs.h (as): Don't call if -syntax-only.
4123
4124 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
4125
4126         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
4127         RTL_EXPR_HAS_NO_SCOPE after all.
4128
4129 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
4130
4131         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
4132         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
4133         RTL_EXPR_HAS_NO_SCOPE.
4134
4135         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
4136         later.
4137         
4138         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
4139
4140 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
4141
4142         * call.c (convert_like): Macrofy.
4143         (convert_like_with_context): New macro.
4144         (convert_like_real): Renamed from convert_like.  Add calling
4145         context parameters, for diagnostics. Add recursive flag.  Call 
4146         dubious_conversion_warnings for outer conversion.
4147         (build_user_type_conversion): Use convert_like_with_context.
4148         (build_over_call): Likewise. Don't warn about dubious
4149         conversions here. Adjust convert_default_arg calls.
4150         (convert_default_arg): Add context parameters for diagnostics.
4151         Pass throught to convert_like_with_context.
4152         * cp-tree.h (convert_default_arg): Add context parameters.
4153         (dubious_conversion_warnings): Prototype new function.
4154         * typeck.c (convert_arguments): Adjust convert_default_arg call.
4155         (dubious_conversion_warnings): New function, broken
4156         out of convert_for_assignment. 
4157         (convert_for_assignment): Adjust.
4158
4159 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
4160
4161         * decl2.c (key_method): Break out from...
4162         (import_export_vtable, import_export_class): ...here.
4163
4164         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
4165         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
4166
4167         * search.c (note_debug_info_needed, dfs_debug_mark, 
4168         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
4169         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
4170
4171 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
4172
4173         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
4174         typos.
4175
4176 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
4177
4178         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
4179         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
4180         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
4181         (lang_type): Split gets_new into has_new and has_array_new.
4182         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4183         (TYPE_GETS_NEW): Split into ...
4184         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
4185         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
4186         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
4187         (build_op_new_call): Don't declare.
4188         (build_new_1): Likewise.
4189         * call.c (build_op_new_call): Remove.
4190         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4191         instead of TYPE_NEEDS_DESTRUCTOR.
4192         (finish_struct_bits): Likewise.
4193         (add_implicitly_declared_members): Likewise.
4194         (check_field_decl): Likewise.
4195         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
4196         correctly under the new ABI.
4197         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
4198         instead of TYPE_NEEDS_DESTRUCTOR.
4199         (initialize_local_var): Likewise.
4200         (destroy_local_var): Likewise.
4201         (cp_finish_decl): Likewise.
4202         (register_dtor_fn): Likewise.
4203         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
4204         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
4205         TYPE_VEC_DELETE_TAKES_SIZE here.
4206         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
4207         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
4208         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4209         (finish_destructor_body): Likewise.
4210         (maybe_build_cleanup_1): Likewise.
4211         * decl2.c (do_static_destruction): Likewise.
4212         * init.c (build_new_1): Make it static.
4213         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4214         (expand_cleanup_for_base): Likewise.
4215         (get_cookie_size): New function.
4216         (build_new_1): Handle array-new cookies correctly under the new
4217         ABI.
4218         (build_vec_delete_1): Likewise.
4219         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4220         (build_delete): Likewise.
4221         (build_vec_delete): Handle array-new cookies correctly under the new
4222         ABI.
4223         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4224         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
4225         TYPE_HAS_ARRAY_NEW_OPERATOR.
4226         * ptree.c (print_lang_type): Check them.
4227         * search.c (context_for_name_lookup): Fix typo in comment.
4228         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
4229         * tree.c (break_out_cleanups): Likewise.
4230         (build_cplus_array_test_1): Likewise.
4231         (cp_build_qualified_type_real): Likewise.
4232         * typeck.c (complete_type): Likewise.
4233         
4234         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
4235         the command-line, not the end.
4236         
4237 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
4238
4239         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
4240
4241 2000-03-02  Tom Tromey  <tromey@cygnus.com>
4242
4243         * cp-tree.h (build_java_class_ref): Declare.
4244         * init.c (build_java_class_ref): No longer static.
4245         * except.c (expand_throw): Generate a Java-style `throw' if the
4246         thrown object is a "Java" object.
4247         (initialize_handler_parm): Generate a Java-style lookup of
4248         exception info if the caught object is a "Java" object.
4249         (catch_language, catch_language_init): New globals.
4250         (decl_is_java_type): New function.
4251         (expand_start_catch_block): Don't call push_eh_info() or
4252         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
4253         class reference to build_catch_block.
4254
4255 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4256
4257         * typeck.c (comptypes): Treat sizetype like its language equivalent.
4258
4259 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
4260
4261         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
4262         to merge reference/pointer code and fix incorrect warnings.
4263
4264 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
4265
4266         * search.c (protected_accessible_p): Use context_for_name_lookup.
4267
4268         * init.c (construct_virtual_bases): Fix thinko.
4269         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
4270
4271 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4272
4273         * decl.c (current_function_decl): Move to toplev.c.
4274
4275 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
4276
4277         * pt.c (fn_type_unification): Unify return type, whenever
4278         provided.
4279         (get_bindings_real): Only pass return type when necessary.
4280         Remove explicit return type check.
4281         * class.c (resolve_address_of_overloaded_function): Pass desired
4282         return type to fn_type_unification.
4283
4284 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4285
4286         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
4287         DECL_FIELD_SIZE.
4288         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
4289         DECL_FIELD_SIZE.
4290         * rtti.c (expand_class_desc): Likewise.
4291         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
4292         (THUNK_VCALL_OFFSET): Likewise.
4293         (THUNK_DELTA): Reflect changes in ../tree.h.
4294
4295 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
4296
4297         * search.c (protected_accessible_p): Also allow the access if
4298         the member is public in DERIVED.  Lose TYPE parm.
4299         (friend_accessible_p): Lose TYPE parm.
4300         (accessible_p): Adjust.
4301
4302 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4303
4304         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
4305         on things that are not sizes; ssize_binop deleted.
4306         Call size_diffop when appropriate.
4307         (dfs_build_vcall_offset_vtbl_entries): Likewise.
4308         (build_primary_vtable, build_secondary_vtable): Likewise.
4309         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
4310         Variable I is HOST_WIDE_INT.
4311         (get_vfield_offset): Pass proper types to size_binop.
4312         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
4313         (finish_struct_1): Likewise.
4314         (skip_rtti_stuff): Arg N is now pointer to signed.
4315         (layout_class_type): Use size_zero_node.
4316         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
4317         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
4318         * decl.c (complete_arry_type): Pass proper types to size_binop.
4319         (xref_basetypes): BINFO_OFFSET is sizetype.
4320         * error.c (dump_expr): Don't use size_binop non-sizes.
4321         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
4322         * init.c (construct_virtual_bases): Fix type error.
4323         (build_vec_delete_1): Pass proper type to size_binop and don't
4324         fold result.
4325         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
4326         * rtti.c (get_base_offset): Pass proper type to size_binop.
4327         * search.c (dfs_find_vbases): Fix type error.
4328         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
4329         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
4330         * tree.c (debug_binfo): Variable N is signed.
4331         Use HOST_WIDE_INT_PRINT_DEC.
4332         * typeck.c (comptypes): sizetype is same as equivalent integer type.
4333         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
4334         size_one_node and size_zero_node.
4335         (c_alignof): Use size_one_node.
4336         (build_component_addr): Pass proper types to size_binop.
4337         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
4338
4339 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
4340
4341         Implement class scope using-declarations for functions.
4342         * class.c (handle_using_decl): Call add_method for used functions.
4343         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
4344         (add_method): Used functions are hidden by local functions.
4345         (check_bases_and_members): Handle using-decls before finalizing
4346         CLASSTYPE_METHOD_VEC.
4347         * call.c (add_function_candidate): Add ctype parm; if non-zero,
4348         override the type of 'this' accordingly.
4349         (add_template_candidate, add_template_candidate_real): Add ctype parm.
4350         (convert_class_to_reference, build_user_type_conversion_1, 
4351         build_new_function_call, build_object_call, build_new_op,
4352         build_new_method_call): Pass ctype parm.
4353
4354         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
4355         the baselink.
4356         * call.c (convert_class_to_reference, build_user_type_conversion_1, 
4357         build_new_function_call, build_object_call, build_new_op,
4358         build_new_method_call, build_op_delete_call): Don't get basetype_path
4359         from a baselink.
4360         * typeck.c (build_component_ref): Likewise.
4361         * init.c (build_offset_ref): Likewise.
4362         (resolve_offset_ref): Don't call enforce_access.  
4363         Call build_scoped_ref.
4364         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
4365         would cause an error or if -pedantic.
4366         * class.c (alter_access): Lose binfo parm.
4367
4368 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
4369
4370         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
4371         types.
4372
4373 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
4374
4375         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
4376         pseudo_type_info creation into the std namespace
4377
4378 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
4379
4380         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
4381         (import_export_class): Remove declaration.
4382         * decl2.c (import_export_class): Make it static.
4383         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
4384         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
4385         EXPR_WITH_FILE_LOCATION.
4386         * lex.c (check_newline): Tweak filename/lineno setting.
4387         * semantics.c (begin_while_stmt): Fix typo in comment.
4388         
4389 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4390
4391         * lang-options.h (-fmessage-length=): Add missing option.
4392
4393         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
4394
4395 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
4396
4397         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
4398
4399 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
4400
4401         * optimize.c (expand_call_inline): Emit the return label before
4402         evaluating the return value.
4403
4404 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
4405
4406         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
4407         than duplicating functionality here.
4408         * optimize.c: Include input.h.
4409         (expand_call_inline): Use push_srcloc and pop_srcloc.
4410         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
4411         * parse.c: Regenerated.
4412         * Makefile.in (lex.o): Depend on input.h.
4413         (optimize.o): Likewise.
4414         
4415 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
4416
4417         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
4418         function type, rather than ICE.
4419
4420 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
4421
4422         * decl.c (grokdeclarator): Call decl_type_access_control.
4423         * parse.y (parse_end_decl): Don't call decl_type_access_control if
4424         decl is null.
4425
4426 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
4427
4428         * decl.c (decls_match): Remove obsolete static member nadgering.
4429
4430 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4431
4432         * decl.c (grokdeclarator): Change ANSI to ISO.
4433         * lex.c (consume_string, readescape, do_identifier): Likewise.
4434         (parse_float, real_yylex): Likewise.
4435         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
4436         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
4437         new_type_id, maybe_label_decls, simple_stmt, 
4438         for.init.statement): Likewise.
4439         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
4440         * semantics.c (finish_named_return_value): Likewise.
4441         * parse.c: Regenerate.
4442
4443 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
4444
4445         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
4446         (CPTI_CLASS_STAR_TYPE): Remove.
4447         (vtable_index_type): Likewise.
4448         (class_star_type_node): Remove.
4449         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
4450         (build_binary_op_nodefault): Remove.
4451         * call.c (build_new_op): Use build_binary_op instead of
4452         build_binary_op_nodefault.
4453         * decl.c (init_decl_processing): Remove class_star_type_node
4454         initialization.  Make delta_type_node ptrdiff_type_node under the
4455         new ABI.  Initialize vtable_index_type.
4456         (build_ptrmemfunc_type): Build different structures for the new
4457         ABI.
4458         (build_enumerator): Use build_binary_op instead of
4459         build_binary_op_nodefault.
4460         * method.c (build_overload_value): Mangle pointers-to-members
4461         appropriately under the new ABI.
4462         * typeck.c (build_array_ref): Use build_binary_op instead of
4463         build_binary_op_nodefault.
4464         (get_member_function_from_ptrfunc): Adjust for the new ABI.
4465         (build_binary_op_nodefault): Rename to ...
4466         (build_binary_op): ... this.  Remove old version.  Adjust for
4467         pointer-to-member comparisons under the new ABI.
4468         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
4469         (build_ptrmemfunc): Adjust for the new ABI.
4470         (expand_ptrmemfunc_cst): Likewise.
4471         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
4472         (pfn_from_ptrmemfunc): Adjust for the new ABI.
4473         
4474 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
4475
4476         * call.c (build_object_call): Compress consecutive calls to
4477         cp_error.
4478         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
4479         (build_op_delete_call): Adjust message formatting.
4480
4481         * class.c (check_bases): Compress consecutive calls to
4482         cp_pedwarn. 
4483         (finish_struct_anon): Say 'ISO C++'.
4484
4485         * decl.c (start_decl): Same here.
4486         (grok_reference_init): Likewise.
4487         (grokfndecl): Correct message formatting.
4488         (grokfndecl): Improve diagnostic.
4489         (check_static_variable_definition): Likewise. Say 'ISO C++'
4490         (compute_array_index_type): Say 'ISO C++'
4491         (create_array_type_for_decl): Compress consecutive calls to
4492         cp_error. 
4493         (grokdeclarator): Say 'ISO C++'
4494         (grok_op_properties): Likewise.
4495
4496         * decl2.c (delete_sanity): Clairify diagnostic.
4497         (check_member_template): Same here.
4498         (grok_function_init): Use consistent terminology.
4499
4500         * expr.c (do_case): Say 'ISO C++'
4501
4502         * friend.c (do_friend): Compress consecutive calls to warning.
4503         
4504 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
4505
4506         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
4507         * class.c (build_secondary_vtable): Reorganize.  Don't create a
4508         new vtable under the new ABI.
4509         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
4510         computing the size.
4511         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
4512         the initializing elements.
4513         (initialize_vtable): New function.
4514         (dfs_finish_vtbls): Use it.
4515         (dfs_accumulate_vtbl_inits): New function.
4516         (finish_vtbls): Merge primary and secondary vtables under the new
4517         ABI.
4518         (finish_struct_1): Remove redundant call to layout_vtable_decl.
4519         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
4520         aren't VAR_DECLs.
4521
4522         * class.c (build_vtable): New function, split out from ...
4523         (get_vtable_decl): ... here, and ...
4524         (build_secondary_vtable): ... here.
4525
4526         * pt.c (tsubst_decl): Fix formatting.
4527         
4528 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4529
4530         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
4531         (avoid_overlap, build_base_field): Likewise.
4532         (build_base_field, build_base_fields, is_empty_class): 
4533         Test DECL_SIZE with integer_zero.
4534         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
4535         * cp-tree.h (struct lang_type): New field size_unit.
4536         (CLASSTYPE_SIZE_UNIT): New macro.
4537         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
4538         (cp_finish_decl): Delete -Wlarger-than processing.
4539         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
4540         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
4541         * tree.c (make_binfo): binfo vector is one entry longer.
4542         (walk_tree): Walk DECL_SIZE_UNIT.
4543
4544 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
4545
4546         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
4547         comment.
4548         (build_vtable_entry): Don't assume all vtable entries are
4549         functions.
4550         (build_vtbl_initializer): Adjust accordingly.
4551         (get_vtable_decl): Fix formatting.
4552         
4553 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
4554
4555         * semantics.c (deferred_type_access_control): Walk the entire
4556         type_lookups list.
4557         (save_type_access_control): Rename from 
4558         initial_deferred_type_access_control.  Just remember the value.
4559         (decl_type_access_control): New fn.
4560         (begin_function_definition): Use deferred_type_access_control, after
4561         we've started the function.  Set type_lookups to error_mark_node.
4562         * parse.y (frob_specs, fn.def1): Adjust.
4563         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
4564         (parse_end_decl, parse_bitfield0, parse_method): New fns.
4565         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
4566         (after_type_component_declarator0): Likewise.
4567         (after_type_component_declarator): Likewise.
4568         (notype_component_declarator): Likewise.
4569         * cp-tree.h: Adjust.
4570
4571         * decl.c (redeclaration_error_message): Allow redeclaration of 
4572         namespace-scope decls.
4573
4574 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
4575
4576         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
4577
4578 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
4579
4580         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
4581         * decl2.c (grokclassfn): Likewise.
4582
4583         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
4584
4585         * decl2.c (lang_decode_option): Don't set default message length
4586         here.
4587         * lex.c (lang_init_options): Set it here.
4588
4589 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
4590
4591         Make DECL_CONTEXT mean the class in which a member function was
4592         declared, even for a virtual function.
4593         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
4594         (DECL_FRIEND_CONTEXT): New macro.
4595         (DECL_REAL_CONTEXT): Remove.
4596         (SET_DECL_FRIEND_CONTEXT): Likewise.
4597         (DECL_VIRTUAL_CONTEXT): Adjust.
4598         (DECL_CLASS_SCOPE_P): Use TYPE_P.
4599         (add_friends): Remove.
4600         (hack_decl_function_context): Likewise.
4601         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
4602         CP_DECL_CONTEXT.
4603         (build_over_call): Fix indentation.  Use DECL_CONTEXT
4604         instead of DECL_CLASS_CONTEXT.
4605         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
4606         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4607         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4608         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
4609         (build_base_field): Likewise.
4610         (finish_struct_1): Likewise.
4611         (build_self_reference): Likewise.
4612         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
4613         DECL_REAL_CONTEXT.
4614         (pushtag): Use decl_function_context, not
4615         hack_decl_function_context.
4616         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4617         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
4618         (pushdecl): Remove bogus code.
4619         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
4620         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4621         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4622         Use decl_function_context, nothack_decl_function_context.
4623         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
4624         (grokdeclarator): Likewise.  Use decl_function_context, not
4625         hack_decl_function_context.
4626         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
4627         (start_function): Use DECL_FRIEND_CONTEXT, not
4628         DECL_CLASS_CONTEXT.  Use decl_function_context, not
4629         hack_decl_function_context.
4630         (finish_function): Use decl_function_context, not
4631         hack_decl_function_context.
4632         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
4633         DECL_CLASS_CONTEXT.
4634         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
4635         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
4636         (grokfield): Likewise.
4637         (finish_builtin_type): Likewise.
4638         (finish_vtable_vardec): Use decl_function_context, not
4639         hack_decl_function_context.
4640         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4641         (start_static_initialization_or_destruction): Likewise.
4642         (finish_static_initialization_or_destruction): Likewise.
4643         (mark_used): Adjust logic for deciding when to synthesize methods.
4644         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
4645         DECL_REAL_CONTEXT.
4646         * error.c (dump_function_decl): Use DECL_CONTEXT, not
4647         DECL_CLASS_CONTEXT.
4648         * friend.c (is_friend): Likewise.
4649         (add_friends): Remove.
4650         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
4651         * lex.c (begin_definition_of_inclass_inline): Use
4652         decl_function_context, not hack_decl_function_context.
4653         (process_next_inline): Likewise.
4654         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
4655         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
4656         DECL_CLASSS_CONTEXT.
4657         (hack_identifier): Likewise.
4658         (synthesize_method):  Use decl_function_context, not
4659         hack_decl_function_context.
4660         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
4661         DECL_REAL_CONTEXT.
4662         (is_member_template): Use decl_function_context, not
4663         hack_decl_function_context.  Use DECL_CONTEXT, not
4664         DECL_CLASS_CONTEXT.
4665         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not 
4666         DECL_CLASS_CONTEXT.
4667         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
4668         DECL_REAL_CONTEXT.
4669         (push_template_decl_real): Likewise.
4670         (instantiate_class_template): Don't call add_friends.
4671         (tsubst_default_argument): Use DECL_CONTEXT, not
4672         DECL_REAL_CONTEXT.
4673         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
4674         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4675         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
4676         DECL_CLASS_CONTEXT.
4677         * repo.c (repo_inline_used): Likewise.
4678         * search.c (current_scope): Adjust for new _CONTEXT macros.
4679         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
4680         DECL_REAL_CONTEXT.
4681         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
4682         (lookup_fnfields_here):Likewise.
4683         (check_final_overrider): Likewise.
4684         (init_vbase_pointers): Likewise.
4685         (virtual_context): Likewise.
4686         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
4687         (expand_body): Use decl_function_context, not
4688         hack_decl_function_context.
4689         * tree.c (hack_decl_function_context): Remove.
4690         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
4691         DECL_CLASS_CONTEXT.
4692         * typeck2.c (error_not_base_type): Likewise.
4693         
4694 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
4695
4696         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
4697
4698 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4699
4700         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
4701
4702 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
4703
4704         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
4705
4706 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
4707
4708         * decl2.c (lang_decode_option): Enable automatic line wrapping.
4709
4710 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
4711
4712         * parse.y (frob_specs): Split out...
4713         (parse_decl): From here.
4714         (fn.def2): Call initial_deferred_type_access_control.
4715         (after_type_component_declarator0): Call frob_specs.
4716         (notype_component_declarator0): Likewise.
4717         * search.c (friend_accessible_p): Nested classes are friends of their
4718         enclosing classes.
4719
4720 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
4721
4722         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
4723         used to create an implicit temporary.
4724
4725         * class.c (dfs_modify_vtables): Tweak calculation of functions to
4726         override.
4727
4728 2000-02-08  Nathan Sidwell  <nathan@acm.org>
4729
4730         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
4731         strip array element qualifiers too.
4732
4733 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
4734
4735         * decl.c (store_parm_decls): Don't build cleanups for parameters
4736         while processing_template_decl.
4737
4738 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
4739
4740         * cp-tree.h (struct saved_scope): Add incomplete field.
4741         (namespace_scope_incomplete): New macro.
4742         * decl.c (pushdecl): Use it.
4743         (hack_incomplete_structures): Use it.  See through artificial
4744         binding levels.
4745         (mark_saved_scope): Mark it.
4746
4747         Implement access control for nested types.
4748         * search.c (type_access_control): New fn.
4749         (accessible_p): Now we do perform access control for types.
4750         * semantics.c (deferred_type_access_control): New fn.
4751         (initial_deferred_type_access_control): New fn.
4752         (begin_function_definition): Call it.  Add lookups parm.
4753         * decl.c (struct binding_level): Add this_class field.
4754         (pushlevel_class): Set it.
4755         (mark_binding_level): Mark it.
4756         (lookup_name_real): Use it.  Call type_access_control.
4757         (mark_saved_scope): Mark lookups field.
4758         * cp-tree.h (flagged_type_tree): Add lookups field.
4759         (struct saved_scope): Add lookups field.
4760         (type_lookups): New macro.
4761         * parse.y (declmods): Now <ftype>.
4762         (parse_decl): Add lookups parm.  Call 
4763         initial_deferred_type_access_control.
4764         (lang_extdef): Clear type_lookups.
4765         (typed_declspecs, declmods, typespec): Set lookups field.
4766         (initdcl): Call deferred_type_access_control.
4767         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
4768         component_decl_1, named_parm): Adjust.
4769         * friend.c (is_friend): Nested classes are friends of their
4770         enclosing classes.
4771
4772         * class.c (currently_open_derived_class): New fn.
4773         * method.c (hack_identifier): Use it.
4774
4775         * lex.c (do_identifier): Remove obsolete code.
4776
4777         * parse.y (typed_typespecs): Propagate new_type_flag properly.
4778
4779 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
4780
4781         * tinfo.h: Remove apostrophes from C++ comment (xgettext
4782         thinks this file is plain C).
4783
4784 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4785
4786         * Makefile.in (call.o): Depend on $(EXPR_H).
4787
4788         * call.c: Include "expr.h".
4789
4790         * class.c (dump_class_hierarchy): Add prototype.
4791
4792         * search.c (dfs_get_pure_virtuals): Likewise.
4793
4794 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
4795
4796         * parse.y (simple_stmt): Allow :: token in asm parameter list.
4797         * parse.c: Rebuilt.
4798
4799 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
4800
4801         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
4802         Store it in DECL_FCONTEXT.
4803         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
4804
4805 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
4806
4807         * tinfo.h (old abi): #include "tconfig.h".
4808         * tinfo.cc (convert_to_base): Move into old abi section.
4809
4810 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
4811
4812         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
4813         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
4814         (BINFO_PRIMARY_BINFO): New macro.
4815         (BF_DELTA): Rename to ...
4816         (BV_DELTA): ... this.
4817         (BF_VCALL_INDEX): Rename to ...
4818         (BV_VCALL_INDEX): ... this.
4819         (BF_FN): Rename to ...
4820         (BV_FN): ... this.
4821         * class.c (build_vbase_path): Adjust for changes to reverse_path.
4822         (set_rtti_entry): Rename BF_ macros to BV_ variants.
4823         (modify_vtable_entry): Simplify.
4824         (add_virtual_function): Rename BF_ macros to BV_ variants.
4825         (build_vtable_initializer): Likewise.
4826         (get_class_offset_1): Remove.
4827         (dfs_get_class_offset): Likewise.
4828         (get_class_offset): Likewise.
4829         (dfs_find_final_overrider): New function.
4830         (find_final_overrider): Likewise.
4831         (modify_one_vtable): Remove.
4832         (dfs_find_base): New function.
4833         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
4834         find_final_overrider.
4835         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
4836         virtuals.
4837         (dfs_fixup_vtable_deltas): Remove.
4838         (override_one_vtable): Remove.
4839         (merge_overrides): Likewise.
4840         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
4841         unreal chilren of virtual bases.
4842         (finish_struct_1): Don't use merge_overrides.  Don't use
4843         dfs_fixup_vtable_deltas.
4844         * tree.c (reverse_path): Return a TREE_LIST, not a chain of 
4845         BINFOs.
4846         
4847 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
4848             Jason Merrill  <jason@yorick.cygnus.com>
4849
4850         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
4851
4852 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
4853
4854         * exception.cc (__throw_bad_typeid): Add missing std::.
4855
4856 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4857
4858         * cp-tree.h (make_thunk): PROTO -> PARAMS.
4859
4860 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
4861
4862         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
4863
4864         Runtime support for new-abi rtti.
4865         * inc/typeinfo (type_info::operator!=): Define in class.
4866         (type_info::before, type_info::name, type_info::operator==,
4867         type_info::operator!=): Define new ABI implementations.
4868         (type_info::is_pointer_p, type_info::is_function_p): Declare
4869         new virtual functions.
4870         (type_info::do_catch, type_info::do_upcast): Likewise.
4871         
4872         * tinfo.h (__base_class_info): Define new class.
4873         (__class_type_info): Likewise.
4874         (__si_class_type_info): Likewise.
4875         (__vmi_class_type_info): Likewise.
4876         (__dynamic_cast): Prototype.
4877         
4878         * tinfo.cc: Conditionalize old and new rtti mechanisms.
4879         (type_info::is_pointer_p): Define new function.
4880         (type_info::is_function_p): Likewise.
4881         (type_info::do_catch): Likewise.
4882         (type_info::do_upcast): Likewise.
4883         (vtable_prefix): New structure for vtable access.
4884         (adjust_pointer): Define new template function.
4885         (contained_p, public_p, virtual_p, contained_public_p,
4886         contained_nonpublic_p, contained_nonvirtual_p): Define new
4887         functions.
4888         (nonvirtual_base_type): New local variable.
4889         (__class_type_info::~__class_type_info): Define.
4890         (__si_class_type_info::~__si_class_type_info): Likewise.
4891         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
4892         (__class_type_info::do_catch): Define new function.
4893         (__class_type_info::do_upcast): Likewise.
4894         (__class_type_info::find_public_src): Likewise.
4895         (__class_type_info::do_find_public_src): Likewise.
4896         (__si_class_type_info::do_find_public_src): Likewise.
4897         (__vmi_class_type_info::do_find_public_src): Likewise.
4898         (__class_type_info::do_dyncast): Likewise.
4899         (__si_class_type_info::do_dyncast): Likewise.
4900         (__vmi_class_type_info::do_dyncast): Likewise.
4901         (__class_type_info::do_upcast): Likewise.
4902         (__si_class_type_info::do_upcast): Likewise.
4903         (__vmi_class_type_info::do_upcast): Likewise.
4904         (__dynamic_cast): Likewise.
4905         
4906         * tinfo2.cc (__fundamental_type_info): Define new class.
4907         (__pointer_type_info): Likewise.
4908         (__reference_type_info): Likewise.
4909         (__array_type_info): Likewise.
4910         (__function_type_info): Likewise.
4911         (__enum_type_info): Likewise.
4912         (__ptr_to_member_type_info): Likewise.
4913         (__fundamental_type_info::~__fundamental_type_info): Define.
4914         (__pointer_type_info::~__pointer_type_info): Likewise.
4915         (__reference_type_info::~__reference_type_info): Likewise.
4916         (__array_type_info::~__array_type_info): Likewise.
4917         (__function_type_info::~__function_type_info): Likewise.
4918         (__enum_type_info::~__enum_type_info): Likewise.
4919         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
4920         (__pointer_type_info::do_catch): Define new function.
4921         (__ptr_to_member_type_info::do_catch): Define new function.
4922         
4923         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
4924         (__is_pointer): Likewise.
4925
4926         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
4927
4928 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
4929
4930         * cp/class.c (build_vtable): Rename to build_primary_vtable.
4931         (prepare_fresh_vtable): Rename to build_secondary_vtable.
4932         (make_new_vtable): New function.
4933         (modify_vtable_entry): Handle generation of new vtables correctly.
4934         (modify_one_vtable): Remove unused parameter.
4935         (dfs_fixup_vtable_deltas): Likewise.
4936         (override_one_vtable): Use build_secondary_vtable.
4937         (finish_struct_1): Use build_primary_vtable and
4938         build_secondary_vtable.
4939         
4940 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
4941
4942         * cp/decl.c: Adjust variable names, comments, help strings.
4943
4944 2000-01-29  Nathan Sidwell  <nathan@acm.org>
4945
4946         * new2.cc (operator delete[]): Use operator delete, don't assume
4947         implementation.
4948
4949 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
4950
4951         * class.c (build_vtbl_initializer): Add argument to
4952         build_vtable_entry call.
4953
4954 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
4955
4956         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
4957         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
4958         (BF_DELTA): New macro.
4959         (BF_VCALL_INDEX): Likewise.
4960         (BF_FN): Likewise.
4961         (THUNK_VCALL_OFFSET): Likewise.
4962         (make_thunk): Change prototype.
4963         * class.c (build_vtable_entry): Integrate
4964         build_vtable_entry_for_fn.  Handle vcall indices.
4965         (build_vtable_entry_for_fn): Remove.
4966         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
4967         BF_VCALL_INDEX, BF_FN.
4968         (modify_vtable_entry): Integrate common code from
4969         modify_one_vtable and dfs_fixup_vtable_deltas.
4970         (add_virtual_function): Set BF_VCALL_INDEX.
4971         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
4972         and BF_FN.
4973         (modify_one_vtable): Simplify.
4974         (dfs_fixup_vtable_deltas): Likewise.
4975         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN. 
4976         * method.c (make_thunk): Handle vcall indices.
4977         
4978 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
4979
4980         Compiler side new abi rtti (not enabled).
4981         * cp-tree.h (new_abi_rtti_p): New macro.
4982         (emit_support_tinfos): Prototype new function.
4983         (tinfo_decl_p): Likewise.
4984         (emit_tinfo_decl): Likwise.
4985         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
4986         macros.
4987         (doing_runtime): New local static.
4988         (init_rtti_processing): Add new-abi initializer.
4989         (get_tinfo_decl): Add new-abi logic.
4990         (tinfo_from_decl): Likewise.
4991         (build_dynamic_cast_1): Likewise.
4992         (qualifier_flags): New static function.
4993         (tinfo_base_init): Likewise.
4994         (generic_initializer): Likewise.
4995         (ptr_ref_initializer): Likewise.
4996         (ptmd_initializer): Likewise.
4997         (class_hint_flags): Likewise.
4998         (class_initializer): Likewise.
4999         (synthesize_tinfo_var): Likewise.
5000         (create_real_tinfo_var): Likewise.
5001         (create_pseudo_type_info): Likewise.
5002         (get_vmi_pseudo_type_info): Likewise.
5003         (create_tinfo_types): Likewise.
5004         (emit_support_tinfos): New global function.
5005         (tinfo_decl_p): New global predicate.
5006         (emit_tinfo_decl): New global function.
5007         * class.c (set_rtti_entry): Generalize for old and new rtti.
5008         (build_vtbl_initializer): Likewise.
5009         * decl2.c (finish_file): Likewise.
5010
5011 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
5012
5013         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
5014         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
5015
5016 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
5017
5018         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
5019         for scopes.
5020
5021 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
5022
5023         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
5024
5025 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
5026
5027         * optimize.c (calls_setjmp_r): Supply new argument
5028         to special_function_p.
5029
5030 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5031
5032         * call.c: PROTO -> PARAMS.
5033         * class.c: Likewise.
5034         * cp-tree.h: Likewise.
5035         * cvt.c: Likewise.
5036         * decl.c: Likewise.
5037         * decl.h: Likewise.
5038         * decl2.c: Likewise.
5039         * dump.c: Likewise.
5040         * errfn.c: Likewise.
5041         * error.c: Likewise.
5042         * except.c: Likewise.
5043         * expr.c: Likewise.
5044         * init.c: Likewise.
5045         * input.c: Likewise.
5046         * lex.c: Likewise.
5047         * lex.h: Likewise.
5048         * method.c: Likewise.
5049         * optimize.c: Likewise.
5050         * parse.y: Likewise.
5051         * pt.c: Likewise.
5052         * repo.c: Likewise.
5053         * rtti.c: Likewise.
5054         * search.c: Likewise.
5055         * semantics.c: Likewise.
5056         * spew.c: Likewise.
5057         * tree.c: Likewise.
5058         * typeck.c: Likewise.
5059         * typeck2.c: Likewise.
5060         * xref.c: Likewise.
5061
5062 2000-01-25  Richard Henderson  <rth@cygnus.com>
5063
5064         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
5065
5066 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
5067
5068         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
5069         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
5070         (struct vcall_offset_data_s): New type.
5071         (dfs_vcall_offset_queue_p): New function.
5072         (dfs_build_vcall_offset_vtbl_entries): Likewise.
5073         (build_vcall_offset_vtbl_entries): Likewise.
5074         (layout_vtable_decl): Likewise.
5075         (num_vfun_entries): Likewise.
5076         (num_extra_vtbl_entries): Add the entries for vcall offsets.
5077         (build_vtbl_initializer): Likewise.
5078         (dfs_finish_vtabls): Use layout_vtable_decl.
5079         (modify_one_vtables): Always duplicate vtables under the new ABI.
5080         (finish_struct_1): Use layout_vtable_decl.
5081         
5082 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5083
5084         * decl.c (member_function_or_else): Change third arg from a format
5085         specifier to an `enum overload_flags'.  Callers changed.
5086
5087 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
5088
5089         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
5090         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
5091         build_const_cast, get_delta_difference, check_return_expr): Avoid
5092         ANSI string concatenation usage.  
5093
5094 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
5095
5096         * class.c (layout_class_type): Put the fields required to make a
5097         class non-empty at the end, not the beginning, of the TYPE_FIELDs
5098         list.
5099
5100 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
5101
5102         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
5103         template.
5104
5105         * decl2.c (mark_used): Do instantiate inlines that have been
5106         explicitly instantiated.
5107
5108 2000-01-24  Richard Henderson  <rth@cygnus.com>
5109
5110         * call.c (build_over_call): Use expand_tree_builtin.
5111         * typeck.c (build_function_call_real): Likewise.
5112         (build_binary_op_nodefault): Handle unordered compares.
5113
5114 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
5115
5116         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
5117         cp_tree_index values.
5118         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
5119         New global node #defines for them.
5120         * rtti.c (call_void_fn): Replace with ...
5121         (build_runtime_decl): ... new static function.
5122         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
5123         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
5124         (build_dynamic_cast_1): Always produce correctly typed result.
5125         Explicitly produce type_info addresses. Use dynamic_cast_node.
5126         * exception.cc (__throw_bad_cast): Return `void *'.
5127         (__throw_bad_typeid): Return `const type_info &'.
5128
5129 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
5130
5131         * cp-tree.h (get_vtable_decl): Prototype new function.
5132         * class.c (get_vtable_decl): New function. Broken out from ...
5133         (build_vtable): ... here. Use it.
5134         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
5135         by get_vtable_decl.
5136
5137 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
5138
5139         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
5140         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
5141         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
5142         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
5143         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
5144         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
5145         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
5146         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
5147         (CPTI_TINFO_VAR_ID): New enumeration.
5148         (__tp_desc_type_node, __access_mode_type_node,
5149         __bltn_desc_type_node, __user_desc_type_node,
5150         __class_desc_type_node, __ptr_desc_type_node,
5151         __attr_desc_type_node, __func_desc_type_node,
5152         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
5153         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
5154         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
5155         enum_desc_type_node, class_desc_type_node,
5156         si_class_desc_type_node, vmi_class_desc_type_node,
5157         ptmd_desc_type_node, base_desc_type_node): New #defines.
5158         (tinfo_fn_id, tinfo_fn_type): Rename to ...
5159         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
5160         (tinfo_var_id): New enumeration.
5161         (DECL_TINFO_FN_P): Augment comment.
5162         * decl.c (cp_global_trees): Adjust documentation.
5163         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
5164         tinfo_decl_type and tinfo_var_id.
5165         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
5166         (build_typeid): Remove unused variable.
5167         (get_tinfo_var): Use tinfo_var_id.
5168         (tinfo_name): New static function.
5169         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
5170         (tinfo_from_decl): Likewise.
5171         (get_base_offset): New static function, broken out of
5172         expand_class_desc.
5173         (expand_si_desc): Use tinfo_name.
5174         (expand_class_desc): Likewise. Lose local static variable.
5175         Use base_desc_type_node. Use get_base_offset.
5176         (expand_ptr_desc): Use tinfo_name.
5177         (expand_attr_desc): Likewise.
5178         (expand_generic_desc): Likewise.
5179
5180         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
5181         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
5182
5183 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
5184
5185         * cp-tree.h (__eprintf): Remove declaration.
5186         * tree.c (__eprintf): Remove definition.
5187
5188 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
5189             Mark Mitchell  <mark@codesourcery.com>
5190
5191         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
5192         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
5193
5194 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
5195
5196         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
5197
5198 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
5199
5200         * cp-tree.h (register_dtor_fn): New function.
5201         * decl.c (destroy_local_static): Rename to ...
5202         (register_dtor_fn): ... this.  Give it external linkage.
5203         (expand_static_init): Use it.
5204         * decl2.c (do_static_initialization): Likewise, if using
5205         __cxa_atexit.
5206         (do_static_destruction): Check that __cxa_atexit is not in use.
5207         (finish_file): Don't call do_static_destruction if using
5208         __cxa_atexit.
5209
5210         * typeck.c (convert_arguments): Restore two-message error
5211         reporting.
5212         
5213 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
5214
5215         Remap dynamic cast hint values to be consistent across ABIs.
5216         * search.c (dynamic_cast_base_recurse): Remap generated value.
5217         (get_dynamic_cast_base_type): Adjust documentation.
5218         * tinfo.h (__user_type_info::dyncast): Likewise.
5219         (__user_type_info::find_public_subobj): Remap BOFF meaning.
5220         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
5221         (__class_type_info::do_dyncast): Likewise.
5222         (__class_type_info::do_find_public_subobj): Likewise.
5223         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.     
5224
5225 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
5226
5227         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
5228
5229         * typeck2.c (incomplete_type_error): Restore previous
5230         cp_error and cp_error_at call sequence.
5231         
5232 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
5233
5234         * class.c (dump_class_hierarchy): Make format agree with argument;
5235         cast pointer to unsigned long and print with %lx.
5236         
5237 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
5238
5239         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
5240         
5241         * typeck.c (composite_pointer_type, common_type,
5242         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
5243         build_function_call_real, convert_arguments,
5244         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
5245         build_unary_op, mark_addressable, build_compound_expr,
5246         build_static_cast, build_reinterpret_cast, build_const_cast,
5247         build_c_cast, build_modify_expr, get_delta_difference,
5248         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with 
5249         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
5250         into a single one.
5251         * typeck2.c (readonly_error, abstract_virtuals_error,
5252         process_init_constructor, check_for_new_type): Likewise.
5253
5254 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
5255
5256         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
5257         VAR_DECLs.
5258
5259 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
5260
5261         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
5262         (build_x_typeid): Likewise.
5263         (get_tinfo_fn): Likewise.
5264         (get_tinfo_fn_unused): Rename to ...
5265         (get_tinfo_decl): ... here.
5266         * rtti.c (build_headof): Replace logic error with assertion.
5267         (get_tinfo_fn_dynamic): Rename to ...
5268         (get_tinfo_decl_dynamic): ... here. Make static. Use
5269         complete_type_or_else.
5270         (build_x_typeid): Move into ...
5271         (build_typeid): ... here. Adjust call to
5272         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
5273         throw_bad_typeid expression.
5274         (get_tinfo_fn_unused): Rename to ...
5275         (get_tinfo_decl): ... here. Adjust comment.
5276         (get_tinfo_fn): Delete.
5277         (tinfo_from_decl): New static function.
5278         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
5279         (get_typeid): Use complete_type_or_else.
5280         (build_dynamic_cast_1): Adjust calls to
5281         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
5282         * parse.y (primary): Adjust call to build_typeid.
5283         * except.c (build_eh_type_type_ref): Adjust call to
5284         get_tinfo_decl. Mark as used.
5285         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
5286         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
5287         * parse.c: Regenerated.
5288
5289 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
5290
5291         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
5292         calling convention.
5293         (resolves_to_fixed_type_p): Document calling convention.
5294         * rtti.c (build_x_typeid): Initialize NONNULL.
5295
5296         * cp-tree.h (build_shared_int_cst): New function.
5297         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
5298         * class.c (modify_vtable_entry): Likewise.
5299         (add_virtual_function): Split out code to generated shared
5300         INTEGER_CSTs to build_share_int_cst.
5301         (modify_all_vtables): Handle all the overridden functions here.
5302         Add overridden functions from non-primary virtual bases to the
5303         primary vtable.
5304         (finish_struct_1): Adjust call to modify_all_vtables.  Add
5305         overridden functions from non-primary bases to the vtable.
5306         * tree.c (build_shared_int_cst): New function.
5307         
5308         * cp-tree.h (scratchalloc): Remove.
5309         (build_scratch_list): Likewise.
5310         * call.c (convert_class_to_reference): Replace build_scratch_list
5311         and build_expr_list with build_tree_list.
5312         (add_candidate): Replace scratchalloc with expralloc.  Note memory
5313         leak.
5314         (build_user_type_conversion_1):  Replace build_scratch_list
5315         and build_expr_list with build_tree_list.
5316         (build_new_op): Likewise.
5317         (build_op_delete_call): Likewise.
5318         (convert_like): Likewise.
5319         * cvt.c (ocp_convert): Likewise.
5320         * decl.c (start_decl): Likewise.
5321         (start_function): Likewise.
5322         (finish_destructor_body): Likewise.
5323         (maybe_build_cleanup_1): Likewise.
5324         * decl2.c (reparse_decl_as_expr): Likewise.
5325         * init.c (perform_member_init): Likewise.
5326         (expand_cleanup_for_base): Likewise.
5327         (build_builtin_delete_call): Likewise.
5328         (build_new_1): Likewise.
5329         (build_delete): Likewise.
5330         * method.c (do_build_assign_ref): Likewise.
5331         * parse.y (already_scoped_stmt): Likewise.
5332         (nontrivial_exprlist): Likewise.
5333         (net_initializer): Likewise.
5334         (initlist): Likewise.
5335         * parse.c: Regenerated.
5336         * rtti.c (build_x_typeid): Likewise.
5337         (build_dynamic_cast_1): Likewise.
5338         * typeck.c (build_x_compound_expr): Likewise.
5339         (build_static_cast): Likewise.
5340         (build_modify_expr): Likewise.
5341         
5342         * cp-tree.h (DECL_VINDEX): Add documentation.
5343         * class.c (build_vtable_entry): Likewise.
5344         (start_vtable): Add comment.
5345         (add_virtual_function): Replace pending_hard_virtuals with
5346         overridden_virtuals and pending_virtuals with new_virtuals.
5347         Replace redundant assignments with assertions.
5348         (check_for_override): Add comment.
5349         (check_bases_and_members): Replace pending_hard_virtuals with
5350         overridden_virtuals and pending_virtuals with new_virtuals.
5351         (create_vtbl_ptr): Likewise.
5352         (layout_class_type): Likewise.
5353         (finish_struct_1): Likewise.  Add comments.
5354         
5355 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
5356
5357         * class.c (finish_struct_1): Replace redundant code with
5358         assertions.
5359
5360         * cp-tree.h (flag_new_abi): Move.
5361         (flag_use_cxa_atexit): Likewise.
5362         (flag_honor_std): Likewise.
5363         (flag_rtti): Likewise.
5364         (vbase_offsets_in_vtable_p): Define.
5365         (vptrs_present_everywhere_p): Likewise.
5366         (TYPE_CONTAINS_VPTR_P): Likewise.
5367         (dfs_walk_real): Declare.
5368         * class.c (build_vbase_pointer_fields): Check
5369         vbase_offsets_in_vtable_p.
5370         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
5371         BINFO_VPTR_FIELD.
5372         (build_vbase_offset_vtbl_entries): Simplify.
5373         (build_vbase_offset_vtbl_entries): Adjust.
5374         (build_vbase_pointer): Add ability to look up vbase offsets in
5375         vtable. 
5376         (start_vtable): New function.
5377         (add_virtual_function): Use it.
5378         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
5379         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
5380         (build_vtbl_initializer): Take the type of the complete object as
5381         input.  Use it to correctly calculate vbase offsets.
5382         (dfs_finish_vtbls): Pass the complete type to
5383         build_vtbl_initializer.
5384         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
5385         (create_vtable_ptr): Create a vtable even if there are no
5386         new virtual functions, under the new ABI.
5387         (finish_struct_1): Likewise.
5388         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
5389         * decl.c (exapnd_static_init): Remove call to
5390         preserve_initializer.
5391         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
5392         vtables.
5393         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
5394         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
5395         (construct_virtual_bases): Don't initialize virtual base pointers
5396         under the new ABI.
5397         (build_aggr_init): Clean up comment.
5398         (expand_aggr_init_1): Likewise.
5399         * rtti.c (expand_class_desc): Store the virtual function table
5400         index where the vbase offset lives in the offset field.
5401         * search.c (dfs_walk_real): Make it global.
5402         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
5403         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
5404         
5405         * tinfo.h (USItype): Make it signed under the new ABI.
5406         * tinfo.cc (convert_to_base): New function.  Encapsulate base
5407         conversion logic here.
5408         (__class_type_info::do_upcast): Use it.
5409         (__class_type_info::do_dyncast): Likewise.
5410         (__class_type_info::do_find_public_subobj): Likewise.
5411         
5412         * init.c (construct_virtual_bases): Don't look up the addresses of
5413         virtual bases at run-time.
5414
5415         * class.c (build_vbase_pointer): Relocate.
5416         (build_vbase_pointer_fields): Likewise.
5417         (dfs_build_vbase_offset_vtbl_entries): Likewise.
5418         (build_vbase_offset_vtbl_entries): Likewise.
5419
5420         * decl.c (init_decl_processing): Complain if -fnew-abi
5421         -fno-vtable-thunks is used.
5422
5423         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
5424         flag_new_abi.
5425
5426 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
5427
5428         * cp-tree.h (num_extra_vtbl_entries): New function.
5429         (size_extra_vtbl_entries): Likewise.
5430         (dfs_vtable_path_unmark): Likewise.
5431         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
5432         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5433         * class.c (num_extra_vtbl_entries): New function.
5434         (size_extra_vtbl_entries): Likewise.
5435         (dfs_build_vbase_offset_vtbl_entries): New function.
5436         (build_vbase_offset_vtbl_entries): Likewise.
5437         (build_vtbl_initializer): Use it.
5438         (finish_struct_1): Adjust vtable sizes (using
5439         num_extra_vtbl_entries).
5440         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
5441         THUNK_DECL is non-NULL before expanding it.
5442         * init.c (expand_virtual_init): Adjust the vtable pointer by
5443         size_extra_vtbl_entries before storing it.
5444         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
5445         Handle TREE_LIST parameters here, not in the dfs_* functions.
5446         (dfs_unmarked_real_bases_queue_p): Adjust.
5447         (dfs_marked_real_bases_queue_p): Likewise.
5448         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
5449         (dfs_vtable_path_marked_real_bases_queue_p): New function.
5450         (dfs_vtable_path_unmark): Likewise.
5451         
5452 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
5453
5454         * optimize.c (copy_body_r): Clear the operand three of a
5455         TARGET_EXPR when copying it.
5456
5457 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5458
5459         * method.c (build_decl_overload_real): Check whether we are in ::
5460         before returning __builtin_new/delete.
5461
5462 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
5463
5464         * pt.c (tsubst_friend_function): Improve comment.
5465         (instantiate_decl): Avoid crashing when a "nested" function is
5466         instantiated from the top level.
5467         
5468         * dump.c (dqeueue_and_dump): Dump
5469         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
5470
5471 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5472
5473         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
5474
5475 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
5476
5477         * g++spec.c (lang_specific_driver): Add -fnew-abi if
5478         ENABLE_NEW_GXX_ABI defined.
5479         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
5480         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
5481         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
5482
5483 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
5484
5485         * decl.c (start_cleanup_fn): Call pushdecl.
5486
5487         * call.c (convert_class_to_reference): Fix typos.
5488         (build_conditional_expr): Handle errors gracefully.
5489         * class.c (push_nested_class): Likewise.
5490         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
5491         (DECL_THIS_EXTERN): Use it.
5492         (DECL_THIS_STATIC): Likewise.
5493         * cvt.c (convert_to_void): Handle errors gracefully.
5494         (build_expr_type_conversion): Likewise.
5495         * decl.c (maybe_push_decl): Likewise.
5496         (start_decl_1): Likewise.
5497         (require_complete_types_for_parms): Likewise.
5498         * parse.y (structsp): Likewise.
5499         (base_class): Likewise.
5500         * parse.c: Regenerated.
5501         * pt.c (finish_member_template_decl): Likewise.
5502         * typeck.c (decay_conversion): Likewise.
5503         
5504         * cp-tree.h (dfs_skip_vbases): New function.
5505         (find_vbase_instance): Likewise.
5506         * class.c (determine_primary_base): Allow a nearly empty base to
5507         serve as a primary base class under the new ABI.
5508         (get_class_offset_1): Rename to ...
5509         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
5510         messages here.
5511         (get_class_offset): Use it.  Issue error messages here.
5512         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
5513         find the right copies of virtual bases.
5514         (fixup_vtable_deltas1): Rename to ...
5515         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
5516         bases as primary bases.
5517         (fixup_vtable_deltas): Remove.
5518         (override_one_vtable): Handle virtual bases as primary bases.
5519         (merge_overrides): Likewise.
5520         (finish_struct_1): Likewise.
5521         (dump_class_hierarchy): Dump primary-ness of bases as well.
5522         * search.c (mark_primary_bases): Use a pre-order traversal to
5523         handle primary virtual bases.
5524         (dfs_skip_vbases): New fiunction.
5525         (expand_upcast_fixups): Adjust to handle primary virtual bases.
5526         (fixup_virtual_upcast_offsets): Likewise.
5527         (fixup_all_virtual_upcast_offsets): Likewise.
5528         (dfs_find_vbase_instances): New function.
5529         (find_vbase_instance): Likewise.
5530         
5531 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
5532
5533         * lex.c (DIR_SEPARATOR): Delete macro.
5534
5535 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
5536  
5537        * decl2.c (lang_decode_option): Handle automatic line wrapping
5538        option.
5539         
5540 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
5541
5542         * friend.c (do_friend): Don't resolve scopes when processing
5543         template declarations, even if the qualifying scope doesn't
5544         involve template parameters.
5545
5546 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
5547
5548         * class.c (dfs_modify_vtables_queue_p): Remove.
5549         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
5550         and dfs_marked_real_bases_queue_p instead of
5551         dfs_modify_vtables_queue_p.
5552
5553         * class.c (build_vbase_path): Simplify.
5554         (dfs_propagate_binfo_offsets): New function.
5555         (propagate_binfo_offsets): Use it.
5556         (remove_base_field): Simplify.
5557         (dfs_set_offset_for_vbases): Remove.
5558         (dfs_set_offset_for_shared_vbases): New function.
5559         (dfs_set_offset_for_unshared_vbases): Likewise.
5560         (layout_virtual_bases): Use them.
5561         (layout_basetypes): Don't call propagate_binfo_offsets.
5562         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
5563         for the vbases.
5564         
5565         * class.c (build_base_field): New function, split out from ...
5566         (build_base_fields): ... here.  Use it.  Allocate primary bases
5567         first, under the new ABI.
5568         (get_vtable_entry): Remove.
5569         (remove_base_field): New function, split out from ...
5570         (remove_base_fields): ... here.  Adjust since primary bases come
5571         first under the new ABI.
5572         
5573         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
5574         (initialize_vtbl_ptrs): New function.
5575         (expand_indirect_vtbls_init): Change prototype.
5576         (convert_pointer_to_vbase): Declare.
5577         * init.c (expand_direct_vtbls_init): Remove.
5578         (dfs_initialize_vtbl_ptrs): New function.
5579         (initialize_vtbl_ptrs): Likewise.
5580         (emit_base_init): Use initialize_vtbl_ptrs.
5581         * search.c (convert_pointer_to_vbase): Make it global.
5582         (expand_indirect_vtbls_init): Remove vtable initialization code.
5583         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
5584         
5585         * class.c (dfs_finish_vtbls): New function.
5586         (finish_vtbls): Use it.
5587         (dump_class_hierarchy): New function.
5588         
5589         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
5590         (BINFO_VBASE_PRIMARY_P): New macro.
5591         (BINFO_VIRTUALS): Add to documentation.
5592         (SET_BINFO_PRIMARY_MARKED_P): Remove.
5593         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5594         (dfs_mark_primary_bases_queue_p): Likewise.
5595         (dfs_unmarked_real_bases_queue_p): New function.
5596         (dfs_marked_real_bases_queue_p): Likewise.
5597         * search.c (dfs_mark_primary_bases): Adjust.
5598         (mark_primary_bases): Likewise.
5599         (get_shared_vbase_if_not_primary): New function.
5600         (dfs_unmarked_real_bases_queue_p): Likewise.
5601         (dfs_marked_real_bases_queue_p): Likewise.
5602         (dfs_get_pure_virtuals): Simplify.
5603         (get_pure_virtuals): Likewise.
5604         
5605 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5606
5607         * lex.c: Include tm_p.h.
5608
5609 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
5610
5611         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
5612
5613 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
5614
5615         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
5616         * pt.c (instantiate_decl): Defer comdat templates that might not be
5617         needed.
5618         
5619         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
5620         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
5621         (finish_file): Likewise.
5622
5623         * decl2.c (import_export_class): Undo 12/14 change.
5624
5625         * error.c (dump_decl): operator new, not operatornew.
5626
5627         * class.c (field_decl_cmp): A nontype is "greater" than a type.
5628         * search.c (lookup_field_1): Look for the last field with the
5629         desired name.
5630
5631 2000-01-05  Nathan Sidwell  <nathan@acm.org>
5632
5633         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
5634         FUNCTION_DECL.
5635
5636 2000-01-05  Nathan Sidwell  <nathan@acm.org>
5637
5638         * typeck.c (build_static_cast): Don't strip target qualifiers
5639         when casting from a class.
5640
5641 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5642
5643         * class.c (warn_hidden): Initialize variable `fndecl'.
5644
5645 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
5646
5647         * decl.c (flag_isoc9x): New variable to be able to use code in
5648         c-common.c.  For now always zero.
5649
5650 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
5651
5652         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
5653         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
5654         or unshare_base_binfos for virtual bases here.
5655         * search.c (dfs_get_vbase_types): Do it here.
5656         (get_vbase_types): Adjust.
5657         
5658 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
5659
5660         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
5661         (BINFO_PRIMARY_MARKED_P): Use flag 5.
5662         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
5663         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5664         (unmark_primary_bases): Remove declaration.
5665         (unmarkedp): Declare.
5666         (dfs_vbase_unmark): Likewise.
5667         * class.c (determine_primary_base): Return immediately if there
5668         are no base classes.  Call mark_primary_bases here.
5669         (modify_all_direct_vtables): Remove.
5670         (modify_all_indirect_vtables): Remove.
5671         (dfs_modify_vtables_queue_p): New function.     
5672         (dfs_modify_vtables): New function.
5673         (modify_all_vtables): Use them.
5674         (build_base_fields): Build FIELD_DECLs for primary virtual base
5675         classes.
5676         (create_vtable_ptr): Don't call determine_primary_base here.
5677         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
5678         (dfs_set_offset_for_vbases): ... this.
5679         (layout_virtual_bases): Use it.
5680         (layout_class_type): Call determine_primary_base here.
5681         * search.c (unmarkedp): Make it global.
5682         (shared_marked_p): Simplify.
5683         (shared_unmarked_p): Likewise.
5684         (dfs_primary_bases_queue_p): Remove.
5685         (dfs_unmark_primary_bases): Likewise.
5686         (unmark_primary_bases): Likewise.
5687         (mark_primary_bases): Simplify.
5688         (get_pure_virtuals): Don't call mark_primary_bases here.
5689         (dfs_vbase_unmark): New function.
5690         (get_vbase_types): Simplify.
5691
5692         * class.c (struct base_info): Remove.
5693         (determine_primary_base): Take has_virtual_p rather than a
5694         base_info as input.  Don't calculate max_has_virtual.
5695         (finish_struct_bits): Remove max_has_virtual argument.
5696         (create_vtable_ptr): Remove max_has_virtual_p argument.
5697         (layout_virtual_bases): Remove max argument.
5698         (layout_basetypes): Likewise.
5699         (layout_class_type): Remove max_has_virtual_p argument.
5700         (finish_struct_1): Remove max_has_virtual.
5701
5702         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
5703         (layout_basetypes): Remove.
5704         * class.c (propagate_binfo_offsets): Moved here from tree.c.
5705         Update to handle primary virtual bases.
5706         (remove_base_fields): New function, split out from
5707         layout_basetypes.
5708         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
5709         (layout_virtual_bases): New function, split out from
5710         layout_basetypes.  Update to handle primary virtual bases.
5711         (layout_basetypes): Moved here from tree.c.  Use
5712         remove_base_fields and layout_virtual_bases.
5713         * search.c (dfs_mark_primary_bases_queue_p): New function.
5714         (mark_primary_bases): Use it.
5715         * tree.c (CEIL): Remove.
5716         (propagate_binfo_offsets): Remove.
5717         (layout_basetypes): Remove.
5718         
5719 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
5720
5721         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
5722         (BINFO_PRIMARY_MARKED_P): New macro.
5723         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
5724         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
5725         (mark_primary_bases): New function.
5726         (unmark_primary_bases): Likewise.
5727         * search.c (get_abstract_virtuals_1): Remove.
5728         (dfs_mark_primary_bases): New function.
5729         (mark_primary_bases): Likewise.
5730         (dfs_unmark_primary_bases): Likewise.
5731         (unmark_primary_bases): Likewise.
5732         (dfs_get_pure_virtuals): Likewise.
5733         
5734 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
5735
5736         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
5737         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
5738         (modify_one_vtable): Adjust.
5739         (fixup_vtable_deltas1): Likewise.
5740         (override_one_vtable): Likewise.
5741         * search.c (get_abstract_virtuals_1): Likewise.
5742         (get_pure_virtuals): Likewise.
5743         (expand_upcast_fixups): Likewise.
5744         * tree.c (debug_binfo): Likewise.
5745         
5746         * class.c (build_vtable): Don't return a value.  Don't rebuild
5747         vtables for bases that have already been handled.
5748         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
5749         already been handled.
5750         (modify_one_vtable): Adjust accordingly.
5751         (fixup_vtable_deltas1): Likewise.
5752         (finish_struct_1): Likewise.
5753
5754 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5755
5756         * call.c (build_new_method_call): Also check destructors.
5757