* configure.in: Arrange to include defaults.h in [ht]config.h/tm.h.
[official-gcc.git] / gcc / cp / ChangeLog
blob6c2093c67d5026c5f6ed1eefaea27a03adab13ec
1 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3         * Make-lang.in: Remove all dependencies on defaults.h.
4         * call.c: Don't include defaults.h.
5         * decl.c: Likewise.
6         * decl2.c: Likewise.
7         * except.c: Likewise.
8         * pt.c: Likewise.
9         * rtti.c: Likewise.
10         * tree.c: Likewise.
11         * typeck.c: Likewise.
13 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
15         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
16         operators even in "C" linkage.
17         * method.c (set_mangled_name_for_decl): Likewise.
18         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
19         overloaded operators in "C" linkage.
21 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
23         * pt.c (tsubst_decl): Remove IN_DECL parameter.
24         (tsubst_arg_types): Check parameter is not void.
25         (tsubst): Adjust tsubst_decl call.
27 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
29         * call.c (add_builtin_candidate): Quote std properly, from
30         previous change.
32 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
34         * pt.c (check_explicit_specialization): Clone constructors and
35         destructors.
37 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
39         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
40         indicates anything special about template depth. Make sure we
41         only count the user visible template classes.
43 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
45         * call.c (build_conv): Typo in comment.
46         (add_builtin_candidate): Add more explanation.
47         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
48         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
49         when we have enumeral types.
50         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
51         candidates for relops and eqops.
52         (joust): Simplify control flow. Allow a non-template user
53         function to hide a builtin.
55 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
57         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
58         (more_specialized): Add deduction parameter.
59         * call.c (joust): Adjust more_specialized call.
60         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
61         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
62         (get_bindings_order): Remove.
63         (get_bindings_real): Add DEDUCE parameter.
64         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
65         REFERENCE_TYPE jig for DEDUCE_ORDER.
66         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
67         maybe_adjust_types_for_deduction.
68         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
69         directly.
70         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
71         (check_cv_quals_for_unify): Use new unify qualifier flags.
72         (unify): Clear new unify qualifier flags.
73         (get_bindings_real): Add DEDUCE parameter.
74         (get_bindings): Adjust call to get_bindings_real.
75         (get_bindings_overload): Likewise.
76         (most_specialized_instantiation): Adjust call to
77         more_specialized.
79 2001-01-19  Jason Merrill  <jason@redhat.com>
81         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
83         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
84         -fnew-abi.
86 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
88         * decl2.c (arg_assoc_class): Fix double iteration logic.
90 2001-01-19  Jason Merrill  <jason@redhat.com>
92         * init.c (build_delete): Always call convert_force to strip cv-quals.
94         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
95         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
96         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
98 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
100         * search.c (get_vbase_1): Count only virtual bases.
102 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
104         * class.c (duplicate_tag_error): Robustify flag clearing.
106 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
108         * cp-tree.h (lookup_template_class): Add complain parm.
109         * decl.c (lookup_namespace_name): Adjust call to
110         lookup_template_class.
111         (make_typename_type): Likewise.
112         * semantics.c (finish_template_type): Likewise.
113         * pt.c (lookup_template_class): Add complain parm. Adjust.
114         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
115         (tsubst): Likewise.
117 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
119         * pt.c (copy_default_args_to_explicit_spec): Preserve
120         object's CV quals. Reorganize.
122 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
124         * typeck.c (build_modify_expr): Say `initialization' for
125         INIT_EXPRs.
126         * init.c (build_default_init): Convert to enumeral type, if
127         needed.
129 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
131         * parse.y (nomods_initdcl0): Properly set things up for
132         initdcl0_innards.
134 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
136         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
137         (type_unification_real): Set it.
138         (unify): Use it.
140 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
142         * decl.c (finish_destructor_body): Convert to vbase pointer here.
144 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
146         * semantics.c (begin_class_definition): Check we're not inside a
147         template parm list.
149 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
151         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
152         BASELINK_P.
154 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
156         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
157         * call.c (build_over_call): Add comment.
159 2001-01-16 Daniel Berlin <dberlin@redhat.com>
161         * cvt.c (ocp_convert): Handle vector type conversion
162         * typeck2.c (digest_init): Handle vector type initializations
163                 
164 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
166         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
167           was given.
169 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
171         * pt.c (check_nontype_parm): Rename to ...
172         (invalid_nontype_parm_type_p): ... here.
173         (process_template_parm): Adjust.
174         (convert_template_argument): Adjust.
176 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
178         * pt.c (check_nontype_parm): New function.
179         (process_template_parm): Use it.
180         (convert_template_argument): Use it.
181         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
182         member.
184 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
186         * tree.c: Add defaults.h
187         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
188         * Make-lang.in (cp/tree.o): Add defaults.h.
190 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
192         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
194 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
196         * g++.1: Change to be ".so man1/gcc.1".
198 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
200         * Make-lang.in (c++.info, c++.install-info): Build and install g++
201         internals info.
202         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
203         ($(srcdir)/cp/g++int.info): New target.
204         * gxxint.texi: Add info directory entry.  Use @@ in email address.
205         * .cvsignore: Update.
207 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
209         * typeck.c (build_c_cast): Do template processing earlier.
210         Always pedwarn on array casts.
212 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
214         * friend.c (make_friend_class): Make sure a templated class is
215         actually a template.
217 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
219         * decl2.c (get_guard): Set linkage from guarded decl.
221 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
223         * call.c (convert_default_arg): Check for unprocessed
224         DEFAULT_ARG.
225         * cp-tree.h (replace_defarg): Move to spew.c.
226         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
227         spew.c, which is where they really are.
228         (done_pending_defargs): Declare.
229         (unprocessed_defarg_fn): Declare.
230         * decl.c (replace_defarg): Move to spew.c
231         * parse.y (structsp): Call done_pending_defargs.
232         * spew.c (defarg_fns): Rearrange list structure.
233         (defarg_fnsdone): New static variable.
234         (defarg_depfns): New static variable.
235         (init_spew): Adjust.
236         (add_defarg_fn): Store the type in TREE_TYPE.
237         (do_pending_defargs): Detect and deal with ordering constraints
238         and circularity.
239         (done_pending_defargs): New function.
240         (unprocessed_defarg_fn): New function.
241         (replace_defarg): Moved from decl.c. Robustify. Don't save
242         if circularity detected.
244 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
246         * pt.c (unify): Check array has a domain, before checking
247         whether it is variable sized.
249 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
251         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
252         parameters with pointers to arrays of unknown bound.
254 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
256         * parse.y (template_parm_header, template_spec_header): New
257         reductions. Split out from ...
258         (template_header): ... here. Use them.
259         (template_template_parm): Use template_parm_header.
260         * semantics.c (finish_template_template_parm): Add assert.
262 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
264         * mangle.c (write_builtin_type): Fix thinko.
266         * pt.c (copy_default_args_to_explicit_spec_1): New function.
267         (copy_default_args_to_explicit_spec): Likewise.
268         (check_explicit_specialization): Use it.
270         * class.c (finish_struct_1):  Remove last argument in call to
271         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
272         * decl.c (builtin_function): Likewise.
273         (build_cp_library_fn): Likewise.
274         (check_initializer): Likewise.
275         (make_rtl_for_nonlocal_decl): Likewise.
276         (cp_finish_decl): Likewise.
277         (start_function): Likewise.
278         * decl2.c (finish_anon_union): Likewise.
279         * friend.c (do_friend): Likewise.
280         * init.c (build_java_class_ref): Likewise.
281         * method.c (make_thunk): Likewise.
282         * pt.c (tsubst_friend_function): Likewise.
283         * semantics.c (expand_body): Likewise.
285 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
287         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
288         looking at DECL_CLONED_FUNCTION for non-functions.
290 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
292         * error.c (dump_template_parameter): Use parm to determine how
293         to print default value.
295 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
297         * class.c (duplicate_tag_error): Clear more flags.
299 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
301         * call.c (build_new_method_call): Use binfo_for_vbase.
303 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
305         * cp-tree.h (flag_cond_mismatch): Don't declare.
306         * decl2.c (flag_cond_mismatch): Don't define.
307         (lang_f_options): Remove cond-mismatch.
308         (unsupported_options): Add cond-mismatch.
310 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
312         * class.c (handle_using_decl): Reject using of constructor name
313         of sourcing class. Allow injecting of a method with same name as
314         nested class. Fixup error messages.
316 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
318         * decl2.c (lang_decode_option): Handle -Wformat=2.
320 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
322         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
323         initialized_in_class.
324         (DECL_DEFINED_IN_CLASS_P): Rename to ...
325         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
326         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
327         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
328         * pt.c (check_default_tmpl_args): Adjust for
329         DECL_INITIALIZED_IN_CLASS_P.
330         (instantiate_class_template): Likewise.
331         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
332         
333         * class.c (finish_struct): Constify saved_filename.
335 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
337         * class.c (duplicate_tag_error): Adjust diagnostic.
338         (finish_struct): Locally set location to start of struct.
339         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
341 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
343         * decl.c (struct binding_level): Adjust class_shadowed comments
344         to reflect reality.
345         (push_class_level_binding): Ajust comments to reflect reality.
346         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
347         Don't set TREE_VALUE on the class_shadowed list.
349 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
351         * decl2.c (acceptable_java_type): Allow references too. 
352         * init.c (build_java_class_ref): When using the new ABI, search
353         `class$' and have it mangled with `mangle_decl.'
354         * mangle.c (write_java_integer_type_codes): New function.
355         (write_builtin_type): Detect and mangle Java integer and real
356         types.
358 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
360         * decl2.c (grokfield): Don't accept `asm' specifiers for
361         non-static data members.
363 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
365         * expr.c (cplus_expand_expr): Don't reset `target'.
367 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
369         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
371 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
373         * parse.y (template_datadef): Check for error_mark_node.
375 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
377         * cp-tree.def (DEFAULT_ARG): Make `x' class.
379 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
381         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
382         (record_builtin_type): Make non-static.
383         (flag_short_double): Don't declare.
384         (init_decl_processing): Remove the creation of many tree nodes now
385         in c_common_nodes_and_builtins.
386         (build_void_list_node): New function.
387         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
388         * cp-tree.h (flag_short_wchar): Don't declare.
390 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
392         * call.c (build_conv): Don't use build1 for USER_CONV.
393         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
395 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
397         * lex.c (lang_init): Call c_common_lang_init.
399 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
401         * search.c (lookup_fnfields_here): Remove.
402         (look_for_overrides_r): Use lookup_fnfields_1.
403         Ignore functions from using declarations.
405 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
407         Implement exceptions specifiers for implicit member functions.
408         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
409         * method.c (synthesize_exception_spec): New function.
410         (locate_dtor, locate_ctor, locate_copy): New functions.
411         (implicitly_declare_fn): Generate the exception spec too.
412         * search.c (check_final_overrider): Check artificial functions
413         too.
414         * typeck2.c (merge_exception_specifiers): New function. 
416 2001-01-03  Jason Merrill  <jason@redhat.com>
418         * init.c (build_default_init): New fn.
419         (perform_member_init): Split out from here.
420         (build_new_1): Use it.  Simplify initialization logic.
421         (build_vec_init): Take an array, rather than a pointer and maxindex.
422         Speed up simple initializations.  Don't clean up if we're assigning.
423         * cp-tree.h: Adjust.
424         * decl2.c (do_static_initialization): Remove TREE_VEC case.
425         * parse.y (new_initializer): Return void_zero_node for ().
426         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
427         * typeck2.c (digest_init): Only complain about user-written
428         CONSTRUCTORs.
430 2000-12-22  Mike Stump  <mrs@wrs.com>
432         * decl2.c: (max_tinst_depth): Increase to 50.
434 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
436         * class.c (invalidate_class_lookup_cache): Zero the
437         previous_class_values.
438         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
439         TREE_INT_CST_HIGH.
440         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
441         * decl.c (free_bindings): New variable.
442         (push_binding): Don't create a new binding if we have one on the
443         free list.
444         (pop_binding): Put old bindings on the free list.
445         (init_decl_processing): Use size_int, not build_int_2.
446         Register free_bindings as a GC root.
447         (cp_make_fname_decl): Use size_int, not build_int_2.
448         (push_inline_template_parms_recursive): Likewise.
449         (end_template_parm_list): Likewise.
450         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
451         (tsubst_template_parms): Use size_int, not build_int_2.
452         (tsubst): Likewise.
453         * rtti.c (get_vmi_pseudo_type_info): Likewise.
454         
455 2001-01-02  Richard Henderson  <rth@redhat.com>
457         * parse.y (asm): Set ASM_INPUT_P.
459 2001-01-02  Jason Merrill  <jason@redhat.com>
461         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
462         for v3 ABI.
464         * typeck.c (cp_truthvalue_conversion): New fn.
465         * cvt.c (ocp_convert): Use it.
467         * cp-tree.h: Lose c-common.c decls.
469         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
470         * cvt.c (convert_to_void): Use type_unknown_p.
472         * typeck.c (strip_all_pointer_quals): Also strip quals from 
473         pointer-to-member types.
475         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
476         parse.y as C.
478         * call.c (build_new_method_call): Do evaluate the object parameter
479         when accessing a static member.
480         * typeck.c (build_component_ref): Likewise.
482 2001-01-02  Andreas Jaeger  <aj@suse.de>
484         * decl.c (cp_missing_noreturn_ok_p): New.
485         (init_decl_processing): Set lang_missing_noreturn_ok_p.
487 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
489         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
491 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
493         * class.c (pushclass): Remove #if 0'd code.
494         * cp-tree.h (overload_template_name): Remove.
495         * decl.c (store_bindings): Simplify.
496         (pop_from_top_level): Likewise.
497         * pt.c (overload_template_name): Remove.
498         (instantiate_decl): Don't call push_to_top_level if it's not
499         needed.
501 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
503         * pt.c (register_local_specialization): Don't return a value.
504         (lookup_template_class): Use move-to-front heuristic when looking
505         up template instantiations.
506         (instantiate_decl): Only push_to_top_level when we're actually
507         going to instantiate the template.
509 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
511         * search.c (binfo_for_vtable): Return least derived class, not
512         most.  Handle secondary vtables.
514 2000-12-22  Jason Merrill  <jason@redhat.com>
516         * pt.c (more_specialized): Don't optimize len==0.
517         (fn_type_unification): If we're adding the return type, increase len.
519         * typeck.c (build_binary_op): Fix pmf comparison logic.
521         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
522         DECL_STATIC_FUNCTION_P.
524         * semantics.c (genrtl_finish_function): Don't try to jump to
525         return_label unless it exists.
527         In partial ordering for a call, ignore parms for which we don't have
528         a real argument.
529         * call.c (joust): Pass len to more_specialized.
530         (add_template_candidate_real): Strip 'this', pass len.
531         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
532         (get_bindings_order): New fn.  Pass len down.
533         (get_bindings_real): Strip 'this', pass len.
534         (fn_type_unification): Likewise.
535         (type_unification_real): Succeed after checking 'len' args.
536         (most_specialized_instantiation): Lose explicit_args parm.
537         * class.c (resolve_address_of_overloaded_function): Strip 'this',
538         pass len.
540 2000-12-21  Jason Merrill  <jason@redhat.com>
542         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
543         DECL_TEMPLATE_RESULT.
545         * search.c (lookup_field_r): Call lookup_fnfields_1, not
546         lookup_fnfields_here.
548         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
550         * call.c (build_object_call): Also allow conversions that return
551         reference to pointer to function.
552         (add_conv_candidate): Handle totype being ref to ptr to fn.
553         (build_field_call): Also allow members of type reference to function.
554         Lose support for calling pointer to METHOD_TYPE fields.
556         * error.c (dump_expr): Handle *_CAST_EXPR.
558         * typeck2.c (build_scoped_ref): Always convert to the naming class.
560         * tree.c (break_out_cleanups): Lose.
561         * cp-tree.h: Remove prototype.
562         * typeck.c (build_component_ref): Don't break_out_cleanups.
563         (build_compound_expr): Likewise.
564         * semantics.c (finish_expr_stmt): Likewise.
566 2000-12-20  Richard Henderson  <rth@redhat.com>
568         * cp-tree.h: Update declarations.
569         * decl.c (finish_case_label): Return the new stmt node.
570         * semantics.c (finish_goto_stmt): Likewise.
571         (finish_expr_stmt, finish_return_stmt): Likewise.
572         (finish_break_stmt, finish_continue_stmt): Likewise.
573         (finish_asm_stmt): Likewise.
574         * parse.y (already_scoped_stmt): Set STMT_LINENO.
575         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
576         (simple_if, simple_stmt): Return the new stmt node.
577         (save_lineno): New.
579 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
581         * cp-tree.h: Don't declare warn_long_long.
583 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
585         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
586         IS_AGGR_TYPE.
588 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
590         * pt.c (unify): Handle when both ARG and PARM are
591         BOUND_TEMPLATE_TEMPLATE_PARM.
593 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
595         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
596         DECL_TEMPLATE_PARM_P.
598 2000-12-15  Jason Merrill  <jason@redhat.com>
600         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
602         * init.c (build_new_1): Don't strip quals from type.
604         * decl.c (pushdecl): Don't check for linkage on a non-decl.
606         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
608         * call.c (build_new_function_call): Lose space before paren in
609         error message.
610         (build_new_method_call): Likewise.
612         * typeck2.c (build_m_component_ref): Propagate quals from datum.
614 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
616         * pt.c (check_explicit_specialization): Propagate default
617         function arguments to explicit specializations.
619 2000-12-13  DJ Delorie  <dj@redhat.com>
621         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
622         and <? operators.
624 2000-12-08  Jason Merrill  <jason@redhat.com>
626         * error.c (dump_function_name): Don't let the user see __comp_ctor.
628         Clean up copy-initialization in overloading code.
629         * call.c (build_user_type_conversion_1): Die if we are asked to
630         convert to the same or a base type.
631         (implicit_conversion): Avoid doing so.  Lose reference binding code.
632         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
633         direct-initialization.  Also do direct-init part of copy-init.
634         (build_user_type_conversion): Don't provide context to convert_like.
635         * cvt.c (ocp_convert): build_user_type_conversion will now provide
636         the constructor call for copy-init.
638         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
639         instantiation of a member template.
640         (do_decl_instantiation): Not here.
642 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
644         * class.c (check_field_decls): Don't special case anonymous
645         fields in error messages.
646         (note_name_declared_in_class): Use %D on diagnostic.
648         * tree.c (pod_type_p): Use strip_array_types.
649         (cp_valid_lang_attribute): Likewise.
650         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
651         multiple evaluations.
652         (cp_has_mutable_p): Use strip_array_types.
654 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
656         * cp-tree.h (sufficient_parms_p): Declare new function.
657         * call.c (sufficient_parms_p): New function, broken out of ...
658         (add_function_candidate): ... here. Use it.
659         (add_conv_candidate): Use it.
660         * decl.c (grok_ctor_properties): Use it.
662 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
664         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
666 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
668         * decl2.c (lang_decode_option): Handle -Wformat-security.
670 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
672         * pt.c (verify_class_unification): New function.
673         (get_class_bindings): Use it.
674         (try_class_unification): Tidy.
675         (unify): Handle when argument of a template-id is not
676         template parameter dependent.
677         (template_args_equal): Handle when TREE_CODE's do not match.
679 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
681         * lang-specs.h (c++): When invoking the stand-alone preprocessor
682         for -save-temps, pass all relevant -Defines to it, and then don't
683         pass them to cc1plus.
685 2000-12-05  Will Cohen  <wcohen@redhat.com>
687         * decl.c (finish_case_label): Cleared
688         more_cleanups_ok in surrounding function scopes.
689         (define_label): Likewise.
691 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
693         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
694         (get_matching_virtual): Remove.
695         (look_for_overrides): Declare new function.
696         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
697         DECL_VINDEX here.
698         * class.c (check_for_override): Move base class iteration code
699         to look_for_overrides.
700         * search.c (next_baselink): Remove.
701         (get_virtuals_named_this): Remove.
702         (get_virtual_destructor): Remove.
703         (tree_has_any_destructors_p): Remove.
704         (struct gvnt_info): Remove.
705         (check_final_overrider): Remove `virtual' from error messages.
706         (get_matching_virtuals): Remove. Move functionality to ...
707         (look_for_overrides): ... here, and ...
708         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
709         to be overriding.
711 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
713         * typeck.c (get_delta_difference): If via a virtual base,
714         return zero.
715         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
716         adjustment.
718 2000-12-04  Richard Henderson  <rth@redhat.com>
720         * error.c (dump_tree): Use output_add_string not OB_PUTS.
722 2000-12-04  Jason Merrill  <jason@redhat.com>
724         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
725         (write_builtin_type): Pass intSI_type_node and the like through
726         type_for_mode.
727         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
728         Pass intSI_type_node and the like through type_for_mode.
729         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
730         * pt.c (tsubst, unify): Likewise.
731         * tree.c (walk_tree): Likewise.
732         * error.c (dump_type): Likewise.
733         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
735         * Make-lang.in: Tweak top comment for emacs.
736         (cp/TAGS): Restore.
738         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
740         * class.c (clone_function_decl): Robustify.
742 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
744         * decl.c (store_bindings): Only search in the non modified
745         old_bindings for duplicates.
747 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
749         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
750         TYPE_POLYMORPHIC_P.
752         * typeck.c (build_static_cast): Remove unused variable.
754 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
756         * pt.c: Fix typo in comment.
758 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
760         * decl2.c (warn_format): Remove definition.
761         (lang_decode_option): Handle -Wformat-nonliteral,
762         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
764 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
766         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
767         (init_decl_processing): Don't create string_type_node,
768         const_string_type_node, wint_type_node, intmax_type_node,
769         uintmax_type_node, default_function_type, ptrdiff_type_node and
770         unsigned_ptrdiff_type_node.  Adjust position of call to
771         c_common_nodes_and_builtins.
772         (identifier_global_value): New function.
774 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
776         * call.c (standard_conversion): Reject pointer to member
777         conversions from ambiguous, inaccessible or virtual bases.
778         * typeck.c (build_static_cast): Don't check pointers to members
779         specially.
781 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
783         * method.c (do_build_copy_constructor): Preserve cv
784         qualifications when accessing source object members.
785         (do_build_assign_ref): Likewise. Remove separate diagnostics for
786         unnamed fields.
788 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
790         * method.c (do_build_assign_ref): Construct appropriately
791         CV-qualified base reference. Don't allow const casts in base
792         conversion.
794 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
796         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
797         incomplete return type.
799 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
801         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
802         * semantics.c (finish_base_specifier): Accept a _TYPE not a
803         _DECL.
805 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
807         * spew.c (yyerror): Cope if yylval.ttype is NULL.
809 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
811         * decl.c (grokdeclarator): Diagnose undefined template contexts.
813 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
815         * decl.c (grokdeclarator): Do type access control on friend
816         class.
818 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
820         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
821         bison parser ickiness.
822         * pt.c (tsubst_friend_function): Enter namespace scope when
823         tsubsting the function name.
824         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
826 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
828         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
829         * cvt.c (cp_convert_to_pointer): Add force parameter.
830         Allow conversions via virtual base if forced.
831         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
832         (ocp_convert): Likewise.
833         * search.c (binfo_from_vbase): Return the virtual base's binfo.
834         * typeck.c (get_delta_difference): Adjust handling of virtual
835         bases.
837 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
839         * tree.c (struct list_hash): Remove.
840         (list_hash_table): Make it be an htab.
841         (struct list_proxy): New type.
842         (list_hash_eq): New function.
843         (list_hash_pieces): Renamed from ...
844         (list_hash): ... this.
845         (list_hash_lookup): Remove.
846         (list_hash_add): Remove.
847         (hash_tree_cons): Use the generic hashtable.
848         (mark_list_hash): Remove.
849         (init_tree): Create the hashtable.
851 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
853         * method.c (build_mangled_C9x_name): Rename to
854         build_mangled_C99_name.  Change C9X references in comments to
855         refer to C99.
857 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
859         * parse.y (unary_expr): Move VA_ARG from here ...
860         (primary): ... to here.
862 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
864         * semantics.c (finish_id_expr): If type is error_mark, return
865         error_mark.
867 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
869         * pt.c (lookup_template_class): Simplify loop exit constructs.
870         Cope when there is no partial instantiation of a template
871         template member.
873 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
875         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
877 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
879         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
880         prefix.
882         * pt.c (do_decl_instantiate): Explicitly clone constructors and
883         destructors that haven't already been cloned.
885 2000-11-20  Richard Henderson  <rth@redhat.com>
887         * parse.y (yyparse_1): Rename the parser entry point.
889 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
891         * mangle.c (write_name): Use <unscoped-name> for names directly in
892         function scope.
893         (write_unscoped_name): Accept names directly in function scope.
895 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
897         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
898         * parse.y (extdef): Add EXPORT reduction.
899         * spew.c (yylex): Don't skip export here.
901 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
903         * decl.c (init_decl_processing): Correct name of pure virtual
904         function under the new ABI.
905         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
906         (throw_bad_typeid): Likewise for bad typeid function.
908 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
910         * decl.c (grokparms): Don't even function types of `void' type,
911         either.
912         * mangle.c (write_type): Don't crash when confronted with the
913         error_mark_node.
915         * decl.c (grokparms): Don't create parameters of `void' type.
917 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
919         * lex.c (mark_impl_file_chain): Delete.
920         (init_parse): Remove call to ggc_add_string_root.  No need to
921         ggc_strdup a string constant.  Do not add impl_file_chain to GC
922         roots.
923         (handle_pragma_implementation): No need to ggc_strdup main_filename.
925 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
927         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
929 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
931         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
932         * decl.c (grokdeclarator): Don't reject void parms here.
933         (require_complete_types_for_parms): Simplify, use
934         complete_type_or_else.
935         (grokparms): Remove bitrot. Remove funcdef parm.
936         Deal with ellipsis parm lists here.
937         * semantics.c (finish_parmlist): Don't append void_list_node
938         here. Set PARMLIST_ELLIPSIS_P.
940 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
942         * typeck2.c (incomplete_type_error): Reorganise to avoid
943         excessive diagnostics.
945 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
947         * lex.c (struct impl_files, internal_filename): Constify a char *.
949 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
951         * mangle.c (write_special_name_constructor): Don't generate
952         assembler junk when confronted with an old-style constructor.
953         (write_special_name_destructor): Likewise.
954         (mangle_decl_string): Do it here instead.
956 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
958         * call.c (op_error): Make error messages clearer.
960 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
962         * decl.c (wrapup_globals_for_namespace): Don't mark things
963         TREE_ASM_WRITTEN when they're not.
965 2000-11-15  Jason Merrill  <jason@redhat.com>
967         * typeck2.c (friendly_abort): Uncount the error before handing
968         off to fancy_abort.
970 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
972         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
974 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
976         * class.c (build_vtbl_initializer): Fix typo in comment.
977         * typeck.c (expr_sizeof): Don't crash on errors.
979 2000-11-14  Jim Wilson  <wilson@redhat.com>
981         * lang-specs.h: Add %2 after %(cc1_options).
983 2000-11-14  Richard Henderson  <rth@redhat.com>
985         * typeck.c (c_sizeof): Be strict about casting result value
986         back to c_size_type_node.
987         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
989 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
991         * typeck.c (build_unary_op): Use boolean_increment from
992         c-common.c, moving the relevant code there.
994 2000-11-11  Jason Merrill  <jason@redhat.com>
996         * typeck.c (mark_addressable): Don't call put_var_into_stack.
998         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
999         in inlines.
1001 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1003         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
1004         * lex.c (copy_lang_decl): Likewise.
1006 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
1008         * dump.c (cp_dump_tree): Don't dump function bodies here.
1010         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
1011         (dump.o): Update dependency list.
1012         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
1013         (flag_dump_translation_unit): Likewise.
1014         (CP_TYPE_QUALS): Adjust definition.
1015         (DECL_C_BIT_FIELD): Remove.
1016         (SET_DECL_C_BIT_FIELD): Likewise.
1017         (CLEAR_DECL_C_BIT_FIELD): Likewise.
1018         (add_maybe_template): Likewise.
1019         (strip_array_types): Likewise.
1020         (dump_node_to_file): Likewise.
1021         (cp_dump_tree): New function.
1022         * decl.c (init_decl_processing): Set lang_dump_tree.
1023         * decl2.c (flag_dump_translation_unit): Remove.
1024         * dump.c: Move most of it to ../c-dump.c.
1025         (cp_dump_tree): New function.
1026         * pt.c (add_maybe_template): Remove.
1027         * typeck.c (strip_array_types): Likewise.
1029 2000-11-07  Eric Christopher  <echristo@redhat.com>
1031         * decl.c (init_decl_processing): Change definition of
1032         __wchar_t to wchar_t.  Remove artificial declaration of
1033         wchar_t.
1034         * lex.c: Change instances of __wchar_t to wchar_t.
1036 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
1038         * lex.c (do_identifier): Don't lookup_name for operators.
1039         * parse.y (operator): Save looking_for_typename.
1040         (unoperator): Restore it.
1041         * spew.c (frob_opname): Use nth_token for lookahead.
1043 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
1045         * decl.c (grok_op_properties): Always use coerce_new_type and
1046         coerce_delete_type.
1047         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
1048         exception specification. Tidy up.
1049         (coerce_delete_type): Preserve exception specification. Tidy up.
1051 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
1053         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
1054         (push_binding_level), error.c (cp_tree_printer), pt.c
1055         (process_partial_specialization, tsubst_template_arg_vector),
1056         search.c (lookup_member): Use memset () instead of bzero ().
1058 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
1060         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
1062 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
1064         * Make-lang.in (c++.distdir): Remove.
1066 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
1068         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
1069         declarations from different namespaces to be combined.
1071 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
1073         * decl.c: Include tm_p.h.
1075 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
1077         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
1079 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
1081         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
1082         (build_overload_value), repo.c (open_repo_file), xref.c
1083         (open_xref_file): Use strchr () and strrchr () instead of index ()
1084         and rindex ().
1086 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
1088         * call.c (build_over_call): Call fold on the CALL_EXPR.
1090 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
1092         * error.c (dump_template_decl): Separate template hearders with
1093         space not comma.
1095 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
1097         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
1098         TS_* flags with corresponding TFF_*.  Adjust prototypes of
1099         functions (which used to take a tree_string_flags) to take an int.
1101         * cp-tree.h (enum tree_string_flags): Remove
1102         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
1103         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
1104         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
1105         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
1106         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
1107         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
1108         (type_as_string, decl_as_string, expr_as_string,
1109         context_as_string): Adjust prototype.
1111         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
1112         instead of TS_PLAIN.
1114         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
1115         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
1116         plain `0'.
1118 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
1120         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
1121         (linkage_kind): New enumeration.
1122         (decl_linkage): New function.
1123         * decl2.c (comdat_linkage): Extend comment.
1124         * error.c (dump_function_decl): Print the arguments used to
1125         instantiate a template, even when not printing the type of the
1126         function.
1127         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
1128         not TREE_PUBLIC, to test for external linkage.
1129         * tree.c (decl_linkage): New function.
1131 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
1133         * pt.c (instantiate_decl): Always instantiate static data members
1134         initialized in-class.
1136 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
1138         * Make-lang.in: Move all build rules here from Makefile.in,
1139         adapt to new context.  Wrap all rules that change the current
1140         directory in parentheses.  Expunge all references to $(P).
1141         When one command depends on another and they're run all at
1142         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
1143         all object-file generation rules.  Delete obsolete variables.
1145         * Makefile.in: Delete.
1146         * config-lang.in: Delete outputs= line.
1148 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
1150         * error.c (dump_function_decl): Print no space between
1151         `ptr-operator' the `type-specifier' of the return type.
1152         (dump_type_prefix): Make sure we put space at the appropriate
1153         place.
1155 2000-10-23  Jason Merrill  <jason@redhat.com>
1157         * call.c (equal_functions): Also call decls_match for extern "C" fns.
1159 2000-10-22  Jason Merrill  <jason@redhat.com>
1161         * call.c (build_conditional_expr): Use ocp_convert to force
1162         rvalue conversion.
1164 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
1166         * call.c (standard_conversion): Use RVALUE_CONVs for all
1167         expressions that satisfy lvalue_p, not just those that satisfy
1168         real_lvalue_p.
1170         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
1172         * typeck.c (c_sizeof): Return an expression of `size_t' type,
1173         not one with TYPE_IS_SIZETYPE set.
1174         (dubious_conversion_warnings): Remove special-case code.
1176 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
1178         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
1179         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
1180         (dump_type_prefix): Print vector-of-int as 'int vector'.
1181         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
1182         * tree.c (walk_tree): Handle VECTOR_TYPE.
1184         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
1186 2000-10-21  Jason Merrill  <jason@redhat.com>
1188         * parse.y (operator): Set got_object from got_scope.
1189         Set looking_for_typename.
1190         * decl.c (lookup_name_real): Clear val after setting from_obj.
1191         Reorganize diagnostic.
1193 2000-10-20  Jason Merrill  <jason@redhat.com>
1195         * tree.c (walk_tree): Don't walk into default args.
1197         * error.c (dump_expr): Use host_integerp.
1199 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
1201         * typeck2.c (abstract_virtuals_error): Use "because" instead of
1202         "since" in error message.
1204 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1206         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
1208 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
1210         * decl.c (revert_static_member_fn): Fixed typo.
1212 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
1214         * class.c (subobject_offset_fn): New type.
1215         (dfs_record_base_offsets): Remove.
1216         (record_base_offsets): Likewise.
1217         (dfs_search_base_offsets): Likewise.
1218         (record_subobject_offset): New function.
1219         (check_subobject_offset): Likewise.
1220         (walk_subobject_offsets): Likewise.
1221         (record_subobject_offsets): Likewise.
1222         (layout_conflict_p): Reimplement.
1223         (layout_nonempty_base_or_field): Correct handling of type
1224         conflicts during layout.
1225         (layout_empty_base): Likewise.
1226         (build_base_field): Adjust to handle new representation of empty
1227         base offset table.
1228         (build_base_fields): Likewise.
1229         (layout_virtual_bases): Likewise.
1230         (splay_tree_compare_integer_csts): New function.
1231         (layout_class_type): Use a splay_tree, rather than a varray, to
1232         represent the offsets of empty bases.
1234         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
1235         * decl.c (select_decl): Don't return declarations that are
1236         DECL_ANTICIPATED.
1238 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
1240         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
1241         (fake_std_node): New macro.
1242         * decl.c (in_std): Rename to ...
1243         (in_fake_std): ... this.
1244         (flag_no_builtin): Remove.
1245         (flag_no_nonansi_builtin): Likewise.
1246         (walk_namespaces_r): Use fake_std_node.
1247         (push_namespace): Use std_identifier.
1248         (pop_namespace): Use in_fake_std.
1249         (lookup_name_real): Use fake_std_node.
1250         (init_decl_processing): When -fhonor-std, create the `std'
1251         namespace.  Don't create a dummy fake_std_node in that case.
1252         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
1253         (builtin_function): Put builtins whose names don't begin
1254         with `_' in the std namespace.
1255         * decl2.c (flag_no_builtin): Remove.
1256         (flag_no_nonansi_builtin): Likewise.
1257         (set_decl_namespace): Use fake_std_node.
1258         (validate_nonmember_using_decl): Likewise.
1259         (do_using_directive): Likewise.
1260         (handle_class_head): Likewise.
1261         * dump.c (dequeue_and_dump): Likewise.
1262         * except.c (init_exception_processing): Use std_identifier.
1263         * init.c (build_member_call): Use fake_std_node.
1264         * rtti.c (init_rtti_processing): Use std_identifier.
1266 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
1268         * cp-tree.h (back_end_hook): Remove declaration.
1269         * decl2.c (back_end_hook): Remove definition.
1271         * dump.c (dequeue_and_dump): Dump TREE_USED.
1273 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
1275         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
1277 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
1279         * decl.c (WINT_TYPE): Define.
1280         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
1281         c_size_type_node, signed_size_type_node and wint_type_node.
1283 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
1285         * decl2.c (warn_missing_format_attribute): New variable.
1286         (lang_decode_option): Decode -Wmissing-format-attribute.
1288 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
1290         * typeck.c (qualify_type): Remove.
1291         (composite_pointer_type): Fix handling of conversions to `cv void*'.
1293 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1295         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
1297 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1299         * Makefile.in (parse.c, parse.h): Create atomically.
1301 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
1303         * class.c (current_obstack): Remove.
1304         * decl.c (ggc_p): Remove.
1305         (start_decl): Don't use decl_tree_cons.
1306         (grokdeclarator): Don't use build_decl_list.
1307         (start_function): Don't use decl_tree_cons.
1308         (finish_function): Don't mess with obstacks.
1309         * decl2.c (grok_x_components): Don't use build_decl_list.
1310         * lex.c (make_call_declarator): Don't call decl_tree_cons.
1311         (implicitly_declare_fn): Don't call build_decl_list.
1312         * parse.y (frob_specs): Don't call build_decl_list or
1313         decl_tree_cons.
1314         (expr_or_declarator_intern): Don't call decl_tree_cons.
1315         (primary): Don't call build_decl_list.
1316         (fcast_or_absdcl): Likewise.
1317         (typed_declspecs): Don't call decl_tree_cons.
1318         (reserved_declspecs): Don't call build_decl_list.
1319         (declmods): Likewise.
1320         (reserved_typespecquals): Likewise.
1321         (aggr): Likewise.
1322         (new_type_id): Likewise.
1323         (cv_qualifiers): Likewise.
1324         (after_type_declarator_intern): Likewise.
1325         (notype_declarator_intern): Likewise.
1326         (absdcl_intern): Likewise.
1327         (named_parm): Likewise.
1328         * pt.c (most_specialized_class): Likewise.
1329         * repo.c (temporary_obstack): Make it a structure, not a pointer.
1330         (init_repo): Initialize it.
1331         * search.c (current_obstack): Remove.
1332         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
1334 2000-10-09  Richard Henderson  <rth@cygnus.com>
1336         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
1337         (c++ language support bits for libgcc): Remove.
1338         (c++.clean): Remove cplib2.txt cleanup.
1339         * config-lang.in (headers, lib2funcs): Remove.
1341         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
1342         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
1343         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
1344         * inc/new.h, inc/typeinfo: Remove files.
1346 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
1348         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
1349         defined.
1350         (init_decl_processing): Initialize intmax_type_node and
1351         uintmax_type_node.
1353 2000-10-06  Richard Henderson  <rth@cygnus.com>
1355         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
1356         (original_result_rtx): Remove.
1357         * decl.c (save_function_data): Don't clear x_result_rtx.
1358         (mark_lang_function): Don't mark it either.
1359         * expr.c (fixup_result_decl): Remove.
1360         * semantics.c (genrtl_named_return_value): Frob the return decl
1361         before calling emit_local_var.
1362         (genrtl_finish_function): Don't call fixup_result_decl.
1363         Always emit the jump to return_label.
1365 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
1367         * pt.c (lookup_template_class): Set current access for enum.
1368         (tsubst_enum): Set file & line for enum decl.
1370         * spew.c (yylex): Remove unused variable.
1372 2000-10-05  Richard Henderson  <rth@cygnus.com>
1374         * semantics.c (genrtl_finish_function): Don't init or check
1375         can_reach_end; remove noreturn and return value checks.
1377 2000-10-05  Tom Tromey  <tromey@cygnus.com>
1379         * init.c (build_java_class_ref): Use `build_static_name' with a
1380         suffix, not a prefix, to build the class object's name.
1382 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
1384         * cp-tree.h (access_kind): Fix comment typo.
1385         * decl2.c (grokfield): Fix diagnostic typo.
1386         * semantics.c (finish_template_type): Fix comment typo.
1387         (finish_qualified_object_call_expr): Likewise.
1389 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
1391         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
1392         tsubsting fails.
1394 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
1396         * spew.c (frob_id): New static function.
1397         (frob_opname): Use it.
1398         (yylex): Use it.
1400 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
1402         * decl.c (lang_mark_false_label_stack): Remove.
1403         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
1405 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
1407         * gxxint.texi: Use @email for formatting email addresses.
1409 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
1411         * error.c: Remove direct obstack manipulation.  Replace with
1412         output_buffer-based formatting.  Adjust calls to removed macros.
1413         (obstack_chunk_alloc, obstack_chunk_free): Remove.
1414         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
1415         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
1417 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
1419         * ir.texi: Move to ../c-tree.texi.
1421 2000-09-20  Jason Merrill  <jason@redhat.com>
1423         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
1425 2000-09-21  Andreas Jaeger  <aj@suse.de>
1427         * errfn.c: Move declaration of cp_printer and cp_printers to ...
1428         * cp-tree.h: ... here.
1430         * error.c: Remove declaration of cp_printer.
1432 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
1434         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
1436 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
1438         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
1439         users.
1441 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
1443         * decl.c (start_function): Robustify.
1445 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1447         * cp-tree.h (check_function_format): Accept a `status' parameter.
1449         * call.c, typeck.c: Updates calls to `check_function_format'.
1451 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
1453         * decl2.c (handle_class_head): Always push some scope even
1454         in the error case.
1456 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
1458         * cp-tree.h (struct cp_language_function): Remove
1459         x_scope_stmt_stack and name_declared.
1460         (current_scope_stmt_stack): Remove.
1461         (function_name_declared_p): New macro.
1462         (struct lang_decl_flags): Use c_lang_decl as a base class.
1463         (context): Remove.
1464         (struct lang_decl): Replace saved_tree with context.
1465         (DECL_FRIEND_CONTEXT): Adjust accordingly.
1466         (SET_DECL_FRIEND_CONTEXT): Likewise.
1467         (DECL_VIRTUAL_CONTEXT): Likewise.
1468         (DECL_SAVED_TREE): Remove.
1469         (C_DECLARED_LABEL_FLAG): Likewise.
1470         (cplus_expand_expr_stmt): Don't declare.
1471         (add_decl_stmt): Likewise.
1472         (add_scope_stmt): Likewise.
1473         * decl.c (mark_stmt_tree): Remove.
1474         (case_compare): Likewise.
1475         (finish_case_label): Use c_add_case_label.
1476         (init_decl_processing): Set more language-specific hooks.
1477         (build_enumerator): Fix typo in comment.
1478         (cplus_expand_expr_stmt): Remove.
1479         (mark_lang_function): Use mark_c_language_function.
1480         (lang_mark_tree): Use c_mark_lang_decl.
1481         * decl2.c: Change order of inclusion.
1482         * except.c: Likewise.
1483         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
1484         back on c_expand_expr.
1485         * friend.c: Include expr.h.
1486         * init.c: Change order of inclusion.
1487         * Makefile.in: Update dependencies.
1488         * lex.h (free_lang_decl_chain): Remove.
1489         * optimize.c (maybe_clone_body): Use function_name_declared_p.
1490         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
1491         it doesn't exist.
1492         (instantiate_decl): Use function_name_declared_p.
1493         * semantics.c (lang_expand_expr_stmt): Remove.
1494         (set_current_function_name_declared): Likewise.
1495         (current_function_name_declared): Likewise.
1496         (begin_compound_stmt): Use function_name_declared_p.
1497         (add_decl_stmt): Remove.
1498         (setup_vtbl_ptr): Use function_name_declared_p.
1499         (add_scope_stmt): Remove.
1500         (current_scope_stmt_stack): New function.
1501         (cp_expand_stmt): Don't handle SCOPE_STMTs.
1502         (expand_body): Use function_name_declared_p.
1503         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
1504         * typeck.c: Change order of includes.
1505         (convert_sequence): Remove.
1507 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
1509         * lex.c (reswords): Add _Complex.
1511 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1513         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
1515 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
1517         * init.c (begin_init_stmts): Don't use // comments.
1519 2000-09-12  Jason Merrill  <jason@redhat.com>
1521         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
1522         all non-extern arrays.
1524         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
1525         typenames, too.  Downgrade complaint to pedwarn.
1526         (xref_tag): Warn about surprising behavior of 'friend struct T'.
1527         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
1528         'class This::Inherited'.
1530 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
1532         * decl.c (finish_case_label): Given the LABEL_DECL a
1533         DECL_CONTEXT.
1535 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
1537         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
1538         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
1539         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
1540         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
1541         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
1542         New macros.
1543         (sorry_for_unsupported_tree, print_scope_operator,
1544         print_left_paren, print_right_paren, print_left_bracket,
1545         print_right_bracket, print_whitespace): Likewise.
1546         (aggr_variety): Rename to class_key_or_enum.
1547         (print_type): Rename to print_type_id.
1548         (print_type_specifier_seq, print_simple_type_specifier,
1549         print_elaborated_type_specifier,
1550         print_rest_of_abstract_declarator,
1551         print_parameter_declaration_clause, print_exception_specification,
1552         print_nested_name_specifier, print_template_id,
1553         typedef_original_name,  print_template_argument_list_start,
1554         print_template_argument_list_end): New functions.
1556 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
1558         * ir.texi: Add more documentation.
1560 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
1562         * cp-tree.h (struct saved_scope): Remove x_function_parms.
1563         (current_function_parms): Don't define.
1564         (struct cp_language_function): Remove parms_stored.
1565         (current_function_just_assigned_this): Don't define.
1566         (current_function_parms_stored): Likewise.
1567         (static_ctors): Declare.
1568         (static_dtors): Likewise.
1569         (SF_EXPAND): Don't define.
1570         (expand_start_early_try_stmts): Remove declaration.
1571         (store_parm_decls): Likewise.
1572         * decl.c (static_ctors): Don't declare.
1573         (static_dtors): Likewise.
1574         (struct binding_level): Remove this_block.
1575         (poplevel): Remove dead code.
1576         (set_block): Likewise.
1577         (mark_binding_level): Don't mark this_block.
1578         (mark_saved_scope): Don't mark x_function_parms.
1579         (init_decl_processing): Don't add current_function_parms as a GC
1580         root.
1581         (check_function_type): Change prototype.
1582         (start_function): Remove RTL-generation code.
1583         (expand_start_early_try_stmts): Remove.
1584         (store_parm_decls): Give it internal linkage.  Remove
1585         RTL-generation code.
1586         (finish_function): Remove RTL-generation code.
1587         * decl2.c (static_ctors): Fix formatting.
1588         (static_dtors): Likewise.
1589         * method.c (use_thunk): Don't call store_parm_decls.
1590         (synthesize_method): Likewise.
1591         * optimize.c (maybe_clone_body): Likewise.
1592         * parse.y (fn.def2): Likewise.
1593         (.set_base_init): Likewise.
1594         (nodecls): Likewise.
1595         * pt.c (instantiate_decl): Likewise.
1596         * rtti.c (synthesize_tinfo_fn): Likewise.
1597         * semantics.c (genrtl_try_block): Simplify.
1598         (expand_body): Use genrtl_start_function and
1599         genrtl_finish_function.
1600         (genrtl_start_function): New function.
1601         (genrtl_finish_function): Likewise.
1603 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
1605         * error.c (cp_tree_printer, case 'P'): Append break.
1607 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
1609         * cp-tree.h (frob_opname): Declare.
1610         * parse.y (saved_scopes): New static variable.
1611         (cp_parse_init): Adjust.
1612         (do_id): If lastiddecl is NULL, do do_identifier.
1613         (operator): Save scope information.
1614         (unoperator): New reduction. Restore scope information.
1615         (operator_name): Append unoperator. Call frob_opname.
1616         * spew.c (frob_opname): Define.
1618 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
1620         * decl.c, rtti.c: Include defaults.h if not already included.
1621         Don't define the *_TYPE_SIZE macros.
1623 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
1625         * cp-tree.h (push_switch): Change prototype.
1626         (check_cp_case_value): Remove declaration.
1627         (decl_constant_value): Likewise.
1628         * decl.c (struct cp_switch): Add switch_stmt and cases.
1629         (case_compare): New function.
1630         (push_switch): Set switch_stmt.  Initialize cases.
1631         (pop_switch): Clean up cases.
1632         (define_case_label): Rename to ...
1633         (finish_case_label): ... this.  Do semantic analysis for case
1634         labels here.
1635         (start_function): Correct comment.
1636         * decl2.c (check_cp_case_value): Remove.
1637         * expr.c (do_case): Remove.
1638         * pt.c (tsubst_expr): Adjust call to finish_case_label.
1639         * semantics.c (genrtl_do_poplevel): Remove declaration.
1640         (RECHAIN_STMTS): Remove.
1641         (finish_break_stmt): Use build_break_stmt.
1642         (finish_continue_stmt): Use build_continue_stmt.
1643         (finish_switch_cond): Adjust condition here, rater than in
1644         c_expand_start_case.
1645         (finish_case_label): Remove.
1646         * typeck.c (c_expand_return): Remove.
1647         (c_expand_start_case): Likewise.
1649 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
1651         * ir.texi: Document type nodes.
1653 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
1655         * cp-tree.h (init_cp_semantics): Declare.
1656         (genrtl_try_block): Don't declare.
1657         (genrtl_handler): Likewise.
1658         (genrtl_catch_block): Likewise.
1659         (genrtl_ctor_stmt): Likewise.
1660         (genrtl_subobject): Likewise.
1661         (genrtl_do_poplevel): Likewise.
1662         (genrtl_named_return_value): Likewise.
1663         * lex.c (init_parse): Call init_cp_semantics.
1664         * semantics.c (genrtl_try_block): Give it internal linkage.
1665         (genrtl_handler): Likewise.
1666         (genrtl_catch_block): Likewise.
1667         (genrtl_ctor_stmt): Likewise.
1668         (genrtl_subobject): Likewise.
1669         (genrtl_do_poplevel): Likewise.
1670         (genrtl_named_return_value): Likewise.
1671         (lang_expand_stmt): Rename to ...
1672         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
1673         (init_cp_semantics): Define.
1675         * decl.c (initialize_local_var): Remove RTL-generating code.
1676         * semantics.c (genrtl_try_block): Fix formatting.
1678         Move statement-tree facilities from C++ to C front-end.
1679         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
1680         (void_zero_node): Remove.
1681         (stmt_tree): Likewise.
1682         (scope_chain): Adjust.
1683         (language_function): Rename to cp_language_function.
1684         (cp_function_chain): Adjust.
1685         (current_stmt_tree): Remove.
1686         (last_tree): Likewise.
1687         (last_expr_type): Likewise.
1688         (struct lang_decl): Adjust.
1689         (STMT_IS_FULL_EXPR_P): Remove.
1690         (add_tree): Remove.
1691         (begin_stmt_tree): Likewise.
1692         (finish_stmt_tree): Likewise.
1693         (walk_tree_fn): Likewise.
1694         (walk_stmt_tree): Likewise.
1695         * class.c (finish_struct): Replace use of add_tree with add_stmt.
1696         * decl.c (mark_stmt_tree): Adjust type.
1697         (init_decl_processing): Don't build void_zero_node.
1698         (initialize_local_var): Adjust usage of current_stmt_tree.
1699         (finish_enum): Use add_stmt, not add_tree.
1700         (save_function_data): Adjust use of language_function.
1701         (finish_constructor_body): Use add_stmt, not add_tree.
1702         (finish_destructor_body): Likewise.
1703         (push_cp_function_context): Adjust use of language_function.
1704         (pop_cp_function_context): Likewise.
1705         (mark_lang_function): Likewise.
1706         (mark_cp_function_context): Likewise.
1707         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
1708         (build_vec_init): Likewise.
1709         * semantics.c (SET_LAST_STMT): Remove.
1710         (RECHAIN_STMTS): Don't use it.
1711         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
1712         (current_stmt_tree): Define.
1713         (add_tree): Remove.
1714         (finish_goto_stmt): Use add_stmt, not add_tree.
1715         (finish_expr_stmt): Likewise.
1716         (begin_if_stmt): Likewise.
1717         (finish_then_clause): Likewise.
1718         (begin_while_stmt): Likewise.
1719         (begin_do_stmt): Likewise.
1720         (finish_return_stmt): Likewise.
1721         (begin_for_stmt): Likewise.
1722         (finish_break_stmt): Likewise.
1723         (finish_continue_stmt): Likewise.
1724         (begin_switch_stmt): Likewise.
1725         (finish_case_label): Likewise.
1726         (begin_try_block): Likewise.
1727         (begin_function_try_block): Likewise.
1728         (begin_handler): Likewise.
1729         (begin_catch_block): Likewise.
1730         (begin_compound_stmt): Likewise.
1731         (begin_asm_stmt): Likewise.
1732         (finish_asm_stmt): Likewise.
1733         (finish_label_stmt): Likewise.
1734         (add_decl_stmt): Likewise.
1735         (finish_subobject): Likewise.
1736         (finish_decl_cleanup): Likewise.
1737         (finish_named_return_value): Likewise.
1738         (setup_vtbl_ptr): Likewise.
1739         (add_scope_stmt): Likewise.
1740         (finish_stmt_expr): Likewise.
1741         (prune_unused_decls): Remove.
1742         (begin_stmt_tree): Likewise.
1743         (finish_stmt_tree): Likewise.
1744         (prep_stmt): Adjust use of current_stmt_tree.
1745         (lang_expand_stmt): Likewise.
1746         * tree.c (statement_code_p): Remove.
1747         (cp_statement_code_p): New function.
1748         (walk_stmt_tree): Remove.
1749         (init_tree): Set lang_statement_code_p.
1751 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
1753         Integrated preprocessor.
1755         * Make-lang.in, Makefile.in: Remove all references to input.c,
1756         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
1757         * gxx.gperf, hash.h, input.c: Delete.
1758         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
1759         initialized properly.
1761         * class.c (fixup_pending_inline): Take a tree, not a
1762         struct pending_inline *.  All callers changed.
1763         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
1764         RID_PROTECTED entries in ridpointers[] array here.
1765         * decl.c (duplicate_decls): Do not refer to struct
1766         pending_inline.
1767         (record_builtin_type, init_decl_processing): Use RID_MAX not
1768         CP_RID_MAX.
1769         (grokdeclarator): Use C_IS_RESERVED_WORD.
1770         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
1771         cpplib.
1772         (grok_x_components): Do not inspect pending_inlines chain.
1774         * cp-tree.h (struct lang_identifier): Add rid_code entry.
1775         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
1776         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
1777         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
1778         TIME_IDENTIFIER_FILEINFO): Kill.
1779         Update prototypes.
1780         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
1781         single 32-bit word.
1782         * parse.y: Call do_pending_inlines unconditionally.
1783         reinit_parse_for_method is now snarf_method.  fn.defpen is no
1784         longer necessary.  Remove unnecessary <itype> annotation on
1785         SCOPE.  Do not refer to end_of_file or struct pending_inline.
1786         * semantics.c (begin_inline_definitions): Call
1787         do_pending_inlines unconditionally.
1789         * lex.c: Remove all code now shared with C front end.
1790         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
1791         into the get_identifier table.  Rewrite pragma handling to
1792         work with the registry.  Move code to save tokens for later
1793         processing to spew.c.
1795         * spew.c: Rewrite everything in terms of token streams instead
1796         of text.  Move routines here from lex.c / input.c as
1797         appropriate.  GC-mark trees hanging off the pending inlines
1798         chain.
1800 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
1802         * NEWS: Mention that the named return value extension has been
1803         deprecated.
1804         * cp-tree.h (original_result_rtx): Define.
1805         (TREE_REFERENCE_EXPR): Remove.
1806         (DECL_VPARENT): Likewise.
1807         (pushdecl_nonclass_level): Likewise.
1808         (store_return_init): Likewise.
1809         (reinit_lang_specific): Likewise.
1810         (genrtl_named_return_value): Change prototype.
1811         * decl.c (original_result_rtx): Remove.
1812         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
1813         Do not generate RTL for local variables here.
1814         (store_return_init): Remove.
1815         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
1816         store_return_init.
1817         (finish_named_return_value): Adjust accordingly.  Warn that this
1818         extension is deprecated.
1819         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
1821 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1823         * pt.c (type_unification_real): Replace switch with if.
1824         (unify): Tsubst non-type parms before comparing.
1826 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1828         * error.c (dump_typename): New function, broken out of ...
1829         (dump_type): ... here. Use it.
1830         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
1832 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1834         * init.c (build_offset_ref): Deal with namespace scoped
1835         TEMPLATE_ID_EXPRs.
1837 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
1839         * class.c (resolve_address_of_overloaded_function): Add
1840         explanation message.
1841         * decl.c (define_case_label): Reformat explanation.
1842         * decl2.c (finish_static_data_member_decl): Likewise.
1843         (grokfield): Likewise.
1844         * friend.c (do_friend): Likewise.
1846 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
1848         * tree.c (walk_tree): Expose tail recursion.
1849         (walk_stmt_tree): New function.
1850         * cp-tree.h: Prototype walk_stmt_tree.
1851         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
1852         the BLOCKs directly.  If a BLOCK has no variables after
1853         pruning, discard it.
1854         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
1855         restore the line number.
1857 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
1859         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
1860         (pt.o): Remove dependency on HTAB_H.
1861         * cp-tree.h: Include hashtab.h.
1862         (walk_tree): Change prototype.
1863         (walk_tree_without_duplicates): New function.
1864         * decl.c (check_default_argument): Use it.
1865         * optimize.c (remap_decl): Adjust calls to walk_tree.
1866         (copy_body): Likewise.
1867         (expand_calls_inline): Likewise.
1868         (calls_setjmp_p): Use walk_tree_without_duplicates.
1869         * pt.c: Don't include hashtab.h.
1870         (for_each_template_parm): Use walk_tree_without_duplicates.
1871         * semantics.c (finish-stmt_tree): Likewise.
1872         (expand_body): Likewise.
1873         * tree.c (walk_tree): Add additional parameter.
1874         (walk_tree_without_duplicates): New function.
1875         (count_trees): Use it.
1876         (verify_stmt_tree): Adjust call to walk_tree.
1877         (find_tree): Use walk_tree_without_duplicates.
1878         (no_linkage_check): Likewise.
1879         (break_out_target_exprs): Adjust call to walk_tree.
1880         (cp_unsave): Likewise.
1882 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1884         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
1885         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1886         * cp-tree.h (TYPE_BINFO): Adjust comment.
1887         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
1888         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
1889         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
1890         (TYPE_TEMPLATE_INFO): Likewise.
1891         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
1892         * class.c (push_nested_class): Likewise.
1893         * decl.c (lookup_name_real): Likewise.
1894         (grokdeclarator): Likewise.
1895         (grok_op_properties): Likewise.
1896         (xref_tag): Likewise.
1897         (xref_basetypes): Likewise.
1898         * decl2.c (constructor_name_full): Likewise.
1899         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
1900         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
1901         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
1902         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1903         (dump_type_suffix): Likewise.
1904         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
1905         instead.
1906         (get_aggr_from_typedef): Likewise.
1907         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
1908         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1909         (write_template_parm): Likewise.
1910         (write_template_template_parm): Check tree code instead of
1911         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1912         * method.c (build_overload_nested_name): Add
1913         BOUND_TEMPLATE_TEMPLATE_PARM.
1914         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
1915         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1916         * pt.c (convert_template_argument): Check tree code instead of
1917         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1918         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
1919         (for_each_template_parm): Adjust comment.
1920         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
1921         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1922         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
1923         template_args_equal to compare template template parameter cases.
1924         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1925         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
1926         instead.
1927         * tree.c (copy_template_template_parm): Decide whether to create
1928         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
1929         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1930         (copy_tree_r): Likewise.
1931         * typeck.c (comptypes): Likewise.  Check tree code instead of
1932         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1934 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
1936         * decl.c (finish_function): Move the code for handling functions
1937         marked with the constructor and destructor attributes inside the
1938         expand_p block.
1940 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1942         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
1944 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1946         * pt.c (lookup_template_class): Remove abort.
1947         * tree.c (get_type_decl): Allow error_mark_node.
1949 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
1951         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
1952         TEMPLATE_ID_EXPRs.
1954 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
1956         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
1957         new ABI mangling.
1959 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
1961         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
1962         union tag mismatch error reporting.
1964 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
1966         * call.c (build_scoped_method_call): Check it is not a namespace.
1968 2000-08-30  Jason Merrill  <jason@redhat.com>
1970         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
1972         * tree.c (bot_manip): Check TREE_CONSTANT rather than
1973         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
1974         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
1976         * decl.c (start_function): Always call make_function_rtl.
1978 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
1980         * semantics.c (prune_unused_decls): New function.
1981         (finish_stmt_tree): Call it via walk_tree.
1983 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
1985         * class.c (build_secondary_vtable): Constify a char *.
1986         * decl.c (init_decl_processing): Initialize function_id_node,
1987         pretty_function_id_node, and func_id_node.
1988         * input.c (struct input_source): Constify 'str'.
1989         (feed_input): Constify first argument.
1990         * mangle.c (write_identifier): Constify argument.
1991         * pt.c (mangle_class_name_for_template): Constify argument.
1993 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
1995         * typeck.c (mark_addressable): Remove code that pokes around in
1996         RTL.
1998 2000-08-28  Jason Merrill  <jason@redhat.com>
2000         * lex.c (file_name_nondirectory): Move to toplev.c.
2002         * cp-tree.h (LOCAL_CLASS_P): New macro.
2003         * class.c (finish_struct_1): Use it.
2005 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
2007         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
2008         (write_encoding): Pass another argument to write_name.
2009         (write_name): Add ignore_local_scope parameter.  Fix handling of
2010         local names.
2011         (write_nested_name): Use write_unqualified_name.
2012         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
2013         (write_template_prefix): Use write_unqualified_name.
2014         (write_component): Remove.
2015         (write_local_name): Add parameter.  Use direct local entity to
2016         discriminator calculation.
2017         (write_class_enum_type): Pass another argument to write_name.
2018         (write_template_template_arg): Likewise.
2019         (make_guard_variable): Likewise.
2021 2000-08-27  Jason Merrill  <jason@redhat.com>
2023         * decl.c (pushdecl): Matching decls for local externs are found in
2024         the current level.  Propagate linkage information from previous
2025         declarations.
2027 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
2029         * ir.texi (Expressions): Fix typo.
2031 2000-08-25  Greg McGary  <greg@mcgary.org>
2033         * tree.c (init_tree): Use ARRAY_SIZE.
2035 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
2037         * error.c (cp_tree_printer): Rework.
2039 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
2041         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
2042         dyn-string.o.
2043         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
2044         (cp-demangle.o): Remove target.
2045         (dyn-string.o): Likewise.
2047         * decl.c (grokfndecl): Require that `main' return an `int'.
2048         * mangle.c (write_encoding): Don't mangle return types for
2049         conversion functions.
2051 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
2053         * error.c (tree_formatting_info): New data type.
2054         (tree_being_formatted): New macro.
2055         (tree_formatting_flags): Likewise.
2056         (put_whitespace): Likewise.
2057         (print_tree_identifier): Likewise.
2058         (print_identifier): Likewise.
2059         (cp_tree_printer, print_function_argument_list, print_declaration,
2060         print_expression, print_function_declaration,
2061         print_function_parameter, print_type, print_cv_qualifier): New
2062         functions.
2063         (init_error): Initialize lang_printer.
2065 2000-08-24  Jason Merrill  <jason@redhat.com>
2067         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
2068         adjustment necessary.
2070 2000-08-24  Greg McGary  <greg@mcgary.org>
2072         * cp-tree.h (MAIN_NAME_P): Remove macro.
2074 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
2076         * error.c (print_instantiation_context): Don't forget to flush the
2077         buffer.
2079 2000-08-23  Jason Merrill  <jason@redhat.com>
2081         * typeck.c (build_ptrmemfunc): Save the input pmf.
2083         * method.c (process_modifiers): Use same_type_p.
2085 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
2087         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
2088         * mangle.c (write_function_type): Change prototype.
2089         (write_encoding): Don't mangle return types for
2090         constructors or destructors.
2091         (write_type): Adjust call to write_function_type.
2092         * pt.c (instantiate_template): Instantiate alternate entry points
2093         when instantiating the main function.
2095 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
2097         * error.c (cp_print_error_function): Don't use embedded '\n' in
2098         output_printf.
2100 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
2102         * decl.c (init_decl_processing): Remove bogus initialization.
2103         * error.c (lang_print_error_function): Restore here.
2104         (init_error): Initialize print_error_function.
2106 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
2108         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
2110 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
2112         * Makefile.in (error.o): Depends on diagnostic.h
2114         * cp-tree.h (problematic_instantiation_changed,
2115         record_last_problematic_instantiation, current_instantiation,
2116         print_instantiation_context): Declare.
2117         (maybe_print_template_context): Remove.
2119         * decl.c (init_decl_processing): Set print_error_function to NULL.
2120         (lang_print_error_function): Remove, since we're using a new
2121         machinery.
2123         * error.c: #include diagnostic.h
2124         (function_category): New function.
2125         (cp_diagnostic_starter): Likewise.
2126         (cp_diagnostic_finalizer): Likewise.
2127         (cp_print_error_function): Likewise.
2128         (maybe_print_instantiation_context): Likewise.
2129         (print_instantiation_full_context): Likewise.
2130         (print_instantiation_partial_context): Likewise.
2131         (print_instantiation_context): Define.
2132         (init_error): Initialize diagnostic pager and finalizer.
2134         * pt.c (problematic_instantiation_changed): Define.
2135         (record_last_problematic_instantiation): Likewise.
2136         (current_instantiation): Likewise.
2137         (maybe_print_template_context): Remove.
2138         (print_template_context): Likewise.
2139         (current_tinst_level): Make static to reflect Brendan Kehoe's
2140         change of 1995-04-13.
2141         (push_tinst_level): Call print_instantiation_context.
2143 2000-08-21  Nix  <nix@esperi.demon.co.uk>
2145         * lang-specs.h: Do not process -o or run the assembler if
2146         -fsyntax-only.
2148 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
2150         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
2151         variables.
2152         * decl2.c (lang_decode_option): Disable gettext attributes for
2153         -ansi.
2155 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
2157         * lex.c (lang_init_options): Default diagnostic message maximum
2158         length to 80, when line-wrapping.
2160 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
2162         * class.c (build_vtbl_initializer): Clear the entire
2163         vtbl_init_data.  Start keeping track of the functions for which we
2164         have created vcall offsets here.
2165         (dfs_build_vcall_offset_vtbl_entries): Remove.
2166         (build_vcall_offset_vtbl_entries): Reimplement.
2167         (add_vcall_offset_vtbl_entries_r): New function.
2168         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
2169         computing when vcall offsets are necessary.
2171 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
2173         * decl.c (member_function_or_else): Use cp_error ... %T.
2174         (grokdeclarator): Likewise.
2175         (start_method): Likewise.
2176         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
2178 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
2180         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
2181         TYPE_DECLs.
2183 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
2185         * cp-tree.h (PTRMEM_OK_P): New macro.
2186         (itf_ptrmem_ok): New enumeration value.
2187         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
2188         argument. Diagnose implicit pointer to member.
2189         (instantiate_type): Don't diagnose implicit pointer to member
2190         here. Pass itf_ptrmem_ok if ok. Adjust calls to
2191         resolve_address_of_overloaded_function.
2192         * init.c (build_offset_ref): Set PTRMEM_OK_P.
2193         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
2194         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
2195         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
2196         (build_unary_op): Deal with single non-static member in
2197         microsoft-land.
2199 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
2201         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
2203 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
2205         * cp-tree.h (enum_name_string): Remove prototype.
2206         (report_case_error): Remove prototype.
2207         * cp/typeck2.c (enum_name_string): Remove.
2208         (report_case_error): Remove.
2209         * error.c (dump_expr): Deal with enum values directly.
2210         Correctly negate integer constant.
2212 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
2214         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
2215         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
2216         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
2217         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
2218         (__cxa_vec_new): Use __cxa_vec_new2.
2219         (__cxa_vec_delete): Use __cxa_vec_delete2.
2221 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
2223         * vec.cc (__cxa_vec_new): Set "C" linkage.
2224         (__cxa_vec_ctor): Likewise.
2225         (__cxa_vec_cctor): Likewise.
2226         (__cxa_vec_dtor): Likewise.
2227         (__cxa_vec_delete): Likewise.
2228         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
2229         (__cxa_vec_ctor): Likewise.
2230         (__cxa_vec_cctor): Likewise.
2231         (__cxa_vec_dtor): Likewise.
2232         (__cxa_vec_delete): Likewise.
2234 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
2236         * class.c (instantiate_type): Reinstate local variable
2237         deleted in previous change.
2239         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
2240         itf_no_attributes.
2242 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
2244         * cp-tree.h (instantiate_type_flags): New enumeration.
2245         (instantiate_type): Change parameter.
2246         * class.c (instantiate_type): Adjust prototype. Adjust.
2247         * call.c (standard_conversion): Adjust instantiate_type call.
2248         (reference_binding): Likewise.
2249         (build_op_delete_call): Likewise.
2250         (convert_like_real): Likewise.
2251         * cvt.c (cp_convert_to_pointer): Likewise.
2252         (convert_to_reference): Likewise.
2253         * pt.c (convert_nontype_argument): Likewise.
2254         * typeck.c (build_binary_op): Likewise.
2255         (build_ptrmemfunc): Likewise.
2256         (convert_for_assignment): Likewise.
2258 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
2260         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
2261         (current_aggr): Define.
2262         * decl.c (grokdeclarator): Make sure a friend class is an
2263         elaborated type specifier.
2264         * parse.y (current_aggr): Remove static definition.
2265         (cp_parse_init): Adjust.
2266         (structsp): Clear and restore current_aggr.
2267         (component_decl_list): Clear current_aggr.
2269         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
2270         aggregate tag on the typename's context.
2272         * pt.c (tsubst_friend_class): Return error_mark_node, if
2273         parms becomes NULL.
2274         (instantiate_class_template): Ignore error_mark_node friend types.
2276 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
2278         * cvt.c (warn_ref_binding): New static function, broken out of ...
2279         (convert_to_reference): ... here. Use it.
2281 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
2283         * parse.y (template_arg): Add rule for template qualified with
2284         global scope.
2286 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2288         * decl2.c (add_function): Reorganize.
2289         (arg_assoc): Do not consider function template decls.
2291 2000-08-11  Jason Merrill  <jason@redhat.com>
2293         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
2294         looking inside.
2296 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
2298         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
2299         (lookup_nested_tag): Likewise.
2301         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
2302         can be produced.
2304 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
2306         * parse.y (named_complex_class_head_sans_basetype): Remove
2307         always true if.
2309 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
2311         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
2312         explicit TEMPLATE_ID_EXPR args.
2313         (build_expr_from_tree, case CALL_EXPR): Likewise.
2315 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
2317         * decl.c (check_tag_decl): Diagnose typename's which don't
2318         declare anything.
2320 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
2322         * init.c (build_aggr_init): Reject bogus array initializers
2323         early.
2325 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
2327         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
2328         runtime.
2329         * cp/tinfo.cc (__dynamic_cast): Likewise.
2330         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
2332 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
2334         * cvt.c (convert_to_pointer_force): Fix error message when
2335         attempting to cast from ambiguous base.
2337 2000-08-08  Jason Merrill  <jason@redhat.com>
2339         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
2340         (tsubst_template_arg_vector): Likewise.
2342         * decl2.c (build_anon_union_vars): Choose the largest field; don't
2343         assume that one will be as large as the union.
2345 2000-08-07  Kazu Hirata  <kazu@hxi.com>
2347         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
2348         * decl.c (pop_labels): Likewise.
2350 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
2352         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
2353         specifications.
2354         (__pointer_to_member_type_info): Likewise.
2355         (__base_class_info): Likewise.
2356         (__class_type_info): Likewise.
2357         (__si_class_type_info): Likewise.
2358         (__vmi_class_type_info): Likewise.
2359         * tinfo.cc (__si_class_type_info::__do_find_public_src):
2360         Changed member names to match specifications.
2361         (__vmi_class_type_info::__do_find_public_src): Likewise.
2362         (__si_class_type_info::__do_dyncast): Likewise.
2363         (__vmi_class_type_info::__do_dyncast): Likewise.
2364         (__si_class_type_info::__do_upcast): Likewise.
2365         (__vmi_class_type_info::__do_upcast): Likewise.
2366         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
2367         (__pbase_type_info::__pointer_catch): Likewise.
2368         (__pointer_type_info::__pointer_catch): Likewise.
2369         (__pointer_to_member_type_info::__pointer_catch): Likewise.
2371 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
2373         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
2374         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
2375         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
2377 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
2379         * cp-tree.h (add_method): Change prototype.
2380         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
2381         Don't double the size of the method vector in the error case.
2382         (handle_using_decl): Adjust call to add_method.
2383         (add_implicitly_declared_members): Likewise.
2384         (clone_function_decl): Likewise.
2385         * decl2.c (check_classfn): Likewise.
2386         * semantics.c (finish_member_declaration): Likewise.
2388 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
2390         * decl.c (flag_isoc94): New variable.
2392 2000-08-02  Jason Merrill  <jason@redhat.com>
2394         * pt.c (do_type_instantiation): Add complain parm; don't complain
2395         if called recursively.
2396         * cp-tree.h, parse.y: Adjust.
2398 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
2400         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
2401         -Wno-strict-prototypes.
2403         * g++spec.c: Adjust type of second argument to
2404         lang_specific_driver, and update code as necessary.
2406         * cp-tree.h: Don't prototype min_precision here.
2407         (my_friendly_assert): Cast expression to void.
2408         * semantics.c (do_poplevel): Initialize scope_stmts.
2410 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
2412         * cp-tree.h (DECL_NEEDED_P): Tweak.
2414 2000-07-28  Jason Merrill  <jason@redhat.com>
2416         * lang-specs.h: Use %i in rule for .ii files.
2418 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
2420         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
2422 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
2424         Allow indirect primary bases.
2425         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
2426         primary_base.
2427         (CLASSTYPE_VFIELD_PARENT): Remove.
2428         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
2429         (BINFO_PRIMARY_BINFO): Remove.
2430         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
2431         (BINFO_VBASE_PRIMARY_P): Likewise.
2432         (BINFO_PRIMARY_BASE_OF): New macro.
2433         (BINFO_INDIRECT_PRIMARY_P): Likewise.
2434         (get_primary_binfo): New function.
2435         * decl.c (lang_mark_tree): Make lang_type::primary_base.
2436         * class.c (vcall_offset_data_s): Rename to ...
2437         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
2438         and add ctor_vtbl_p.
2439         (get_derived_offset): Use get_primary_binfo.
2440         (dfs_mark_primary_bases): Adjust handling of virtual primary
2441         bases.
2442         (mark_primary_bases): Likewise.
2443         (set_primary_base): Take a binfo, not an integer, as a
2444         representation of the primary base.
2445         (indirect_primary_base_p): Remove.
2446         (determine_primary_base): Adjust for indirect primary bases.
2447         (dfs_find_final_overrider): Fix typo in coment.
2448         (update_vtable_entry_for_fn): Use get_primary_binfo.
2449         (layout_nonempty_base_or_field): Tweak.
2450         (build_base_fields): Adjust for new primary base semantics.
2451         (dfs_propagate_binfo_offsets): Remove.
2452         (propagate_binfo_offsets): Rewrite.
2453         (dfs_set_offset_for_shared_vbases): Remove.
2454         (layout_virtual_bases): Don't use it.
2455         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
2456         ABI.
2457         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
2458         CLASSTYPE_VFIELD_PARENT.
2459         (dfs_get_primary_binfo): New function.
2460         (get_primary_binfo): Likewise.
2461         (dump_class_hierarchy_r): Tweak printing of primary bases.
2462         (build_vtbl_initializer): Fix typo in comments.  Use
2463         vtbl_init_data.
2464         (build_vcall_and_vbase_vtbl_entries): Likewise.
2465         (build_vbaes_offset_vtbl_entries): Likewise.
2466         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
2467         BV_VCALL_INDEX to handle indirect primary bases.
2468         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
2469         (build_rtti_vtbl_entries): Likewise.
2470         * search.c (get_shared_vbase_if_not_primary): Tweak.
2471         (find_vbase_instance): Likewise.
2472         (binfo_for_vtable): Simplify.
2473         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
2474         (make_binfo): Make it have 11 entries.
2476 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
2478         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
2479         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
2480         ascertaining primaryness.
2481         (G): Remove template_args.
2482         (decl_is_template_id): New function.
2483         (write_encoding): Use decl_is_template_id.
2484         (write_name): Likewise.  Handle type_decls.  Get main variant of
2485         type decls.
2486         (write_nested_name): Likewise.
2487         (write_prefix): Likewise.
2488         (write_template_prefix): Likewise.
2489         (write_special_name_constructor): Remove defunct production from
2490         comment.
2491         (write_bare_function_type): Remove comment about absent parameter.
2492         (write_template_template_arg): Add missing grammar production to
2493         comment.
2495 2000-07-27  Jason Merrill  <jason@redhat.com>
2497         * decl.c (duplicate_decls): If common_type produces a non-typedef
2498         type for a typedef, just use the old type.
2500 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
2502         * cp-tree.h (function_depth): Declare.
2503         (verify_stmt_tree): Likewise.
2504         (find_tree): Likewise.
2505         * decl.c (function_depth): Give it external linkage.
2506         * optimize.c (optimize_function): Increment and decrement it.
2507         * tree.c (verify_stmt_tree_r): New function.
2508         (verify_stmt_tree): Likewise.
2509         (find_tree_r): Likewise.
2510         (find_tree): Likewise.
2512 2000-07-27  Jason Merrill  <jason@redhat.com>
2514         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
2515         TYPE_PTRMEMFUNC_P.
2516         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
2518 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
2520         * decl.c (start_cleanup_fn): Mark the function as `inline'.
2521         * decl2.c (get_guard): Call cp_finish_decl, not
2522         rest_of_decl_compilation, for local guards.
2523         * lex.c (do_identifier): Remove unused variable.
2525 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
2527         * parse.y:  Add missing ';'.
2529 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
2531         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
2532         of `extern "C++"'.
2534 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2536         Kill strict_prototype. Backwards compatibility only for
2537         non NO_IMPLICIT_EXTERN_C systems.
2538         * cp-tree.h (flag_strict_prototype): Remove.
2539         (strict_prototype): Remove.
2540         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
2541         * decl.c (maybe_push_to_top_level): Adjust.
2542         (pop_from_top_level): Adjust.
2543         (decls_match): Only allow sloppy parm matching for ancient
2544         system headers.
2545         (init_decl_processing): Adjust.
2546         (grokdeclarator): Adjust.
2547         * decl2.c (flag_strict_prototype): Remove.
2548         (strict_prototype): Remove.
2549         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
2550         (lang_f_options): Remove "strict-prototype".
2551         (unsupported-options): Add "strict-prototype".
2552         * lex.c (do_identifier): Adjust.
2553         (do_scoped_id): Adjust.
2554         * parse.y (empty_parms): Adjust.
2555         * class.c (push_lang_context): Adjust.
2556         (pop_lang_context): Adjust.
2557         * typeck.c (comp_target_parms): Adjust.
2559 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
2561         * decl.c (poplevel): Deal with anonymous variables at for scope.
2562         (maybe_inject_for_scope_var): Likewise.
2564 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
2566         * decl.c: Remove all signal handling code, now done in toplev.c.
2568 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
2570         * decl.c (make_rtl_for_nonlocal_decl): Rework.
2572         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
2573         correctly.
2575 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
2577         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
2578         Define my_friendly_assert and my_friendly_abort as macros
2579         which may call friendly_abort.  Prototype friendly abort, not
2580         my_friendly_abort or my_friendly_assert.
2581         * decl.c (signal_catch): Report the signal caught in the error
2582         message.  Call fatal directly.
2583         * typeck2.c (ack, my_friendly_assert): Delete.
2584         (my_friendly_abort): Rename to friendly_abort.  Expect file,
2585         line, and function parameters.  Report the abort code, then
2586         call fancy_abort.  Do not mask an abort if errors have
2587         already occurred.
2589 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
2591         * typeck.c (comp_target_parms): Remove obsolete parameter.
2592         (comp_target_types): Adjust.
2594 2000-07-17  Jason Merrill  <jason@redhat.com>
2596         * typeck.c (mark_addressable): Never set TREE_USED.
2597         * call.c (build_call): Don't abort on calls to library functions
2598         that have been declared normally.
2600         * typeck.c (build_binary_op): Fix grammar in warning.
2602         * exception.cc (__eh_free): Fix prototype.
2604         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
2606         * decl.c (pushdecl): Handle seeing an OVERLOAD in
2607         IDENTIFIER_NAMESPACE_VALUE.
2609 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
2611         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
2612         * method.c (use_thunk): Correct handling of vcall offsets.
2614 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
2616         * .cvsignore: parse.h and parse.c have no cp- prefix.
2618 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
2620         * .cvsignore: New file.
2622 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
2624         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
2626 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
2628         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
2629         * parse.c: Remove.
2630         * parse.h: Likewise.
2632 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
2634         * class.c (layout_class_type): Add pointers to virtual bases after
2635         base classes under the old ABI.
2637 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
2639         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
2640         (finish_continue_stmt): Likewise.
2641         (begin_for_stmt): Remove call to note_level_for_for.
2642         (finish_goto_stmt): Change call from build_min_nt
2643         to build_stmt.
2644         (finish_expr_stmt): Likewise.
2645         (begin_if_stmt): Likewise.
2646         (begin_while_stmt): Likewise.
2647         (finish_while_stmt): Likewise.
2648         (finish_return_stmt): Likewise.
2649         (begin_for_stmt): Likewise.
2650         (finish_for_stmt): Likewise.
2651         (finish_break_stmt): Likewise.
2652         (begin_switch_stmt): Likewise.
2653         (finish_case_label): Likewise.
2654         (genrtl_try_block): Likewise.
2655         (begin_try_block): Likewise.
2656         (begin_handler): Likewise.
2657         (begin_compound_stmt): Likewise.
2658         (finish_asm_stmt): Likewise.
2659         (finish_label_stmt): Likewise.
2660         (add_decl_stmt): Likewise.
2661         (finish_subobject): Likewise.
2662         (finish_decl_cleanup): Likewise.
2663         (finish_named_return_value): Likewise.
2664         (setup_vtbl_ptr): Likewise.
2665         (add_scope_stmt): Likewise.
2666         * decl.c (finish_constructor_body): Likewise.
2667         (finish_destructor_body): Likewise.
2668         * optimize.c (copy_body_r): Likewise.
2669         (initialize_inlined_parameters): Likewise.
2670         (declare_return_variable): Likewise.
2671         (expand_call_inline): Likewise.
2673 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
2675         * semantics.c (expand_body): Sync interface information
2676         at the end of function body expansion.
2678 2000-07-09  Jason Merrill  <jason@redhat.com>
2680         * init.c (build_new_1): Bail early if the call to new fails.
2682         * decl.c (compute_array_index_type): Check specifically for
2683         an INTEGER_CST, not just TREE_CONSTANT.
2685         * decl.c (duplicate_decls): Don't call duplicate_decls on
2686         the DECL_TEMPLATE_RESULT.
2687         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
2688         codes.
2690         * error.c (dump_template_bindings): Don't crash if we had an
2691         invalid argument list.
2693         * typeck.c (c_expand_start_case): Do narrowing here.
2694         * semantics.c (finish_switch_cond): Not here.
2696 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
2698         * parse.y (asm_clobbers): Do string concatenation.
2700 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
2702         * decl.c (pushtag): Don't put local classes in template functions
2703         on the local_classes list.
2705 2000-07-04  Scott Snyder  <snyder@fnal.gov>
2707         * decl2.c (get_guard): Add missing return for old ABI local
2708         variable case.
2710 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
2712         * cp-tree.h (char_type_p): New function.
2713         * decl.c (init_decl_processing): Don't initialize
2714         signed_wchar_type_node or unsigned_wchar_type_node.
2715         (complete_array_type): Handle brace-enclosed string-constants.
2716         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
2717         * tree.c (char_type_p): New function.
2718         * typeck2.c (digest_init): Use char_type_p.
2720 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
2722         * pt.c (tsubst): Don't layout type, if it's error_mark.
2724 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
2726         * pt.c (instantiate_pending_templates): Reset template level.
2728 2000-07-05  Jason Merrill  <jason@redhat.com>
2730         * call.c (joust): Don't complain about `operator char *()' beating
2731         `operator const char *() const'.
2733 2000-07-04  scott snyder  <snyder@fnal.gov>
2734             Jason Merrill  <jason@redhat.com>
2736         * repo.c (repo_get_id): Handle the case where a class with virtual
2737         bases has a null TYPE_BINFO_VTABLE.
2739 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
2740             Jason Merrill  <jason@redhat.com>
2742         * parse.y (member_init): Just pass in the type.
2743         * init.c (expand_member_init): Handle getting a type.
2745 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
2746             Jason Merrill  <jason@redhat.com>
2748         * decl.c (finish_function): Warn if a function has no return
2749         statement.
2750         Suggested by Andrew Koenig.
2751         * typeck.c (check_return_expr): Do set current_function_returns_value
2752         if we got an error_mark_node.
2754 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2756         * decl2.c (push_decl_namespace): Push the original namespace.
2758 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
2760         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
2761         * semantics.c (begin_class_definition): Clear it.
2763 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
2765         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
2766         (genrtl_expr_stmt): Likewise.
2767         (genrtl_decl_stmt): Likewise.
2768         (genrtl_if_stmt): Likewise.
2769         (genrtl_while_stmt): Likewise.
2770         (genrtl_do_stmt): Likewise.
2771         (genrtl_return_stmt): Likewise.
2772         (genrtl_for_stmt): Likewise.
2773         (genrtl_break_stmt): Likewise.
2774         (genrtl_continue_stmt): Likewise.
2775         (genrtl_scope_stmt): Likewise.
2776         (genrtl_switch_stmt): Likewise.
2777         (genrtl_case_label): Likewise.
2778         (genrtl_begin_compound_stmt): Likewise.
2779         (genrtl_finish_compound_stmt): Likewise.
2780         (genrtl_compound_stmt): Likewise.
2781         (genrtl_asm_stmt): Likewise.
2783         * init.c (begin_init_stmts): Remove call to
2784         genrtl_begin_compound_stmt.
2785         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
2787         * semantics.c (lang_expand_stmt): Changed call to
2788         genrtl_compound_stmt to ignore return value.
2790 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
2792         * mangle.c (canonicalize_for_substitution): Return the canonical
2793         variant of a type.
2795         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
2796         TYPE_DECL.
2797         * typeck.c (commonparms): Remove obstack manipulations.
2799 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
2801         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
2803         * Makefile.in (OBJS): Added ../c-semantics.o.
2804         (OBJDEPS): Likewise.
2806         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
2807         ../c-common.h.
2808         (struct stmt_tree): Added comment.
2809         (current_function_name_declared): Removed.
2810         (stmts_are_full_exprs_p): Likewise.
2811         (genrtl_do_pushlevel): Likewise.
2812         (genrtl_clear_out_block): Likewise.
2813         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
2814         (DECL_ANON_UNION_ELEMS): Likewise.
2815         (emit_local_var): Likewise.
2816         (make_rtl_for_local_static): Likewise.
2817         (do_case): Likewise.
2818         (expand_stmt): Likewise.
2819         (genrtl_decl_cleanup): Likewise.
2820         (c_expand_asm_operands): Likewise.
2821         (c_expand_return): Likewise.
2822         (c_expand_start_case): Likewise.
2824         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
2825         (emit_local_var): Likewise.
2826         (initialize_local_var): Change reference to
2827         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
2828         Change reference to stmts_are_full_exprs_p to
2829         current_stmt_tree->stmts_are_full_exprs_p.
2830         (push_cp_function_context): Likewise.
2832         * expect.c (expand_throw): Change reference to
2833         stmts_are_full_exprs_p.
2835         * init.c (build_aggr_init): Change reference to
2836         stmts_are_full_exprs_p.
2837         (build_vec_init): Likewise.
2839         * optimize.c (maybe_clone_body): Change reference to
2840         current_function_name_declared to
2841         cp_function_chain->name_declared.
2843         * pt.c (instantiate_decl): Change reference to
2844         current_function_name_declared to
2845         cp_function_chain->name_declared.
2847         * semantics.c (expand_cond): Moved declaration to c-common.h.
2848         (genrtl_do_pushlevel): Moved to c-semantics.c.
2849         (genrtl_clear_out_block): Likewise.
2850         (genrtl_goto_stmt): Likewise.
2851         (genrtl_expr_stmt): Likewise.
2852         (genrtl_decl_stmt): Likewise.
2853         (gerntl_if_stmt): Likewise.
2854         (genrtl_while_stmt): Likewise.
2855         (genrtl_do_stmt): Likewise.
2856         (genrtl_return_stmt): Likewise.
2857         (genrtl_for_stmt): Likewise.
2858         (genrtl_break_stmt): Likewise.
2859         (genrtl_continue_stmt): Likewise.
2860         (genrtl_scope_stmt): Likewise.
2861         (genrtl_switch_stmt): Likewise.
2862         (genrtl_case_label): Likewise.
2863         (genrtl_begin_compound_stmt): Likewise.
2864         (genrtl_finish_compound_stmt): Likewise.
2865         (genrtl_compound_stmt): Likewise.
2866         (genrtl_asm_stmt): Likewise.
2867         (genrtl_decl_cleanup): Likewise.
2868         (expand_cond): Likewise.
2869         (expand_stmt): Renamed to ...
2870         (lang_expand_stmt): ... this.
2871         (lang_expand_expr_stmt): Initialize.
2872         (set_current_function_name_declared): Likewise.
2873         (stmts_are_full_exprs_p): Likewise.
2874         (current_function_name_declared): Likewise.
2875         (anon_aggr_type_p): Likewise.
2876         (do_poplevel): Change reference to
2877         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
2878         Change reference to stmts_are_full_exprs_p to
2879         current_stmt_tree->stmts_are_full_exprs_p.
2880         (add_tree): Likewise.
2881         (finish_expr_stmt): Likewise.
2882         (prep_stmt): Likewise.
2883         (lang_expand_stmt): Likewise.
2884         (begin_compound_stmt): Change reference to
2885         current_function_name_declared to
2886         cp_function_chain->name_declared and call to
2887         current_function_name_declared().
2888         (setup_vtbl_ptr): Likewise.
2889         (genrtl_do_poplevel): Removed.
2891 2000-06-30  Jason Merrill  <jason@redhat.com>
2893         * init.c (init_init_processing): Go back to aligning like
2894         double_type_node for old ABI.
2895         (get_cookie_size): Make cookie larger if we get a type that needs
2896         more alignment.
2897         (build_vec_delete): Call it.
2899         * typeck.c (qualify_type_recursive): New fn.
2900         (composite_pointer_type): Use it.
2901         (build_binary_op): Use composite_pointer_type.
2903 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
2904             Jason Merrill  <jason@redhat.com>
2906         * typeck.c (check_return_expr): Don't complain about returning
2907         NULL from operator new if -fcheck-new.
2908         * cp-tree.h: Declare flag_check_new here.
2909         * init.c: Not here.
2911 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
2913         * mangle.c (find_substitution): Use same_type_p.
2914         (write_encoding): Don't check for substitutions.
2916 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
2918         * parse.y (expr_no_comma_rangle): New non-terminal.
2919         (template_parm): Use it for default parameter case.
2920         (template_arg): Use it.
2921         (expr_no_commas): Remove commented out undefined extensions.
2922         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
2923         * parse.h, parse.c: Rebuilt.
2925 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
2927         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
2928         (finish_asm_stmt): Do it here, instead.
2930         * cp-tree.h (ridpointers): Don't declare.
2931         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
2932         (record_builtin_java_type): Likewise.
2933         (init_decl_processing): Likewise.
2934         * lex.c: Move inclusion of lex.h.
2935         (ridpointers): Don't define.
2936         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
2937         RID_MAX.
2938         * lex.h (enum rid): Rename to ...
2939         (enum cp_rid): ... this.
2940         (ridpointers): Don't declare.
2941         * parse.y: Move inclusion of lex.h.
2942         * parse.c: Regenerated.
2943         * spew.c: Move inclusion of lex.h.
2945         * cp-tree.h (struct language_function): Remove temp_name_counter.
2946         (temp_name_counter): Remove.
2947         (get_temp_name): Change prototype.
2948         (get_guard): New function.
2949         (get_guard_cond): Likewise.
2950         (set_guard): Likewise.
2951         * cvt.c (build_up_reference): Adjust call to get_temp_name.
2952         * decl.c (expand_static_init): Use get_guard and friends to
2953         implement guard variables.
2954         * decl2.c (get_temp_name): Assume that the variables created are
2955         always static.
2956         (get_sentry): Rename to ...
2957         (get_guard): ... this.  Implement new ABI guard variables.
2958         (get_guard_bits): New function.
2959         (get_guard_cond): Likewise.
2960         (set_guard): Likewise.
2961         (start_static_initialization_or_destruction): Use them.
2962         (do_static_initialization): Replace sentry with guard throughout.
2963         (do_static_destruction): Likewise.
2964         * init.c (create_temporary_var): Add comment.
2966 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
2968         * mangle.c (find_substitution): Use same_type_p.
2969         (write_encoding): Don't check for substitutions.
2971 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
2973         * parse.y (expr_no_comma_rangle): New non-terminal.
2974         (template_parm): Use it for default parameter case.
2975         (template_arg): Use it.
2976         (expr_no_commas): Remove commented out undefined extensions.
2977         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
2978         * parse.h, parse.c: Rebuilt.
2980 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
2982         * cp-tree.h (flag_const_strings): Remove.
2983         (warn_parentheses): Likewise.
2984         (warn_format): Likewise.
2985         (common_type): Likewise.
2986         (default_conversion): Likewise.
2987         (build_binary_op): Likewise.
2988         (cp_build_binary_op): New macro.
2989         * call.c (build_new_op): Use cp_build_binary_op instead of
2990         build_binary_op.
2991         * class.c (build_vtable_entry_ref): Likewise.
2992         * decl.c (expand_static_init): Likewise.
2993         (compute_array_index_type): Likewise.
2994         (build_enumerator): Likewise.
2995         * decl2.c (delete_sanity): Likewise.
2996         (start_static_initialization_or_destruction): Likewise.
2997         * error.c (dump_type_suffix): Likewise.
2998         * init.c (resolve_offset_ref): Likewise.
2999         (build_new): Likewise.
3000         (build_new_1): Likewise.
3001         (build_vec_delete_1): Likewise.
3002         (build_vec_init): Likewise.
3003         (build_delete): Likewise.
3004         * rtti.c (synthesize_tinfo_fn): Likewise.
3005         (synthesize_tinfo_var): Likewise.
3006         * search.c (expand_upcast_fixups): Likewise.
3007         (fixup_all_virtual_upcast_offsets): Likewise.
3008         * typeck.c (build_array_ref): Likewise.
3009         (get_member_function_from_ptrfunc): Likewise.
3010         (build_binary_op): Add parameter.
3011         (pointer_int_sum): Use cp_build_binary_op.
3012         (pointer_diff): Likewise.
3013         (build_modify_expr): Likewise.
3014         (get_delta_difference): Likewise.
3015         (build_ptrmemfunc): Likewise.
3017 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
3019         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
3020         * decl.c (create_implicit_typedef): Adjust.
3021         * decl2.c (build_artificial_parm): Adjust.
3022         * method.c (implicitly_declare_fn): Adjust.
3023         * pt.c (push_inline_template_parms_recursive): Adjust.
3024         (process_template_parm): Adjust.
3025         (overloaded_template_name): Adjust.
3026         * semantics.c (finish_template_template_parm): Adjust.
3028 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
3030         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
3031         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
3032         where to emit thunks.
3033         (build_vtt): Adjust call to build_vtt_inits.
3034         (build_vtt_inits): Add parameter to indicate whether or not
3035         sub-VTTs for virtual bases should be included.  Adjust handling of
3036         construction vtables.
3037         (get_matching_base): New function.
3038         (dfs_build_vtt_inits): Rename to ...
3039         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
3040         construction vtables.
3041         (dfs_fixup_binfo_vtbls): Likewise.
3042         (build_ctor_vtbl_groups): Build construction vtables for virtual
3043         bases, too.
3044         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
3045         to build construction vtbls.
3046         (dfs_accumulate_vtbl_inits): Adjust handling of
3047         construction vtables.
3049         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
3050         types correctly.
3052 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
3054         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
3056 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
3058         * search.c (hides): Remove.
3059         (is_subobject_of_p): Add most_derived parameter. Use
3060         CANONICAL_BINFO.
3061         (lookup_field_queue_p): Adjust.
3062         (lookup_field_r): Adjust.
3064 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
3066         * decl2.c (handle_class_head): Bash typedefs to the type's main
3067         decl.
3069 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
3071         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
3072         (begin_global_stmt_expr): ... this.
3073         (genrtl_finish_stmt_expr): Rename to ...
3074         (finish_global_stmt_expr): ... this.
3075         * init.c (begin_init_stmts): Adjust calls.
3076         (finish_init_stmts): Likewise.
3077         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
3078         (begin_global_stmt_expr): ... this.
3079         (genrtl_finish_stmt_expr): Rename to ...
3080         (finish_global_stmt_expr): ... this.
3082 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3084         * search.c (lookup_member): Fix typo in comment.
3086 2000-06-24  Jason Merrill  <jason@redhat.com>
3088         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
3089         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
3091 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3093         * parse.y (complex_direct_notype_declarator): Support global_scope.
3094         * Makefile.in: Adjust conflict count.
3096 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
3098         * parse.y (template_arg): Convert TEMPLATE_DECL
3099         that is a template template paramter to
3100         TEMPLATE_TEMPLATE_PARM here.
3102         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
3103         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
3104         (copy_template_template_parm): Adjust prototype.
3105         * decl.c (grokdeclarator): Remove dead code.
3106         * pt.c (process_template_parm): Tidy.
3107         (lookup_template_class): Construct nodes in
3108         copy_template_template_parm.
3109         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
3110         lookup_template_class.  Use TYPE_TI_TEMPLATE.
3111         * tree.c (copy_template_template_parm): Add NEWARGS
3112         parameter.
3113         (mapcar): Adjust call to copy_template_template_parm.
3114         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
3115         * method.c (build_template_template_parm_names): Change error
3116         code to avoid compilation warning.
3118         * gxxint.texi: Document template template parameter
3119         name mangling.
3121 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
3123         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
3124         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
3125         (cp-demangle.o): New rule.
3126         (dyn-string.o): Likewise.
3127         * inc/cxxabi.h (__cxa_demangle): New declaration.
3129 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
3131         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
3132         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
3133         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
3134         a tree, not an int.
3135         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
3136         (make_thunk): Change prototype.
3137         (emit_thunk): Rename to use_thunk.
3138         (mangle_thunk): Change prototype.
3139         * class.c (get_derived_offset): Simplify.
3140         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
3141         BV_GENERATE_THUNK_WITH_VTABLE_P.
3142         (build_primary_vtable): Simplify.
3143         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
3144         (dfs_find_base): Remove.
3145         (update_vtable_entry_for_fn): Correct bug in finding the base
3146         where a virtual function was first declared.  Figure out whether
3147         or not to emit a vcall-thunk with the vtables in which it appears.
3148         Correct logic for deciding whether to use an ordinary thunk, or a
3149         vcall thunk.
3150         (finish_struct_1): Remove unnecssary code.
3151         (build_vtbl_initializer): Use ssize_int for the running counter of
3152         negative indices.
3153         (build_vtbl_initializer): Only use vcall thunks where necessary.
3154         Mark thunks as needing to be emitted with their vtables, or not.
3155         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
3156         indices.  Use size_binop.
3157         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
3158         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
3159         size_binop.
3160         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
3161         (build_vtable_entry): Mark thunks as needing to be emitted with
3162         their vtables, or not.
3163         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
3164         * decl2.c (mark_vtable_entries): Use use_thunk instead of
3165         emit_thunk.
3166         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
3167         information.
3168         * error.c (dump_expr): Use BV_FN.
3169         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
3170         not an int.
3171         * method.c (make_thunk): Likewise.
3172         (emit_thunk): Rename to use_thunk.  Allow callers to decide
3173         whether or not to actually emit the thunk.  Adjust for changes in
3174         representation of vcall offsets.
3175         * search.c (dfs_get_pure_virtuals): Use BV_FN.
3176         * semantics.c (emit_associated_thunks): New function.
3177         (expand_body): Use it.
3178         * ir.texi: Adjust decriptions of thunks.
3180 2000-06-22  Jason Merrill  <jason@redhat.com>
3182         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
3183         (tsubst_friend_function): Copy it here.
3185         * decl.c (grok_op_properties): Fix typo.
3187         * decl2.c (delete_sanity): Clarify warning, avoid failure on
3188         deleting void*.
3190         * pt.c (check_explicit_specialization): Clarify error.
3192         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
3193         an old OVERLOAD when we're declaring a non-function.
3194         (pushdecl, destroy_local_var): Check for error_mark_node.
3195         (warn_extern_redeclared_static): Also bail early if
3196         we're a CONST_DECL.
3197         (push_overloaded_decl): Ignore an old error_mark_node.
3199 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
3201         * call.c (build_x_va_arg): Check if in a template decl.
3202         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
3204 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3206         * class.c (push_lang_context): TYPE_NAME gets you to the Java
3207         types DECLs.
3208         * decl.c (check_goto): Computed gotos assumed OK.
3210 2000-06-20  Jason Merrill  <jason@redhat.com>
3212         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
3213         for which we don't need to look for instantiations.
3215 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
3217         * parse.y (program): Always call finish_translation_unit.
3218         * parse.c, parse.h: Rebuilt.
3220 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
3222         * method.c: Don't include hard-reg-set.h.
3224 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
3226         * rtti.c (get_base_offset): Cope when vbase field is in a base.
3228 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
3230         * call.c (build_conditional_expr): Use VOID_TYPE_P.
3231         * cvt.c (cp_convert_to_pointer): Likewise.
3232         (convert_to_void): Likewise.
3233         * error.c (dump_expr): Likewise.
3234         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
3235         * init.c (build_delete): Likewise.
3236         * method.c (emit_thunk): Likewise.
3237         * optmize.c (declare_return_variable): Likewise.
3238         * rtti.c (get_tinfo_decl_dynamic): Likewise.
3239         (get_typeid): Likewise.
3240         (build_dynamic_cast_1): Likewise.
3241         * typeck.c (composite_pointer_type): Likewise.
3242         (common_type): Likewise.
3243         (build_indirect_ref): Likewise.
3244         (build_binary_op): Likewise.
3245         (build_x_compound_expr): Likewise.
3246         (check_return_expr): Likewise.
3247         * typeck2.c (add_exception_specifier): Likewise.
3249         * mangle.c (write_method_parms): Use direct comparison for end
3250         of parmlist.
3252 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
3254         * cp-tree.h (genrtl_try_block): Declare function.
3255         (genrtl_handler): Likewise.
3256         (genrtl_catch_block): Likewise.
3257         (genrtl_ctor_stmt): Likewise.
3258         (genrtl_subobject): Likewise.
3259         (genrtl_decl_cleanup): Likewise.
3260         (genrtl_do_poplevel): Likewise.
3261         (genrtl_do_pushlevel): Likewise.
3262         (genrtl_clear_out_block): Likewise.
3263         (genrtl_goto_stmt): Likewise.
3264         (genrtl_expr_stmt): Likewise.
3265         (genrtl_decl_stmt): Likewise.
3266         (genrtl_if_stmt): Likewise.
3267         (genrtl_while_stmt): Likewise.
3268         (genrtl_do_stmt): Likewise.
3269         (genrtl_return_stmt): Likewise.
3270         (genrtl_for_stmt): Likewise.
3271         (genrtl_break_stmt): Likewise.
3272         (genrtl_continue_stmt): Likewise.
3273         (genrtl_scope_stmt): Likewise.
3274         (genrtl_switch_stmt): Likewise.
3275         (genrtl_case_label): Likewise.
3276         (genrtl_begin_compound_stmt): Likewise.
3277         (genrtl_finish_compound_stmt): Likewise.
3278         (genrtl_compound_stmt): Likewise.
3279         (genrtl_asm_stmt): Likewise.
3280         (genrtl_named_return_value): Likewise.
3281         (genrtl_begin_stmt_expr): Likewise.
3282         (genrtl_finish_stmt_expr): Likewise.
3283         (finish_for_stmt): Removed first argument.
3284         (finish_switch_stmt): Likewise.
3286         * semantics.c (genrtl_try_block): Define function.
3287         (genrtl_handler): Likewise.
3288         (genrtl_catch_block): Likewise.
3289         (genrtl_ctor_stmt): Likewise.
3290         (genrtl_subobject): Likewise.
3291         (genrtl_decl_cleanup): Likewise.
3292         (genrtl_do_poplevel): Likewise.
3293         (genrtl_do_pushlevel): Likewise.
3294         (genrtl_clear_out_block): Likewise.
3295         (genrtl_goto_stmt): Likewise.
3296         (genrtl_expr_stmt): Likewise.
3297         (genrtl_decl_stmt): Likewise.
3298         (genrtl_if_stmt): Likewise.
3299         (genrtl_while_stmt): Likewise.
3300         (genrtl_do_stmt): Likewise.
3301         (genrtl_return_stmt): Likewise.
3302         (genrtl_for_stmt): Likewise.
3303         (genrtl_break_stmt): Likewise.
3304         (genrtl_continue_stmt): Likewise.
3305         (genrtl_scope_stmt): Likewise.
3306         (genrtl_switch_stmt): Likewise.
3307         (genrtl_case_label): Likewise.
3308         (genrtl_begin_compound_stmt): Likewise.
3309         (genrtl_finish_compound_stmt): Likewise.
3310         (genrtl_compound_stmt): Likewise.
3311         (genrtl_asm_stmt): Likewise.
3312         (genrtl_named_return_value): Likewise.
3313         (genrtl_begin_stmt_expr): Likewise.
3314         (genrtl_finish_stmt_expr): Likewise.
3315         (finish_for_stmt): Removed first argument and generate rtl
3316         specific code.
3317         (finish_switch_stmt): Likewise.
3318         (do_poplevel): Removed generate rtl specific code.
3319         (do_pushlevel): Likewise.
3320         (add_tree): Likewise.
3321         (finish_goto_stmt): Likewise.
3322         (finish_expr_stmt): Likewise.
3323         (begin_if_stmt): Likewise.
3324         (finish_if_stmt_cond): Likewise.
3325         (finish_then_clause): Likewise.
3326         (begin_else_clause): Likewise.
3327         (finish_else_clause): Likewise.
3328         (finish_if_stmt): Likewise.
3329         (clear_out_block): Likewise.
3330         (begin_while_stmt): Likewise.
3331         (finish_while_stmt_cond): Likewise.
3332         (finish_while_stmt): Likewise.
3333         (begin_do_stmt): Likewise.
3334         (finish_do_body): Likewise.
3335         (finish_do_stmt): Likewise.
3336         (finish_return_stmt): Likewise.
3337         (begin_for_stmt): Likewise.
3338         (finish_for_init_stmt): Likewise.
3339         (finish_for_cond): Likewise.
3340         (finish_for_expr): Likewise.
3341         (finish_break_stmt): Likewise.
3342         (finish_continue_stmt): Likewise.
3343         (begin_switch_stmt): Likewise.
3344         (finish_switch_cond): Likewise.
3345         (finish_case_label): Likewise.
3346         (begin_try_block): Likewise.
3347         (begin_function_try_block): Likewise.
3348         (finish_try_block): Likewise.
3349         (finish_cleanup_try_block): Likewise.
3350         (finish_cleanup): Likewise.
3351         (finish_function_try_block): Likewise.
3352         (finish_handler_sequence): Likewise.
3353         (finish_function_handler_sequence): Likewise.
3354         (begin_handler): Likewise.
3355         (finish_handler_parms): Likewise.
3356         (begin_catch_block): Likewise.
3357         (finish_handler): Likewise.
3358         (begin_compound_stmt): Likewise.
3359         (finish_compound_stmt): Likewise.
3360         (finish_asm_stmt): Likewise.
3361         (finish_label_stmt): Likewise.
3362         (finish_label_decl): Likewise.
3363         (finish_subobject): Likewise.
3364         (finish_decl_cleanup): Likewise.
3365         (finish_named_return_value): Likewise.
3366         (begin_stmt_expr): Likewise.
3367         (finish_stmt_expr): Likewise.
3369         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
3370         to call genrtl_expr_stmt when appropriate.
3372         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
3373         begin_compound_expr to call genrtl_begin_stmt_expr and
3374         genrtl_begin_compound_expr when appropriate.
3375         (finish_init_stmts): Changed calls to finish_compound_expr and
3376         finish_stmt_expr to call genrtl_finish_compound_expr and
3377         genrtl_finish_stmt_expr when appropriate.
3378         (expand_default_init): Changed call to finish_expr_stmt to call
3379         genrtl_expr_stmt when appropriate.
3380         (build_vec_init): Likewise.
3382         * parse.y (simple_stmt): Removed first argument from call to
3383         finish_for_stmt. Removed first argument from call to
3384         finish_switch_stmt.
3386         * parse.c: Regenerated.
3388         * pt.c (tsubst_expr): Removed first argument from call to
3389         finish_for_stmt. Removed first argument from call to
3390         finish_switch_stmt.
3392 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
3394         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
3395         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
3397         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
3398         (cplus_tree_code_length[]): Likewise.
3399         (cplus_tree_code_name[]): Likewise.
3400         (init_parse): Added call to add_c_tree_codes. Changed
3401         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
3403 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
3405         * cp-tree.h (finish_mem_initializers): Declare.
3406         (count_trees): Likewise.
3407         * parse.y (base_init): Use finish_mem_initializers.
3408         * semantics.c (finish_mem_initializers): New function.
3410         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
3411         the number of trees.
3412         (n_trees): Remove.
3413         (count_trees): Don't use it.
3415 2000-06-15  Jason Merrill  <jason@redhat.com>
3417         * tree.c (count_trees): New debugging function.
3419         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
3420         * init.c (build_member_call): Pull out the name of a DECL.
3422         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
3423         * semantics.c (expand_body): Push to TV_INTEGRATION here.
3424         * optimize.c (optimize_function): Not here.
3425         * pt.c (instantiate_decl): Push to TV_PARSE.
3427 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
3429         * cp-tree.h (struct language_function): Remove x_base_init_list
3430         and x_member_init_list.
3431         (current_base_init_list): Remove.
3432         (current_member_init_list): Likewise.
3433         (setup_vtbl_ptr): Change prototype.
3434         (emit_base_init): Likewise.
3435         (expand_member_init): Likewise.
3436         (reinit_parse_for_function): Remove.
3437         * decl.c (save_function_data): Don't clear x_base_init_list and
3438         x_member_init_list.
3439         (mark_language_function): Don't mark them.
3440         * init.c (perform_member_init): Tweak comment.
3441         (sort_member_init): Take the list of initializers as an argument.
3442         (sort_base_init): Likewise.
3443         (emit_base_init): Likewise.
3444         (expand_member_init): Return the initializer.  Don't use global
3445         variables.
3446         * lex.c (reinit_parse_for_function): Remove.
3447         * method.c (build_template_parm_names): Correct substitution.
3448         (do_build_copy_constructor): Don't use current_member_init_list
3449         and current_base_init_list.
3450         (synthesize_method): Likewise.
3451         * parse.y (base_init): Split mem-initializers into
3452         base-initializers and field-initializers.
3453         (member_init_list): Build up the list here.
3454         (member_init): Return the initializer.
3455         (fn.depfn): Don't use reinit_parse_for_function.
3456         * parse.c: Regenerated.
3457         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
3458         ERROR_MARK.
3459         (tsubst_expr): Don't use current_member_init_list
3460         and current_base_init_list.
3461         (tsubst_expr_values): Rename to ...
3462         (tsubst_initializer_list): ... this.  Use convert_from_reference.
3463         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
3464         and current_base_init_list.
3465         (begin_function_definition): Don't call reinit_parse_for_function.
3467         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
3469         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
3470         correctly.
3472         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
3474 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
3476         * cp-tree.h (IF_COND): Move to c-common.h.
3477         (THEN_CLAUSE): Likewise.
3478         (ELSE_CLAUSE): Likewise.
3479         (WHILE_COND): Likewise.
3480         (WHILE_BODY): Likewise.
3481         (DO_COND): Likewise.
3482         (DO_BODY): Likewise.
3483         (RETURN_EXPR): Likewise.
3484         (EXPR_STMT_EXPR): Likewise.
3485         (FOR_INIT_STMT): Likewise.
3486         (FOR_COND): Likewise.
3487         (FOR_EXPR): Likewise.
3488         (FOR_BODY): Likewise.
3489         (SWITCH_COND): Likewise.
3490         (SWITCH_BODY): Likewise.
3491         (CASE_LOW): Likewise.
3492         (CASE_HIGH): Likewise.
3493         (GOTO_DESTINATION): Likewise.
3494         (COMPOUND_BODY): Likewise.
3495         (ASM_CV_QUAL): Likewise.
3496         (ASM_STRING): Likewise.
3497         (ASM_OUTPUTS): Likewise.
3498         (ASM_INPUTS): Likewise.
3499         (ASM_CLOBBERS): Likewise.
3500         (DECL_STMT_DECL): Likewise.
3501         (STMT_EXPR_STMT): Likewise.
3502         (LABEL_STMT_LABEL): Likewise.
3503         (SCOPE_BEGIN_P): Likewise.
3504         (SCOPE_END_P): Likewise.
3505         (SCOPE_STMT_BLOCK): Likewise.
3506         (SCOPE_NULLIFIED_P): Likewise.
3507         (SCOPE_NO_CLEANUPS_P): Likewise.
3508         (SCOPE_PARTIAL_P): Likewise.
3509         (ASM_VOLATILE_P): Likewise.
3510         (STMT_LINENO): Likewise.
3511         (STMT_LINENO_FOR_FN_P): Likewise.
3513         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
3514         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
3515         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
3516         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
3517         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
3519         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
3521         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
3522         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
3524         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
3525         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
3526         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
3528 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
3530         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
3531         * class.c (dfs_find_final_overrider): Set it appropriately.
3532         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
3533         avoid unneeded secondary vptrs.
3535 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
3537         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
3538         (check_bitfield_decl, check_field_decl): Likewise.
3539         (build_vtbl_or_vbase_field, build_base_field): Likewise.
3540         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
3541         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
3542         (xfer_tag, finish_enum): Likewise.
3543         * decl2.c (finish_builtin_type): Likewise.
3544         * init.c (init_init_processing): Likewise.
3545         * pt.c (instantiate_class_template): Likewise.
3546         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
3547         * cp-tree.h (struct lang_type): Add user_align member.
3548         (CLASSTYPE_USER_ALIGN): Define.
3550 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
3552         * Make-lang.in (c++.install-common): Install g++-cross in
3553         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
3554         $(target_alias)-g++ and $(target_alias)-c++.
3556 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
3558         * class.c (vcall_offset_data_s): Add last_init and fns.
3559         (overrides): Rename to same_signature_p.
3560         (dfs_find_final_overrider): Adjust accordingly.
3561         (mark_overriders): Likewise.
3562         (warn_hidden): Likewise.
3563         (build_vtbl_initializer): Reorganize machinery for building things
3564         at negative offsets.
3565         (build_vcall_and_vbase_vtbl_entries): Likewise.
3566         (build_vbase_offset_vtbl_entries): Likewise.
3567         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
3568         offset entries.  Do not create two entries for functions with the
3569         same signature.
3570         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
3571         (build_rtti_vtbl_entries): Reorganize machinery for building things
3572         at negative offsets.
3574         * optimize.c (expand_call_inline): Don't recurse into the code
3575         used to initialize the parameters more than once.
3577 2000-06-11  Mark Mitchell <mark@codesourcery.com>
3579         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
3580         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
3581         (find_substitution): Only use the `Sa' substitution for
3582         std::allocator, not instantiations of it.
3583         (write_template_prefix): Move comment.  Only use a TREE_LIST to
3584         represent substitutions for a member template.
3585         (write_array_type): Mangle array dimensions correctly.
3586         * optimize.c (maybe_clone_body): Copy more information from the
3587         cloned function.
3588         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
3589         on the regenerated declaration.
3591 2000-06-11  Chip Salzenberg  <chip@valinux.com>
3592             Mark Mitchell <mark@codesourcery.com>
3594         * class.c (build_vtable): Clarify comment.
3595         (build_ctor_vtbl_group): Pass the most derived type to
3596         build_vtable.
3598 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
3600         * decl2.c (compare_options): Don't needlessly cast away const-ness.
3602 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
3604         * decl.c (add_binding): Handle duplicate declarations of external
3605         variables.
3607 2000-06-09  Chip Salzenberg  <chip@valinux.com>
3608             Mark Mitchell <mark@codesourcery.com>
3610         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
3611         argument.
3612         (write_signed_number): New macro.
3613         (write_unsigned_number): Likewise.
3614         (write_source_name): Use them.
3615         (write_number): Handle signed and unsigned values.
3616         (write_integer_cst): Use tree_int_cst_sgn, and use
3617         write_unsigned_number or write_signed_number as appropriate.
3618         (write_discriminator): Use write_unsigned_number or
3619         write_signed_number as appropriate.
3620         (write_template_arg_literal): Likewise.
3621         (write_array_type): Use tree_low_cst.
3622         (write_template_parm):  Use write_unsigned_number or
3623         write_signed_number as appropriate.
3624         (write_substitution): Adjust call to write_number.
3625         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
3626         (write_expression): Handle non-type template arguments of
3627         reference type correctly.
3628         (mangle_thunk): Use write_signed_number.
3630 2000-06-09  Chip Salzenberg  <chip@valinux.com>
3632         * mangle.c (find_substition): Don't mangle objects with typename
3633         substitutions (e.g. "cin" as "Si").
3635 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
3637         * call.c (add_candidate): Use ggc_alloc_cleared.
3638         * decl.c (lookup_label): Likewise.
3639         * lex.c (retrofit_lang_decl): Likewise.
3641 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
3643         * semantics.c (expand_body): Push to TV_EXPAND.
3644         * optimize.c (optimize_function): Push to TV_INTEGRATION.
3645         * decl.c (start_function): Always call announce_function.
3647         * tinfo2.cc: Just declare abort.
3649 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
3651         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
3652         whenever @ is a symbolic name.
3654 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
3656         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
3658 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
3660         * decl.c (pushdecl): Look up functions by DECL_NAME, not
3661         DECL_ASSEMBLER_NAME.
3663 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
3665         * decl2.c (c_language): Define.
3667 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
3669         * lex.c (lang_init_options): Tweak.
3671         * decl2.c: Remove #inclusion of diagnostic.h
3672         (lang_decode_option): Move diagnostic formatting options to
3673         toplevel.
3675         * lang-options.h: Remove documentation for diagnostic options.
3677         * Makefile.in (lex.o): Depends upon diagnostic.h
3679 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
3681         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
3682         the same DECL_RESULT, it's not a redefinition.
3683         * pt.c (tsubst_decl): Remove code to handle illegal
3684         specializations.
3686 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
3688         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
3690 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
3692         * search.c (maybe_suppress_debug_info): Don't check
3693         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
3695         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
3696         here if extern_p.
3698         Remember instantiation context in deferred instantiations.
3699         * cp-tree.h (struct tinst_level): Remove.
3700         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
3701         * pt.c (current_tinst_level): Now a tree.
3702         (print_template_context, push_tinst_level, pop_tinst_level,
3703         tinst_for_decl): Adjust.
3704         (reopen_tinst_level): New fn.
3705         (init_pt): Register current_tinst_level as a root.
3706         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
3707         of the pending templates list.
3708         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
3709         * lex.c (extract_interface_info): Adjust.
3710         * decl2.c (warn_if_unknown_interface): Adjust.
3712 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
3714         * class.c (indirect_primary_base_p): New function.
3715         (determine_primary_base): Use it.
3717 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
3719         Update new-abi dynamic cast algorithm.
3720         * tinfo.cc (__class_type_info::__dyncast_result): Add
3721         whole_details. Adjust constructor.
3722         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
3723         Avoid unnecessary searching.
3724         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
3726 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3728         * decl.c (init_decl_processing): Don't call record_component_aliases.
3729         * tree.c (build_cplus_array_type_1): Likewise.
3731 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
3733         * ir.texi: Correct typo.
3734         * mangle.c (write_expression): Handle non-type template arguments
3735         with reference type.
3736         * method.c (build_overload_value): Likewise.
3737         * pt.c (convert_nontype_argument): Explicitly represent conversion
3738         to a reference with an ADDR_EXPR.
3739         (unify): Always unify arguments in left-to-right order.
3741 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
3742             Mark Mitchell  <mark@codesourcery.com>
3744         * Make-lang.in (CXX_SRCS): Add mangle.c.
3745         * Makefile.in (CXX_OBJS): Add mangle.o.
3746         (mangle.o): New rule.
3748         * class.c (local_classes): New variable.
3749         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
3750         (get_vtt_name): Use mangle_vtt_name for new ABI.
3751         (init_class_processing): Initialize local_classes.
3752         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
3753         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
3754         (std_identifier): New macro.
3755         (DECL_VOLATILE_MEMFUNC_P): New macro.
3756         (DECL_NAMESPACE_STD_P): Likewise.
3757         (local_classes): Declare.
3758         (get_mostly_instantiated_function_type): Declare.
3759         (init_mangle): Declare.
3760         (mangle_decl): Likewise.
3761         (mangle_type_string): Likewise.
3762         (mangle_type): Likewise.
3763         (mangle_typeinfo_for_type): Likewise.
3764         (mangle_typeinfo_string_for_type): Likewise.
3765         (mangle_vtbl_for_type): Likewise.
3766         (mangle_vtt_for_type): Likewise.
3767         (mangle_ctor_vtbl_for_type): Likewise.
3768         (mangle_thunk): Likewise.
3769         (mangle_conv_op_name_for_type): Likewise.
3770         (mangle_guard_variable): Likewise.
3771         * decl.c (pushtag): Keep track of local classes.
3772         (initialize_predefined_identifiers): Initialize std_identifier.
3773         (init_decl_processing): Use std_identifier.
3774         (start_decl): Don't treat instantiations as specializations.
3775         (grokdeclarator): Likewise.
3776         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
3777         name for fully-instantiated templates.
3778         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
3779         destructors with the new ABI.
3780         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
3781         (grokfield): Use mangle_type for new ABI.
3782         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
3783         (get_sentry): Use mangle_guard_variable for new ABI.
3784         (start_static_initialization_or_destruction): Likewise.
3785         * expr.c (extract_aggr_init): Remove.
3786         (extract_scalar_init): Likewise.
3787         (extract_init): Remove #if 0'd code.
3788         * mangle.c: New function.
3789         * method.c (build_mangled_name): Assert not flag_new_abi.
3790         (build_static_name): Likewise.
3791         (build_decl_overload_real): Likewise.
3792         (build_typename_overload): Likewise.
3793         (build_overload_with_type): Likewise.
3794         (build_overload_name): Likewise.
3795         (get_ctor_vtbl_name): Likewise.
3796         (start_squangling): Likewise.
3797         (get_id_2): Likewise.
3798         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
3799         (init_method): Call init_mangle for new ABI.
3800         (make_thunk): Call mangle_thunk for new ABI.
3801         * operators.def: Correct new ABI manglings for the `%' operator.
3802         Add `::' operator.
3803         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
3804         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
3805         (lookup_template_class): Call mangle_decl for new ABI.
3806         (get_mostly_instantiated_function_type): New function.
3807         (set_mangled_name_for_template_decl): Use it.
3808         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
3809         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
3810         conversion op names.
3811         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
3812         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
3813         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
3814         mangle_typeinfo_string_for_type.
3816 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
3818         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
3819         (INNERMOST_TEMPLATE_ARGS): New macro.
3820         (innermost_args): Remove.
3821         (get_innermost_template_args): New function.
3822         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
3823         * error.c (dump_function_decl): Be caution when using
3824         most_general_template.
3825         * method.c (build_template_parm_names):  Use
3826         INNERMOST_TEMPLATE_ARGS.
3827         * pt.c (add_to_template_args): Tidy comment
3828         (get_innermost_template_args): New function.
3829         (check_explicit_specialization): Clear DECL_INITIAL for a new
3830         specialization.
3831         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
3832         Tidy.
3833         (push_template_decl): Always register specializations of the most
3834         general template.
3835         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
3836         (coerce_template_parms): Likewise.
3837         (lookup_template_class): Likewise.
3838         (innermost_args): Remove.
3839         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
3840         (tsubst_decl): Handle tricky specializations.  Use
3841         get_innermost_template_args.
3842         (instantiate_template): Simplify handling of partial
3843         instantiations.
3844         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
3845         (most_general_template): Reimplement, in a more straightforward
3846         manner.
3847         (regenerate_decl_from_template): Tweak formatting.  Use
3848         TMPL_ARGS_DEPTH for clarity.
3849         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
3851         * dump.c (dequeue_and_dump): Dump information about thunks.
3853 2000-06-01  Richard Henderson  <rth@cygnus.com>
3855         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
3857 2000-06-01  Richard Henderson  <rth@cygnus.com>
3859         * decl2.c (unsupported_options): Fix typo, make const.
3860         (lang_decode_option): Fix bsearch argument order.
3862 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
3864         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
3865         on FIELD_DECLs.
3867 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
3869         * cp-tree.h (c_get_alias_set): Deleted.
3870         * Makefile.in (decl.o): Include ../expr.h.
3871         * decl.c (expr.h): Include.
3872         (init_decl_processing): Call record_component_aliases for arrays.
3873         (grokdeclarator): Likewise.
3874         Set TREE_ADDRESSABLE for fields that aren't bitfields.
3875         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
3877 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
3879         Remove guiding declaration support.
3880         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
3881         (flag_guiding_decls): Remove.
3882         * call.c (build_user_type_conversion_1): Remove support for
3883         guiding decls.
3884         (build_new_function_call): Likewise.
3885         (build_new_op): Likewise.
3886         (build_new_method_call): Likewise.
3887         * decl.c (start_function): Likewise.
3888         * friend.c (is_friend): Likewise.
3889         (do_friend): Likewise.
3890         * decl2.c ((flag_dump_translation_unit): Make it const.
3891         (flag_guiding_decls): Remove.
3892         (unsupported_options): New variable
3893         (compare_options): New function.
3894         (lang_decode_option): Use them.
3896         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
3898         * method.c (mangle_expression): Adjust test for legal expression
3899         operators.
3901         * pt.c (instantiate_decl): Save and restore the local
3902         specializations list.
3904 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
3906         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
3908 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
3910         * call.c (add_template_candidate_real): Handle member template
3911         constructors for classes with virtual bases.
3912         (build_user_type_conversion_1): Use in_charge_arg_for_name.
3913         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
3915         * ir.texi: Update thunk documentation.
3917         * call.c (joust): Fix handling of overloaded builtin operators.
3919 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
3921         * cp-tree.h (DECL_ANTICIPATED): New macro.
3922         Document new use of DECL_LANG_FLAG_7.
3923         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
3924         in the user namespace.
3925         * lex.c (do_identifier): If the identifier's declaration has
3926         DECL_ANTICIPATED on, it has not yet been declared.  But do not
3927         replace it with an ordinary implicit declaration.
3929         * tinfo2.cc: Include stdlib.h.
3931 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
3933         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
3934         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
3935         CLASSTYPE_ALIGN.
3937 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
3939         * decl2.c (lang_decode_option): Use skip_leading_substring instead
3940         of plain strncmp.
3942 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
3944         * operators.def (<?): Duplicated, should have been...
3945         (>?): this.  Fixed.
3947 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
3948             Mark Mitchell  <mark@codesourcery.com>
3950         * cp-tree.h (ansi_opname): Make it a macro.
3951         (ansi_assopname): Likewise.
3952         (struct lang_decl_flags): Add assignment_operator_p.
3953         (struct lang_decl): Add operator_code.
3954         (DECL_VTT_PARM): Adjust.
3955         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
3956         overloaded operator.
3957         (SET_OVERLOADED_OPERATOR_CODE): New macro.
3958         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
3959         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
3960         (opname_tab): Remove.
3961         (assignop_tab): Likewise.
3962         (operator_name_info_t): New type.
3963         (operator_name_info): New variable.
3964         (assignment_operator_name_info): Likewise.
3965         (build_cp_library_fn): Remove declaration.
3966         (push_cp_library_fn): Likewise.
3967         (operator_name_string): Likewise.
3968         (build_decl_overload): Likewise.
3969         * call.c (print_z_candidates): Simplify.
3970         (build_object_call): Adjust usage of ansi_opname.  Use
3971         DECL_OVERLOADED_OPERATOR_P.
3972         (op_error): Adjust operator name lookup.
3973         (build_conditional_expr): Adjust usage of ansi_opname.
3974         (build_new_op): Likewise.
3975         (build_op_delete_call): Likewise.
3976         (build_over_call): Likewise.
3977         (joust): Use DECL_OVERLOADED_OPERATOR_P.
3978         * decl.c (duplicate_decls): Copy operator_code.
3979         (init_decl_processing): Adjust parameters to push_cp_library_fn.
3980         (builtin_function): Adjust parameters to build_library_fn_1.
3981         (build_library_fn_1): Accept an overloaded operator code.
3982         (build_library_fn): Pass ERROR_MARK.
3983         (build_cp_library_fn): Accept an overloaded operator code.
3984         (push_cp_library_fn): Likewise.
3985         (grokfndecl): Tweak.
3986         (grokdeclarator): Simplify code to compute names of overloaded
3987         operators.  Adjust use of ansi_opname.
3988         (ambi_op_p): Work on tree_codes, not identifiers.
3989         (unary_op_p): Likewise.
3990         (grok_op_properties): Likewise.
3991         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
3992         (lang_mark_tree): Don't try to mark the operator_code.
3993         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
3994         * error.c (dump_decl): Remove special handling for operator
3995         names.
3996         (dump_function_name): Likewise.
3997         (dump_expr): Adjust name lookup of operators.
3998         (op_to_string): Simplify.
3999         (assop_to_string): Likewise.
4000         * init.c (build_new_1): Adjust use of ansi_opname.
4001         * lex.c (opname_tab): Remove.
4002         (assignop_tab): Likewise.
4003         (ansi_opname): Likewise.
4004         (ansi_assopname): Likewise.
4005         (operator_name_string): Likewise.
4006         (reinit_lang_specific): Likewise.
4007         (operator_name_info): New variable.
4008         (assignment_operator_name_info): Likewise.
4009         (init_operators): New function.
4010         (init_parse): Use it.
4011         (do_identifier): Adjust use of ansi_opname.
4012         * method.c (mangle_expression): Don't use ansi_opname for
4013         mangling.
4014         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
4015         (build_decl_overload): Remove.
4016         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
4017         (do_build_assign_ref): Adjust use of ansi_opname.
4018         (synthesize_method): Likewise.
4019         (implicitly_declare_fn): Likewise.
4020         * operators.def: New file.
4021         * parse.y (operator): Adjust use of ansi_opname.
4022         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
4023         (set_mangled_name_for_template_decl): Don't play games with
4024         current_namespace.
4025         (special_function_p): Adjust use of ansi_opname.
4026         * typeck.c (check_return_expr): Likewise.
4027         * Make-lang.in (cc1plus): Depend on operators.def.
4028         * Makefile.in (lex.o): Likewise.
4029         (decl.o): Likewise.
4031 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
4033         * Make-lang.in (cplib2.ready): Eradicate.
4035 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4037         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
4038         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
4039         (built_min, cp_tree_equal): Likewise.
4041 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
4043         * class.c (layout_nonempty_base_or_field): Replace
4044         `record_layout_info' with `record_layout_info_s'.
4046 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
4048         Fix goto checking.
4049         * cp-tree.h (struct language_function): x_named_labels is now
4050         a struct named_label_list*.
4051         * decl.c (struct named_label_use_list): Renamed from...
4052         (struct named_label_list): ...this.  New struct.
4053         (push_binding_level): Don't set eh_region.
4054         (note_level_for_eh): New fn.
4055         (pop_label): Take label and old value directly.
4056         (pop_labels): Adjust for new named_labels format.
4057         (lookup_label): Likewise.
4058         (poplevel): Note characteristics of a binding level containing a
4059         named label.  Mess with named label lists earlier.
4060         (mark_named_label_lists): New fn.
4061         (mark_lang_function): Call it.
4062         (use_label): New fn, split out from...
4063         (make_label_decl): ...here.  Don't call it.
4064         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
4065         check_previous_gotos): New fns, split out from...
4066         (define_label): ...here.
4067         (check_switch_goto): New fn.
4068         (define_case_label): Call it.
4069         (check_goto): New fn.
4070         * semantics.c (finish_goto_stmt): Call it and use_label.
4071         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
4072         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
4074 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
4076         * class.c (build_vtable_entry_ref): Correct usage of
4077         get_vtbl_decl_for_binfo.
4079         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
4080         * method.c (implicitly_declare_fn): Not here.
4082 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
4084         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
4085         (CPTI_PTMD_DESC_TYPE): ... here.
4086         (ptmd_desc_type_node): Rename to ...
4087         (ptm_desc_type_node): ... here.
4088         * decl.c: Likewise.
4089         * rtti.c (ptmd_initializer): Rename to ...
4090         (ptm_initializer): ... here.
4091         (sythesize_tinfo_var): Adjust. Deal with pointer to member
4092         function.
4093         (create_tinfo_types): Adjust.
4095 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
4097         Finish implementation of VTTs.
4098         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
4099         CPTI_VTT_PARM_IDENTIFIER.
4100         (vtt_parm_identifier): New macro.
4101         (vtt_parm_type): Likewise.
4102         (BINFO_SUBVTT_INDEX): Likewise.
4103         (BINFO_VPTR_INDEX): Likewise.
4104         (struct lang_decl): Add vtt_parm.
4105         (DECL_VTT_PARM): New macro.
4106         (DECL_USE_VTT_PARM): Likewise.
4107         (DECL_NEEDS_VTT_PARM_P): Likewise.
4108         (get_vtt_name): Declare.
4109         (build_artifical_parm): Likewise.
4110         (fixup_all_virtual_upcast_offsets): Likewise.
4111         (expand_indirect_vtbls_init): Remove.
4112         * call.c (build_new_method_call): Pass the vtt to subobject
4113         constructors and destructors.
4114         * class.c (get_vtt_name): Give it external linkage.
4115         (build_clone): Handle the magic VTT parameters for clones.
4116         (clone_function_decl): Fix typo in comment.
4117         (build_vtt): Keep track of the indices in the VTTs where various
4118         entities are stored.
4119         (build_vtt_inits): Likewise.
4120         (dfs_build_vtt_inits): Likewise.
4121         (build_ctor_vtbl_group): Tweak type of construction vtables.
4122         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
4123         primary bases, when building construction vtables.
4124         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
4125         (initialize_predefined_identifiers): Add vtt_parm_identifier.
4126         (init_decl_processing): Initialize vtt_parm_type.
4127         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
4128         (lang_mark_tree): Make vtt_parm.
4129         * decl2.c (build_artificial_parm): New function.
4130         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
4131         (grokclassfn): Use build_artificial_parm.
4132         * init.c (initialize_vtbl_ptrs): Call
4133         fixup_all_virtual_upcast_offsets directly.
4134         (perform_member_init): Use the complete subobject destructor for
4135         member cleanups.
4136         (build_vtbl_address): New function.
4137         (expand_virtual_init): Handle VTTs.
4138         * optimize (maybe_clone_body): Likewise.
4139         * search.c (fixup_all_virtual_upcast_offsets): Give it external
4140         linkage.
4141         (expand_indirect_vtbls_init): Remove.
4142         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
4143         * tree.c (make_binfo): Make them bigger.
4145 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
4147         * inc/cxxabi.h (__pbase_type_info): Define, based on
4148         __pointer_type_info.
4149         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
4150         (__pointer_to_member_type_info): Likewise.
4151         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
4152         (__pointer_to_member_type_info::__is_pointer_p): Remove.
4153         (__pointer_type_info::__do_catch): Rename to ...
4154         (__pbase_type_info::__do_catch): ... here. Adjust.
4155         (__pbase_type_info::__pointer_catch): Implement.
4156         (__pointer_type_info::__pointer_catch): Adjust.
4157         (__pointer_to_member_type_info::__pointer_catch): Adjust.
4159 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
4161         * tinfo.h (__user_type_info::contained_virtual_p): New
4162         predicate.
4163         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
4164         shaped heirarchy.
4165         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
4166         diamond shaped heirarchy. Add early out for mixed diamond and
4167         duplicate shaped heirarchy.
4169 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
4171         * cp-tree.h (build_delete): Change prototype.
4172         (build_vec_delete): Likewise.
4173         * call.c (build_scoped_method_call): Use special_function_kind
4174         values to indicate the kind of destruction to be done.
4175         (build_method_call): Likewise.
4176         * decl.c (finish_destructor_body): Likewise.
4177         (maybe_build_cleanup_1): Likewise.  Rename to ...
4178         (maybe_build_cleanup): ... this.
4179         * decl2.c (delete_sanity): Use special_function_kind
4180         values to indicate the kind of destruction to be done.
4181         (build_cleanup): Likewise.
4182         * init.c (perform_member_init): Likewise.
4183         (build_vec_delete_1): Likewise.
4184         (build_dtor_call): Simplify.
4185         (build_delete): Use special_function_kind
4186         values to indicate the kind of destruction to be done.
4187         (build_vbase_delete): Likewise.
4188         (build_vec_delete): Likewise.
4190         * init.c (sort_member_init): Fix typo in error message generation
4191         code.
4193 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
4195         * semantics.c (begin_class_definition): make the packed
4196         attribute be sensitive to the "-fpack-struct" command line flag
4198 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
4200         Update new-abi upcast algorithm.
4201         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
4202         prototype and meaning of return value.
4203         (__si_class_type_info::__do_upcast): Likewise.
4204         (__vmi_class_type_info::__do_upcast): Likewise.
4205         * tinfo.cc (__class_type_info::__upcast_result): Replace
4206         whole2dst with part2dst. Adjust ctor.
4207         (__class_type_info::__do_upcast): Adjust call of worker function.
4208         (__class_type_info::__do_upcast): Adjust.
4209         (__si_class_type_info::__do_upcast): Adjust. Use parent's
4210         __do_upcast.
4211         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
4212         virtual base in diamond heirarchy bug.
4214 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
4216         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
4217         and bitfield to tinfo_fn_p.
4218         (DECL_TINFO_FN_P): Adjust.
4219         (SET_DECL_TINFO_FN_P): Likewise.
4220         (DECL_MUTABLE_P): Likewise.
4221         (DECL_C_BIT_FIELD): Likewise.
4222         (SET_DECL_C_BIT_FIELD): Likewise.
4223         (CLEAR_DECL_C_BIT_FIELD): Likewise.
4224         (DECL_UNINLINABLE): Likewise.
4225         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
4226         (handle_using_decl): Remove assertion.
4227         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
4228         to build FIELD_DECLs.
4229         (build_base_field): Likewise.
4230         (layout_class_type): Likewise.
4231         * decl.c (init_decl_processing): Likewise.
4232         (build_ptrmemfunc_type): Likewise.
4233         (grokdeclarator): Likewise.
4234         * decl2.c (grok_x_components): Likewise.
4235         * except.c (call_eh_info): Likewise.
4236         * init.c (init_init_processing): Likewise.
4237         * rtti.c (expand_class_desc): Likewise.
4238         (create_pseudo_type_info): Likewise.
4239         (get_vmi_pseudo_type_info): Likewise.
4240         (create_tinfo_types): Likewise.
4241         * ptree.c (print_lang_decl): Adjust.
4242         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
4243         before checking DECL_MUTABLE_P.
4245         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
4246         parameters for template functions.
4247         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
4248         destructors as well as constructors.
4250 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
4252         * class.c (build_ctor_vtbl_group): Set inits.
4253         * optimize.c (maybe_clone_body): Set DECL_INLINE and
4254         DECL_THIS_INLINE appropriately for clones.
4256         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
4257         (DECL_CONV_FN_P): Simplify.
4258         (DECL_OPERATOR): Remove.
4259         (language_to_string): Declare.
4260         * decl.c (duplicate_decls): Fix typo in comment.
4261         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
4262         (grok_op_properties): Use DECL_CONV_FN_P instead of
4263         IDENTIFIER_TYPENAME_P.
4264         * dump.c (dequeue_and_dump): Dump the language linkage of
4265         declarations.
4266         * error.c (language_to_string): Give it external linkage.
4267         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
4268         (implicitly_declare_fn): Set DECL_LANGUAGE.
4269         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
4270         IDENTIFIER_TYPENAME_P.
4271         (tsubst_decl): Likewise.
4272         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
4273         * semantics.c (finish_member_declaration): Don't mark members of
4274         classes declared in an extern "C" region as extern "C".
4276 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4278         * decl2.c (qualified_lookup_using_namespace): Look through
4279         namespace aliases.
4281         * decl.c (push_using_decl): Return the old decl on namespace level.
4283 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
4285         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
4286         (VTT_NAME_PREFIX): New macro.
4287         (CTOR_VTBL_NAME_PREFIX): Likewise.
4288         (get_ctor_vtbl_name): New function.
4289         * class.c (get_vtable_name): Simplify.
4290         (get_vtt_name): New function.
4291         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
4292         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
4293         when a virtual base becomes primary.
4294         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
4295         VTTs.
4296         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
4297         additional parameters.
4298         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
4299         (initialize_array): New function.
4300         (build_vtt): Likewise.
4301         (build_vtt_inits): Likewise.
4302         (dfs_build_vtt_inits): Likewise.
4303         (dfs_fixup_binfo_vtbls): Likewise.
4304         (build_ctor_vtbl_group): Likewise.
4305         (initialize_vtable): Use initialize_array.
4306         (accumulate_vtbl_inits): Reimplement to handle construction
4307         vtables.
4308         (dfs_accumulate_vtbl_inits): Likewise.
4309         (bulid_vtbl_initializer): Adjust parameter name.
4310         * method.c (build_typename_overload): Remove #if 0'd code.
4311         (get_ctor_vtbl_name): New function.
4312         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
4313         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
4315         * cp-tree.h (struct lang_type): Remove search_slot.
4316         (CLASSTYPE_SEARCH_SLOT): Remove.
4317         (emit_base_init): Change prototype.
4318         (initialize_vtbl_ptrs): Likewise.
4319         (expand_indirect_vtbls_init): Likewise.
4320         (clear_search_slots): Remove.
4321         * decl.c (lang_mark_tree): Don't mark search_slot.
4322         * init.c (initialize_vtbl_ptrs): Simplify.
4323         (emit_base_init): Likewise.
4324         * search.c (struct vbase_info): Document decl_ptr.
4325         (convert_pointer_to_single_level): Remove.
4326         (dfs_find_vbases): Remove.
4327         (dfs_init_base_pointers): Simplify.
4328         (dfs_clear_vbase_slots): Remove.
4329         (dfs_vtable_path_unmark): New function.
4330         (init_vbase_pointers): Simplify.
4331         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
4332         (expand_indirect_vtbls_init): Simplify.  Don't call
4333         mark_all_temps_used.
4334         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
4335         initialize_vtbl_ptrs.
4337 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
4339         * except.c: Add static prototypes.
4341 2000-05-20  H.J. Lu  <hjl@gnu.org>
4343         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
4345 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
4347         Don't create a separate copy of virtual bases for the
4348         CLASSTYPE_VBASECLASSES list.
4349         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
4350         (BINFO_FOR_VBASE): Remove.
4351         (CANONICAL_BINFO): Adjust.
4352         (binfo_for_vbase): New function.
4353         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
4354         instead of BINFO_FOR_VBASE.
4355         (build_vbase_pointer): Likewise.
4356         (build_secondary_vtable): Likewise.
4357         (dfs_mark_primary_bases): Likewise.
4358         (mark_primary_bases): Likewise.
4359         (layout_nonempty_base_or_field): Likewise.
4360         (dfs_set_offset_for_shared_vbases): Likewise.
4361         (dfs_set_offset_for_unshared_vbases): Likewise.
4362         (layout_virtual_bases): Likewise.  Adjust for changes to the
4363         CLASSTYPE_VBASECLASSES list.
4364         (dump_class_hierarchy_r): Use binfo_for_vbase
4365         instead of BINFO_FOR_VBASE.
4366         (dump_class_hierarchy): Likewise.
4367         (finish_vtbls): Likewise.
4368         (build_vtbl_initializer): Adjust for changes to the
4369         CLASSTYPE_VBASECLASSES list.
4370         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
4371         * decl.c (finish_destructor_body): Adjust for changes to the
4372         CLASSTYPE_VBASECLASSES list.
4373         * init.c (sort_base_init): Use binfo_for_vbase.
4374         (construct_virtual_bases): Adjust for changes to the
4375         CLASSTYPE_VBASECLASSES list.
4376         (expand_member_init): Use binfo_for_vbase.
4377         (build_vbase_delete):  Adjust for changes to the
4378         CLASSTYPE_VBASECLASSES list.
4379         * method.c (do_build_copy_constructor): Likewise.
4380         * rtti.c (get_base_offset): Use binfo_for_vbase.
4381         (expand_class_desc): Remove #if 0'd code.
4382         * search.c (struct vbase_info): Remove vbase_types.
4383         (get_base_distance):  Use binfo_for_vbase.
4384         (lookup_field_queue_p): Use CANONICAL_BINFO.
4385         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
4386         (get_pure_virtuals): Adjust for changes to the
4387         CLASSTYPE_VBASECLASSES list.
4388         (dfs_find_vbases): Use binfo_for_vbase.
4389         (dfs_init_vbase_pointers): Likewise.
4390         (init_vbase_pointers): Don't initialize vi.vbase_types.
4391         (virtual_context): Use binfo_for_vbase.
4392         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
4393         CLASSTYPE_VBASECLASSES list.
4394         (expand_indirect_vtbls_init): Simplify.
4395         (dfs_get_vbase_types): Don't replicate virtual bases.
4396         (find_vbase_instance): Use binfo_for_vbase.
4397         (binfo_for_vbase): New function.
4398         * typeck.c (get_delta_difference): Use binfo_for_vbase.
4400 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
4402         * decl2.c (finish_anon_union): Generalize error messages to handle
4403         anonymous structures.
4404         * init.c (perform_member_init): Remove `name' parameter.
4405         (build_field_list): New function.
4406         (sort_member_init): Handle anonymous union initialization order
4407         correctly.  Check for multiple initializations of the same union.
4408         (emit_base_init): Don't look up fields by name here.
4409         (expand_member_init): Record the result of name lookup for future
4410         reference.
4411         * typeck.c (build_component_ref): Fix formatting.
4413 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
4415         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
4416         * typeck.c (build_x_compound_expr): Replace warn_unused with
4417         warn_unused_value.
4419         * decl2.c (lang_decode_option): Update -Wall unused flags by
4420         calling set_Wunused.
4422 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
4424         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
4425         * init.c (dfs_vtable_path_unmark): Remove.
4426         * search.c (marked_new_vtable_p): Likewise.
4427         (unmarked_new_vtable_p): Likewise.
4428         (dfs_search_slot_nonempty_p): Likewise.
4429         (dfs_mark): Likewise.
4430         (dfs_vtable_path_unmark): Likewise.
4431         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
4432         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
4433         (dfs_init_vbase_pointers): Remove special-case new ABI code.
4434         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
4435         (init_vbase_pointers): Simplify.
4436         (expand_indirect_vtbls_init): Likewise.
4438         * class.c (copy_virtuals): New function.
4439         (build_primary_table): Use it.
4440         (build_secondary_vtable): Likewise.
4441         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
4442         indicate that no vcall offset is required.
4443         (add_virtual_function): Likewise.
4444         (modify_all_vtables): Likewise.
4445         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
4446         (dfs_accumulate_vtbl_inits): Likewise.
4447         (build_vtbl_initializer): Make changes to handle construction
4448         vtables.
4449         (dfs_build_vcall_offset_vtbl_entries): Likewise.
4450         (build_rtti_vtbl_entries): Likewise.
4451         (build_vtable_entries): Handle a NULL vcall_index.
4453 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
4455         * decl2.c (lang_decode_option): Fix thinko.
4457 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
4459         * except.c (check_handlers): New fn.
4460         * cp-tree.h: Declare it.
4461         * semantics.c (finish_handler_sequence): Call it.
4462         (finish_function_handler_sequence): Likewise.
4463         (finish_handler_parms): Set TREE_TYPE on the handler.
4464         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
4465         * search.c (get_base_distance_recursive): If protect>1, ignore
4466         special access.
4467         (get_base_distance): Don't reduce watch_access.
4469 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
4471         * lex.c: #include diagnostic.h.
4472         (lang_init_options): Set default prefixing rules.
4474         * lang-options.h: Add -fdiagnostics-show-location=.
4476         * decl2.c: #include diagnostic.h.
4477         (lang_decode_option): Handle -fdiagnostics-show-location=.
4479 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
4481         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
4482         * vec.cc: Revert my 2000-05-07 change.
4484 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
4486         * class.c (check_field_decls): Complain about non-static data
4487         members with same name as class in class with constructor.
4489 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
4491         * decl.c (grokdeclarator): Allow non-static data members with
4492         same name as class.
4494 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
4496         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
4497         and pending_inline.filename.  Update prototypes.
4498         * decl.c (define_label): Constify filename parameter.
4499         * decl2.c (warn_if_unknown_interface): Constify local char *.
4500         * input.c Constify input_source.filename. Don't declare
4501         input_filename or lineno.  Constify filename parameter to feed_input.
4502         * lex.c (init_parse): Constify parameter and return value.
4503         (cp_pragma_interface, cp_pragma_implementation): Constify
4504         filename argument.
4505         (reinit_parse_for_method, reinit_parse_for_block,
4506         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
4507         Constify local char *.
4508         * pt.c: Don't declare lineno or input_filename.
4509         (print_template_context, tsubst_friend_function, tsubst_decl,
4510         tsubst, instantiate_decl): Constify local char *.
4511         * semantics.c (expand_body): Constify local char *.
4512         * tree.c (build_srcloc): Constify filename parameter.
4513         * typeck.c (c_expand_asm_operands): Constify filename
4514         parameter.
4516 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
4518         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
4519         offsetof expansion.
4521 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
4523         * inc/cxxabi.h:  Fix typos in comment.
4524         (__base_class_info::__offset): Use a static_cast.
4526 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
4528         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
4529         of std::size_t and std::ptrdiff_t respectively.
4530         * tinfo.cc: Likewise.
4531         * vec.cc: Likewise.
4533 2000-05-06  Richard Henderson  <rth@cygnus.com>
4535         * typeck.c (build_c_cast): Don't warn integer->pointer size
4536         mismatch for constants.
4538 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
4540         * rtti.c (ptmd_initializer): Set non-public, if class is
4541         incomplete.
4543         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
4544         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4545         __cxa_vec_delete): Likewise.
4546         * tinfo.cc (__dynamic_cast): Likewise.
4547         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4548         __cxa_vec_delete): Likewise.
4550 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
4552         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
4553         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
4554         (lang_decl_flags): Add vcall_offset.
4555         (THUNK_VCALL_OFFSET): Use it.
4556         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
4557         * method.c (make_thunk): Create the lang_decl here, not in
4558         emit_thunk.
4559         (emit_thunk): Make generic thunks into ordinary functions once
4560         they have been fed to expand_body.
4561         * semantics.c (expand_body): Set current_function_is_thunk here.
4563 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4565         * class.c (update_vtable_entry_for_fn): Prototype.
4567         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
4568         and `tmpl'.
4570         * search.c (dfs_build_inheritance_graph_order): Prototype.
4572 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
4574         * cp-tree.h (special_function_kind): Add various kinds of
4575         destructors.
4576         (special_function_p): New function.
4577         * class.c (overrides): Don't let one kind of destructor override
4578         another.
4579         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
4580         whether or not to instantiate a template.
4581         * tree.c (special_function_p): Define.
4583 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
4585         * cp-tree.def (THUNK_DECL): Remove.
4586         * cp-tree.h (DECL_THUNK_P): New macro.
4587         (DECL_NON_THUNK_FUNCTION_P): Likewise.
4588         (DECL_EXTERN_C_FUNCTION_P): Likewise.
4589         (SET_DECL_THUNK_P): Likewise.
4590         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
4591         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
4592         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
4593         * decl.c (decls_match): Use DECL_EXTERN_C_P.
4594         (duplicate_decls): Likewise.
4595         (pushdecl): Likewise.  Adjust thunk handling.
4596         (grokfndecl): Use DECL_EXTERN_C_P.
4597         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
4598         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
4599         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
4600         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
4601         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
4602         DECL_NO_STATIC_CHAIN.
4603         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
4604         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
4605         * search.c (covariant_return_p): Remove THUNK_DECL handling.
4606         * ir.texi: Update.
4608 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
4610         * tree.c (walk_tree): Set lineno.
4612 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
4614         * exception.cc: Update license notice.
4615         * new.cc: Likewise.
4616         * new1.cc: Likewise.
4617         * new2.cc: Likewise.
4618         * tinfo.cc: Likewise.
4619         * tinfo2.cc: Likewise.
4620         * vec.cc: Likewise.
4621         * inc/cxxabi.h: Likewise.
4622         * inc/exception: Likewise.
4623         * inc/new: Likewise.
4624         * inc/new.h: Likewise.
4625         * inc/typeinfo: Likewise.
4627 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
4629         * tree.c (build_target_expr_with_type): If we already have a
4630         TARGET_EXPR, just return it.
4632         * optimize.c (initialize_inlined_parameters): Don't generate an
4633         EXPR_STMT if we can just use DECL_INITIAL.
4634         * decl.c (emit_local_var): Only make the initialization a
4635         full-expression if stmts_are_full_exprs_p.
4637 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
4639         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
4640         macro.
4641         * call.c (standard_conversion): Use it.
4642         (direct_reference_binding): Likewise.
4643         (build_over_call): Likewise.
4644         (is_properly_derived_from): Likewise.
4645         (compare_ics): Likewise.
4646         * class.c (resolves_to_fixed_type_p): Likewise.
4647         * optimize.c (declare_return_variable): Likewise.
4648         * pt.c (is_specialization_of): Likewise.
4649         (unify): Likewise.
4650         * typeck.c (comp_target_parms): Likeiwse.
4651         (build_static_cast): Likewise.
4652         (build_reinterpret_cast): Likewise.
4653         (build_const_cast): Likewise.
4654         (comp_ptr_ttypes_real): Likewise.
4655         (comp_ptr_ttypes_const): Likewise.
4656         * typeck2.c (process_init_constructor): Likewise.
4658 2000-04-30  Scott Snyder <snyder@fnal.gov>
4660         * decl.c (finish_destructor_body): Use the base destructor when
4661         destroying virtual bases.
4663 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
4665         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
4666         STMT_EXPRs.
4667         * optimize.c (struct inline_data): Add target_exprs field.
4668         (declare_return_variable): When a function returns an aggregate,
4669         use the variable declared in the TARGET_EXPR as the remapped
4670         DECL_RESULT.
4671         (expand_call_inline): Update the pending target_exprs stack.
4672         (optimize_function): Initialize the stack.
4674         * decl2.c (finish_file): Fix typo in comment.
4676         * method.c (emit_thunk): Don't try to return a `void' value.
4678         * optimize.c (initialize_inlined_parameters): If the parameter is
4679         addressable, we need to make a new VAR_DECL, even if the
4680         initializer is constant.
4682 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
4684         * decl.c (grok_op_properties): Add an extra check of argtypes.
4686 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
4688         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
4689         variables.
4690         (initialize_inlined_parameters): Try to avoid creating new
4691         VAR_DECLs.
4693 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
4695         * lex.c (my_get_run_time): Remove.
4696         (init_filename_times): Use get_run_time instead of my_get_run_time.
4697         (check_newline): Likewise.
4698         (dump_time_statistics): Likewise.
4699         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
4700         of computing elapsed time explicitly.
4702 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
4704         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
4705         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
4706         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
4707         before calling decl_constant_value.
4708         * class.c (check_bitfield_decl): Likewise.
4709         * cvt.c (ocp_convert): Likewise.
4710         (convert): Likewise.
4711         * decl.c (compute_array_index_type): Likewise.
4712         (build_enumerator): Likewise.
4713         * decl2.c (check_cp_case_value): Likewise.
4714         * pt.c (convert_nontype_argument): Likewise.
4715         (tsubst): Likewise.
4716         * typeck.c (decay_conversion): Likewise.
4717         (build_compound_expr): Likewise.
4718         (build_reinterpret_cast): Likewise.
4719         (build_c_cast): Likewise.
4720         (convert_for_assignment): Likewise.
4722 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
4724         * decl.c (finish_function): Don't play games with DECL_INLINE.
4726 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
4728         * ir.texi: Correct typo.
4730 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4732         * decl.c (grokdeclarator): Reject VLAs as members.
4734 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
4736         * call.c (standard_conversion): Accept conversion between
4737         COMPLEX_TYPEs.
4739         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
4741 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
4743         * decl2.c (finish_file): Remove double setup for accounting
4744         compile time.
4746 2000-04-24  Robert Lipe <robertlipe@usa.net>
4748         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
4750 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
4752         * new.cc (set_new_handler): Needs to be in std::.
4754 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
4756         * cp-tree.h (lang_decl): Remove pretty_function_p.
4757         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
4758         language-specific node.
4759         * decl.c (cp_make_fname_decl): Use build_decl, not
4760         build_lang_decl, to build the variables.
4761         (grokvardecl): Don't call build_lang_decl for local variables in
4762         templates.
4763         (grokdeclarator): Don't call build_lang_decl for local type
4764         declarations in templates.
4765         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
4766         zero'd memory, rather than calling memset.
4767         * pt.c: Include hashtab.h.
4768         (local_specializations): New variable.
4769         (retrieve_local_specialization): Use it.
4770         (register_local_specialization): Likewise.
4771         (tsubst_decl): Don't assume local variables have
4772         DECL_LANG_SPECIFIC.
4773         (instantiate_decl): Set up local_specializations.
4774         * Makefile.in (HTAB_H): New variable.
4776 2000-04-23  Richard Henderson  <rth@cygnus.com>
4778         * typeck.c (c_expand_asm_operands): Restore the original
4779         contents of the output list.
4781 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
4783         * ir.texi:  Document complex number representation.
4785 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
4787         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
4788         (target_incomplete_p): New function.
4789         (tinfo_base_init): Create comdat NTBS name variable.
4790         (ptr_initializer): Add non_public parameter. Calculate it.
4791         (ptmd_initializer): Likewise.
4792         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
4793         (create_real_tinfo_var): Add non_public parameter. Use it.
4794         Push proxy into global namespace.
4795         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
4796         New enumeration.
4797         * inc/typeinfo (type_info::before, type_info::operator==):
4798         Compare __name addresses.
4800         * tinfo2.cc: Remove new-abi builtins comment.
4802 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
4804         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
4806         * call.c (joust): Exit early if we get the same function, too.
4808         * decl2.c (key_method): Return NULL_TREE for template classes.
4809         (import_export_class): Don't need to check for template classes.
4811 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
4813         * lex.c: Remove references to cccp.c.
4815 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
4817         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
4818         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
4819         (DECL_DESTRUCTOR_P): Use destructor_attr.
4820         (DECL_CONST_MEMFUNC_P): Reimplement.
4821         (DECL_VOLATILE_MEMFUNC_P): Remove.
4822         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
4823         (overrides): Use DECL_DESTRUCTOR_P.
4824         (check_for_override): Likewise.
4825         * decl.c (start_function): Likewise.
4826         * decl2.c (grokfclassfn): Likewise.
4827         (check_classfn): Likewise.
4828         (grok_function_init): Likewise.
4830 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
4832         * decl2.c (grokfield): Issue error on illegal data member
4833         declaration.
4835 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
4837         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
4839 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
4841         * class.c (build_vtable_entry): Don't build thunks for type-info
4842         functions.
4844 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
4846         * decl.c (decls_match): Allow a redeclaration of a builtin to
4847         specify args while the builtin did not.
4849 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
4851         * cp-tree.def (THUNK_DECL): Add to documentation.
4852         * cp-tree.h (flag_huge_objects): Declare.
4853         * class.c (modify_vtable_entry): Tidy.
4854         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
4855         Calculate delta appropriately for the new ABI.
4856         (dfs_modify_vtables): Use it.
4857         (modify_all_vtables): Fix thinko in code to add overriding copies
4858         of functions to primary vtables.
4859         (build_clone): Fix typo in comment.
4860         (clone_function_decl): Correct order of destructors in vtable.
4861         (build_vbase_offset_vtbl_entries): Adjust comment.
4862         (dfs_vcall_offset_queue_p): Remove.
4863         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
4864         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
4865         (build_vtable_entry): Correct check for pure virtual functions.
4866         Don't declare flag_huge_objects.
4867         * decl.c (flag_huge_objects): Remove declaration.
4868         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
4869         Use int_size_in_bytes.
4870         (emit_thunk): Handle vcall offset thunks.
4872 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4874         * decl2.c (parse_time, varconst_time): Delete declarations.
4875         (finish_file): Delete LINENO declaration.
4876         START_TIME and THIS_TIME now long.
4878 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
4880         * class.c (build_base_field): Reformat comment.
4882         * inc/cxxabi.h (stddef.h): Comment inclusion.
4883         (__base_class_info::__offset): Comment shift.
4885 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
4887         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
4888         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
4889         (cp_push_exception_identifier): New macro.
4890         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
4891         (DECL_BASE_DESTRUCTOR_P): Likewise.
4892         (DECL_DELETING_DESTRUCTOR_P): Likewise.
4893         (get_vtbl_decl_for_binfo): Fix formatting.
4894         (in_charge_arg_for_name): New macro.
4895         (maybe_build_cleanup_and_delete): Remove declaration.
4896         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
4897         (in_charge_arg_for_name): New function.
4898         (build_new_method_call): Use it.  Handle cloned destructors.
4899         (build_clone): Don't make the base constructor virtual.
4900         Automatically defer generated functions.
4901         (clone_function_decl): Handle destructors, too.
4902         (clone_constructors_and_destructors): Likewise.
4903         (create_vtable_ptr): Don't create a vtable entry for a cloned
4904         function.
4905         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
4906         (initialize_predefined_identifiers): Update appropriately.
4907         (finish_destructor_body): Simplify.
4908         (maybe_build_cleanup_and_delete): Remove.
4909         * except.c (expand_throw): Handle new-ABI destructors.
4910         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
4911         (build_dtor_call): New function.
4912         (build_delete): Use it.  Simplify.
4913         * optimize.c (maybe_clone_body): Handle destructors.
4914         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
4916         * exception.cc (cleanup_fn): New typedef.
4917         (CALL_CLEANUP): New macro.
4918         (cp_eh_info): Use them.
4919         (__cp_push_exception): Likewise.
4920         (__cp_pop_exception): Likewise.
4922 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
4924         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
4925         (complete_dtor_identifier): New macro.
4926         (CLASSTYPE_FIRST_CONVERSION): Remove.
4927         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
4928         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
4929         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
4930         (CLASSTYPE_CONSTRUCTORS): Likewise.
4931         (CLASSTYPE_DESTRUCTORS): Likewise.
4932         (lang_decl): Add cloned_function.
4933         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
4934         (DECL_BASE_CONSTRUCTOR_P): Likewise.
4935         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
4936         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
4937         (DECL_CLONED_FUNCTION_P): Likewise.
4938         (DECL_CLONED_FUNCTION): Likewise.
4939         (clone_function_decl): Declare.
4940         (maybe_clone_body): Likewise.
4941         * call.c (build_user_type_conversion_1): Call complete object
4942         constructors in the new ABI.
4943         (build_new_method_call): Don't add in-charge parameters under the
4944         new ABI.
4945         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
4946         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
4947         CLASSTYPE_DESTRUCTOR_SLOT.
4948         (build_clone): New function.
4949         (clone_function_decl): Likewise.
4950         (clone_constructors_and_destructors): Likewise.
4951         (check_bases_and_members): Use it.
4952         * decl.c (iniitialize_predefined_identifiers): Initialize
4953         complete_dtor_identifier.
4954         (finish_function): Don't add extra code to a clone.
4955         (lang_mark_tree): Mark cloned_function.
4956         * decl2.c (mark_used): Don't bother trying to instantiate things
4957         we synthesized.
4958         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
4959         * method.c (set_mangled_name_for_decl): Don't treat clones as
4960         constructors.
4961         (synthesize_method): Sythesize cloned functions, not the clones.
4962         * optimize.c (inline_data): Update comment on ret_label.
4963         (remap_block): Don't assume DECL_INITIAL exists.
4964         (copy_body_r): Allow ret_label to be NULL.
4965         (maybe_clone_body): Define.
4966         * pt.c (tsubst_decl): Handle clones.
4967         (instantiate_clone): New function.
4968         (instantiate_template): Use it.
4969         (set_mangled_name_for_template_decl): Don't treat clones as
4970         constructors.
4971         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
4972         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
4973         * semantics.c (expand_body): Clone function bodies as necessary.
4975         * optimize.c (remap_decl): Avoid sharing structure for arrays
4976         whose size is only known at run-time.
4977         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
4979         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
4980         to has_in_charge_parm_p.
4981         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
4982         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
4983         (DECL_COPY_CONSTRUCTOR_P): New macro.
4984         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
4985         (build_user_type_conversion_1): Likewise.
4986         (convert_like_real): Likewise.
4987         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
4988         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
4989         (copy_args_p): Likewise.
4990         (grok_ctor_properties): Likewise.
4991         (start_function): Likewise.
4992         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
4993         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
4994         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
4995         * method.c (do_build_copy_constructor): Use
4996         DECL_HAS_IN_CHARGE_PARM_P.
4997         (synthesize_method): Likewise.
4998         * pt.c (instantiate_template): Remove goto.
4999         * tree.c (build_cplus_method_type): Remove mention of obstacks in
5000         comment.
5002         * cp-tre.h (finish_function): Change prototype.
5003         * decl.c (end_cleanup_fn): Adjust caller.
5004         (finish_function): Take only one parameter.
5005         * decl2.c (finish_objects): Adjust caller.
5006         (finish_static_storage_duration_function): Likewise.
5007         * method.c (emit_thunk): Likewise.
5008         * parse.y: Likewise.
5009         * parse.c: Regenerated.
5010         * pt.c (instantiate_decl): Likewise.
5011         * rtti.c (synthesize_tinfo_fn): Likewise.
5012         * semantics.c (expand_body): Likewise.
5014         * cp-tree.h (copy_decl): New function.
5015         * class.c (finish_struct_1): Use it.
5016         * lex.c (copy_decl): Define it.
5017         * pt.c (tsubst_decl): Likewise.
5018         * tree.c (copy_template_template_parm): Likewise.
5020         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
5021         has_nonpublic_assign_ref.
5022         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
5023         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
5024         * class.c (finish_struct_methods): Don't set
5025         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
5026         (interface_only): Don't declare.
5027         (interface_unknown): Likewise.
5029 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5031         * tree.h (HAVE_TEMPLATES): Remove definition.
5032         * lang-options.h (-fthis-is-variable): Remove documentation.
5034 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
5036         * class.c (instantiate_type): Handle object-relative template-id.
5038         * semantics.c (finish_expr_stmt): Call convert_to_void here.
5039         * decl.c (cplus_expand_expr_stmt): Not here.
5041         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
5042         Initialize exprtype earlier.
5044         * parse.y (fn.def1): Check for defining types in return types.
5046         * decl.c (check_tag_decl): Notice extra fundamental types.
5047         Diagnose empty decls in classes, too.
5049         * decl.c (grokdeclarator): Don't override an anonymous name if no
5050         declarator was given.
5052         * cvt.c (convert_to_void): Call resolve_offset_ref.
5054         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
5056         * decl2.c (decl_namespace): Handle getting a type.
5058         * typeck.c (build_c_cast): Re-enable warning for cast between
5059         pointer and integer of different size.
5061 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
5063         * inc/cxxabi.h (__pointer_type_info): Add restrict and
5064         incomplete flags.
5065         (__pointer_type_info::__pointer_catch): New virtual function.
5066         (__pointer_to_member_type_info): Derive from
5067         __pointer_type_info. Adjust.
5068         (__pointer_to_member_type_info::__do_catch): Remove.
5069         (__pointer_to_member_type_info::__is_pointer_p): Declare.
5070         (__pointer_to_member_type_info::__pointer_catch): Declare.
5071         * rtti.c (qualifier_flags): Add restrict flag.
5072         (ptmd_initializer): Reorder members.
5073         (create_tinfo_types): Expand comments. Reorder
5074         ptmd_desc_type_node members.
5075         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
5076         Implement.
5077         (__pointer_type_info::__do_catch): Move specific code into
5078         __pointer_catch. Call it.
5079         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
5080         specific catch checking. Fix void conversion check.
5081         (__pointer_to_member_type_info::__do_catch): Remove.
5082         (__pointer_to_member_type_info::__pointer_catch): Implement.
5084 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5086         * lex.c (init_parse): Remove traces of classof and headof.
5087         * decl2.c (flag_operator_names): Default to 1.
5088         (lang_decode_option): Do not set it for -ansi.
5090 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
5092         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
5093         (DECL_MAIN_VARIANT): Remove.
5094         * decl.c (duplicate_decls): Don't set it.
5095         (start_function): Likewise.
5096         (lang_mark_tree): Don't mark it.
5097         * decl2.c (defer_fn): Don't use it.
5098         * lex.c (retrofit_lang_decl): Don't set it.
5099         * pt.c (tsubst_decl): Likewise.
5100         * ptree.c (print_lang_decl): Don't print it.
5101         * typeck.c (mark_addressable): Don't use it.
5103 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
5105         * vec.cc: Include <new> and <exception>.
5106         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
5107         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
5108         terminate.
5109         (__cxa_vec_delete): Catch dtor exceptions.
5111 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
5113         Prepend __ to implementation defined names.
5114         * inc/typeinfo (type_info): Rename _name to __name.
5115         (type_info::type_info): Rename parameter.
5116         (type_info::operator==, type_info::operator!=,
5117         type_info::before): Likewise.
5118         (type_info::is_pointer_p, type_info::is_function_p,
5119         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
5120         parameters.
5121         * inc/cxxabi.h
5122         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
5123         (__pointer_type_info::__pointer_type_info): Likewise.
5124         (__pointer_type_info::is_pointer_p,
5125         __pointer_type_info::do_catch): Prepend __. Rename parameters.
5126         (__array_type_info::__array_type_info): Rename parameters.
5127         (__function_type_info::__function_type_info): Likewise.
5128         (__function_type_info::is_function_p): Prepend __.
5129         (__enum_type_info::__enum_type_info): Rename parameters.
5130         (__pointer_to_member_type_info::__pointer_to_member_type_info):
5131         Likewise.
5132         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
5133         parameters.
5134         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
5135         (__class_type_info::__class_type_info): Rename parameters.
5136         (__class_type_info::sub_kind): Prepend __. Adjust member names.
5137         (__class_type_info::upcast_result,
5138         __class_type_info::dyncast_result): Prepend __. Move definition
5139         into tinfo.cc.
5140         (__class_type_info::do_upcast, __class_type_info::do_catch,
5141         __class_type_info::find_public_src,
5142         __class_type_info::do_dyncast,
5143         __class_type_info::do_find_public_src): Prepend __. Rename
5144         parameters.
5145         (__si_class_type_info::__si_class_type_info): Rename parameters.
5146         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
5147         __si_class_type_info::do_find_public_src): Prepent __. Rename
5148         parameters.
5149         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
5150         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
5151         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
5152         parameters.
5153         (__dynamic_cast): Rename parameters.
5154         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
5155         type_info::do_catch, type_info::do_upcast): Prepend __.
5156         (contained_p, public_p, virtual_p, contained_public_p,
5157         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
5158         (__class_type_info::do_catch,
5159         __class_type_info::do_upcast): Prepend __. Adjust.
5160         (__class_type_info::__upcast_result,
5161         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
5162         Adjust.
5163         (__class_type_info::find_public_src): Prepend __. Adjust.
5164         (__class_type_info::do_find_public_src,
5165         __si_class_type_info::do_find_public_src,
5166         __vmi_class_type_info::do_find_public_src): Likewise.
5167         (__class_type_info::do_dyncast,
5168         __si_class_type_info::do_dyncast,
5169         __vmi_class_type_info::do_dyncast): Likewise.
5170         (__class_type_info::do_upcast,
5171         __si_class_type_info::do_upcast,
5172         __vmi_class_type_info::do_upcast): Likewise.
5173         (__dynamic_cast): Adjust.
5174         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
5175         (__function_type_info::is_function_p): Likewise.
5176         (__pointer_type_info::do_catch): Likewise. Adjust.
5177         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
5178         (__throw_type_match_rtti_2): Adjust.
5179         (__is_pointer): Adjust.
5181 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
5183         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
5184         (complete_ctor_identifier): New macro.
5185         (special_function_kind): Add sfk_copy_constructor and
5186         sfk_assignment_operator.
5187         (LOOKUP_HAS_IN_CHARGE): Remove.
5188         (cons_up_default_function): Rename to ...
5189         (implicitly_declare_fn): ... this.
5190         * call.c (build_new_method_call): Add in-charge parameters for
5191         constructors here.
5192         * class.c (add_implicitly_declared_members): Change parameter name
5193         from cant_have_assignment to cant_have_const_assignment.
5194         Replace calls to cons_up_default_function to implicitly_declare_fn.
5195         * cvt.c (ocp_convert): Use complete_ctor_identifier.
5196         * decl.c (initialize_predefined_identifiers): Initialize it.
5197         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
5198         complex expression.
5199         * init.c (expand_default_init): Don't calculate the in-charge
5200         parameter here.
5201         (build_new_1): Likewise.
5202         * lex.c (cons_up_default_function): Move to method.c.
5203         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
5204         (implicitly_declare_fn): New function.
5205         * typeck.c (build_static_cast): Use complete_ctor_identifier.
5206         (build_modify_expr): Likewise.
5207         * typeck2.c (build_functional_cast): Likewise.
5209         Under the new ABI, constructors don't return `this'.
5210         * cp-tree.h (warn_reorder): Declare.
5211         (special_function_kind): New enum.
5212         (global_base_init_list): Remove declaration.
5213         (emit_base_init): Don't return a value.
5214         (check_base_init): Don't declare.
5215         (is_aggr_typedef): Likewise.
5216         * decl.c (check_special_function_return_type): New function.
5217         (return_types): Remove.
5218         (grokdeclarator): Use check_special_function_return_type.
5219         (start_function): Don't initialize ctor_label under the new ABI.
5220         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
5221         * init.c (begin_init_stmts): Move to top of file.
5222         (finish_init_stmts): Likewise.
5223         (warn_reorder): Don't declare.
5224         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
5225         value.
5226         (check_base_init): Remove.
5227         (is_aggr_typedef): Likewise.
5228         (build_new_1): Don't use the return value of a constructor.
5229         * semantics.c (setup_vtbl_ptr): Don't use the return value
5230         of emit_base_init.
5231         * typeck.c (check_return_expr): Don't magically convert return
5232         statements into `return this' in constructors under the new ABI.
5234         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
5235         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
5236         (base_ctor_identifier): New macro.
5237         (base_dtor_identifier): Likewise.
5238         (deleting_dtor_identifier): Likewise.
5239         * decl.c: Don't include obstack.h.
5240         (obstack_chunk_alloc): Don't define.
5241         (obstack_chunk_free): Likewise.
5242         (struct predefined_identifier): New type.
5243         (initialize_predefined_identifiers): New function.
5244         (init_decl_processing): Use it.
5245         (debug_temp_inits): Remove.
5246         (start_method): Don't call preserve_data.
5247         (hack_incomplete_structures): Update comment.
5248         * init.c (init_init_processing): Don't initialize
5249         nelts_identifier.
5250         (build_offset_rf): Remove dead code.
5251         (build_delete): Use CLASSTYPE_N_BASECLASSES.
5252         * search.c (init_search_processing): Don't initialize
5253         vptr_identifier.
5255 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5257         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
5258         some sign_compare warnings.
5260 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
5262         Rename abi::__vmi_class_type_info members.
5263         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
5264         base_list, detail_masks members to vmi_flags, vmi_base_count,
5265         vmi_bases and vmi_flags_masks respectively.
5266         (__vmi_class_type_info::vmi_flags_masks): Rename
5267         details_unknown_mask to flags_unknown_mask.
5268         * tinfo.cc (__class_type_info::do_upcast): Adjust.
5269         (__vmi_class_type_info::do_find_public_src): Adjust.
5270         (__vmi_class_type_info::do_dyncast): Adjust.
5271         (__vmi_class_type_info::do_upcast): Adjust.
5273 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
5275         * tinfo.cc (convert_to_base): New function.
5276         (get_vbase_offset): Remove. Move into convert_to_base.
5277         (__vmi_class_type_info::do_find_public_src): Adjust.
5278         (__vmi_class_type_info::do_dyncast): Adjust.
5279         (__vmi_class_type_info::do_upcast): Adjust.
5281 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
5283         * tinfo.cc (operator=): Use __builtin_strcmp.
5284         * tinfo2.cc (before): Likewise.
5286 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
5288         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
5289         (DECL_SAVED_INLINE): Rename to ...
5290         (DECL_DEFERRED_FN): ... this.
5291         (in_function_p): Remove declaration.
5292         (mark_inline_for_output): Rename to ...
5293         (defer_fn): ... this.
5294         * decl.c (finish_function): Adjust call to mark_inline_for_output.
5295         (in_function_p): Remove definition.
5296         * decl2.c (saved_inlines): Rename to ...
5297         (deferred_fns): ... this.
5298         (saved_inlines_used): Rename to ...
5299         (deferred_fns_used): ... this.
5300         (mark_inline_for_output): Rename to ...
5301         (defer_fn): ... this.
5302         (finish_file): Adjust accordingly.
5303         (init_decl2): Likewise.
5304         * lex.c (cons_up_default_function): Likewise.
5305         * pt.c (mark_decl_instantiated): Likewise.
5306         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
5307         circumstances.
5308         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
5309         * semantics.c (expand_body): Defer more functions.
5311 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
5313         * vec.cc: New file.
5314         * Make-lang.in (CXX_LIB2FUNCS): Add it.
5315         (vec.o): Build it.
5316         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5317         __cxa_vec_delete): Declare.
5319 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
5321         * rtti.c (dfs_class_hint_mark): New static function.
5322         (dfs_class_hint_unmark): New static function.
5323         (class_hint_flags): Use them.
5325 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
5327         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
5329 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
5331         * cp-tree.h (instantiate_decl): Change prototype.
5332         * decl2.c (mark_used): Adjust call.
5333         * optimize.c (inlinable_function_p): Adjust handling of templates.
5334         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
5335         (do_type_instantiation): Likewise.
5336         (instantiate_decl): Defer more templates.
5337         (instantiate_pending_templates): Adjust logic to handle inline
5338         friend functions.
5340         * Makefile.in (GGC_H): New variable.  Use it throughout in place
5341         of ggc.h.
5343         * call.c: Don't include obstack.h.  Include ggc.h.
5344         (obstack_chunk_alloc): Don't define.
5345         (obstack_chunk_free): Likewise.
5346         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
5347         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
5348         (pop_switch): Free it.
5350         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
5352         * dump.c (dequeue_and_dump): Don't try to print the bit_position
5353         if we don't have a DECL_FIELD_OFFSET.
5355 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
5357         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
5358         special_function_p.
5360 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5362         * cfns.gperf (hash, libc_name_p): Prototype.
5364         * rtti.c (build_dynamic_cast_1): Constification.
5366         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
5368         * semantics.c (deferred_type_access_control): Prototype.
5370 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
5372         Correct many new ABI issues regarding vbase and vcall offset
5373         layout.
5374         * cp-tree.h (BINFO_VTABLE): Document.
5375         (struct lang_type): Tweak formatting.
5376         (BINFO_PRIMARY_BINFO): Add to documentation.
5377         (CLASSTYPE_VSIZE): Fix typo in comment.
5378         (CLASSTYPE_VBASECLASSES): Update documentation.
5379         (BINFO_VBASE_MARKED): Remove.
5380         (SET_BINFO_VBASE_MARKED): Likewise.
5381         (CLEAR_BINFO_VBASE_MARKED): Likewise.
5382         (BINFO_FIELDS_MARKED): Remove.
5383         (SET_BINFO_FIELDS_MARKED): Likewise.
5384         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
5385         (enum access_kind): New enumeration.
5386         (num_extra_vtbl_entries): Remove declaration.
5387         (size_extra_vtbl_entries): Likewise.
5388         (get_vtbl_decl_for_binfo): New function.
5389         (dfs_vbase_unmark): Remove declaration.
5390         (mark_primary_bases): Likewise.
5391         * class.c (SAME_FN): Remove.
5392         (struct vcall_offset_data_s): Move definition.
5393         (build_vbase_pointer): Use `build', not `build_binary_op', to
5394         access the vbase pointer under the new ABI.
5395         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
5396         (build_primary_vtable): Likewise.
5397         (dfs_mark_primary_bases): Move here from search.c.
5398         (mark_primary_bases): Likewise.
5399         (determine_primary_bases): Under the new ABI, don't make a base
5400         class a primary base just because we don't yet have any virtual
5401         functions.
5402         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
5403         (num_vfun_entries): Remove.
5404         (dfs_count_virtuals): Likewise.
5405         (num_extra_vtbl_entries): Likewise.
5406         (size_extra_vtbl_entries): Likewise.
5407         (layout_virtual_bases): Iterate in inheritance graph order under
5408         the new ABI.
5409         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
5410         indicate that a vfield is present.
5411         (init_class_processing): Initialize access_public_node, etc., from
5412         ak_public, etc.
5413         (get_vtbl_decl_for_binfo): New function.
5414         (dump_class_hierarchy_r): Likewise.
5415         (dump_class_hierarchy): Use it.
5416         (finish_vtbls): Build the vtbls in inheritance graph order.
5417         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
5418         (initialize_vtable): Use get_vtbl_decl_for_binfo.
5419         (accumulate_vtbl_inits): Add comments explaining why a pre-order
5420         walk is required.
5421         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
5422         where the vptr points, even for primary vtables.
5423         (build_vtbl_initializer): Adjust handling of vbase and vcall
5424         offsets.
5425         (build_vcall_and_vbase_vtable_entries): New function.
5426         (dfs_build_vbase_offset_vtbl_entries): Remove.
5427         (build_vbase_offset_vtbl_entries): Reimplement.
5428         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
5429         were already handled in a primary base class vtable.
5430         (build_vcall_offset_vtbl_entries): Adjust.
5431         (build_rtti_vtbl_entries): Adjust.
5432         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
5433         * init.c (expand_virtual_init): Simplify.
5434         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
5435         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
5436         * search.c (BINFO_ACCESS): New macro.
5437         (SET_BINFO_ACCESS): Likewise.
5438         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
5439         (access_in_type): Likewise.
5440         (dfs_accessible_p): Likewise.
5441         (protected_accessible_p): Likewise.
5442         (lookup_fnfields_1): Adjust documentation.
5443         (dfs_mark_primary_bases): Move to class.c
5444         (mark_primary_bases): Likewise.
5445         (dfs_vbase_unmark): Remove.
5446         (virtual_context): Use BINFO_FOR_VBASE.
5447         (dfs_get_vbase_types): Simplify.
5448         (dfs_build_inheritance_graph_order): New function.
5449         (get_vbase_types): Use it.
5450         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
5452         * tinfo.cc (get_vbase_offset): New function.
5453         (__vmi_class_type_info::do_find_public_src): Use it.
5454         (__vmi_class_type_info::do_dyncast): Likewise.
5455         (__vmi_class_type_info::do_upcast): Likewise.
5457 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
5459         * lang-specs.h: Pass -fno-show-column to the preprocessor.
5461 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
5463         * rtti.c (class_hint_flags): Rename flags.
5464         (class_initializer): Remove flags.
5465         (synthesize_tinfo_var): Combine offset and flags. Add flags
5466         for __vmi_class_type_info.
5467         (create_tinfo_types): Remove flags from __class_type_info and
5468         __si_class_type_info. Merge flags and offset from
5469         base_class_type_info.
5470         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
5471         (__base_class_info::is_virtual_p): Adjust.
5472         (__base_class_info::is_public_p): Adjust.
5473         (__base_class_info::offset): New accessor.
5474         (__class_type_info::details): Remove member.
5475         (__class_type_info::__class_type_info): Lose details.
5476         (__class_type_info::detail_masks): Remove.
5477         (__si_class_type_info::__si_class_type_info): Lose details.
5478         (__vmi_class_type_info::details): New member.
5479         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
5480         (__vmi_class_type_info::detail_masks): New member.
5481         * tinfo.cc (__class_type_info::do_upcast): Initialize result
5482         with unknown_details_mask.
5483         (__vmi_class_type_info::do_find_public_src): Adjust
5484         (__vmi_class_type_info::do_dyncast): Adjust.
5485         (__vmi_class_type_info::do_upcast): Set result details, if
5486         needed. Adjust.
5487         (__dynamic_cast): Temporarily #if out optimization.
5489 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
5491         * rtti.c (get_tinfo_decl): Mark used.
5492         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
5493         mark as dealt with, if we output it.
5495 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
5497         * class.c: Reorganize to put virtual function table initialization
5498         machinery at the end of the file.
5500 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
5502         * class.c (finish_struct): Use bitsize_zero_node.
5503         * pt.c (instantiate_class_template): Likewise.
5505 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
5507         Put RTTI entries at negative offsets in new ABI.
5508         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
5509         vbase offset at index -3, not -1.
5510         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
5511         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
5512         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
5513         (build_rtti_vtbl_entries): New function.
5514         (set_rtti_entry): Remove.
5515         (build_primary_vtable): Don't use it.
5516         (build_secondary_vtable): Likewise.
5517         (start_vtable): Remove.
5518         (first_vfun_index): New function.
5519         (set_vindex): Likewise.
5520         (add_virtual_function): Don't call start_vtable.  Do call
5521         set_vindex.
5522         (set_primary_base): Rename parameter.
5523         (determine_primary_base): Likewise.
5524         (num_vfun_entries): Don't use skip_rtti_stuff.
5525         (num_extra_vtbl_entries): Include RTTI information.
5526         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
5527         (skip_rtti_stuff): Remove.
5528         (dfs_modify_vtables): Don't use it.
5529         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
5530         (layout_nonempty_base_or_field): Update size handling.
5531         (create_vtable_ptr): Tweak.
5532         (layout_class_type): Adjust parameter names.
5533         (finish_struct_1): Simplify.
5534         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
5535         (skip_rtti_stuff): Remove.
5536         (first_vfun_index): New function.
5537         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
5538         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
5539         (marked_vtable_pathp): Declare.
5540         (unmarked_vtable_pathp): Likewise.
5541         * error.c (dump_expr): Use first_vfun_index to calculate vtable
5542         offsets.
5543         * rtti.c (build_headof): Look for RTTI at negative offsets.
5544         (get_tinfo_decl_dynamic): Likewise.
5545         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
5546         here.
5547         (create_pseudo_type_info): Do it here instead.  Adjust so that
5548         vptr points at first virtual function.
5549         * search.c (marked_vtable_pathp): Make it global.
5550         (unmarked_vtable_pathp): Likewise.
5551         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
5552         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5553         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
5554         (get_pure_virtuals): Likewise.
5555         (expand_upcast_fixups): Likewise.
5556         * tree.c (debug_binfo): Likewise.
5557         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
5558         negative offset.
5560 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5562         * class.c (check_field_decl): Fix typo.
5563         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
5564         (check_methods): Likewise.
5565         (check_field_decls): Likewise.
5566         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
5567         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
5568         Use DECL_RESULT_FLD, not DECL_RESULT.
5569         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
5570         * lex.c (identifier_type): Likewise.
5571         * pt.c (determine_specialization, lookup_template_class): Likewise.
5572         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
5573         (resolve_overloaded_unification, more_specialized): Likewise.
5574         * semantics.c (finish_member_declaration): Likewise.
5575         * typeck.c (build_x_function_call): Likewise.
5577 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
5579         * class.c (layout_empty_base): Handle empty bases with non-byte
5580         alignment.
5581         (build_base_field): Likewise.
5582         (layout_virtual_bases): Likewise.
5584         * class.c (finish_struct_1): Fix typo in this change:
5586         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5588 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
5590         * decl.c (grokdeclarator): Count partial specializations when
5591         keeping track of how many template classes have been seen.
5593         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
5595 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5597         * class.c (build_vbase_pointer_fields): layout_field now place_field.
5598         (get_vfield_offset): Use byte_position.
5599         (set_rtti_entry): Set OFFSET to ssizetype zero.
5600         (get_binfo_offset_as_int): Deleted.
5601         (dfs_record_base_offsets): Use tree_low_cst.
5602         (dfs_search_base_offsets): Likewise.
5603         (layout_nonempty_base_or_field): Reflect changes in RLI format
5604         and call byte_position.
5605         (layout_empty_base): Convert offset to ssizetype.
5606         (build_base_field): use rli_size_unit_so_far.
5607         (dfs_propagate_binfo_offsets): Do computation in proper type.
5608         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
5609         (layout_class_type): Reflect changes in RLI names and fields.
5610         (finish_struct_1): Set DECL_FIELD_OFFSET.
5611         * dump.c (dequeue_and_dump): Call bit_position.
5612         * expr.c (cplus_expand_constant): Use byte_position.
5613         * rtti.c (expand_class_desc): Use bitsize_one_node.
5614         * typeck.c (build_component_addr): Use byte_position and don't
5615         special case for zero offset.
5617 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
5619         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
5621         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
5622         tinfo object.
5623         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
5624         vtable.
5626 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5628         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
5629         DECL_P macros.
5630         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
5631         make_typename_type, check_initializer, cp_finish_decl,
5632         xref_tag): Likewise.
5633         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
5634         decl_namespace, arg_assoc_template_arg, arg_assoc,
5635         validate_nonmember_using_decl, do_class_using_decl): Likewise.
5636         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
5637         args_to_string): Likewise.
5638         * friend.c (is_friend): Likewise.
5639         * lex.c (note_got_semicolon, note_list_got_semicolon,
5640         is_global): Likewise.
5641         * method.c (build_overload_nested_name, build_overload_value,
5642         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
5643         * parse.y (typename_sub, typename_sub1): Likewise.
5644         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
5645         process_partial_specialization, convert_template_argument,
5646         template_args_equal, add_pending_template, lookup_template_class,
5647         for_each_template_parm_r, maybe_fold_nontype_arg,
5648         tsubst, instantiate_template, type_unification_real, unify,
5649         instantiate_pending_templates, set_mangled_name_for_template_decl):
5650         Likewise.
5651         * repo.c (repo_get_id, repo_template_used): Likewise.
5652         * search.c (lookup_field_1): Likewise.
5653         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
5654         * xref.c (classname): Likewise.
5656 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
5658         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
5659         (CANONICAL_BINFO): New macro.
5660         (BINFO_NEW_VTABLE_MARKED): Use it.
5661         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
5662         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
5663         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
5664         not TREE_TYPE.
5665         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5666         (build_secondary_vtable): Likewise.
5667         (dfs_finish_vtbls): Likewise.
5668         (dfs_accumulate_vtbl_inits): Likewise.
5669         (accumulate_vtbl_inits): New function.
5670         (finish_vtbls): Make sure that virtual bases come after
5671         non-virtual bases in the vtable group.
5672         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
5673         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5674         * search.c (struct vbase_info): Move definition.
5675         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5676         (unmarked_new_vtable_p): Likewise.
5677         (dfs_mark_vtable_path): Remove.
5678         (dfs_mark_new_vtable): Remove.
5679         (dfs_unmark_new_vtable): Likewise.
5680         (dfs_clear_search_slot): Likewise.
5681         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
5682         (dfs_clear_vbase_slots): Likewise.
5683         (init_vbase_pointers): LIkewise.
5685 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
5687         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
5688         SIZETYPE to a non-SIZETYPE.
5690 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
5692         * class.c (layout_virtual_bases): Adjust names in conditionally
5693         compiled code.
5695         * class.c (record_base_offsets): New function.
5696         (layout_conflict_p): Likewise.
5697         (layout_nonempty_base_or_field): Use it.
5698         (layout_empty_base): New function.
5699         (build_base_field): Use it.
5700         (build_base_fields): Update comment.
5701         (layout_virtual_bases): Fold in a little code form
5702         layout_basetypes.  Use layout_empty_base.
5703         (layout_basetypes): Remove.
5704         (end_of_class): New function.
5705         (layout_class_type): Use it.  Adjust.
5707         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
5708         (fntype_p): Remove.
5709         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
5710         comment.
5711         (dfs_skip_nonprimary_vbases_markedp): Likewise.
5712         * typeck.c (fntype_p): Remove.
5714         * cp-tree.h (TI_SPEC_INFO): Remove.
5715         (CLASSTYPE_TI_SPEC_INFO): Likewise.
5716         * pt.c (process_partial_specialization): Likewise.
5718         * class.c (build_base_field): Fix thinko in computation of binfo
5719         offsets.
5721         * tree.c (mark_local_for_remap_p): Mark variables declared in
5722         TARGET_EXPRs as well.
5724 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
5726         * typeck.c (require_complete_type, complete_type,
5727         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
5728         build_array_ref, convert_arguments, pointer_diff,
5729         build_x_unary_op, build_unary_op, build_c_cast,
5730         build_modify_expr): Use COMPLETE_TYPE_P etc.
5731         * call.c (is_complete, convert_like_real,
5732         build_new_method_call): Likewise.
5733         * class.c (build_vbase_pointer_fields, check_bases,
5734         build_base_field, finish_struct_1, pushclass): Likewise.
5735         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
5736         * decl.c (maybe_process_template_type_declaration, pushtag,
5737         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
5738         layout_var_decl, check_initializer, cp_finish_decl,
5739         grokdeclarator, require_complete_types_for_parms,
5740         grok_op_properties, xref_tag, xref_basetypes,
5741         check_function_type): Likewise.
5742         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
5743         * friend.c (do_friend): Likewise.
5744         * init.c (build_offset_ref): Likewise.
5745         * parse.y (structsp): Likewise.
5746         * pt.c (maybe_process_partial_specialization,
5747         tsubst_friend_function, instantiate_class_template, tsubst,
5748         do_type_instantiation, instantiate_pending_templates): Likewise.
5749         * repo.c (repo_get_id): Likewise.
5750         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
5751         synthesize_tinfo_var, emit_support_tinfos): Likewise.
5752         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
5753         * semantics.c (begin_class_definition): Likewise.
5754         * tree.c (build_cplus_method_type): Likewise.
5755         * typeck2.c (digest_init, build_functional_cast,
5756         add_exception_specifier): Likewise.
5757         * parse.h, parse.c: Regenerated.
5759 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
5761         * inc/cxxabi.h: New header file. Define new-abi entry points.
5762         (__pointer_type_info::target): Rename member to ...
5763         (__pointer_type_info::type): ... here.
5764         (__base_class_info::type): Rename member to ...
5765         (__base_class_info::base): ... here.
5766         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
5767         * cp-tree.h (CPTI_ABI): New global tree enumeration.
5768         (abi_node): New global tree node.
5769         * decl.c (abi_node): Document.
5770         (init_decl_processing): Initialize abi_node.
5771         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
5772         (get_vmi_pseudo_type_info): Likewise.
5773         (create_tinfo_types): Likewise.
5774         (emit_support_tinfos): Likewise.
5775         * tinfo.h (cxxabi.h): Include for new-abi.
5776         Move rtti class definitions to new header file.
5777         * tinfo.cc (abi): Use the namespace.
5778         (std): Move new abi rtti classes from here ...
5779         (__cxxabiv1): ... to here.
5780         * tinfo2.cc (cxxabi.h): Include for new-abi.
5781         Move rtti class definitions to new header file.
5782         (std): Move new abi rtti classes from here ...
5783         (__cxxabiv1): ... to here.
5784         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
5785         namespace.
5787 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
5788             Jason Merrill  <jason@casey.cygnus.com>
5790         * method.c (build_overload_int): Use host_integerp.
5792 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5794         * init.c (build_offset_ref): Handle the case of a templated member
5795         function.
5797 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5799         * except.c (expand_exception_blocks): Clear catch_clauses_last.
5801 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
5803         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
5804         * class.c (check_bitfield_decl): Turn illegal bitfields into
5805         non-bitfields.
5806         (dfs_propagate_binfo_offsets): Adjust for new size_binop
5807         semantics.
5808         (dfs_offset_for_unshared_vbases): Likewise.
5809         * cvt.c (cp_convert_to_pointer): Convert NULL to a
5810         pointer-to-member correctly under the new ABI.
5811         * expr.c (cplus_expand_constant): Don't use cp_convert when
5812         turning an offset into a pointer-to-member.
5813         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
5814         when dereferencing them under the new ABI.
5815         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
5816         of pointers-to-members under the new ABI.
5818         * class.c (check_bitfield_decl): Remove restriction on really long
5819         bitfields.
5820         (layout_class_type): Implement new ABI handling of bitfields
5821         longer than their types.
5823 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5825         * parse.y (extdefs): Call ggc_collect.
5826         * parse.c: Regenerated.
5828 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
5830         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
5831         (note_name_declared_in_class): Use OVL_CURRENT to get at a
5832         potential overload.
5834 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5836         * class.c (build_vbase_path): Use integer_zerop.
5837         (build_vtable_entry): Use tree_low_cst.
5838         (get_vfield_offset): Use bit_position.
5839         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
5840         Use tree_low_cst.
5841         (check_bitfield_decl): Set DECL_SIZE using convert.
5842         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
5843         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
5844         Use tree_low_cst.
5845         (finish_struct_1): Use bit_position.
5846         (dump_class_hierarchy): Use tree_low_cst.
5847         * cp-tree.h (min_precision): Add declaration.
5848         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
5849         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
5850         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
5851         * expr.c (cplus_expand_constant): Use bit_position.
5852         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
5853         * rtti.c (get_base_offset): Use bit_position.
5854         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
5855         host_integerp, and tree_low_cst.
5856         (pointer_int_sum): Use integer_zerop.
5857         (build_component_addr): Use bit_position.
5859 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
5861         * typeck.c (require_complete_type): Don't assume size_zero_node.
5862         (complete_type_or_else): Likewise.
5864 2000-03-16  Steven Grady <grady@digitaldeck.com>
5865             Jason Merrill  <jason@casey.cygnus.com>
5867         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
5869 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
5871         * decl2.c (grokfield): Bail out if type is error_mark_node.
5873 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
5875         * tinfo2.cc (__ptr_to_member_data): Rename to ...
5876         (__pointer_to_member_data): ... here. Adjust.
5877         * rtti.c (create_tinfo_types): Adjust.
5879 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
5881         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
5882         * decl.c (ref_desc_type_node): Undocument.
5883         * rtti.c (ptr_ref_initializer): Rename to ...
5884         (ptr_initializer): ... here. Adjust comments.
5885         (ptmd_initializer): Fix comment thinko.
5886         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
5887         (create_tinfo_types): Remove ref_desc_type_node init.
5888         * tinfo2.cc (__reference_type_info): Remove.
5890 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
5892         * decl.c (cp_finish_decl): Remove obsolete comment.
5894         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
5896 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
5898         * cp-tree.h: Tweak documentation.
5899         * class.c (build_vbase_pointer_fields): Layout the fields, too.
5900         (avoid_overlap): Remove.
5901         (get_binfo_offset_as_int): New function.
5902         (dfs_serach_base_offsets): Likewise.
5903         (layout_nonempty_base_or_field): Likewise.
5904         (build_base_field): Layout fields here.  Avoid placing two objects
5905         of the same type at the same address, under the new ABI.
5906         (build_base_fields): Adjust accordingly.
5907         (create_vtable_ptr): Return the new field, but don't attach it to
5908         TYPE_FIELDS.
5909         (remove_base_field): Remove.
5910         (remove_base_fields): Remove.
5911         (layout_basetypes): Adjust accordingly.
5912         (layout_class_type): Call layout_field for each field, rather than
5913         just making a wholesale call to layout_type.
5915 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
5917         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
5919 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
5921         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
5923         * except.c (dtor_nothrow): New fn.
5924         (do_pop_exception): Use it.  Take type parm.
5925         (push_eh_cleanup): Take type parm.
5926         (expand_start_catch_block): Pass it.
5927         (build_eh_type_type_ref): Accept null type.
5929 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
5931         * cp-tree.h (revert_static_member_fn): Change prototype.
5932         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
5933         (grok_op_properties): Likewise.
5934         (start_function): Likewise.
5935         (revert_static_member_fn): Simplify.
5936         * pt.c (check_explicit_specialization): Adjust call to
5937         revert_static_member_fn.
5939 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
5941         * cp-tree.h (scope_kind): New type.
5942         (tmpl_spec_kind): Likewise.
5943         (declare_pseudo_global_level): Remove.
5944         (pseudo_global_level_p): Rename to template_parm_scope_p.
5945         (pushlevel): Remove declaration.
5946         (begin_scope): New function.
5947         (finish_scope): Likewise.
5948         (current_tmpl_spec_kind): Likewise.
5949         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
5950         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
5951         Add template_spec_p.
5952         (toplevel_bindings_p): Adjust.
5953         (declare_pseudo_global_level): Remove.
5954         (pseudo_global_level_p): Rename to template_parm_scope_p.
5955         (current_tmpl_spec_kind): New function.
5956         (begin_scope): Likewise.
5957         (finish_scope): Likewise.
5958         (maybe_push_to_top_level): Adjust.
5959         (maybe_process_template_type_declaration): Likewise.
5960         (pushtag): Likewise.
5961         (pushdecl_nonclass_level): Likewise.
5962         (lookup_tag): Likewise.
5963         (grokfndecl): Handle member template specializations.  Share
5964         constructor and non-constructor code.
5965         * decl2.c (check_classfn): Handle member template specializations.
5966         * pt.c (begin_template_parm_list): Use begin_scope.
5967         (begin_specialization): Likewise.
5968         (end_specialization): Likewise.
5969         (check_explicit_specialization): Use current_tmpl_spec_kind.
5970         Handle member template specializations.
5971         (end_template_decl): Use finish_scope.  Remove call to
5972         get_pending_sizes.
5973         (push_template_decl_real): Remove bogus error message.
5974         (tsubst_decl): Fix typo in code contained in comment.
5975         (instantiate_template): Handle member template specializations.
5976         (most_general_template): Likewise.
5978 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
5980         * lex.c (whitespace_cr): Compress consecutive calls to warning().
5981         (do_identifier): Ditto for error().
5983         * pt.c (convert_nontype_argument): Ditto for cp_error().
5984         (convert_template_argument): Ditto for cp_pedwarn().
5986 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
5988         * exception.cc (__check_null_eh_spec): New fn.
5989         * except.c (expand_end_eh_spec): Call it if the spec is throw().
5991 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
5993         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
5994         * except.c (expand_end_eh_spec): Add the return type.
5995         * rtti.c (throw_bad_cast): Add the parmtypes.
5996         (throw_bad_typeid): Likewise.
5998         * semantics.c (expand_stmt): Only leave out rtl for unused
5999         artificials, and set DECL_IGNORED_P on them as well.
6000         * decl.c (wrapup_globals_for_namespace): Likewise.
6002 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
6004         * decl.c (maybe_commonize_var): Skip all artificial decls.
6005         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
6007 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
6009         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
6010         * cp-tree.h: Declare flag_enforce_eh_specs.
6011         * decl.c (store_parm_decls, finish_function): Check it.
6013         C library functions don't throw.
6014         * Makefile.in (cfns.h): New target.
6015         (except.o): Depend on it.
6016         * Make-lang.in (cc1plus): Depend on cfns.gperf.
6017         * cfns.gperf: New file.
6018         * cfns.h: Generated.
6019         * except.c: Include it.
6020         (nothrow_libfn_p): New fn.
6021         * decl.c (grokfndecl): Use it.
6022         * cp-tree.h: Declare it.
6024         * decl.c (push_overloaded_decl_1, auto_function,
6025         define_function): Lose.
6026         (build_library_fn_1): New static fn.
6027         (builtin_function): Use it.
6028         (get_atexit_node): Use build_library_fn_ptr.
6029         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
6030         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
6031         push_void_library_fn, push_throw_library_fn): New fns.
6032         * cp-tree.h: Declare them.
6033         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
6034         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
6035         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
6036         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
6037         * rtti.c (build_runtime_decl): Lose.
6038         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
6039         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
6040         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
6042         * call.c (build_call): Remove result_type parm.
6043         Call mark_used on unused artificial fns.
6044         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
6046 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
6048         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
6049         appropriate.
6050         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
6051         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
6052         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
6053         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
6054         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
6055         expand_generic_desc): Likewise.
6057 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
6059         * exception.cc (__cp_pop_exception): Cleanup the original object.
6061 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
6063         * decl.c (grok_op_properties): Merge conversion to void warning
6064         with other silly op warnings.
6066 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
6068         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
6069         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
6071 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
6073         * decl.c (cp_make_fname_decl): New function.
6074         (wrapup_globals_for_namespace): Don't emit unused static vars.
6075         (init_decl_processing): Remove comment about use of
6076         array_domain_type. Set make_fname_decl.
6077         (cp_finish_decl): Remove __FUNCTION__ nadgering.
6078         * semantics.c (begin_compound_stmt): Remove
6079         current_function_name_declared flagging.
6080         (expand_stmt): Don't emit unused local statics.
6081         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
6082         specially.
6084 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
6086         * typeck.c (convert_for_assignment): Don't look at array
6087         initializer.
6088         * call.c (convert_like_real): Likewise.
6090 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
6092         Add initial support for '\uNNNN' specifier.
6093         * lex.c (read_ucs): New fn.
6094         (readescape, skip_white_space): Call it.
6095         (is_extended_char, is_extended_char_1): New fns.
6096         (utf8_extend_token): New fn, #if 0'd out.
6097         (real_yylex): Treat extended chars like letters.
6099         * search.c (note_debug_info_needed): Walk the bases even if we
6100         weren't deferring the type itself.
6102 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6104         * decl2.c (finish_objects): Constify a char*.
6106         * method.c (emit_thunk): Likewise.
6108 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
6110         * typeck.c (dubious_conversion_warnings): Look through
6111         REFERENCE_TYPE.
6113 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6115         * class.c (dfs_modify_vtables): I is now unsigned.
6116         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
6117         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
6118         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
6119         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
6120         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
6121         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
6122         Call integer_all_onesp.
6123         * typeck2.c (process_init_constructor): Use compare_tree_int.
6125         * lang-specs.h (as): Don't call if -syntax-only.
6127 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
6129         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
6130         RTL_EXPR_HAS_NO_SCOPE after all.
6132 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
6134         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
6135         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
6136         RTL_EXPR_HAS_NO_SCOPE.
6138         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
6139         later.
6141         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
6143 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
6145         * call.c (convert_like): Macrofy.
6146         (convert_like_with_context): New macro.
6147         (convert_like_real): Renamed from convert_like.  Add calling
6148         context parameters, for diagnostics. Add recursive flag.  Call
6149         dubious_conversion_warnings for outer conversion.
6150         (build_user_type_conversion): Use convert_like_with_context.
6151         (build_over_call): Likewise. Don't warn about dubious
6152         conversions here. Adjust convert_default_arg calls.
6153         (convert_default_arg): Add context parameters for diagnostics.
6154         Pass throught to convert_like_with_context.
6155         * cp-tree.h (convert_default_arg): Add context parameters.
6156         (dubious_conversion_warnings): Prototype new function.
6157         * typeck.c (convert_arguments): Adjust convert_default_arg call.
6158         (dubious_conversion_warnings): New function, broken
6159         out of convert_for_assignment.
6160         (convert_for_assignment): Adjust.
6162 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
6164         * decl2.c (key_method): Break out from...
6165         (import_export_vtable, import_export_class): ...here.
6167         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
6168         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
6170         * search.c (note_debug_info_needed, dfs_debug_mark,
6171         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
6172         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
6174 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
6176         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
6177         typos.
6179 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
6181         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
6182         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
6183         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
6184         (lang_type): Split gets_new into has_new and has_array_new.
6185         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6186         (TYPE_GETS_NEW): Split into ...
6187         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
6188         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
6189         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
6190         (build_op_new_call): Don't declare.
6191         (build_new_1): Likewise.
6192         * call.c (build_op_new_call): Remove.
6193         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
6194         instead of TYPE_NEEDS_DESTRUCTOR.
6195         (finish_struct_bits): Likewise.
6196         (add_implicitly_declared_members): Likewise.
6197         (check_field_decl): Likewise.
6198         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
6199         correctly under the new ABI.
6200         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
6201         instead of TYPE_NEEDS_DESTRUCTOR.
6202         (initialize_local_var): Likewise.
6203         (destroy_local_var): Likewise.
6204         (cp_finish_decl): Likewise.
6205         (register_dtor_fn): Likewise.
6206         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
6207         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
6208         TYPE_VEC_DELETE_TAKES_SIZE here.
6209         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
6210         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
6211         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6212         (finish_destructor_body): Likewise.
6213         (maybe_build_cleanup_1): Likewise.
6214         * decl2.c (do_static_destruction): Likewise.
6215         * init.c (build_new_1): Make it static.
6216         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6217         (expand_cleanup_for_base): Likewise.
6218         (get_cookie_size): New function.
6219         (build_new_1): Handle array-new cookies correctly under the new
6220         ABI.
6221         (build_vec_delete_1): Likewise.
6222         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6223         (build_delete): Likewise.
6224         (build_vec_delete): Handle array-new cookies correctly under the new
6225         ABI.
6226         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6227         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
6228         TYPE_HAS_ARRAY_NEW_OPERATOR.
6229         * ptree.c (print_lang_type): Check them.
6230         * search.c (context_for_name_lookup): Fix typo in comment.
6231         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6232         * tree.c (break_out_cleanups): Likewise.
6233         (build_cplus_array_test_1): Likewise.
6234         (cp_build_qualified_type_real): Likewise.
6235         * typeck.c (complete_type): Likewise.
6237         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
6238         the command-line, not the end.
6240 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
6242         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
6244 2000-03-02  Tom Tromey  <tromey@cygnus.com>
6246         * cp-tree.h (build_java_class_ref): Declare.
6247         * init.c (build_java_class_ref): No longer static.
6248         * except.c (expand_throw): Generate a Java-style `throw' if the
6249         thrown object is a "Java" object.
6250         (initialize_handler_parm): Generate a Java-style lookup of
6251         exception info if the caught object is a "Java" object.
6252         (catch_language, catch_language_init): New globals.
6253         (decl_is_java_type): New function.
6254         (expand_start_catch_block): Don't call push_eh_info() or
6255         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
6256         class reference to build_catch_block.
6258 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6260         * typeck.c (comptypes): Treat sizetype like its language equivalent.
6262 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
6264         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
6265         to merge reference/pointer code and fix incorrect warnings.
6267 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
6269         * search.c (protected_accessible_p): Use context_for_name_lookup.
6271         * init.c (construct_virtual_bases): Fix thinko.
6272         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
6274 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6276         * decl.c (current_function_decl): Move to toplev.c.
6278 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
6280         * pt.c (fn_type_unification): Unify return type, whenever
6281         provided.
6282         (get_bindings_real): Only pass return type when necessary.
6283         Remove explicit return type check.
6284         * class.c (resolve_address_of_overloaded_function): Pass desired
6285         return type to fn_type_unification.
6287 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6289         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
6290         DECL_FIELD_SIZE.
6291         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
6292         DECL_FIELD_SIZE.
6293         * rtti.c (expand_class_desc): Likewise.
6294         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
6295         (THUNK_VCALL_OFFSET): Likewise.
6296         (THUNK_DELTA): Reflect changes in ../tree.h.
6298 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
6300         * search.c (protected_accessible_p): Also allow the access if
6301         the member is public in DERIVED.  Lose TYPE parm.
6302         (friend_accessible_p): Lose TYPE parm.
6303         (accessible_p): Adjust.
6305 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6307         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
6308         on things that are not sizes; ssize_binop deleted.
6309         Call size_diffop when appropriate.
6310         (dfs_build_vcall_offset_vtbl_entries): Likewise.
6311         (build_primary_vtable, build_secondary_vtable): Likewise.
6312         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
6313         Variable I is HOST_WIDE_INT.
6314         (get_vfield_offset): Pass proper types to size_binop.
6315         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
6316         (finish_struct_1): Likewise.
6317         (skip_rtti_stuff): Arg N is now pointer to signed.
6318         (layout_class_type): Use size_zero_node.
6319         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
6320         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
6321         * decl.c (complete_arry_type): Pass proper types to size_binop.
6322         (xref_basetypes): BINFO_OFFSET is sizetype.
6323         * error.c (dump_expr): Don't use size_binop non-sizes.
6324         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
6325         * init.c (construct_virtual_bases): Fix type error.
6326         (build_vec_delete_1): Pass proper type to size_binop and don't
6327         fold result.
6328         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
6329         * rtti.c (get_base_offset): Pass proper type to size_binop.
6330         * search.c (dfs_find_vbases): Fix type error.
6331         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
6332         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
6333         * tree.c (debug_binfo): Variable N is signed.
6334         Use HOST_WIDE_INT_PRINT_DEC.
6335         * typeck.c (comptypes): sizetype is same as equivalent integer type.
6336         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
6337         size_one_node and size_zero_node.
6338         (c_alignof): Use size_one_node.
6339         (build_component_addr): Pass proper types to size_binop.
6340         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
6342 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
6344         Implement class scope using-declarations for functions.
6345         * class.c (handle_using_decl): Call add_method for used functions.
6346         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
6347         (add_method): Used functions are hidden by local functions.
6348         (check_bases_and_members): Handle using-decls before finalizing
6349         CLASSTYPE_METHOD_VEC.
6350         * call.c (add_function_candidate): Add ctype parm; if non-zero,
6351         override the type of 'this' accordingly.
6352         (add_template_candidate, add_template_candidate_real): Add ctype parm.
6353         (convert_class_to_reference, build_user_type_conversion_1,
6354         build_new_function_call, build_object_call, build_new_op,
6355         build_new_method_call): Pass ctype parm.
6357         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
6358         the baselink.
6359         * call.c (convert_class_to_reference, build_user_type_conversion_1,
6360         build_new_function_call, build_object_call, build_new_op,
6361         build_new_method_call, build_op_delete_call): Don't get basetype_path
6362         from a baselink.
6363         * typeck.c (build_component_ref): Likewise.
6364         * init.c (build_offset_ref): Likewise.
6365         (resolve_offset_ref): Don't call enforce_access.
6366         Call build_scoped_ref.
6367         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
6368         would cause an error or if -pedantic.
6369         * class.c (alter_access): Lose binfo parm.
6371 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
6373         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
6374         types.
6376 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
6378         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
6379         pseudo_type_info creation into the std namespace
6381 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
6383         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
6384         (import_export_class): Remove declaration.
6385         * decl2.c (import_export_class): Make it static.
6386         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
6387         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
6388         EXPR_WITH_FILE_LOCATION.
6389         * lex.c (check_newline): Tweak filename/lineno setting.
6390         * semantics.c (begin_while_stmt): Fix typo in comment.
6392 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6394         * lang-options.h (-fmessage-length=): Add missing option.
6396         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
6398 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
6400         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
6402 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
6404         * optimize.c (expand_call_inline): Emit the return label before
6405         evaluating the return value.
6407 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
6409         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
6410         than duplicating functionality here.
6411         * optimize.c: Include input.h.
6412         (expand_call_inline): Use push_srcloc and pop_srcloc.
6413         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
6414         * parse.c: Regenerated.
6415         * Makefile.in (lex.o): Depend on input.h.
6416         (optimize.o): Likewise.
6418 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
6420         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
6421         function type, rather than ICE.
6423 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
6425         * decl.c (grokdeclarator): Call decl_type_access_control.
6426         * parse.y (parse_end_decl): Don't call decl_type_access_control if
6427         decl is null.
6429 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
6431         * decl.c (decls_match): Remove obsolete static member nadgering.
6433 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6435         * decl.c (grokdeclarator): Change ANSI to ISO.
6436         * lex.c (consume_string, readescape, do_identifier): Likewise.
6437         (parse_float, real_yylex): Likewise.
6438         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
6439         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
6440         new_type_id, maybe_label_decls, simple_stmt,
6441         for.init.statement): Likewise.
6442         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
6443         * semantics.c (finish_named_return_value): Likewise.
6444         * parse.c: Regenerate.
6446 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
6448         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
6449         (CPTI_CLASS_STAR_TYPE): Remove.
6450         (vtable_index_type): Likewise.
6451         (class_star_type_node): Remove.
6452         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
6453         (build_binary_op_nodefault): Remove.
6454         * call.c (build_new_op): Use build_binary_op instead of
6455         build_binary_op_nodefault.
6456         * decl.c (init_decl_processing): Remove class_star_type_node
6457         initialization.  Make delta_type_node ptrdiff_type_node under the
6458         new ABI.  Initialize vtable_index_type.
6459         (build_ptrmemfunc_type): Build different structures for the new
6460         ABI.
6461         (build_enumerator): Use build_binary_op instead of
6462         build_binary_op_nodefault.
6463         * method.c (build_overload_value): Mangle pointers-to-members
6464         appropriately under the new ABI.
6465         * typeck.c (build_array_ref): Use build_binary_op instead of
6466         build_binary_op_nodefault.
6467         (get_member_function_from_ptrfunc): Adjust for the new ABI.
6468         (build_binary_op_nodefault): Rename to ...
6469         (build_binary_op): ... this.  Remove old version.  Adjust for
6470         pointer-to-member comparisons under the new ABI.
6471         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
6472         (build_ptrmemfunc): Adjust for the new ABI.
6473         (expand_ptrmemfunc_cst): Likewise.
6474         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
6475         (pfn_from_ptrmemfunc): Adjust for the new ABI.
6477 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
6479         * call.c (build_object_call): Compress consecutive calls to
6480         cp_error.
6481         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
6482         (build_op_delete_call): Adjust message formatting.
6484         * class.c (check_bases): Compress consecutive calls to
6485         cp_pedwarn.
6486         (finish_struct_anon): Say 'ISO C++'.
6488         * decl.c (start_decl): Same here.
6489         (grok_reference_init): Likewise.
6490         (grokfndecl): Correct message formatting.
6491         (grokfndecl): Improve diagnostic.
6492         (check_static_variable_definition): Likewise. Say 'ISO C++'
6493         (compute_array_index_type): Say 'ISO C++'
6494         (create_array_type_for_decl): Compress consecutive calls to
6495         cp_error.
6496         (grokdeclarator): Say 'ISO C++'
6497         (grok_op_properties): Likewise.
6499         * decl2.c (delete_sanity): Clairify diagnostic.
6500         (check_member_template): Same here.
6501         (grok_function_init): Use consistent terminology.
6503         * expr.c (do_case): Say 'ISO C++'
6505         * friend.c (do_friend): Compress consecutive calls to warning.
6507 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
6509         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
6510         * class.c (build_secondary_vtable): Reorganize.  Don't create a
6511         new vtable under the new ABI.
6512         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
6513         computing the size.
6514         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
6515         the initializing elements.
6516         (initialize_vtable): New function.
6517         (dfs_finish_vtbls): Use it.
6518         (dfs_accumulate_vtbl_inits): New function.
6519         (finish_vtbls): Merge primary and secondary vtables under the new
6520         ABI.
6521         (finish_struct_1): Remove redundant call to layout_vtable_decl.
6522         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
6523         aren't VAR_DECLs.
6525         * class.c (build_vtable): New function, split out from ...
6526         (get_vtable_decl): ... here, and ...
6527         (build_secondary_vtable): ... here.
6529         * pt.c (tsubst_decl): Fix formatting.
6531 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6533         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
6534         (avoid_overlap, build_base_field): Likewise.
6535         (build_base_field, build_base_fields, is_empty_class):
6536         Test DECL_SIZE with integer_zero.
6537         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
6538         * cp-tree.h (struct lang_type): New field size_unit.
6539         (CLASSTYPE_SIZE_UNIT): New macro.
6540         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
6541         (cp_finish_decl): Delete -Wlarger-than processing.
6542         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
6543         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
6544         * tree.c (make_binfo): binfo vector is one entry longer.
6545         (walk_tree): Walk DECL_SIZE_UNIT.
6547 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
6549         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
6550         comment.
6551         (build_vtable_entry): Don't assume all vtable entries are
6552         functions.
6553         (build_vtbl_initializer): Adjust accordingly.
6554         (get_vtable_decl): Fix formatting.
6556 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
6558         * semantics.c (deferred_type_access_control): Walk the entire
6559         type_lookups list.
6560         (save_type_access_control): Rename from
6561         initial_deferred_type_access_control.  Just remember the value.
6562         (decl_type_access_control): New fn.
6563         (begin_function_definition): Use deferred_type_access_control, after
6564         we've started the function.  Set type_lookups to error_mark_node.
6565         * parse.y (frob_specs, fn.def1): Adjust.
6566         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
6567         (parse_end_decl, parse_bitfield0, parse_method): New fns.
6568         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
6569         (after_type_component_declarator0): Likewise.
6570         (after_type_component_declarator): Likewise.
6571         (notype_component_declarator): Likewise.
6572         * cp-tree.h: Adjust.
6574         * decl.c (redeclaration_error_message): Allow redeclaration of
6575         namespace-scope decls.
6577 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6579         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
6581 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
6583         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
6584         * decl2.c (grokclassfn): Likewise.
6586         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
6588         * decl2.c (lang_decode_option): Don't set default message length
6589         here.
6590         * lex.c (lang_init_options): Set it here.
6592 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
6594         Make DECL_CONTEXT mean the class in which a member function was
6595         declared, even for a virtual function.
6596         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
6597         (DECL_FRIEND_CONTEXT): New macro.
6598         (DECL_REAL_CONTEXT): Remove.
6599         (SET_DECL_FRIEND_CONTEXT): Likewise.
6600         (DECL_VIRTUAL_CONTEXT): Adjust.
6601         (DECL_CLASS_SCOPE_P): Use TYPE_P.
6602         (add_friends): Remove.
6603         (hack_decl_function_context): Likewise.
6604         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
6605         CP_DECL_CONTEXT.
6606         (build_over_call): Fix indentation.  Use DECL_CONTEXT
6607         instead of DECL_CLASS_CONTEXT.
6608         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
6609         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
6610         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6611         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
6612         (build_base_field): Likewise.
6613         (finish_struct_1): Likewise.
6614         (build_self_reference): Likewise.
6615         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
6616         DECL_REAL_CONTEXT.
6617         (pushtag): Use decl_function_context, not
6618         hack_decl_function_context.
6619         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6620         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
6621         (pushdecl): Remove bogus code.
6622         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
6623         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6624         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6625         Use decl_function_context, nothack_decl_function_context.
6626         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
6627         (grokdeclarator): Likewise.  Use decl_function_context, not
6628         hack_decl_function_context.
6629         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
6630         (start_function): Use DECL_FRIEND_CONTEXT, not
6631         DECL_CLASS_CONTEXT.  Use decl_function_context, not
6632         hack_decl_function_context.
6633         (finish_function): Use decl_function_context, not
6634         hack_decl_function_context.
6635         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
6636         DECL_CLASS_CONTEXT.
6637         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
6638         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
6639         (grokfield): Likewise.
6640         (finish_builtin_type): Likewise.
6641         (finish_vtable_vardec): Use decl_function_context, not
6642         hack_decl_function_context.
6643         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6644         (start_static_initialization_or_destruction): Likewise.
6645         (finish_static_initialization_or_destruction): Likewise.
6646         (mark_used): Adjust logic for deciding when to synthesize methods.
6647         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
6648         DECL_REAL_CONTEXT.
6649         * error.c (dump_function_decl): Use DECL_CONTEXT, not
6650         DECL_CLASS_CONTEXT.
6651         * friend.c (is_friend): Likewise.
6652         (add_friends): Remove.
6653         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
6654         * lex.c (begin_definition_of_inclass_inline): Use
6655         decl_function_context, not hack_decl_function_context.
6656         (process_next_inline): Likewise.
6657         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6658         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
6659         DECL_CLASSS_CONTEXT.
6660         (hack_identifier): Likewise.
6661         (synthesize_method):  Use decl_function_context, not
6662         hack_decl_function_context.
6663         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
6664         DECL_REAL_CONTEXT.
6665         (is_member_template): Use decl_function_context, not
6666         hack_decl_function_context.  Use DECL_CONTEXT, not
6667         DECL_CLASS_CONTEXT.
6668         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
6669         DECL_CLASS_CONTEXT.
6670         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
6671         DECL_REAL_CONTEXT.
6672         (push_template_decl_real): Likewise.
6673         (instantiate_class_template): Don't call add_friends.
6674         (tsubst_default_argument): Use DECL_CONTEXT, not
6675         DECL_REAL_CONTEXT.
6676         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
6677         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6678         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
6679         DECL_CLASS_CONTEXT.
6680         * repo.c (repo_inline_used): Likewise.
6681         * search.c (current_scope): Adjust for new _CONTEXT macros.
6682         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
6683         DECL_REAL_CONTEXT.
6684         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6685         (lookup_fnfields_here):Likewise.
6686         (check_final_overrider): Likewise.
6687         (init_vbase_pointers): Likewise.
6688         (virtual_context): Likewise.
6689         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
6690         (expand_body): Use decl_function_context, not
6691         hack_decl_function_context.
6692         * tree.c (hack_decl_function_context): Remove.
6693         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
6694         DECL_CLASS_CONTEXT.
6695         * typeck2.c (error_not_base_type): Likewise.
6697 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
6699         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
6701 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6703         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
6705 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
6707         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
6709 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
6711         * decl2.c (lang_decode_option): Enable automatic line wrapping.
6713 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
6715         * parse.y (frob_specs): Split out...
6716         (parse_decl): From here.
6717         (fn.def2): Call initial_deferred_type_access_control.
6718         (after_type_component_declarator0): Call frob_specs.
6719         (notype_component_declarator0): Likewise.
6720         * search.c (friend_accessible_p): Nested classes are friends of their
6721         enclosing classes.
6723 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
6725         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
6726         used to create an implicit temporary.
6728         * class.c (dfs_modify_vtables): Tweak calculation of functions to
6729         override.
6731 2000-02-08  Nathan Sidwell  <nathan@acm.org>
6733         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
6734         strip array element qualifiers too.
6736 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
6738         * decl.c (store_parm_decls): Don't build cleanups for parameters
6739         while processing_template_decl.
6741 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
6743         * cp-tree.h (struct saved_scope): Add incomplete field.
6744         (namespace_scope_incomplete): New macro.
6745         * decl.c (pushdecl): Use it.
6746         (hack_incomplete_structures): Use it.  See through artificial
6747         binding levels.
6748         (mark_saved_scope): Mark it.
6750         Implement access control for nested types.
6751         * search.c (type_access_control): New fn.
6752         (accessible_p): Now we do perform access control for types.
6753         * semantics.c (deferred_type_access_control): New fn.
6754         (initial_deferred_type_access_control): New fn.
6755         (begin_function_definition): Call it.  Add lookups parm.
6756         * decl.c (struct binding_level): Add this_class field.
6757         (pushlevel_class): Set it.
6758         (mark_binding_level): Mark it.
6759         (lookup_name_real): Use it.  Call type_access_control.
6760         (mark_saved_scope): Mark lookups field.
6761         * cp-tree.h (flagged_type_tree): Add lookups field.
6762         (struct saved_scope): Add lookups field.
6763         (type_lookups): New macro.
6764         * parse.y (declmods): Now <ftype>.
6765         (parse_decl): Add lookups parm.  Call
6766         initial_deferred_type_access_control.
6767         (lang_extdef): Clear type_lookups.
6768         (typed_declspecs, declmods, typespec): Set lookups field.
6769         (initdcl): Call deferred_type_access_control.
6770         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
6771         component_decl_1, named_parm): Adjust.
6772         * friend.c (is_friend): Nested classes are friends of their
6773         enclosing classes.
6775         * class.c (currently_open_derived_class): New fn.
6776         * method.c (hack_identifier): Use it.
6778         * lex.c (do_identifier): Remove obsolete code.
6780         * parse.y (typed_typespecs): Propagate new_type_flag properly.
6782 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
6784         * tinfo.h: Remove apostrophes from C++ comment (xgettext
6785         thinks this file is plain C).
6787 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6789         * Makefile.in (call.o): Depend on $(EXPR_H).
6791         * call.c: Include "expr.h".
6793         * class.c (dump_class_hierarchy): Add prototype.
6795         * search.c (dfs_get_pure_virtuals): Likewise.
6797 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
6799         * parse.y (simple_stmt): Allow :: token in asm parameter list.
6800         * parse.c: Rebuilt.
6802 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
6804         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
6805         Store it in DECL_FCONTEXT.
6806         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
6808 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
6810         * tinfo.h (old abi): #include "tconfig.h".
6811         * tinfo.cc (convert_to_base): Move into old abi section.
6813 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
6815         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
6816         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
6817         (BINFO_PRIMARY_BINFO): New macro.
6818         (BF_DELTA): Rename to ...
6819         (BV_DELTA): ... this.
6820         (BF_VCALL_INDEX): Rename to ...
6821         (BV_VCALL_INDEX): ... this.
6822         (BF_FN): Rename to ...
6823         (BV_FN): ... this.
6824         * class.c (build_vbase_path): Adjust for changes to reverse_path.
6825         (set_rtti_entry): Rename BF_ macros to BV_ variants.
6826         (modify_vtable_entry): Simplify.
6827         (add_virtual_function): Rename BF_ macros to BV_ variants.
6828         (build_vtable_initializer): Likewise.
6829         (get_class_offset_1): Remove.
6830         (dfs_get_class_offset): Likewise.
6831         (get_class_offset): Likewise.
6832         (dfs_find_final_overrider): New function.
6833         (find_final_overrider): Likewise.
6834         (modify_one_vtable): Remove.
6835         (dfs_find_base): New function.
6836         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
6837         find_final_overrider.
6838         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
6839         virtuals.
6840         (dfs_fixup_vtable_deltas): Remove.
6841         (override_one_vtable): Remove.
6842         (merge_overrides): Likewise.
6843         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
6844         unreal chilren of virtual bases.
6845         (finish_struct_1): Don't use merge_overrides.  Don't use
6846         dfs_fixup_vtable_deltas.
6847         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
6848         BINFOs.
6850 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
6851             Jason Merrill  <jason@yorick.cygnus.com>
6853         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
6855 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
6857         * exception.cc (__throw_bad_typeid): Add missing std::.
6859 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6861         * cp-tree.h (make_thunk): PROTO -> PARAMS.
6863 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
6865         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
6867         Runtime support for new-abi rtti.
6868         * inc/typeinfo (type_info::operator!=): Define in class.
6869         (type_info::before, type_info::name, type_info::operator==,
6870         type_info::operator!=): Define new ABI implementations.
6871         (type_info::is_pointer_p, type_info::is_function_p): Declare
6872         new virtual functions.
6873         (type_info::do_catch, type_info::do_upcast): Likewise.
6875         * tinfo.h (__base_class_info): Define new class.
6876         (__class_type_info): Likewise.
6877         (__si_class_type_info): Likewise.
6878         (__vmi_class_type_info): Likewise.
6879         (__dynamic_cast): Prototype.
6881         * tinfo.cc: Conditionalize old and new rtti mechanisms.
6882         (type_info::is_pointer_p): Define new function.
6883         (type_info::is_function_p): Likewise.
6884         (type_info::do_catch): Likewise.
6885         (type_info::do_upcast): Likewise.
6886         (vtable_prefix): New structure for vtable access.
6887         (adjust_pointer): Define new template function.
6888         (contained_p, public_p, virtual_p, contained_public_p,
6889         contained_nonpublic_p, contained_nonvirtual_p): Define new
6890         functions.
6891         (nonvirtual_base_type): New local variable.
6892         (__class_type_info::~__class_type_info): Define.
6893         (__si_class_type_info::~__si_class_type_info): Likewise.
6894         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
6895         (__class_type_info::do_catch): Define new function.
6896         (__class_type_info::do_upcast): Likewise.
6897         (__class_type_info::find_public_src): Likewise.
6898         (__class_type_info::do_find_public_src): Likewise.
6899         (__si_class_type_info::do_find_public_src): Likewise.
6900         (__vmi_class_type_info::do_find_public_src): Likewise.
6901         (__class_type_info::do_dyncast): Likewise.
6902         (__si_class_type_info::do_dyncast): Likewise.
6903         (__vmi_class_type_info::do_dyncast): Likewise.
6904         (__class_type_info::do_upcast): Likewise.
6905         (__si_class_type_info::do_upcast): Likewise.
6906         (__vmi_class_type_info::do_upcast): Likewise.
6907         (__dynamic_cast): Likewise.
6909         * tinfo2.cc (__fundamental_type_info): Define new class.
6910         (__pointer_type_info): Likewise.
6911         (__reference_type_info): Likewise.
6912         (__array_type_info): Likewise.
6913         (__function_type_info): Likewise.
6914         (__enum_type_info): Likewise.
6915         (__ptr_to_member_type_info): Likewise.
6916         (__fundamental_type_info::~__fundamental_type_info): Define.
6917         (__pointer_type_info::~__pointer_type_info): Likewise.
6918         (__reference_type_info::~__reference_type_info): Likewise.
6919         (__array_type_info::~__array_type_info): Likewise.
6920         (__function_type_info::~__function_type_info): Likewise.
6921         (__enum_type_info::~__enum_type_info): Likewise.
6922         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
6923         (__pointer_type_info::do_catch): Define new function.
6924         (__ptr_to_member_type_info::do_catch): Define new function.
6926         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
6927         (__is_pointer): Likewise.
6929         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
6931 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
6933         * cp/class.c (build_vtable): Rename to build_primary_vtable.
6934         (prepare_fresh_vtable): Rename to build_secondary_vtable.
6935         (make_new_vtable): New function.
6936         (modify_vtable_entry): Handle generation of new vtables correctly.
6937         (modify_one_vtable): Remove unused parameter.
6938         (dfs_fixup_vtable_deltas): Likewise.
6939         (override_one_vtable): Use build_secondary_vtable.
6940         (finish_struct_1): Use build_primary_vtable and
6941         build_secondary_vtable.
6943 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
6945         * cp/decl.c: Adjust variable names, comments, help strings.
6947 2000-01-29  Nathan Sidwell  <nathan@acm.org>
6949         * new2.cc (operator delete[]): Use operator delete, don't assume
6950         implementation.
6952 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
6954         * class.c (build_vtbl_initializer): Add argument to
6955         build_vtable_entry call.
6957 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
6959         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
6960         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
6961         (BF_DELTA): New macro.
6962         (BF_VCALL_INDEX): Likewise.
6963         (BF_FN): Likewise.
6964         (THUNK_VCALL_OFFSET): Likewise.
6965         (make_thunk): Change prototype.
6966         * class.c (build_vtable_entry): Integrate
6967         build_vtable_entry_for_fn.  Handle vcall indices.
6968         (build_vtable_entry_for_fn): Remove.
6969         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
6970         BF_VCALL_INDEX, BF_FN.
6971         (modify_vtable_entry): Integrate common code from
6972         modify_one_vtable and dfs_fixup_vtable_deltas.
6973         (add_virtual_function): Set BF_VCALL_INDEX.
6974         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
6975         and BF_FN.
6976         (modify_one_vtable): Simplify.
6977         (dfs_fixup_vtable_deltas): Likewise.
6978         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
6979         * method.c (make_thunk): Handle vcall indices.
6981 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
6983         Compiler side new abi rtti (not enabled).
6984         * cp-tree.h (new_abi_rtti_p): New macro.
6985         (emit_support_tinfos): Prototype new function.
6986         (tinfo_decl_p): Likewise.
6987         (emit_tinfo_decl): Likwise.
6988         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
6989         macros.
6990         (doing_runtime): New local static.
6991         (init_rtti_processing): Add new-abi initializer.
6992         (get_tinfo_decl): Add new-abi logic.
6993         (tinfo_from_decl): Likewise.
6994         (build_dynamic_cast_1): Likewise.
6995         (qualifier_flags): New static function.
6996         (tinfo_base_init): Likewise.
6997         (generic_initializer): Likewise.
6998         (ptr_ref_initializer): Likewise.
6999         (ptmd_initializer): Likewise.
7000         (class_hint_flags): Likewise.
7001         (class_initializer): Likewise.
7002         (synthesize_tinfo_var): Likewise.
7003         (create_real_tinfo_var): Likewise.
7004         (create_pseudo_type_info): Likewise.
7005         (get_vmi_pseudo_type_info): Likewise.
7006         (create_tinfo_types): Likewise.
7007         (emit_support_tinfos): New global function.
7008         (tinfo_decl_p): New global predicate.
7009         (emit_tinfo_decl): New global function.
7010         * class.c (set_rtti_entry): Generalize for old and new rtti.
7011         (build_vtbl_initializer): Likewise.
7012         * decl2.c (finish_file): Likewise.
7014 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
7016         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
7017         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
7019 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
7021         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
7022         for scopes.
7024 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
7026         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
7028 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
7030         * optimize.c (calls_setjmp_r): Supply new argument
7031         to special_function_p.
7033 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7035         * call.c: PROTO -> PARAMS.
7036         * class.c: Likewise.
7037         * cp-tree.h: Likewise.
7038         * cvt.c: Likewise.
7039         * decl.c: Likewise.
7040         * decl.h: Likewise.
7041         * decl2.c: Likewise.
7042         * dump.c: Likewise.
7043         * errfn.c: Likewise.
7044         * error.c: Likewise.
7045         * except.c: Likewise.
7046         * expr.c: Likewise.
7047         * init.c: Likewise.
7048         * input.c: Likewise.
7049         * lex.c: Likewise.
7050         * lex.h: Likewise.
7051         * method.c: Likewise.
7052         * optimize.c: Likewise.
7053         * parse.y: Likewise.
7054         * pt.c: Likewise.
7055         * repo.c: Likewise.
7056         * rtti.c: Likewise.
7057         * search.c: Likewise.
7058         * semantics.c: Likewise.
7059         * spew.c: Likewise.
7060         * tree.c: Likewise.
7061         * typeck.c: Likewise.
7062         * typeck2.c: Likewise.
7063         * xref.c: Likewise.
7065 2000-01-25  Richard Henderson  <rth@cygnus.com>
7067         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
7069 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
7071         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
7072         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
7073         (struct vcall_offset_data_s): New type.
7074         (dfs_vcall_offset_queue_p): New function.
7075         (dfs_build_vcall_offset_vtbl_entries): Likewise.
7076         (build_vcall_offset_vtbl_entries): Likewise.
7077         (layout_vtable_decl): Likewise.
7078         (num_vfun_entries): Likewise.
7079         (num_extra_vtbl_entries): Add the entries for vcall offsets.
7080         (build_vtbl_initializer): Likewise.
7081         (dfs_finish_vtabls): Use layout_vtable_decl.
7082         (modify_one_vtables): Always duplicate vtables under the new ABI.
7083         (finish_struct_1): Use layout_vtable_decl.
7085 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7087         * decl.c (member_function_or_else): Change third arg from a format
7088         specifier to an `enum overload_flags'.  Callers changed.
7090 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
7092         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
7093         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
7094         build_const_cast, get_delta_difference, check_return_expr): Avoid
7095         ANSI string concatenation usage.
7097 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
7099         * class.c (layout_class_type): Put the fields required to make a
7100         class non-empty at the end, not the beginning, of the TYPE_FIELDs
7101         list.
7103 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
7105         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
7106         template.
7108         * decl2.c (mark_used): Do instantiate inlines that have been
7109         explicitly instantiated.
7111 2000-01-24  Richard Henderson  <rth@cygnus.com>
7113         * call.c (build_over_call): Use expand_tree_builtin.
7114         * typeck.c (build_function_call_real): Likewise.
7115         (build_binary_op_nodefault): Handle unordered compares.
7117 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
7119         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
7120         cp_tree_index values.
7121         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
7122         New global node #defines for them.
7123         * rtti.c (call_void_fn): Replace with ...
7124         (build_runtime_decl): ... new static function.
7125         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
7126         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
7127         (build_dynamic_cast_1): Always produce correctly typed result.
7128         Explicitly produce type_info addresses. Use dynamic_cast_node.
7129         * exception.cc (__throw_bad_cast): Return `void *'.
7130         (__throw_bad_typeid): Return `const type_info &'.
7132 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
7134         * cp-tree.h (get_vtable_decl): Prototype new function.
7135         * class.c (get_vtable_decl): New function. Broken out from ...
7136         (build_vtable): ... here. Use it.
7137         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
7138         by get_vtable_decl.
7140 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
7142         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
7143         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
7144         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
7145         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
7146         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
7147         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
7148         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
7149         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
7150         (CPTI_TINFO_VAR_ID): New enumeration.
7151         (__tp_desc_type_node, __access_mode_type_node,
7152         __bltn_desc_type_node, __user_desc_type_node,
7153         __class_desc_type_node, __ptr_desc_type_node,
7154         __attr_desc_type_node, __func_desc_type_node,
7155         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
7156         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
7157         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
7158         enum_desc_type_node, class_desc_type_node,
7159         si_class_desc_type_node, vmi_class_desc_type_node,
7160         ptmd_desc_type_node, base_desc_type_node): New #defines.
7161         (tinfo_fn_id, tinfo_fn_type): Rename to ...
7162         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
7163         (tinfo_var_id): New enumeration.
7164         (DECL_TINFO_FN_P): Augment comment.
7165         * decl.c (cp_global_trees): Adjust documentation.
7166         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
7167         tinfo_decl_type and tinfo_var_id.
7168         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
7169         (build_typeid): Remove unused variable.
7170         (get_tinfo_var): Use tinfo_var_id.
7171         (tinfo_name): New static function.
7172         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
7173         (tinfo_from_decl): Likewise.
7174         (get_base_offset): New static function, broken out of
7175         expand_class_desc.
7176         (expand_si_desc): Use tinfo_name.
7177         (expand_class_desc): Likewise. Lose local static variable.
7178         Use base_desc_type_node. Use get_base_offset.
7179         (expand_ptr_desc): Use tinfo_name.
7180         (expand_attr_desc): Likewise.
7181         (expand_generic_desc): Likewise.
7183         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
7184         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
7186 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
7188         * cp-tree.h (__eprintf): Remove declaration.
7189         * tree.c (__eprintf): Remove definition.
7191 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
7192             Mark Mitchell  <mark@codesourcery.com>
7194         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
7195         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
7197 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
7199         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
7201 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
7203         * cp-tree.h (register_dtor_fn): New function.
7204         * decl.c (destroy_local_static): Rename to ...
7205         (register_dtor_fn): ... this.  Give it external linkage.
7206         (expand_static_init): Use it.
7207         * decl2.c (do_static_initialization): Likewise, if using
7208         __cxa_atexit.
7209         (do_static_destruction): Check that __cxa_atexit is not in use.
7210         (finish_file): Don't call do_static_destruction if using
7211         __cxa_atexit.
7213         * typeck.c (convert_arguments): Restore two-message error
7214         reporting.
7216 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
7218         Remap dynamic cast hint values to be consistent across ABIs.
7219         * search.c (dynamic_cast_base_recurse): Remap generated value.
7220         (get_dynamic_cast_base_type): Adjust documentation.
7221         * tinfo.h (__user_type_info::dyncast): Likewise.
7222         (__user_type_info::find_public_subobj): Remap BOFF meaning.
7223         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
7224         (__class_type_info::do_dyncast): Likewise.
7225         (__class_type_info::do_find_public_subobj): Likewise.
7226         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
7228 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
7230         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
7232         * typeck2.c (incomplete_type_error): Restore previous
7233         cp_error and cp_error_at call sequence.
7235 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
7237         * class.c (dump_class_hierarchy): Make format agree with argument;
7238         cast pointer to unsigned long and print with %lx.
7240 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
7242         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
7244         * typeck.c (composite_pointer_type, common_type,
7245         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
7246         build_function_call_real, convert_arguments,
7247         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
7248         build_unary_op, mark_addressable, build_compound_expr,
7249         build_static_cast, build_reinterpret_cast, build_const_cast,
7250         build_c_cast, build_modify_expr, get_delta_difference,
7251         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
7252         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
7253         into a single one.
7254         * typeck2.c (readonly_error, abstract_virtuals_error,
7255         process_init_constructor, check_for_new_type): Likewise.
7257 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
7259         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
7260         VAR_DECLs.
7262 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
7264         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
7265         (build_x_typeid): Likewise.
7266         (get_tinfo_fn): Likewise.
7267         (get_tinfo_fn_unused): Rename to ...
7268         (get_tinfo_decl): ... here.
7269         * rtti.c (build_headof): Replace logic error with assertion.
7270         (get_tinfo_fn_dynamic): Rename to ...
7271         (get_tinfo_decl_dynamic): ... here. Make static. Use
7272         complete_type_or_else.
7273         (build_x_typeid): Move into ...
7274         (build_typeid): ... here. Adjust call to
7275         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
7276         throw_bad_typeid expression.
7277         (get_tinfo_fn_unused): Rename to ...
7278         (get_tinfo_decl): ... here. Adjust comment.
7279         (get_tinfo_fn): Delete.
7280         (tinfo_from_decl): New static function.
7281         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
7282         (get_typeid): Use complete_type_or_else.
7283         (build_dynamic_cast_1): Adjust calls to
7284         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
7285         * parse.y (primary): Adjust call to build_typeid.
7286         * except.c (build_eh_type_type_ref): Adjust call to
7287         get_tinfo_decl. Mark as used.
7288         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
7289         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
7290         * parse.c: Regenerated.
7292 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
7294         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
7295         calling convention.
7296         (resolves_to_fixed_type_p): Document calling convention.
7297         * rtti.c (build_x_typeid): Initialize NONNULL.
7299         * cp-tree.h (build_shared_int_cst): New function.
7300         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
7301         * class.c (modify_vtable_entry): Likewise.
7302         (add_virtual_function): Split out code to generated shared
7303         INTEGER_CSTs to build_share_int_cst.
7304         (modify_all_vtables): Handle all the overridden functions here.
7305         Add overridden functions from non-primary virtual bases to the
7306         primary vtable.
7307         (finish_struct_1): Adjust call to modify_all_vtables.  Add
7308         overridden functions from non-primary bases to the vtable.
7309         * tree.c (build_shared_int_cst): New function.
7311         * cp-tree.h (scratchalloc): Remove.
7312         (build_scratch_list): Likewise.
7313         * call.c (convert_class_to_reference): Replace build_scratch_list
7314         and build_expr_list with build_tree_list.
7315         (add_candidate): Replace scratchalloc with expralloc.  Note memory
7316         leak.
7317         (build_user_type_conversion_1):  Replace build_scratch_list
7318         and build_expr_list with build_tree_list.
7319         (build_new_op): Likewise.
7320         (build_op_delete_call): Likewise.
7321         (convert_like): Likewise.
7322         * cvt.c (ocp_convert): Likewise.
7323         * decl.c (start_decl): Likewise.
7324         (start_function): Likewise.
7325         (finish_destructor_body): Likewise.
7326         (maybe_build_cleanup_1): Likewise.
7327         * decl2.c (reparse_decl_as_expr): Likewise.
7328         * init.c (perform_member_init): Likewise.
7329         (expand_cleanup_for_base): Likewise.
7330         (build_builtin_delete_call): Likewise.
7331         (build_new_1): Likewise.
7332         (build_delete): Likewise.
7333         * method.c (do_build_assign_ref): Likewise.
7334         * parse.y (already_scoped_stmt): Likewise.
7335         (nontrivial_exprlist): Likewise.
7336         (net_initializer): Likewise.
7337         (initlist): Likewise.
7338         * parse.c: Regenerated.
7339         * rtti.c (build_x_typeid): Likewise.
7340         (build_dynamic_cast_1): Likewise.
7341         * typeck.c (build_x_compound_expr): Likewise.
7342         (build_static_cast): Likewise.
7343         (build_modify_expr): Likewise.
7345         * cp-tree.h (DECL_VINDEX): Add documentation.
7346         * class.c (build_vtable_entry): Likewise.
7347         (start_vtable): Add comment.
7348         (add_virtual_function): Replace pending_hard_virtuals with
7349         overridden_virtuals and pending_virtuals with new_virtuals.
7350         Replace redundant assignments with assertions.
7351         (check_for_override): Add comment.
7352         (check_bases_and_members): Replace pending_hard_virtuals with
7353         overridden_virtuals and pending_virtuals with new_virtuals.
7354         (create_vtbl_ptr): Likewise.
7355         (layout_class_type): Likewise.
7356         (finish_struct_1): Likewise.  Add comments.
7358 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
7360         * class.c (finish_struct_1): Replace redundant code with
7361         assertions.
7363         * cp-tree.h (flag_new_abi): Move.
7364         (flag_use_cxa_atexit): Likewise.
7365         (flag_honor_std): Likewise.
7366         (flag_rtti): Likewise.
7367         (vbase_offsets_in_vtable_p): Define.
7368         (vptrs_present_everywhere_p): Likewise.
7369         (TYPE_CONTAINS_VPTR_P): Likewise.
7370         (dfs_walk_real): Declare.
7371         * class.c (build_vbase_pointer_fields): Check
7372         vbase_offsets_in_vtable_p.
7373         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
7374         BINFO_VPTR_FIELD.
7375         (build_vbase_offset_vtbl_entries): Simplify.
7376         (build_vbase_offset_vtbl_entries): Adjust.
7377         (build_vbase_pointer): Add ability to look up vbase offsets in
7378         vtable.
7379         (start_vtable): New function.
7380         (add_virtual_function): Use it.
7381         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
7382         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
7383         (build_vtbl_initializer): Take the type of the complete object as
7384         input.  Use it to correctly calculate vbase offsets.
7385         (dfs_finish_vtbls): Pass the complete type to
7386         build_vtbl_initializer.
7387         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
7388         (create_vtable_ptr): Create a vtable even if there are no
7389         new virtual functions, under the new ABI.
7390         (finish_struct_1): Likewise.
7391         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
7392         * decl.c (exapnd_static_init): Remove call to
7393         preserve_initializer.
7394         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
7395         vtables.
7396         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
7397         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
7398         (construct_virtual_bases): Don't initialize virtual base pointers
7399         under the new ABI.
7400         (build_aggr_init): Clean up comment.
7401         (expand_aggr_init_1): Likewise.
7402         * rtti.c (expand_class_desc): Store the virtual function table
7403         index where the vbase offset lives in the offset field.
7404         * search.c (dfs_walk_real): Make it global.
7405         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
7406         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
7408         * tinfo.h (USItype): Make it signed under the new ABI.
7409         * tinfo.cc (convert_to_base): New function.  Encapsulate base
7410         conversion logic here.
7411         (__class_type_info::do_upcast): Use it.
7412         (__class_type_info::do_dyncast): Likewise.
7413         (__class_type_info::do_find_public_subobj): Likewise.
7415         * init.c (construct_virtual_bases): Don't look up the addresses of
7416         virtual bases at run-time.
7418         * class.c (build_vbase_pointer): Relocate.
7419         (build_vbase_pointer_fields): Likewise.
7420         (dfs_build_vbase_offset_vtbl_entries): Likewise.
7421         (build_vbase_offset_vtbl_entries): Likewise.
7423         * decl.c (init_decl_processing): Complain if -fnew-abi
7424         -fno-vtable-thunks is used.
7426         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
7427         flag_new_abi.
7429 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
7431         * cp-tree.h (num_extra_vtbl_entries): New function.
7432         (size_extra_vtbl_entries): Likewise.
7433         (dfs_vtable_path_unmark): Likewise.
7434         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
7435         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
7436         * class.c (num_extra_vtbl_entries): New function.
7437         (size_extra_vtbl_entries): Likewise.
7438         (dfs_build_vbase_offset_vtbl_entries): New function.
7439         (build_vbase_offset_vtbl_entries): Likewise.
7440         (build_vtbl_initializer): Use it.
7441         (finish_struct_1): Adjust vtable sizes (using
7442         num_extra_vtbl_entries).
7443         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
7444         THUNK_DECL is non-NULL before expanding it.
7445         * init.c (expand_virtual_init): Adjust the vtable pointer by
7446         size_extra_vtbl_entries before storing it.
7447         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
7448         Handle TREE_LIST parameters here, not in the dfs_* functions.
7449         (dfs_unmarked_real_bases_queue_p): Adjust.
7450         (dfs_marked_real_bases_queue_p): Likewise.
7451         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
7452         (dfs_vtable_path_marked_real_bases_queue_p): New function.
7453         (dfs_vtable_path_unmark): Likewise.
7455 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
7457         * optimize.c (copy_body_r): Clear the operand three of a
7458         TARGET_EXPR when copying it.
7460 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7462         * method.c (build_decl_overload_real): Check whether we are in ::
7463         before returning __builtin_new/delete.
7465 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
7467         * pt.c (tsubst_friend_function): Improve comment.
7468         (instantiate_decl): Avoid crashing when a "nested" function is
7469         instantiated from the top level.
7471         * dump.c (dqeueue_and_dump): Dump
7472         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
7474 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7476         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
7478 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
7480         * g++spec.c (lang_specific_driver): Add -fnew-abi if
7481         ENABLE_NEW_GXX_ABI defined.
7482         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
7483         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
7484         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
7486 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
7488         * decl.c (start_cleanup_fn): Call pushdecl.
7490         * call.c (convert_class_to_reference): Fix typos.
7491         (build_conditional_expr): Handle errors gracefully.
7492         * class.c (push_nested_class): Likewise.
7493         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
7494         (DECL_THIS_EXTERN): Use it.
7495         (DECL_THIS_STATIC): Likewise.
7496         * cvt.c (convert_to_void): Handle errors gracefully.
7497         (build_expr_type_conversion): Likewise.
7498         * decl.c (maybe_push_decl): Likewise.
7499         (start_decl_1): Likewise.
7500         (require_complete_types_for_parms): Likewise.
7501         * parse.y (structsp): Likewise.
7502         (base_class): Likewise.
7503         * parse.c: Regenerated.
7504         * pt.c (finish_member_template_decl): Likewise.
7505         * typeck.c (decay_conversion): Likewise.
7507         * cp-tree.h (dfs_skip_vbases): New function.
7508         (find_vbase_instance): Likewise.
7509         * class.c (determine_primary_base): Allow a nearly empty base to
7510         serve as a primary base class under the new ABI.
7511         (get_class_offset_1): Rename to ...
7512         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
7513         messages here.
7514         (get_class_offset): Use it.  Issue error messages here.
7515         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
7516         find the right copies of virtual bases.
7517         (fixup_vtable_deltas1): Rename to ...
7518         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
7519         bases as primary bases.
7520         (fixup_vtable_deltas): Remove.
7521         (override_one_vtable): Handle virtual bases as primary bases.
7522         (merge_overrides): Likewise.
7523         (finish_struct_1): Likewise.
7524         (dump_class_hierarchy): Dump primary-ness of bases as well.
7525         * search.c (mark_primary_bases): Use a pre-order traversal to
7526         handle primary virtual bases.
7527         (dfs_skip_vbases): New fiunction.
7528         (expand_upcast_fixups): Adjust to handle primary virtual bases.
7529         (fixup_virtual_upcast_offsets): Likewise.
7530         (fixup_all_virtual_upcast_offsets): Likewise.
7531         (dfs_find_vbase_instances): New function.
7532         (find_vbase_instance): Likewise.
7534 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
7536         * lex.c (DIR_SEPARATOR): Delete macro.
7538 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
7540        * decl2.c (lang_decode_option): Handle automatic line wrapping
7541        option.
7543 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
7545         * friend.c (do_friend): Don't resolve scopes when processing
7546         template declarations, even if the qualifying scope doesn't
7547         involve template parameters.
7549 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
7551         * class.c (dfs_modify_vtables_queue_p): Remove.
7552         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
7553         and dfs_marked_real_bases_queue_p instead of
7554         dfs_modify_vtables_queue_p.
7556         * class.c (build_vbase_path): Simplify.
7557         (dfs_propagate_binfo_offsets): New function.
7558         (propagate_binfo_offsets): Use it.
7559         (remove_base_field): Simplify.
7560         (dfs_set_offset_for_vbases): Remove.
7561         (dfs_set_offset_for_shared_vbases): New function.
7562         (dfs_set_offset_for_unshared_vbases): Likewise.
7563         (layout_virtual_bases): Use them.
7564         (layout_basetypes): Don't call propagate_binfo_offsets.
7565         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
7566         for the vbases.
7568         * class.c (build_base_field): New function, split out from ...
7569         (build_base_fields): ... here.  Use it.  Allocate primary bases
7570         first, under the new ABI.
7571         (get_vtable_entry): Remove.
7572         (remove_base_field): New function, split out from ...
7573         (remove_base_fields): ... here.  Adjust since primary bases come
7574         first under the new ABI.
7576         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
7577         (initialize_vtbl_ptrs): New function.
7578         (expand_indirect_vtbls_init): Change prototype.
7579         (convert_pointer_to_vbase): Declare.
7580         * init.c (expand_direct_vtbls_init): Remove.
7581         (dfs_initialize_vtbl_ptrs): New function.
7582         (initialize_vtbl_ptrs): Likewise.
7583         (emit_base_init): Use initialize_vtbl_ptrs.
7584         * search.c (convert_pointer_to_vbase): Make it global.
7585         (expand_indirect_vtbls_init): Remove vtable initialization code.
7586         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
7588         * class.c (dfs_finish_vtbls): New function.
7589         (finish_vtbls): Use it.
7590         (dump_class_hierarchy): New function.
7592         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
7593         (BINFO_VBASE_PRIMARY_P): New macro.
7594         (BINFO_VIRTUALS): Add to documentation.
7595         (SET_BINFO_PRIMARY_MARKED_P): Remove.
7596         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7597         (dfs_mark_primary_bases_queue_p): Likewise.
7598         (dfs_unmarked_real_bases_queue_p): New function.
7599         (dfs_marked_real_bases_queue_p): Likewise.
7600         * search.c (dfs_mark_primary_bases): Adjust.
7601         (mark_primary_bases): Likewise.
7602         (get_shared_vbase_if_not_primary): New function.
7603         (dfs_unmarked_real_bases_queue_p): Likewise.
7604         (dfs_marked_real_bases_queue_p): Likewise.
7605         (dfs_get_pure_virtuals): Simplify.
7606         (get_pure_virtuals): Likewise.
7608 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7610         * lex.c: Include tm_p.h.
7612 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
7614         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
7616 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
7618         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
7619         * pt.c (instantiate_decl): Defer comdat templates that might not be
7620         needed.
7622         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
7623         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
7624         (finish_file): Likewise.
7626         * decl2.c (import_export_class): Undo 12/14 change.
7628         * error.c (dump_decl): operator new, not operatornew.
7630         * class.c (field_decl_cmp): A nontype is "greater" than a type.
7631         * search.c (lookup_field_1): Look for the last field with the
7632         desired name.
7634 2000-01-05  Nathan Sidwell  <nathan@acm.org>
7636         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
7637         FUNCTION_DECL.
7639 2000-01-05  Nathan Sidwell  <nathan@acm.org>
7641         * typeck.c (build_static_cast): Don't strip target qualifiers
7642         when casting from a class.
7644 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7646         * class.c (warn_hidden): Initialize variable `fndecl'.
7648 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
7650         * decl.c (flag_isoc9x): New variable to be able to use code in
7651         c-common.c.  For now always zero.
7653 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
7655         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
7656         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
7657         or unshare_base_binfos for virtual bases here.
7658         * search.c (dfs_get_vbase_types): Do it here.
7659         (get_vbase_types): Adjust.
7661 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
7663         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
7664         (BINFO_PRIMARY_MARKED_P): Use flag 5.
7665         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
7666         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7667         (unmark_primary_bases): Remove declaration.
7668         (unmarkedp): Declare.
7669         (dfs_vbase_unmark): Likewise.
7670         * class.c (determine_primary_base): Return immediately if there
7671         are no base classes.  Call mark_primary_bases here.
7672         (modify_all_direct_vtables): Remove.
7673         (modify_all_indirect_vtables): Remove.
7674         (dfs_modify_vtables_queue_p): New function.
7675         (dfs_modify_vtables): New function.
7676         (modify_all_vtables): Use them.
7677         (build_base_fields): Build FIELD_DECLs for primary virtual base
7678         classes.
7679         (create_vtable_ptr): Don't call determine_primary_base here.
7680         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
7681         (dfs_set_offset_for_vbases): ... this.
7682         (layout_virtual_bases): Use it.
7683         (layout_class_type): Call determine_primary_base here.
7684         * search.c (unmarkedp): Make it global.
7685         (shared_marked_p): Simplify.
7686         (shared_unmarked_p): Likewise.
7687         (dfs_primary_bases_queue_p): Remove.
7688         (dfs_unmark_primary_bases): Likewise.
7689         (unmark_primary_bases): Likewise.
7690         (mark_primary_bases): Simplify.
7691         (get_pure_virtuals): Don't call mark_primary_bases here.
7692         (dfs_vbase_unmark): New function.
7693         (get_vbase_types): Simplify.
7695         * class.c (struct base_info): Remove.
7696         (determine_primary_base): Take has_virtual_p rather than a
7697         base_info as input.  Don't calculate max_has_virtual.
7698         (finish_struct_bits): Remove max_has_virtual argument.
7699         (create_vtable_ptr): Remove max_has_virtual_p argument.
7700         (layout_virtual_bases): Remove max argument.
7701         (layout_basetypes): Likewise.
7702         (layout_class_type): Remove max_has_virtual_p argument.
7703         (finish_struct_1): Remove max_has_virtual.
7705         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
7706         (layout_basetypes): Remove.
7707         * class.c (propagate_binfo_offsets): Moved here from tree.c.
7708         Update to handle primary virtual bases.
7709         (remove_base_fields): New function, split out from
7710         layout_basetypes.
7711         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
7712         (layout_virtual_bases): New function, split out from
7713         layout_basetypes.  Update to handle primary virtual bases.
7714         (layout_basetypes): Moved here from tree.c.  Use
7715         remove_base_fields and layout_virtual_bases.
7716         * search.c (dfs_mark_primary_bases_queue_p): New function.
7717         (mark_primary_bases): Use it.
7718         * tree.c (CEIL): Remove.
7719         (propagate_binfo_offsets): Remove.
7720         (layout_basetypes): Remove.
7722 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
7724         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
7725         (BINFO_PRIMARY_MARKED_P): New macro.
7726         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
7727         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7728         (mark_primary_bases): New function.
7729         (unmark_primary_bases): Likewise.
7730         * search.c (get_abstract_virtuals_1): Remove.
7731         (dfs_mark_primary_bases): New function.
7732         (mark_primary_bases): Likewise.
7733         (dfs_unmark_primary_bases): Likewise.
7734         (unmark_primary_bases): Likewise.
7735         (dfs_get_pure_virtuals): Likewise.
7737 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
7739         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
7740         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
7741         (modify_one_vtable): Adjust.
7742         (fixup_vtable_deltas1): Likewise.
7743         (override_one_vtable): Likewise.
7744         * search.c (get_abstract_virtuals_1): Likewise.
7745         (get_pure_virtuals): Likewise.
7746         (expand_upcast_fixups): Likewise.
7747         * tree.c (debug_binfo): Likewise.
7749         * class.c (build_vtable): Don't return a value.  Don't rebuild
7750         vtables for bases that have already been handled.
7751         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
7752         already been handled.
7753         (modify_one_vtable): Adjust accordingly.
7754         (fixup_vtable_deltas1): Likewise.
7755         (finish_struct_1): Likewise.
7757 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
7759         * call.c (build_new_method_call): Also check destructors.