cp:
[official-gcc.git] / gcc / cp / ChangeLog
blobbee60d6bbc1060abcbbef3c540ab5d4bfaf2cf02
1 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
3         Implement exceptions specifiers for implicit member functions.
4         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
5         * method.c (synthesize_exception_spec): New function.
6         (locate_dtor, locate_ctor, locate_copy): New functions.
7         (implicitly_declare_fn): Generate the exception spec too.
8         * search.c (check_final_overrider): Check artificial functions
9         too.
10         * typeck2.c (merge_exception_specifiers): New function. 
12 2001-01-03  Jason Merrill  <jason@redhat.com>
14         * init.c (build_default_init): New fn.
15         (perform_member_init): Split out from here.
16         (build_new_1): Use it.  Simplify initialization logic.
17         (build_vec_init): Take an array, rather than a pointer and maxindex.
18         Speed up simple initializations.  Don't clean up if we're assigning.
19         * cp-tree.h: Adjust.
20         * decl2.c (do_static_initialization): Remove TREE_VEC case.
21         * parse.y (new_initializer): Return void_zero_node for ().
22         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
23         * typeck2.c (digest_init): Only complain about user-written
24         CONSTRUCTORs.
26 2000-12-22  Mike Stump  <mrs@wrs.com>
28         * decl2.c: (max_tinst_depth): Increase to 50.
30 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
32         * class.c (invalidate_class_lookup_cache): Zero the
33         previous_class_values.
34         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
35         TREE_INT_CST_HIGH.
36         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
37         * decl.c (free_bindings): New variable.
38         (push_binding): Don't create a new binding if we have one on the
39         free list.
40         (pop_binding): Put old bindings on the free list.
41         (init_decl_processing): Use size_int, not build_int_2.
42         Register free_bindings as a GC root.
43         (cp_make_fname_decl): Use size_int, not build_int_2.
44         (push_inline_template_parms_recursive): Likewise.
45         (end_template_parm_list): Likewise.
46         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
47         (tsubst_template_parms): Use size_int, not build_int_2.
48         (tsubst): Likewise.
49         * rtti.c (get_vmi_pseudo_type_info): Likewise.
50         
51 2001-01-02  Richard Henderson  <rth@redhat.com>
53         * parse.y (asm): Set ASM_INPUT_P.
55 2001-01-02  Jason Merrill  <jason@redhat.com>
57         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
58         for v3 ABI.
60         * typeck.c (cp_truthvalue_conversion): New fn.
61         * cvt.c (ocp_convert): Use it.
63         * cp-tree.h: Lose c-common.c decls.
65         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
66         * cvt.c (convert_to_void): Use type_unknown_p.
68         * typeck.c (strip_all_pointer_quals): Also strip quals from 
69         pointer-to-member types.
71         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
72         parse.y as C.
74         * call.c (build_new_method_call): Do evaluate the object parameter
75         when accessing a static member.
76         * typeck.c (build_component_ref): Likewise.
78 2001-01-02  Andreas Jaeger  <aj@suse.de>
80         * decl.c (cp_missing_noreturn_ok_p): New.
81         (init_decl_processing): Set lang_missing_noreturn_ok_p.
83 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
85         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
87 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
89         * class.c (pushclass): Remove #if 0'd code.
90         * cp-tree.h (overload_template_name): Remove.
91         * decl.c (store_bindings): Simplify.
92         (pop_from_top_level): Likewise.
93         * pt.c (overload_template_name): Remove.
94         (instantiate_decl): Don't call push_to_top_level if it's not
95         needed.
97 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
99         * pt.c (register_local_specialization): Don't return a value.
100         (lookup_template_class): Use move-to-front heuristic when looking
101         up template instantiations.
102         (instantiate_decl): Only push_to_top_level when we're actually
103         going to instantiate the template.
105 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
107         * search.c (binfo_for_vtable): Return least derived class, not
108         most.  Handle secondary vtables.
110 2000-12-22  Jason Merrill  <jason@redhat.com>
112         * pt.c (more_specialized): Don't optimize len==0.
113         (fn_type_unification): If we're adding the return type, increase len.
115         * typeck.c (build_binary_op): Fix pmf comparison logic.
117         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
118         DECL_STATIC_FUNCTION_P.
120         * semantics.c (genrtl_finish_function): Don't try to jump to
121         return_label unless it exists.
123         In partial ordering for a call, ignore parms for which we don't have
124         a real argument.
125         * call.c (joust): Pass len to more_specialized.
126         (add_template_candidate_real): Strip 'this', pass len.
127         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
128         (get_bindings_order): New fn.  Pass len down.
129         (get_bindings_real): Strip 'this', pass len.
130         (fn_type_unification): Likewise.
131         (type_unification_real): Succeed after checking 'len' args.
132         (most_specialized_instantiation): Lose explicit_args parm.
133         * class.c (resolve_address_of_overloaded_function): Strip 'this',
134         pass len.
136 2000-12-21  Jason Merrill  <jason@redhat.com>
138         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
139         DECL_TEMPLATE_RESULT.
141         * search.c (lookup_field_r): Call lookup_fnfields_1, not
142         lookup_fnfields_here.
144         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
146         * call.c (build_object_call): Also allow conversions that return
147         reference to pointer to function.
148         (add_conv_candidate): Handle totype being ref to ptr to fn.
149         (build_field_call): Also allow members of type reference to function.
150         Lose support for calling pointer to METHOD_TYPE fields.
152         * error.c (dump_expr): Handle *_CAST_EXPR.
154         * typeck2.c (build_scoped_ref): Always convert to the naming class.
156         * tree.c (break_out_cleanups): Lose.
157         * cp-tree.h: Remove prototype.
158         * typeck.c (build_component_ref): Don't break_out_cleanups.
159         (build_compound_expr): Likewise.
160         * semantics.c (finish_expr_stmt): Likewise.
162 2000-12-20  Richard Henderson  <rth@redhat.com>
164         * cp-tree.h: Update declarations.
165         * decl.c (finish_case_label): Return the new stmt node.
166         * semantics.c (finish_goto_stmt): Likewise.
167         (finish_expr_stmt, finish_return_stmt): Likewise.
168         (finish_break_stmt, finish_continue_stmt): Likewise.
169         (finish_asm_stmt): Likewise.
170         * parse.y (already_scoped_stmt): Set STMT_LINENO.
171         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
172         (simple_if, simple_stmt): Return the new stmt node.
173         (save_lineno): New.
175 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
177         * cp-tree.h: Don't declare warn_long_long.
179 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
181         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
182         IS_AGGR_TYPE.
184 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
186         * pt.c (unify): Handle when both ARG and PARM are
187         BOUND_TEMPLATE_TEMPLATE_PARM.
189 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
191         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
192         DECL_TEMPLATE_PARM_P.
194 2000-12-15  Jason Merrill  <jason@redhat.com>
196         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
198         * init.c (build_new_1): Don't strip quals from type.
200         * decl.c (pushdecl): Don't check for linkage on a non-decl.
202         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
204         * call.c (build_new_function_call): Lose space before paren in
205         error message.
206         (build_new_method_call): Likewise.
208         * typeck2.c (build_m_component_ref): Propagate quals from datum.
210 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
212         * pt.c (check_explicit_specialization): Propagate default
213         function arguments to explicit specializations.
215 2000-12-13  DJ Delorie  <dj@redhat.com>
217         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
218         and <? operators.
220 2000-12-08  Jason Merrill  <jason@redhat.com>
222         * error.c (dump_function_name): Don't let the user see __comp_ctor.
224         Clean up copy-initialization in overloading code.
225         * call.c (build_user_type_conversion_1): Die if we are asked to
226         convert to the same or a base type.
227         (implicit_conversion): Avoid doing so.  Lose reference binding code.
228         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
229         direct-initialization.  Also do direct-init part of copy-init.
230         (build_user_type_conversion): Don't provide context to convert_like.
231         * cvt.c (ocp_convert): build_user_type_conversion will now provide
232         the constructor call for copy-init.
234         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
235         instantiation of a member template.
236         (do_decl_instantiation): Not here.
238 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
240         * class.c (check_field_decls): Don't special case anonymous
241         fields in error messages.
242         (note_name_declared_in_class): Use %D on diagnostic.
244         * tree.c (pod_type_p): Use strip_array_types.
245         (cp_valid_lang_attribute): Likewise.
246         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
247         multiple evaluations.
248         (cp_has_mutable_p): Use strip_array_types.
250 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
252         * cp-tree.h (sufficient_parms_p): Declare new function.
253         * call.c (sufficient_parms_p): New function, broken out of ...
254         (add_function_candidate): ... here. Use it.
255         (add_conv_candidate): Use it.
256         * decl.c (grok_ctor_properties): Use it.
258 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
260         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
262 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
264         * decl2.c (lang_decode_option): Handle -Wformat-security.
266 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
268         * pt.c (verify_class_unification): New function.
269         (get_class_bindings): Use it.
270         (try_class_unification): Tidy.
271         (unify): Handle when argument of a template-id is not
272         template parameter dependent.
273         (template_args_equal): Handle when TREE_CODE's do not match.
275 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
277         * lang-specs.h (c++): When invoking the stand-alone preprocessor
278         for -save-temps, pass all relevant -Defines to it, and then don't
279         pass them to cc1plus.
281 2000-12-05  Will Cohen  <wcohen@redhat.com>
283         * decl.c (finish_case_label): Cleared
284         more_cleanups_ok in surrounding function scopes.
285         (define_label): Likewise.
287 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
289         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
290         (get_matching_virtual): Remove.
291         (look_for_overrides): Declare new function.
292         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
293         DECL_VINDEX here.
294         * class.c (check_for_override): Move base class iteration code
295         to look_for_overrides.
296         * search.c (next_baselink): Remove.
297         (get_virtuals_named_this): Remove.
298         (get_virtual_destructor): Remove.
299         (tree_has_any_destructors_p): Remove.
300         (struct gvnt_info): Remove.
301         (check_final_overrider): Remove `virtual' from error messages.
302         (get_matching_virtuals): Remove. Move functionality to ...
303         (look_for_overrides): ... here, and ...
304         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
305         to be overriding.
307 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
309         * typeck.c (get_delta_difference): If via a virtual base,
310         return zero.
311         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
312         adjustment.
314 2000-12-04  Richard Henderson  <rth@redhat.com>
316         * error.c (dump_tree): Use output_add_string not OB_PUTS.
318 2000-12-04  Jason Merrill  <jason@redhat.com>
320         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
321         (write_builtin_type): Pass intSI_type_node and the like through
322         type_for_mode.
323         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
324         Pass intSI_type_node and the like through type_for_mode.
325         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
326         * pt.c (tsubst, unify): Likewise.
327         * tree.c (walk_tree): Likewise.
328         * error.c (dump_type): Likewise.
329         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
331         * Make-lang.in: Tweak top comment for emacs.
332         (cp/TAGS): Restore.
334         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
336         * class.c (clone_function_decl): Robustify.
338 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
340         * decl.c (store_bindings): Only search in the non modified
341         old_bindings for duplicates.
343 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
345         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
346         TYPE_POLYMORPHIC_P.
348         * typeck.c (build_static_cast): Remove unused variable.
350 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
352         * pt.c: Fix typo in comment.
354 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
356         * decl2.c (warn_format): Remove definition.
357         (lang_decode_option): Handle -Wformat-nonliteral,
358         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
360 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
362         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
363         (init_decl_processing): Don't create string_type_node,
364         const_string_type_node, wint_type_node, intmax_type_node,
365         uintmax_type_node, default_function_type, ptrdiff_type_node and
366         unsigned_ptrdiff_type_node.  Adjust position of call to
367         c_common_nodes_and_builtins.
368         (identifier_global_value): New function.
370 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
372         * call.c (standard_conversion): Reject pointer to member
373         conversions from ambiguous, inaccessible or virtual bases.
374         * typeck.c (build_static_cast): Don't check pointers to members
375         specially.
377 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
379         * method.c (do_build_copy_constructor): Preserve cv
380         qualifications when accessing source object members.
381         (do_build_assign_ref): Likewise. Remove separate diagnostics for
382         unnamed fields.
384 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
386         * method.c (do_build_assign_ref): Construct appropriately
387         CV-qualified base reference. Don't allow const casts in base
388         conversion.
390 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
392         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
393         incomplete return type.
395 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
397         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
398         * semantics.c (finish_base_specifier): Accept a _TYPE not a
399         _DECL.
401 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
403         * spew.c (yyerror): Cope if yylval.ttype is NULL.
405 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
407         * decl.c (grokdeclarator): Diagnose undefined template contexts.
409 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
411         * decl.c (grokdeclarator): Do type access control on friend
412         class.
414 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
416         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
417         bison parser ickiness.
418         * pt.c (tsubst_friend_function): Enter namespace scope when
419         tsubsting the function name.
420         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
422 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
424         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
425         * cvt.c (cp_convert_to_pointer): Add force parameter.
426         Allow conversions via virtual base if forced.
427         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
428         (ocp_convert): Likewise.
429         * search.c (binfo_from_vbase): Return the virtual base's binfo.
430         * typeck.c (get_delta_difference): Adjust handling of virtual
431         bases.
433 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
435         * tree.c (struct list_hash): Remove.
436         (list_hash_table): Make it be an htab.
437         (struct list_proxy): New type.
438         (list_hash_eq): New function.
439         (list_hash_pieces): Renamed from ...
440         (list_hash): ... this.
441         (list_hash_lookup): Remove.
442         (list_hash_add): Remove.
443         (hash_tree_cons): Use the generic hashtable.
444         (mark_list_hash): Remove.
445         (init_tree): Create the hashtable.
447 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
449         * method.c (build_mangled_C9x_name): Rename to
450         build_mangled_C99_name.  Change C9X references in comments to
451         refer to C99.
453 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
455         * parse.y (unary_expr): Move VA_ARG from here ...
456         (primary): ... to here.
458 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
460         * semantics.c (finish_id_expr): If type is error_mark, return
461         error_mark.
463 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
465         * pt.c (lookup_template_class): Simplify loop exit constructs.
466         Cope when there is no partial instantiation of a template
467         template member.
469 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
471         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
473 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
475         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
476         prefix.
478         * pt.c (do_decl_instantiate): Explicitly clone constructors and
479         destructors that haven't already been cloned.
481 2000-11-20  Richard Henderson  <rth@redhat.com>
483         * parse.y (yyparse_1): Rename the parser entry point.
485 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
487         * mangle.c (write_name): Use <unscoped-name> for names directly in
488         function scope.
489         (write_unscoped_name): Accept names directly in function scope.
491 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
493         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
494         * parse.y (extdef): Add EXPORT reduction.
495         * spew.c (yylex): Don't skip export here.
497 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
499         * decl.c (init_decl_processing): Correct name of pure virtual
500         function under the new ABI.
501         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
502         (throw_bad_typeid): Likewise for bad typeid function.
504 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
506         * decl.c (grokparms): Don't even function types of `void' type,
507         either.
508         * mangle.c (write_type): Don't crash when confronted with the
509         error_mark_node.
511         * decl.c (grokparms): Don't create parameters of `void' type.
513 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
515         * lex.c (mark_impl_file_chain): Delete.
516         (init_parse): Remove call to ggc_add_string_root.  No need to
517         ggc_strdup a string constant.  Do not add impl_file_chain to GC
518         roots.
519         (handle_pragma_implementation): No need to ggc_strdup main_filename.
521 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
523         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
525 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
527         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
528         * decl.c (grokdeclarator): Don't reject void parms here.
529         (require_complete_types_for_parms): Simplify, use
530         complete_type_or_else.
531         (grokparms): Remove bitrot. Remove funcdef parm.
532         Deal with ellipsis parm lists here.
533         * semantics.c (finish_parmlist): Don't append void_list_node
534         here. Set PARMLIST_ELLIPSIS_P.
536 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
538         * typeck2.c (incomplete_type_error): Reorganise to avoid
539         excessive diagnostics.
541 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
543         * lex.c (struct impl_files, internal_filename): Constify a char *.
545 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
547         * mangle.c (write_special_name_constructor): Don't generate
548         assembler junk when confronted with an old-style constructor.
549         (write_special_name_destructor): Likewise.
550         (mangle_decl_string): Do it here instead.
552 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
554         * call.c (op_error): Make error messages clearer.
556 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
558         * decl.c (wrapup_globals_for_namespace): Don't mark things
559         TREE_ASM_WRITTEN when they're not.
561 2000-11-15  Jason Merrill  <jason@redhat.com>
563         * typeck2.c (friendly_abort): Uncount the error before handing
564         off to fancy_abort.
566 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
568         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
570 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
572         * class.c (build_vtbl_initializer): Fix typo in comment.
573         * typeck.c (expr_sizeof): Don't crash on errors.
575 2000-11-14  Jim Wilson  <wilson@redhat.com>
577         * lang-specs.h: Add %2 after %(cc1_options).
579 2000-11-14  Richard Henderson  <rth@redhat.com>
581         * typeck.c (c_sizeof): Be strict about casting result value
582         back to c_size_type_node.
583         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
585 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
587         * typeck.c (build_unary_op): Use boolean_increment from
588         c-common.c, moving the relevant code there.
590 2000-11-11  Jason Merrill  <jason@redhat.com>
592         * typeck.c (mark_addressable): Don't call put_var_into_stack.
594         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
595         in inlines.
597 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
599         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
600         * lex.c (copy_lang_decl): Likewise.
602 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
604         * dump.c (cp_dump_tree): Don't dump function bodies here.
606         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
607         (dump.o): Update dependency list.
608         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
609         (flag_dump_translation_unit): Likewise.
610         (CP_TYPE_QUALS): Adjust definition.
611         (DECL_C_BIT_FIELD): Remove.
612         (SET_DECL_C_BIT_FIELD): Likewise.
613         (CLEAR_DECL_C_BIT_FIELD): Likewise.
614         (add_maybe_template): Likewise.
615         (strip_array_types): Likewise.
616         (dump_node_to_file): Likewise.
617         (cp_dump_tree): New function.
618         * decl.c (init_decl_processing): Set lang_dump_tree.
619         * decl2.c (flag_dump_translation_unit): Remove.
620         * dump.c: Move most of it to ../c-dump.c.
621         (cp_dump_tree): New function.
622         * pt.c (add_maybe_template): Remove.
623         * typeck.c (strip_array_types): Likewise.
625 2000-11-07  Eric Christopher  <echristo@redhat.com>
627         * decl.c (init_decl_processing): Change definition of
628         __wchar_t to wchar_t.  Remove artificial declaration of
629         wchar_t.
630         * lex.c: Change instances of __wchar_t to wchar_t.
632 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
634         * lex.c (do_identifier): Don't lookup_name for operators.
635         * parse.y (operator): Save looking_for_typename.
636         (unoperator): Restore it.
637         * spew.c (frob_opname): Use nth_token for lookahead.
639 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
641         * decl.c (grok_op_properties): Always use coerce_new_type and
642         coerce_delete_type.
643         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
644         exception specification. Tidy up.
645         (coerce_delete_type): Preserve exception specification. Tidy up.
647 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
649         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
650         (push_binding_level), error.c (cp_tree_printer), pt.c
651         (process_partial_specialization, tsubst_template_arg_vector),
652         search.c (lookup_member): Use memset () instead of bzero ().
654 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
656         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
658 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
660         * Make-lang.in (c++.distdir): Remove.
662 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
664         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
665         declarations from different namespaces to be combined.
667 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
669         * decl.c: Include tm_p.h.
671 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
673         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
675 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
677         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
678         (build_overload_value), repo.c (open_repo_file), xref.c
679         (open_xref_file): Use strchr () and strrchr () instead of index ()
680         and rindex ().
682 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
684         * call.c (build_over_call): Call fold on the CALL_EXPR.
686 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
688         * error.c (dump_template_decl): Separate template hearders with
689         space not comma.
691 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
693         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
694         TS_* flags with corresponding TFF_*.  Adjust prototypes of
695         functions (which used to take a tree_string_flags) to take an int.
697         * cp-tree.h (enum tree_string_flags): Remove
698         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
699         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
700         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
701         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
702         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
703         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
704         (type_as_string, decl_as_string, expr_as_string,
705         context_as_string): Adjust prototype.
707         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
708         instead of TS_PLAIN.
710         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
711         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
712         plain `0'.
714 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
716         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
717         (linkage_kind): New enumeration.
718         (decl_linkage): New function.
719         * decl2.c (comdat_linkage): Extend comment.
720         * error.c (dump_function_decl): Print the arguments used to
721         instantiate a template, even when not printing the type of the
722         function.
723         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
724         not TREE_PUBLIC, to test for external linkage.
725         * tree.c (decl_linkage): New function.
727 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
729         * pt.c (instantiate_decl): Always instantiate static data members
730         initialized in-class.
732 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
734         * Make-lang.in: Move all build rules here from Makefile.in,
735         adapt to new context.  Wrap all rules that change the current
736         directory in parentheses.  Expunge all references to $(P).
737         When one command depends on another and they're run all at
738         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
739         all object-file generation rules.  Delete obsolete variables.
741         * Makefile.in: Delete.
742         * config-lang.in: Delete outputs= line.
744 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
746         * error.c (dump_function_decl): Print no space between
747         `ptr-operator' the `type-specifier' of the return type.
748         (dump_type_prefix): Make sure we put space at the appropriate
749         place.
751 2000-10-23  Jason Merrill  <jason@redhat.com>
753         * call.c (equal_functions): Also call decls_match for extern "C" fns.
755 2000-10-22  Jason Merrill  <jason@redhat.com>
757         * call.c (build_conditional_expr): Use ocp_convert to force
758         rvalue conversion.
760 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
762         * call.c (standard_conversion): Use RVALUE_CONVs for all
763         expressions that satisfy lvalue_p, not just those that satisfy
764         real_lvalue_p.
766         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
768         * typeck.c (c_sizeof): Return an expression of `size_t' type,
769         not one with TYPE_IS_SIZETYPE set.
770         (dubious_conversion_warnings): Remove special-case code.
772 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
774         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
775         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
776         (dump_type_prefix): Print vector-of-int as 'int vector'.
777         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
778         * tree.c (walk_tree): Handle VECTOR_TYPE.
780         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
782 2000-10-21  Jason Merrill  <jason@redhat.com>
784         * parse.y (operator): Set got_object from got_scope.
785         Set looking_for_typename.
786         * decl.c (lookup_name_real): Clear val after setting from_obj.
787         Reorganize diagnostic.
789 2000-10-20  Jason Merrill  <jason@redhat.com>
791         * tree.c (walk_tree): Don't walk into default args.
793         * error.c (dump_expr): Use host_integerp.
795 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
797         * typeck2.c (abstract_virtuals_error): Use "because" instead of
798         "since" in error message.
800 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
802         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
804 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
806         * decl.c (revert_static_member_fn): Fixed typo.
808 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
810         * class.c (subobject_offset_fn): New type.
811         (dfs_record_base_offsets): Remove.
812         (record_base_offsets): Likewise.
813         (dfs_search_base_offsets): Likewise.
814         (record_subobject_offset): New function.
815         (check_subobject_offset): Likewise.
816         (walk_subobject_offsets): Likewise.
817         (record_subobject_offsets): Likewise.
818         (layout_conflict_p): Reimplement.
819         (layout_nonempty_base_or_field): Correct handling of type
820         conflicts during layout.
821         (layout_empty_base): Likewise.
822         (build_base_field): Adjust to handle new representation of empty
823         base offset table.
824         (build_base_fields): Likewise.
825         (layout_virtual_bases): Likewise.
826         (splay_tree_compare_integer_csts): New function.
827         (layout_class_type): Use a splay_tree, rather than a varray, to
828         represent the offsets of empty bases.
830         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
831         * decl.c (select_decl): Don't return declarations that are
832         DECL_ANTICIPATED.
834 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
836         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
837         (fake_std_node): New macro.
838         * decl.c (in_std): Rename to ...
839         (in_fake_std): ... this.
840         (flag_no_builtin): Remove.
841         (flag_no_nonansi_builtin): Likewise.
842         (walk_namespaces_r): Use fake_std_node.
843         (push_namespace): Use std_identifier.
844         (pop_namespace): Use in_fake_std.
845         (lookup_name_real): Use fake_std_node.
846         (init_decl_processing): When -fhonor-std, create the `std'
847         namespace.  Don't create a dummy fake_std_node in that case.
848         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
849         (builtin_function): Put builtins whose names don't begin
850         with `_' in the std namespace.
851         * decl2.c (flag_no_builtin): Remove.
852         (flag_no_nonansi_builtin): Likewise.
853         (set_decl_namespace): Use fake_std_node.
854         (validate_nonmember_using_decl): Likewise.
855         (do_using_directive): Likewise.
856         (handle_class_head): Likewise.
857         * dump.c (dequeue_and_dump): Likewise.
858         * except.c (init_exception_processing): Use std_identifier.
859         * init.c (build_member_call): Use fake_std_node.
860         * rtti.c (init_rtti_processing): Use std_identifier.
862 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
864         * cp-tree.h (back_end_hook): Remove declaration.
865         * decl2.c (back_end_hook): Remove definition.
867         * dump.c (dequeue_and_dump): Dump TREE_USED.
869 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
871         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
873 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
875         * decl.c (WINT_TYPE): Define.
876         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
877         c_size_type_node, signed_size_type_node and wint_type_node.
879 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
881         * decl2.c (warn_missing_format_attribute): New variable.
882         (lang_decode_option): Decode -Wmissing-format-attribute.
884 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
886         * typeck.c (qualify_type): Remove.
887         (composite_pointer_type): Fix handling of conversions to `cv void*'.
889 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
891         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
893 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
895         * Makefile.in (parse.c, parse.h): Create atomically.
897 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
899         * class.c (current_obstack): Remove.
900         * decl.c (ggc_p): Remove.
901         (start_decl): Don't use decl_tree_cons.
902         (grokdeclarator): Don't use build_decl_list.
903         (start_function): Don't use decl_tree_cons.
904         (finish_function): Don't mess with obstacks.
905         * decl2.c (grok_x_components): Don't use build_decl_list.
906         * lex.c (make_call_declarator): Don't call decl_tree_cons.
907         (implicitly_declare_fn): Don't call build_decl_list.
908         * parse.y (frob_specs): Don't call build_decl_list or
909         decl_tree_cons.
910         (expr_or_declarator_intern): Don't call decl_tree_cons.
911         (primary): Don't call build_decl_list.
912         (fcast_or_absdcl): Likewise.
913         (typed_declspecs): Don't call decl_tree_cons.
914         (reserved_declspecs): Don't call build_decl_list.
915         (declmods): Likewise.
916         (reserved_typespecquals): Likewise.
917         (aggr): Likewise.
918         (new_type_id): Likewise.
919         (cv_qualifiers): Likewise.
920         (after_type_declarator_intern): Likewise.
921         (notype_declarator_intern): Likewise.
922         (absdcl_intern): Likewise.
923         (named_parm): Likewise.
924         * pt.c (most_specialized_class): Likewise.
925         * repo.c (temporary_obstack): Make it a structure, not a pointer.
926         (init_repo): Initialize it.
927         * search.c (current_obstack): Remove.
928         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
930 2000-10-09  Richard Henderson  <rth@cygnus.com>
932         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
933         (c++ language support bits for libgcc): Remove.
934         (c++.clean): Remove cplib2.txt cleanup.
935         * config-lang.in (headers, lib2funcs): Remove.
937         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
938         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
939         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
940         * inc/new.h, inc/typeinfo: Remove files.
942 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
944         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
945         defined.
946         (init_decl_processing): Initialize intmax_type_node and
947         uintmax_type_node.
949 2000-10-06  Richard Henderson  <rth@cygnus.com>
951         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
952         (original_result_rtx): Remove.
953         * decl.c (save_function_data): Don't clear x_result_rtx.
954         (mark_lang_function): Don't mark it either.
955         * expr.c (fixup_result_decl): Remove.
956         * semantics.c (genrtl_named_return_value): Frob the return decl
957         before calling emit_local_var.
958         (genrtl_finish_function): Don't call fixup_result_decl.
959         Always emit the jump to return_label.
961 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
963         * pt.c (lookup_template_class): Set current access for enum.
964         (tsubst_enum): Set file & line for enum decl.
966         * spew.c (yylex): Remove unused variable.
968 2000-10-05  Richard Henderson  <rth@cygnus.com>
970         * semantics.c (genrtl_finish_function): Don't init or check
971         can_reach_end; remove noreturn and return value checks.
973 2000-10-05  Tom Tromey  <tromey@cygnus.com>
975         * init.c (build_java_class_ref): Use `build_static_name' with a
976         suffix, not a prefix, to build the class object's name.
978 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
980         * cp-tree.h (access_kind): Fix comment typo.
981         * decl2.c (grokfield): Fix diagnostic typo.
982         * semantics.c (finish_template_type): Fix comment typo.
983         (finish_qualified_object_call_expr): Likewise.
985 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
987         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
988         tsubsting fails.
990 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
992         * spew.c (frob_id): New static function.
993         (frob_opname): Use it.
994         (yylex): Use it.
996 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
998         * decl.c (lang_mark_false_label_stack): Remove.
999         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
1001 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
1003         * gxxint.texi: Use @email for formatting email addresses.
1005 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
1007         * error.c: Remove direct obstack manipulation.  Replace with
1008         output_buffer-based formatting.  Adjust calls to removed macros.
1009         (obstack_chunk_alloc, obstack_chunk_free): Remove.
1010         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
1011         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
1013 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
1015         * ir.texi: Move to ../c-tree.texi.
1017 2000-09-20  Jason Merrill  <jason@redhat.com>
1019         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
1021 2000-09-21  Andreas Jaeger  <aj@suse.de>
1023         * errfn.c: Move declaration of cp_printer and cp_printers to ...
1024         * cp-tree.h: ... here.
1026         * error.c: Remove declaration of cp_printer.
1028 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
1030         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
1032 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
1034         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
1035         users.
1037 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
1039         * decl.c (start_function): Robustify.
1041 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1043         * cp-tree.h (check_function_format): Accept a `status' parameter.
1045         * call.c, typeck.c: Updates calls to `check_function_format'.
1047 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
1049         * decl2.c (handle_class_head): Always push some scope even
1050         in the error case.
1052 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
1054         * cp-tree.h (struct cp_language_function): Remove
1055         x_scope_stmt_stack and name_declared.
1056         (current_scope_stmt_stack): Remove.
1057         (function_name_declared_p): New macro.
1058         (struct lang_decl_flags): Use c_lang_decl as a base class.
1059         (context): Remove.
1060         (struct lang_decl): Replace saved_tree with context.
1061         (DECL_FRIEND_CONTEXT): Adjust accordingly.
1062         (SET_DECL_FRIEND_CONTEXT): Likewise.
1063         (DECL_VIRTUAL_CONTEXT): Likewise.
1064         (DECL_SAVED_TREE): Remove.
1065         (C_DECLARED_LABEL_FLAG): Likewise.
1066         (cplus_expand_expr_stmt): Don't declare.
1067         (add_decl_stmt): Likewise.
1068         (add_scope_stmt): Likewise.
1069         * decl.c (mark_stmt_tree): Remove.
1070         (case_compare): Likewise.
1071         (finish_case_label): Use c_add_case_label.
1072         (init_decl_processing): Set more language-specific hooks.
1073         (build_enumerator): Fix typo in comment.
1074         (cplus_expand_expr_stmt): Remove.
1075         (mark_lang_function): Use mark_c_language_function.
1076         (lang_mark_tree): Use c_mark_lang_decl.
1077         * decl2.c: Change order of inclusion.
1078         * except.c: Likewise.
1079         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
1080         back on c_expand_expr.
1081         * friend.c: Include expr.h.
1082         * init.c: Change order of inclusion.
1083         * Makefile.in: Update dependencies.
1084         * lex.h (free_lang_decl_chain): Remove.
1085         * optimize.c (maybe_clone_body): Use function_name_declared_p.
1086         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
1087         it doesn't exist.
1088         (instantiate_decl): Use function_name_declared_p.
1089         * semantics.c (lang_expand_expr_stmt): Remove.
1090         (set_current_function_name_declared): Likewise.
1091         (current_function_name_declared): Likewise.
1092         (begin_compound_stmt): Use function_name_declared_p.
1093         (add_decl_stmt): Remove.
1094         (setup_vtbl_ptr): Use function_name_declared_p.
1095         (add_scope_stmt): Remove.
1096         (current_scope_stmt_stack): New function.
1097         (cp_expand_stmt): Don't handle SCOPE_STMTs.
1098         (expand_body): Use function_name_declared_p.
1099         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
1100         * typeck.c: Change order of includes.
1101         (convert_sequence): Remove.
1103 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
1105         * lex.c (reswords): Add _Complex.
1107 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1109         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
1111 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
1113         * init.c (begin_init_stmts): Don't use // comments.
1115 2000-09-12  Jason Merrill  <jason@redhat.com>
1117         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
1118         all non-extern arrays.
1120         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
1121         typenames, too.  Downgrade complaint to pedwarn.
1122         (xref_tag): Warn about surprising behavior of 'friend struct T'.
1123         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
1124         'class This::Inherited'.
1126 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
1128         * decl.c (finish_case_label): Given the LABEL_DECL a
1129         DECL_CONTEXT.
1131 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
1133         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
1134         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
1135         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
1136         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
1137         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
1138         New macros.
1139         (sorry_for_unsupported_tree, print_scope_operator,
1140         print_left_paren, print_right_paren, print_left_bracket,
1141         print_right_bracket, print_whitespace): Likewise.
1142         (aggr_variety): Rename to class_key_or_enum.
1143         (print_type): Rename to print_type_id.
1144         (print_type_specifier_seq, print_simple_type_specifier,
1145         print_elaborated_type_specifier,
1146         print_rest_of_abstract_declarator,
1147         print_parameter_declaration_clause, print_exception_specification,
1148         print_nested_name_specifier, print_template_id,
1149         typedef_original_name,  print_template_argument_list_start,
1150         print_template_argument_list_end): New functions.
1152 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
1154         * ir.texi: Add more documentation.
1156 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
1158         * cp-tree.h (struct saved_scope): Remove x_function_parms.
1159         (current_function_parms): Don't define.
1160         (struct cp_language_function): Remove parms_stored.
1161         (current_function_just_assigned_this): Don't define.
1162         (current_function_parms_stored): Likewise.
1163         (static_ctors): Declare.
1164         (static_dtors): Likewise.
1165         (SF_EXPAND): Don't define.
1166         (expand_start_early_try_stmts): Remove declaration.
1167         (store_parm_decls): Likewise.
1168         * decl.c (static_ctors): Don't declare.
1169         (static_dtors): Likewise.
1170         (struct binding_level): Remove this_block.
1171         (poplevel): Remove dead code.
1172         (set_block): Likewise.
1173         (mark_binding_level): Don't mark this_block.
1174         (mark_saved_scope): Don't mark x_function_parms.
1175         (init_decl_processing): Don't add current_function_parms as a GC
1176         root.
1177         (check_function_type): Change prototype.
1178         (start_function): Remove RTL-generation code.
1179         (expand_start_early_try_stmts): Remove.
1180         (store_parm_decls): Give it internal linkage.  Remove
1181         RTL-generation code.
1182         (finish_function): Remove RTL-generation code.
1183         * decl2.c (static_ctors): Fix formatting.
1184         (static_dtors): Likewise.
1185         * method.c (use_thunk): Don't call store_parm_decls.
1186         (synthesize_method): Likewise.
1187         * optimize.c (maybe_clone_body): Likewise.
1188         * parse.y (fn.def2): Likewise.
1189         (.set_base_init): Likewise.
1190         (nodecls): Likewise.
1191         * pt.c (instantiate_decl): Likewise.
1192         * rtti.c (synthesize_tinfo_fn): Likewise.
1193         * semantics.c (genrtl_try_block): Simplify.
1194         (expand_body): Use genrtl_start_function and
1195         genrtl_finish_function.
1196         (genrtl_start_function): New function.
1197         (genrtl_finish_function): Likewise.
1199 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
1201         * error.c (cp_tree_printer, case 'P'): Append break.
1203 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
1205         * cp-tree.h (frob_opname): Declare.
1206         * parse.y (saved_scopes): New static variable.
1207         (cp_parse_init): Adjust.
1208         (do_id): If lastiddecl is NULL, do do_identifier.
1209         (operator): Save scope information.
1210         (unoperator): New reduction. Restore scope information.
1211         (operator_name): Append unoperator. Call frob_opname.
1212         * spew.c (frob_opname): Define.
1214 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
1216         * decl.c, rtti.c: Include defaults.h if not already included.
1217         Don't define the *_TYPE_SIZE macros.
1219 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
1221         * cp-tree.h (push_switch): Change prototype.
1222         (check_cp_case_value): Remove declaration.
1223         (decl_constant_value): Likewise.
1224         * decl.c (struct cp_switch): Add switch_stmt and cases.
1225         (case_compare): New function.
1226         (push_switch): Set switch_stmt.  Initialize cases.
1227         (pop_switch): Clean up cases.
1228         (define_case_label): Rename to ...
1229         (finish_case_label): ... this.  Do semantic analysis for case
1230         labels here.
1231         (start_function): Correct comment.
1232         * decl2.c (check_cp_case_value): Remove.
1233         * expr.c (do_case): Remove.
1234         * pt.c (tsubst_expr): Adjust call to finish_case_label.
1235         * semantics.c (genrtl_do_poplevel): Remove declaration.
1236         (RECHAIN_STMTS): Remove.
1237         (finish_break_stmt): Use build_break_stmt.
1238         (finish_continue_stmt): Use build_continue_stmt.
1239         (finish_switch_cond): Adjust condition here, rater than in
1240         c_expand_start_case.
1241         (finish_case_label): Remove.
1242         * typeck.c (c_expand_return): Remove.
1243         (c_expand_start_case): Likewise.
1245 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
1247         * ir.texi: Document type nodes.
1249 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
1251         * cp-tree.h (init_cp_semantics): Declare.
1252         (genrtl_try_block): Don't declare.
1253         (genrtl_handler): Likewise.
1254         (genrtl_catch_block): Likewise.
1255         (genrtl_ctor_stmt): Likewise.
1256         (genrtl_subobject): Likewise.
1257         (genrtl_do_poplevel): Likewise.
1258         (genrtl_named_return_value): Likewise.
1259         * lex.c (init_parse): Call init_cp_semantics.
1260         * semantics.c (genrtl_try_block): Give it internal linkage.
1261         (genrtl_handler): Likewise.
1262         (genrtl_catch_block): Likewise.
1263         (genrtl_ctor_stmt): Likewise.
1264         (genrtl_subobject): Likewise.
1265         (genrtl_do_poplevel): Likewise.
1266         (genrtl_named_return_value): Likewise.
1267         (lang_expand_stmt): Rename to ...
1268         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
1269         (init_cp_semantics): Define.
1271         * decl.c (initialize_local_var): Remove RTL-generating code.
1272         * semantics.c (genrtl_try_block): Fix formatting.
1274         Move statement-tree facilities from C++ to C front-end.
1275         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
1276         (void_zero_node): Remove.
1277         (stmt_tree): Likewise.
1278         (scope_chain): Adjust.
1279         (language_function): Rename to cp_language_function.
1280         (cp_function_chain): Adjust.
1281         (current_stmt_tree): Remove.
1282         (last_tree): Likewise.
1283         (last_expr_type): Likewise.
1284         (struct lang_decl): Adjust.
1285         (STMT_IS_FULL_EXPR_P): Remove.
1286         (add_tree): Remove.
1287         (begin_stmt_tree): Likewise.
1288         (finish_stmt_tree): Likewise.
1289         (walk_tree_fn): Likewise.
1290         (walk_stmt_tree): Likewise.
1291         * class.c (finish_struct): Replace use of add_tree with add_stmt.
1292         * decl.c (mark_stmt_tree): Adjust type.
1293         (init_decl_processing): Don't build void_zero_node.
1294         (initialize_local_var): Adjust usage of current_stmt_tree.
1295         (finish_enum): Use add_stmt, not add_tree.
1296         (save_function_data): Adjust use of language_function.
1297         (finish_constructor_body): Use add_stmt, not add_tree.
1298         (finish_destructor_body): Likewise.
1299         (push_cp_function_context): Adjust use of language_function.
1300         (pop_cp_function_context): Likewise.
1301         (mark_lang_function): Likewise.
1302         (mark_cp_function_context): Likewise.
1303         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
1304         (build_vec_init): Likewise.
1305         * semantics.c (SET_LAST_STMT): Remove.
1306         (RECHAIN_STMTS): Don't use it.
1307         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
1308         (current_stmt_tree): Define.
1309         (add_tree): Remove.
1310         (finish_goto_stmt): Use add_stmt, not add_tree.
1311         (finish_expr_stmt): Likewise.
1312         (begin_if_stmt): Likewise.
1313         (finish_then_clause): Likewise.
1314         (begin_while_stmt): Likewise.
1315         (begin_do_stmt): Likewise.
1316         (finish_return_stmt): Likewise.
1317         (begin_for_stmt): Likewise.
1318         (finish_break_stmt): Likewise.
1319         (finish_continue_stmt): Likewise.
1320         (begin_switch_stmt): Likewise.
1321         (finish_case_label): Likewise.
1322         (begin_try_block): Likewise.
1323         (begin_function_try_block): Likewise.
1324         (begin_handler): Likewise.
1325         (begin_catch_block): Likewise.
1326         (begin_compound_stmt): Likewise.
1327         (begin_asm_stmt): Likewise.
1328         (finish_asm_stmt): Likewise.
1329         (finish_label_stmt): Likewise.
1330         (add_decl_stmt): Likewise.
1331         (finish_subobject): Likewise.
1332         (finish_decl_cleanup): Likewise.
1333         (finish_named_return_value): Likewise.
1334         (setup_vtbl_ptr): Likewise.
1335         (add_scope_stmt): Likewise.
1336         (finish_stmt_expr): Likewise.
1337         (prune_unused_decls): Remove.
1338         (begin_stmt_tree): Likewise.
1339         (finish_stmt_tree): Likewise.
1340         (prep_stmt): Adjust use of current_stmt_tree.
1341         (lang_expand_stmt): Likewise.
1342         * tree.c (statement_code_p): Remove.
1343         (cp_statement_code_p): New function.
1344         (walk_stmt_tree): Remove.
1345         (init_tree): Set lang_statement_code_p.
1347 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
1349         Integrated preprocessor.
1351         * Make-lang.in, Makefile.in: Remove all references to input.c,
1352         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
1353         * gxx.gperf, hash.h, input.c: Delete.
1354         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
1355         initialized properly.
1357         * class.c (fixup_pending_inline): Take a tree, not a
1358         struct pending_inline *.  All callers changed.
1359         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
1360         RID_PROTECTED entries in ridpointers[] array here.
1361         * decl.c (duplicate_decls): Do not refer to struct
1362         pending_inline.
1363         (record_builtin_type, init_decl_processing): Use RID_MAX not
1364         CP_RID_MAX.
1365         (grokdeclarator): Use C_IS_RESERVED_WORD.
1366         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
1367         cpplib.
1368         (grok_x_components): Do not inspect pending_inlines chain.
1370         * cp-tree.h (struct lang_identifier): Add rid_code entry.
1371         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
1372         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
1373         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
1374         TIME_IDENTIFIER_FILEINFO): Kill.
1375         Update prototypes.
1376         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
1377         single 32-bit word.
1378         * parse.y: Call do_pending_inlines unconditionally.
1379         reinit_parse_for_method is now snarf_method.  fn.defpen is no
1380         longer necessary.  Remove unnecessary <itype> annotation on
1381         SCOPE.  Do not refer to end_of_file or struct pending_inline.
1382         * semantics.c (begin_inline_definitions): Call
1383         do_pending_inlines unconditionally.
1385         * lex.c: Remove all code now shared with C front end.
1386         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
1387         into the get_identifier table.  Rewrite pragma handling to
1388         work with the registry.  Move code to save tokens for later
1389         processing to spew.c.
1391         * spew.c: Rewrite everything in terms of token streams instead
1392         of text.  Move routines here from lex.c / input.c as
1393         appropriate.  GC-mark trees hanging off the pending inlines
1394         chain.
1396 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
1398         * NEWS: Mention that the named return value extension has been
1399         deprecated.
1400         * cp-tree.h (original_result_rtx): Define.
1401         (TREE_REFERENCE_EXPR): Remove.
1402         (DECL_VPARENT): Likewise.
1403         (pushdecl_nonclass_level): Likewise.
1404         (store_return_init): Likewise.
1405         (reinit_lang_specific): Likewise.
1406         (genrtl_named_return_value): Change prototype.
1407         * decl.c (original_result_rtx): Remove.
1408         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
1409         Do not generate RTL for local variables here.
1410         (store_return_init): Remove.
1411         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
1412         store_return_init.
1413         (finish_named_return_value): Adjust accordingly.  Warn that this
1414         extension is deprecated.
1415         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
1417 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1419         * pt.c (type_unification_real): Replace switch with if.
1420         (unify): Tsubst non-type parms before comparing.
1422 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1424         * error.c (dump_typename): New function, broken out of ...
1425         (dump_type): ... here. Use it.
1426         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
1428 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1430         * init.c (build_offset_ref): Deal with namespace scoped
1431         TEMPLATE_ID_EXPRs.
1433 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1435         * class.c (resolve_address_of_overloaded_function): Add
1436         explanation message.
1437         * decl.c (define_case_label): Reformat explanation.
1438         * decl2.c (finish_static_data_member_decl): Likewise.
1439         (grokfield): Likewise.
1440         * friend.c (do_friend): Likewise.
1442 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
1444         * tree.c (walk_tree): Expose tail recursion.
1445         (walk_stmt_tree): New function.
1446         * cp-tree.h: Prototype walk_stmt_tree.
1447         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
1448         the BLOCKs directly.  If a BLOCK has no variables after
1449         pruning, discard it.
1450         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
1451         restore the line number.
1453 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
1455         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
1456         (pt.o): Remove dependency on HTAB_H.
1457         * cp-tree.h: Include hashtab.h.
1458         (walk_tree): Change prototype.
1459         (walk_tree_without_duplicates): New function.
1460         * decl.c (check_default_argument): Use it.
1461         * optimize.c (remap_decl): Adjust calls to walk_tree.
1462         (copy_body): Likewise.
1463         (expand_calls_inline): Likewise.
1464         (calls_setjmp_p): Use walk_tree_without_duplicates.
1465         * pt.c: Don't include hashtab.h.
1466         (for_each_template_parm): Use walk_tree_without_duplicates.
1467         * semantics.c (finish-stmt_tree): Likewise.
1468         (expand_body): Likewise.
1469         * tree.c (walk_tree): Add additional parameter.
1470         (walk_tree_without_duplicates): New function.
1471         (count_trees): Use it.
1472         (verify_stmt_tree): Adjust call to walk_tree.
1473         (find_tree): Use walk_tree_without_duplicates.
1474         (no_linkage_check): Likewise.
1475         (break_out_target_exprs): Adjust call to walk_tree.
1476         (cp_unsave): Likewise.
1478 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1480         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
1481         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1482         * cp-tree.h (TYPE_BINFO): Adjust comment.
1483         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
1484         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
1485         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
1486         (TYPE_TEMPLATE_INFO): Likewise.
1487         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
1488         * class.c (push_nested_class): Likewise.
1489         * decl.c (lookup_name_real): Likewise.
1490         (grokdeclarator): Likewise.
1491         (grok_op_properties): Likewise.
1492         (xref_tag): Likewise.
1493         (xref_basetypes): Likewise.
1494         * decl2.c (constructor_name_full): Likewise.
1495         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
1496         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
1497         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
1498         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1499         (dump_type_suffix): Likewise.
1500         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
1501         instead.
1502         (get_aggr_from_typedef): Likewise.
1503         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
1504         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1505         (write_template_parm): Likewise.
1506         (write_template_template_parm): Check tree code instead of
1507         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1508         * method.c (build_overload_nested_name): Add
1509         BOUND_TEMPLATE_TEMPLATE_PARM.
1510         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
1511         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1512         * pt.c (convert_template_argument): Check tree code instead of
1513         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1514         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
1515         (for_each_template_parm): Adjust comment.
1516         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
1517         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1518         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
1519         template_args_equal to compare template template parameter cases.
1520         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1521         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
1522         instead.
1523         * tree.c (copy_template_template_parm): Decide whether to create
1524         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
1525         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1526         (copy_tree_r): Likewise.
1527         * typeck.c (comptypes): Likewise.  Check tree code instead of
1528         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1530 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
1532         * decl.c (finish_function): Move the code for handling functions
1533         marked with the constructor and destructor attributes inside the
1534         expand_p block.
1536 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1538         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
1540 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1542         * pt.c (lookup_template_class): Remove abort.
1543         * tree.c (get_type_decl): Allow error_mark_node.
1545 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1547         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
1548         TEMPLATE_ID_EXPRs.
1550 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
1552         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
1553         new ABI mangling.
1555 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
1557         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
1558         union tag mismatch error reporting.
1560 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
1562         * call.c (build_scoped_method_call): Check it is not a namespace.
1564 2000-08-30  Jason Merrill  <jason@redhat.com>
1566         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
1568         * tree.c (bot_manip): Check TREE_CONSTANT rather than
1569         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
1570         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
1572         * decl.c (start_function): Always call make_function_rtl.
1574 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
1576         * semantics.c (prune_unused_decls): New function.
1577         (finish_stmt_tree): Call it via walk_tree.
1579 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
1581         * class.c (build_secondary_vtable): Constify a char *.
1582         * decl.c (init_decl_processing): Initialize function_id_node,
1583         pretty_function_id_node, and func_id_node.
1584         * input.c (struct input_source): Constify 'str'.
1585         (feed_input): Constify first argument.
1586         * mangle.c (write_identifier): Constify argument.
1587         * pt.c (mangle_class_name_for_template): Constify argument.
1589 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
1591         * typeck.c (mark_addressable): Remove code that pokes around in
1592         RTL.
1594 2000-08-28  Jason Merrill  <jason@redhat.com>
1596         * lex.c (file_name_nondirectory): Move to toplev.c.
1598         * cp-tree.h (LOCAL_CLASS_P): New macro.
1599         * class.c (finish_struct_1): Use it.
1601 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
1603         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
1604         (write_encoding): Pass another argument to write_name.
1605         (write_name): Add ignore_local_scope parameter.  Fix handling of
1606         local names.
1607         (write_nested_name): Use write_unqualified_name.
1608         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
1609         (write_template_prefix): Use write_unqualified_name.
1610         (write_component): Remove.
1611         (write_local_name): Add parameter.  Use direct local entity to
1612         discriminator calculation.
1613         (write_class_enum_type): Pass another argument to write_name.
1614         (write_template_template_arg): Likewise.
1615         (make_guard_variable): Likewise.
1617 2000-08-27  Jason Merrill  <jason@redhat.com>
1619         * decl.c (pushdecl): Matching decls for local externs are found in
1620         the current level.  Propagate linkage information from previous
1621         declarations.
1623 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
1625         * ir.texi (Expressions): Fix typo.
1627 2000-08-25  Greg McGary  <greg@mcgary.org>
1629         * tree.c (init_tree): Use ARRAY_SIZE.
1631 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
1633         * error.c (cp_tree_printer): Rework.
1635 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
1637         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
1638         dyn-string.o.
1639         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
1640         (cp-demangle.o): Remove target.
1641         (dyn-string.o): Likewise.
1643         * decl.c (grokfndecl): Require that `main' return an `int'.
1644         * mangle.c (write_encoding): Don't mangle return types for
1645         conversion functions.
1647 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
1649         * error.c (tree_formatting_info): New data type.
1650         (tree_being_formatted): New macro.
1651         (tree_formatting_flags): Likewise.
1652         (put_whitespace): Likewise.
1653         (print_tree_identifier): Likewise.
1654         (print_identifier): Likewise.
1655         (cp_tree_printer, print_function_argument_list, print_declaration,
1656         print_expression, print_function_declaration,
1657         print_function_parameter, print_type, print_cv_qualifier): New
1658         functions.
1659         (init_error): Initialize lang_printer.
1661 2000-08-24  Jason Merrill  <jason@redhat.com>
1663         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
1664         adjustment necessary.
1666 2000-08-24  Greg McGary  <greg@mcgary.org>
1668         * cp-tree.h (MAIN_NAME_P): Remove macro.
1670 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
1672         * error.c (print_instantiation_context): Don't forget to flush the
1673         buffer.
1675 2000-08-23  Jason Merrill  <jason@redhat.com>
1677         * typeck.c (build_ptrmemfunc): Save the input pmf.
1679         * method.c (process_modifiers): Use same_type_p.
1681 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
1683         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
1684         * mangle.c (write_function_type): Change prototype.
1685         (write_encoding): Don't mangle return types for
1686         constructors or destructors.
1687         (write_type): Adjust call to write_function_type.
1688         * pt.c (instantiate_template): Instantiate alternate entry points
1689         when instantiating the main function.
1691 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
1693         * error.c (cp_print_error_function): Don't use embedded '\n' in
1694         output_printf.
1696 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
1698         * decl.c (init_decl_processing): Remove bogus initialization.
1699         * error.c (lang_print_error_function): Restore here.
1700         (init_error): Initialize print_error_function.
1702 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
1704         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
1706 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
1708         * Makefile.in (error.o): Depends on diagnostic.h
1710         * cp-tree.h (problematic_instantiation_changed,
1711         record_last_problematic_instantiation, current_instantiation,
1712         print_instantiation_context): Declare.
1713         (maybe_print_template_context): Remove.
1715         * decl.c (init_decl_processing): Set print_error_function to NULL.
1716         (lang_print_error_function): Remove, since we're using a new
1717         machinery.
1719         * error.c: #include diagnostic.h
1720         (function_category): New function.
1721         (cp_diagnostic_starter): Likewise.
1722         (cp_diagnostic_finalizer): Likewise.
1723         (cp_print_error_function): Likewise.
1724         (maybe_print_instantiation_context): Likewise.
1725         (print_instantiation_full_context): Likewise.
1726         (print_instantiation_partial_context): Likewise.
1727         (print_instantiation_context): Define.
1728         (init_error): Initialize diagnostic pager and finalizer.
1730         * pt.c (problematic_instantiation_changed): Define.
1731         (record_last_problematic_instantiation): Likewise.
1732         (current_instantiation): Likewise.
1733         (maybe_print_template_context): Remove.
1734         (print_template_context): Likewise.
1735         (current_tinst_level): Make static to reflect Brendan Kehoe's
1736         change of 1995-04-13.
1737         (push_tinst_level): Call print_instantiation_context.
1739 2000-08-21  Nix  <nix@esperi.demon.co.uk>
1741         * lang-specs.h: Do not process -o or run the assembler if
1742         -fsyntax-only.
1744 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
1746         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
1747         variables.
1748         * decl2.c (lang_decode_option): Disable gettext attributes for
1749         -ansi.
1751 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
1753         * lex.c (lang_init_options): Default diagnostic message maximum
1754         length to 80, when line-wrapping.
1756 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
1758         * class.c (build_vtbl_initializer): Clear the entire
1759         vtbl_init_data.  Start keeping track of the functions for which we
1760         have created vcall offsets here.
1761         (dfs_build_vcall_offset_vtbl_entries): Remove.
1762         (build_vcall_offset_vtbl_entries): Reimplement.
1763         (add_vcall_offset_vtbl_entries_r): New function.
1764         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
1765         computing when vcall offsets are necessary.
1767 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1769         * decl.c (member_function_or_else): Use cp_error ... %T.
1770         (grokdeclarator): Likewise.
1771         (start_method): Likewise.
1772         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
1774 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1776         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
1777         TYPE_DECLs.
1779 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1781         * cp-tree.h (PTRMEM_OK_P): New macro.
1782         (itf_ptrmem_ok): New enumeration value.
1783         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
1784         argument. Diagnose implicit pointer to member.
1785         (instantiate_type): Don't diagnose implicit pointer to member
1786         here. Pass itf_ptrmem_ok if ok. Adjust calls to
1787         resolve_address_of_overloaded_function.
1788         * init.c (build_offset_ref): Set PTRMEM_OK_P.
1789         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
1790         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
1791         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
1792         (build_unary_op): Deal with single non-static member in
1793         microsoft-land.
1795 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1797         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
1799 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
1801         * cp-tree.h (enum_name_string): Remove prototype.
1802         (report_case_error): Remove prototype.
1803         * cp/typeck2.c (enum_name_string): Remove.
1804         (report_case_error): Remove.
1805         * error.c (dump_expr): Deal with enum values directly.
1806         Correctly negate integer constant.
1808 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
1810         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
1811         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
1812         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
1813         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
1814         (__cxa_vec_new): Use __cxa_vec_new2.
1815         (__cxa_vec_delete): Use __cxa_vec_delete2.
1817 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
1819         * vec.cc (__cxa_vec_new): Set "C" linkage.
1820         (__cxa_vec_ctor): Likewise.
1821         (__cxa_vec_cctor): Likewise.
1822         (__cxa_vec_dtor): Likewise.
1823         (__cxa_vec_delete): Likewise.
1824         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
1825         (__cxa_vec_ctor): Likewise.
1826         (__cxa_vec_cctor): Likewise.
1827         (__cxa_vec_dtor): Likewise.
1828         (__cxa_vec_delete): Likewise.
1830 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
1832         * class.c (instantiate_type): Reinstate local variable
1833         deleted in previous change.
1835         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
1836         itf_no_attributes.
1838 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
1840         * cp-tree.h (instantiate_type_flags): New enumeration.
1841         (instantiate_type): Change parameter.
1842         * class.c (instantiate_type): Adjust prototype. Adjust.
1843         * call.c (standard_conversion): Adjust instantiate_type call.
1844         (reference_binding): Likewise.
1845         (build_op_delete_call): Likewise.
1846         (convert_like_real): Likewise.
1847         * cvt.c (cp_convert_to_pointer): Likewise.
1848         (convert_to_reference): Likewise.
1849         * pt.c (convert_nontype_argument): Likewise.
1850         * typeck.c (build_binary_op): Likewise.
1851         (build_ptrmemfunc): Likewise.
1852         (convert_for_assignment): Likewise.
1854 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
1856         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
1857         (current_aggr): Define.
1858         * decl.c (grokdeclarator): Make sure a friend class is an
1859         elaborated type specifier.
1860         * parse.y (current_aggr): Remove static definition.
1861         (cp_parse_init): Adjust.
1862         (structsp): Clear and restore current_aggr.
1863         (component_decl_list): Clear current_aggr.
1865         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
1866         aggregate tag on the typename's context.
1868         * pt.c (tsubst_friend_class): Return error_mark_node, if
1869         parms becomes NULL.
1870         (instantiate_class_template): Ignore error_mark_node friend types.
1872 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
1874         * cvt.c (warn_ref_binding): New static function, broken out of ...
1875         (convert_to_reference): ... here. Use it.
1877 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1879         * parse.y (template_arg): Add rule for template qualified with
1880         global scope.
1882 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1884         * decl2.c (add_function): Reorganize.
1885         (arg_assoc): Do not consider function template decls.
1887 2000-08-11  Jason Merrill  <jason@redhat.com>
1889         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
1890         looking inside.
1892 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
1894         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
1895         (lookup_nested_tag): Likewise.
1897         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
1898         can be produced.
1900 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
1902         * parse.y (named_complex_class_head_sans_basetype): Remove
1903         always true if.
1905 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
1907         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
1908         explicit TEMPLATE_ID_EXPR args.
1909         (build_expr_from_tree, case CALL_EXPR): Likewise.
1911 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
1913         * decl.c (check_tag_decl): Diagnose typename's which don't
1914         declare anything.
1916 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
1918         * init.c (build_aggr_init): Reject bogus array initializers
1919         early.
1921 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
1923         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
1924         runtime.
1925         * cp/tinfo.cc (__dynamic_cast): Likewise.
1926         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
1928 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
1930         * cvt.c (convert_to_pointer_force): Fix error message when
1931         attempting to cast from ambiguous base.
1933 2000-08-08  Jason Merrill  <jason@redhat.com>
1935         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
1936         (tsubst_template_arg_vector): Likewise.
1938         * decl2.c (build_anon_union_vars): Choose the largest field; don't
1939         assume that one will be as large as the union.
1941 2000-08-07  Kazu Hirata  <kazu@hxi.com>
1943         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
1944         * decl.c (pop_labels): Likewise.
1946 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
1948         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
1949         specifications.
1950         (__pointer_to_member_type_info): Likewise.
1951         (__base_class_info): Likewise.
1952         (__class_type_info): Likewise.
1953         (__si_class_type_info): Likewise.
1954         (__vmi_class_type_info): Likewise.
1955         * tinfo.cc (__si_class_type_info::__do_find_public_src):
1956         Changed member names to match specifications.
1957         (__vmi_class_type_info::__do_find_public_src): Likewise.
1958         (__si_class_type_info::__do_dyncast): Likewise.
1959         (__vmi_class_type_info::__do_dyncast): Likewise.
1960         (__si_class_type_info::__do_upcast): Likewise.
1961         (__vmi_class_type_info::__do_upcast): Likewise.
1962         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
1963         (__pbase_type_info::__pointer_catch): Likewise.
1964         (__pointer_type_info::__pointer_catch): Likewise.
1965         (__pointer_to_member_type_info::__pointer_catch): Likewise.
1967 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
1969         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
1970         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
1971         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
1973 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
1975         * cp-tree.h (add_method): Change prototype.
1976         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
1977         Don't double the size of the method vector in the error case.
1978         (handle_using_decl): Adjust call to add_method.
1979         (add_implicitly_declared_members): Likewise.
1980         (clone_function_decl): Likewise.
1981         * decl2.c (check_classfn): Likewise.
1982         * semantics.c (finish_member_declaration): Likewise.
1984 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
1986         * decl.c (flag_isoc94): New variable.
1988 2000-08-02  Jason Merrill  <jason@redhat.com>
1990         * pt.c (do_type_instantiation): Add complain parm; don't complain
1991         if called recursively.
1992         * cp-tree.h, parse.y: Adjust.
1994 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
1996         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
1997         -Wno-strict-prototypes.
1999         * g++spec.c: Adjust type of second argument to
2000         lang_specific_driver, and update code as necessary.
2002         * cp-tree.h: Don't prototype min_precision here.
2003         (my_friendly_assert): Cast expression to void.
2004         * semantics.c (do_poplevel): Initialize scope_stmts.
2006 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
2008         * cp-tree.h (DECL_NEEDED_P): Tweak.
2010 2000-07-28  Jason Merrill  <jason@redhat.com>
2012         * lang-specs.h: Use %i in rule for .ii files.
2014 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
2016         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
2018 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
2020         Allow indirect primary bases.
2021         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
2022         primary_base.
2023         (CLASSTYPE_VFIELD_PARENT): Remove.
2024         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
2025         (BINFO_PRIMARY_BINFO): Remove.
2026         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
2027         (BINFO_VBASE_PRIMARY_P): Likewise.
2028         (BINFO_PRIMARY_BASE_OF): New macro.
2029         (BINFO_INDIRECT_PRIMARY_P): Likewise.
2030         (get_primary_binfo): New function.
2031         * decl.c (lang_mark_tree): Make lang_type::primary_base.
2032         * class.c (vcall_offset_data_s): Rename to ...
2033         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
2034         and add ctor_vtbl_p.
2035         (get_derived_offset): Use get_primary_binfo.
2036         (dfs_mark_primary_bases): Adjust handling of virtual primary
2037         bases.
2038         (mark_primary_bases): Likewise.
2039         (set_primary_base): Take a binfo, not an integer, as a
2040         representation of the primary base.
2041         (indirect_primary_base_p): Remove.
2042         (determine_primary_base): Adjust for indirect primary bases.
2043         (dfs_find_final_overrider): Fix typo in coment.
2044         (update_vtable_entry_for_fn): Use get_primary_binfo.
2045         (layout_nonempty_base_or_field): Tweak.
2046         (build_base_fields): Adjust for new primary base semantics.
2047         (dfs_propagate_binfo_offsets): Remove.
2048         (propagate_binfo_offsets): Rewrite.
2049         (dfs_set_offset_for_shared_vbases): Remove.
2050         (layout_virtual_bases): Don't use it.
2051         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
2052         ABI.
2053         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
2054         CLASSTYPE_VFIELD_PARENT.
2055         (dfs_get_primary_binfo): New function.
2056         (get_primary_binfo): Likewise.
2057         (dump_class_hierarchy_r): Tweak printing of primary bases.
2058         (build_vtbl_initializer): Fix typo in comments.  Use
2059         vtbl_init_data.
2060         (build_vcall_and_vbase_vtbl_entries): Likewise.
2061         (build_vbaes_offset_vtbl_entries): Likewise.
2062         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
2063         BV_VCALL_INDEX to handle indirect primary bases.
2064         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
2065         (build_rtti_vtbl_entries): Likewise.
2066         * search.c (get_shared_vbase_if_not_primary): Tweak.
2067         (find_vbase_instance): Likewise.
2068         (binfo_for_vtable): Simplify.
2069         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
2070         (make_binfo): Make it have 11 entries.
2072 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
2074         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
2075         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
2076         ascertaining primaryness.
2077         (G): Remove template_args.
2078         (decl_is_template_id): New function.
2079         (write_encoding): Use decl_is_template_id.
2080         (write_name): Likewise.  Handle type_decls.  Get main variant of
2081         type decls.
2082         (write_nested_name): Likewise.
2083         (write_prefix): Likewise.
2084         (write_template_prefix): Likewise.
2085         (write_special_name_constructor): Remove defunct production from
2086         comment.
2087         (write_bare_function_type): Remove comment about absent parameter.
2088         (write_template_template_arg): Add missing grammar production to
2089         comment.
2091 2000-07-27  Jason Merrill  <jason@redhat.com>
2093         * decl.c (duplicate_decls): If common_type produces a non-typedef
2094         type for a typedef, just use the old type.
2096 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
2098         * cp-tree.h (function_depth): Declare.
2099         (verify_stmt_tree): Likewise.
2100         (find_tree): Likewise.
2101         * decl.c (function_depth): Give it external linkage.
2102         * optimize.c (optimize_function): Increment and decrement it.
2103         * tree.c (verify_stmt_tree_r): New function.
2104         (verify_stmt_tree): Likewise.
2105         (find_tree_r): Likewise.
2106         (find_tree): Likewise.
2108 2000-07-27  Jason Merrill  <jason@redhat.com>
2110         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
2111         TYPE_PTRMEMFUNC_P.
2112         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
2114 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
2116         * decl.c (start_cleanup_fn): Mark the function as `inline'.
2117         * decl2.c (get_guard): Call cp_finish_decl, not
2118         rest_of_decl_compilation, for local guards.
2119         * lex.c (do_identifier): Remove unused variable.
2121 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
2123         * parse.y:  Add missing ';'.
2125 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
2127         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
2128         of `extern "C++"'.
2130 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2132         Kill strict_prototype. Backwards compatibility only for
2133         non NO_IMPLICIT_EXTERN_C systems.
2134         * cp-tree.h (flag_strict_prototype): Remove.
2135         (strict_prototype): Remove.
2136         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
2137         * decl.c (maybe_push_to_top_level): Adjust.
2138         (pop_from_top_level): Adjust.
2139         (decls_match): Only allow sloppy parm matching for ancient
2140         system headers.
2141         (init_decl_processing): Adjust.
2142         (grokdeclarator): Adjust.
2143         * decl2.c (flag_strict_prototype): Remove.
2144         (strict_prototype): Remove.
2145         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
2146         (lang_f_options): Remove "strict-prototype".
2147         (unsupported-options): Add "strict-prototype".
2148         * lex.c (do_identifier): Adjust.
2149         (do_scoped_id): Adjust.
2150         * parse.y (empty_parms): Adjust.
2151         * class.c (push_lang_context): Adjust.
2152         (pop_lang_context): Adjust.
2153         * typeck.c (comp_target_parms): Adjust.
2155 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2157         * decl.c (poplevel): Deal with anonymous variables at for scope.
2158         (maybe_inject_for_scope_var): Likewise.
2160 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
2162         * decl.c: Remove all signal handling code, now done in toplev.c.
2164 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
2166         * decl.c (make_rtl_for_nonlocal_decl): Rework.
2168         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
2169         correctly.
2171 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
2173         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
2174         Define my_friendly_assert and my_friendly_abort as macros
2175         which may call friendly_abort.  Prototype friendly abort, not
2176         my_friendly_abort or my_friendly_assert.
2177         * decl.c (signal_catch): Report the signal caught in the error
2178         message.  Call fatal directly.
2179         * typeck2.c (ack, my_friendly_assert): Delete.
2180         (my_friendly_abort): Rename to friendly_abort.  Expect file,
2181         line, and function parameters.  Report the abort code, then
2182         call fancy_abort.  Do not mask an abort if errors have
2183         already occurred.
2185 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2187         * typeck.c (comp_target_parms): Remove obsolete parameter.
2188         (comp_target_types): Adjust.
2190 2000-07-17  Jason Merrill  <jason@redhat.com>
2192         * typeck.c (mark_addressable): Never set TREE_USED.
2193         * call.c (build_call): Don't abort on calls to library functions
2194         that have been declared normally.
2196         * typeck.c (build_binary_op): Fix grammar in warning.
2198         * exception.cc (__eh_free): Fix prototype.
2200         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
2202         * decl.c (pushdecl): Handle seeing an OVERLOAD in
2203         IDENTIFIER_NAMESPACE_VALUE.
2205 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
2207         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
2208         * method.c (use_thunk): Correct handling of vcall offsets.
2210 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
2212         * .cvsignore: parse.h and parse.c have no cp- prefix.
2214 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
2216         * .cvsignore: New file.
2218 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
2220         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
2222 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
2224         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
2225         * parse.c: Remove.
2226         * parse.h: Likewise.
2228 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
2230         * class.c (layout_class_type): Add pointers to virtual bases after
2231         base classes under the old ABI.
2233 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
2235         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
2236         (finish_continue_stmt): Likewise.
2237         (begin_for_stmt): Remove call to note_level_for_for.
2238         (finish_goto_stmt): Change call from build_min_nt
2239         to build_stmt.
2240         (finish_expr_stmt): Likewise.
2241         (begin_if_stmt): Likewise.
2242         (begin_while_stmt): Likewise.
2243         (finish_while_stmt): Likewise.
2244         (finish_return_stmt): Likewise.
2245         (begin_for_stmt): Likewise.
2246         (finish_for_stmt): Likewise.
2247         (finish_break_stmt): Likewise.
2248         (begin_switch_stmt): Likewise.
2249         (finish_case_label): Likewise.
2250         (genrtl_try_block): Likewise.
2251         (begin_try_block): Likewise.
2252         (begin_handler): Likewise.
2253         (begin_compound_stmt): Likewise.
2254         (finish_asm_stmt): Likewise.
2255         (finish_label_stmt): Likewise.
2256         (add_decl_stmt): Likewise.
2257         (finish_subobject): Likewise.
2258         (finish_decl_cleanup): Likewise.
2259         (finish_named_return_value): Likewise.
2260         (setup_vtbl_ptr): Likewise.
2261         (add_scope_stmt): Likewise.
2262         * decl.c (finish_constructor_body): Likewise.
2263         (finish_destructor_body): Likewise.
2264         * optimize.c (copy_body_r): Likewise.
2265         (initialize_inlined_parameters): Likewise.
2266         (declare_return_variable): Likewise.
2267         (expand_call_inline): Likewise.
2269 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
2271         * semantics.c (expand_body): Sync interface information
2272         at the end of function body expansion.
2274 2000-07-09  Jason Merrill  <jason@redhat.com>
2276         * init.c (build_new_1): Bail early if the call to new fails.
2278         * decl.c (compute_array_index_type): Check specifically for
2279         an INTEGER_CST, not just TREE_CONSTANT.
2281         * decl.c (duplicate_decls): Don't call duplicate_decls on
2282         the DECL_TEMPLATE_RESULT.
2283         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
2284         codes.
2286         * error.c (dump_template_bindings): Don't crash if we had an
2287         invalid argument list.
2289         * typeck.c (c_expand_start_case): Do narrowing here.
2290         * semantics.c (finish_switch_cond): Not here.
2292 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
2294         * parse.y (asm_clobbers): Do string concatenation.
2296 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
2298         * decl.c (pushtag): Don't put local classes in template functions
2299         on the local_classes list.
2301 2000-07-04  Scott Snyder  <snyder@fnal.gov>
2303         * decl2.c (get_guard): Add missing return for old ABI local
2304         variable case.
2306 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
2308         * cp-tree.h (char_type_p): New function.
2309         * decl.c (init_decl_processing): Don't initialize
2310         signed_wchar_type_node or unsigned_wchar_type_node.
2311         (complete_array_type): Handle brace-enclosed string-constants.
2312         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
2313         * tree.c (char_type_p): New function.
2314         * typeck2.c (digest_init): Use char_type_p.
2316 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
2318         * pt.c (tsubst): Don't layout type, if it's error_mark.
2320 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
2322         * pt.c (instantiate_pending_templates): Reset template level.
2324 2000-07-05  Jason Merrill  <jason@redhat.com>
2326         * call.c (joust): Don't complain about `operator char *()' beating
2327         `operator const char *() const'.
2329 2000-07-04  scott snyder  <snyder@fnal.gov>
2330             Jason Merrill  <jason@redhat.com>
2332         * repo.c (repo_get_id): Handle the case where a class with virtual
2333         bases has a null TYPE_BINFO_VTABLE.
2335 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
2336             Jason Merrill  <jason@redhat.com>
2338         * parse.y (member_init): Just pass in the type.
2339         * init.c (expand_member_init): Handle getting a type.
2341 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2342             Jason Merrill  <jason@redhat.com>
2344         * decl.c (finish_function): Warn if a function has no return
2345         statement.
2346         Suggested by Andrew Koenig.
2347         * typeck.c (check_return_expr): Do set current_function_returns_value
2348         if we got an error_mark_node.
2350 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2352         * decl2.c (push_decl_namespace): Push the original namespace.
2354 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2356         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
2357         * semantics.c (begin_class_definition): Clear it.
2359 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
2361         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
2362         (genrtl_expr_stmt): Likewise.
2363         (genrtl_decl_stmt): Likewise.
2364         (genrtl_if_stmt): Likewise.
2365         (genrtl_while_stmt): Likewise.
2366         (genrtl_do_stmt): Likewise.
2367         (genrtl_return_stmt): Likewise.
2368         (genrtl_for_stmt): Likewise.
2369         (genrtl_break_stmt): Likewise.
2370         (genrtl_continue_stmt): Likewise.
2371         (genrtl_scope_stmt): Likewise.
2372         (genrtl_switch_stmt): Likewise.
2373         (genrtl_case_label): Likewise.
2374         (genrtl_begin_compound_stmt): Likewise.
2375         (genrtl_finish_compound_stmt): Likewise.
2376         (genrtl_compound_stmt): Likewise.
2377         (genrtl_asm_stmt): Likewise.
2379         * init.c (begin_init_stmts): Remove call to
2380         genrtl_begin_compound_stmt.
2381         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
2383         * semantics.c (lang_expand_stmt): Changed call to
2384         genrtl_compound_stmt to ignore return value.
2386 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
2388         * mangle.c (canonicalize_for_substitution): Return the canonical
2389         variant of a type.
2391         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
2392         TYPE_DECL.
2393         * typeck.c (commonparms): Remove obstack manipulations.
2395 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
2397         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
2399         * Makefile.in (OBJS): Added ../c-semantics.o.
2400         (OBJDEPS): Likewise.
2402         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
2403         ../c-common.h.
2404         (struct stmt_tree): Added comment.
2405         (current_function_name_declared): Removed.
2406         (stmts_are_full_exprs_p): Likewise.
2407         (genrtl_do_pushlevel): Likewise.
2408         (genrtl_clear_out_block): Likewise.
2409         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
2410         (DECL_ANON_UNION_ELEMS): Likewise.
2411         (emit_local_var): Likewise.
2412         (make_rtl_for_local_static): Likewise.
2413         (do_case): Likewise.
2414         (expand_stmt): Likewise.
2415         (genrtl_decl_cleanup): Likewise.
2416         (c_expand_asm_operands): Likewise.
2417         (c_expand_return): Likewise.
2418         (c_expand_start_case): Likewise.
2420         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
2421         (emit_local_var): Likewise.
2422         (initialize_local_var): Change reference to
2423         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
2424         Change reference to stmts_are_full_exprs_p to
2425         current_stmt_tree->stmts_are_full_exprs_p.
2426         (push_cp_function_context): Likewise.
2428         * expect.c (expand_throw): Change reference to
2429         stmts_are_full_exprs_p.
2431         * init.c (build_aggr_init): Change reference to
2432         stmts_are_full_exprs_p.
2433         (build_vec_init): Likewise.
2435         * optimize.c (maybe_clone_body): Change reference to
2436         current_function_name_declared to
2437         cp_function_chain->name_declared.
2439         * pt.c (instantiate_decl): Change reference to
2440         current_function_name_declared to
2441         cp_function_chain->name_declared.
2443         * semantics.c (expand_cond): Moved declaration to c-common.h.
2444         (genrtl_do_pushlevel): Moved to c-semantics.c.
2445         (genrtl_clear_out_block): Likewise.
2446         (genrtl_goto_stmt): Likewise.
2447         (genrtl_expr_stmt): Likewise.
2448         (genrtl_decl_stmt): Likewise.
2449         (gerntl_if_stmt): Likewise.
2450         (genrtl_while_stmt): Likewise.
2451         (genrtl_do_stmt): Likewise.
2452         (genrtl_return_stmt): Likewise.
2453         (genrtl_for_stmt): Likewise.
2454         (genrtl_break_stmt): Likewise.
2455         (genrtl_continue_stmt): Likewise.
2456         (genrtl_scope_stmt): Likewise.
2457         (genrtl_switch_stmt): Likewise.
2458         (genrtl_case_label): Likewise.
2459         (genrtl_begin_compound_stmt): Likewise.
2460         (genrtl_finish_compound_stmt): Likewise.
2461         (genrtl_compound_stmt): Likewise.
2462         (genrtl_asm_stmt): Likewise.
2463         (genrtl_decl_cleanup): Likewise.
2464         (expand_cond): Likewise.
2465         (expand_stmt): Renamed to ...
2466         (lang_expand_stmt): ... this.
2467         (lang_expand_expr_stmt): Initialize.
2468         (set_current_function_name_declared): Likewise.
2469         (stmts_are_full_exprs_p): Likewise.
2470         (current_function_name_declared): Likewise.
2471         (anon_aggr_type_p): Likewise.
2472         (do_poplevel): Change reference to
2473         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
2474         Change reference to stmts_are_full_exprs_p to
2475         current_stmt_tree->stmts_are_full_exprs_p.
2476         (add_tree): Likewise.
2477         (finish_expr_stmt): Likewise.
2478         (prep_stmt): Likewise.
2479         (lang_expand_stmt): Likewise.
2480         (begin_compound_stmt): Change reference to
2481         current_function_name_declared to
2482         cp_function_chain->name_declared and call to
2483         current_function_name_declared().
2484         (setup_vtbl_ptr): Likewise.
2485         (genrtl_do_poplevel): Removed.
2487 2000-06-30  Jason Merrill  <jason@redhat.com>
2489         * init.c (init_init_processing): Go back to aligning like
2490         double_type_node for old ABI.
2491         (get_cookie_size): Make cookie larger if we get a type that needs
2492         more alignment.
2493         (build_vec_delete): Call it.
2495         * typeck.c (qualify_type_recursive): New fn.
2496         (composite_pointer_type): Use it.
2497         (build_binary_op): Use composite_pointer_type.
2499 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
2500             Jason Merrill  <jason@redhat.com>
2502         * typeck.c (check_return_expr): Don't complain about returning
2503         NULL from operator new if -fcheck-new.
2504         * cp-tree.h: Declare flag_check_new here.
2505         * init.c: Not here.
2507 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
2509         * mangle.c (find_substitution): Use same_type_p.
2510         (write_encoding): Don't check for substitutions.
2512 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
2514         * parse.y (expr_no_comma_rangle): New non-terminal.
2515         (template_parm): Use it for default parameter case.
2516         (template_arg): Use it.
2517         (expr_no_commas): Remove commented out undefined extensions.
2518         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
2519         * parse.h, parse.c: Rebuilt.
2521 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
2523         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
2524         (finish_asm_stmt): Do it here, instead.
2526         * cp-tree.h (ridpointers): Don't declare.
2527         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
2528         (record_builtin_java_type): Likewise.
2529         (init_decl_processing): Likewise.
2530         * lex.c: Move inclusion of lex.h.
2531         (ridpointers): Don't define.
2532         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
2533         RID_MAX.
2534         * lex.h (enum rid): Rename to ...
2535         (enum cp_rid): ... this.
2536         (ridpointers): Don't declare.
2537         * parse.y: Move inclusion of lex.h.
2538         * parse.c: Regenerated.
2539         * spew.c: Move inclusion of lex.h.
2541         * cp-tree.h (struct language_function): Remove temp_name_counter.
2542         (temp_name_counter): Remove.
2543         (get_temp_name): Change prototype.
2544         (get_guard): New function.
2545         (get_guard_cond): Likewise.
2546         (set_guard): Likewise.
2547         * cvt.c (build_up_reference): Adjust call to get_temp_name.
2548         * decl.c (expand_static_init): Use get_guard and friends to
2549         implement guard variables.
2550         * decl2.c (get_temp_name): Assume that the variables created are
2551         always static.
2552         (get_sentry): Rename to ...
2553         (get_guard): ... this.  Implement new ABI guard variables.
2554         (get_guard_bits): New function.
2555         (get_guard_cond): Likewise.
2556         (set_guard): Likewise.
2557         (start_static_initialization_or_destruction): Use them.
2558         (do_static_initialization): Replace sentry with guard throughout.
2559         (do_static_destruction): Likewise.
2560         * init.c (create_temporary_var): Add comment.
2562 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
2564         * mangle.c (find_substitution): Use same_type_p.
2565         (write_encoding): Don't check for substitutions.
2567 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
2569         * parse.y (expr_no_comma_rangle): New non-terminal.
2570         (template_parm): Use it for default parameter case.
2571         (template_arg): Use it.
2572         (expr_no_commas): Remove commented out undefined extensions.
2573         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
2574         * parse.h, parse.c: Rebuilt.
2576 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
2578         * cp-tree.h (flag_const_strings): Remove.
2579         (warn_parentheses): Likewise.
2580         (warn_format): Likewise.
2581         (common_type): Likewise.
2582         (default_conversion): Likewise.
2583         (build_binary_op): Likewise.
2584         (cp_build_binary_op): New macro.
2585         * call.c (build_new_op): Use cp_build_binary_op instead of
2586         build_binary_op.
2587         * class.c (build_vtable_entry_ref): Likewise.
2588         * decl.c (expand_static_init): Likewise.
2589         (compute_array_index_type): Likewise.
2590         (build_enumerator): Likewise.
2591         * decl2.c (delete_sanity): Likewise.
2592         (start_static_initialization_or_destruction): Likewise.
2593         * error.c (dump_type_suffix): Likewise.
2594         * init.c (resolve_offset_ref): Likewise.
2595         (build_new): Likewise.
2596         (build_new_1): Likewise.
2597         (build_vec_delete_1): Likewise.
2598         (build_vec_init): Likewise.
2599         (build_delete): Likewise.
2600         * rtti.c (synthesize_tinfo_fn): Likewise.
2601         (synthesize_tinfo_var): Likewise.
2602         * search.c (expand_upcast_fixups): Likewise.
2603         (fixup_all_virtual_upcast_offsets): Likewise.
2604         * typeck.c (build_array_ref): Likewise.
2605         (get_member_function_from_ptrfunc): Likewise.
2606         (build_binary_op): Add parameter.
2607         (pointer_int_sum): Use cp_build_binary_op.
2608         (pointer_diff): Likewise.
2609         (build_modify_expr): Likewise.
2610         (get_delta_difference): Likewise.
2611         (build_ptrmemfunc): Likewise.
2613 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
2615         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
2616         * decl.c (create_implicit_typedef): Adjust.
2617         * decl2.c (build_artificial_parm): Adjust.
2618         * method.c (implicitly_declare_fn): Adjust.
2619         * pt.c (push_inline_template_parms_recursive): Adjust.
2620         (process_template_parm): Adjust.
2621         (overloaded_template_name): Adjust.
2622         * semantics.c (finish_template_template_parm): Adjust.
2624 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
2626         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
2627         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
2628         where to emit thunks.
2629         (build_vtt): Adjust call to build_vtt_inits.
2630         (build_vtt_inits): Add parameter to indicate whether or not
2631         sub-VTTs for virtual bases should be included.  Adjust handling of
2632         construction vtables.
2633         (get_matching_base): New function.
2634         (dfs_build_vtt_inits): Rename to ...
2635         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
2636         construction vtables.
2637         (dfs_fixup_binfo_vtbls): Likewise.
2638         (build_ctor_vtbl_groups): Build construction vtables for virtual
2639         bases, too.
2640         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
2641         to build construction vtbls.
2642         (dfs_accumulate_vtbl_inits): Adjust handling of
2643         construction vtables.
2645         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
2646         types correctly.
2648 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
2650         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
2652 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
2654         * search.c (hides): Remove.
2655         (is_subobject_of_p): Add most_derived parameter. Use
2656         CANONICAL_BINFO.
2657         (lookup_field_queue_p): Adjust.
2658         (lookup_field_r): Adjust.
2660 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
2662         * decl2.c (handle_class_head): Bash typedefs to the type's main
2663         decl.
2665 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
2667         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
2668         (begin_global_stmt_expr): ... this.
2669         (genrtl_finish_stmt_expr): Rename to ...
2670         (finish_global_stmt_expr): ... this.
2671         * init.c (begin_init_stmts): Adjust calls.
2672         (finish_init_stmts): Likewise.
2673         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
2674         (begin_global_stmt_expr): ... this.
2675         (genrtl_finish_stmt_expr): Rename to ...
2676         (finish_global_stmt_expr): ... this.
2678 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2680         * search.c (lookup_member): Fix typo in comment.
2682 2000-06-24  Jason Merrill  <jason@redhat.com>
2684         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
2685         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
2687 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2689         * parse.y (complex_direct_notype_declarator): Support global_scope.
2690         * Makefile.in: Adjust conflict count.
2692 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
2694         * parse.y (template_arg): Convert TEMPLATE_DECL
2695         that is a template template paramter to
2696         TEMPLATE_TEMPLATE_PARM here.
2698         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
2699         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
2700         (copy_template_template_parm): Adjust prototype.
2701         * decl.c (grokdeclarator): Remove dead code.
2702         * pt.c (process_template_parm): Tidy.
2703         (lookup_template_class): Construct nodes in
2704         copy_template_template_parm.
2705         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
2706         lookup_template_class.  Use TYPE_TI_TEMPLATE.
2707         * tree.c (copy_template_template_parm): Add NEWARGS
2708         parameter.
2709         (mapcar): Adjust call to copy_template_template_parm.
2710         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
2711         * method.c (build_template_template_parm_names): Change error
2712         code to avoid compilation warning.
2714         * gxxint.texi: Document template template parameter
2715         name mangling.
2717 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
2719         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
2720         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
2721         (cp-demangle.o): New rule.
2722         (dyn-string.o): Likewise.
2723         * inc/cxxabi.h (__cxa_demangle): New declaration.
2725 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
2727         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
2728         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
2729         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
2730         a tree, not an int.
2731         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
2732         (make_thunk): Change prototype.
2733         (emit_thunk): Rename to use_thunk.
2734         (mangle_thunk): Change prototype.
2735         * class.c (get_derived_offset): Simplify.
2736         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
2737         BV_GENERATE_THUNK_WITH_VTABLE_P.
2738         (build_primary_vtable): Simplify.
2739         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
2740         (dfs_find_base): Remove.
2741         (update_vtable_entry_for_fn): Correct bug in finding the base
2742         where a virtual function was first declared.  Figure out whether
2743         or not to emit a vcall-thunk with the vtables in which it appears.
2744         Correct logic for deciding whether to use an ordinary thunk, or a
2745         vcall thunk.
2746         (finish_struct_1): Remove unnecssary code.
2747         (build_vtbl_initializer): Use ssize_int for the running counter of
2748         negative indices.
2749         (build_vtbl_initializer): Only use vcall thunks where necessary.
2750         Mark thunks as needing to be emitted with their vtables, or not.
2751         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
2752         indices.  Use size_binop.
2753         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
2754         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
2755         size_binop.
2756         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
2757         (build_vtable_entry): Mark thunks as needing to be emitted with
2758         their vtables, or not.
2759         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
2760         * decl2.c (mark_vtable_entries): Use use_thunk instead of
2761         emit_thunk.
2762         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
2763         information.
2764         * error.c (dump_expr): Use BV_FN.
2765         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
2766         not an int.
2767         * method.c (make_thunk): Likewise.
2768         (emit_thunk): Rename to use_thunk.  Allow callers to decide
2769         whether or not to actually emit the thunk.  Adjust for changes in
2770         representation of vcall offsets.
2771         * search.c (dfs_get_pure_virtuals): Use BV_FN.
2772         * semantics.c (emit_associated_thunks): New function.
2773         (expand_body): Use it.
2774         * ir.texi: Adjust decriptions of thunks.
2776 2000-06-22  Jason Merrill  <jason@redhat.com>
2778         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
2779         (tsubst_friend_function): Copy it here.
2781         * decl.c (grok_op_properties): Fix typo.
2783         * decl2.c (delete_sanity): Clarify warning, avoid failure on
2784         deleting void*.
2786         * pt.c (check_explicit_specialization): Clarify error.
2788         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
2789         an old OVERLOAD when we're declaring a non-function.
2790         (pushdecl, destroy_local_var): Check for error_mark_node.
2791         (warn_extern_redeclared_static): Also bail early if
2792         we're a CONST_DECL.
2793         (push_overloaded_decl): Ignore an old error_mark_node.
2795 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
2797         * call.c (build_x_va_arg): Check if in a template decl.
2798         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
2800 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
2802         * class.c (push_lang_context): TYPE_NAME gets you to the Java
2803         types DECLs.
2804         * decl.c (check_goto): Computed gotos assumed OK.
2806 2000-06-20  Jason Merrill  <jason@redhat.com>
2808         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
2809         for which we don't need to look for instantiations.
2811 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
2813         * parse.y (program): Always call finish_translation_unit.
2814         * parse.c, parse.h: Rebuilt.
2816 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
2818         * method.c: Don't include hard-reg-set.h.
2820 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2822         * rtti.c (get_base_offset): Cope when vbase field is in a base.
2824 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
2826         * call.c (build_conditional_expr): Use VOID_TYPE_P.
2827         * cvt.c (cp_convert_to_pointer): Likewise.
2828         (convert_to_void): Likewise.
2829         * error.c (dump_expr): Likewise.
2830         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
2831         * init.c (build_delete): Likewise.
2832         * method.c (emit_thunk): Likewise.
2833         * optmize.c (declare_return_variable): Likewise.
2834         * rtti.c (get_tinfo_decl_dynamic): Likewise.
2835         (get_typeid): Likewise.
2836         (build_dynamic_cast_1): Likewise.
2837         * typeck.c (composite_pointer_type): Likewise.
2838         (common_type): Likewise.
2839         (build_indirect_ref): Likewise.
2840         (build_binary_op): Likewise.
2841         (build_x_compound_expr): Likewise.
2842         (check_return_expr): Likewise.
2843         * typeck2.c (add_exception_specifier): Likewise.
2845         * mangle.c (write_method_parms): Use direct comparison for end
2846         of parmlist.
2848 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
2850         * cp-tree.h (genrtl_try_block): Declare function.
2851         (genrtl_handler): Likewise.
2852         (genrtl_catch_block): Likewise.
2853         (genrtl_ctor_stmt): Likewise.
2854         (genrtl_subobject): Likewise.
2855         (genrtl_decl_cleanup): Likewise.
2856         (genrtl_do_poplevel): Likewise.
2857         (genrtl_do_pushlevel): Likewise.
2858         (genrtl_clear_out_block): Likewise.
2859         (genrtl_goto_stmt): Likewise.
2860         (genrtl_expr_stmt): Likewise.
2861         (genrtl_decl_stmt): Likewise.
2862         (genrtl_if_stmt): Likewise.
2863         (genrtl_while_stmt): Likewise.
2864         (genrtl_do_stmt): Likewise.
2865         (genrtl_return_stmt): Likewise.
2866         (genrtl_for_stmt): Likewise.
2867         (genrtl_break_stmt): Likewise.
2868         (genrtl_continue_stmt): Likewise.
2869         (genrtl_scope_stmt): Likewise.
2870         (genrtl_switch_stmt): Likewise.
2871         (genrtl_case_label): Likewise.
2872         (genrtl_begin_compound_stmt): Likewise.
2873         (genrtl_finish_compound_stmt): Likewise.
2874         (genrtl_compound_stmt): Likewise.
2875         (genrtl_asm_stmt): Likewise.
2876         (genrtl_named_return_value): Likewise.
2877         (genrtl_begin_stmt_expr): Likewise.
2878         (genrtl_finish_stmt_expr): Likewise.
2879         (finish_for_stmt): Removed first argument.
2880         (finish_switch_stmt): Likewise.
2882         * semantics.c (genrtl_try_block): Define function.
2883         (genrtl_handler): Likewise.
2884         (genrtl_catch_block): Likewise.
2885         (genrtl_ctor_stmt): Likewise.
2886         (genrtl_subobject): Likewise.
2887         (genrtl_decl_cleanup): Likewise.
2888         (genrtl_do_poplevel): Likewise.
2889         (genrtl_do_pushlevel): Likewise.
2890         (genrtl_clear_out_block): Likewise.
2891         (genrtl_goto_stmt): Likewise.
2892         (genrtl_expr_stmt): Likewise.
2893         (genrtl_decl_stmt): Likewise.
2894         (genrtl_if_stmt): Likewise.
2895         (genrtl_while_stmt): Likewise.
2896         (genrtl_do_stmt): Likewise.
2897         (genrtl_return_stmt): Likewise.
2898         (genrtl_for_stmt): Likewise.
2899         (genrtl_break_stmt): Likewise.
2900         (genrtl_continue_stmt): Likewise.
2901         (genrtl_scope_stmt): Likewise.
2902         (genrtl_switch_stmt): Likewise.
2903         (genrtl_case_label): Likewise.
2904         (genrtl_begin_compound_stmt): Likewise.
2905         (genrtl_finish_compound_stmt): Likewise.
2906         (genrtl_compound_stmt): Likewise.
2907         (genrtl_asm_stmt): Likewise.
2908         (genrtl_named_return_value): Likewise.
2909         (genrtl_begin_stmt_expr): Likewise.
2910         (genrtl_finish_stmt_expr): Likewise.
2911         (finish_for_stmt): Removed first argument and generate rtl
2912         specific code.
2913         (finish_switch_stmt): Likewise.
2914         (do_poplevel): Removed generate rtl specific code.
2915         (do_pushlevel): Likewise.
2916         (add_tree): Likewise.
2917         (finish_goto_stmt): Likewise.
2918         (finish_expr_stmt): Likewise.
2919         (begin_if_stmt): Likewise.
2920         (finish_if_stmt_cond): Likewise.
2921         (finish_then_clause): Likewise.
2922         (begin_else_clause): Likewise.
2923         (finish_else_clause): Likewise.
2924         (finish_if_stmt): Likewise.
2925         (clear_out_block): Likewise.
2926         (begin_while_stmt): Likewise.
2927         (finish_while_stmt_cond): Likewise.
2928         (finish_while_stmt): Likewise.
2929         (begin_do_stmt): Likewise.
2930         (finish_do_body): Likewise.
2931         (finish_do_stmt): Likewise.
2932         (finish_return_stmt): Likewise.
2933         (begin_for_stmt): Likewise.
2934         (finish_for_init_stmt): Likewise.
2935         (finish_for_cond): Likewise.
2936         (finish_for_expr): Likewise.
2937         (finish_break_stmt): Likewise.
2938         (finish_continue_stmt): Likewise.
2939         (begin_switch_stmt): Likewise.
2940         (finish_switch_cond): Likewise.
2941         (finish_case_label): Likewise.
2942         (begin_try_block): Likewise.
2943         (begin_function_try_block): Likewise.
2944         (finish_try_block): Likewise.
2945         (finish_cleanup_try_block): Likewise.
2946         (finish_cleanup): Likewise.
2947         (finish_function_try_block): Likewise.
2948         (finish_handler_sequence): Likewise.
2949         (finish_function_handler_sequence): Likewise.
2950         (begin_handler): Likewise.
2951         (finish_handler_parms): Likewise.
2952         (begin_catch_block): Likewise.
2953         (finish_handler): Likewise.
2954         (begin_compound_stmt): Likewise.
2955         (finish_compound_stmt): Likewise.
2956         (finish_asm_stmt): Likewise.
2957         (finish_label_stmt): Likewise.
2958         (finish_label_decl): Likewise.
2959         (finish_subobject): Likewise.
2960         (finish_decl_cleanup): Likewise.
2961         (finish_named_return_value): Likewise.
2962         (begin_stmt_expr): Likewise.
2963         (finish_stmt_expr): Likewise.
2965         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
2966         to call genrtl_expr_stmt when appropriate.
2968         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
2969         begin_compound_expr to call genrtl_begin_stmt_expr and
2970         genrtl_begin_compound_expr when appropriate.
2971         (finish_init_stmts): Changed calls to finish_compound_expr and
2972         finish_stmt_expr to call genrtl_finish_compound_expr and
2973         genrtl_finish_stmt_expr when appropriate.
2974         (expand_default_init): Changed call to finish_expr_stmt to call
2975         genrtl_expr_stmt when appropriate.
2976         (build_vec_init): Likewise.
2978         * parse.y (simple_stmt): Removed first argument from call to
2979         finish_for_stmt. Removed first argument from call to
2980         finish_switch_stmt.
2982         * parse.c: Regenerated.
2984         * pt.c (tsubst_expr): Removed first argument from call to
2985         finish_for_stmt. Removed first argument from call to
2986         finish_switch_stmt.
2988 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
2990         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
2991         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
2993         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
2994         (cplus_tree_code_length[]): Likewise.
2995         (cplus_tree_code_name[]): Likewise.
2996         (init_parse): Added call to add_c_tree_codes. Changed
2997         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
2999 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
3001         * cp-tree.h (finish_mem_initializers): Declare.
3002         (count_trees): Likewise.
3003         * parse.y (base_init): Use finish_mem_initializers.
3004         * semantics.c (finish_mem_initializers): New function.
3006         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
3007         the number of trees.
3008         (n_trees): Remove.
3009         (count_trees): Don't use it.
3011 2000-06-15  Jason Merrill  <jason@redhat.com>
3013         * tree.c (count_trees): New debugging function.
3015         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
3016         * init.c (build_member_call): Pull out the name of a DECL.
3018         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
3019         * semantics.c (expand_body): Push to TV_INTEGRATION here.
3020         * optimize.c (optimize_function): Not here.
3021         * pt.c (instantiate_decl): Push to TV_PARSE.
3023 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
3025         * cp-tree.h (struct language_function): Remove x_base_init_list
3026         and x_member_init_list.
3027         (current_base_init_list): Remove.
3028         (current_member_init_list): Likewise.
3029         (setup_vtbl_ptr): Change prototype.
3030         (emit_base_init): Likewise.
3031         (expand_member_init): Likewise.
3032         (reinit_parse_for_function): Remove.
3033         * decl.c (save_function_data): Don't clear x_base_init_list and
3034         x_member_init_list.
3035         (mark_language_function): Don't mark them.
3036         * init.c (perform_member_init): Tweak comment.
3037         (sort_member_init): Take the list of initializers as an argument.
3038         (sort_base_init): Likewise.
3039         (emit_base_init): Likewise.
3040         (expand_member_init): Return the initializer.  Don't use global
3041         variables.
3042         * lex.c (reinit_parse_for_function): Remove.
3043         * method.c (build_template_parm_names): Correct substitution.
3044         (do_build_copy_constructor): Don't use current_member_init_list
3045         and current_base_init_list.
3046         (synthesize_method): Likewise.
3047         * parse.y (base_init): Split mem-initializers into
3048         base-initializers and field-initializers.
3049         (member_init_list): Build up the list here.
3050         (member_init): Return the initializer.
3051         (fn.depfn): Don't use reinit_parse_for_function.
3052         * parse.c: Regenerated.
3053         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
3054         ERROR_MARK.
3055         (tsubst_expr): Don't use current_member_init_list
3056         and current_base_init_list.
3057         (tsubst_expr_values): Rename to ...
3058         (tsubst_initializer_list): ... this.  Use convert_from_reference.
3059         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
3060         and current_base_init_list.
3061         (begin_function_definition): Don't call reinit_parse_for_function.
3063         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
3065         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
3066         correctly.
3068         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
3070 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
3072         * cp-tree.h (IF_COND): Move to c-common.h.
3073         (THEN_CLAUSE): Likewise.
3074         (ELSE_CLAUSE): Likewise.
3075         (WHILE_COND): Likewise.
3076         (WHILE_BODY): Likewise.
3077         (DO_COND): Likewise.
3078         (DO_BODY): Likewise.
3079         (RETURN_EXPR): Likewise.
3080         (EXPR_STMT_EXPR): Likewise.
3081         (FOR_INIT_STMT): Likewise.
3082         (FOR_COND): Likewise.
3083         (FOR_EXPR): Likewise.
3084         (FOR_BODY): Likewise.
3085         (SWITCH_COND): Likewise.
3086         (SWITCH_BODY): Likewise.
3087         (CASE_LOW): Likewise.
3088         (CASE_HIGH): Likewise.
3089         (GOTO_DESTINATION): Likewise.
3090         (COMPOUND_BODY): Likewise.
3091         (ASM_CV_QUAL): Likewise.
3092         (ASM_STRING): Likewise.
3093         (ASM_OUTPUTS): Likewise.
3094         (ASM_INPUTS): Likewise.
3095         (ASM_CLOBBERS): Likewise.
3096         (DECL_STMT_DECL): Likewise.
3097         (STMT_EXPR_STMT): Likewise.
3098         (LABEL_STMT_LABEL): Likewise.
3099         (SCOPE_BEGIN_P): Likewise.
3100         (SCOPE_END_P): Likewise.
3101         (SCOPE_STMT_BLOCK): Likewise.
3102         (SCOPE_NULLIFIED_P): Likewise.
3103         (SCOPE_NO_CLEANUPS_P): Likewise.
3104         (SCOPE_PARTIAL_P): Likewise.
3105         (ASM_VOLATILE_P): Likewise.
3106         (STMT_LINENO): Likewise.
3107         (STMT_LINENO_FOR_FN_P): Likewise.
3109         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
3110         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
3111         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
3112         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
3113         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
3115         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
3117         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
3118         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
3120         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
3121         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
3122         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
3124 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
3126         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
3127         * class.c (dfs_find_final_overrider): Set it appropriately.
3128         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
3129         avoid unneeded secondary vptrs.
3131 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
3133         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
3134         (check_bitfield_decl, check_field_decl): Likewise.
3135         (build_vtbl_or_vbase_field, build_base_field): Likewise.
3136         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
3137         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
3138         (xfer_tag, finish_enum): Likewise.
3139         * decl2.c (finish_builtin_type): Likewise.
3140         * init.c (init_init_processing): Likewise.
3141         * pt.c (instantiate_class_template): Likewise.
3142         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
3143         * cp-tree.h (struct lang_type): Add user_align member.
3144         (CLASSTYPE_USER_ALIGN): Define.
3146 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
3148         * Make-lang.in (c++.install-common): Install g++-cross in
3149         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
3150         $(target_alias)-g++ and $(target_alias)-c++.
3152 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
3154         * class.c (vcall_offset_data_s): Add last_init and fns.
3155         (overrides): Rename to same_signature_p.
3156         (dfs_find_final_overrider): Adjust accordingly.
3157         (mark_overriders): Likewise.
3158         (warn_hidden): Likewise.
3159         (build_vtbl_initializer): Reorganize machinery for building things
3160         at negative offsets.
3161         (build_vcall_and_vbase_vtbl_entries): Likewise.
3162         (build_vbase_offset_vtbl_entries): Likewise.
3163         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
3164         offset entries.  Do not create two entries for functions with the
3165         same signature.
3166         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
3167         (build_rtti_vtbl_entries): Reorganize machinery for building things
3168         at negative offsets.
3170         * optimize.c (expand_call_inline): Don't recurse into the code
3171         used to initialize the parameters more than once.
3173 2000-06-11  Mark Mitchell <mark@codesourcery.com>
3175         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
3176         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
3177         (find_substitution): Only use the `Sa' substitution for
3178         std::allocator, not instantiations of it.
3179         (write_template_prefix): Move comment.  Only use a TREE_LIST to
3180         represent substitutions for a member template.
3181         (write_array_type): Mangle array dimensions correctly.
3182         * optimize.c (maybe_clone_body): Copy more information from the
3183         cloned function.
3184         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
3185         on the regenerated declaration.
3187 2000-06-11  Chip Salzenberg  <chip@valinux.com>
3188             Mark Mitchell <mark@codesourcery.com>
3190         * class.c (build_vtable): Clarify comment.
3191         (build_ctor_vtbl_group): Pass the most derived type to
3192         build_vtable.
3194 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3196         * decl2.c (compare_options): Don't needlessly cast away const-ness.
3198 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
3200         * decl.c (add_binding): Handle duplicate declarations of external
3201         variables.
3203 2000-06-09  Chip Salzenberg  <chip@valinux.com>
3204             Mark Mitchell <mark@codesourcery.com>
3206         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
3207         argument.
3208         (write_signed_number): New macro.
3209         (write_unsigned_number): Likewise.
3210         (write_source_name): Use them.
3211         (write_number): Handle signed and unsigned values.
3212         (write_integer_cst): Use tree_int_cst_sgn, and use
3213         write_unsigned_number or write_signed_number as appropriate.
3214         (write_discriminator): Use write_unsigned_number or
3215         write_signed_number as appropriate.
3216         (write_template_arg_literal): Likewise.
3217         (write_array_type): Use tree_low_cst.
3218         (write_template_parm):  Use write_unsigned_number or
3219         write_signed_number as appropriate.
3220         (write_substitution): Adjust call to write_number.
3221         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
3222         (write_expression): Handle non-type template arguments of
3223         reference type correctly.
3224         (mangle_thunk): Use write_signed_number.
3226 2000-06-09  Chip Salzenberg  <chip@valinux.com>
3228         * mangle.c (find_substition): Don't mangle objects with typename
3229         substitutions (e.g. "cin" as "Si").
3231 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
3233         * call.c (add_candidate): Use ggc_alloc_cleared.
3234         * decl.c (lookup_label): Likewise.
3235         * lex.c (retrofit_lang_decl): Likewise.
3237 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
3239         * semantics.c (expand_body): Push to TV_EXPAND.
3240         * optimize.c (optimize_function): Push to TV_INTEGRATION.
3241         * decl.c (start_function): Always call announce_function.
3243         * tinfo2.cc: Just declare abort.
3245 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
3247         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
3248         whenever @ is a symbolic name.
3250 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
3252         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
3254 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
3256         * decl.c (pushdecl): Look up functions by DECL_NAME, not
3257         DECL_ASSEMBLER_NAME.
3259 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
3261         * decl2.c (c_language): Define.
3263 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
3265         * lex.c (lang_init_options): Tweak.
3267         * decl2.c: Remove #inclusion of diagnostic.h
3268         (lang_decode_option): Move diagnostic formatting options to
3269         toplevel.
3271         * lang-options.h: Remove documentation for diagnostic options.
3273         * Makefile.in (lex.o): Depends upon diagnostic.h
3275 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
3277         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
3278         the same DECL_RESULT, it's not a redefinition.
3279         * pt.c (tsubst_decl): Remove code to handle illegal
3280         specializations.
3282 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
3284         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
3286 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
3288         * search.c (maybe_suppress_debug_info): Don't check
3289         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
3291         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
3292         here if extern_p.
3294         Remember instantiation context in deferred instantiations.
3295         * cp-tree.h (struct tinst_level): Remove.
3296         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
3297         * pt.c (current_tinst_level): Now a tree.
3298         (print_template_context, push_tinst_level, pop_tinst_level,
3299         tinst_for_decl): Adjust.
3300         (reopen_tinst_level): New fn.
3301         (init_pt): Register current_tinst_level as a root.
3302         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
3303         of the pending templates list.
3304         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
3305         * lex.c (extract_interface_info): Adjust.
3306         * decl2.c (warn_if_unknown_interface): Adjust.
3308 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
3310         * class.c (indirect_primary_base_p): New function.
3311         (determine_primary_base): Use it.
3313 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3315         Update new-abi dynamic cast algorithm.
3316         * tinfo.cc (__class_type_info::__dyncast_result): Add
3317         whole_details. Adjust constructor.
3318         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
3319         Avoid unnecessary searching.
3320         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
3322 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3324         * decl.c (init_decl_processing): Don't call record_component_aliases.
3325         * tree.c (build_cplus_array_type_1): Likewise.
3327 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
3329         * ir.texi: Correct typo.
3330         * mangle.c (write_expression): Handle non-type template arguments
3331         with reference type.
3332         * method.c (build_overload_value): Likewise.
3333         * pt.c (convert_nontype_argument): Explicitly represent conversion
3334         to a reference with an ADDR_EXPR.
3335         (unify): Always unify arguments in left-to-right order.
3337 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
3338             Mark Mitchell  <mark@codesourcery.com>
3340         * Make-lang.in (CXX_SRCS): Add mangle.c.
3341         * Makefile.in (CXX_OBJS): Add mangle.o.
3342         (mangle.o): New rule.
3344         * class.c (local_classes): New variable.
3345         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
3346         (get_vtt_name): Use mangle_vtt_name for new ABI.
3347         (init_class_processing): Initialize local_classes.
3348         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
3349         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
3350         (std_identifier): New macro.
3351         (DECL_VOLATILE_MEMFUNC_P): New macro.
3352         (DECL_NAMESPACE_STD_P): Likewise.
3353         (local_classes): Declare.
3354         (get_mostly_instantiated_function_type): Declare.
3355         (init_mangle): Declare.
3356         (mangle_decl): Likewise.
3357         (mangle_type_string): Likewise.
3358         (mangle_type): Likewise.
3359         (mangle_typeinfo_for_type): Likewise.
3360         (mangle_typeinfo_string_for_type): Likewise.
3361         (mangle_vtbl_for_type): Likewise.
3362         (mangle_vtt_for_type): Likewise.
3363         (mangle_ctor_vtbl_for_type): Likewise.
3364         (mangle_thunk): Likewise.
3365         (mangle_conv_op_name_for_type): Likewise.
3366         (mangle_guard_variable): Likewise.
3367         * decl.c (pushtag): Keep track of local classes.
3368         (initialize_predefined_identifiers): Initialize std_identifier.
3369         (init_decl_processing): Use std_identifier.
3370         (start_decl): Don't treat instantiations as specializations.
3371         (grokdeclarator): Likewise.
3372         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
3373         name for fully-instantiated templates.
3374         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
3375         destructors with the new ABI.
3376         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
3377         (grokfield): Use mangle_type for new ABI.
3378         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
3379         (get_sentry): Use mangle_guard_variable for new ABI.
3380         (start_static_initialization_or_destruction): Likewise.
3381         * expr.c (extract_aggr_init): Remove.
3382         (extract_scalar_init): Likewise.
3383         (extract_init): Remove #if 0'd code.
3384         * mangle.c: New function.
3385         * method.c (build_mangled_name): Assert not flag_new_abi.
3386         (build_static_name): Likewise.
3387         (build_decl_overload_real): Likewise.
3388         (build_typename_overload): Likewise.
3389         (build_overload_with_type): Likewise.
3390         (build_overload_name): Likewise.
3391         (get_ctor_vtbl_name): Likewise.
3392         (start_squangling): Likewise.
3393         (get_id_2): Likewise.
3394         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
3395         (init_method): Call init_mangle for new ABI.
3396         (make_thunk): Call mangle_thunk for new ABI.
3397         * operators.def: Correct new ABI manglings for the `%' operator.
3398         Add `::' operator.
3399         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
3400         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
3401         (lookup_template_class): Call mangle_decl for new ABI.
3402         (get_mostly_instantiated_function_type): New function.
3403         (set_mangled_name_for_template_decl): Use it.
3404         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
3405         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
3406         conversion op names.
3407         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
3408         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
3409         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
3410         mangle_typeinfo_string_for_type.
3412 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
3414         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
3415         (INNERMOST_TEMPLATE_ARGS): New macro.
3416         (innermost_args): Remove.
3417         (get_innermost_template_args): New function.
3418         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
3419         * error.c (dump_function_decl): Be caution when using
3420         most_general_template.
3421         * method.c (build_template_parm_names):  Use
3422         INNERMOST_TEMPLATE_ARGS.
3423         * pt.c (add_to_template_args): Tidy comment
3424         (get_innermost_template_args): New function.
3425         (check_explicit_specialization): Clear DECL_INITIAL for a new
3426         specialization.
3427         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
3428         Tidy.
3429         (push_template_decl): Always register specializations of the most
3430         general template.
3431         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
3432         (coerce_template_parms): Likewise.
3433         (lookup_template_class): Likewise.
3434         (innermost_args): Remove.
3435         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
3436         (tsubst_decl): Handle tricky specializations.  Use
3437         get_innermost_template_args.
3438         (instantiate_template): Simplify handling of partial
3439         instantiations.
3440         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
3441         (most_general_template): Reimplement, in a more straightforward
3442         manner.
3443         (regenerate_decl_from_template): Tweak formatting.  Use
3444         TMPL_ARGS_DEPTH for clarity.
3445         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
3447         * dump.c (dequeue_and_dump): Dump information about thunks.
3449 2000-06-01  Richard Henderson  <rth@cygnus.com>
3451         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
3453 2000-06-01  Richard Henderson  <rth@cygnus.com>
3455         * decl2.c (unsupported_options): Fix typo, make const.
3456         (lang_decode_option): Fix bsearch argument order.
3458 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
3460         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
3461         on FIELD_DECLs.
3463 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3465         * cp-tree.h (c_get_alias_set): Deleted.
3466         * Makefile.in (decl.o): Include ../expr.h.
3467         * decl.c (expr.h): Include.
3468         (init_decl_processing): Call record_component_aliases for arrays.
3469         (grokdeclarator): Likewise.
3470         Set TREE_ADDRESSABLE for fields that aren't bitfields.
3471         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
3473 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
3475         Remove guiding declaration support.
3476         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
3477         (flag_guiding_decls): Remove.
3478         * call.c (build_user_type_conversion_1): Remove support for
3479         guiding decls.
3480         (build_new_function_call): Likewise.
3481         (build_new_op): Likewise.
3482         (build_new_method_call): Likewise.
3483         * decl.c (start_function): Likewise.
3484         * friend.c (is_friend): Likewise.
3485         (do_friend): Likewise.
3486         * decl2.c ((flag_dump_translation_unit): Make it const.
3487         (flag_guiding_decls): Remove.
3488         (unsupported_options): New variable
3489         (compare_options): New function.
3490         (lang_decode_option): Use them.
3492         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
3494         * method.c (mangle_expression): Adjust test for legal expression
3495         operators.
3497         * pt.c (instantiate_decl): Save and restore the local
3498         specializations list.
3500 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
3502         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
3504 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
3506         * call.c (add_template_candidate_real): Handle member template
3507         constructors for classes with virtual bases.
3508         (build_user_type_conversion_1): Use in_charge_arg_for_name.
3509         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
3511         * ir.texi: Update thunk documentation.
3513         * call.c (joust): Fix handling of overloaded builtin operators.
3515 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
3517         * cp-tree.h (DECL_ANTICIPATED): New macro.
3518         Document new use of DECL_LANG_FLAG_7.
3519         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
3520         in the user namespace.
3521         * lex.c (do_identifier): If the identifier's declaration has
3522         DECL_ANTICIPATED on, it has not yet been declared.  But do not
3523         replace it with an ordinary implicit declaration.
3525         * tinfo2.cc: Include stdlib.h.
3527 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
3529         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
3530         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
3531         CLASSTYPE_ALIGN.
3533 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
3535         * decl2.c (lang_decode_option): Use skip_leading_substring instead
3536         of plain strncmp.
3538 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
3540         * operators.def (<?): Duplicated, should have been...
3541         (>?): this.  Fixed.
3543 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
3544             Mark Mitchell  <mark@codesourcery.com>
3546         * cp-tree.h (ansi_opname): Make it a macro.
3547         (ansi_assopname): Likewise.
3548         (struct lang_decl_flags): Add assignment_operator_p.
3549         (struct lang_decl): Add operator_code.
3550         (DECL_VTT_PARM): Adjust.
3551         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
3552         overloaded operator.
3553         (SET_OVERLOADED_OPERATOR_CODE): New macro.
3554         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
3555         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
3556         (opname_tab): Remove.
3557         (assignop_tab): Likewise.
3558         (operator_name_info_t): New type.
3559         (operator_name_info): New variable.
3560         (assignment_operator_name_info): Likewise.
3561         (build_cp_library_fn): Remove declaration.
3562         (push_cp_library_fn): Likewise.
3563         (operator_name_string): Likewise.
3564         (build_decl_overload): Likewise.
3565         * call.c (print_z_candidates): Simplify.
3566         (build_object_call): Adjust usage of ansi_opname.  Use
3567         DECL_OVERLOADED_OPERATOR_P.
3568         (op_error): Adjust operator name lookup.
3569         (build_conditional_expr): Adjust usage of ansi_opname.
3570         (build_new_op): Likewise.
3571         (build_op_delete_call): Likewise.
3572         (build_over_call): Likewise.
3573         (joust): Use DECL_OVERLOADED_OPERATOR_P.
3574         * decl.c (duplicate_decls): Copy operator_code.
3575         (init_decl_processing): Adjust parameters to push_cp_library_fn.
3576         (builtin_function): Adjust parameters to build_library_fn_1.
3577         (build_library_fn_1): Accept an overloaded operator code.
3578         (build_library_fn): Pass ERROR_MARK.
3579         (build_cp_library_fn): Accept an overloaded operator code.
3580         (push_cp_library_fn): Likewise.
3581         (grokfndecl): Tweak.
3582         (grokdeclarator): Simplify code to compute names of overloaded
3583         operators.  Adjust use of ansi_opname.
3584         (ambi_op_p): Work on tree_codes, not identifiers.
3585         (unary_op_p): Likewise.
3586         (grok_op_properties): Likewise.
3587         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
3588         (lang_mark_tree): Don't try to mark the operator_code.
3589         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
3590         * error.c (dump_decl): Remove special handling for operator
3591         names.
3592         (dump_function_name): Likewise.
3593         (dump_expr): Adjust name lookup of operators.
3594         (op_to_string): Simplify.
3595         (assop_to_string): Likewise.
3596         * init.c (build_new_1): Adjust use of ansi_opname.
3597         * lex.c (opname_tab): Remove.
3598         (assignop_tab): Likewise.
3599         (ansi_opname): Likewise.
3600         (ansi_assopname): Likewise.
3601         (operator_name_string): Likewise.
3602         (reinit_lang_specific): Likewise.
3603         (operator_name_info): New variable.
3604         (assignment_operator_name_info): Likewise.
3605         (init_operators): New function.
3606         (init_parse): Use it.
3607         (do_identifier): Adjust use of ansi_opname.
3608         * method.c (mangle_expression): Don't use ansi_opname for
3609         mangling.
3610         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
3611         (build_decl_overload): Remove.
3612         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
3613         (do_build_assign_ref): Adjust use of ansi_opname.
3614         (synthesize_method): Likewise.
3615         (implicitly_declare_fn): Likewise.
3616         * operators.def: New file.
3617         * parse.y (operator): Adjust use of ansi_opname.
3618         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
3619         (set_mangled_name_for_template_decl): Don't play games with
3620         current_namespace.
3621         (special_function_p): Adjust use of ansi_opname.
3622         * typeck.c (check_return_expr): Likewise.
3623         * Make-lang.in (cc1plus): Depend on operators.def.
3624         * Makefile.in (lex.o): Likewise.
3625         (decl.o): Likewise.
3627 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
3629         * Make-lang.in (cplib2.ready): Eradicate.
3631 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3633         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
3634         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
3635         (built_min, cp_tree_equal): Likewise.
3637 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
3639         * class.c (layout_nonempty_base_or_field): Replace
3640         `record_layout_info' with `record_layout_info_s'.
3642 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
3644         Fix goto checking.
3645         * cp-tree.h (struct language_function): x_named_labels is now
3646         a struct named_label_list*.
3647         * decl.c (struct named_label_use_list): Renamed from...
3648         (struct named_label_list): ...this.  New struct.
3649         (push_binding_level): Don't set eh_region.
3650         (note_level_for_eh): New fn.
3651         (pop_label): Take label and old value directly.
3652         (pop_labels): Adjust for new named_labels format.
3653         (lookup_label): Likewise.
3654         (poplevel): Note characteristics of a binding level containing a
3655         named label.  Mess with named label lists earlier.
3656         (mark_named_label_lists): New fn.
3657         (mark_lang_function): Call it.
3658         (use_label): New fn, split out from...
3659         (make_label_decl): ...here.  Don't call it.
3660         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
3661         check_previous_gotos): New fns, split out from...
3662         (define_label): ...here.
3663         (check_switch_goto): New fn.
3664         (define_case_label): Call it.
3665         (check_goto): New fn.
3666         * semantics.c (finish_goto_stmt): Call it and use_label.
3667         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
3668         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
3670 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
3672         * class.c (build_vtable_entry_ref): Correct usage of
3673         get_vtbl_decl_for_binfo.
3675         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
3676         * method.c (implicitly_declare_fn): Not here.
3678 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
3680         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
3681         (CPTI_PTMD_DESC_TYPE): ... here.
3682         (ptmd_desc_type_node): Rename to ...
3683         (ptm_desc_type_node): ... here.
3684         * decl.c: Likewise.
3685         * rtti.c (ptmd_initializer): Rename to ...
3686         (ptm_initializer): ... here.
3687         (sythesize_tinfo_var): Adjust. Deal with pointer to member
3688         function.
3689         (create_tinfo_types): Adjust.
3691 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
3693         Finish implementation of VTTs.
3694         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
3695         CPTI_VTT_PARM_IDENTIFIER.
3696         (vtt_parm_identifier): New macro.
3697         (vtt_parm_type): Likewise.
3698         (BINFO_SUBVTT_INDEX): Likewise.
3699         (BINFO_VPTR_INDEX): Likewise.
3700         (struct lang_decl): Add vtt_parm.
3701         (DECL_VTT_PARM): New macro.
3702         (DECL_USE_VTT_PARM): Likewise.
3703         (DECL_NEEDS_VTT_PARM_P): Likewise.
3704         (get_vtt_name): Declare.
3705         (build_artifical_parm): Likewise.
3706         (fixup_all_virtual_upcast_offsets): Likewise.
3707         (expand_indirect_vtbls_init): Remove.
3708         * call.c (build_new_method_call): Pass the vtt to subobject
3709         constructors and destructors.
3710         * class.c (get_vtt_name): Give it external linkage.
3711         (build_clone): Handle the magic VTT parameters for clones.
3712         (clone_function_decl): Fix typo in comment.
3713         (build_vtt): Keep track of the indices in the VTTs where various
3714         entities are stored.
3715         (build_vtt_inits): Likewise.
3716         (dfs_build_vtt_inits): Likewise.
3717         (build_ctor_vtbl_group): Tweak type of construction vtables.
3718         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
3719         primary bases, when building construction vtables.
3720         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
3721         (initialize_predefined_identifiers): Add vtt_parm_identifier.
3722         (init_decl_processing): Initialize vtt_parm_type.
3723         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
3724         (lang_mark_tree): Make vtt_parm.
3725         * decl2.c (build_artificial_parm): New function.
3726         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
3727         (grokclassfn): Use build_artificial_parm.
3728         * init.c (initialize_vtbl_ptrs): Call
3729         fixup_all_virtual_upcast_offsets directly.
3730         (perform_member_init): Use the complete subobject destructor for
3731         member cleanups.
3732         (build_vtbl_address): New function.
3733         (expand_virtual_init): Handle VTTs.
3734         * optimize (maybe_clone_body): Likewise.
3735         * search.c (fixup_all_virtual_upcast_offsets): Give it external
3736         linkage.
3737         (expand_indirect_vtbls_init): Remove.
3738         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
3739         * tree.c (make_binfo): Make them bigger.
3741 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
3743         * inc/cxxabi.h (__pbase_type_info): Define, based on
3744         __pointer_type_info.
3745         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
3746         (__pointer_to_member_type_info): Likewise.
3747         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
3748         (__pointer_to_member_type_info::__is_pointer_p): Remove.
3749         (__pointer_type_info::__do_catch): Rename to ...
3750         (__pbase_type_info::__do_catch): ... here. Adjust.
3751         (__pbase_type_info::__pointer_catch): Implement.
3752         (__pointer_type_info::__pointer_catch): Adjust.
3753         (__pointer_to_member_type_info::__pointer_catch): Adjust.
3755 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
3757         * tinfo.h (__user_type_info::contained_virtual_p): New
3758         predicate.
3759         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
3760         shaped heirarchy.
3761         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
3762         diamond shaped heirarchy. Add early out for mixed diamond and
3763         duplicate shaped heirarchy.
3765 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
3767         * cp-tree.h (build_delete): Change prototype.
3768         (build_vec_delete): Likewise.
3769         * call.c (build_scoped_method_call): Use special_function_kind
3770         values to indicate the kind of destruction to be done.
3771         (build_method_call): Likewise.
3772         * decl.c (finish_destructor_body): Likewise.
3773         (maybe_build_cleanup_1): Likewise.  Rename to ...
3774         (maybe_build_cleanup): ... this.
3775         * decl2.c (delete_sanity): Use special_function_kind
3776         values to indicate the kind of destruction to be done.
3777         (build_cleanup): Likewise.
3778         * init.c (perform_member_init): Likewise.
3779         (build_vec_delete_1): Likewise.
3780         (build_dtor_call): Simplify.
3781         (build_delete): Use special_function_kind
3782         values to indicate the kind of destruction to be done.
3783         (build_vbase_delete): Likewise.
3784         (build_vec_delete): Likewise.
3786         * init.c (sort_member_init): Fix typo in error message generation
3787         code.
3789 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
3791         * semantics.c (begin_class_definition): make the packed
3792         attribute be sensitive to the "-fpack-struct" command line flag
3794 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
3796         Update new-abi upcast algorithm.
3797         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
3798         prototype and meaning of return value.
3799         (__si_class_type_info::__do_upcast): Likewise.
3800         (__vmi_class_type_info::__do_upcast): Likewise.
3801         * tinfo.cc (__class_type_info::__upcast_result): Replace
3802         whole2dst with part2dst. Adjust ctor.
3803         (__class_type_info::__do_upcast): Adjust call of worker function.
3804         (__class_type_info::__do_upcast): Adjust.
3805         (__si_class_type_info::__do_upcast): Adjust. Use parent's
3806         __do_upcast.
3807         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
3808         virtual base in diamond heirarchy bug.
3810 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
3812         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
3813         and bitfield to tinfo_fn_p.
3814         (DECL_TINFO_FN_P): Adjust.
3815         (SET_DECL_TINFO_FN_P): Likewise.
3816         (DECL_MUTABLE_P): Likewise.
3817         (DECL_C_BIT_FIELD): Likewise.
3818         (SET_DECL_C_BIT_FIELD): Likewise.
3819         (CLEAR_DECL_C_BIT_FIELD): Likewise.
3820         (DECL_UNINLINABLE): Likewise.
3821         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
3822         (handle_using_decl): Remove assertion.
3823         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
3824         to build FIELD_DECLs.
3825         (build_base_field): Likewise.
3826         (layout_class_type): Likewise.
3827         * decl.c (init_decl_processing): Likewise.
3828         (build_ptrmemfunc_type): Likewise.
3829         (grokdeclarator): Likewise.
3830         * decl2.c (grok_x_components): Likewise.
3831         * except.c (call_eh_info): Likewise.
3832         * init.c (init_init_processing): Likewise.
3833         * rtti.c (expand_class_desc): Likewise.
3834         (create_pseudo_type_info): Likewise.
3835         (get_vmi_pseudo_type_info): Likewise.
3836         (create_tinfo_types): Likewise.
3837         * ptree.c (print_lang_decl): Adjust.
3838         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
3839         before checking DECL_MUTABLE_P.
3841         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
3842         parameters for template functions.
3843         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
3844         destructors as well as constructors.
3846 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
3848         * class.c (build_ctor_vtbl_group): Set inits.
3849         * optimize.c (maybe_clone_body): Set DECL_INLINE and
3850         DECL_THIS_INLINE appropriately for clones.
3852         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
3853         (DECL_CONV_FN_P): Simplify.
3854         (DECL_OPERATOR): Remove.
3855         (language_to_string): Declare.
3856         * decl.c (duplicate_decls): Fix typo in comment.
3857         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
3858         (grok_op_properties): Use DECL_CONV_FN_P instead of
3859         IDENTIFIER_TYPENAME_P.
3860         * dump.c (dequeue_and_dump): Dump the language linkage of
3861         declarations.
3862         * error.c (language_to_string): Give it external linkage.
3863         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
3864         (implicitly_declare_fn): Set DECL_LANGUAGE.
3865         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
3866         IDENTIFIER_TYPENAME_P.
3867         (tsubst_decl): Likewise.
3868         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
3869         * semantics.c (finish_member_declaration): Don't mark members of
3870         classes declared in an extern "C" region as extern "C".
3872 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3874         * decl2.c (qualified_lookup_using_namespace): Look through
3875         namespace aliases.
3877         * decl.c (push_using_decl): Return the old decl on namespace level.
3879 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
3881         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
3882         (VTT_NAME_PREFIX): New macro.
3883         (CTOR_VTBL_NAME_PREFIX): Likewise.
3884         (get_ctor_vtbl_name): New function.
3885         * class.c (get_vtable_name): Simplify.
3886         (get_vtt_name): New function.
3887         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
3888         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
3889         when a virtual base becomes primary.
3890         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
3891         VTTs.
3892         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
3893         additional parameters.
3894         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
3895         (initialize_array): New function.
3896         (build_vtt): Likewise.
3897         (build_vtt_inits): Likewise.
3898         (dfs_build_vtt_inits): Likewise.
3899         (dfs_fixup_binfo_vtbls): Likewise.
3900         (build_ctor_vtbl_group): Likewise.
3901         (initialize_vtable): Use initialize_array.
3902         (accumulate_vtbl_inits): Reimplement to handle construction
3903         vtables.
3904         (dfs_accumulate_vtbl_inits): Likewise.
3905         (bulid_vtbl_initializer): Adjust parameter name.
3906         * method.c (build_typename_overload): Remove #if 0'd code.
3907         (get_ctor_vtbl_name): New function.
3908         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
3909         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
3911         * cp-tree.h (struct lang_type): Remove search_slot.
3912         (CLASSTYPE_SEARCH_SLOT): Remove.
3913         (emit_base_init): Change prototype.
3914         (initialize_vtbl_ptrs): Likewise.
3915         (expand_indirect_vtbls_init): Likewise.
3916         (clear_search_slots): Remove.
3917         * decl.c (lang_mark_tree): Don't mark search_slot.
3918         * init.c (initialize_vtbl_ptrs): Simplify.
3919         (emit_base_init): Likewise.
3920         * search.c (struct vbase_info): Document decl_ptr.
3921         (convert_pointer_to_single_level): Remove.
3922         (dfs_find_vbases): Remove.
3923         (dfs_init_base_pointers): Simplify.
3924         (dfs_clear_vbase_slots): Remove.
3925         (dfs_vtable_path_unmark): New function.
3926         (init_vbase_pointers): Simplify.
3927         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
3928         (expand_indirect_vtbls_init): Simplify.  Don't call
3929         mark_all_temps_used.
3930         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
3931         initialize_vtbl_ptrs.
3933 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
3935         * except.c: Add static prototypes.
3937 2000-05-20  H.J. Lu  <hjl@gnu.org>
3939         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
3941 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
3943         Don't create a separate copy of virtual bases for the
3944         CLASSTYPE_VBASECLASSES list.
3945         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
3946         (BINFO_FOR_VBASE): Remove.
3947         (CANONICAL_BINFO): Adjust.
3948         (binfo_for_vbase): New function.
3949         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
3950         instead of BINFO_FOR_VBASE.
3951         (build_vbase_pointer): Likewise.
3952         (build_secondary_vtable): Likewise.
3953         (dfs_mark_primary_bases): Likewise.
3954         (mark_primary_bases): Likewise.
3955         (layout_nonempty_base_or_field): Likewise.
3956         (dfs_set_offset_for_shared_vbases): Likewise.
3957         (dfs_set_offset_for_unshared_vbases): Likewise.
3958         (layout_virtual_bases): Likewise.  Adjust for changes to the
3959         CLASSTYPE_VBASECLASSES list.
3960         (dump_class_hierarchy_r): Use binfo_for_vbase
3961         instead of BINFO_FOR_VBASE.
3962         (dump_class_hierarchy): Likewise.
3963         (finish_vtbls): Likewise.
3964         (build_vtbl_initializer): Adjust for changes to the
3965         CLASSTYPE_VBASECLASSES list.
3966         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
3967         * decl.c (finish_destructor_body): Adjust for changes to the
3968         CLASSTYPE_VBASECLASSES list.
3969         * init.c (sort_base_init): Use binfo_for_vbase.
3970         (construct_virtual_bases): Adjust for changes to the
3971         CLASSTYPE_VBASECLASSES list.
3972         (expand_member_init): Use binfo_for_vbase.
3973         (build_vbase_delete):  Adjust for changes to the
3974         CLASSTYPE_VBASECLASSES list.
3975         * method.c (do_build_copy_constructor): Likewise.
3976         * rtti.c (get_base_offset): Use binfo_for_vbase.
3977         (expand_class_desc): Remove #if 0'd code.
3978         * search.c (struct vbase_info): Remove vbase_types.
3979         (get_base_distance):  Use binfo_for_vbase.
3980         (lookup_field_queue_p): Use CANONICAL_BINFO.
3981         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
3982         (get_pure_virtuals): Adjust for changes to the
3983         CLASSTYPE_VBASECLASSES list.
3984         (dfs_find_vbases): Use binfo_for_vbase.
3985         (dfs_init_vbase_pointers): Likewise.
3986         (init_vbase_pointers): Don't initialize vi.vbase_types.
3987         (virtual_context): Use binfo_for_vbase.
3988         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
3989         CLASSTYPE_VBASECLASSES list.
3990         (expand_indirect_vtbls_init): Simplify.
3991         (dfs_get_vbase_types): Don't replicate virtual bases.
3992         (find_vbase_instance): Use binfo_for_vbase.
3993         (binfo_for_vbase): New function.
3994         * typeck.c (get_delta_difference): Use binfo_for_vbase.
3996 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
3998         * decl2.c (finish_anon_union): Generalize error messages to handle
3999         anonymous structures.
4000         * init.c (perform_member_init): Remove `name' parameter.
4001         (build_field_list): New function.
4002         (sort_member_init): Handle anonymous union initialization order
4003         correctly.  Check for multiple initializations of the same union.
4004         (emit_base_init): Don't look up fields by name here.
4005         (expand_member_init): Record the result of name lookup for future
4006         reference.
4007         * typeck.c (build_component_ref): Fix formatting.
4009 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
4011         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
4012         * typeck.c (build_x_compound_expr): Replace warn_unused with
4013         warn_unused_value.
4015         * decl2.c (lang_decode_option): Update -Wall unused flags by
4016         calling set_Wunused.
4018 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
4020         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
4021         * init.c (dfs_vtable_path_unmark): Remove.
4022         * search.c (marked_new_vtable_p): Likewise.
4023         (unmarked_new_vtable_p): Likewise.
4024         (dfs_search_slot_nonempty_p): Likewise.
4025         (dfs_mark): Likewise.
4026         (dfs_vtable_path_unmark): Likewise.
4027         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
4028         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
4029         (dfs_init_vbase_pointers): Remove special-case new ABI code.
4030         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
4031         (init_vbase_pointers): Simplify.
4032         (expand_indirect_vtbls_init): Likewise.
4034         * class.c (copy_virtuals): New function.
4035         (build_primary_table): Use it.
4036         (build_secondary_vtable): Likewise.
4037         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
4038         indicate that no vcall offset is required.
4039         (add_virtual_function): Likewise.
4040         (modify_all_vtables): Likewise.
4041         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
4042         (dfs_accumulate_vtbl_inits): Likewise.
4043         (build_vtbl_initializer): Make changes to handle construction
4044         vtables.
4045         (dfs_build_vcall_offset_vtbl_entries): Likewise.
4046         (build_rtti_vtbl_entries): Likewise.
4047         (build_vtable_entries): Handle a NULL vcall_index.
4049 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4051         * decl2.c (lang_decode_option): Fix thinko.
4053 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
4055         * except.c (check_handlers): New fn.
4056         * cp-tree.h: Declare it.
4057         * semantics.c (finish_handler_sequence): Call it.
4058         (finish_function_handler_sequence): Likewise.
4059         (finish_handler_parms): Set TREE_TYPE on the handler.
4060         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
4061         * search.c (get_base_distance_recursive): If protect>1, ignore
4062         special access.
4063         (get_base_distance): Don't reduce watch_access.
4065 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
4067         * lex.c: #include diagnostic.h.
4068         (lang_init_options): Set default prefixing rules.
4070         * lang-options.h: Add -fdiagnostics-show-location=.
4072         * decl2.c: #include diagnostic.h.
4073         (lang_decode_option): Handle -fdiagnostics-show-location=.
4075 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
4077         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
4078         * vec.cc: Revert my 2000-05-07 change.
4080 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
4082         * class.c (check_field_decls): Complain about non-static data
4083         members with same name as class in class with constructor.
4085 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
4087         * decl.c (grokdeclarator): Allow non-static data members with
4088         same name as class.
4090 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
4092         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
4093         and pending_inline.filename.  Update prototypes.
4094         * decl.c (define_label): Constify filename parameter.
4095         * decl2.c (warn_if_unknown_interface): Constify local char *.
4096         * input.c Constify input_source.filename. Don't declare
4097         input_filename or lineno.  Constify filename parameter to feed_input.
4098         * lex.c (init_parse): Constify parameter and return value.
4099         (cp_pragma_interface, cp_pragma_implementation): Constify
4100         filename argument.
4101         (reinit_parse_for_method, reinit_parse_for_block,
4102         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
4103         Constify local char *.
4104         * pt.c: Don't declare lineno or input_filename.
4105         (print_template_context, tsubst_friend_function, tsubst_decl,
4106         tsubst, instantiate_decl): Constify local char *.
4107         * semantics.c (expand_body): Constify local char *.
4108         * tree.c (build_srcloc): Constify filename parameter.
4109         * typeck.c (c_expand_asm_operands): Constify filename
4110         parameter.
4112 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
4114         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
4115         offsetof expansion.
4117 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
4119         * inc/cxxabi.h:  Fix typos in comment.
4120         (__base_class_info::__offset): Use a static_cast.
4122 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
4124         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
4125         of std::size_t and std::ptrdiff_t respectively.
4126         * tinfo.cc: Likewise.
4127         * vec.cc: Likewise.
4129 2000-05-06  Richard Henderson  <rth@cygnus.com>
4131         * typeck.c (build_c_cast): Don't warn integer->pointer size
4132         mismatch for constants.
4134 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
4136         * rtti.c (ptmd_initializer): Set non-public, if class is
4137         incomplete.
4139         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
4140         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4141         __cxa_vec_delete): Likewise.
4142         * tinfo.cc (__dynamic_cast): Likewise.
4143         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4144         __cxa_vec_delete): Likewise.
4146 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
4148         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
4149         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
4150         (lang_decl_flags): Add vcall_offset.
4151         (THUNK_VCALL_OFFSET): Use it.
4152         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
4153         * method.c (make_thunk): Create the lang_decl here, not in
4154         emit_thunk.
4155         (emit_thunk): Make generic thunks into ordinary functions once
4156         they have been fed to expand_body.
4157         * semantics.c (expand_body): Set current_function_is_thunk here.
4159 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4161         * class.c (update_vtable_entry_for_fn): Prototype.
4163         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
4164         and `tmpl'.
4166         * search.c (dfs_build_inheritance_graph_order): Prototype.
4168 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
4170         * cp-tree.h (special_function_kind): Add various kinds of
4171         destructors.
4172         (special_function_p): New function.
4173         * class.c (overrides): Don't let one kind of destructor override
4174         another.
4175         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
4176         whether or not to instantiate a template.
4177         * tree.c (special_function_p): Define.
4179 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
4181         * cp-tree.def (THUNK_DECL): Remove.
4182         * cp-tree.h (DECL_THUNK_P): New macro.
4183         (DECL_NON_THUNK_FUNCTION_P): Likewise.
4184         (DECL_EXTERN_C_FUNCTION_P): Likewise.
4185         (SET_DECL_THUNK_P): Likewise.
4186         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
4187         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
4188         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
4189         * decl.c (decls_match): Use DECL_EXTERN_C_P.
4190         (duplicate_decls): Likewise.
4191         (pushdecl): Likewise.  Adjust thunk handling.
4192         (grokfndecl): Use DECL_EXTERN_C_P.
4193         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
4194         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
4195         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
4196         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
4197         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
4198         DECL_NO_STATIC_CHAIN.
4199         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
4200         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
4201         * search.c (covariant_return_p): Remove THUNK_DECL handling.
4202         * ir.texi: Update.
4204 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
4206         * tree.c (walk_tree): Set lineno.
4208 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
4210         * exception.cc: Update license notice.
4211         * new.cc: Likewise.
4212         * new1.cc: Likewise.
4213         * new2.cc: Likewise.
4214         * tinfo.cc: Likewise.
4215         * tinfo2.cc: Likewise.
4216         * vec.cc: Likewise.
4217         * inc/cxxabi.h: Likewise.
4218         * inc/exception: Likewise.
4219         * inc/new: Likewise.
4220         * inc/new.h: Likewise.
4221         * inc/typeinfo: Likewise.
4223 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
4225         * tree.c (build_target_expr_with_type): If we already have a
4226         TARGET_EXPR, just return it.
4228         * optimize.c (initialize_inlined_parameters): Don't generate an
4229         EXPR_STMT if we can just use DECL_INITIAL.
4230         * decl.c (emit_local_var): Only make the initialization a
4231         full-expression if stmts_are_full_exprs_p.
4233 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
4235         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
4236         macro.
4237         * call.c (standard_conversion): Use it.
4238         (direct_reference_binding): Likewise.
4239         (build_over_call): Likewise.
4240         (is_properly_derived_from): Likewise.
4241         (compare_ics): Likewise.
4242         * class.c (resolves_to_fixed_type_p): Likewise.
4243         * optimize.c (declare_return_variable): Likewise.
4244         * pt.c (is_specialization_of): Likewise.
4245         (unify): Likewise.
4246         * typeck.c (comp_target_parms): Likeiwse.
4247         (build_static_cast): Likewise.
4248         (build_reinterpret_cast): Likewise.
4249         (build_const_cast): Likewise.
4250         (comp_ptr_ttypes_real): Likewise.
4251         (comp_ptr_ttypes_const): Likewise.
4252         * typeck2.c (process_init_constructor): Likewise.
4254 2000-04-30  Scott Snyder <snyder@fnal.gov>
4256         * decl.c (finish_destructor_body): Use the base destructor when
4257         destroying virtual bases.
4259 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
4261         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
4262         STMT_EXPRs.
4263         * optimize.c (struct inline_data): Add target_exprs field.
4264         (declare_return_variable): When a function returns an aggregate,
4265         use the variable declared in the TARGET_EXPR as the remapped
4266         DECL_RESULT.
4267         (expand_call_inline): Update the pending target_exprs stack.
4268         (optimize_function): Initialize the stack.
4270         * decl2.c (finish_file): Fix typo in comment.
4272         * method.c (emit_thunk): Don't try to return a `void' value.
4274         * optimize.c (initialize_inlined_parameters): If the parameter is
4275         addressable, we need to make a new VAR_DECL, even if the
4276         initializer is constant.
4278 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
4280         * decl.c (grok_op_properties): Add an extra check of argtypes.
4282 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
4284         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
4285         variables.
4286         (initialize_inlined_parameters): Try to avoid creating new
4287         VAR_DECLs.
4289 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
4291         * lex.c (my_get_run_time): Remove.
4292         (init_filename_times): Use get_run_time instead of my_get_run_time.
4293         (check_newline): Likewise.
4294         (dump_time_statistics): Likewise.
4295         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
4296         of computing elapsed time explicitly.
4298 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
4300         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
4301         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
4302         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
4303         before calling decl_constant_value.
4304         * class.c (check_bitfield_decl): Likewise.
4305         * cvt.c (ocp_convert): Likewise.
4306         (convert): Likewise.
4307         * decl.c (compute_array_index_type): Likewise.
4308         (build_enumerator): Likewise.
4309         * decl2.c (check_cp_case_value): Likewise.
4310         * pt.c (convert_nontype_argument): Likewise.
4311         (tsubst): Likewise.
4312         * typeck.c (decay_conversion): Likewise.
4313         (build_compound_expr): Likewise.
4314         (build_reinterpret_cast): Likewise.
4315         (build_c_cast): Likewise.
4316         (convert_for_assignment): Likewise.
4318 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
4320         * decl.c (finish_function): Don't play games with DECL_INLINE.
4322 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
4324         * ir.texi: Correct typo.
4326 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4328         * decl.c (grokdeclarator): Reject VLAs as members.
4330 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
4332         * call.c (standard_conversion): Accept conversion between
4333         COMPLEX_TYPEs.
4335         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
4337 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
4339         * decl2.c (finish_file): Remove double setup for accounting
4340         compile time.
4342 2000-04-24  Robert Lipe <robertlipe@usa.net>
4344         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
4346 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
4348         * new.cc (set_new_handler): Needs to be in std::.
4350 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
4352         * cp-tree.h (lang_decl): Remove pretty_function_p.
4353         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
4354         language-specific node.
4355         * decl.c (cp_make_fname_decl): Use build_decl, not
4356         build_lang_decl, to build the variables.
4357         (grokvardecl): Don't call build_lang_decl for local variables in
4358         templates.
4359         (grokdeclarator): Don't call build_lang_decl for local type
4360         declarations in templates.
4361         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
4362         zero'd memory, rather than calling memset.
4363         * pt.c: Include hashtab.h.
4364         (local_specializations): New variable.
4365         (retrieve_local_specialization): Use it.
4366         (register_local_specialization): Likewise.
4367         (tsubst_decl): Don't assume local variables have
4368         DECL_LANG_SPECIFIC.
4369         (instantiate_decl): Set up local_specializations.
4370         * Makefile.in (HTAB_H): New variable.
4372 2000-04-23  Richard Henderson  <rth@cygnus.com>
4374         * typeck.c (c_expand_asm_operands): Restore the original
4375         contents of the output list.
4377 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
4379         * ir.texi:  Document complex number representation.
4381 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4383         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
4384         (target_incomplete_p): New function.
4385         (tinfo_base_init): Create comdat NTBS name variable.
4386         (ptr_initializer): Add non_public parameter. Calculate it.
4387         (ptmd_initializer): Likewise.
4388         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
4389         (create_real_tinfo_var): Add non_public parameter. Use it.
4390         Push proxy into global namespace.
4391         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
4392         New enumeration.
4393         * inc/typeinfo (type_info::before, type_info::operator==):
4394         Compare __name addresses.
4396         * tinfo2.cc: Remove new-abi builtins comment.
4398 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
4400         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
4402         * call.c (joust): Exit early if we get the same function, too.
4404         * decl2.c (key_method): Return NULL_TREE for template classes.
4405         (import_export_class): Don't need to check for template classes.
4407 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
4409         * lex.c: Remove references to cccp.c.
4411 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
4413         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
4414         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
4415         (DECL_DESTRUCTOR_P): Use destructor_attr.
4416         (DECL_CONST_MEMFUNC_P): Reimplement.
4417         (DECL_VOLATILE_MEMFUNC_P): Remove.
4418         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
4419         (overrides): Use DECL_DESTRUCTOR_P.
4420         (check_for_override): Likewise.
4421         * decl.c (start_function): Likewise.
4422         * decl2.c (grokfclassfn): Likewise.
4423         (check_classfn): Likewise.
4424         (grok_function_init): Likewise.
4426 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
4428         * decl2.c (grokfield): Issue error on illegal data member
4429         declaration.
4431 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
4433         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
4435 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
4437         * class.c (build_vtable_entry): Don't build thunks for type-info
4438         functions.
4440 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
4442         * decl.c (decls_match): Allow a redeclaration of a builtin to
4443         specify args while the builtin did not.
4445 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
4447         * cp-tree.def (THUNK_DECL): Add to documentation.
4448         * cp-tree.h (flag_huge_objects): Declare.
4449         * class.c (modify_vtable_entry): Tidy.
4450         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
4451         Calculate delta appropriately for the new ABI.
4452         (dfs_modify_vtables): Use it.
4453         (modify_all_vtables): Fix thinko in code to add overriding copies
4454         of functions to primary vtables.
4455         (build_clone): Fix typo in comment.
4456         (clone_function_decl): Correct order of destructors in vtable.
4457         (build_vbase_offset_vtbl_entries): Adjust comment.
4458         (dfs_vcall_offset_queue_p): Remove.
4459         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
4460         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
4461         (build_vtable_entry): Correct check for pure virtual functions.
4462         Don't declare flag_huge_objects.
4463         * decl.c (flag_huge_objects): Remove declaration.
4464         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
4465         Use int_size_in_bytes.
4466         (emit_thunk): Handle vcall offset thunks.
4468 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4470         * decl2.c (parse_time, varconst_time): Delete declarations.
4471         (finish_file): Delete LINENO declaration.
4472         START_TIME and THIS_TIME now long.
4474 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
4476         * class.c (build_base_field): Reformat comment.
4478         * inc/cxxabi.h (stddef.h): Comment inclusion.
4479         (__base_class_info::__offset): Comment shift.
4481 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
4483         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
4484         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
4485         (cp_push_exception_identifier): New macro.
4486         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
4487         (DECL_BASE_DESTRUCTOR_P): Likewise.
4488         (DECL_DELETING_DESTRUCTOR_P): Likewise.
4489         (get_vtbl_decl_for_binfo): Fix formatting.
4490         (in_charge_arg_for_name): New macro.
4491         (maybe_build_cleanup_and_delete): Remove declaration.
4492         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
4493         (in_charge_arg_for_name): New function.
4494         (build_new_method_call): Use it.  Handle cloned destructors.
4495         (build_clone): Don't make the base constructor virtual.
4496         Automatically defer generated functions.
4497         (clone_function_decl): Handle destructors, too.
4498         (clone_constructors_and_destructors): Likewise.
4499         (create_vtable_ptr): Don't create a vtable entry for a cloned
4500         function.
4501         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
4502         (initialize_predefined_identifiers): Update appropriately.
4503         (finish_destructor_body): Simplify.
4504         (maybe_build_cleanup_and_delete): Remove.
4505         * except.c (expand_throw): Handle new-ABI destructors.
4506         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
4507         (build_dtor_call): New function.
4508         (build_delete): Use it.  Simplify.
4509         * optimize.c (maybe_clone_body): Handle destructors.
4510         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
4512         * exception.cc (cleanup_fn): New typedef.
4513         (CALL_CLEANUP): New macro.
4514         (cp_eh_info): Use them.
4515         (__cp_push_exception): Likewise.
4516         (__cp_pop_exception): Likewise.
4518 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
4520         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
4521         (complete_dtor_identifier): New macro.
4522         (CLASSTYPE_FIRST_CONVERSION): Remove.
4523         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
4524         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
4525         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
4526         (CLASSTYPE_CONSTRUCTORS): Likewise.
4527         (CLASSTYPE_DESTRUCTORS): Likewise.
4528         (lang_decl): Add cloned_function.
4529         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
4530         (DECL_BASE_CONSTRUCTOR_P): Likewise.
4531         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
4532         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
4533         (DECL_CLONED_FUNCTION_P): Likewise.
4534         (DECL_CLONED_FUNCTION): Likewise.
4535         (clone_function_decl): Declare.
4536         (maybe_clone_body): Likewise.
4537         * call.c (build_user_type_conversion_1): Call complete object
4538         constructors in the new ABI.
4539         (build_new_method_call): Don't add in-charge parameters under the
4540         new ABI.
4541         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
4542         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
4543         CLASSTYPE_DESTRUCTOR_SLOT.
4544         (build_clone): New function.
4545         (clone_function_decl): Likewise.
4546         (clone_constructors_and_destructors): Likewise.
4547         (check_bases_and_members): Use it.
4548         * decl.c (iniitialize_predefined_identifiers): Initialize
4549         complete_dtor_identifier.
4550         (finish_function): Don't add extra code to a clone.
4551         (lang_mark_tree): Mark cloned_function.
4552         * decl2.c (mark_used): Don't bother trying to instantiate things
4553         we synthesized.
4554         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
4555         * method.c (set_mangled_name_for_decl): Don't treat clones as
4556         constructors.
4557         (synthesize_method): Sythesize cloned functions, not the clones.
4558         * optimize.c (inline_data): Update comment on ret_label.
4559         (remap_block): Don't assume DECL_INITIAL exists.
4560         (copy_body_r): Allow ret_label to be NULL.
4561         (maybe_clone_body): Define.
4562         * pt.c (tsubst_decl): Handle clones.
4563         (instantiate_clone): New function.
4564         (instantiate_template): Use it.
4565         (set_mangled_name_for_template_decl): Don't treat clones as
4566         constructors.
4567         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
4568         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
4569         * semantics.c (expand_body): Clone function bodies as necessary.
4571         * optimize.c (remap_decl): Avoid sharing structure for arrays
4572         whose size is only known at run-time.
4573         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
4575         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
4576         to has_in_charge_parm_p.
4577         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
4578         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
4579         (DECL_COPY_CONSTRUCTOR_P): New macro.
4580         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
4581         (build_user_type_conversion_1): Likewise.
4582         (convert_like_real): Likewise.
4583         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
4584         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
4585         (copy_args_p): Likewise.
4586         (grok_ctor_properties): Likewise.
4587         (start_function): Likewise.
4588         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
4589         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
4590         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
4591         * method.c (do_build_copy_constructor): Use
4592         DECL_HAS_IN_CHARGE_PARM_P.
4593         (synthesize_method): Likewise.
4594         * pt.c (instantiate_template): Remove goto.
4595         * tree.c (build_cplus_method_type): Remove mention of obstacks in
4596         comment.
4598         * cp-tre.h (finish_function): Change prototype.
4599         * decl.c (end_cleanup_fn): Adjust caller.
4600         (finish_function): Take only one parameter.
4601         * decl2.c (finish_objects): Adjust caller.
4602         (finish_static_storage_duration_function): Likewise.
4603         * method.c (emit_thunk): Likewise.
4604         * parse.y: Likewise.
4605         * parse.c: Regenerated.
4606         * pt.c (instantiate_decl): Likewise.
4607         * rtti.c (synthesize_tinfo_fn): Likewise.
4608         * semantics.c (expand_body): Likewise.
4610         * cp-tree.h (copy_decl): New function.
4611         * class.c (finish_struct_1): Use it.
4612         * lex.c (copy_decl): Define it.
4613         * pt.c (tsubst_decl): Likewise.
4614         * tree.c (copy_template_template_parm): Likewise.
4616         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
4617         has_nonpublic_assign_ref.
4618         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
4619         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
4620         * class.c (finish_struct_methods): Don't set
4621         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
4622         (interface_only): Don't declare.
4623         (interface_unknown): Likewise.
4625 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4627         * tree.h (HAVE_TEMPLATES): Remove definition.
4628         * lang-options.h (-fthis-is-variable): Remove documentation.
4630 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
4632         * class.c (instantiate_type): Handle object-relative template-id.
4634         * semantics.c (finish_expr_stmt): Call convert_to_void here.
4635         * decl.c (cplus_expand_expr_stmt): Not here.
4637         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
4638         Initialize exprtype earlier.
4640         * parse.y (fn.def1): Check for defining types in return types.
4642         * decl.c (check_tag_decl): Notice extra fundamental types.
4643         Diagnose empty decls in classes, too.
4645         * decl.c (grokdeclarator): Don't override an anonymous name if no
4646         declarator was given.
4648         * cvt.c (convert_to_void): Call resolve_offset_ref.
4650         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
4652         * decl2.c (decl_namespace): Handle getting a type.
4654         * typeck.c (build_c_cast): Re-enable warning for cast between
4655         pointer and integer of different size.
4657 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
4659         * inc/cxxabi.h (__pointer_type_info): Add restrict and
4660         incomplete flags.
4661         (__pointer_type_info::__pointer_catch): New virtual function.
4662         (__pointer_to_member_type_info): Derive from
4663         __pointer_type_info. Adjust.
4664         (__pointer_to_member_type_info::__do_catch): Remove.
4665         (__pointer_to_member_type_info::__is_pointer_p): Declare.
4666         (__pointer_to_member_type_info::__pointer_catch): Declare.
4667         * rtti.c (qualifier_flags): Add restrict flag.
4668         (ptmd_initializer): Reorder members.
4669         (create_tinfo_types): Expand comments. Reorder
4670         ptmd_desc_type_node members.
4671         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
4672         Implement.
4673         (__pointer_type_info::__do_catch): Move specific code into
4674         __pointer_catch. Call it.
4675         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
4676         specific catch checking. Fix void conversion check.
4677         (__pointer_to_member_type_info::__do_catch): Remove.
4678         (__pointer_to_member_type_info::__pointer_catch): Implement.
4680 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4682         * lex.c (init_parse): Remove traces of classof and headof.
4683         * decl2.c (flag_operator_names): Default to 1.
4684         (lang_decode_option): Do not set it for -ansi.
4686 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
4688         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
4689         (DECL_MAIN_VARIANT): Remove.
4690         * decl.c (duplicate_decls): Don't set it.
4691         (start_function): Likewise.
4692         (lang_mark_tree): Don't mark it.
4693         * decl2.c (defer_fn): Don't use it.
4694         * lex.c (retrofit_lang_decl): Don't set it.
4695         * pt.c (tsubst_decl): Likewise.
4696         * ptree.c (print_lang_decl): Don't print it.
4697         * typeck.c (mark_addressable): Don't use it.
4699 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
4701         * vec.cc: Include <new> and <exception>.
4702         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
4703         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
4704         terminate.
4705         (__cxa_vec_delete): Catch dtor exceptions.
4707 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
4709         Prepend __ to implementation defined names.
4710         * inc/typeinfo (type_info): Rename _name to __name.
4711         (type_info::type_info): Rename parameter.
4712         (type_info::operator==, type_info::operator!=,
4713         type_info::before): Likewise.
4714         (type_info::is_pointer_p, type_info::is_function_p,
4715         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
4716         parameters.
4717         * inc/cxxabi.h
4718         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
4719         (__pointer_type_info::__pointer_type_info): Likewise.
4720         (__pointer_type_info::is_pointer_p,
4721         __pointer_type_info::do_catch): Prepend __. Rename parameters.
4722         (__array_type_info::__array_type_info): Rename parameters.
4723         (__function_type_info::__function_type_info): Likewise.
4724         (__function_type_info::is_function_p): Prepend __.
4725         (__enum_type_info::__enum_type_info): Rename parameters.
4726         (__pointer_to_member_type_info::__pointer_to_member_type_info):
4727         Likewise.
4728         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
4729         parameters.
4730         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
4731         (__class_type_info::__class_type_info): Rename parameters.
4732         (__class_type_info::sub_kind): Prepend __. Adjust member names.
4733         (__class_type_info::upcast_result,
4734         __class_type_info::dyncast_result): Prepend __. Move definition
4735         into tinfo.cc.
4736         (__class_type_info::do_upcast, __class_type_info::do_catch,
4737         __class_type_info::find_public_src,
4738         __class_type_info::do_dyncast,
4739         __class_type_info::do_find_public_src): Prepend __. Rename
4740         parameters.
4741         (__si_class_type_info::__si_class_type_info): Rename parameters.
4742         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
4743         __si_class_type_info::do_find_public_src): Prepent __. Rename
4744         parameters.
4745         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
4746         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
4747         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
4748         parameters.
4749         (__dynamic_cast): Rename parameters.
4750         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
4751         type_info::do_catch, type_info::do_upcast): Prepend __.
4752         (contained_p, public_p, virtual_p, contained_public_p,
4753         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
4754         (__class_type_info::do_catch,
4755         __class_type_info::do_upcast): Prepend __. Adjust.
4756         (__class_type_info::__upcast_result,
4757         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
4758         Adjust.
4759         (__class_type_info::find_public_src): Prepend __. Adjust.
4760         (__class_type_info::do_find_public_src,
4761         __si_class_type_info::do_find_public_src,
4762         __vmi_class_type_info::do_find_public_src): Likewise.
4763         (__class_type_info::do_dyncast,
4764         __si_class_type_info::do_dyncast,
4765         __vmi_class_type_info::do_dyncast): Likewise.
4766         (__class_type_info::do_upcast,
4767         __si_class_type_info::do_upcast,
4768         __vmi_class_type_info::do_upcast): Likewise.
4769         (__dynamic_cast): Adjust.
4770         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
4771         (__function_type_info::is_function_p): Likewise.
4772         (__pointer_type_info::do_catch): Likewise. Adjust.
4773         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
4774         (__throw_type_match_rtti_2): Adjust.
4775         (__is_pointer): Adjust.
4777 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
4779         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
4780         (complete_ctor_identifier): New macro.
4781         (special_function_kind): Add sfk_copy_constructor and
4782         sfk_assignment_operator.
4783         (LOOKUP_HAS_IN_CHARGE): Remove.
4784         (cons_up_default_function): Rename to ...
4785         (implicitly_declare_fn): ... this.
4786         * call.c (build_new_method_call): Add in-charge parameters for
4787         constructors here.
4788         * class.c (add_implicitly_declared_members): Change parameter name
4789         from cant_have_assignment to cant_have_const_assignment.
4790         Replace calls to cons_up_default_function to implicitly_declare_fn.
4791         * cvt.c (ocp_convert): Use complete_ctor_identifier.
4792         * decl.c (initialize_predefined_identifiers): Initialize it.
4793         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
4794         complex expression.
4795         * init.c (expand_default_init): Don't calculate the in-charge
4796         parameter here.
4797         (build_new_1): Likewise.
4798         * lex.c (cons_up_default_function): Move to method.c.
4799         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
4800         (implicitly_declare_fn): New function.
4801         * typeck.c (build_static_cast): Use complete_ctor_identifier.
4802         (build_modify_expr): Likewise.
4803         * typeck2.c (build_functional_cast): Likewise.
4805         Under the new ABI, constructors don't return `this'.
4806         * cp-tree.h (warn_reorder): Declare.
4807         (special_function_kind): New enum.
4808         (global_base_init_list): Remove declaration.
4809         (emit_base_init): Don't return a value.
4810         (check_base_init): Don't declare.
4811         (is_aggr_typedef): Likewise.
4812         * decl.c (check_special_function_return_type): New function.
4813         (return_types): Remove.
4814         (grokdeclarator): Use check_special_function_return_type.
4815         (start_function): Don't initialize ctor_label under the new ABI.
4816         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
4817         * init.c (begin_init_stmts): Move to top of file.
4818         (finish_init_stmts): Likewise.
4819         (warn_reorder): Don't declare.
4820         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
4821         value.
4822         (check_base_init): Remove.
4823         (is_aggr_typedef): Likewise.
4824         (build_new_1): Don't use the return value of a constructor.
4825         * semantics.c (setup_vtbl_ptr): Don't use the return value
4826         of emit_base_init.
4827         * typeck.c (check_return_expr): Don't magically convert return
4828         statements into `return this' in constructors under the new ABI.
4830         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
4831         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
4832         (base_ctor_identifier): New macro.
4833         (base_dtor_identifier): Likewise.
4834         (deleting_dtor_identifier): Likewise.
4835         * decl.c: Don't include obstack.h.
4836         (obstack_chunk_alloc): Don't define.
4837         (obstack_chunk_free): Likewise.
4838         (struct predefined_identifier): New type.
4839         (initialize_predefined_identifiers): New function.
4840         (init_decl_processing): Use it.
4841         (debug_temp_inits): Remove.
4842         (start_method): Don't call preserve_data.
4843         (hack_incomplete_structures): Update comment.
4844         * init.c (init_init_processing): Don't initialize
4845         nelts_identifier.
4846         (build_offset_rf): Remove dead code.
4847         (build_delete): Use CLASSTYPE_N_BASECLASSES.
4848         * search.c (init_search_processing): Don't initialize
4849         vptr_identifier.
4851 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4853         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
4854         some sign_compare warnings.
4856 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
4858         Rename abi::__vmi_class_type_info members.
4859         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
4860         base_list, detail_masks members to vmi_flags, vmi_base_count,
4861         vmi_bases and vmi_flags_masks respectively.
4862         (__vmi_class_type_info::vmi_flags_masks): Rename
4863         details_unknown_mask to flags_unknown_mask.
4864         * tinfo.cc (__class_type_info::do_upcast): Adjust.
4865         (__vmi_class_type_info::do_find_public_src): Adjust.
4866         (__vmi_class_type_info::do_dyncast): Adjust.
4867         (__vmi_class_type_info::do_upcast): Adjust.
4869 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
4871         * tinfo.cc (convert_to_base): New function.
4872         (get_vbase_offset): Remove. Move into convert_to_base.
4873         (__vmi_class_type_info::do_find_public_src): Adjust.
4874         (__vmi_class_type_info::do_dyncast): Adjust.
4875         (__vmi_class_type_info::do_upcast): Adjust.
4877 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
4879         * tinfo.cc (operator=): Use __builtin_strcmp.
4880         * tinfo2.cc (before): Likewise.
4882 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
4884         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
4885         (DECL_SAVED_INLINE): Rename to ...
4886         (DECL_DEFERRED_FN): ... this.
4887         (in_function_p): Remove declaration.
4888         (mark_inline_for_output): Rename to ...
4889         (defer_fn): ... this.
4890         * decl.c (finish_function): Adjust call to mark_inline_for_output.
4891         (in_function_p): Remove definition.
4892         * decl2.c (saved_inlines): Rename to ...
4893         (deferred_fns): ... this.
4894         (saved_inlines_used): Rename to ...
4895         (deferred_fns_used): ... this.
4896         (mark_inline_for_output): Rename to ...
4897         (defer_fn): ... this.
4898         (finish_file): Adjust accordingly.
4899         (init_decl2): Likewise.
4900         * lex.c (cons_up_default_function): Likewise.
4901         * pt.c (mark_decl_instantiated): Likewise.
4902         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
4903         circumstances.
4904         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
4905         * semantics.c (expand_body): Defer more functions.
4907 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
4909         * vec.cc: New file.
4910         * Make-lang.in (CXX_LIB2FUNCS): Add it.
4911         (vec.o): Build it.
4912         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4913         __cxa_vec_delete): Declare.
4915 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
4917         * rtti.c (dfs_class_hint_mark): New static function.
4918         (dfs_class_hint_unmark): New static function.
4919         (class_hint_flags): Use them.
4921 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
4923         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
4925 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
4927         * cp-tree.h (instantiate_decl): Change prototype.
4928         * decl2.c (mark_used): Adjust call.
4929         * optimize.c (inlinable_function_p): Adjust handling of templates.
4930         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
4931         (do_type_instantiation): Likewise.
4932         (instantiate_decl): Defer more templates.
4933         (instantiate_pending_templates): Adjust logic to handle inline
4934         friend functions.
4936         * Makefile.in (GGC_H): New variable.  Use it throughout in place
4937         of ggc.h.
4939         * call.c: Don't include obstack.h.  Include ggc.h.
4940         (obstack_chunk_alloc): Don't define.
4941         (obstack_chunk_free): Likewise.
4942         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
4943         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
4944         (pop_switch): Free it.
4946         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
4948         * dump.c (dequeue_and_dump): Don't try to print the bit_position
4949         if we don't have a DECL_FIELD_OFFSET.
4951 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
4953         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
4954         special_function_p.
4956 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4958         * cfns.gperf (hash, libc_name_p): Prototype.
4960         * rtti.c (build_dynamic_cast_1): Constification.
4962         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
4964         * semantics.c (deferred_type_access_control): Prototype.
4966 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
4968         Correct many new ABI issues regarding vbase and vcall offset
4969         layout.
4970         * cp-tree.h (BINFO_VTABLE): Document.
4971         (struct lang_type): Tweak formatting.
4972         (BINFO_PRIMARY_BINFO): Add to documentation.
4973         (CLASSTYPE_VSIZE): Fix typo in comment.
4974         (CLASSTYPE_VBASECLASSES): Update documentation.
4975         (BINFO_VBASE_MARKED): Remove.
4976         (SET_BINFO_VBASE_MARKED): Likewise.
4977         (CLEAR_BINFO_VBASE_MARKED): Likewise.
4978         (BINFO_FIELDS_MARKED): Remove.
4979         (SET_BINFO_FIELDS_MARKED): Likewise.
4980         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
4981         (enum access_kind): New enumeration.
4982         (num_extra_vtbl_entries): Remove declaration.
4983         (size_extra_vtbl_entries): Likewise.
4984         (get_vtbl_decl_for_binfo): New function.
4985         (dfs_vbase_unmark): Remove declaration.
4986         (mark_primary_bases): Likewise.
4987         * class.c (SAME_FN): Remove.
4988         (struct vcall_offset_data_s): Move definition.
4989         (build_vbase_pointer): Use `build', not `build_binary_op', to
4990         access the vbase pointer under the new ABI.
4991         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
4992         (build_primary_vtable): Likewise.
4993         (dfs_mark_primary_bases): Move here from search.c.
4994         (mark_primary_bases): Likewise.
4995         (determine_primary_bases): Under the new ABI, don't make a base
4996         class a primary base just because we don't yet have any virtual
4997         functions.
4998         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
4999         (num_vfun_entries): Remove.
5000         (dfs_count_virtuals): Likewise.
5001         (num_extra_vtbl_entries): Likewise.
5002         (size_extra_vtbl_entries): Likewise.
5003         (layout_virtual_bases): Iterate in inheritance graph order under
5004         the new ABI.
5005         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
5006         indicate that a vfield is present.
5007         (init_class_processing): Initialize access_public_node, etc., from
5008         ak_public, etc.
5009         (get_vtbl_decl_for_binfo): New function.
5010         (dump_class_hierarchy_r): Likewise.
5011         (dump_class_hierarchy): Use it.
5012         (finish_vtbls): Build the vtbls in inheritance graph order.
5013         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
5014         (initialize_vtable): Use get_vtbl_decl_for_binfo.
5015         (accumulate_vtbl_inits): Add comments explaining why a pre-order
5016         walk is required.
5017         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
5018         where the vptr points, even for primary vtables.
5019         (build_vtbl_initializer): Adjust handling of vbase and vcall
5020         offsets.
5021         (build_vcall_and_vbase_vtable_entries): New function.
5022         (dfs_build_vbase_offset_vtbl_entries): Remove.
5023         (build_vbase_offset_vtbl_entries): Reimplement.
5024         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
5025         were already handled in a primary base class vtable.
5026         (build_vcall_offset_vtbl_entries): Adjust.
5027         (build_rtti_vtbl_entries): Adjust.
5028         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
5029         * init.c (expand_virtual_init): Simplify.
5030         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
5031         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
5032         * search.c (BINFO_ACCESS): New macro.
5033         (SET_BINFO_ACCESS): Likewise.
5034         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
5035         (access_in_type): Likewise.
5036         (dfs_accessible_p): Likewise.
5037         (protected_accessible_p): Likewise.
5038         (lookup_fnfields_1): Adjust documentation.
5039         (dfs_mark_primary_bases): Move to class.c
5040         (mark_primary_bases): Likewise.
5041         (dfs_vbase_unmark): Remove.
5042         (virtual_context): Use BINFO_FOR_VBASE.
5043         (dfs_get_vbase_types): Simplify.
5044         (dfs_build_inheritance_graph_order): New function.
5045         (get_vbase_types): Use it.
5046         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
5048         * tinfo.cc (get_vbase_offset): New function.
5049         (__vmi_class_type_info::do_find_public_src): Use it.
5050         (__vmi_class_type_info::do_dyncast): Likewise.
5051         (__vmi_class_type_info::do_upcast): Likewise.
5053 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
5055         * lang-specs.h: Pass -fno-show-column to the preprocessor.
5057 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
5059         * rtti.c (class_hint_flags): Rename flags.
5060         (class_initializer): Remove flags.
5061         (synthesize_tinfo_var): Combine offset and flags. Add flags
5062         for __vmi_class_type_info.
5063         (create_tinfo_types): Remove flags from __class_type_info and
5064         __si_class_type_info. Merge flags and offset from
5065         base_class_type_info.
5066         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
5067         (__base_class_info::is_virtual_p): Adjust.
5068         (__base_class_info::is_public_p): Adjust.
5069         (__base_class_info::offset): New accessor.
5070         (__class_type_info::details): Remove member.
5071         (__class_type_info::__class_type_info): Lose details.
5072         (__class_type_info::detail_masks): Remove.
5073         (__si_class_type_info::__si_class_type_info): Lose details.
5074         (__vmi_class_type_info::details): New member.
5075         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
5076         (__vmi_class_type_info::detail_masks): New member.
5077         * tinfo.cc (__class_type_info::do_upcast): Initialize result
5078         with unknown_details_mask.
5079         (__vmi_class_type_info::do_find_public_src): Adjust
5080         (__vmi_class_type_info::do_dyncast): Adjust.
5081         (__vmi_class_type_info::do_upcast): Set result details, if
5082         needed. Adjust.
5083         (__dynamic_cast): Temporarily #if out optimization.
5085 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
5087         * rtti.c (get_tinfo_decl): Mark used.
5088         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
5089         mark as dealt with, if we output it.
5091 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
5093         * class.c: Reorganize to put virtual function table initialization
5094         machinery at the end of the file.
5096 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
5098         * class.c (finish_struct): Use bitsize_zero_node.
5099         * pt.c (instantiate_class_template): Likewise.
5101 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
5103         Put RTTI entries at negative offsets in new ABI.
5104         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
5105         vbase offset at index -3, not -1.
5106         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
5107         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
5108         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
5109         (build_rtti_vtbl_entries): New function.
5110         (set_rtti_entry): Remove.
5111         (build_primary_vtable): Don't use it.
5112         (build_secondary_vtable): Likewise.
5113         (start_vtable): Remove.
5114         (first_vfun_index): New function.
5115         (set_vindex): Likewise.
5116         (add_virtual_function): Don't call start_vtable.  Do call
5117         set_vindex.
5118         (set_primary_base): Rename parameter.
5119         (determine_primary_base): Likewise.
5120         (num_vfun_entries): Don't use skip_rtti_stuff.
5121         (num_extra_vtbl_entries): Include RTTI information.
5122         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
5123         (skip_rtti_stuff): Remove.
5124         (dfs_modify_vtables): Don't use it.
5125         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
5126         (layout_nonempty_base_or_field): Update size handling.
5127         (create_vtable_ptr): Tweak.
5128         (layout_class_type): Adjust parameter names.
5129         (finish_struct_1): Simplify.
5130         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
5131         (skip_rtti_stuff): Remove.
5132         (first_vfun_index): New function.
5133         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
5134         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
5135         (marked_vtable_pathp): Declare.
5136         (unmarked_vtable_pathp): Likewise.
5137         * error.c (dump_expr): Use first_vfun_index to calculate vtable
5138         offsets.
5139         * rtti.c (build_headof): Look for RTTI at negative offsets.
5140         (get_tinfo_decl_dynamic): Likewise.
5141         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
5142         here.
5143         (create_pseudo_type_info): Do it here instead.  Adjust so that
5144         vptr points at first virtual function.
5145         * search.c (marked_vtable_pathp): Make it global.
5146         (unmarked_vtable_pathp): Likewise.
5147         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
5148         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5149         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
5150         (get_pure_virtuals): Likewise.
5151         (expand_upcast_fixups): Likewise.
5152         * tree.c (debug_binfo): Likewise.
5153         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
5154         negative offset.
5156 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5158         * class.c (check_field_decl): Fix typo.
5159         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
5160         (check_methods): Likewise.
5161         (check_field_decls): Likewise.
5162         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
5163         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
5164         Use DECL_RESULT_FLD, not DECL_RESULT.
5165         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
5166         * lex.c (identifier_type): Likewise.
5167         * pt.c (determine_specialization, lookup_template_class): Likewise.
5168         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
5169         (resolve_overloaded_unification, more_specialized): Likewise.
5170         * semantics.c (finish_member_declaration): Likewise.
5171         * typeck.c (build_x_function_call): Likewise.
5173 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
5175         * class.c (layout_empty_base): Handle empty bases with non-byte
5176         alignment.
5177         (build_base_field): Likewise.
5178         (layout_virtual_bases): Likewise.
5180         * class.c (finish_struct_1): Fix typo in this change:
5182         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5184 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
5186         * decl.c (grokdeclarator): Count partial specializations when
5187         keeping track of how many template classes have been seen.
5189         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
5191 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5193         * class.c (build_vbase_pointer_fields): layout_field now place_field.
5194         (get_vfield_offset): Use byte_position.
5195         (set_rtti_entry): Set OFFSET to ssizetype zero.
5196         (get_binfo_offset_as_int): Deleted.
5197         (dfs_record_base_offsets): Use tree_low_cst.
5198         (dfs_search_base_offsets): Likewise.
5199         (layout_nonempty_base_or_field): Reflect changes in RLI format
5200         and call byte_position.
5201         (layout_empty_base): Convert offset to ssizetype.
5202         (build_base_field): use rli_size_unit_so_far.
5203         (dfs_propagate_binfo_offsets): Do computation in proper type.
5204         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
5205         (layout_class_type): Reflect changes in RLI names and fields.
5206         (finish_struct_1): Set DECL_FIELD_OFFSET.
5207         * dump.c (dequeue_and_dump): Call bit_position.
5208         * expr.c (cplus_expand_constant): Use byte_position.
5209         * rtti.c (expand_class_desc): Use bitsize_one_node.
5210         * typeck.c (build_component_addr): Use byte_position and don't
5211         special case for zero offset.
5213 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
5215         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
5217         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
5218         tinfo object.
5219         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
5220         vtable.
5222 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5224         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
5225         DECL_P macros.
5226         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
5227         make_typename_type, check_initializer, cp_finish_decl,
5228         xref_tag): Likewise.
5229         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
5230         decl_namespace, arg_assoc_template_arg, arg_assoc,
5231         validate_nonmember_using_decl, do_class_using_decl): Likewise.
5232         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
5233         args_to_string): Likewise.
5234         * friend.c (is_friend): Likewise.
5235         * lex.c (note_got_semicolon, note_list_got_semicolon,
5236         is_global): Likewise.
5237         * method.c (build_overload_nested_name, build_overload_value,
5238         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
5239         * parse.y (typename_sub, typename_sub1): Likewise.
5240         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
5241         process_partial_specialization, convert_template_argument,
5242         template_args_equal, add_pending_template, lookup_template_class,
5243         for_each_template_parm_r, maybe_fold_nontype_arg,
5244         tsubst, instantiate_template, type_unification_real, unify,
5245         instantiate_pending_templates, set_mangled_name_for_template_decl):
5246         Likewise.
5247         * repo.c (repo_get_id, repo_template_used): Likewise.
5248         * search.c (lookup_field_1): Likewise.
5249         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
5250         * xref.c (classname): Likewise.
5252 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
5254         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
5255         (CANONICAL_BINFO): New macro.
5256         (BINFO_NEW_VTABLE_MARKED): Use it.
5257         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
5258         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
5259         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
5260         not TREE_TYPE.
5261         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5262         (build_secondary_vtable): Likewise.
5263         (dfs_finish_vtbls): Likewise.
5264         (dfs_accumulate_vtbl_inits): Likewise.
5265         (accumulate_vtbl_inits): New function.
5266         (finish_vtbls): Make sure that virtual bases come after
5267         non-virtual bases in the vtable group.
5268         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
5269         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5270         * search.c (struct vbase_info): Move definition.
5271         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5272         (unmarked_new_vtable_p): Likewise.
5273         (dfs_mark_vtable_path): Remove.
5274         (dfs_mark_new_vtable): Remove.
5275         (dfs_unmark_new_vtable): Likewise.
5276         (dfs_clear_search_slot): Likewise.
5277         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
5278         (dfs_clear_vbase_slots): Likewise.
5279         (init_vbase_pointers): LIkewise.
5281 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
5283         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
5284         SIZETYPE to a non-SIZETYPE.
5286 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
5288         * class.c (layout_virtual_bases): Adjust names in conditionally
5289         compiled code.
5291         * class.c (record_base_offsets): New function.
5292         (layout_conflict_p): Likewise.
5293         (layout_nonempty_base_or_field): Use it.
5294         (layout_empty_base): New function.
5295         (build_base_field): Use it.
5296         (build_base_fields): Update comment.
5297         (layout_virtual_bases): Fold in a little code form
5298         layout_basetypes.  Use layout_empty_base.
5299         (layout_basetypes): Remove.
5300         (end_of_class): New function.
5301         (layout_class_type): Use it.  Adjust.
5303         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
5304         (fntype_p): Remove.
5305         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
5306         comment.
5307         (dfs_skip_nonprimary_vbases_markedp): Likewise.
5308         * typeck.c (fntype_p): Remove.
5310         * cp-tree.h (TI_SPEC_INFO): Remove.
5311         (CLASSTYPE_TI_SPEC_INFO): Likewise.
5312         * pt.c (process_partial_specialization): Likewise.
5314         * class.c (build_base_field): Fix thinko in computation of binfo
5315         offsets.
5317         * tree.c (mark_local_for_remap_p): Mark variables declared in
5318         TARGET_EXPRs as well.
5320 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
5322         * typeck.c (require_complete_type, complete_type,
5323         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
5324         build_array_ref, convert_arguments, pointer_diff,
5325         build_x_unary_op, build_unary_op, build_c_cast,
5326         build_modify_expr): Use COMPLETE_TYPE_P etc.
5327         * call.c (is_complete, convert_like_real,
5328         build_new_method_call): Likewise.
5329         * class.c (build_vbase_pointer_fields, check_bases,
5330         build_base_field, finish_struct_1, pushclass): Likewise.
5331         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
5332         * decl.c (maybe_process_template_type_declaration, pushtag,
5333         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
5334         layout_var_decl, check_initializer, cp_finish_decl,
5335         grokdeclarator, require_complete_types_for_parms,
5336         grok_op_properties, xref_tag, xref_basetypes,
5337         check_function_type): Likewise.
5338         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
5339         * friend.c (do_friend): Likewise.
5340         * init.c (build_offset_ref): Likewise.
5341         * parse.y (structsp): Likewise.
5342         * pt.c (maybe_process_partial_specialization,
5343         tsubst_friend_function, instantiate_class_template, tsubst,
5344         do_type_instantiation, instantiate_pending_templates): Likewise.
5345         * repo.c (repo_get_id): Likewise.
5346         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
5347         synthesize_tinfo_var, emit_support_tinfos): Likewise.
5348         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
5349         * semantics.c (begin_class_definition): Likewise.
5350         * tree.c (build_cplus_method_type): Likewise.
5351         * typeck2.c (digest_init, build_functional_cast,
5352         add_exception_specifier): Likewise.
5353         * parse.h, parse.c: Regenerated.
5355 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
5357         * inc/cxxabi.h: New header file. Define new-abi entry points.
5358         (__pointer_type_info::target): Rename member to ...
5359         (__pointer_type_info::type): ... here.
5360         (__base_class_info::type): Rename member to ...
5361         (__base_class_info::base): ... here.
5362         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
5363         * cp-tree.h (CPTI_ABI): New global tree enumeration.
5364         (abi_node): New global tree node.
5365         * decl.c (abi_node): Document.
5366         (init_decl_processing): Initialize abi_node.
5367         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
5368         (get_vmi_pseudo_type_info): Likewise.
5369         (create_tinfo_types): Likewise.
5370         (emit_support_tinfos): Likewise.
5371         * tinfo.h (cxxabi.h): Include for new-abi.
5372         Move rtti class definitions to new header file.
5373         * tinfo.cc (abi): Use the namespace.
5374         (std): Move new abi rtti classes from here ...
5375         (__cxxabiv1): ... to here.
5376         * tinfo2.cc (cxxabi.h): Include for new-abi.
5377         Move rtti class definitions to new header file.
5378         (std): Move new abi rtti classes from here ...
5379         (__cxxabiv1): ... to here.
5380         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
5381         namespace.
5383 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
5384             Jason Merrill  <jason@casey.cygnus.com>
5386         * method.c (build_overload_int): Use host_integerp.
5388 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5390         * init.c (build_offset_ref): Handle the case of a templated member
5391         function.
5393 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5395         * except.c (expand_exception_blocks): Clear catch_clauses_last.
5397 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
5399         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
5400         * class.c (check_bitfield_decl): Turn illegal bitfields into
5401         non-bitfields.
5402         (dfs_propagate_binfo_offsets): Adjust for new size_binop
5403         semantics.
5404         (dfs_offset_for_unshared_vbases): Likewise.
5405         * cvt.c (cp_convert_to_pointer): Convert NULL to a
5406         pointer-to-member correctly under the new ABI.
5407         * expr.c (cplus_expand_constant): Don't use cp_convert when
5408         turning an offset into a pointer-to-member.
5409         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
5410         when dereferencing them under the new ABI.
5411         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
5412         of pointers-to-members under the new ABI.
5414         * class.c (check_bitfield_decl): Remove restriction on really long
5415         bitfields.
5416         (layout_class_type): Implement new ABI handling of bitfields
5417         longer than their types.
5419 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5421         * parse.y (extdefs): Call ggc_collect.
5422         * parse.c: Regenerated.
5424 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
5426         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
5427         (note_name_declared_in_class): Use OVL_CURRENT to get at a
5428         potential overload.
5430 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5432         * class.c (build_vbase_path): Use integer_zerop.
5433         (build_vtable_entry): Use tree_low_cst.
5434         (get_vfield_offset): Use bit_position.
5435         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
5436         Use tree_low_cst.
5437         (check_bitfield_decl): Set DECL_SIZE using convert.
5438         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
5439         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
5440         Use tree_low_cst.
5441         (finish_struct_1): Use bit_position.
5442         (dump_class_hierarchy): Use tree_low_cst.
5443         * cp-tree.h (min_precision): Add declaration.
5444         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
5445         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
5446         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
5447         * expr.c (cplus_expand_constant): Use bit_position.
5448         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
5449         * rtti.c (get_base_offset): Use bit_position.
5450         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
5451         host_integerp, and tree_low_cst.
5452         (pointer_int_sum): Use integer_zerop.
5453         (build_component_addr): Use bit_position.
5455 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
5457         * typeck.c (require_complete_type): Don't assume size_zero_node.
5458         (complete_type_or_else): Likewise.
5460 2000-03-16  Steven Grady <grady@digitaldeck.com>
5461             Jason Merrill  <jason@casey.cygnus.com>
5463         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
5465 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5467         * decl2.c (grokfield): Bail out if type is error_mark_node.
5469 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
5471         * tinfo2.cc (__ptr_to_member_data): Rename to ...
5472         (__pointer_to_member_data): ... here. Adjust.
5473         * rtti.c (create_tinfo_types): Adjust.
5475 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
5477         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
5478         * decl.c (ref_desc_type_node): Undocument.
5479         * rtti.c (ptr_ref_initializer): Rename to ...
5480         (ptr_initializer): ... here. Adjust comments.
5481         (ptmd_initializer): Fix comment thinko.
5482         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
5483         (create_tinfo_types): Remove ref_desc_type_node init.
5484         * tinfo2.cc (__reference_type_info): Remove.
5486 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
5488         * decl.c (cp_finish_decl): Remove obsolete comment.
5490         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
5492 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
5494         * cp-tree.h: Tweak documentation.
5495         * class.c (build_vbase_pointer_fields): Layout the fields, too.
5496         (avoid_overlap): Remove.
5497         (get_binfo_offset_as_int): New function.
5498         (dfs_serach_base_offsets): Likewise.
5499         (layout_nonempty_base_or_field): Likewise.
5500         (build_base_field): Layout fields here.  Avoid placing two objects
5501         of the same type at the same address, under the new ABI.
5502         (build_base_fields): Adjust accordingly.
5503         (create_vtable_ptr): Return the new field, but don't attach it to
5504         TYPE_FIELDS.
5505         (remove_base_field): Remove.
5506         (remove_base_fields): Remove.
5507         (layout_basetypes): Adjust accordingly.
5508         (layout_class_type): Call layout_field for each field, rather than
5509         just making a wholesale call to layout_type.
5511 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
5513         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
5515 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
5517         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
5519         * except.c (dtor_nothrow): New fn.
5520         (do_pop_exception): Use it.  Take type parm.
5521         (push_eh_cleanup): Take type parm.
5522         (expand_start_catch_block): Pass it.
5523         (build_eh_type_type_ref): Accept null type.
5525 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
5527         * cp-tree.h (revert_static_member_fn): Change prototype.
5528         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
5529         (grok_op_properties): Likewise.
5530         (start_function): Likewise.
5531         (revert_static_member_fn): Simplify.
5532         * pt.c (check_explicit_specialization): Adjust call to
5533         revert_static_member_fn.
5535 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
5537         * cp-tree.h (scope_kind): New type.
5538         (tmpl_spec_kind): Likewise.
5539         (declare_pseudo_global_level): Remove.
5540         (pseudo_global_level_p): Rename to template_parm_scope_p.
5541         (pushlevel): Remove declaration.
5542         (begin_scope): New function.
5543         (finish_scope): Likewise.
5544         (current_tmpl_spec_kind): Likewise.
5545         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
5546         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
5547         Add template_spec_p.
5548         (toplevel_bindings_p): Adjust.
5549         (declare_pseudo_global_level): Remove.
5550         (pseudo_global_level_p): Rename to template_parm_scope_p.
5551         (current_tmpl_spec_kind): New function.
5552         (begin_scope): Likewise.
5553         (finish_scope): Likewise.
5554         (maybe_push_to_top_level): Adjust.
5555         (maybe_process_template_type_declaration): Likewise.
5556         (pushtag): Likewise.
5557         (pushdecl_nonclass_level): Likewise.
5558         (lookup_tag): Likewise.
5559         (grokfndecl): Handle member template specializations.  Share
5560         constructor and non-constructor code.
5561         * decl2.c (check_classfn): Handle member template specializations.
5562         * pt.c (begin_template_parm_list): Use begin_scope.
5563         (begin_specialization): Likewise.
5564         (end_specialization): Likewise.
5565         (check_explicit_specialization): Use current_tmpl_spec_kind.
5566         Handle member template specializations.
5567         (end_template_decl): Use finish_scope.  Remove call to
5568         get_pending_sizes.
5569         (push_template_decl_real): Remove bogus error message.
5570         (tsubst_decl): Fix typo in code contained in comment.
5571         (instantiate_template): Handle member template specializations.
5572         (most_general_template): Likewise.
5574 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
5576         * lex.c (whitespace_cr): Compress consecutive calls to warning().
5577         (do_identifier): Ditto for error().
5579         * pt.c (convert_nontype_argument): Ditto for cp_error().
5580         (convert_template_argument): Ditto for cp_pedwarn().
5582 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
5584         * exception.cc (__check_null_eh_spec): New fn.
5585         * except.c (expand_end_eh_spec): Call it if the spec is throw().
5587 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
5589         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
5590         * except.c (expand_end_eh_spec): Add the return type.
5591         * rtti.c (throw_bad_cast): Add the parmtypes.
5592         (throw_bad_typeid): Likewise.
5594         * semantics.c (expand_stmt): Only leave out rtl for unused
5595         artificials, and set DECL_IGNORED_P on them as well.
5596         * decl.c (wrapup_globals_for_namespace): Likewise.
5598 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
5600         * decl.c (maybe_commonize_var): Skip all artificial decls.
5601         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
5603 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
5605         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
5606         * cp-tree.h: Declare flag_enforce_eh_specs.
5607         * decl.c (store_parm_decls, finish_function): Check it.
5609         C library functions don't throw.
5610         * Makefile.in (cfns.h): New target.
5611         (except.o): Depend on it.
5612         * Make-lang.in (cc1plus): Depend on cfns.gperf.
5613         * cfns.gperf: New file.
5614         * cfns.h: Generated.
5615         * except.c: Include it.
5616         (nothrow_libfn_p): New fn.
5617         * decl.c (grokfndecl): Use it.
5618         * cp-tree.h: Declare it.
5620         * decl.c (push_overloaded_decl_1, auto_function,
5621         define_function): Lose.
5622         (build_library_fn_1): New static fn.
5623         (builtin_function): Use it.
5624         (get_atexit_node): Use build_library_fn_ptr.
5625         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
5626         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
5627         push_void_library_fn, push_throw_library_fn): New fns.
5628         * cp-tree.h: Declare them.
5629         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
5630         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
5631         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
5632         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
5633         * rtti.c (build_runtime_decl): Lose.
5634         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
5635         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
5636         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
5638         * call.c (build_call): Remove result_type parm.
5639         Call mark_used on unused artificial fns.
5640         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
5642 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
5644         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
5645         appropriate.
5646         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
5647         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
5648         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
5649         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
5650         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5651         expand_generic_desc): Likewise.
5653 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
5655         * exception.cc (__cp_pop_exception): Cleanup the original object.
5657 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
5659         * decl.c (grok_op_properties): Merge conversion to void warning
5660         with other silly op warnings.
5662 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
5664         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
5665         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
5667 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
5669         * decl.c (cp_make_fname_decl): New function.
5670         (wrapup_globals_for_namespace): Don't emit unused static vars.
5671         (init_decl_processing): Remove comment about use of
5672         array_domain_type. Set make_fname_decl.
5673         (cp_finish_decl): Remove __FUNCTION__ nadgering.
5674         * semantics.c (begin_compound_stmt): Remove
5675         current_function_name_declared flagging.
5676         (expand_stmt): Don't emit unused local statics.
5677         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
5678         specially.
5680 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
5682         * typeck.c (convert_for_assignment): Don't look at array
5683         initializer.
5684         * call.c (convert_like_real): Likewise.
5686 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
5688         Add initial support for '\uNNNN' specifier.
5689         * lex.c (read_ucs): New fn.
5690         (readescape, skip_white_space): Call it.
5691         (is_extended_char, is_extended_char_1): New fns.
5692         (utf8_extend_token): New fn, #if 0'd out.
5693         (real_yylex): Treat extended chars like letters.
5695         * search.c (note_debug_info_needed): Walk the bases even if we
5696         weren't deferring the type itself.
5698 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5700         * decl2.c (finish_objects): Constify a char*.
5702         * method.c (emit_thunk): Likewise.
5704 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
5706         * typeck.c (dubious_conversion_warnings): Look through
5707         REFERENCE_TYPE.
5709 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5711         * class.c (dfs_modify_vtables): I is now unsigned.
5712         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
5713         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
5714         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
5715         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
5716         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
5717         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
5718         Call integer_all_onesp.
5719         * typeck2.c (process_init_constructor): Use compare_tree_int.
5721         * lang-specs.h (as): Don't call if -syntax-only.
5723 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
5725         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
5726         RTL_EXPR_HAS_NO_SCOPE after all.
5728 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
5730         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
5731         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
5732         RTL_EXPR_HAS_NO_SCOPE.
5734         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
5735         later.
5737         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
5739 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
5741         * call.c (convert_like): Macrofy.
5742         (convert_like_with_context): New macro.
5743         (convert_like_real): Renamed from convert_like.  Add calling
5744         context parameters, for diagnostics. Add recursive flag.  Call
5745         dubious_conversion_warnings for outer conversion.
5746         (build_user_type_conversion): Use convert_like_with_context.
5747         (build_over_call): Likewise. Don't warn about dubious
5748         conversions here. Adjust convert_default_arg calls.
5749         (convert_default_arg): Add context parameters for diagnostics.
5750         Pass throught to convert_like_with_context.
5751         * cp-tree.h (convert_default_arg): Add context parameters.
5752         (dubious_conversion_warnings): Prototype new function.
5753         * typeck.c (convert_arguments): Adjust convert_default_arg call.
5754         (dubious_conversion_warnings): New function, broken
5755         out of convert_for_assignment.
5756         (convert_for_assignment): Adjust.
5758 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
5760         * decl2.c (key_method): Break out from...
5761         (import_export_vtable, import_export_class): ...here.
5763         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
5764         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
5766         * search.c (note_debug_info_needed, dfs_debug_mark,
5767         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
5768         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
5770 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
5772         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
5773         typos.
5775 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
5777         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
5778         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
5779         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
5780         (lang_type): Split gets_new into has_new and has_array_new.
5781         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5782         (TYPE_GETS_NEW): Split into ...
5783         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
5784         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
5785         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
5786         (build_op_new_call): Don't declare.
5787         (build_new_1): Likewise.
5788         * call.c (build_op_new_call): Remove.
5789         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
5790         instead of TYPE_NEEDS_DESTRUCTOR.
5791         (finish_struct_bits): Likewise.
5792         (add_implicitly_declared_members): Likewise.
5793         (check_field_decl): Likewise.
5794         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
5795         correctly under the new ABI.
5796         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
5797         instead of TYPE_NEEDS_DESTRUCTOR.
5798         (initialize_local_var): Likewise.
5799         (destroy_local_var): Likewise.
5800         (cp_finish_decl): Likewise.
5801         (register_dtor_fn): Likewise.
5802         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
5803         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
5804         TYPE_VEC_DELETE_TAKES_SIZE here.
5805         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
5806         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
5807         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5808         (finish_destructor_body): Likewise.
5809         (maybe_build_cleanup_1): Likewise.
5810         * decl2.c (do_static_destruction): Likewise.
5811         * init.c (build_new_1): Make it static.
5812         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5813         (expand_cleanup_for_base): Likewise.
5814         (get_cookie_size): New function.
5815         (build_new_1): Handle array-new cookies correctly under the new
5816         ABI.
5817         (build_vec_delete_1): Likewise.
5818         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5819         (build_delete): Likewise.
5820         (build_vec_delete): Handle array-new cookies correctly under the new
5821         ABI.
5822         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5823         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
5824         TYPE_HAS_ARRAY_NEW_OPERATOR.
5825         * ptree.c (print_lang_type): Check them.
5826         * search.c (context_for_name_lookup): Fix typo in comment.
5827         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5828         * tree.c (break_out_cleanups): Likewise.
5829         (build_cplus_array_test_1): Likewise.
5830         (cp_build_qualified_type_real): Likewise.
5831         * typeck.c (complete_type): Likewise.
5833         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
5834         the command-line, not the end.
5836 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
5838         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
5840 2000-03-02  Tom Tromey  <tromey@cygnus.com>
5842         * cp-tree.h (build_java_class_ref): Declare.
5843         * init.c (build_java_class_ref): No longer static.
5844         * except.c (expand_throw): Generate a Java-style `throw' if the
5845         thrown object is a "Java" object.
5846         (initialize_handler_parm): Generate a Java-style lookup of
5847         exception info if the caught object is a "Java" object.
5848         (catch_language, catch_language_init): New globals.
5849         (decl_is_java_type): New function.
5850         (expand_start_catch_block): Don't call push_eh_info() or
5851         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
5852         class reference to build_catch_block.
5854 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5856         * typeck.c (comptypes): Treat sizetype like its language equivalent.
5858 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
5860         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
5861         to merge reference/pointer code and fix incorrect warnings.
5863 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
5865         * search.c (protected_accessible_p): Use context_for_name_lookup.
5867         * init.c (construct_virtual_bases): Fix thinko.
5868         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
5870 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
5872         * decl.c (current_function_decl): Move to toplev.c.
5874 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
5876         * pt.c (fn_type_unification): Unify return type, whenever
5877         provided.
5878         (get_bindings_real): Only pass return type when necessary.
5879         Remove explicit return type check.
5880         * class.c (resolve_address_of_overloaded_function): Pass desired
5881         return type to fn_type_unification.
5883 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5885         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
5886         DECL_FIELD_SIZE.
5887         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
5888         DECL_FIELD_SIZE.
5889         * rtti.c (expand_class_desc): Likewise.
5890         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
5891         (THUNK_VCALL_OFFSET): Likewise.
5892         (THUNK_DELTA): Reflect changes in ../tree.h.
5894 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
5896         * search.c (protected_accessible_p): Also allow the access if
5897         the member is public in DERIVED.  Lose TYPE parm.
5898         (friend_accessible_p): Lose TYPE parm.
5899         (accessible_p): Adjust.
5901 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5903         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
5904         on things that are not sizes; ssize_binop deleted.
5905         Call size_diffop when appropriate.
5906         (dfs_build_vcall_offset_vtbl_entries): Likewise.
5907         (build_primary_vtable, build_secondary_vtable): Likewise.
5908         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
5909         Variable I is HOST_WIDE_INT.
5910         (get_vfield_offset): Pass proper types to size_binop.
5911         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
5912         (finish_struct_1): Likewise.
5913         (skip_rtti_stuff): Arg N is now pointer to signed.
5914         (layout_class_type): Use size_zero_node.
5915         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
5916         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
5917         * decl.c (complete_arry_type): Pass proper types to size_binop.
5918         (xref_basetypes): BINFO_OFFSET is sizetype.
5919         * error.c (dump_expr): Don't use size_binop non-sizes.
5920         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
5921         * init.c (construct_virtual_bases): Fix type error.
5922         (build_vec_delete_1): Pass proper type to size_binop and don't
5923         fold result.
5924         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
5925         * rtti.c (get_base_offset): Pass proper type to size_binop.
5926         * search.c (dfs_find_vbases): Fix type error.
5927         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
5928         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
5929         * tree.c (debug_binfo): Variable N is signed.
5930         Use HOST_WIDE_INT_PRINT_DEC.
5931         * typeck.c (comptypes): sizetype is same as equivalent integer type.
5932         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
5933         size_one_node and size_zero_node.
5934         (c_alignof): Use size_one_node.
5935         (build_component_addr): Pass proper types to size_binop.
5936         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
5938 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
5940         Implement class scope using-declarations for functions.
5941         * class.c (handle_using_decl): Call add_method for used functions.
5942         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
5943         (add_method): Used functions are hidden by local functions.
5944         (check_bases_and_members): Handle using-decls before finalizing
5945         CLASSTYPE_METHOD_VEC.
5946         * call.c (add_function_candidate): Add ctype parm; if non-zero,
5947         override the type of 'this' accordingly.
5948         (add_template_candidate, add_template_candidate_real): Add ctype parm.
5949         (convert_class_to_reference, build_user_type_conversion_1,
5950         build_new_function_call, build_object_call, build_new_op,
5951         build_new_method_call): Pass ctype parm.
5953         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
5954         the baselink.
5955         * call.c (convert_class_to_reference, build_user_type_conversion_1,
5956         build_new_function_call, build_object_call, build_new_op,
5957         build_new_method_call, build_op_delete_call): Don't get basetype_path
5958         from a baselink.
5959         * typeck.c (build_component_ref): Likewise.
5960         * init.c (build_offset_ref): Likewise.
5961         (resolve_offset_ref): Don't call enforce_access.
5962         Call build_scoped_ref.
5963         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
5964         would cause an error or if -pedantic.
5965         * class.c (alter_access): Lose binfo parm.
5967 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
5969         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
5970         types.
5972 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
5974         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
5975         pseudo_type_info creation into the std namespace
5977 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
5979         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
5980         (import_export_class): Remove declaration.
5981         * decl2.c (import_export_class): Make it static.
5982         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
5983         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
5984         EXPR_WITH_FILE_LOCATION.
5985         * lex.c (check_newline): Tweak filename/lineno setting.
5986         * semantics.c (begin_while_stmt): Fix typo in comment.
5988 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5990         * lang-options.h (-fmessage-length=): Add missing option.
5992         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
5994 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
5996         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
5998 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
6000         * optimize.c (expand_call_inline): Emit the return label before
6001         evaluating the return value.
6003 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
6005         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
6006         than duplicating functionality here.
6007         * optimize.c: Include input.h.
6008         (expand_call_inline): Use push_srcloc and pop_srcloc.
6009         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
6010         * parse.c: Regenerated.
6011         * Makefile.in (lex.o): Depend on input.h.
6012         (optimize.o): Likewise.
6014 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
6016         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
6017         function type, rather than ICE.
6019 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
6021         * decl.c (grokdeclarator): Call decl_type_access_control.
6022         * parse.y (parse_end_decl): Don't call decl_type_access_control if
6023         decl is null.
6025 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
6027         * decl.c (decls_match): Remove obsolete static member nadgering.
6029 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6031         * decl.c (grokdeclarator): Change ANSI to ISO.
6032         * lex.c (consume_string, readescape, do_identifier): Likewise.
6033         (parse_float, real_yylex): Likewise.
6034         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
6035         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
6036         new_type_id, maybe_label_decls, simple_stmt,
6037         for.init.statement): Likewise.
6038         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
6039         * semantics.c (finish_named_return_value): Likewise.
6040         * parse.c: Regenerate.
6042 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
6044         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
6045         (CPTI_CLASS_STAR_TYPE): Remove.
6046         (vtable_index_type): Likewise.
6047         (class_star_type_node): Remove.
6048         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
6049         (build_binary_op_nodefault): Remove.
6050         * call.c (build_new_op): Use build_binary_op instead of
6051         build_binary_op_nodefault.
6052         * decl.c (init_decl_processing): Remove class_star_type_node
6053         initialization.  Make delta_type_node ptrdiff_type_node under the
6054         new ABI.  Initialize vtable_index_type.
6055         (build_ptrmemfunc_type): Build different structures for the new
6056         ABI.
6057         (build_enumerator): Use build_binary_op instead of
6058         build_binary_op_nodefault.
6059         * method.c (build_overload_value): Mangle pointers-to-members
6060         appropriately under the new ABI.
6061         * typeck.c (build_array_ref): Use build_binary_op instead of
6062         build_binary_op_nodefault.
6063         (get_member_function_from_ptrfunc): Adjust for the new ABI.
6064         (build_binary_op_nodefault): Rename to ...
6065         (build_binary_op): ... this.  Remove old version.  Adjust for
6066         pointer-to-member comparisons under the new ABI.
6067         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
6068         (build_ptrmemfunc): Adjust for the new ABI.
6069         (expand_ptrmemfunc_cst): Likewise.
6070         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
6071         (pfn_from_ptrmemfunc): Adjust for the new ABI.
6073 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
6075         * call.c (build_object_call): Compress consecutive calls to
6076         cp_error.
6077         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
6078         (build_op_delete_call): Adjust message formatting.
6080         * class.c (check_bases): Compress consecutive calls to
6081         cp_pedwarn.
6082         (finish_struct_anon): Say 'ISO C++'.
6084         * decl.c (start_decl): Same here.
6085         (grok_reference_init): Likewise.
6086         (grokfndecl): Correct message formatting.
6087         (grokfndecl): Improve diagnostic.
6088         (check_static_variable_definition): Likewise. Say 'ISO C++'
6089         (compute_array_index_type): Say 'ISO C++'
6090         (create_array_type_for_decl): Compress consecutive calls to
6091         cp_error.
6092         (grokdeclarator): Say 'ISO C++'
6093         (grok_op_properties): Likewise.
6095         * decl2.c (delete_sanity): Clairify diagnostic.
6096         (check_member_template): Same here.
6097         (grok_function_init): Use consistent terminology.
6099         * expr.c (do_case): Say 'ISO C++'
6101         * friend.c (do_friend): Compress consecutive calls to warning.
6103 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
6105         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
6106         * class.c (build_secondary_vtable): Reorganize.  Don't create a
6107         new vtable under the new ABI.
6108         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
6109         computing the size.
6110         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
6111         the initializing elements.
6112         (initialize_vtable): New function.
6113         (dfs_finish_vtbls): Use it.
6114         (dfs_accumulate_vtbl_inits): New function.
6115         (finish_vtbls): Merge primary and secondary vtables under the new
6116         ABI.
6117         (finish_struct_1): Remove redundant call to layout_vtable_decl.
6118         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
6119         aren't VAR_DECLs.
6121         * class.c (build_vtable): New function, split out from ...
6122         (get_vtable_decl): ... here, and ...
6123         (build_secondary_vtable): ... here.
6125         * pt.c (tsubst_decl): Fix formatting.
6127 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6129         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
6130         (avoid_overlap, build_base_field): Likewise.
6131         (build_base_field, build_base_fields, is_empty_class):
6132         Test DECL_SIZE with integer_zero.
6133         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
6134         * cp-tree.h (struct lang_type): New field size_unit.
6135         (CLASSTYPE_SIZE_UNIT): New macro.
6136         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
6137         (cp_finish_decl): Delete -Wlarger-than processing.
6138         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
6139         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
6140         * tree.c (make_binfo): binfo vector is one entry longer.
6141         (walk_tree): Walk DECL_SIZE_UNIT.
6143 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
6145         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
6146         comment.
6147         (build_vtable_entry): Don't assume all vtable entries are
6148         functions.
6149         (build_vtbl_initializer): Adjust accordingly.
6150         (get_vtable_decl): Fix formatting.
6152 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
6154         * semantics.c (deferred_type_access_control): Walk the entire
6155         type_lookups list.
6156         (save_type_access_control): Rename from
6157         initial_deferred_type_access_control.  Just remember the value.
6158         (decl_type_access_control): New fn.
6159         (begin_function_definition): Use deferred_type_access_control, after
6160         we've started the function.  Set type_lookups to error_mark_node.
6161         * parse.y (frob_specs, fn.def1): Adjust.
6162         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
6163         (parse_end_decl, parse_bitfield0, parse_method): New fns.
6164         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
6165         (after_type_component_declarator0): Likewise.
6166         (after_type_component_declarator): Likewise.
6167         (notype_component_declarator): Likewise.
6168         * cp-tree.h: Adjust.
6170         * decl.c (redeclaration_error_message): Allow redeclaration of
6171         namespace-scope decls.
6173 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6175         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
6177 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
6179         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
6180         * decl2.c (grokclassfn): Likewise.
6182         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
6184         * decl2.c (lang_decode_option): Don't set default message length
6185         here.
6186         * lex.c (lang_init_options): Set it here.
6188 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
6190         Make DECL_CONTEXT mean the class in which a member function was
6191         declared, even for a virtual function.
6192         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
6193         (DECL_FRIEND_CONTEXT): New macro.
6194         (DECL_REAL_CONTEXT): Remove.
6195         (SET_DECL_FRIEND_CONTEXT): Likewise.
6196         (DECL_VIRTUAL_CONTEXT): Adjust.
6197         (DECL_CLASS_SCOPE_P): Use TYPE_P.
6198         (add_friends): Remove.
6199         (hack_decl_function_context): Likewise.
6200         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
6201         CP_DECL_CONTEXT.
6202         (build_over_call): Fix indentation.  Use DECL_CONTEXT
6203         instead of DECL_CLASS_CONTEXT.
6204         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
6205         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
6206         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6207         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
6208         (build_base_field): Likewise.
6209         (finish_struct_1): Likewise.
6210         (build_self_reference): Likewise.
6211         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
6212         DECL_REAL_CONTEXT.
6213         (pushtag): Use decl_function_context, not
6214         hack_decl_function_context.
6215         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6216         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
6217         (pushdecl): Remove bogus code.
6218         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
6219         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6220         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6221         Use decl_function_context, nothack_decl_function_context.
6222         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
6223         (grokdeclarator): Likewise.  Use decl_function_context, not
6224         hack_decl_function_context.
6225         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
6226         (start_function): Use DECL_FRIEND_CONTEXT, not
6227         DECL_CLASS_CONTEXT.  Use decl_function_context, not
6228         hack_decl_function_context.
6229         (finish_function): Use decl_function_context, not
6230         hack_decl_function_context.
6231         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
6232         DECL_CLASS_CONTEXT.
6233         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
6234         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
6235         (grokfield): Likewise.
6236         (finish_builtin_type): Likewise.
6237         (finish_vtable_vardec): Use decl_function_context, not
6238         hack_decl_function_context.
6239         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6240         (start_static_initialization_or_destruction): Likewise.
6241         (finish_static_initialization_or_destruction): Likewise.
6242         (mark_used): Adjust logic for deciding when to synthesize methods.
6243         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
6244         DECL_REAL_CONTEXT.
6245         * error.c (dump_function_decl): Use DECL_CONTEXT, not
6246         DECL_CLASS_CONTEXT.
6247         * friend.c (is_friend): Likewise.
6248         (add_friends): Remove.
6249         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
6250         * lex.c (begin_definition_of_inclass_inline): Use
6251         decl_function_context, not hack_decl_function_context.
6252         (process_next_inline): Likewise.
6253         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6254         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
6255         DECL_CLASSS_CONTEXT.
6256         (hack_identifier): Likewise.
6257         (synthesize_method):  Use decl_function_context, not
6258         hack_decl_function_context.
6259         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
6260         DECL_REAL_CONTEXT.
6261         (is_member_template): Use decl_function_context, not
6262         hack_decl_function_context.  Use DECL_CONTEXT, not
6263         DECL_CLASS_CONTEXT.
6264         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
6265         DECL_CLASS_CONTEXT.
6266         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
6267         DECL_REAL_CONTEXT.
6268         (push_template_decl_real): Likewise.
6269         (instantiate_class_template): Don't call add_friends.
6270         (tsubst_default_argument): Use DECL_CONTEXT, not
6271         DECL_REAL_CONTEXT.
6272         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
6273         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6274         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
6275         DECL_CLASS_CONTEXT.
6276         * repo.c (repo_inline_used): Likewise.
6277         * search.c (current_scope): Adjust for new _CONTEXT macros.
6278         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
6279         DECL_REAL_CONTEXT.
6280         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6281         (lookup_fnfields_here):Likewise.
6282         (check_final_overrider): Likewise.
6283         (init_vbase_pointers): Likewise.
6284         (virtual_context): Likewise.
6285         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
6286         (expand_body): Use decl_function_context, not
6287         hack_decl_function_context.
6288         * tree.c (hack_decl_function_context): Remove.
6289         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
6290         DECL_CLASS_CONTEXT.
6291         * typeck2.c (error_not_base_type): Likewise.
6293 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
6295         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
6297 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6299         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
6301 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
6303         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
6305 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
6307         * decl2.c (lang_decode_option): Enable automatic line wrapping.
6309 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
6311         * parse.y (frob_specs): Split out...
6312         (parse_decl): From here.
6313         (fn.def2): Call initial_deferred_type_access_control.
6314         (after_type_component_declarator0): Call frob_specs.
6315         (notype_component_declarator0): Likewise.
6316         * search.c (friend_accessible_p): Nested classes are friends of their
6317         enclosing classes.
6319 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
6321         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
6322         used to create an implicit temporary.
6324         * class.c (dfs_modify_vtables): Tweak calculation of functions to
6325         override.
6327 2000-02-08  Nathan Sidwell  <nathan@acm.org>
6329         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
6330         strip array element qualifiers too.
6332 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
6334         * decl.c (store_parm_decls): Don't build cleanups for parameters
6335         while processing_template_decl.
6337 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
6339         * cp-tree.h (struct saved_scope): Add incomplete field.
6340         (namespace_scope_incomplete): New macro.
6341         * decl.c (pushdecl): Use it.
6342         (hack_incomplete_structures): Use it.  See through artificial
6343         binding levels.
6344         (mark_saved_scope): Mark it.
6346         Implement access control for nested types.
6347         * search.c (type_access_control): New fn.
6348         (accessible_p): Now we do perform access control for types.
6349         * semantics.c (deferred_type_access_control): New fn.
6350         (initial_deferred_type_access_control): New fn.
6351         (begin_function_definition): Call it.  Add lookups parm.
6352         * decl.c (struct binding_level): Add this_class field.
6353         (pushlevel_class): Set it.
6354         (mark_binding_level): Mark it.
6355         (lookup_name_real): Use it.  Call type_access_control.
6356         (mark_saved_scope): Mark lookups field.
6357         * cp-tree.h (flagged_type_tree): Add lookups field.
6358         (struct saved_scope): Add lookups field.
6359         (type_lookups): New macro.
6360         * parse.y (declmods): Now <ftype>.
6361         (parse_decl): Add lookups parm.  Call
6362         initial_deferred_type_access_control.
6363         (lang_extdef): Clear type_lookups.
6364         (typed_declspecs, declmods, typespec): Set lookups field.
6365         (initdcl): Call deferred_type_access_control.
6366         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
6367         component_decl_1, named_parm): Adjust.
6368         * friend.c (is_friend): Nested classes are friends of their
6369         enclosing classes.
6371         * class.c (currently_open_derived_class): New fn.
6372         * method.c (hack_identifier): Use it.
6374         * lex.c (do_identifier): Remove obsolete code.
6376         * parse.y (typed_typespecs): Propagate new_type_flag properly.
6378 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
6380         * tinfo.h: Remove apostrophes from C++ comment (xgettext
6381         thinks this file is plain C).
6383 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6385         * Makefile.in (call.o): Depend on $(EXPR_H).
6387         * call.c: Include "expr.h".
6389         * class.c (dump_class_hierarchy): Add prototype.
6391         * search.c (dfs_get_pure_virtuals): Likewise.
6393 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
6395         * parse.y (simple_stmt): Allow :: token in asm parameter list.
6396         * parse.c: Rebuilt.
6398 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
6400         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
6401         Store it in DECL_FCONTEXT.
6402         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
6404 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
6406         * tinfo.h (old abi): #include "tconfig.h".
6407         * tinfo.cc (convert_to_base): Move into old abi section.
6409 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
6411         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
6412         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
6413         (BINFO_PRIMARY_BINFO): New macro.
6414         (BF_DELTA): Rename to ...
6415         (BV_DELTA): ... this.
6416         (BF_VCALL_INDEX): Rename to ...
6417         (BV_VCALL_INDEX): ... this.
6418         (BF_FN): Rename to ...
6419         (BV_FN): ... this.
6420         * class.c (build_vbase_path): Adjust for changes to reverse_path.
6421         (set_rtti_entry): Rename BF_ macros to BV_ variants.
6422         (modify_vtable_entry): Simplify.
6423         (add_virtual_function): Rename BF_ macros to BV_ variants.
6424         (build_vtable_initializer): Likewise.
6425         (get_class_offset_1): Remove.
6426         (dfs_get_class_offset): Likewise.
6427         (get_class_offset): Likewise.
6428         (dfs_find_final_overrider): New function.
6429         (find_final_overrider): Likewise.
6430         (modify_one_vtable): Remove.
6431         (dfs_find_base): New function.
6432         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
6433         find_final_overrider.
6434         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
6435         virtuals.
6436         (dfs_fixup_vtable_deltas): Remove.
6437         (override_one_vtable): Remove.
6438         (merge_overrides): Likewise.
6439         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
6440         unreal chilren of virtual bases.
6441         (finish_struct_1): Don't use merge_overrides.  Don't use
6442         dfs_fixup_vtable_deltas.
6443         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
6444         BINFOs.
6446 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
6447             Jason Merrill  <jason@yorick.cygnus.com>
6449         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
6451 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
6453         * exception.cc (__throw_bad_typeid): Add missing std::.
6455 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6457         * cp-tree.h (make_thunk): PROTO -> PARAMS.
6459 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
6461         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
6463         Runtime support for new-abi rtti.
6464         * inc/typeinfo (type_info::operator!=): Define in class.
6465         (type_info::before, type_info::name, type_info::operator==,
6466         type_info::operator!=): Define new ABI implementations.
6467         (type_info::is_pointer_p, type_info::is_function_p): Declare
6468         new virtual functions.
6469         (type_info::do_catch, type_info::do_upcast): Likewise.
6471         * tinfo.h (__base_class_info): Define new class.
6472         (__class_type_info): Likewise.
6473         (__si_class_type_info): Likewise.
6474         (__vmi_class_type_info): Likewise.
6475         (__dynamic_cast): Prototype.
6477         * tinfo.cc: Conditionalize old and new rtti mechanisms.
6478         (type_info::is_pointer_p): Define new function.
6479         (type_info::is_function_p): Likewise.
6480         (type_info::do_catch): Likewise.
6481         (type_info::do_upcast): Likewise.
6482         (vtable_prefix): New structure for vtable access.
6483         (adjust_pointer): Define new template function.
6484         (contained_p, public_p, virtual_p, contained_public_p,
6485         contained_nonpublic_p, contained_nonvirtual_p): Define new
6486         functions.
6487         (nonvirtual_base_type): New local variable.
6488         (__class_type_info::~__class_type_info): Define.
6489         (__si_class_type_info::~__si_class_type_info): Likewise.
6490         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
6491         (__class_type_info::do_catch): Define new function.
6492         (__class_type_info::do_upcast): Likewise.
6493         (__class_type_info::find_public_src): Likewise.
6494         (__class_type_info::do_find_public_src): Likewise.
6495         (__si_class_type_info::do_find_public_src): Likewise.
6496         (__vmi_class_type_info::do_find_public_src): Likewise.
6497         (__class_type_info::do_dyncast): Likewise.
6498         (__si_class_type_info::do_dyncast): Likewise.
6499         (__vmi_class_type_info::do_dyncast): Likewise.
6500         (__class_type_info::do_upcast): Likewise.
6501         (__si_class_type_info::do_upcast): Likewise.
6502         (__vmi_class_type_info::do_upcast): Likewise.
6503         (__dynamic_cast): Likewise.
6505         * tinfo2.cc (__fundamental_type_info): Define new class.
6506         (__pointer_type_info): Likewise.
6507         (__reference_type_info): Likewise.
6508         (__array_type_info): Likewise.
6509         (__function_type_info): Likewise.
6510         (__enum_type_info): Likewise.
6511         (__ptr_to_member_type_info): Likewise.
6512         (__fundamental_type_info::~__fundamental_type_info): Define.
6513         (__pointer_type_info::~__pointer_type_info): Likewise.
6514         (__reference_type_info::~__reference_type_info): Likewise.
6515         (__array_type_info::~__array_type_info): Likewise.
6516         (__function_type_info::~__function_type_info): Likewise.
6517         (__enum_type_info::~__enum_type_info): Likewise.
6518         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
6519         (__pointer_type_info::do_catch): Define new function.
6520         (__ptr_to_member_type_info::do_catch): Define new function.
6522         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
6523         (__is_pointer): Likewise.
6525         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
6527 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
6529         * cp/class.c (build_vtable): Rename to build_primary_vtable.
6530         (prepare_fresh_vtable): Rename to build_secondary_vtable.
6531         (make_new_vtable): New function.
6532         (modify_vtable_entry): Handle generation of new vtables correctly.
6533         (modify_one_vtable): Remove unused parameter.
6534         (dfs_fixup_vtable_deltas): Likewise.
6535         (override_one_vtable): Use build_secondary_vtable.
6536         (finish_struct_1): Use build_primary_vtable and
6537         build_secondary_vtable.
6539 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
6541         * cp/decl.c: Adjust variable names, comments, help strings.
6543 2000-01-29  Nathan Sidwell  <nathan@acm.org>
6545         * new2.cc (operator delete[]): Use operator delete, don't assume
6546         implementation.
6548 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
6550         * class.c (build_vtbl_initializer): Add argument to
6551         build_vtable_entry call.
6553 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
6555         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
6556         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
6557         (BF_DELTA): New macro.
6558         (BF_VCALL_INDEX): Likewise.
6559         (BF_FN): Likewise.
6560         (THUNK_VCALL_OFFSET): Likewise.
6561         (make_thunk): Change prototype.
6562         * class.c (build_vtable_entry): Integrate
6563         build_vtable_entry_for_fn.  Handle vcall indices.
6564         (build_vtable_entry_for_fn): Remove.
6565         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
6566         BF_VCALL_INDEX, BF_FN.
6567         (modify_vtable_entry): Integrate common code from
6568         modify_one_vtable and dfs_fixup_vtable_deltas.
6569         (add_virtual_function): Set BF_VCALL_INDEX.
6570         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
6571         and BF_FN.
6572         (modify_one_vtable): Simplify.
6573         (dfs_fixup_vtable_deltas): Likewise.
6574         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
6575         * method.c (make_thunk): Handle vcall indices.
6577 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
6579         Compiler side new abi rtti (not enabled).
6580         * cp-tree.h (new_abi_rtti_p): New macro.
6581         (emit_support_tinfos): Prototype new function.
6582         (tinfo_decl_p): Likewise.
6583         (emit_tinfo_decl): Likwise.
6584         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
6585         macros.
6586         (doing_runtime): New local static.
6587         (init_rtti_processing): Add new-abi initializer.
6588         (get_tinfo_decl): Add new-abi logic.
6589         (tinfo_from_decl): Likewise.
6590         (build_dynamic_cast_1): Likewise.
6591         (qualifier_flags): New static function.
6592         (tinfo_base_init): Likewise.
6593         (generic_initializer): Likewise.
6594         (ptr_ref_initializer): Likewise.
6595         (ptmd_initializer): Likewise.
6596         (class_hint_flags): Likewise.
6597         (class_initializer): Likewise.
6598         (synthesize_tinfo_var): Likewise.
6599         (create_real_tinfo_var): Likewise.
6600         (create_pseudo_type_info): Likewise.
6601         (get_vmi_pseudo_type_info): Likewise.
6602         (create_tinfo_types): Likewise.
6603         (emit_support_tinfos): New global function.
6604         (tinfo_decl_p): New global predicate.
6605         (emit_tinfo_decl): New global function.
6606         * class.c (set_rtti_entry): Generalize for old and new rtti.
6607         (build_vtbl_initializer): Likewise.
6608         * decl2.c (finish_file): Likewise.
6610 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
6612         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
6613         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
6615 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
6617         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
6618         for scopes.
6620 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
6622         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
6624 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
6626         * optimize.c (calls_setjmp_r): Supply new argument
6627         to special_function_p.
6629 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6631         * call.c: PROTO -> PARAMS.
6632         * class.c: Likewise.
6633         * cp-tree.h: Likewise.
6634         * cvt.c: Likewise.
6635         * decl.c: Likewise.
6636         * decl.h: Likewise.
6637         * decl2.c: Likewise.
6638         * dump.c: Likewise.
6639         * errfn.c: Likewise.
6640         * error.c: Likewise.
6641         * except.c: Likewise.
6642         * expr.c: Likewise.
6643         * init.c: Likewise.
6644         * input.c: Likewise.
6645         * lex.c: Likewise.
6646         * lex.h: Likewise.
6647         * method.c: Likewise.
6648         * optimize.c: Likewise.
6649         * parse.y: Likewise.
6650         * pt.c: Likewise.
6651         * repo.c: Likewise.
6652         * rtti.c: Likewise.
6653         * search.c: Likewise.
6654         * semantics.c: Likewise.
6655         * spew.c: Likewise.
6656         * tree.c: Likewise.
6657         * typeck.c: Likewise.
6658         * typeck2.c: Likewise.
6659         * xref.c: Likewise.
6661 2000-01-25  Richard Henderson  <rth@cygnus.com>
6663         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
6665 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
6667         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
6668         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
6669         (struct vcall_offset_data_s): New type.
6670         (dfs_vcall_offset_queue_p): New function.
6671         (dfs_build_vcall_offset_vtbl_entries): Likewise.
6672         (build_vcall_offset_vtbl_entries): Likewise.
6673         (layout_vtable_decl): Likewise.
6674         (num_vfun_entries): Likewise.
6675         (num_extra_vtbl_entries): Add the entries for vcall offsets.
6676         (build_vtbl_initializer): Likewise.
6677         (dfs_finish_vtabls): Use layout_vtable_decl.
6678         (modify_one_vtables): Always duplicate vtables under the new ABI.
6679         (finish_struct_1): Use layout_vtable_decl.
6681 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6683         * decl.c (member_function_or_else): Change third arg from a format
6684         specifier to an `enum overload_flags'.  Callers changed.
6686 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
6688         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
6689         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
6690         build_const_cast, get_delta_difference, check_return_expr): Avoid
6691         ANSI string concatenation usage.
6693 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
6695         * class.c (layout_class_type): Put the fields required to make a
6696         class non-empty at the end, not the beginning, of the TYPE_FIELDs
6697         list.
6699 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
6701         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
6702         template.
6704         * decl2.c (mark_used): Do instantiate inlines that have been
6705         explicitly instantiated.
6707 2000-01-24  Richard Henderson  <rth@cygnus.com>
6709         * call.c (build_over_call): Use expand_tree_builtin.
6710         * typeck.c (build_function_call_real): Likewise.
6711         (build_binary_op_nodefault): Handle unordered compares.
6713 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
6715         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
6716         cp_tree_index values.
6717         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
6718         New global node #defines for them.
6719         * rtti.c (call_void_fn): Replace with ...
6720         (build_runtime_decl): ... new static function.
6721         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
6722         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
6723         (build_dynamic_cast_1): Always produce correctly typed result.
6724         Explicitly produce type_info addresses. Use dynamic_cast_node.
6725         * exception.cc (__throw_bad_cast): Return `void *'.
6726         (__throw_bad_typeid): Return `const type_info &'.
6728 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
6730         * cp-tree.h (get_vtable_decl): Prototype new function.
6731         * class.c (get_vtable_decl): New function. Broken out from ...
6732         (build_vtable): ... here. Use it.
6733         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
6734         by get_vtable_decl.
6736 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
6738         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
6739         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
6740         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
6741         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
6742         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
6743         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
6744         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
6745         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
6746         (CPTI_TINFO_VAR_ID): New enumeration.
6747         (__tp_desc_type_node, __access_mode_type_node,
6748         __bltn_desc_type_node, __user_desc_type_node,
6749         __class_desc_type_node, __ptr_desc_type_node,
6750         __attr_desc_type_node, __func_desc_type_node,
6751         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
6752         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
6753         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
6754         enum_desc_type_node, class_desc_type_node,
6755         si_class_desc_type_node, vmi_class_desc_type_node,
6756         ptmd_desc_type_node, base_desc_type_node): New #defines.
6757         (tinfo_fn_id, tinfo_fn_type): Rename to ...
6758         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
6759         (tinfo_var_id): New enumeration.
6760         (DECL_TINFO_FN_P): Augment comment.
6761         * decl.c (cp_global_trees): Adjust documentation.
6762         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
6763         tinfo_decl_type and tinfo_var_id.
6764         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
6765         (build_typeid): Remove unused variable.
6766         (get_tinfo_var): Use tinfo_var_id.
6767         (tinfo_name): New static function.
6768         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
6769         (tinfo_from_decl): Likewise.
6770         (get_base_offset): New static function, broken out of
6771         expand_class_desc.
6772         (expand_si_desc): Use tinfo_name.
6773         (expand_class_desc): Likewise. Lose local static variable.
6774         Use base_desc_type_node. Use get_base_offset.
6775         (expand_ptr_desc): Use tinfo_name.
6776         (expand_attr_desc): Likewise.
6777         (expand_generic_desc): Likewise.
6779         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
6780         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
6782 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
6784         * cp-tree.h (__eprintf): Remove declaration.
6785         * tree.c (__eprintf): Remove definition.
6787 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
6788             Mark Mitchell  <mark@codesourcery.com>
6790         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
6791         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
6793 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
6795         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
6797 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
6799         * cp-tree.h (register_dtor_fn): New function.
6800         * decl.c (destroy_local_static): Rename to ...
6801         (register_dtor_fn): ... this.  Give it external linkage.
6802         (expand_static_init): Use it.
6803         * decl2.c (do_static_initialization): Likewise, if using
6804         __cxa_atexit.
6805         (do_static_destruction): Check that __cxa_atexit is not in use.
6806         (finish_file): Don't call do_static_destruction if using
6807         __cxa_atexit.
6809         * typeck.c (convert_arguments): Restore two-message error
6810         reporting.
6812 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
6814         Remap dynamic cast hint values to be consistent across ABIs.
6815         * search.c (dynamic_cast_base_recurse): Remap generated value.
6816         (get_dynamic_cast_base_type): Adjust documentation.
6817         * tinfo.h (__user_type_info::dyncast): Likewise.
6818         (__user_type_info::find_public_subobj): Remap BOFF meaning.
6819         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
6820         (__class_type_info::do_dyncast): Likewise.
6821         (__class_type_info::do_find_public_subobj): Likewise.
6822         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
6824 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
6826         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
6828         * typeck2.c (incomplete_type_error): Restore previous
6829         cp_error and cp_error_at call sequence.
6831 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
6833         * class.c (dump_class_hierarchy): Make format agree with argument;
6834         cast pointer to unsigned long and print with %lx.
6836 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
6838         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
6840         * typeck.c (composite_pointer_type, common_type,
6841         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
6842         build_function_call_real, convert_arguments,
6843         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
6844         build_unary_op, mark_addressable, build_compound_expr,
6845         build_static_cast, build_reinterpret_cast, build_const_cast,
6846         build_c_cast, build_modify_expr, get_delta_difference,
6847         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
6848         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
6849         into a single one.
6850         * typeck2.c (readonly_error, abstract_virtuals_error,
6851         process_init_constructor, check_for_new_type): Likewise.
6853 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
6855         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
6856         VAR_DECLs.
6858 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
6860         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
6861         (build_x_typeid): Likewise.
6862         (get_tinfo_fn): Likewise.
6863         (get_tinfo_fn_unused): Rename to ...
6864         (get_tinfo_decl): ... here.
6865         * rtti.c (build_headof): Replace logic error with assertion.
6866         (get_tinfo_fn_dynamic): Rename to ...
6867         (get_tinfo_decl_dynamic): ... here. Make static. Use
6868         complete_type_or_else.
6869         (build_x_typeid): Move into ...
6870         (build_typeid): ... here. Adjust call to
6871         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
6872         throw_bad_typeid expression.
6873         (get_tinfo_fn_unused): Rename to ...
6874         (get_tinfo_decl): ... here. Adjust comment.
6875         (get_tinfo_fn): Delete.
6876         (tinfo_from_decl): New static function.
6877         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
6878         (get_typeid): Use complete_type_or_else.
6879         (build_dynamic_cast_1): Adjust calls to
6880         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
6881         * parse.y (primary): Adjust call to build_typeid.
6882         * except.c (build_eh_type_type_ref): Adjust call to
6883         get_tinfo_decl. Mark as used.
6884         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
6885         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
6886         * parse.c: Regenerated.
6888 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
6890         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
6891         calling convention.
6892         (resolves_to_fixed_type_p): Document calling convention.
6893         * rtti.c (build_x_typeid): Initialize NONNULL.
6895         * cp-tree.h (build_shared_int_cst): New function.
6896         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
6897         * class.c (modify_vtable_entry): Likewise.
6898         (add_virtual_function): Split out code to generated shared
6899         INTEGER_CSTs to build_share_int_cst.
6900         (modify_all_vtables): Handle all the overridden functions here.
6901         Add overridden functions from non-primary virtual bases to the
6902         primary vtable.
6903         (finish_struct_1): Adjust call to modify_all_vtables.  Add
6904         overridden functions from non-primary bases to the vtable.
6905         * tree.c (build_shared_int_cst): New function.
6907         * cp-tree.h (scratchalloc): Remove.
6908         (build_scratch_list): Likewise.
6909         * call.c (convert_class_to_reference): Replace build_scratch_list
6910         and build_expr_list with build_tree_list.
6911         (add_candidate): Replace scratchalloc with expralloc.  Note memory
6912         leak.
6913         (build_user_type_conversion_1):  Replace build_scratch_list
6914         and build_expr_list with build_tree_list.
6915         (build_new_op): Likewise.
6916         (build_op_delete_call): Likewise.
6917         (convert_like): Likewise.
6918         * cvt.c (ocp_convert): Likewise.
6919         * decl.c (start_decl): Likewise.
6920         (start_function): Likewise.
6921         (finish_destructor_body): Likewise.
6922         (maybe_build_cleanup_1): Likewise.
6923         * decl2.c (reparse_decl_as_expr): Likewise.
6924         * init.c (perform_member_init): Likewise.
6925         (expand_cleanup_for_base): Likewise.
6926         (build_builtin_delete_call): Likewise.
6927         (build_new_1): Likewise.
6928         (build_delete): Likewise.
6929         * method.c (do_build_assign_ref): Likewise.
6930         * parse.y (already_scoped_stmt): Likewise.
6931         (nontrivial_exprlist): Likewise.
6932         (net_initializer): Likewise.
6933         (initlist): Likewise.
6934         * parse.c: Regenerated.
6935         * rtti.c (build_x_typeid): Likewise.
6936         (build_dynamic_cast_1): Likewise.
6937         * typeck.c (build_x_compound_expr): Likewise.
6938         (build_static_cast): Likewise.
6939         (build_modify_expr): Likewise.
6941         * cp-tree.h (DECL_VINDEX): Add documentation.
6942         * class.c (build_vtable_entry): Likewise.
6943         (start_vtable): Add comment.
6944         (add_virtual_function): Replace pending_hard_virtuals with
6945         overridden_virtuals and pending_virtuals with new_virtuals.
6946         Replace redundant assignments with assertions.
6947         (check_for_override): Add comment.
6948         (check_bases_and_members): Replace pending_hard_virtuals with
6949         overridden_virtuals and pending_virtuals with new_virtuals.
6950         (create_vtbl_ptr): Likewise.
6951         (layout_class_type): Likewise.
6952         (finish_struct_1): Likewise.  Add comments.
6954 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
6956         * class.c (finish_struct_1): Replace redundant code with
6957         assertions.
6959         * cp-tree.h (flag_new_abi): Move.
6960         (flag_use_cxa_atexit): Likewise.
6961         (flag_honor_std): Likewise.
6962         (flag_rtti): Likewise.
6963         (vbase_offsets_in_vtable_p): Define.
6964         (vptrs_present_everywhere_p): Likewise.
6965         (TYPE_CONTAINS_VPTR_P): Likewise.
6966         (dfs_walk_real): Declare.
6967         * class.c (build_vbase_pointer_fields): Check
6968         vbase_offsets_in_vtable_p.
6969         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
6970         BINFO_VPTR_FIELD.
6971         (build_vbase_offset_vtbl_entries): Simplify.
6972         (build_vbase_offset_vtbl_entries): Adjust.
6973         (build_vbase_pointer): Add ability to look up vbase offsets in
6974         vtable.
6975         (start_vtable): New function.
6976         (add_virtual_function): Use it.
6977         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
6978         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
6979         (build_vtbl_initializer): Take the type of the complete object as
6980         input.  Use it to correctly calculate vbase offsets.
6981         (dfs_finish_vtbls): Pass the complete type to
6982         build_vtbl_initializer.
6983         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
6984         (create_vtable_ptr): Create a vtable even if there are no
6985         new virtual functions, under the new ABI.
6986         (finish_struct_1): Likewise.
6987         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
6988         * decl.c (exapnd_static_init): Remove call to
6989         preserve_initializer.
6990         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
6991         vtables.
6992         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
6993         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
6994         (construct_virtual_bases): Don't initialize virtual base pointers
6995         under the new ABI.
6996         (build_aggr_init): Clean up comment.
6997         (expand_aggr_init_1): Likewise.
6998         * rtti.c (expand_class_desc): Store the virtual function table
6999         index where the vbase offset lives in the offset field.
7000         * search.c (dfs_walk_real): Make it global.
7001         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
7002         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
7004         * tinfo.h (USItype): Make it signed under the new ABI.
7005         * tinfo.cc (convert_to_base): New function.  Encapsulate base
7006         conversion logic here.
7007         (__class_type_info::do_upcast): Use it.
7008         (__class_type_info::do_dyncast): Likewise.
7009         (__class_type_info::do_find_public_subobj): Likewise.
7011         * init.c (construct_virtual_bases): Don't look up the addresses of
7012         virtual bases at run-time.
7014         * class.c (build_vbase_pointer): Relocate.
7015         (build_vbase_pointer_fields): Likewise.
7016         (dfs_build_vbase_offset_vtbl_entries): Likewise.
7017         (build_vbase_offset_vtbl_entries): Likewise.
7019         * decl.c (init_decl_processing): Complain if -fnew-abi
7020         -fno-vtable-thunks is used.
7022         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
7023         flag_new_abi.
7025 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
7027         * cp-tree.h (num_extra_vtbl_entries): New function.
7028         (size_extra_vtbl_entries): Likewise.
7029         (dfs_vtable_path_unmark): Likewise.
7030         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
7031         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
7032         * class.c (num_extra_vtbl_entries): New function.
7033         (size_extra_vtbl_entries): Likewise.
7034         (dfs_build_vbase_offset_vtbl_entries): New function.
7035         (build_vbase_offset_vtbl_entries): Likewise.
7036         (build_vtbl_initializer): Use it.
7037         (finish_struct_1): Adjust vtable sizes (using
7038         num_extra_vtbl_entries).
7039         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
7040         THUNK_DECL is non-NULL before expanding it.
7041         * init.c (expand_virtual_init): Adjust the vtable pointer by
7042         size_extra_vtbl_entries before storing it.
7043         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
7044         Handle TREE_LIST parameters here, not in the dfs_* functions.
7045         (dfs_unmarked_real_bases_queue_p): Adjust.
7046         (dfs_marked_real_bases_queue_p): Likewise.
7047         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
7048         (dfs_vtable_path_marked_real_bases_queue_p): New function.
7049         (dfs_vtable_path_unmark): Likewise.
7051 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
7053         * optimize.c (copy_body_r): Clear the operand three of a
7054         TARGET_EXPR when copying it.
7056 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7058         * method.c (build_decl_overload_real): Check whether we are in ::
7059         before returning __builtin_new/delete.
7061 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
7063         * pt.c (tsubst_friend_function): Improve comment.
7064         (instantiate_decl): Avoid crashing when a "nested" function is
7065         instantiated from the top level.
7067         * dump.c (dqeueue_and_dump): Dump
7068         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
7070 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7072         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
7074 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
7076         * g++spec.c (lang_specific_driver): Add -fnew-abi if
7077         ENABLE_NEW_GXX_ABI defined.
7078         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
7079         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
7080         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
7082 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
7084         * decl.c (start_cleanup_fn): Call pushdecl.
7086         * call.c (convert_class_to_reference): Fix typos.
7087         (build_conditional_expr): Handle errors gracefully.
7088         * class.c (push_nested_class): Likewise.
7089         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
7090         (DECL_THIS_EXTERN): Use it.
7091         (DECL_THIS_STATIC): Likewise.
7092         * cvt.c (convert_to_void): Handle errors gracefully.
7093         (build_expr_type_conversion): Likewise.
7094         * decl.c (maybe_push_decl): Likewise.
7095         (start_decl_1): Likewise.
7096         (require_complete_types_for_parms): Likewise.
7097         * parse.y (structsp): Likewise.
7098         (base_class): Likewise.
7099         * parse.c: Regenerated.
7100         * pt.c (finish_member_template_decl): Likewise.
7101         * typeck.c (decay_conversion): Likewise.
7103         * cp-tree.h (dfs_skip_vbases): New function.
7104         (find_vbase_instance): Likewise.
7105         * class.c (determine_primary_base): Allow a nearly empty base to
7106         serve as a primary base class under the new ABI.
7107         (get_class_offset_1): Rename to ...
7108         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
7109         messages here.
7110         (get_class_offset): Use it.  Issue error messages here.
7111         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
7112         find the right copies of virtual bases.
7113         (fixup_vtable_deltas1): Rename to ...
7114         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
7115         bases as primary bases.
7116         (fixup_vtable_deltas): Remove.
7117         (override_one_vtable): Handle virtual bases as primary bases.
7118         (merge_overrides): Likewise.
7119         (finish_struct_1): Likewise.
7120         (dump_class_hierarchy): Dump primary-ness of bases as well.
7121         * search.c (mark_primary_bases): Use a pre-order traversal to
7122         handle primary virtual bases.
7123         (dfs_skip_vbases): New fiunction.
7124         (expand_upcast_fixups): Adjust to handle primary virtual bases.
7125         (fixup_virtual_upcast_offsets): Likewise.
7126         (fixup_all_virtual_upcast_offsets): Likewise.
7127         (dfs_find_vbase_instances): New function.
7128         (find_vbase_instance): Likewise.
7130 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
7132         * lex.c (DIR_SEPARATOR): Delete macro.
7134 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
7136        * decl2.c (lang_decode_option): Handle automatic line wrapping
7137        option.
7139 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
7141         * friend.c (do_friend): Don't resolve scopes when processing
7142         template declarations, even if the qualifying scope doesn't
7143         involve template parameters.
7145 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
7147         * class.c (dfs_modify_vtables_queue_p): Remove.
7148         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
7149         and dfs_marked_real_bases_queue_p instead of
7150         dfs_modify_vtables_queue_p.
7152         * class.c (build_vbase_path): Simplify.
7153         (dfs_propagate_binfo_offsets): New function.
7154         (propagate_binfo_offsets): Use it.
7155         (remove_base_field): Simplify.
7156         (dfs_set_offset_for_vbases): Remove.
7157         (dfs_set_offset_for_shared_vbases): New function.
7158         (dfs_set_offset_for_unshared_vbases): Likewise.
7159         (layout_virtual_bases): Use them.
7160         (layout_basetypes): Don't call propagate_binfo_offsets.
7161         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
7162         for the vbases.
7164         * class.c (build_base_field): New function, split out from ...
7165         (build_base_fields): ... here.  Use it.  Allocate primary bases
7166         first, under the new ABI.
7167         (get_vtable_entry): Remove.
7168         (remove_base_field): New function, split out from ...
7169         (remove_base_fields): ... here.  Adjust since primary bases come
7170         first under the new ABI.
7172         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
7173         (initialize_vtbl_ptrs): New function.
7174         (expand_indirect_vtbls_init): Change prototype.
7175         (convert_pointer_to_vbase): Declare.
7176         * init.c (expand_direct_vtbls_init): Remove.
7177         (dfs_initialize_vtbl_ptrs): New function.
7178         (initialize_vtbl_ptrs): Likewise.
7179         (emit_base_init): Use initialize_vtbl_ptrs.
7180         * search.c (convert_pointer_to_vbase): Make it global.
7181         (expand_indirect_vtbls_init): Remove vtable initialization code.
7182         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
7184         * class.c (dfs_finish_vtbls): New function.
7185         (finish_vtbls): Use it.
7186         (dump_class_hierarchy): New function.
7188         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
7189         (BINFO_VBASE_PRIMARY_P): New macro.
7190         (BINFO_VIRTUALS): Add to documentation.
7191         (SET_BINFO_PRIMARY_MARKED_P): Remove.
7192         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7193         (dfs_mark_primary_bases_queue_p): Likewise.
7194         (dfs_unmarked_real_bases_queue_p): New function.
7195         (dfs_marked_real_bases_queue_p): Likewise.
7196         * search.c (dfs_mark_primary_bases): Adjust.
7197         (mark_primary_bases): Likewise.
7198         (get_shared_vbase_if_not_primary): New function.
7199         (dfs_unmarked_real_bases_queue_p): Likewise.
7200         (dfs_marked_real_bases_queue_p): Likewise.
7201         (dfs_get_pure_virtuals): Simplify.
7202         (get_pure_virtuals): Likewise.
7204 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7206         * lex.c: Include tm_p.h.
7208 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
7210         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
7212 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
7214         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
7215         * pt.c (instantiate_decl): Defer comdat templates that might not be
7216         needed.
7218         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
7219         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
7220         (finish_file): Likewise.
7222         * decl2.c (import_export_class): Undo 12/14 change.
7224         * error.c (dump_decl): operator new, not operatornew.
7226         * class.c (field_decl_cmp): A nontype is "greater" than a type.
7227         * search.c (lookup_field_1): Look for the last field with the
7228         desired name.
7230 2000-01-05  Nathan Sidwell  <nathan@acm.org>
7232         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
7233         FUNCTION_DECL.
7235 2000-01-05  Nathan Sidwell  <nathan@acm.org>
7237         * typeck.c (build_static_cast): Don't strip target qualifiers
7238         when casting from a class.
7240 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7242         * class.c (warn_hidden): Initialize variable `fndecl'.
7244 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
7246         * decl.c (flag_isoc9x): New variable to be able to use code in
7247         c-common.c.  For now always zero.
7249 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
7251         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
7252         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
7253         or unshare_base_binfos for virtual bases here.
7254         * search.c (dfs_get_vbase_types): Do it here.
7255         (get_vbase_types): Adjust.
7257 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
7259         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
7260         (BINFO_PRIMARY_MARKED_P): Use flag 5.
7261         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
7262         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7263         (unmark_primary_bases): Remove declaration.
7264         (unmarkedp): Declare.
7265         (dfs_vbase_unmark): Likewise.
7266         * class.c (determine_primary_base): Return immediately if there
7267         are no base classes.  Call mark_primary_bases here.
7268         (modify_all_direct_vtables): Remove.
7269         (modify_all_indirect_vtables): Remove.
7270         (dfs_modify_vtables_queue_p): New function.
7271         (dfs_modify_vtables): New function.
7272         (modify_all_vtables): Use them.
7273         (build_base_fields): Build FIELD_DECLs for primary virtual base
7274         classes.
7275         (create_vtable_ptr): Don't call determine_primary_base here.
7276         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
7277         (dfs_set_offset_for_vbases): ... this.
7278         (layout_virtual_bases): Use it.
7279         (layout_class_type): Call determine_primary_base here.
7280         * search.c (unmarkedp): Make it global.
7281         (shared_marked_p): Simplify.
7282         (shared_unmarked_p): Likewise.
7283         (dfs_primary_bases_queue_p): Remove.
7284         (dfs_unmark_primary_bases): Likewise.
7285         (unmark_primary_bases): Likewise.
7286         (mark_primary_bases): Simplify.
7287         (get_pure_virtuals): Don't call mark_primary_bases here.
7288         (dfs_vbase_unmark): New function.
7289         (get_vbase_types): Simplify.
7291         * class.c (struct base_info): Remove.
7292         (determine_primary_base): Take has_virtual_p rather than a
7293         base_info as input.  Don't calculate max_has_virtual.
7294         (finish_struct_bits): Remove max_has_virtual argument.
7295         (create_vtable_ptr): Remove max_has_virtual_p argument.
7296         (layout_virtual_bases): Remove max argument.
7297         (layout_basetypes): Likewise.
7298         (layout_class_type): Remove max_has_virtual_p argument.
7299         (finish_struct_1): Remove max_has_virtual.
7301         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
7302         (layout_basetypes): Remove.
7303         * class.c (propagate_binfo_offsets): Moved here from tree.c.
7304         Update to handle primary virtual bases.
7305         (remove_base_fields): New function, split out from
7306         layout_basetypes.
7307         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
7308         (layout_virtual_bases): New function, split out from
7309         layout_basetypes.  Update to handle primary virtual bases.
7310         (layout_basetypes): Moved here from tree.c.  Use
7311         remove_base_fields and layout_virtual_bases.
7312         * search.c (dfs_mark_primary_bases_queue_p): New function.
7313         (mark_primary_bases): Use it.
7314         * tree.c (CEIL): Remove.
7315         (propagate_binfo_offsets): Remove.
7316         (layout_basetypes): Remove.
7318 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
7320         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
7321         (BINFO_PRIMARY_MARKED_P): New macro.
7322         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
7323         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7324         (mark_primary_bases): New function.
7325         (unmark_primary_bases): Likewise.
7326         * search.c (get_abstract_virtuals_1): Remove.
7327         (dfs_mark_primary_bases): New function.
7328         (mark_primary_bases): Likewise.
7329         (dfs_unmark_primary_bases): Likewise.
7330         (unmark_primary_bases): Likewise.
7331         (dfs_get_pure_virtuals): Likewise.
7333 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
7335         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
7336         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
7337         (modify_one_vtable): Adjust.
7338         (fixup_vtable_deltas1): Likewise.
7339         (override_one_vtable): Likewise.
7340         * search.c (get_abstract_virtuals_1): Likewise.
7341         (get_pure_virtuals): Likewise.
7342         (expand_upcast_fixups): Likewise.
7343         * tree.c (debug_binfo): Likewise.
7345         * class.c (build_vtable): Don't return a value.  Don't rebuild
7346         vtables for bases that have already been handled.
7347         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
7348         already been handled.
7349         (modify_one_vtable): Adjust accordingly.
7350         (fixup_vtable_deltas1): Likewise.
7351         (finish_struct_1): Likewise.
7353 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7355         * call.c (build_new_method_call): Also check destructors.