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