cp:
[official-gcc.git] / gcc / cp / ChangeLog
blob389b9fc2dd41dda3f9fef0e901d178efe357899e
1 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
3         * typeck.c (build_static_cast): Allow enum to enum conversions
4         as per DR 128.
6 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
8         * class.c (check_field_decls): Pointers to member do not a
9         non-pod struct make, as per DR 148.
11 2001-03-02  Nathan Sidwell  <nathan@codesourcery.com>
13         * call.c (joust): cp_pedwarn when using gnu extension concerning
14         worst conversion sequences.
16 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
18         * decl.c: Replace all uses of 'boolean' with 'bool'.
20 2001-03-01  Zack Weinberg  <zackw@stanford.edu>
22         * lang-specs.h: Add zero initializer for cpp_spec field to
23         all array elements that need one.  Don't put an #ifdef inside
24         the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
25         use it.
27 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
29         Implement using decls inside template functions.
30         * decl2.c (validate_nonmember_using_decl): Don't special case
31         fake_std_node in the global namespace. Don't reject early when
32         processing a template.
33         (do_local_using_decl): Add to statement tree. Don't do further
34         processing when building a template.
35         * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
37 2001-03-01  Nathan Sidwell  <nathan@codesourcery.com>
39         * decl2.c (do_nonmember_using_decl): Don't complain if we find
40         same function. Do complain about ambiguating extern "C"
41         declarations.
43 2001-02-28  Nathan Sidwell  <nathan@codesourcery.com>
45         Remove floating point and complex type template constant parms.
46         * pt.c (convert_nontype_argument): Remove REAL_TYPE and
47         COMPLEX_TYPE extensions.
48         (invalid_nontype_parm_type_p): Likewise.
50 2001-02-27  Jeffrey Oldham  <oldham@codesourcery.com>
52         * except.c (call_eh_info): Revert "match_function"'s type.
54 2001-02-27  Nathan Sidwell  <nathan@codesourcery.com>
56         Fix ctor vtable vcall offsets.
57         * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
58         (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
59         (get_matching_base): Remove.
60         (get_original_base): New function.
61         (build_vtbl_initializer): Initialize vid.rtti_binfo. 
62         Use a virtual thunk for a ctor vtable with an index
63         (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
64         primary base within a constructor vtable. Only set
65         BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
66         when primary base has been lost.
67         * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
69 2001-02-26  Jeffrey Oldham  <oldham@codesourcery.com>
71         * call.c (joust): Ensure more_specialized()'s argument length
72         parameter has correct value for constructors.
74 2001-02-26  Nathan Sidwell  <nathan@codesourcery.com>
76         * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
77         
78         * decl.c (mark_inlined_fns): Prototype.
80 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
82         * spew.c (yylex): Correct handling of friends.
84 2001-02-22  Mark Mitchell  <mark@codesourcery.com>
86         * mangle.c (write_encoding): Pass write_function_type the
87         FUNCTION_DECL for the function being encoded.
88         (write_function_type): Pass it along to write_bare_function_type.
89         (write_bare_function_type): Pass it along to write_method_parms.
90         (write_method_parms): Don't mangle the compiler-generated
91         parameters to a constructor or destructor.
93 2001-02-22  Andreas Jaeger  <aj@suse.de>
95         * optimize.c: Include toplev.h for
96         note_deferral_of_defined_inline_function prototype.
98 2001-02-22  Jakub Jelinek  <jakub@redhat.com>
100         * cp-tree.h (struct lang_decl_inlined_fns): New.
101         (struct lang_decls): Add inlined_fns.
102         (DECL_INLINED_FNS): New macro.
103         * optimize.c (struct inline_data): Add inlined_fns.
104         (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
105         (inlinable_function_p): Likewise, fix typo in comment,
106         function is not inlinable if it already inlined function currently
107         being optimized.
108         (expand_call_inline): Add fn to inlined_fns if neccessary.
109         (optimize_function): Initialize inlined_fns.
110         Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
111         * decl.c (mark_inlined_fns): New function.
112         (lang_mark_tree): Call it.
114 2001-02-21  Jason Merrill  <jason@redhat.com>
116         * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
117         (DECL_UNINLINABLE): Move to middle-end.
119         * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
120         * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
121         * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
122         * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
123         parms and outer BLOCK.  note_deferral_of_defined_inline_function.
125         * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
126         second parm of op=.
128 2001-02-19  Mark Mitchell  <mark@codesourcery.com>
130         * decl2.c (set_decl_namespace): Allow explicit instantiations in
131         any namespace.
133 2001-02-18  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
135         * optimize.c (expand_call_inline): Don't walk subtrees of type
136         nodes.
138 2001-02-18  Mark Mitchell  <mark@codesourcery.com>
140         * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
141         for a destructor.
143 2001-02-18  Jason Merrill  <jason@redhat.com>
145         Do put the VTT parameter in DECL_ARGUMENTS.
146         * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
147         (current_vtt_parm): New macro.
148         (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
149         (DECL_HAS_VTT_PARM_P): New macro.
150         (DECL_VTT_PARM): Remove.
151         (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
152         * decl.c (duplicate_decls): Only copy the operator code if
153         appropriate.
154         (start_function): Set current_vtt_parm.
155         (lang_mark_tree): Don't mark vtt_parm.
156         * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
157         DECL_ARGUMENTS.  Set DECL_HAS_VTT_PARM_P.
158         * class.c (build_clone): Maybe remove the VTT parm.
159         * optimize.c (maybe_clone_body): Set up the VTT parm.
160         * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
161         * call.c (build_over_call): Just allow the VTT arg.
162         * method.c (make_thunk): Don't set DECL_VTT_PARM.
163         (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
164         (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
165         * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
166         * error.c (dump_function_decl): Likewise.
167         * call.c (build_user_type_conversion_1, convert_like_real): Abort
168         if we try to call a constructor with in-charge or VTT parms.
169         * method.c (skip_artificial_parms_for): New fn.
170         * call.c (add_function_candidate, build_over_call): Call it.
171         * call.c (build_new_method_call): Use current_vtt_parm.
172         * init.c (expand_virtual_init): Likewise.
173         * class.c (same_signature_p): No longer static.
174         * cp-tree.h: Declare it.
175         * search.c (look_for_overrides_r): Use it.
177 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
179         * cp-tree.h (new_abi_rtti_p): Remove.
180         (name_mangling_version): Likewise.
181         (flag_do_squangling): Likewise.
182         * class.c (build_rtti_vtbl_entries): Remove old ABI support.
183         * decl.c (grokfndecl): Likewise.
184         * decl2.c (name_mangling_version): Remove.
185         (flag_do_squangling): Likewise.
186         (lang_f_options): Remove `squangle'.
187         (unsupported_options): Add `squangle'.
188         (cxx_decode_option): Issue a warning about uses of
189         -fname-mangling-version.
190         (finish_file): Remove old ABI support.
191         * pt.c (check_explicit_specialization): Likewise.
192         (tsubst_decl): Likewise.
193         * rtti.c (init_rtti_processing): Likewise.
194         (build_headof): Likewise.
195         (get_tinfo_decl_dynamic): Likewise.
196         (tinfo_from_decl): Likewise.
197         (build_dynamic_cast_1): Likewise.
198         (synthesize_tinfo_var): Likewise.
199         * init.c (build_new): Allow enumeration types for the array-bounds
200         in a direct-new-declarator.
202         * semantics.c (finish_typeof): Resolve OFFSET_REFs.
204         * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
205         TREE_PROTECTED from the template being specialized.
207 2001-02-17  Jason Merrill  <jason@redhat.com>
209         * decl2.c (build_artificial_parm): Set TREE_READONLY.
211         * decl.c (bad_specifiers): Allow throw specs on things with
212         pointer-to-function or -member-function type.
213         * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
214         a pmf.
216 2001-02-17  Mark Mitchell  <mark@codesourcery.com>
218         * call.c (check_dtor_name): Handle template names correctly.
220 2001-02-16  Jason Merrill  <jason@redhat.com>
222         * cp-tree.h (DECL_USE_VTT_PARM): Remove.
223         * decl2.c (maybe_retrofit_in_chrg): Don't create it.
224         * optimize.c (maybe_clone_body): Don't substitute it.
225         * call.c (build_new_method_call): Check in_chrg instead.
226         * init.c (expand_virtual_init): Likewise.
228 2001-02-16  Gabriel Dos Reis  <gdr@codesourcery.com>
230         * decl.c (check_tag_decl): Make sure a typedef for an anonymous
231         class-type introduces at least a type-name.
233 2001-02-16  Jakub Jelinek  <jakub@redhat.com>
235         * call.c (convert_like_real): Create a temporary for non-lvalue.
237 2001-02-16  Jeffrey Oldham  <oldham@codesourcery.com>
239         * cp-tree.h: Fix typos in comments.
241 2001-02-16  Jason Merrill  <jason@redhat.com>
243         * optimize.c (remap_block): If we're compiling a clone, pass the
244         new block to insert_block.
246 2001-02-16  Mark Mitchell  <mark@codesourcery.com>
248         * semantics.c (finish_asm_stmt): Robustify.
250 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
252         * pt.c (push_template_decl_real): Don't remangle the name of a
253         class template.
255 2001-02-15  Jim Meyering  <meyering@lucent.com>
257         * Make-lang.in (c++.install-common): Depend on installdirs.
258         (c++.install-info): Likewise.
259         (c++.install-man): Likewise.
261 2001-02-15  Mark Mitchell  <mark@codesourcery.com>
263         * typeck2.c (build_m_component_ref): Robustify.
265 2001-02-15  Alexandre Oliva  <aoliva@redhat.com>
267         * friend.c (do_friend): Don't take the nested [template] class
268         into account when deciding whether to warn about the friend
269         function not referring to a template function.
271 2001-02-14  Jakub Jelinek  <jakub@redhat.com>
273         * typeck.c (build_unary_op): Clarify error message.
275 2001-02-08  Aldy Hernandez  <aldyh@redhat.com>
277         * parse.y (component_constructor_declarator): allow optional
278         parentheses around constructor class name.
280 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
282         * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
283         section.
284         * init.c (emit_base_init): Remove incorrect comment about
285         virtual bases.
286         * method.c (make_thunk): Fix comment alignment.
288 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
290         Kill remnants of this is variable.
291         * cp-tree.h (flag_this_is_variable): Remove.
292         * decl2.c (flag_this_is_variable): Remove.
293         * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
294         (build_vbase_path): The path is non-static, even in a cdtor.
295         (resolves_to_fixed_type_p): Add additional return value.
296         * search.c (init_vbase_pointers): Adjust.
297         * tree.c (lvalue_p_1): Adjust.
298         * typeck.c (mark_addressable): Adjust.
300 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
302         * pt.c (unify): Don't check cv quals of array types.
304 2001-02-14  Nathan Sidwell  <nathan@codesourcery.com>
306         * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
307         check whether we already have the type.
309 2001-02-13  Mark Mitchell  <mark@codesourcery.com>
311         * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
312         * call.c (build_op_delete_call): Simplify to remove duplicate
313         code.
314         * class.c (clone_function_decl): Don't build the deleting variant
315         of a non-virtual destructor.
316         * decl.c (finish_destructor_body): Don't call delete if this is a
317         non-virtual destructor.
318         * init.c (build_delete): Explicitly call `operator delete' when
319         deleting an object with a non-virtual destructor.
321 2001-02-13  Jason Merrill  <jason@redhat.com>
323         * lang-specs.h: Add more __EXCEPTIONS.
325 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
327         * typeck2.c (process_init_constructor): Check
328         TREE_HAS_CONSTRUCTOR before issuing missing init warning.
330 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
332         * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
333         Remove spurious information in comment. Allow further
334         adjustments of REFERENCE_TYPE args.
336 2001-02-12  Nathan Sidwell  <nathan@codesourcery.com>
338         * errfn.c (cp_deprecated): Tweak diagnostic text.
339         * parse.y (new_initializer): Deprecate initializer lists
340         extension.
342 2001-02-12  Mark Mitchell  <mark@codesourcery.com>
344         Remove old ABI support.
346 2001-02-11  Mark Mitchell  <mark@codesourcery.com>
348         * decl2.c (flag_vtable_thunks): Always set it to 1.
349         (flag_new_abi): Likewise.
350         * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
352         * Makefile.in (g++spec.o): Fix typo.
354 2001-02-09  Jason Merrill  <jason@redhat.com>
356         * lang-specs.h: Restore definition of __EXCEPTIONS.
358 2001-02-08  Jason Merrill  <jason@redhat.com>
360         * search.c (shared_member_p): New function.
361         (lookup_field_r): Use it.
362         * cp-tree.h (SHARED_MEMBER_P): Remove.
364         * method.c (process_overload_item): Handle template-dependent array
365         bounds.
366         * pt.c (type_unification_real): If we end up with undeduced nontype
367         parms, try again.
369         * decl.c (lookup_name_real): Tweak warning to refer to decls, not
370         types.
372         * typeck2.c (friendly_abort): Don't say anything if we have
373         earlier errors or sorries.
375         * decl.c (check_tag_decl): Notice attempts to redefine bool and
376         wchar_t.  Ignore if in_system_header.
378         * decl.c (maybe_push_cleanup_level): New fn...
379         (start_decl_1): ...split out from here.
380         * cvt.c (build_up_reference): Use it.
381         * cp-tree.h: Declare it.
383 2001-02-07  Mark Mitchell  <mark@codesourcery.com>
385         * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
386         spec.
388 2001-02-06  Nathan Sidwell  <nathan@codesourcery.com>
390         * pt.c (lookup_template_class): Make sure it's a primary
391         template or template_template_parm when called from the parser.
392         (instantiate_template_class): Add assertion.
394 2001-02-05  Alexandre Oliva  <aoliva@redhat.com>
396         * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
397         from error_mark_node.
399 2001-02-05  Nathan Sidwell  <nathan@codesourcery.com>
401         Fix specification and implementation bugs in V3 ABI
402         construction vtables.
403         * cp-tree.h (flag_dump_class_layout): New flag.
404         (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
405         (BINFO_LOST_PRIMARY_P): New flag.
406         (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
407         (BINFO_PRIMARY_MARKED_P): Rename to ...
408         (BINFO_PRIMARY_P): ... here.
409         (binfo_via_virtual): New prototype.
410         * decl2.c (flag_dump_class_layout): New flag.
411         (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
412         use `=' as a file name separator.
413         * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
414         bases.
415         (build_vtbl_address): If this is a virtual primary base, then
416         get the vtbl of what it is ultimately primary for.
417         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
418         for BINFO_PRIMARY_P.
419         (dfs_skip_nonprimary_vbases_markedp): Likewise.
420         (get_shared_vbase_if_not_primary): Likewise.
421         (dfs_get_pure_virtuals): Likewise.
422         (expand_upcast_fixups): Likewise.
423         (fixup_virtual_upcast_offsets): Likewise.
424         (dfs_find_vbase_instance): Likewise.
425         (find_vbase_instance): Likewise.
426         (binfo_from_vbase): Adjust comment to reflect reality.
427         (binfo_via_virtual): New function.
428         * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
429         for binfo walking during VTT construction.
430         (dfs_mark_primary_bases): Remove.
431         (force_canonical_binfo_r): New function.
432         (force_canonical_binfo): New function.
433         (mark_primary_virtual_base): New function.
434         (mark_primary_bases): Walk in inheritance graph order, use
435         mark_primary_virtual_base.
436         (determine_primary_base): Use some more intermediate variables.
437         (dfs_find_final_overrider): Don't check for overriding along a
438         virtual path.
439         (dfs_modify_vtables): Walk into primary virtual bases too.
440         (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
441         (build_base_fields): Likewise.
442         (dfs_set_offset_for_unshared_vbases): Likewise.
443         (layout_virtual_bases): Likewise.
444         (end_of_class): Likewise.
445         (finish_struct_1): Call dump_class_hierarchy, if requested.
446         (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
447         (dump_class_hierarchy_r): Add stream parameter. Emit more information.
448         (dump_class_hierarchy): Add file parameter. Append to file, if
449         required.
450         (finish_vtbls): Adjust accumulate_vtbl_inits call.
451         Use canonical base for virtual bases.
452         (build_vtt): Add more comments. Adjust build_vtt_inits call.
453         (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
454         Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
455         VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
456         virtual VTTs.
457         (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
458         from DATA.  We want virtual primary bases and all bases via virtual.
459         Only set BINFO_VPTR_INDEX for top level. Look up from a primary
460         virtual base when not a construction vtable.
461         (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
462         (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
463         Use canonical bases when processing virtual bases.
464         (accumulate_vtbl_inits): We're interested in any base via a
465         virtual path.
466         (dfs_accumulate_vtbl_inits): If this is a primary virtual base
467         within a construction vtable, determine what is being overridden.
468         (build_vtbl_initializer): Add more comments
469         (add_vcall_offset_vtbl_entries_1): Adjust comment.
470         (build_rtti_vtbl_entries): Check if the base has lost its
471         primary.
473 2001-02-05  Mark Mitchell  <mark@codesourcery.com>
475         * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
477 Sun Feb  4 15:52:44 2001  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
479         * decl.c (pushdecl): Call abort instead of fatal.
480         * except.c (decl_is_java_type): Call fatal_error instead of fatal.
481         * init.c (build_new_1): Likewise.
482         (build_java_class_ref): Call internal_error and fatal_error, not fatal.
483         * decl.c (build_typename_type): hash_table_init now returns void.
484         decl.c (init_decl_processing): Make an error non-fatal.
486 2001-02-04  Mark Mitchell  <mark@codesourcery.com>
488         * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
489         Document.
490         (CLASSTYPE_INTERFACE_KNOWN): Likewise.
491         (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
492         (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
493         (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
494         * decl.c (maybe_commonize_var): Use the new name-mangling where
495         appropriate.
496         * decl2.c (comdat_linkage): Enhance comments.  Make all
497         compiler-generated things static, if COMDAT is not available.
498         (get_tinfo_decl): Do not make typeinfo objects that belong in the
499         library COMDAT.
500         (tinfo_base_init): Use the correct mangled name for typeinfo
501         strings, and push them into the global scope.
502         (typeinfo_in_lib_p): New function.
503         (synthesize_tinfo_var): Use it.
504         (create_real_tinfo_var): Likewise.
506 2001-02-03  Jakub Jelinek  <jakub@redhat.com>
508         * decl.c (push_class_binding): Use context_for_name_lookup instead
509         of CP_DECL_CONTEXT.
510         * search.c (context_for_name_lookup): Remove static.  Check for NULL
511         context in the loop.
512         * cp-tree.h (context_for_name_lookup): Add prototype.
514 2001-02-02  Jakub Jelinek  <jakub@redhat.com>
516         * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
517         * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
518         Remove.
519         * call.c (convert_class_to_reference, build_user_type_conversion_1,
520         add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
522 2001-02-02  Mark Mitchell  <mark@codesourcery.com>
524         * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
525         of macros used when compiling g++spec.c.
526         * g++spec.c (lang_specific_driver): Link with the shared
527         libgcc by default.
529 2001-01-29  Joseph S. Myers  <jsm28@cam.ac.uk>
531         * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
532         make_reference_declarator, make_call_declarator), method.c
533         (implicitly_declare_fn), parse.y (namespace_using_decl,
534         notype_unqualified_id, expr_or_declarator, new_type_id,
535         after_type_declarator, direct_after_type_declarator,
536         notype_declarator, complex_notype_declarator,
537         complex_direct_notype_declarator, qualified_id,
538         notype_qualified_id, overqualified_id, direct_new_declarator,
539         absdcl, direct_abstract_declarator, conversion_declarator), pt.c
540         (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
541         instead of build_parse_node.
543 2001-01-28  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
545         * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
546         (minus_one_node): Moved to top level gcc directory.  Renamed
547         to integer_minus_one_node.
549         * init.c (init_init_processing): Don't set minus_one_node.
550         (build_vec_init): Use integer_minus_one_node.
552         * rtti.c (get_tinfo_decl_dynamic): Likewise.
554 2001-01-28  Jakub Jelinek  <jakub@redhat.com>
556         * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
557         identical and they would be replaced with constant, remove
558         MODIFY_EXPR from the tree.
560 2001-01-27  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
562         * Make-lang.in: Remove all dependencies on defaults.h.
563         * call.c: Don't include defaults.h.
564         * decl.c: Likewise.
565         * decl2.c: Likewise.
566         * except.c: Likewise.
567         * pt.c: Likewise.
568         * rtti.c: Likewise.
569         * tree.c: Likewise.
570         * typeck.c: Likewise.
572 2001-01-25  Jakub Jelinek  <jakub@redhat.com>
574         * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
575         operators even in "C" linkage.
576         * method.c (set_mangled_name_for_decl): Likewise.
577         * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
578         overloaded operators in "C" linkage.
580 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
582         * pt.c (tsubst_decl): Remove IN_DECL parameter.
583         (tsubst_arg_types): Check parameter is not void.
584         (tsubst): Adjust tsubst_decl call.
586 2001-01-24  Nathan Sidwell  <nathan@codesourcery.com>
588         * call.c (add_builtin_candidate): Quote std properly, from
589         previous change.
591 2001-01-23  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
593         * pt.c (check_explicit_specialization): Clone constructors and
594         destructors.
596 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
598         * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
599         indicates anything special about template depth. Make sure we
600         only count the user visible template classes.
602 2001-01-23  Nathan Sidwell  <nathan@codesourcery.com>
604         * call.c (build_conv): Typo in comment.
605         (add_builtin_candidate): Add more explanation.
606         Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
607         Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
608         when we have enumeral types.
609         (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
610         candidates for relops and eqops.
611         (joust): Simplify control flow. Allow a non-template user
612         function to hide a builtin.
614 2001-01-22  Nathan Sidwell  <nathan@codesourcery.com>
616         * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
617         (more_specialized): Add deduction parameter.
618         * call.c (joust): Adjust more_specialized call.
619         * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
620         UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
621         (get_bindings_order): Remove.
622         (get_bindings_real): Add DEDUCE parameter.
623         (maybe_adjust_types_for_deduction): Return extra unify flags. Do
624         REFERENCE_TYPE jig for DEDUCE_ORDER.
625         (type_unification_real): Deal with DEDUCE_ORDER. Use result of
626         maybe_adjust_types_for_deduction.
627         (more_specialized): Add DEDUCE parameter. Call get_bindings_real
628         directly.
629         (try_one_overload): Use result of maybe_adjust_types_for_deduction.
630         (check_cv_quals_for_unify): Use new unify qualifier flags.
631         (unify): Clear new unify qualifier flags.
632         (get_bindings_real): Add DEDUCE parameter.
633         (get_bindings): Adjust call to get_bindings_real.
634         (get_bindings_overload): Likewise.
635         (most_specialized_instantiation): Adjust call to
636         more_specialized.
638 2001-01-19  Jason Merrill  <jason@redhat.com>
640         * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
642         * decl.c (init_decl_processing): Just force -fvtable-thunks on if
643         -fnew-abi.
645 2001-01-19  Ute Pelkmann  <scope.muc@t-online.de>
647         * decl2.c (arg_assoc_class): Fix double iteration logic.
649 2001-01-19  Jason Merrill  <jason@redhat.com>
651         * init.c (build_delete): Always call convert_force to strip cv-quals.
653         * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
654         * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
655         * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
657 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
659         * search.c (get_vbase_1): Count only virtual bases.
661 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
663         * class.c (duplicate_tag_error): Robustify flag clearing.
665 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
667         * cp-tree.h (lookup_template_class): Add complain parm.
668         * decl.c (lookup_namespace_name): Adjust call to
669         lookup_template_class.
670         (make_typename_type): Likewise.
671         * semantics.c (finish_template_type): Likewise.
672         * pt.c (lookup_template_class): Add complain parm. Adjust.
673         (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
674         (tsubst): Likewise.
676 2001-01-19  Nathan Sidwell  <nathan@codesourcery.com>
678         * pt.c (copy_default_args_to_explicit_spec): Preserve
679         object's CV quals. Reorganize.
681 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
683         * typeck.c (build_modify_expr): Say `initialization' for
684         INIT_EXPRs.
685         * init.c (build_default_init): Convert to enumeral type, if
686         needed.
688 2001-01-18  Jakub Jelinek  <jakub@redhat.com>
690         * parse.y (nomods_initdcl0): Properly set things up for
691         initdcl0_innards.
693 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
695         * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
696         (type_unification_real): Set it.
697         (unify): Use it.
699 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
701         * decl.c (finish_destructor_body): Convert to vbase pointer here.
703 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
705         * semantics.c (begin_class_definition): Check we're not inside a
706         template parm list.
708 2001-01-18  Nathan Sidwell  <nathan@codesourcery.com>
710         * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
711         BASELINK_P.
713 2001-01-16  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
715         * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
716         * call.c (build_over_call): Add comment.
718 2001-01-16 Daniel Berlin <dberlin@redhat.com>
720         * cvt.c (ocp_convert): Handle vector type conversion
721         * typeck2.c (digest_init): Handle vector type initializations
723 2001-01-16  Phil Edwards  <pme@sources.redhat.com>
725         * g++spec.c:  Don't add libraries needlessly if -fsyntax-only
726           was given.
728 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
730         * pt.c (check_nontype_parm): Rename to ...
731         (invalid_nontype_parm_type_p): ... here.
732         (process_template_parm): Adjust.
733         (convert_template_argument): Adjust.
735 2001-01-15  Nathan Sidwell  <nathan@codesourcery.com>
737         * pt.c (check_nontype_parm): New function.
738         (process_template_parm): Use it.
739         (convert_template_argument): Use it.
740         (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
741         member.
743 2001-01-14  Jeffrey Oldham  <oldham@codesourcery.com>
745         * tree.c: Add defaults.h
746         (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
747         * Make-lang.in (cp/tree.o): Add defaults.h.
749 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
751         * Make-lang.in (CXX_C_OBJS): Add c-format.o.
753 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
755         * g++.1: Change to be ".so man1/gcc.1".
757 2001-01-13  Joseph S. Myers  <jsm28@cam.ac.uk>
759         * Make-lang.in (c++.info, c++.install-info): Build and install g++
760         internals info.
761         (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
762         ($(srcdir)/cp/g++int.info): New target.
763         * gxxint.texi: Add info directory entry.  Use @@ in email address.
764         * .cvsignore: Update.
766 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
768         * typeck.c (build_c_cast): Do template processing earlier.
769         Always pedwarn on array casts.
771 2001-01-12  Nathan Sidwell  <nathan@codesourcery.com>
773         * friend.c (make_friend_class): Make sure a templated class is
774         actually a template.
776 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
778         * decl2.c (get_guard): Set linkage from guarded decl.
780 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
782         * call.c (convert_default_arg): Check for unprocessed
783         DEFAULT_ARG.
784         * cp-tree.h (replace_defarg): Move to spew.c.
785         (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
786         spew.c, which is where they really are.
787         (done_pending_defargs): Declare.
788         (unprocessed_defarg_fn): Declare.
789         * decl.c (replace_defarg): Move to spew.c
790         * parse.y (structsp): Call done_pending_defargs.
791         * spew.c (defarg_fns): Rearrange list structure.
792         (defarg_fnsdone): New static variable.
793         (defarg_depfns): New static variable.
794         (init_spew): Adjust.
795         (add_defarg_fn): Store the type in TREE_TYPE.
796         (do_pending_defargs): Detect and deal with ordering constraints
797         and circularity.
798         (done_pending_defargs): New function.
799         (unprocessed_defarg_fn): New function.
800         (replace_defarg): Moved from decl.c. Robustify. Don't save
801         if circularity detected.
803 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
805         * pt.c (unify): Check array has a domain, before checking
806         whether it is variable sized.
808 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
810         * decl.c (grokparms): Unobfuscate and get correct diagnostic for
811         parameters with pointers to arrays of unknown bound.
813 2001-01-11  Nathan Sidwell  <nathan@codesourcery.com>
815         * parse.y (template_parm_header, template_spec_header): New
816         reductions. Split out from ...
817         (template_header): ... here. Use them.
818         (template_template_parm): Use template_parm_header.
819         * semantics.c (finish_template_template_parm): Add assert.
821 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
823         * mangle.c (write_builtin_type): Fix thinko.
825         * pt.c (copy_default_args_to_explicit_spec_1): New function.
826         (copy_default_args_to_explicit_spec): Likewise.
827         (check_explicit_specialization): Use it.
829         * class.c (finish_struct_1):  Remove last argument in call to
830         make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
831         * decl.c (builtin_function): Likewise.
832         (build_cp_library_fn): Likewise.
833         (check_initializer): Likewise.
834         (make_rtl_for_nonlocal_decl): Likewise.
835         (cp_finish_decl): Likewise.
836         (start_function): Likewise.
837         * decl2.c (finish_anon_union): Likewise.
838         * friend.c (do_friend): Likewise.
839         * init.c (build_java_class_ref): Likewise.
840         * method.c (make_thunk): Likewise.
841         * pt.c (tsubst_friend_function): Likewise.
842         * semantics.c (expand_body): Likewise.
844 2001-01-10  Mark Mitchell  <mark@codesourcery.com>
846         * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
847         looking at DECL_CLONED_FUNCTION for non-functions.
849 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
851         * error.c (dump_template_parameter): Use parm to determine how
852         to print default value.
854 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
856         * class.c (duplicate_tag_error): Clear more flags.
858 2001-01-10  Nathan Sidwell  <nathan@codesourcery.com>
860         * call.c (build_new_method_call): Use binfo_for_vbase.
862 2001-01-10  Joseph S. Myers  <jsm28@cam.ac.uk>
864         * cp-tree.h (flag_cond_mismatch): Don't declare.
865         * decl2.c (flag_cond_mismatch): Don't define.
866         (lang_f_options): Remove cond-mismatch.
867         (unsupported_options): Add cond-mismatch.
869 2001-01-09  Nathan Sidwell  <nathan@codesourcery.com>
871         * class.c (handle_using_decl): Reject using of constructor name
872         of sourcing class. Allow injecting of a method with same name as
873         nested class. Fixup error messages.
875 2001-01-09  Joseph S. Myers  <jsm28@cam.ac.uk>
877         * decl2.c (lang_decode_option): Handle -Wformat=2.
879 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
881         * cp-tree.h (lang_decl_flags): Rename defined_in_class to
882         initialized_in_class.
883         (DECL_DEFINED_IN_CLASS_P): Rename to ...
884         (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
885         * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
886         (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
887         * pt.c (check_default_tmpl_args): Adjust for
888         DECL_INITIALIZED_IN_CLASS_P.
889         (instantiate_class_template): Likewise.
890         (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
892         * class.c (finish_struct): Constify saved_filename.
894 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
896         * class.c (duplicate_tag_error): Adjust diagnostic.
897         (finish_struct): Locally set location to start of struct.
898         * decl.c (fixup_anonymous_aggr): Use cp_error_at.
900 2001-01-08  Nathan Sidwell  <nathan@codesourcery.com>
902         * decl.c (struct binding_level): Adjust class_shadowed comments
903         to reflect reality.
904         (push_class_level_binding): Ajust comments to reflect reality.
905         Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
906         Don't set TREE_VALUE on the class_shadowed list.
908 2001-01-07  Alexandre Petit-Bianco  <apbianco@cygnus.com>
910         * decl2.c (acceptable_java_type): Allow references too.
911         * init.c (build_java_class_ref): When using the new ABI, search
912         `class$' and have it mangled with `mangle_decl.'
913         * mangle.c (write_java_integer_type_codes): New function.
914         (write_builtin_type): Detect and mangle Java integer and real
915         types.
917 2001-01-07  Mark Mitchell  <mark@codesourcery.com>
919         * decl2.c (grokfield): Don't accept `asm' specifiers for
920         non-static data members.
922 2001-01-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
924         * expr.c (cplus_expand_expr): Don't reset `target'.
926 2001-01-07  Neil Booth  <neil@daikokuya.demon.co.uk>
928         * cp/decl2.c (cxx_post_options): Call cpp_post_options.
930 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
932         * parse.y (template_datadef): Check for error_mark_node.
934 2001-01-05  Nathan Sidwell  <nathan@codesourcery.com>
936         * cp-tree.def (DEFAULT_ARG): Make `x' class.
938 2001-01-04  Joseph S. Myers  <jsm28@cam.ac.uk>
940         * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
941         (record_builtin_type): Make non-static.
942         (flag_short_double): Don't declare.
943         (init_decl_processing): Remove the creation of many tree nodes now
944         in c_common_nodes_and_builtins.
945         (build_void_list_node): New function.
946         * decl2.c (flag_short_double, flag_short_wchar): Don't define.
947         * cp-tree.h (flag_short_wchar): Don't declare.
949 2001-01-04  Mark Mitchell  <mark@codesourcery.com>
951         * call.c (build_conv): Don't use build1 for USER_CONV.
952         * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
954 2001-01-03  Joseph S. Myers  <jsm28@cam.ac.uk>
956         * lex.c (lang_init): Call c_common_lang_init.
958 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
960         * search.c (lookup_fnfields_here): Remove.
961         (look_for_overrides_r): Use lookup_fnfields_1.
962         Ignore functions from using declarations.
964 2001-01-03  Nathan Sidwell  <nathan@codesourcery.com>
966         Implement exceptions specifiers for implicit member functions.
967         * cp-tree.h (merge_exceptions_specifiers): Declare new function.
968         * method.c (synthesize_exception_spec): New function.
969         (locate_dtor, locate_ctor, locate_copy): New functions.
970         (implicitly_declare_fn): Generate the exception spec too.
971         * search.c (check_final_overrider): Check artificial functions
972         too.
973         * typeck2.c (merge_exception_specifiers): New function.
975 2001-01-03  Jason Merrill  <jason@redhat.com>
977         * init.c (build_default_init): New fn.
978         (perform_member_init): Split out from here.
979         (build_new_1): Use it.  Simplify initialization logic.
980         (build_vec_init): Take an array, rather than a pointer and maxindex.
981         Speed up simple initializations.  Don't clean up if we're assigning.
982         * cp-tree.h: Adjust.
983         * decl2.c (do_static_initialization): Remove TREE_VEC case.
984         * parse.y (new_initializer): Return void_zero_node for ().
985         * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
986         * typeck2.c (digest_init): Only complain about user-written
987         CONSTRUCTORs.
989 2000-12-22  Mike Stump  <mrs@wrs.com>
991         * decl2.c: (max_tinst_depth): Increase to 50.
993 2001-01-02  Mark Mitchell  <mark@codesourcery.com>
995         * class.c (invalidate_class_lookup_cache): Zero the
996         previous_class_values.
997         * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
998         TREE_INT_CST_HIGH.
999         (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
1000         * decl.c (free_bindings): New variable.
1001         (push_binding): Don't create a new binding if we have one on the
1002         free list.
1003         (pop_binding): Put old bindings on the free list.
1004         (init_decl_processing): Use size_int, not build_int_2.
1005         Register free_bindings as a GC root.
1006         (cp_make_fname_decl): Use size_int, not build_int_2.
1007         (push_inline_template_parms_recursive): Likewise.
1008         (end_template_parm_list): Likewise.
1009         (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
1010         (tsubst_template_parms): Use size_int, not build_int_2.
1011         (tsubst): Likewise.
1012         * rtti.c (get_vmi_pseudo_type_info): Likewise.
1014 2001-01-02  Richard Henderson  <rth@redhat.com>
1016         * parse.y (asm): Set ASM_INPUT_P.
1018 2001-01-02  Jason Merrill  <jason@redhat.com>
1020         * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
1021         for v3 ABI.
1023         * typeck.c (cp_truthvalue_conversion): New fn.
1024         * cvt.c (ocp_convert): Use it.
1026         * cp-tree.h: Lose c-common.c decls.
1028         * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
1029         * cvt.c (convert_to_void): Use type_unknown_p.
1031         * typeck.c (strip_all_pointer_quals): Also strip quals from
1032         pointer-to-member types.
1034         * Make-lang.in (cp/TAGS): Use --no-globals.  Ignore parse.c, and treat
1035         parse.y as C.
1037         * call.c (build_new_method_call): Do evaluate the object parameter
1038         when accessing a static member.
1039         * typeck.c (build_component_ref): Likewise.
1041 2001-01-02  Andreas Jaeger  <aj@suse.de>
1043         * decl.c (cp_missing_noreturn_ok_p): New.
1044         (init_decl_processing): Set lang_missing_noreturn_ok_p.
1046 2000-12-29  Jakub Jelinek  <jakub@redhat.com>
1048         * decl.c (init_decl_processing): Fix sign of wchar_type_node.
1050 2000-12-29  Mark Mitchell  <mark@codesourcery.com>
1052         * class.c (pushclass): Remove #if 0'd code.
1053         * cp-tree.h (overload_template_name): Remove.
1054         * decl.c (store_bindings): Simplify.
1055         (pop_from_top_level): Likewise.
1056         * pt.c (overload_template_name): Remove.
1057         (instantiate_decl): Don't call push_to_top_level if it's not
1058         needed.
1060 2000-12-28  Mark Mitchell  <mark@codesourcery.com>
1062         * pt.c (register_local_specialization): Don't return a value.
1063         (lookup_template_class): Use move-to-front heuristic when looking
1064         up template instantiations.
1065         (instantiate_decl): Only push_to_top_level when we're actually
1066         going to instantiate the template.
1068 2000-12-29  Hans-Peter Nilsson  <hp@bitrange.com>
1070         * search.c (binfo_for_vtable): Return least derived class, not
1071         most.  Handle secondary vtables.
1073 2000-12-22  Jason Merrill  <jason@redhat.com>
1075         * pt.c (more_specialized): Don't optimize len==0.
1076         (fn_type_unification): If we're adding the return type, increase len.
1078         * typeck.c (build_binary_op): Fix pmf comparison logic.
1080         * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
1081         DECL_STATIC_FUNCTION_P.
1083         * semantics.c (genrtl_finish_function): Don't try to jump to
1084         return_label unless it exists.
1086         In partial ordering for a call, ignore parms for which we don't have
1087         a real argument.
1088         * call.c (joust): Pass len to more_specialized.
1089         (add_template_candidate_real): Strip 'this', pass len.
1090         * pt.c (more_specialized): Pass len down.  Lose explicit_args parm.
1091         (get_bindings_order): New fn.  Pass len down.
1092         (get_bindings_real): Strip 'this', pass len.
1093         (fn_type_unification): Likewise.
1094         (type_unification_real): Succeed after checking 'len' args.
1095         (most_specialized_instantiation): Lose explicit_args parm.
1096         * class.c (resolve_address_of_overloaded_function): Strip 'this',
1097         pass len.
1099 2000-12-21  Jason Merrill  <jason@redhat.com>
1101         * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
1102         DECL_TEMPLATE_RESULT.
1104         * search.c (lookup_field_r): Call lookup_fnfields_1, not
1105         lookup_fnfields_here.
1107         * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
1109         * call.c (build_object_call): Also allow conversions that return
1110         reference to pointer to function.
1111         (add_conv_candidate): Handle totype being ref to ptr to fn.
1112         (build_field_call): Also allow members of type reference to function.
1113         Lose support for calling pointer to METHOD_TYPE fields.
1115         * error.c (dump_expr): Handle *_CAST_EXPR.
1117         * typeck2.c (build_scoped_ref): Always convert to the naming class.
1119         * tree.c (break_out_cleanups): Lose.
1120         * cp-tree.h: Remove prototype.
1121         * typeck.c (build_component_ref): Don't break_out_cleanups.
1122         (build_compound_expr): Likewise.
1123         * semantics.c (finish_expr_stmt): Likewise.
1125 2000-12-20  Richard Henderson  <rth@redhat.com>
1127         * cp-tree.h: Update declarations.
1128         * decl.c (finish_case_label): Return the new stmt node.
1129         * semantics.c (finish_goto_stmt): Likewise.
1130         (finish_expr_stmt, finish_return_stmt): Likewise.
1131         (finish_break_stmt, finish_continue_stmt): Likewise.
1132         (finish_asm_stmt): Likewise.
1133         * parse.y (already_scoped_stmt): Set STMT_LINENO.
1134         (compstmt, implicitly_scoped_stmt, stmt): Likewise.
1135         (simple_if, simple_stmt): Return the new stmt node.
1136         (save_lineno): New.
1138 2000-12-18  Joseph S. Myers  <jsm28@cam.ac.uk>
1140         * cp-tree.h: Don't declare warn_long_long.
1142 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1144         * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
1145         IS_AGGR_TYPE.
1147 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1149         * pt.c (unify): Handle when both ARG and PARM are
1150         BOUND_TEMPLATE_TEMPLATE_PARM.
1152 2000-12-15  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1154         * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
1155         DECL_TEMPLATE_PARM_P.
1157 2000-12-15  Jason Merrill  <jason@redhat.com>
1159         * init.c (build_new_1): Reorganize.  Now with 100% fewer SAVE_EXPRs!
1161         * init.c (build_new_1): Don't strip quals from type.
1163         * decl.c (pushdecl): Don't check for linkage on a non-decl.
1165         * call.c (build_op_delete_call): See through ARRAY_TYPEs.
1167         * call.c (build_new_function_call): Lose space before paren in
1168         error message.
1169         (build_new_method_call): Likewise.
1171         * typeck2.c (build_m_component_ref): Propagate quals from datum.
1173 2000-12-14  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1175         * pt.c (check_explicit_specialization): Propagate default
1176         function arguments to explicit specializations.
1178 2000-12-13  DJ Delorie  <dj@redhat.com>
1180         * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
1181         and <? operators.
1183 2000-12-08  Jason Merrill  <jason@redhat.com>
1185         * error.c (dump_function_name): Don't let the user see __comp_ctor.
1187         Clean up copy-initialization in overloading code.
1188         * call.c (build_user_type_conversion_1): Die if we are asked to
1189         convert to the same or a base type.
1190         (implicit_conversion): Avoid doing so.  Lose reference binding code.
1191         (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
1192         direct-initialization.  Also do direct-init part of copy-init.
1193         (build_user_type_conversion): Don't provide context to convert_like.
1194         * cvt.c (ocp_convert): build_user_type_conversion will now provide
1195         the constructor call for copy-init.
1197         * pt.c (tsubst_decl): Call clone_function_decl here if this is an
1198         instantiation of a member template.
1199         (do_decl_instantiation): Not here.
1201 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
1203         * class.c (check_field_decls): Don't special case anonymous
1204         fields in error messages.
1205         (note_name_declared_in_class): Use %D on diagnostic.
1207         * tree.c (pod_type_p): Use strip_array_types.
1208         (cp_valid_lang_attribute): Likewise.
1209         * typeck.c (cp_type_quals): Strip arrays separately, to avoid
1210         multiple evaluations.
1211         (cp_has_mutable_p): Use strip_array_types.
1213 2000-12-07  Nathan Sidwell  <nathan@codesourcery.com>
1215         * cp-tree.h (sufficient_parms_p): Declare new function.
1216         * call.c (sufficient_parms_p): New function, broken out of ...
1217         (add_function_candidate): ... here. Use it.
1218         (add_conv_candidate): Use it.
1219         * decl.c (grok_ctor_properties): Use it.
1221 2000-12-07  Jakub Jelinek  <jakub@redhat.com>
1223         * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
1225 2000-12-07  Joseph S. Myers  <jsm28@cam.ac.uk>
1227         * decl2.c (lang_decode_option): Handle -Wformat-security.
1229 2000-12-06  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1231         * pt.c (verify_class_unification): New function.
1232         (get_class_bindings): Use it.
1233         (try_class_unification): Tidy.
1234         (unify): Handle when argument of a template-id is not
1235         template parameter dependent.
1236         (template_args_equal): Handle when TREE_CODE's do not match.
1238 2000-12-06  Alexandre Oliva  <aoliva@redhat.com>
1240         * lang-specs.h (c++): When invoking the stand-alone preprocessor
1241         for -save-temps, pass all relevant -Defines to it, and then don't
1242         pass them to cc1plus.
1244 2000-12-05  Will Cohen  <wcohen@redhat.com>
1246         * decl.c (finish_case_label): Cleared
1247         more_cleanups_ok in surrounding function scopes.
1248         (define_label): Likewise.
1250 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
1252         * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
1253         (get_matching_virtual): Remove.
1254         (look_for_overrides): Declare new function.
1255         * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
1256         DECL_VINDEX here.
1257         * class.c (check_for_override): Move base class iteration code
1258         to look_for_overrides.
1259         * search.c (next_baselink): Remove.
1260         (get_virtuals_named_this): Remove.
1261         (get_virtual_destructor): Remove.
1262         (tree_has_any_destructors_p): Remove.
1263         (struct gvnt_info): Remove.
1264         (check_final_overrider): Remove `virtual' from error messages.
1265         (get_matching_virtuals): Remove. Move functionality to ...
1266         (look_for_overrides): ... here, and ...
1267         (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
1268         to be overriding.
1270 2000-12-05  Nathan Sidwell  <nathan@codesourcery.com>
1272         * typeck.c (get_delta_difference): If via a virtual base,
1273         return zero.
1274         * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
1275         adjustment.
1277 2000-12-04  Richard Henderson  <rth@redhat.com>
1279         * error.c (dump_tree): Use output_add_string not OB_PUTS.
1281 2000-12-04  Jason Merrill  <jason@redhat.com>
1283         * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
1284         (write_builtin_type): Pass intSI_type_node and the like through
1285         type_for_mode.
1286         * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
1287         Pass intSI_type_node and the like through type_for_mode.
1288         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
1289         * pt.c (tsubst, unify): Likewise.
1290         * tree.c (walk_tree): Likewise.
1291         * error.c (dump_type): Likewise.
1292         (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
1294         * Make-lang.in: Tweak top comment for emacs.
1295         (cp/TAGS): Restore.
1297         * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
1299         * class.c (clone_function_decl): Robustify.
1301 2000-12-04  Michael Matz  <matzmich@cs.tu-berlin.de>
1303         * decl.c (store_bindings): Only search in the non modified
1304         old_bindings for duplicates.
1306 2000-12-04  Nathan Sidwell  <nathan@codesourcery.com>
1308         * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
1309         TYPE_POLYMORPHIC_P.
1311         * typeck.c (build_static_cast): Remove unused variable.
1313 2000-12-01  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
1315         * pt.c: Fix typo in comment.
1317 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
1319         * decl2.c (warn_format): Remove definition.
1320         (lang_decode_option): Handle -Wformat-nonliteral,
1321         -Wno-format-extra-args and -Wno-format-y2k.  Use set_Wformat.
1323 2000-12-01  Joseph S. Myers  <jsm28@cam.ac.uk>
1325         * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
1326         (init_decl_processing): Don't create string_type_node,
1327         const_string_type_node, wint_type_node, intmax_type_node,
1328         uintmax_type_node, default_function_type, ptrdiff_type_node and
1329         unsigned_ptrdiff_type_node.  Adjust position of call to
1330         c_common_nodes_and_builtins.
1331         (identifier_global_value): New function.
1333 2000-12-01  Nathan Sidwell  <nathan@codesourcery.com>
1335         * call.c (standard_conversion): Reject pointer to member
1336         conversions from ambiguous, inaccessible or virtual bases.
1337         * typeck.c (build_static_cast): Don't check pointers to members
1338         specially.
1340 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
1342         * method.c (do_build_copy_constructor): Preserve cv
1343         qualifications when accessing source object members.
1344         (do_build_assign_ref): Likewise. Remove separate diagnostics for
1345         unnamed fields.
1347 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
1349         * method.c (do_build_assign_ref): Construct appropriately
1350         CV-qualified base reference. Don't allow const casts in base
1351         conversion.
1353 2000-11-30  Nathan Sidwell  <nathan@codesourcery.com>
1355         * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
1356         incomplete return type.
1358 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1360         * parse.y (base_class.1): Produce a _TYPE not a _DECL.
1361         * semantics.c (finish_base_specifier): Accept a _TYPE not a
1362         _DECL.
1364 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1366         * spew.c (yyerror): Cope if yylval.ttype is NULL.
1368 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1370         * decl.c (grokdeclarator): Diagnose undefined template contexts.
1372 2000-11-28  Nathan Sidwell  <nathan@codesourcery.com>
1374         * decl.c (grokdeclarator): Do type access control on friend
1375         class.
1377 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
1379         * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
1380         bison parser ickiness.
1381         * pt.c (tsubst_friend_function): Enter namespace scope when
1382         tsubsting the function name.
1383         * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
1385 2000-11-27  Nathan Sidwell  <nathan@codesourcery.com>
1387         * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
1388         * cvt.c (cp_convert_to_pointer): Add force parameter.
1389         Allow conversions via virtual base if forced.
1390         (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
1391         (ocp_convert): Likewise.
1392         * search.c (binfo_from_vbase): Return the virtual base's binfo.
1393         * typeck.c (get_delta_difference): Adjust handling of virtual
1394         bases.
1396 2000-11-26  Mark Mitchell  <mark@codesourcery.com>
1398         * tree.c (struct list_hash): Remove.
1399         (list_hash_table): Make it be an htab.
1400         (struct list_proxy): New type.
1401         (list_hash_eq): New function.
1402         (list_hash_pieces): Renamed from ...
1403         (list_hash): ... this.
1404         (list_hash_lookup): Remove.
1405         (list_hash_add): Remove.
1406         (hash_tree_cons): Use the generic hashtable.
1407         (mark_list_hash): Remove.
1408         (init_tree): Create the hashtable.
1410 2000-11-25  Joseph S. Myers  <jsm28@cam.ac.uk>
1412         * method.c (build_mangled_C9x_name): Rename to
1413         build_mangled_C99_name.  Change C9X references in comments to
1414         refer to C99.
1416 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
1418         * parse.y (unary_expr): Move VA_ARG from here ...
1419         (primary): ... to here.
1421 2000-11-24  Nathan Sidwell  <nathan@codesourcery.com>
1423         * semantics.c (finish_id_expr): If type is error_mark, return
1424         error_mark.
1426 2000-11-23  Nathan Sidwell  <nathan@codesourcery.com>
1428         * pt.c (lookup_template_class): Simplify loop exit constructs.
1429         Cope when there is no partial instantiation of a template
1430         template member.
1432 Thu Nov 23 02:16:47 2000  J"orn Rennecke <amylaar@redhat.com>
1434         * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
1436 2000-11-22  Mark Mitchell  <mark@codesourcery.com>
1438         * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
1439         prefix.
1441         * pt.c (do_decl_instantiate): Explicitly clone constructors and
1442         destructors that haven't already been cloned.
1444 2000-11-20  Richard Henderson  <rth@redhat.com>
1446         * parse.y (yyparse_1): Rename the parser entry point.
1448 2000-11-20  Alex Samuel  <samuel@codesourcery.com>
1450         * mangle.c (write_name): Use <unscoped-name> for names directly in
1451         function scope.
1452         (write_unscoped_name): Accept names directly in function scope.
1454 2000-11-20  Nathan Sidwell  <nathan@codesourcery.com>
1456         * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
1457         * parse.y (extdef): Add EXPORT reduction.
1458         * spew.c (yylex): Don't skip export here.
1460 2000-11-19  Mark Mitchell  <mark@codesourcery.com>
1462         * decl.c (init_decl_processing): Correct name of pure virtual
1463         function under the new ABI.
1464         * rtti.c (throw_bad_cast): Likewise, for bad cast function.
1465         (throw_bad_typeid): Likewise for bad typeid function.
1467 2000-11-18  Mark Mitchell  <mark@codesourcery.com>
1469         * decl.c (grokparms): Don't even function types of `void' type,
1470         either.
1471         * mangle.c (write_type): Don't crash when confronted with the
1472         error_mark_node.
1474         * decl.c (grokparms): Don't create parameters of `void' type.
1476 2000-11-17  Zack Weinberg  <zack@wolery.stanford.edu>
1478         * lex.c (mark_impl_file_chain): Delete.
1479         (init_parse): Remove call to ggc_add_string_root.  No need to
1480         ggc_strdup a string constant.  Do not add impl_file_chain to GC
1481         roots.
1482         (handle_pragma_implementation): No need to ggc_strdup main_filename.
1484 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
1486         * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
1488 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
1490         * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
1491         * decl.c (grokdeclarator): Don't reject void parms here.
1492         (require_complete_types_for_parms): Simplify, use
1493         complete_type_or_else.
1494         (grokparms): Remove bitrot. Remove funcdef parm.
1495         Deal with ellipsis parm lists here.
1496         * semantics.c (finish_parmlist): Don't append void_list_node
1497         here. Set PARMLIST_ELLIPSIS_P.
1499 2000-11-17  Nathan Sidwell  <nathan@codesourcery.com>
1501         * typeck2.c (incomplete_type_error): Reorganise to avoid
1502         excessive diagnostics.
1504 2000-11-16  Zack Weinberg  <zack@wolery.stanford.edu>
1506         * lex.c (struct impl_files, internal_filename): Constify a char *.
1508 2000-11-16  Mark Mitchell  <mark@codesourcery.com>
1510         * mangle.c (write_special_name_constructor): Don't generate
1511         assembler junk when confronted with an old-style constructor.
1512         (write_special_name_destructor): Likewise.
1513         (mangle_decl_string): Do it here instead.
1515 2000-11-16  Nathan Sidwell  <nathan@codesourcery.com>
1517         * call.c (op_error): Make error messages clearer.
1519 2000-11-15  Mark Mitchell  <mark@codesourcery.com>
1521         * decl.c (wrapup_globals_for_namespace): Don't mark things
1522         TREE_ASM_WRITTEN when they're not.
1524 2000-11-15  Jason Merrill  <jason@redhat.com>
1526         * typeck2.c (friendly_abort): Uncount the error before handing
1527         off to fancy_abort.
1529 2000-11-15  Nathan Sidwell  <nathan@codesourcery.com>
1531         * typeck.c (lookup_anon_field): Cope with qv qualifiers.
1533 2000-11-14  Mark Mitchell  <mark@codesourcery.com>
1535         * class.c (build_vtbl_initializer): Fix typo in comment.
1536         * typeck.c (expr_sizeof): Don't crash on errors.
1538 2000-11-14  Jim Wilson  <wilson@redhat.com>
1540         * lang-specs.h: Add %2 after %(cc1_options).
1542 2000-11-14  Richard Henderson  <rth@redhat.com>
1544         * typeck.c (c_sizeof): Be strict about casting result value
1545         back to c_size_type_node.
1546         (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
1548 2000-11-13  Joseph S. Myers  <jsm28@cam.ac.uk>
1550         * typeck.c (build_unary_op): Use boolean_increment from
1551         c-common.c, moving the relevant code there.
1553 2000-11-11  Jason Merrill  <jason@redhat.com>
1555         * typeck.c (mark_addressable): Don't call put_var_into_stack.
1557         * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
1558         in inlines.
1560 2000-11-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1562         * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
1563         * lex.c (copy_lang_decl): Likewise.
1565 2000-11-09  Mark Mitchell  <mark@codesourcery.com>
1567         * dump.c (cp_dump_tree): Don't dump function bodies here.
1569         * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
1570         (dump.o): Update dependency list.
1571         * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
1572         (flag_dump_translation_unit): Likewise.
1573         (CP_TYPE_QUALS): Adjust definition.
1574         (DECL_C_BIT_FIELD): Remove.
1575         (SET_DECL_C_BIT_FIELD): Likewise.
1576         (CLEAR_DECL_C_BIT_FIELD): Likewise.
1577         (add_maybe_template): Likewise.
1578         (strip_array_types): Likewise.
1579         (dump_node_to_file): Likewise.
1580         (cp_dump_tree): New function.
1581         * decl.c (init_decl_processing): Set lang_dump_tree.
1582         * decl2.c (flag_dump_translation_unit): Remove.
1583         * dump.c: Move most of it to ../c-dump.c.
1584         (cp_dump_tree): New function.
1585         * pt.c (add_maybe_template): Remove.
1586         * typeck.c (strip_array_types): Likewise.
1588 2000-11-07  Eric Christopher  <echristo@redhat.com>
1590         * decl.c (init_decl_processing): Change definition of
1591         __wchar_t to wchar_t.  Remove artificial declaration of
1592         wchar_t.
1593         * lex.c: Change instances of __wchar_t to wchar_t.
1595 2000-11-09  Nathan Sidwell  <nathan@codesourcery.com>
1597         * lex.c (do_identifier): Don't lookup_name for operators.
1598         * parse.y (operator): Save looking_for_typename.
1599         (unoperator): Restore it.
1600         * spew.c (frob_opname): Use nth_token for lookahead.
1602 2000-11-08  Nathan Sidwell  <nathan@codesourcery.com>
1604         * decl.c (grok_op_properties): Always use coerce_new_type and
1605         coerce_delete_type.
1606         * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
1607         exception specification. Tidy up.
1608         (coerce_delete_type): Preserve exception specification. Tidy up.
1610 2000-11-07  Joseph S. Myers  <jsm28@cam.ac.uk>
1612         * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
1613         (push_binding_level), error.c (cp_tree_printer), pt.c
1614         (process_partial_specialization, tsubst_template_arg_vector),
1615         search.c (lookup_member): Use memset () instead of bzero ().
1617 2000-11-07  Nathan Sidwell  <nathan@codesourcery.com>
1619         * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
1621 2000-11-05  Joseph S. Myers  <jsm28@cam.ac.uk>
1623         * Make-lang.in (c++.distdir): Remove.
1625 2000-11-04  Mark Mitchell  <mark@codesourcery.com>
1627         * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
1628         declarations from different namespaces to be combined.
1630 2000-11-03  Zack Weinberg  <zack@wolery.stanford.edu>
1632         * decl.c: Include tm_p.h.
1634 2000-11-03  Joseph S. Myers  <jsm28@cam.ac.uk>
1636         * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
1638 2000-11-02  Joseph S. Myers  <jsm28@cam.ac.uk>
1640         * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
1641         (build_overload_value), repo.c (open_repo_file), xref.c
1642         (open_xref_file): Use strchr () and strrchr () instead of index ()
1643         and rindex ().
1645 2000-11-01  Bernd Schmidt  <bernds@redhat.co.uk>
1647         * call.c (build_over_call): Call fold on the CALL_EXPR.
1649 2000-11-01  Gabriel Dos Reis  <gdr@codesourcery.com>
1651         * error.c (dump_template_decl): Separate template hearders with
1652         space not comma.
1654 2000-10-31  Gabriel Dos Reis  <gdr@codesourcery.com>
1656         * error.c: Move TFF_ macros into cp-tree.h.  Throughout, replace
1657         TS_* flags with corresponding TFF_*.  Adjust prototypes of
1658         functions (which used to take a tree_string_flags) to take an int.
1660         * cp-tree.h (enum tree_string_flags): Remove
1661         (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
1662         TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
1663         TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
1664         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
1665         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
1666         TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
1667         (type_as_string, decl_as_string, expr_as_string,
1668         context_as_string): Adjust prototype.
1670         * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
1671         instead of TS_PLAIN.
1673         * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
1674         instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
1675         plain `0'.
1677 2000-10-30  Mark Mitchell  <mark@codesourcery.com>
1679         * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
1680         (linkage_kind): New enumeration.
1681         (decl_linkage): New function.
1682         * decl2.c (comdat_linkage): Extend comment.
1683         * error.c (dump_function_decl): Print the arguments used to
1684         instantiate a template, even when not printing the type of the
1685         function.
1686         * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
1687         not TREE_PUBLIC, to test for external linkage.
1688         * tree.c (decl_linkage): New function.
1690 2000-10-28  Mark Mitchell  <mark@codesourcery.com>
1692         * pt.c (instantiate_decl): Always instantiate static data members
1693         initialized in-class.
1695 2000-10-27  Zack Weinberg  <zack@wolery.stanford.edu>
1697         * Make-lang.in: Move all build rules here from Makefile.in,
1698         adapt to new context.  Wrap all rules that change the current
1699         directory in parentheses.  Expunge all references to $(P).
1700         When one command depends on another and they're run all at
1701         once, use && to separate them, not ;.  Add OUTPUT_OPTION to
1702         all object-file generation rules.  Delete obsolete variables.
1704         * Makefile.in: Delete.
1705         * config-lang.in: Delete outputs= line.
1707 2000-10-26  Gabriel Dos Reis  <gdr@codesourcery.com>
1709         * error.c (dump_function_decl): Print no space between
1710         `ptr-operator' the `type-specifier' of the return type.
1711         (dump_type_prefix): Make sure we put space at the appropriate
1712         place.
1714 2000-10-23  Jason Merrill  <jason@redhat.com>
1716         * call.c (equal_functions): Also call decls_match for extern "C" fns.
1718 2000-10-22  Jason Merrill  <jason@redhat.com>
1720         * call.c (build_conditional_expr): Use ocp_convert to force
1721         rvalue conversion.
1723 2000-10-22  Mark Mitchell  <mark@codesourcery.com>
1725         * call.c (standard_conversion): Use RVALUE_CONVs for all
1726         expressions that satisfy lvalue_p, not just those that satisfy
1727         real_lvalue_p.
1729         * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
1731         * typeck.c (c_sizeof): Return an expression of `size_t' type,
1732         not one with TYPE_IS_SIZETYPE set.
1733         (dubious_conversion_warnings): Remove special-case code.
1735 2000-10-21  Geoffrey Keating  <geoffk@cygnus.com>
1737         * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
1738         * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
1739         (dump_type_prefix): Print vector-of-int as 'int vector'.
1740         (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
1741         * tree.c (walk_tree): Handle VECTOR_TYPE.
1743         * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
1745 2000-10-21  Jason Merrill  <jason@redhat.com>
1747         * parse.y (operator): Set got_object from got_scope.
1748         Set looking_for_typename.
1749         * decl.c (lookup_name_real): Clear val after setting from_obj.
1750         Reorganize diagnostic.
1752 2000-10-20  Jason Merrill  <jason@redhat.com>
1754         * tree.c (walk_tree): Don't walk into default args.
1756         * error.c (dump_expr): Use host_integerp.
1758 2000-10-20  David Edelsohn  <edelsohn@gnu.org>
1760         * typeck2.c (abstract_virtuals_error): Use "because" instead of
1761         "since" in error message.
1763 Fri Oct 20 13:54:59 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
1765         * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
1767 2000-10-20  Jeffrey Oldham  <oldham@codesourcery.com>
1769         * decl.c (revert_static_member_fn): Fixed typo.
1771 2000-10-19  Mark Mitchell  <mark@codesourcery.com>
1773         * class.c (subobject_offset_fn): New type.
1774         (dfs_record_base_offsets): Remove.
1775         (record_base_offsets): Likewise.
1776         (dfs_search_base_offsets): Likewise.
1777         (record_subobject_offset): New function.
1778         (check_subobject_offset): Likewise.
1779         (walk_subobject_offsets): Likewise.
1780         (record_subobject_offsets): Likewise.
1781         (layout_conflict_p): Reimplement.
1782         (layout_nonempty_base_or_field): Correct handling of type
1783         conflicts during layout.
1784         (layout_empty_base): Likewise.
1785         (build_base_field): Adjust to handle new representation of empty
1786         base offset table.
1787         (build_base_fields): Likewise.
1788         (layout_virtual_bases): Likewise.
1789         (splay_tree_compare_integer_csts): New function.
1790         (layout_class_type): Use a splay_tree, rather than a varray, to
1791         represent the offsets of empty bases.
1793         * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
1794         * decl.c (select_decl): Don't return declarations that are
1795         DECL_ANTICIPATED.
1797 2000-10-18  Mark Mitchell  <mark@codesourcery.com>
1799         * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
1800         (fake_std_node): New macro.
1801         * decl.c (in_std): Rename to ...
1802         (in_fake_std): ... this.
1803         (flag_no_builtin): Remove.
1804         (flag_no_nonansi_builtin): Likewise.
1805         (walk_namespaces_r): Use fake_std_node.
1806         (push_namespace): Use std_identifier.
1807         (pop_namespace): Use in_fake_std.
1808         (lookup_name_real): Use fake_std_node.
1809         (init_decl_processing): When -fhonor-std, create the `std'
1810         namespace.  Don't create a dummy fake_std_node in that case.
1811         Adjust call to c_common_nodes_and_builtins.  Use std_identifier.
1812         (builtin_function): Put builtins whose names don't begin
1813         with `_' in the std namespace.
1814         * decl2.c (flag_no_builtin): Remove.
1815         (flag_no_nonansi_builtin): Likewise.
1816         (set_decl_namespace): Use fake_std_node.
1817         (validate_nonmember_using_decl): Likewise.
1818         (do_using_directive): Likewise.
1819         (handle_class_head): Likewise.
1820         * dump.c (dequeue_and_dump): Likewise.
1821         * except.c (init_exception_processing): Use std_identifier.
1822         * init.c (build_member_call): Use fake_std_node.
1823         * rtti.c (init_rtti_processing): Use std_identifier.
1825 2000-10-17  Mark Mitchell  <mark@codesourcery.com>
1827         * cp-tree.h (back_end_hook): Remove declaration.
1828         * decl2.c (back_end_hook): Remove definition.
1830         * dump.c (dequeue_and_dump): Dump TREE_USED.
1832 Tue Oct 17 20:19:06 2000  Brad Lucier <lucier@math.purdue.edu>
1834         * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
1836 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
1838         * decl.c (WINT_TYPE): Define.
1839         (init_decl_processing): Create types unsigned_ptrdiff_type_node,
1840         c_size_type_node, signed_size_type_node and wint_type_node.
1842 2000-10-17  Joseph S. Myers  <jsm28@cam.ac.uk>
1844         * decl2.c (warn_missing_format_attribute): New variable.
1845         (lang_decode_option): Decode -Wmissing-format-attribute.
1847 2000-10-16  Mark Mitchell  <mark@codesourcery.com>
1849         * typeck.c (qualify_type): Remove.
1850         (composite_pointer_type): Fix handling of conversions to `cv void*'.
1852 2000-10-14  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1854         * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
1856 2000-10-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
1858         * Makefile.in (parse.c, parse.h): Create atomically.
1860 2000-10-12  Mark Mitchell  <mark@codesourcery.com>
1862         * class.c (current_obstack): Remove.
1863         * decl.c (ggc_p): Remove.
1864         (start_decl): Don't use decl_tree_cons.
1865         (grokdeclarator): Don't use build_decl_list.
1866         (start_function): Don't use decl_tree_cons.
1867         (finish_function): Don't mess with obstacks.
1868         * decl2.c (grok_x_components): Don't use build_decl_list.
1869         * lex.c (make_call_declarator): Don't call decl_tree_cons.
1870         (implicitly_declare_fn): Don't call build_decl_list.
1871         * parse.y (frob_specs): Don't call build_decl_list or
1872         decl_tree_cons.
1873         (expr_or_declarator_intern): Don't call decl_tree_cons.
1874         (primary): Don't call build_decl_list.
1875         (fcast_or_absdcl): Likewise.
1876         (typed_declspecs): Don't call decl_tree_cons.
1877         (reserved_declspecs): Don't call build_decl_list.
1878         (declmods): Likewise.
1879         (reserved_typespecquals): Likewise.
1880         (aggr): Likewise.
1881         (new_type_id): Likewise.
1882         (cv_qualifiers): Likewise.
1883         (after_type_declarator_intern): Likewise.
1884         (notype_declarator_intern): Likewise.
1885         (absdcl_intern): Likewise.
1886         (named_parm): Likewise.
1887         * pt.c (most_specialized_class): Likewise.
1888         * repo.c (temporary_obstack): Make it a structure, not a pointer.
1889         (init_repo): Initialize it.
1890         * search.c (current_obstack): Remove.
1891         * typeck2.c (add_exception_specifier): Don't call build_decl_list.
1893 2000-10-09  Richard Henderson  <rth@cygnus.com>
1895         * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
1896         (c++ language support bits for libgcc): Remove.
1897         (c++.clean): Remove cplib2.txt cleanup.
1898         * config-lang.in (headers, lib2funcs): Remove.
1900         * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
1901         * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
1902         * inc/cxxabi.h, inc/exception, inc/new: Remove files.
1903         * inc/new.h, inc/typeinfo: Remove files.
1905 2000-10-08  Joseph S. Myers  <jsm28@cam.ac.uk>
1907         * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
1908         defined.
1909         (init_decl_processing): Initialize intmax_type_node and
1910         uintmax_type_node.
1912 2000-10-06  Richard Henderson  <rth@cygnus.com>
1914         * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
1915         (original_result_rtx): Remove.
1916         * decl.c (save_function_data): Don't clear x_result_rtx.
1917         (mark_lang_function): Don't mark it either.
1918         * expr.c (fixup_result_decl): Remove.
1919         * semantics.c (genrtl_named_return_value): Frob the return decl
1920         before calling emit_local_var.
1921         (genrtl_finish_function): Don't call fixup_result_decl.
1922         Always emit the jump to return_label.
1924 2000-10-06  Nathan Sidwell  <nathan@codesourcery.com>
1926         * pt.c (lookup_template_class): Set current access for enum.
1927         (tsubst_enum): Set file & line for enum decl.
1929         * spew.c (yylex): Remove unused variable.
1931 2000-10-05  Richard Henderson  <rth@cygnus.com>
1933         * semantics.c (genrtl_finish_function): Don't init or check
1934         can_reach_end; remove noreturn and return value checks.
1936 2000-10-05  Tom Tromey  <tromey@cygnus.com>
1938         * init.c (build_java_class_ref): Use `build_static_name' with a
1939         suffix, not a prefix, to build the class object's name.
1941 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
1943         * cp-tree.h (access_kind): Fix comment typo.
1944         * decl2.c (grokfield): Fix diagnostic typo.
1945         * semantics.c (finish_template_type): Fix comment typo.
1946         (finish_qualified_object_call_expr): Likewise.
1948 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
1950         * pt.c (tsubst_expr, DECL_STMT case): Don't process if
1951         tsubsting fails.
1953 2000-10-05  Nathan Sidwell  <nathan@codesourcery.com>
1955         * spew.c (frob_id): New static function.
1956         (frob_opname): Use it.
1957         (yylex): Use it.
1959 2000-10-01  Mark Mitchell  <mark@codesourcery.com>
1961         * decl.c (lang_mark_false_label_stack): Remove.
1962         * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
1964 2000-09-30  Joseph S. Myers  <jsm28@cam.ac.uk>
1966         * gxxint.texi: Use @email for formatting email addresses.
1968 2000-09-29  Gabriel Dos Reis  <gdr@codesourcery.com>
1970         * error.c: Remove direct obstack manipulation.  Replace with
1971         output_buffer-based formatting.  Adjust calls to removed macros.
1972         (obstack_chunk_alloc, obstack_chunk_free): Remove.
1973         (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
1974         OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
1976 2000-09-24  Mark Mitchell  <mark@codesourcery.com>
1978         * ir.texi: Move to ../c-tree.texi.
1980 2000-09-20  Jason Merrill  <jason@redhat.com>
1982         * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
1984 2000-09-21  Andreas Jaeger  <aj@suse.de>
1986         * errfn.c: Move declaration of cp_printer and cp_printers to ...
1987         * cp-tree.h: ... here.
1989         * error.c: Remove declaration of cp_printer.
1991 2000-09-20  Mark Mitchell  <mark@codesourcery.com>
1993         * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
1995 2000-09-20  Hans-Peter Nilsson  <hp@axis.com>
1997         * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
1998         users.
2000 2000-09-18  Mark Mitchell  <mark@codesourcery.com>
2002         * decl.c (start_function): Robustify.
2004 2000-09-18  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
2006         * cp-tree.h (check_function_format): Accept a `status' parameter.
2008         * call.c, typeck.c: Updates calls to `check_function_format'.
2010 2000-09-17  Geoffrey Keating  <geoffk@cygnus.com>
2012         * decl2.c (handle_class_head): Always push some scope even
2013         in the error case.
2015 2000-09-16  Mark Mitchell  <mark@codesourcery.com>
2017         * cp-tree.h (struct cp_language_function): Remove
2018         x_scope_stmt_stack and name_declared.
2019         (current_scope_stmt_stack): Remove.
2020         (function_name_declared_p): New macro.
2021         (struct lang_decl_flags): Use c_lang_decl as a base class.
2022         (context): Remove.
2023         (struct lang_decl): Replace saved_tree with context.
2024         (DECL_FRIEND_CONTEXT): Adjust accordingly.
2025         (SET_DECL_FRIEND_CONTEXT): Likewise.
2026         (DECL_VIRTUAL_CONTEXT): Likewise.
2027         (DECL_SAVED_TREE): Remove.
2028         (C_DECLARED_LABEL_FLAG): Likewise.
2029         (cplus_expand_expr_stmt): Don't declare.
2030         (add_decl_stmt): Likewise.
2031         (add_scope_stmt): Likewise.
2032         * decl.c (mark_stmt_tree): Remove.
2033         (case_compare): Likewise.
2034         (finish_case_label): Use c_add_case_label.
2035         (init_decl_processing): Set more language-specific hooks.
2036         (build_enumerator): Fix typo in comment.
2037         (cplus_expand_expr_stmt): Remove.
2038         (mark_lang_function): Use mark_c_language_function.
2039         (lang_mark_tree): Use c_mark_lang_decl.
2040         * decl2.c: Change order of inclusion.
2041         * except.c: Likewise.
2042         * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR.  Fall
2043         back on c_expand_expr.
2044         * friend.c: Include expr.h.
2045         * init.c: Change order of inclusion.
2046         * Makefile.in: Update dependencies.
2047         * lex.h (free_lang_decl_chain): Remove.
2048         * optimize.c (maybe_clone_body): Use function_name_declared_p.
2049         * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
2050         it doesn't exist.
2051         (instantiate_decl): Use function_name_declared_p.
2052         * semantics.c (lang_expand_expr_stmt): Remove.
2053         (set_current_function_name_declared): Likewise.
2054         (current_function_name_declared): Likewise.
2055         (begin_compound_stmt): Use function_name_declared_p.
2056         (add_decl_stmt): Remove.
2057         (setup_vtbl_ptr): Use function_name_declared_p.
2058         (add_scope_stmt): Remove.
2059         (current_scope_stmt_stack): New function.
2060         (cp_expand_stmt): Don't handle SCOPE_STMTs.
2061         (expand_body): Use function_name_declared_p.
2062         * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
2063         * typeck.c: Change order of includes.
2064         (convert_sequence): Remove.
2066 2000-09-14  Joseph S. Myers  <jsm28@cam.ac.uk>
2068         * lex.c (reswords): Add _Complex.
2070 Thu Sep 14 12:10:45 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
2072         * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
2074 2000-09-13  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
2076         * init.c (begin_init_stmts): Don't use // comments.
2078 2000-09-12  Jason Merrill  <jason@redhat.com>
2080         * decl.c (maybe_deduce_size_from_array_init): Set do_default for
2081         all non-extern arrays.
2083         * decl.c (grokdeclarator): Complain about 'friend T' for implicit
2084         typenames, too.  Downgrade complaint to pedwarn.
2085         (xref_tag): Warn about surprising behavior of 'friend struct T'.
2086         * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
2087         'class This::Inherited'.
2089 2000-09-12  Mark Mitchell  <mark@codesourcery.com>
2091         * decl.c (finish_case_label): Given the LABEL_DECL a
2092         DECL_CONTEXT.
2094 2000-09-12  Gabriel Dos Reis  <gdr@codesourcery.com>
2096         * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
2097         TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
2098         TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
2099         TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
2100         TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
2101         New macros.
2102         (sorry_for_unsupported_tree, print_scope_operator,
2103         print_left_paren, print_right_paren, print_left_bracket,
2104         print_right_bracket, print_whitespace): Likewise.
2105         (aggr_variety): Rename to class_key_or_enum.
2106         (print_type): Rename to print_type_id.
2107         (print_type_specifier_seq, print_simple_type_specifier,
2108         print_elaborated_type_specifier,
2109         print_rest_of_abstract_declarator,
2110         print_parameter_declaration_clause, print_exception_specification,
2111         print_nested_name_specifier, print_template_id,
2112         typedef_original_name,  print_template_argument_list_start,
2113         print_template_argument_list_end): New functions.
2115 2000-09-11  Gabriel Dos Reis  <gdr@codesourcery.com>
2117         * ir.texi: Add more documentation.
2119 2000-09-11  Mark Mitchell  <mark@codesourcery.com>
2121         * cp-tree.h (struct saved_scope): Remove x_function_parms.
2122         (current_function_parms): Don't define.
2123         (struct cp_language_function): Remove parms_stored.
2124         (current_function_just_assigned_this): Don't define.
2125         (current_function_parms_stored): Likewise.
2126         (static_ctors): Declare.
2127         (static_dtors): Likewise.
2128         (SF_EXPAND): Don't define.
2129         (expand_start_early_try_stmts): Remove declaration.
2130         (store_parm_decls): Likewise.
2131         * decl.c (static_ctors): Don't declare.
2132         (static_dtors): Likewise.
2133         (struct binding_level): Remove this_block.
2134         (poplevel): Remove dead code.
2135         (set_block): Likewise.
2136         (mark_binding_level): Don't mark this_block.
2137         (mark_saved_scope): Don't mark x_function_parms.
2138         (init_decl_processing): Don't add current_function_parms as a GC
2139         root.
2140         (check_function_type): Change prototype.
2141         (start_function): Remove RTL-generation code.
2142         (expand_start_early_try_stmts): Remove.
2143         (store_parm_decls): Give it internal linkage.  Remove
2144         RTL-generation code.
2145         (finish_function): Remove RTL-generation code.
2146         * decl2.c (static_ctors): Fix formatting.
2147         (static_dtors): Likewise.
2148         * method.c (use_thunk): Don't call store_parm_decls.
2149         (synthesize_method): Likewise.
2150         * optimize.c (maybe_clone_body): Likewise.
2151         * parse.y (fn.def2): Likewise.
2152         (.set_base_init): Likewise.
2153         (nodecls): Likewise.
2154         * pt.c (instantiate_decl): Likewise.
2155         * rtti.c (synthesize_tinfo_fn): Likewise.
2156         * semantics.c (genrtl_try_block): Simplify.
2157         (expand_body): Use genrtl_start_function and
2158         genrtl_finish_function.
2159         (genrtl_start_function): New function.
2160         (genrtl_finish_function): Likewise.
2162 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
2164         * error.c (cp_tree_printer, case 'P'): Append break.
2166 2000-09-11  Nathan Sidwell  <nathan@codesourcery.com>
2168         * cp-tree.h (frob_opname): Declare.
2169         * parse.y (saved_scopes): New static variable.
2170         (cp_parse_init): Adjust.
2171         (do_id): If lastiddecl is NULL, do do_identifier.
2172         (operator): Save scope information.
2173         (unoperator): New reduction. Restore scope information.
2174         (operator_name): Append unoperator. Call frob_opname.
2175         * spew.c (frob_opname): Define.
2177 2000-09-10  Zack Weinberg  <zack@wolery.cumb.org>
2179         * decl.c, rtti.c: Include defaults.h if not already included.
2180         Don't define the *_TYPE_SIZE macros.
2182 2000-09-09  Mark Mitchell  <mark@codesourcery.com>
2184         * cp-tree.h (push_switch): Change prototype.
2185         (check_cp_case_value): Remove declaration.
2186         (decl_constant_value): Likewise.
2187         * decl.c (struct cp_switch): Add switch_stmt and cases.
2188         (case_compare): New function.
2189         (push_switch): Set switch_stmt.  Initialize cases.
2190         (pop_switch): Clean up cases.
2191         (define_case_label): Rename to ...
2192         (finish_case_label): ... this.  Do semantic analysis for case
2193         labels here.
2194         (start_function): Correct comment.
2195         * decl2.c (check_cp_case_value): Remove.
2196         * expr.c (do_case): Remove.
2197         * pt.c (tsubst_expr): Adjust call to finish_case_label.
2198         * semantics.c (genrtl_do_poplevel): Remove declaration.
2199         (RECHAIN_STMTS): Remove.
2200         (finish_break_stmt): Use build_break_stmt.
2201         (finish_continue_stmt): Use build_continue_stmt.
2202         (finish_switch_cond): Adjust condition here, rater than in
2203         c_expand_start_case.
2204         (finish_case_label): Remove.
2205         * typeck.c (c_expand_return): Remove.
2206         (c_expand_start_case): Likewise.
2208 2000-09-07  Gabriel Dos Reis  <gdr@codesourcery.com>
2210         * ir.texi: Document type nodes.
2212 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
2214         * cp-tree.h (init_cp_semantics): Declare.
2215         (genrtl_try_block): Don't declare.
2216         (genrtl_handler): Likewise.
2217         (genrtl_catch_block): Likewise.
2218         (genrtl_ctor_stmt): Likewise.
2219         (genrtl_subobject): Likewise.
2220         (genrtl_do_poplevel): Likewise.
2221         (genrtl_named_return_value): Likewise.
2222         * lex.c (init_parse): Call init_cp_semantics.
2223         * semantics.c (genrtl_try_block): Give it internal linkage.
2224         (genrtl_handler): Likewise.
2225         (genrtl_catch_block): Likewise.
2226         (genrtl_ctor_stmt): Likewise.
2227         (genrtl_subobject): Likewise.
2228         (genrtl_do_poplevel): Likewise.
2229         (genrtl_named_return_value): Likewise.
2230         (lang_expand_stmt): Rename to ...
2231         (cp_expand_stmt): ... this.  Only handle C++-specific nodes.
2232         (init_cp_semantics): Define.
2234         * decl.c (initialize_local_var): Remove RTL-generating code.
2235         * semantics.c (genrtl_try_block): Fix formatting.
2237         Move statement-tree facilities from C++ to C front-end.
2238         * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
2239         (void_zero_node): Remove.
2240         (stmt_tree): Likewise.
2241         (scope_chain): Adjust.
2242         (language_function): Rename to cp_language_function.
2243         (cp_function_chain): Adjust.
2244         (current_stmt_tree): Remove.
2245         (last_tree): Likewise.
2246         (last_expr_type): Likewise.
2247         (struct lang_decl): Adjust.
2248         (STMT_IS_FULL_EXPR_P): Remove.
2249         (add_tree): Remove.
2250         (begin_stmt_tree): Likewise.
2251         (finish_stmt_tree): Likewise.
2252         (walk_tree_fn): Likewise.
2253         (walk_stmt_tree): Likewise.
2254         * class.c (finish_struct): Replace use of add_tree with add_stmt.
2255         * decl.c (mark_stmt_tree): Adjust type.
2256         (init_decl_processing): Don't build void_zero_node.
2257         (initialize_local_var): Adjust usage of current_stmt_tree.
2258         (finish_enum): Use add_stmt, not add_tree.
2259         (save_function_data): Adjust use of language_function.
2260         (finish_constructor_body): Use add_stmt, not add_tree.
2261         (finish_destructor_body): Likewise.
2262         (push_cp_function_context): Adjust use of language_function.
2263         (pop_cp_function_context): Likewise.
2264         (mark_lang_function): Likewise.
2265         (mark_cp_function_context): Likewise.
2266         * init.c (build_aggr_init): Adjust use of current_stmt_tree.
2267         (build_vec_init): Likewise.
2268         * semantics.c (SET_LAST_STMT): Remove.
2269         (RECHAIN_STMTS): Don't use it.
2270         (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
2271         (current_stmt_tree): Define.
2272         (add_tree): Remove.
2273         (finish_goto_stmt): Use add_stmt, not add_tree.
2274         (finish_expr_stmt): Likewise.
2275         (begin_if_stmt): Likewise.
2276         (finish_then_clause): Likewise.
2277         (begin_while_stmt): Likewise.
2278         (begin_do_stmt): Likewise.
2279         (finish_return_stmt): Likewise.
2280         (begin_for_stmt): Likewise.
2281         (finish_break_stmt): Likewise.
2282         (finish_continue_stmt): Likewise.
2283         (begin_switch_stmt): Likewise.
2284         (finish_case_label): Likewise.
2285         (begin_try_block): Likewise.
2286         (begin_function_try_block): Likewise.
2287         (begin_handler): Likewise.
2288         (begin_catch_block): Likewise.
2289         (begin_compound_stmt): Likewise.
2290         (begin_asm_stmt): Likewise.
2291         (finish_asm_stmt): Likewise.
2292         (finish_label_stmt): Likewise.
2293         (add_decl_stmt): Likewise.
2294         (finish_subobject): Likewise.
2295         (finish_decl_cleanup): Likewise.
2296         (finish_named_return_value): Likewise.
2297         (setup_vtbl_ptr): Likewise.
2298         (add_scope_stmt): Likewise.
2299         (finish_stmt_expr): Likewise.
2300         (prune_unused_decls): Remove.
2301         (begin_stmt_tree): Likewise.
2302         (finish_stmt_tree): Likewise.
2303         (prep_stmt): Adjust use of current_stmt_tree.
2304         (lang_expand_stmt): Likewise.
2305         * tree.c (statement_code_p): Remove.
2306         (cp_statement_code_p): New function.
2307         (walk_stmt_tree): Remove.
2308         (init_tree): Set lang_statement_code_p.
2310 2000-09-06  Zack Weinberg  <zack@wolery.cumb.org>
2312         Integrated preprocessor.
2314         * Make-lang.in, Makefile.in: Remove all references to input.c,
2315         gxx.gperf, and hash.h.  Add ../c-lex.o to C_OBJS.
2316         * gxx.gperf, hash.h, input.c: Delete.
2317         * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
2318         initialized properly.
2320         * class.c (fixup_pending_inline): Take a tree, not a
2321         struct pending_inline *.  All callers changed.
2322         (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
2323         RID_PROTECTED entries in ridpointers[] array here.
2324         * decl.c (duplicate_decls): Do not refer to struct
2325         pending_inline.
2326         (record_builtin_type, init_decl_processing): Use RID_MAX not
2327         CP_RID_MAX.
2328         (grokdeclarator): Use C_IS_RESERVED_WORD.
2329         * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
2330         cpplib.
2331         (grok_x_components): Do not inspect pending_inlines chain.
2333         * cp-tree.h (struct lang_identifier): Add rid_code entry.
2334         (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
2335         (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
2336         (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
2337         TIME_IDENTIFIER_FILEINFO): Kill.
2338         Update prototypes.
2339         * lex.h: Expunge cp_rid.  Rewrite RIDBIT macros to use just a
2340         single 32-bit word.
2341         * parse.y: Call do_pending_inlines unconditionally.
2342         reinit_parse_for_method is now snarf_method.  fn.defpen is no
2343         longer necessary.  Remove unnecessary <itype> annotation on
2344         SCOPE.  Do not refer to end_of_file or struct pending_inline.
2345         * semantics.c (begin_inline_definitions): Call
2346         do_pending_inlines unconditionally.
2348         * lex.c: Remove all code now shared with C front end.
2349         Initialize cpplib properly if USE_CPPLIB.  Put reserved words
2350         into the get_identifier table.  Rewrite pragma handling to
2351         work with the registry.  Move code to save tokens for later
2352         processing to spew.c.
2354         * spew.c: Rewrite everything in terms of token streams instead
2355         of text.  Move routines here from lex.c / input.c as
2356         appropriate.  GC-mark trees hanging off the pending inlines
2357         chain.
2359 2000-09-06  Mark Mitchell  <mark@codesourcery.com>
2361         * NEWS: Mention that the named return value extension has been
2362         deprecated.
2363         * cp-tree.h (original_result_rtx): Define.
2364         (TREE_REFERENCE_EXPR): Remove.
2365         (DECL_VPARENT): Likewise.
2366         (pushdecl_nonclass_level): Likewise.
2367         (store_return_init): Likewise.
2368         (reinit_lang_specific): Likewise.
2369         (genrtl_named_return_value): Change prototype.
2370         * decl.c (original_result_rtx): Remove.
2371         (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
2372         Do not generate RTL for local variables here.
2373         (store_return_init): Remove.
2374         * semantics.c (genrtl_named_return_value): Simplify.  Fold in
2375         store_return_init.
2376         (finish_named_return_value): Adjust accordingly.  Warn that this
2377         extension is deprecated.
2378         (lang_expand_stmt): Adjust call to genrtl_named_return_value.
2380 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2382         * pt.c (type_unification_real): Replace switch with if.
2383         (unify): Tsubst non-type parms before comparing.
2385 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2387         * error.c (dump_typename): New function, broken out of ...
2388         (dump_type): ... here. Use it.
2389         * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
2391 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2393         * init.c (build_offset_ref): Deal with namespace scoped
2394         TEMPLATE_ID_EXPRs.
2396 2000-09-06  Nathan Sidwell  <nathan@codesourcery.com>
2398         * class.c (resolve_address_of_overloaded_function): Add
2399         explanation message.
2400         * decl.c (define_case_label): Reformat explanation.
2401         * decl2.c (finish_static_data_member_decl): Likewise.
2402         (grokfield): Likewise.
2403         * friend.c (do_friend): Likewise.
2405 2000-09-05  Zack Weinberg  <zack@wolery.cumb.org>
2407         * tree.c (walk_tree): Expose tail recursion.
2408         (walk_stmt_tree): New function.
2409         * cp-tree.h: Prototype walk_stmt_tree.
2410         * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
2411         the BLOCKs directly.  If a BLOCK has no variables after
2412         pruning, discard it.
2413         (finish_stmt_tree): Use walk_stmt_tree.  No need to save and
2414         restore the line number.
2416 2000-09-05  Mark Mitchell  <mark@codesourcery.com>
2418         * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
2419         (pt.o): Remove dependency on HTAB_H.
2420         * cp-tree.h: Include hashtab.h.
2421         (walk_tree): Change prototype.
2422         (walk_tree_without_duplicates): New function.
2423         * decl.c (check_default_argument): Use it.
2424         * optimize.c (remap_decl): Adjust calls to walk_tree.
2425         (copy_body): Likewise.
2426         (expand_calls_inline): Likewise.
2427         (calls_setjmp_p): Use walk_tree_without_duplicates.
2428         * pt.c: Don't include hashtab.h.
2429         (for_each_template_parm): Use walk_tree_without_duplicates.
2430         * semantics.c (finish-stmt_tree): Likewise.
2431         (expand_body): Likewise.
2432         * tree.c (walk_tree): Add additional parameter.
2433         (walk_tree_without_duplicates): New function.
2434         (count_trees): Use it.
2435         (verify_stmt_tree): Adjust call to walk_tree.
2436         (find_tree): Use walk_tree_without_duplicates.
2437         (no_linkage_check): Likewise.
2438         (break_out_target_exprs): Adjust call to walk_tree.
2439         (cp_unsave): Likewise.
2441 2000-09-04  Kriang Lerdsuwanakij  <lerdsuwa@users.sourceforge.net>
2443         * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
2444         (TEMPLATE_TEMPLATE_PARM): Adjust comment.
2445         * cp-tree.h (TYPE_BINFO): Adjust comment.
2446         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
2447         (TEMPLATE_TYPE_PARM_INDEX): Likewise.
2448         (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
2449         (TYPE_TEMPLATE_INFO): Likewise.
2450         (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
2451         * class.c (push_nested_class): Likewise.
2452         * decl.c (lookup_name_real): Likewise.
2453         (grokdeclarator): Likewise.
2454         (grok_op_properties): Likewise.
2455         (xref_tag): Likewise.
2456         (xref_basetypes): Likewise.
2457         * decl2.c (constructor_name_full): Likewise.
2458         (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
2459         (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
2460         * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
2461         (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2462         (dump_type_suffix): Likewise.
2463         * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
2464         instead.
2465         (get_aggr_from_typedef): Likewise.
2466         * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
2467         (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2468         (write_template_parm): Likewise.
2469         (write_template_template_parm): Check tree code instead of
2470         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2471         * method.c (build_overload_nested_name): Add
2472         BOUND_TEMPLATE_TEMPLATE_PARM.
2473         (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
2474         * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2475         * pt.c (convert_template_argument): Check tree code instead of
2476         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2477         (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
2478         (for_each_template_parm): Adjust comment.
2479         (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.
2480         (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2481         (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM.  Reorganize.  Use
2482         template_args_equal to compare template template parameter cases.
2483         * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2484         * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
2485         instead.
2486         * tree.c (copy_template_template_parm): Decide whether to create
2487         a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
2488         (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
2489         (copy_tree_r): Likewise.
2490         * typeck.c (comptypes): Likewise.  Check tree code instead of
2491         using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
2493 2000-09-04  Mark Elbrecht  <snowball3@bigfoot.com>
2495         * decl.c (finish_function): Move the code for handling functions
2496         marked with the constructor and destructor attributes inside the
2497         expand_p block.
2499 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
2501         * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
2503 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
2505         * pt.c (lookup_template_class): Remove abort.
2506         * tree.c (get_type_decl): Allow error_mark_node.
2508 2000-09-04  Nathan Sidwell  <nathan@codesourcery.com>
2510         * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
2511         TEMPLATE_ID_EXPRs.
2513 2000-09-03  Mark Mitchell  <mark@codesourcery.com>
2515         * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
2516         new ABI mangling.
2518 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
2520         * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
2521         union tag mismatch error reporting.
2523 2000-09-01  Nathan Sidwell  <nathan@codesourcery.com>
2525         * call.c (build_scoped_method_call): Check it is not a namespace.
2527 2000-08-30  Jason Merrill  <jason@redhat.com>
2529         * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
2531         * tree.c (bot_manip): Check TREE_CONSTANT rather than
2532         !TREE_SIDE_EFFECTS.  Call break_out_target_exprs and
2533         build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
2535         * decl.c (start_function): Always call make_function_rtl.
2537 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
2539         * semantics.c (prune_unused_decls): New function.
2540         (finish_stmt_tree): Call it via walk_tree.
2542 2000-08-29  Zack Weinberg  <zack@wolery.cumb.org>
2544         * class.c (build_secondary_vtable): Constify a char *.
2545         * decl.c (init_decl_processing): Initialize function_id_node,
2546         pretty_function_id_node, and func_id_node.
2547         * input.c (struct input_source): Constify 'str'.
2548         (feed_input): Constify first argument.
2549         * mangle.c (write_identifier): Constify argument.
2550         * pt.c (mangle_class_name_for_template): Constify argument.
2552 2000-08-29  Mark Mitchell  <mark@codesourcery.com>
2554         * typeck.c (mark_addressable): Remove code that pokes around in
2555         RTL.
2557 2000-08-28  Jason Merrill  <jason@redhat.com>
2559         * lex.c (file_name_nondirectory): Move to toplev.c.
2561         * cp-tree.h (LOCAL_CLASS_P): New macro.
2562         * class.c (finish_struct_1): Use it.
2564 2000-08-27  Alex Samuel  <samuel@codesourcery.com>
2566         * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
2567         (write_encoding): Pass another argument to write_name.
2568         (write_name): Add ignore_local_scope parameter.  Fix handling of
2569         local names.
2570         (write_nested_name): Use write_unqualified_name.
2571         (write_prefix): Likewise.  Skip out on FUNCTION_DECLs.
2572         (write_template_prefix): Use write_unqualified_name.
2573         (write_component): Remove.
2574         (write_local_name): Add parameter.  Use direct local entity to
2575         discriminator calculation.
2576         (write_class_enum_type): Pass another argument to write_name.
2577         (write_template_template_arg): Likewise.
2578         (make_guard_variable): Likewise.
2580 2000-08-27  Jason Merrill  <jason@redhat.com>
2582         * decl.c (pushdecl): Matching decls for local externs are found in
2583         the current level.  Propagate linkage information from previous
2584         declarations.
2586 2000-08-26  Gabriel Dos Reis  <gdr@codesourcery.com>
2588         * ir.texi (Expressions): Fix typo.
2590 2000-08-25  Greg McGary  <greg@mcgary.org>
2592         * tree.c (init_tree): Use ARRAY_SIZE.
2594 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
2596         * error.c (cp_tree_printer): Rework.
2598 2000-08-25  Mark Mitchell  <mark@codesourcery.com>
2600         * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
2601         dyn-string.o.
2602         (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
2603         (cp-demangle.o): Remove target.
2604         (dyn-string.o): Likewise.
2606         * decl.c (grokfndecl): Require that `main' return an `int'.
2607         * mangle.c (write_encoding): Don't mangle return types for
2608         conversion functions.
2610 2000-08-25  Gabriel Dos Reis  <gdr@codesourcery.com>
2612         * error.c (tree_formatting_info): New data type.
2613         (tree_being_formatted): New macro.
2614         (tree_formatting_flags): Likewise.
2615         (put_whitespace): Likewise.
2616         (print_tree_identifier): Likewise.
2617         (print_identifier): Likewise.
2618         (cp_tree_printer, print_function_argument_list, print_declaration,
2619         print_expression, print_function_declaration,
2620         print_function_parameter, print_type, print_cv_qualifier): New
2621         functions.
2622         (init_error): Initialize lang_printer.
2624 2000-08-24  Jason Merrill  <jason@redhat.com>
2626         * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
2627         adjustment necessary.
2629 2000-08-24  Greg McGary  <greg@mcgary.org>
2631         * cp-tree.h (MAIN_NAME_P): Remove macro.
2633 2000-08-24  Gabriel Dos Reis  <gdr@codesourcery.com>
2635         * error.c (print_instantiation_context): Don't forget to flush the
2636         buffer.
2638 2000-08-23  Jason Merrill  <jason@redhat.com>
2640         * typeck.c (build_ptrmemfunc): Save the input pmf.
2642         * method.c (process_modifiers): Use same_type_p.
2644 2000-08-23  Mark Mitchell  <mark@codesourcery.com>
2646         * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
2647         * mangle.c (write_function_type): Change prototype.
2648         (write_encoding): Don't mangle return types for
2649         constructors or destructors.
2650         (write_type): Adjust call to write_function_type.
2651         * pt.c (instantiate_template): Instantiate alternate entry points
2652         when instantiating the main function.
2654 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
2656         * error.c (cp_print_error_function): Don't use embedded '\n' in
2657         output_printf.
2659 2000-08-23  Gabriel Dos Reis  <gdr@codesourcery.com>
2661         * decl.c (init_decl_processing): Remove bogus initialization.
2662         * error.c (lang_print_error_function): Restore here.
2663         (init_error): Initialize print_error_function.
2665 2000-08-22  Theodore Papadopoulo  <Theodore.Papadopoulo@sophia.inria.fr>
2667         * decl2.c (arg_assoc): Revert my 2000-08-11 change.
2669 2000-08-22  Gabriel Dos Reis  <gdr@codesourcery.com>
2671         * Makefile.in (error.o): Depends on diagnostic.h
2673         * cp-tree.h (problematic_instantiation_changed,
2674         record_last_problematic_instantiation, current_instantiation,
2675         print_instantiation_context): Declare.
2676         (maybe_print_template_context): Remove.
2678         * decl.c (init_decl_processing): Set print_error_function to NULL.
2679         (lang_print_error_function): Remove, since we're using a new
2680         machinery.
2682         * error.c: #include diagnostic.h
2683         (function_category): New function.
2684         (cp_diagnostic_starter): Likewise.
2685         (cp_diagnostic_finalizer): Likewise.
2686         (cp_print_error_function): Likewise.
2687         (maybe_print_instantiation_context): Likewise.
2688         (print_instantiation_full_context): Likewise.
2689         (print_instantiation_partial_context): Likewise.
2690         (print_instantiation_context): Define.
2691         (init_error): Initialize diagnostic pager and finalizer.
2693         * pt.c (problematic_instantiation_changed): Define.
2694         (record_last_problematic_instantiation): Likewise.
2695         (current_instantiation): Likewise.
2696         (maybe_print_template_context): Remove.
2697         (print_template_context): Likewise.
2698         (current_tinst_level): Make static to reflect Brendan Kehoe's
2699         change of 1995-04-13.
2700         (push_tinst_level): Call print_instantiation_context.
2702 2000-08-21  Nix  <nix@esperi.demon.co.uk>
2704         * lang-specs.h: Do not process -o or run the assembler if
2705         -fsyntax-only.
2707 2000-08-21  Joseph S. Myers  <jsm28@cam.ac.uk>
2709         * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
2710         variables.
2711         * decl2.c (lang_decode_option): Disable gettext attributes for
2712         -ansi.
2714 2000-08-21  Gabriel Dos Reis  <gdr@codesourcery.com>
2716         * lex.c (lang_init_options): Default diagnostic message maximum
2717         length to 80, when line-wrapping.
2719 2000-08-20  Mark Mitchell  <mark@codesourcery.com>
2721         * class.c (build_vtbl_initializer): Clear the entire
2722         vtbl_init_data.  Start keeping track of the functions for which we
2723         have created vcall offsets here.
2724         (dfs_build_vcall_offset_vtbl_entries): Remove.
2725         (build_vcall_offset_vtbl_entries): Reimplement.
2726         (add_vcall_offset_vtbl_entries_r): New function.
2727         (add_vcall_offset_vtbl_entries_1): Likewise.  Tweak logic for
2728         computing when vcall offsets are necessary.
2730 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
2732         * decl.c (member_function_or_else): Use cp_error ... %T.
2733         (grokdeclarator): Likewise.
2734         (start_method): Likewise.
2735         * friend.c (make_friend_class): Use cp_pedwarn ... %T.
2737 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
2739         * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
2740         TYPE_DECLs.
2742 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
2744         * cp-tree.h (PTRMEM_OK_P): New macro.
2745         (itf_ptrmem_ok): New enumeration value.
2746         * class.c (resolve_address_of_overloaded_function): Add PTRMEM
2747         argument. Diagnose implicit pointer to member.
2748         (instantiate_type): Don't diagnose implicit pointer to member
2749         here. Pass itf_ptrmem_ok if ok. Adjust calls to
2750         resolve_address_of_overloaded_function.
2751         * init.c (build_offset_ref): Set PTRMEM_OK_P.
2752         (resolve_offset_ref): Don't diagnose implicit pointer to member here.
2753         * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
2754         * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
2755         (build_unary_op): Deal with single non-static member in
2756         microsoft-land.
2758 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
2760         * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
2762 2000-08-18  Nathan Sidwell  <nathan@codesourcery.com>
2764         * cp-tree.h (enum_name_string): Remove prototype.
2765         (report_case_error): Remove prototype.
2766         * cp/typeck2.c (enum_name_string): Remove.
2767         (report_case_error): Remove.
2768         * error.c (dump_expr): Deal with enum values directly.
2769         Correctly negate integer constant.
2771 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
2773         * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
2774         (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
2775         * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
2776         (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
2777         (__cxa_vec_new): Use __cxa_vec_new2.
2778         (__cxa_vec_delete): Use __cxa_vec_delete2.
2780 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
2782         * vec.cc (__cxa_vec_new): Set "C" linkage.
2783         (__cxa_vec_ctor): Likewise.
2784         (__cxa_vec_cctor): Likewise.
2785         (__cxa_vec_dtor): Likewise.
2786         (__cxa_vec_delete): Likewise.
2787         * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
2788         (__cxa_vec_ctor): Likewise.
2789         (__cxa_vec_cctor): Likewise.
2790         (__cxa_vec_dtor): Likewise.
2791         (__cxa_vec_delete): Likewise.
2793 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
2795         * class.c (instantiate_type): Reinstate local variable
2796         deleted in previous change.
2798         * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
2799         itf_no_attributes.
2801 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
2803         * cp-tree.h (instantiate_type_flags): New enumeration.
2804         (instantiate_type): Change parameter.
2805         * class.c (instantiate_type): Adjust prototype. Adjust.
2806         * call.c (standard_conversion): Adjust instantiate_type call.
2807         (reference_binding): Likewise.
2808         (build_op_delete_call): Likewise.
2809         (convert_like_real): Likewise.
2810         * cvt.c (cp_convert_to_pointer): Likewise.
2811         (convert_to_reference): Likewise.
2812         * pt.c (convert_nontype_argument): Likewise.
2813         * typeck.c (build_binary_op): Likewise.
2814         (build_ptrmemfunc): Likewise.
2815         (convert_for_assignment): Likewise.
2817 2000-08-17  Nathan Sidwell  <nathan@codesourcery.com>
2819         * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
2820         (current_aggr): Define.
2821         * decl.c (grokdeclarator): Make sure a friend class is an
2822         elaborated type specifier.
2823         * parse.y (current_aggr): Remove static definition.
2824         (cp_parse_init): Adjust.
2825         (structsp): Clear and restore current_aggr.
2826         (component_decl_list): Clear current_aggr.
2828         * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
2829         aggregate tag on the typename's context.
2831         * pt.c (tsubst_friend_class): Return error_mark_node, if
2832         parms becomes NULL.
2833         (instantiate_class_template): Ignore error_mark_node friend types.
2835 2000-08-14  Nathan Sidwell  <nathan@codesourcery.com>
2837         * cvt.c (warn_ref_binding): New static function, broken out of ...
2838         (convert_to_reference): ... here. Use it.
2840 2000-08-11  Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
2842         * parse.y (template_arg): Add rule for template qualified with
2843         global scope.
2845 2000-08-11  Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2847         * decl2.c (add_function): Reorganize.
2848         (arg_assoc): Do not consider function template decls.
2850 2000-08-11  Jason Merrill  <jason@redhat.com>
2852         * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
2853         looking inside.
2855 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
2857         * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
2858         (lookup_nested_tag): Likewise.
2860         * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
2861         can be produced.
2863 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
2865         * parse.y (named_complex_class_head_sans_basetype): Remove
2866         always true if.
2868 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
2870         * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
2871         explicit TEMPLATE_ID_EXPR args.
2872         (build_expr_from_tree, case CALL_EXPR): Likewise.
2874 2000-08-11  Nathan Sidwell  <nathan@codesourcery.com>
2876         * decl.c (check_tag_decl): Diagnose typename's which don't
2877         declare anything.
2879 2000-08-10  Nathan Sidwell  <nathan@codesourcery.com>
2881         * init.c (build_aggr_init): Reject bogus array initializers
2882         early.
2884 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
2886         * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
2887         runtime.
2888         * cp/tinfo.cc (__dynamic_cast): Likewise.
2889         * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
2891 2000-08-09  Nathan Sidwell  <nathan@codesourcery.com>
2893         * cvt.c (convert_to_pointer_force): Fix error message when
2894         attempting to cast from ambiguous base.
2896 2000-08-08  Jason Merrill  <jason@redhat.com>
2898         * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
2899         (tsubst_template_arg_vector): Likewise.
2901         * decl2.c (build_anon_union_vars): Choose the largest field; don't
2902         assume that one will be as large as the union.
2904 2000-08-07  Kazu Hirata  <kazu@hxi.com>
2906         * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
2907         * decl.c (pop_labels): Likewise.
2909 2000-08-04  Jeffrey Oldham  <oldham@codesourcery.com>
2911         * inc/cxxabi.h (__pbase_type_info): Changed member names to match
2912         specifications.
2913         (__pointer_to_member_type_info): Likewise.
2914         (__base_class_info): Likewise.
2915         (__class_type_info): Likewise.
2916         (__si_class_type_info): Likewise.
2917         (__vmi_class_type_info): Likewise.
2918         * tinfo.cc (__si_class_type_info::__do_find_public_src):
2919         Changed member names to match specifications.
2920         (__vmi_class_type_info::__do_find_public_src): Likewise.
2921         (__si_class_type_info::__do_dyncast): Likewise.
2922         (__vmi_class_type_info::__do_dyncast): Likewise.
2923         (__si_class_type_info::__do_upcast): Likewise.
2924         (__vmi_class_type_info::__do_upcast): Likewise.
2925         * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
2926         (__pbase_type_info::__pointer_catch): Likewise.
2927         (__pointer_type_info::__pointer_catch): Likewise.
2928         (__pointer_to_member_type_info::__pointer_catch): Likewise.
2930 2000-08-04  Zack Weinberg  <zack@wolery.cumb.org>
2932         * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
2933         * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
2934         (cc1plus): Link with $(BACKEND) and $(C_OBJS).
2936 2000-08-04  Mark Mitchell  <mark@codesourcery.com>
2938         * cp-tree.h (add_method): Change prototype.
2939         * class.c (add_method): Remove FIELDS parameter.  Add ERROR_P.
2940         Don't double the size of the method vector in the error case.
2941         (handle_using_decl): Adjust call to add_method.
2942         (add_implicitly_declared_members): Likewise.
2943         (clone_function_decl): Likewise.
2944         * decl2.c (check_classfn): Likewise.
2945         * semantics.c (finish_member_declaration): Likewise.
2947 2000-08-04  Joseph S. Myers  <jsm28@cam.ac.uk>
2949         * decl.c (flag_isoc94): New variable.
2951 2000-08-02  Jason Merrill  <jason@redhat.com>
2953         * pt.c (do_type_instantiation): Add complain parm; don't complain
2954         if called recursively.
2955         * cp-tree.h, parse.y: Adjust.
2957 2000-08-02  Zack Weinberg  <zack@wolery.cumb.org>
2959         * decl2.c: Silently ignore -Wstrict-prototypes; warn about
2960         -Wno-strict-prototypes.
2962         * g++spec.c: Adjust type of second argument to
2963         lang_specific_driver, and update code as necessary.
2965         * cp-tree.h: Don't prototype min_precision here.
2966         (my_friendly_assert): Cast expression to void.
2967         * semantics.c (do_poplevel): Initialize scope_stmts.
2969 2000-08-02  Mark Mitchell  <mark@codesourcery.com>
2971         * cp-tree.h (DECL_NEEDED_P): Tweak.
2973 2000-07-28  Jason Merrill  <jason@redhat.com>
2975         * lang-specs.h: Use %i in rule for .ii files.
2977 2000-07-31  Zack Weinberg  <zack@wolery.cumb.org>
2979         * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
2981 2000-07-30  Mark Mitchell  <mark@codesourcery.com>
2983         Allow indirect primary bases.
2984         * cp-tree.h (struct lang_type): Remove vfield_parent.  Add
2985         primary_base.
2986         (CLASSTYPE_VFIELD_PARENT): Remove.
2987         (CLASSTYPE_PRIMARY_BINFO): Reimplement.
2988         (BINFO_PRIMARY_BINFO): Remove.
2989         (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
2990         (BINFO_VBASE_PRIMARY_P): Likewise.
2991         (BINFO_PRIMARY_BASE_OF): New macro.
2992         (BINFO_INDIRECT_PRIMARY_P): Likewise.
2993         (get_primary_binfo): New function.
2994         * decl.c (lang_mark_tree): Make lang_type::primary_base.
2995         * class.c (vcall_offset_data_s): Rename to ...
2996         (vtbl_init_data_s): ... this.  Rename primary_p to primary_vtbl_p,
2997         and add ctor_vtbl_p.
2998         (get_derived_offset): Use get_primary_binfo.
2999         (dfs_mark_primary_bases): Adjust handling of virtual primary
3000         bases.
3001         (mark_primary_bases): Likewise.
3002         (set_primary_base): Take a binfo, not an integer, as a
3003         representation of the primary base.
3004         (indirect_primary_base_p): Remove.
3005         (determine_primary_base): Adjust for indirect primary bases.
3006         (dfs_find_final_overrider): Fix typo in coment.
3007         (update_vtable_entry_for_fn): Use get_primary_binfo.
3008         (layout_nonempty_base_or_field): Tweak.
3009         (build_base_fields): Adjust for new primary base semantics.
3010         (dfs_propagate_binfo_offsets): Remove.
3011         (propagate_binfo_offsets): Rewrite.
3012         (dfs_set_offset_for_shared_vbases): Remove.
3013         (layout_virtual_bases): Don't use it.
3014         (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
3015         ABI.
3016         (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
3017         CLASSTYPE_VFIELD_PARENT.
3018         (dfs_get_primary_binfo): New function.
3019         (get_primary_binfo): Likewise.
3020         (dump_class_hierarchy_r): Tweak printing of primary bases.
3021         (build_vtbl_initializer): Fix typo in comments.  Use
3022         vtbl_init_data.
3023         (build_vcall_and_vbase_vtbl_entries): Likewise.
3024         (build_vbaes_offset_vtbl_entries): Likewise.
3025         (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
3026         BV_VCALL_INDEX to handle indirect primary bases.
3027         (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
3028         (build_rtti_vtbl_entries): Likewise.
3029         * search.c (get_shared_vbase_if_not_primary): Tweak.
3030         (find_vbase_instance): Likewise.
3031         (binfo_for_vtable): Simplify.
3032         * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
3033         (make_binfo): Make it have 11 entries.
3035 2000-07-30  Alex Samuel  <samuel@codesourcery.com>
3037         * mangle.c (DECL_TEMPLATE_ID_P): Remove.
3038         (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
3039         ascertaining primaryness.
3040         (G): Remove template_args.
3041         (decl_is_template_id): New function.
3042         (write_encoding): Use decl_is_template_id.
3043         (write_name): Likewise.  Handle type_decls.  Get main variant of
3044         type decls.
3045         (write_nested_name): Likewise.
3046         (write_prefix): Likewise.
3047         (write_template_prefix): Likewise.
3048         (write_special_name_constructor): Remove defunct production from
3049         comment.
3050         (write_bare_function_type): Remove comment about absent parameter.
3051         (write_template_template_arg): Add missing grammar production to
3052         comment.
3054 2000-07-27  Jason Merrill  <jason@redhat.com>
3056         * decl.c (duplicate_decls): If common_type produces a non-typedef
3057         type for a typedef, just use the old type.
3059 2000-07-27  Mark Mitchell  <mark@codesourcery.com>
3061         * cp-tree.h (function_depth): Declare.
3062         (verify_stmt_tree): Likewise.
3063         (find_tree): Likewise.
3064         * decl.c (function_depth): Give it external linkage.
3065         * optimize.c (optimize_function): Increment and decrement it.
3066         * tree.c (verify_stmt_tree_r): New function.
3067         (verify_stmt_tree): Likewise.
3068         (find_tree_r): Likewise.
3069         (find_tree): Likewise.
3071 2000-07-27  Jason Merrill  <jason@redhat.com>
3073         * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
3074         TYPE_PTRMEMFUNC_P.
3075         * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
3077 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
3079         * decl.c (start_cleanup_fn): Mark the function as `inline'.
3080         * decl2.c (get_guard): Call cp_finish_decl, not
3081         rest_of_decl_compilation, for local guards.
3082         * lex.c (do_identifier): Remove unused variable.
3084 Wed Jul 26 15:05:51 CEST 2000   Marc Espie <espie@cvs.openbsd.org>
3086         * parse.y:  Add missing ';'.
3088 2000-07-26  Mark Mitchell  <mark@codesourcery.com>
3090         * parse.y (empty_parms): Use `()', not `(...)', when in the scope
3091         of `extern "C++"'.
3093 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3095         Kill strict_prototype. Backwards compatibility only for
3096         non NO_IMPLICIT_EXTERN_C systems.
3097         * cp-tree.h (flag_strict_prototype): Remove.
3098         (strict_prototype): Remove.
3099         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
3100         * decl.c (maybe_push_to_top_level): Adjust.
3101         (pop_from_top_level): Adjust.
3102         (decls_match): Only allow sloppy parm matching for ancient
3103         system headers.
3104         (init_decl_processing): Adjust.
3105         (grokdeclarator): Adjust.
3106         * decl2.c (flag_strict_prototype): Remove.
3107         (strict_prototype): Remove.
3108         (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
3109         (lang_f_options): Remove "strict-prototype".
3110         (unsupported-options): Add "strict-prototype".
3111         * lex.c (do_identifier): Adjust.
3112         (do_scoped_id): Adjust.
3113         * parse.y (empty_parms): Adjust.
3114         * class.c (push_lang_context): Adjust.
3115         (pop_lang_context): Adjust.
3116         * typeck.c (comp_target_parms): Adjust.
3118 2000-07-25  Nathan Sidwell  <nathan@codesourcery.com>
3120         * decl.c (poplevel): Deal with anonymous variables at for scope.
3121         (maybe_inject_for_scope_var): Likewise.
3123 2000-07-25  Zack Weinberg  <zack@wolery.cumb.org>
3125         * decl.c: Remove all signal handling code, now done in toplev.c.
3127 2000-07-23  Mark Mitchell  <mark@codesourcery.com>
3129         * decl.c (make_rtl_for_nonlocal_decl): Rework.
3131         * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
3132         correctly.
3134 2000-07-20  Zack Weinberg  <zack@wolery.cumb.org>
3136         * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
3137         Define my_friendly_assert and my_friendly_abort as macros
3138         which may call friendly_abort.  Prototype friendly abort, not
3139         my_friendly_abort or my_friendly_assert.
3140         * decl.c (signal_catch): Report the signal caught in the error
3141         message.  Call fatal directly.
3142         * typeck2.c (ack, my_friendly_assert): Delete.
3143         (my_friendly_abort): Rename to friendly_abort.  Expect file,
3144         line, and function parameters.  Report the abort code, then
3145         call fancy_abort.  Do not mask an abort if errors have
3146         already occurred.
3148 2000-07-18  Nathan Sidwell  <nathan@codesourcery.com>
3150         * typeck.c (comp_target_parms): Remove obsolete parameter.
3151         (comp_target_types): Adjust.
3153 2000-07-17  Jason Merrill  <jason@redhat.com>
3155         * typeck.c (mark_addressable): Never set TREE_USED.
3156         * call.c (build_call): Don't abort on calls to library functions
3157         that have been declared normally.
3159         * typeck.c (build_binary_op): Fix grammar in warning.
3161         * exception.cc (__eh_free): Fix prototype.
3163         * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
3165         * decl.c (pushdecl): Handle seeing an OVERLOAD in
3166         IDENTIFIER_NAMESPACE_VALUE.
3168 2000-07-16  Mark Mitchell  <mark@codesourcery.com>
3170         * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
3171         * method.c (use_thunk): Correct handling of vcall offsets.
3173 2000-07-14  Zack Weinberg  <zack@wolery.cumb.org>
3175         * .cvsignore: parse.h and parse.c have no cp- prefix.
3177 2000-07-13  Mark Mitchell  <mark@codesourcery.com>
3179         * .cvsignore: New file.
3181 2000-07-13  Zack Weinberg  <zack@wolery.cumb.org>
3183         * lang-specs.h: Use the new named specs.  Remove unnecessary braces.
3185 2000-07-12  Mark Mitchell  <mark@codesourcery.com>
3187         * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
3188         * parse.c: Remove.
3189         * parse.h: Likewise.
3191 2000-07-11  Mark Mitchell  <mark@codesourcery.com>
3193         * class.c (layout_class_type): Add pointers to virtual bases after
3194         base classes under the old ABI.
3196 2000-07-10  Benjamin Chelf  <chelf@codesourcery.com>
3198         * semantics.c (finish_for_stmt): Remove call to emit_line_note.
3199         (finish_continue_stmt): Likewise.
3200         (begin_for_stmt): Remove call to note_level_for_for.
3201         (finish_goto_stmt): Change call from build_min_nt
3202         to build_stmt.
3203         (finish_expr_stmt): Likewise.
3204         (begin_if_stmt): Likewise.
3205         (begin_while_stmt): Likewise.
3206         (finish_while_stmt): Likewise.
3207         (finish_return_stmt): Likewise.
3208         (begin_for_stmt): Likewise.
3209         (finish_for_stmt): Likewise.
3210         (finish_break_stmt): Likewise.
3211         (begin_switch_stmt): Likewise.
3212         (finish_case_label): Likewise.
3213         (genrtl_try_block): Likewise.
3214         (begin_try_block): Likewise.
3215         (begin_handler): Likewise.
3216         (begin_compound_stmt): Likewise.
3217         (finish_asm_stmt): Likewise.
3218         (finish_label_stmt): Likewise.
3219         (add_decl_stmt): Likewise.
3220         (finish_subobject): Likewise.
3221         (finish_decl_cleanup): Likewise.
3222         (finish_named_return_value): Likewise.
3223         (setup_vtbl_ptr): Likewise.
3224         (add_scope_stmt): Likewise.
3225         * decl.c (finish_constructor_body): Likewise.
3226         (finish_destructor_body): Likewise.
3227         * optimize.c (copy_body_r): Likewise.
3228         (initialize_inlined_parameters): Likewise.
3229         (declare_return_variable): Likewise.
3230         (expand_call_inline): Likewise.
3232 2000-07-10  Jakub Jelinek  <jakub@redhat.com>
3234         * semantics.c (expand_body): Sync interface information
3235         at the end of function body expansion.
3237 2000-07-09  Jason Merrill  <jason@redhat.com>
3239         * init.c (build_new_1): Bail early if the call to new fails.
3241         * decl.c (compute_array_index_type): Check specifically for
3242         an INTEGER_CST, not just TREE_CONSTANT.
3244         * decl.c (duplicate_decls): Don't call duplicate_decls on
3245         the DECL_TEMPLATE_RESULT.
3246         (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
3247         codes.
3249         * error.c (dump_template_bindings): Don't crash if we had an
3250         invalid argument list.
3252         * typeck.c (c_expand_start_case): Do narrowing here.
3253         * semantics.c (finish_switch_cond): Not here.
3255 2000-07-09  Hidvegi Zoli  <hzoli@austin.ibm.com>
3257         * parse.y (asm_clobbers): Do string concatenation.
3259 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
3261         * decl.c (pushtag): Don't put local classes in template functions
3262         on the local_classes list.
3264 2000-07-04  Scott Snyder  <snyder@fnal.gov>
3266         * decl2.c (get_guard): Add missing return for old ABI local
3267         variable case.
3269 2000-07-09  Mark Mitchell  <mark@codesourcery.com>
3271         * cp-tree.h (char_type_p): New function.
3272         * decl.c (init_decl_processing): Don't initialize
3273         signed_wchar_type_node or unsigned_wchar_type_node.
3274         (complete_array_type): Handle brace-enclosed string-constants.
3275         * rtti.c (emit_support_tinfos): Remove #if 0'd code.
3276         * tree.c (char_type_p): New function.
3277         * typeck2.c (digest_init): Use char_type_p.
3279 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
3281         * pt.c (tsubst): Don't layout type, if it's error_mark.
3283 2000-07-06  Nathan Sidwell  <nathan@codesourcery.com>
3285         * pt.c (instantiate_pending_templates): Reset template level.
3287 2000-07-05  Jason Merrill  <jason@redhat.com>
3289         * call.c (joust): Don't complain about `operator char *()' beating
3290         `operator const char *() const'.
3292 2000-07-04  scott snyder  <snyder@fnal.gov>
3293             Jason Merrill  <jason@redhat.com>
3295         * repo.c (repo_get_id): Handle the case where a class with virtual
3296         bases has a null TYPE_BINFO_VTABLE.
3298 2000-07-04  Kevin Buhr  <buhr@stat.wisc.edu>
3299             Jason Merrill  <jason@redhat.com>
3301         * parse.y (member_init): Just pass in the type.
3302         * init.c (expand_member_init): Handle getting a type.
3304 2000-07-04  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3305             Jason Merrill  <jason@redhat.com>
3307         * decl.c (finish_function): Warn if a function has no return
3308         statement.
3309         Suggested by Andrew Koenig.
3310         * typeck.c (check_return_expr): Do set current_function_returns_value
3311         if we got an error_mark_node.
3313 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
3315         * decl2.c (push_decl_namespace): Push the original namespace.
3317 2000-07-03  Nathan Sidwell  <nathan@codesourcery.com>
3319         * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
3320         * semantics.c (begin_class_definition): Clear it.
3322 2000-07-02  Benjamin Chelf  <chelf@codesourcery.com>
3324         * cp-tree.h (genrtl_goto_stmt): Remove declaration.
3325         (genrtl_expr_stmt): Likewise.
3326         (genrtl_decl_stmt): Likewise.
3327         (genrtl_if_stmt): Likewise.
3328         (genrtl_while_stmt): Likewise.
3329         (genrtl_do_stmt): Likewise.
3330         (genrtl_return_stmt): Likewise.
3331         (genrtl_for_stmt): Likewise.
3332         (genrtl_break_stmt): Likewise.
3333         (genrtl_continue_stmt): Likewise.
3334         (genrtl_scope_stmt): Likewise.
3335         (genrtl_switch_stmt): Likewise.
3336         (genrtl_case_label): Likewise.
3337         (genrtl_begin_compound_stmt): Likewise.
3338         (genrtl_finish_compound_stmt): Likewise.
3339         (genrtl_compound_stmt): Likewise.
3340         (genrtl_asm_stmt): Likewise.
3342         * init.c (begin_init_stmts): Remove call to
3343         genrtl_begin_compound_stmt.
3344         (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
3346         * semantics.c (lang_expand_stmt): Changed call to
3347         genrtl_compound_stmt to ignore return value.
3349 2000-07-02  Mark Mitchell  <mark@codesourcery.com>
3351         * mangle.c (canonicalize_for_substitution): Return the canonical
3352         variant of a type.
3354         * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
3355         TYPE_DECL.
3356         * typeck.c (commonparms): Remove obstack manipulations.
3358 2000-07-01  Benjamin Chelf  <chelf@codesourcery.com>
3360         * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
3362         * Makefile.in (OBJS): Added ../c-semantics.o.
3363         (OBJDEPS): Likewise.
3365         * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
3366         ../c-common.h.
3367         (struct stmt_tree): Added comment.
3368         (current_function_name_declared): Removed.
3369         (stmts_are_full_exprs_p): Likewise.
3370         (genrtl_do_pushlevel): Likewise.
3371         (genrtl_clear_out_block): Likewise.
3372         (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
3373         (DECL_ANON_UNION_ELEMS): Likewise.
3374         (emit_local_var): Likewise.
3375         (make_rtl_for_local_static): Likewise.
3376         (do_case): Likewise.
3377         (expand_stmt): Likewise.
3378         (genrtl_decl_cleanup): Likewise.
3379         (c_expand_asm_operands): Likewise.
3380         (c_expand_return): Likewise.
3381         (c_expand_start_case): Likewise.
3383         * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
3384         (emit_local_var): Likewise.
3385         (initialize_local_var): Change reference to
3386         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
3387         Change reference to stmts_are_full_exprs_p to
3388         current_stmt_tree->stmts_are_full_exprs_p.
3389         (push_cp_function_context): Likewise.
3391         * expect.c (expand_throw): Change reference to
3392         stmts_are_full_exprs_p.
3394         * init.c (build_aggr_init): Change reference to
3395         stmts_are_full_exprs_p.
3396         (build_vec_init): Likewise.
3398         * optimize.c (maybe_clone_body): Change reference to
3399         current_function_name_declared to
3400         cp_function_chain->name_declared.
3402         * pt.c (instantiate_decl): Change reference to
3403         current_function_name_declared to
3404         cp_function_chain->name_declared.
3406         * semantics.c (expand_cond): Moved declaration to c-common.h.
3407         (genrtl_do_pushlevel): Moved to c-semantics.c.
3408         (genrtl_clear_out_block): Likewise.
3409         (genrtl_goto_stmt): Likewise.
3410         (genrtl_expr_stmt): Likewise.
3411         (genrtl_decl_stmt): Likewise.
3412         (gerntl_if_stmt): Likewise.
3413         (genrtl_while_stmt): Likewise.
3414         (genrtl_do_stmt): Likewise.
3415         (genrtl_return_stmt): Likewise.
3416         (genrtl_for_stmt): Likewise.
3417         (genrtl_break_stmt): Likewise.
3418         (genrtl_continue_stmt): Likewise.
3419         (genrtl_scope_stmt): Likewise.
3420         (genrtl_switch_stmt): Likewise.
3421         (genrtl_case_label): Likewise.
3422         (genrtl_begin_compound_stmt): Likewise.
3423         (genrtl_finish_compound_stmt): Likewise.
3424         (genrtl_compound_stmt): Likewise.
3425         (genrtl_asm_stmt): Likewise.
3426         (genrtl_decl_cleanup): Likewise.
3427         (expand_cond): Likewise.
3428         (expand_stmt): Renamed to ...
3429         (lang_expand_stmt): ... this.
3430         (lang_expand_expr_stmt): Initialize.
3431         (set_current_function_name_declared): Likewise.
3432         (stmts_are_full_exprs_p): Likewise.
3433         (current_function_name_declared): Likewise.
3434         (anon_aggr_type_p): Likewise.
3435         (do_poplevel): Change reference to
3436         stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
3437         Change reference to stmts_are_full_exprs_p to
3438         current_stmt_tree->stmts_are_full_exprs_p.
3439         (add_tree): Likewise.
3440         (finish_expr_stmt): Likewise.
3441         (prep_stmt): Likewise.
3442         (lang_expand_stmt): Likewise.
3443         (begin_compound_stmt): Change reference to
3444         current_function_name_declared to
3445         cp_function_chain->name_declared and call to
3446         current_function_name_declared().
3447         (setup_vtbl_ptr): Likewise.
3448         (genrtl_do_poplevel): Removed.
3450 2000-06-30  Jason Merrill  <jason@redhat.com>
3452         * init.c (init_init_processing): Go back to aligning like
3453         double_type_node for old ABI.
3454         (get_cookie_size): Make cookie larger if we get a type that needs
3455         more alignment.
3456         (build_vec_delete): Call it.
3458         * typeck.c (qualify_type_recursive): New fn.
3459         (composite_pointer_type): Use it.
3460         (build_binary_op): Use composite_pointer_type.
3462 2000-06-24  Carlos O'Ryan  <coryan@cs.wustl.edu>
3463             Jason Merrill  <jason@redhat.com>
3465         * typeck.c (check_return_expr): Don't complain about returning
3466         NULL from operator new if -fcheck-new.
3467         * cp-tree.h: Declare flag_check_new here.
3468         * init.c: Not here.
3470 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
3472         * mangle.c (find_substitution): Use same_type_p.
3473         (write_encoding): Don't check for substitutions.
3475 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
3477         * parse.y (expr_no_comma_rangle): New non-terminal.
3478         (template_parm): Use it for default parameter case.
3479         (template_arg): Use it.
3480         (expr_no_commas): Remove commented out undefined extensions.
3481         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
3482         * parse.h, parse.c: Rebuilt.
3484 2000-06-30  Mark Mitchell  <mark@codesourcery.com>
3486         * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
3487         (finish_asm_stmt): Do it here, instead.
3489         * cp-tree.h (ridpointers): Don't declare.
3490         * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
3491         (record_builtin_java_type): Likewise.
3492         (init_decl_processing): Likewise.
3493         * lex.c: Move inclusion of lex.h.
3494         (ridpointers): Don't define.
3495         (init_parse): Initialize ripdointers.  Use CP_RID_MAX instead of
3496         RID_MAX.
3497         * lex.h (enum rid): Rename to ...
3498         (enum cp_rid): ... this.
3499         (ridpointers): Don't declare.
3500         * parse.y: Move inclusion of lex.h.
3501         * parse.c: Regenerated.
3502         * spew.c: Move inclusion of lex.h.
3504         * cp-tree.h (struct language_function): Remove temp_name_counter.
3505         (temp_name_counter): Remove.
3506         (get_temp_name): Change prototype.
3507         (get_guard): New function.
3508         (get_guard_cond): Likewise.
3509         (set_guard): Likewise.
3510         * cvt.c (build_up_reference): Adjust call to get_temp_name.
3511         * decl.c (expand_static_init): Use get_guard and friends to
3512         implement guard variables.
3513         * decl2.c (get_temp_name): Assume that the variables created are
3514         always static.
3515         (get_sentry): Rename to ...
3516         (get_guard): ... this.  Implement new ABI guard variables.
3517         (get_guard_bits): New function.
3518         (get_guard_cond): Likewise.
3519         (set_guard): Likewise.
3520         (start_static_initialization_or_destruction): Use them.
3521         (do_static_initialization): Replace sentry with guard throughout.
3522         (do_static_destruction): Likewise.
3523         * init.c (create_temporary_var): Add comment.
3525 2000-06-28  Alex Samuel  <samuel@codesourcery.com>
3527         * mangle.c (find_substitution): Use same_type_p.
3528         (write_encoding): Don't check for substitutions.
3530 2000-06-30  Nathan Sidwell  <nathan@codesourcery.com>
3532         * parse.y (expr_no_comma_rangle): New non-terminal.
3533         (template_parm): Use it for default parameter case.
3534         (template_arg): Use it.
3535         (expr_no_commas): Remove commented out undefined extensions.
3536         * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
3537         * parse.h, parse.c: Rebuilt.
3539 2000-06-29  Mark Mitchell  <mark@codesourcery.com>
3541         * cp-tree.h (flag_const_strings): Remove.
3542         (warn_parentheses): Likewise.
3543         (warn_format): Likewise.
3544         (common_type): Likewise.
3545         (default_conversion): Likewise.
3546         (build_binary_op): Likewise.
3547         (cp_build_binary_op): New macro.
3548         * call.c (build_new_op): Use cp_build_binary_op instead of
3549         build_binary_op.
3550         * class.c (build_vtable_entry_ref): Likewise.
3551         * decl.c (expand_static_init): Likewise.
3552         (compute_array_index_type): Likewise.
3553         (build_enumerator): Likewise.
3554         * decl2.c (delete_sanity): Likewise.
3555         (start_static_initialization_or_destruction): Likewise.
3556         * error.c (dump_type_suffix): Likewise.
3557         * init.c (resolve_offset_ref): Likewise.
3558         (build_new): Likewise.
3559         (build_new_1): Likewise.
3560         (build_vec_delete_1): Likewise.
3561         (build_vec_init): Likewise.
3562         (build_delete): Likewise.
3563         * rtti.c (synthesize_tinfo_fn): Likewise.
3564         (synthesize_tinfo_var): Likewise.
3565         * search.c (expand_upcast_fixups): Likewise.
3566         (fixup_all_virtual_upcast_offsets): Likewise.
3567         * typeck.c (build_array_ref): Likewise.
3568         (get_member_function_from_ptrfunc): Likewise.
3569         (build_binary_op): Add parameter.
3570         (pointer_int_sum): Use cp_build_binary_op.
3571         (pointer_diff): Likewise.
3572         (build_modify_expr): Likewise.
3573         (get_delta_difference): Likewise.
3574         (build_ptrmemfunc): Likewise.
3576 2000-06-29  Nathan Sidwell  <nathan@codesourcery.com>
3578         * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
3579         * decl.c (create_implicit_typedef): Adjust.
3580         * decl2.c (build_artificial_parm): Adjust.
3581         * method.c (implicitly_declare_fn): Adjust.
3582         * pt.c (push_inline_template_parms_recursive): Adjust.
3583         (process_template_parm): Adjust.
3584         (overloaded_template_name): Adjust.
3585         * semantics.c (finish_template_template_parm): Adjust.
3587 2000-06-28  Mark Mitchell  <mark@codesourcery.com>
3589         * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
3590         * class.c (update_vtable_entry_for_fn): Correct logic for deciding
3591         where to emit thunks.
3592         (build_vtt): Adjust call to build_vtt_inits.
3593         (build_vtt_inits): Add parameter to indicate whether or not
3594         sub-VTTs for virtual bases should be included.  Adjust handling of
3595         construction vtables.
3596         (get_matching_base): New function.
3597         (dfs_build_vtt_inits): Rename to ...
3598         (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
3599         construction vtables.
3600         (dfs_fixup_binfo_vtbls): Likewise.
3601         (build_ctor_vtbl_groups): Build construction vtables for virtual
3602         bases, too.
3603         (accumulate_vtbl_inits): Tweak logic for deciding whether or not
3604         to build construction vtbls.
3605         (dfs_accumulate_vtbl_inits): Adjust handling of
3606         construction vtables.
3608         * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
3609         types correctly.
3611 2000-06-27  Mark Mitchell  <mark@codesourcery.com>
3613         * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
3615 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
3617         * search.c (hides): Remove.
3618         (is_subobject_of_p): Add most_derived parameter. Use
3619         CANONICAL_BINFO.
3620         (lookup_field_queue_p): Adjust.
3621         (lookup_field_r): Adjust.
3623 2000-06-26  Nathan Sidwell  <nathan@codesourcery.com>
3625         * decl2.c (handle_class_head): Bash typedefs to the type's main
3626         decl.
3628 2000-06-25  Mark Mitchell  <mark@codesourcery.com>
3630         * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
3631         (begin_global_stmt_expr): ... this.
3632         (genrtl_finish_stmt_expr): Rename to ...
3633         (finish_global_stmt_expr): ... this.
3634         * init.c (begin_init_stmts): Adjust calls.
3635         (finish_init_stmts): Likewise.
3636         * semantics.c (genrtl_begin_stmt_expr): Rename to ...
3637         (begin_global_stmt_expr): ... this.
3638         (genrtl_finish_stmt_expr): Rename to ...
3639         (finish_global_stmt_expr): ... this.
3641 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
3643         * search.c (lookup_member): Fix typo in comment.
3645 2000-06-24  Jason Merrill  <jason@redhat.com>
3647         * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
3648         (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
3650 2000-06-24  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
3652         * parse.y (complex_direct_notype_declarator): Support global_scope.
3653         * Makefile.in: Adjust conflict count.
3655 2000-06-23  Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
3657         * parse.y (template_arg): Convert TEMPLATE_DECL
3658         that is a template template paramter to
3659         TEMPLATE_TEMPLATE_PARM here.
3661         * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
3662         * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
3663         (copy_template_template_parm): Adjust prototype.
3664         * decl.c (grokdeclarator): Remove dead code.
3665         * pt.c (process_template_parm): Tidy.
3666         (lookup_template_class): Construct nodes in
3667         copy_template_template_parm.
3668         (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
3669         lookup_template_class.  Use TYPE_TI_TEMPLATE.
3670         * tree.c (copy_template_template_parm): Add NEWARGS
3671         parameter.
3672         (mapcar): Adjust call to copy_template_template_parm.
3673         * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
3674         * method.c (build_template_template_parm_names): Change error
3675         code to avoid compilation warning.
3677         * gxxint.texi: Document template template parameter
3678         name mangling.
3680 2000-06-21  Alex Samuel  <samuel@codesourcery.com>
3682         * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
3683         (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
3684         (cp-demangle.o): New rule.
3685         (dyn-string.o): Likewise.
3686         * inc/cxxabi.h (__cxa_demangle): New declaration.
3688 2000-06-22  Mark Mitchell  <mark@codesourcery.com>
3690         * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
3691         (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
3692         (lang_decl_flags): Add generate_with_vtable_p.  Make vcall_offset
3693         a tree, not an int.
3694         (THUNK_GENERATE_WITH_VTABLE_P): New macro.
3695         (make_thunk): Change prototype.
3696         (emit_thunk): Rename to use_thunk.
3697         (mangle_thunk): Change prototype.
3698         * class.c (get_derived_offset): Simplify.
3699         (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
3700         BV_GENERATE_THUNK_WITH_VTABLE_P.
3701         (build_primary_vtable): Simplify.
3702         (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
3703         (dfs_find_base): Remove.
3704         (update_vtable_entry_for_fn): Correct bug in finding the base
3705         where a virtual function was first declared.  Figure out whether
3706         or not to emit a vcall-thunk with the vtables in which it appears.
3707         Correct logic for deciding whether to use an ordinary thunk, or a
3708         vcall thunk.
3709         (finish_struct_1): Remove unnecssary code.
3710         (build_vtbl_initializer): Use ssize_int for the running counter of
3711         negative indices.
3712         (build_vtbl_initializer): Only use vcall thunks where necessary.
3713         Mark thunks as needing to be emitted with their vtables, or not.
3714         (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
3715         indices.  Use size_binop.
3716         (dfs_build_vcall_offset_vtbl_entries): Don't rely on
3717         BINFO_PRIMARY_MARKED_P here.  Use BV_FN consistently.  Use
3718         size_binop.
3719         (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
3720         (build_vtable_entry): Mark thunks as needing to be emitted with
3721         their vtables, or not.
3722         * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
3723         * decl2.c (mark_vtable_entries): Use use_thunk instead of
3724         emit_thunk.
3725         * dump.c (dequeue_and_dump): Remove dead code.  Dump new thunk
3726         information.
3727         * error.c (dump_expr): Use BV_FN.
3728         * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
3729         not an int.
3730         * method.c (make_thunk): Likewise.
3731         (emit_thunk): Rename to use_thunk.  Allow callers to decide
3732         whether or not to actually emit the thunk.  Adjust for changes in
3733         representation of vcall offsets.
3734         * search.c (dfs_get_pure_virtuals): Use BV_FN.
3735         * semantics.c (emit_associated_thunks): New function.
3736         (expand_body): Use it.
3737         * ir.texi: Adjust decriptions of thunks.
3739 2000-06-22  Jason Merrill  <jason@redhat.com>
3741         * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
3742         (tsubst_friend_function): Copy it here.
3744         * decl.c (grok_op_properties): Fix typo.
3746         * decl2.c (delete_sanity): Clarify warning, avoid failure on
3747         deleting void*.
3749         * pt.c (check_explicit_specialization): Clarify error.
3751         * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
3752         an old OVERLOAD when we're declaring a non-function.
3753         (pushdecl, destroy_local_var): Check for error_mark_node.
3754         (warn_extern_redeclared_static): Also bail early if
3755         we're a CONST_DECL.
3756         (push_overloaded_decl): Ignore an old error_mark_node.
3758 2000-06-22  Nathan Sidwell  <nathan@codesourcery.com>
3760         * call.c (build_x_va_arg): Check if in a template decl.
3761         * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
3763 2000-06-20  Alexandre Petit-Bianco  <apbianco@cygnus.com>
3765         * class.c (push_lang_context): TYPE_NAME gets you to the Java
3766         types DECLs.
3767         * decl.c (check_goto): Computed gotos assumed OK.
3769 2000-06-20  Jason Merrill  <jason@redhat.com>
3771         * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
3772         for which we don't need to look for instantiations.
3774 2000-06-21  Nathan Sidwell  <nathan@codesourcery.com>
3776         * parse.y (program): Always call finish_translation_unit.
3777         * parse.c, parse.h: Rebuilt.
3779 2000-06-20  Zack Weinberg  <zack@wolery.cumb.org>
3781         * method.c: Don't include hard-reg-set.h.
3783 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
3785         * rtti.c (get_base_offset): Cope when vbase field is in a base.
3787 2000-06-20  Nathan Sidwell  <nathan@codesourcery.com>
3789         * call.c (build_conditional_expr): Use VOID_TYPE_P.
3790         * cvt.c (cp_convert_to_pointer): Likewise.
3791         (convert_to_void): Likewise.
3792         * error.c (dump_expr): Likewise.
3793         * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
3794         * init.c (build_delete): Likewise.
3795         * method.c (emit_thunk): Likewise.
3796         * optmize.c (declare_return_variable): Likewise.
3797         * rtti.c (get_tinfo_decl_dynamic): Likewise.
3798         (get_typeid): Likewise.
3799         (build_dynamic_cast_1): Likewise.
3800         * typeck.c (composite_pointer_type): Likewise.
3801         (common_type): Likewise.
3802         (build_indirect_ref): Likewise.
3803         (build_binary_op): Likewise.
3804         (build_x_compound_expr): Likewise.
3805         (check_return_expr): Likewise.
3806         * typeck2.c (add_exception_specifier): Likewise.
3808         * mangle.c (write_method_parms): Use direct comparison for end
3809         of parmlist.
3811 2000-06-19  Benjamin Chelf  <chelf@codesourcery.com>
3813         * cp-tree.h (genrtl_try_block): Declare function.
3814         (genrtl_handler): Likewise.
3815         (genrtl_catch_block): Likewise.
3816         (genrtl_ctor_stmt): Likewise.
3817         (genrtl_subobject): Likewise.
3818         (genrtl_decl_cleanup): Likewise.
3819         (genrtl_do_poplevel): Likewise.
3820         (genrtl_do_pushlevel): Likewise.
3821         (genrtl_clear_out_block): Likewise.
3822         (genrtl_goto_stmt): Likewise.
3823         (genrtl_expr_stmt): Likewise.
3824         (genrtl_decl_stmt): Likewise.
3825         (genrtl_if_stmt): Likewise.
3826         (genrtl_while_stmt): Likewise.
3827         (genrtl_do_stmt): Likewise.
3828         (genrtl_return_stmt): Likewise.
3829         (genrtl_for_stmt): Likewise.
3830         (genrtl_break_stmt): Likewise.
3831         (genrtl_continue_stmt): Likewise.
3832         (genrtl_scope_stmt): Likewise.
3833         (genrtl_switch_stmt): Likewise.
3834         (genrtl_case_label): Likewise.
3835         (genrtl_begin_compound_stmt): Likewise.
3836         (genrtl_finish_compound_stmt): Likewise.
3837         (genrtl_compound_stmt): Likewise.
3838         (genrtl_asm_stmt): Likewise.
3839         (genrtl_named_return_value): Likewise.
3840         (genrtl_begin_stmt_expr): Likewise.
3841         (genrtl_finish_stmt_expr): Likewise.
3842         (finish_for_stmt): Removed first argument.
3843         (finish_switch_stmt): Likewise.
3845         * semantics.c (genrtl_try_block): Define function.
3846         (genrtl_handler): Likewise.
3847         (genrtl_catch_block): Likewise.
3848         (genrtl_ctor_stmt): Likewise.
3849         (genrtl_subobject): Likewise.
3850         (genrtl_decl_cleanup): Likewise.
3851         (genrtl_do_poplevel): Likewise.
3852         (genrtl_do_pushlevel): Likewise.
3853         (genrtl_clear_out_block): Likewise.
3854         (genrtl_goto_stmt): Likewise.
3855         (genrtl_expr_stmt): Likewise.
3856         (genrtl_decl_stmt): Likewise.
3857         (genrtl_if_stmt): Likewise.
3858         (genrtl_while_stmt): Likewise.
3859         (genrtl_do_stmt): Likewise.
3860         (genrtl_return_stmt): Likewise.
3861         (genrtl_for_stmt): Likewise.
3862         (genrtl_break_stmt): Likewise.
3863         (genrtl_continue_stmt): Likewise.
3864         (genrtl_scope_stmt): Likewise.
3865         (genrtl_switch_stmt): Likewise.
3866         (genrtl_case_label): Likewise.
3867         (genrtl_begin_compound_stmt): Likewise.
3868         (genrtl_finish_compound_stmt): Likewise.
3869         (genrtl_compound_stmt): Likewise.
3870         (genrtl_asm_stmt): Likewise.
3871         (genrtl_named_return_value): Likewise.
3872         (genrtl_begin_stmt_expr): Likewise.
3873         (genrtl_finish_stmt_expr): Likewise.
3874         (finish_for_stmt): Removed first argument and generate rtl
3875         specific code.
3876         (finish_switch_stmt): Likewise.
3877         (do_poplevel): Removed generate rtl specific code.
3878         (do_pushlevel): Likewise.
3879         (add_tree): Likewise.
3880         (finish_goto_stmt): Likewise.
3881         (finish_expr_stmt): Likewise.
3882         (begin_if_stmt): Likewise.
3883         (finish_if_stmt_cond): Likewise.
3884         (finish_then_clause): Likewise.
3885         (begin_else_clause): Likewise.
3886         (finish_else_clause): Likewise.
3887         (finish_if_stmt): Likewise.
3888         (clear_out_block): Likewise.
3889         (begin_while_stmt): Likewise.
3890         (finish_while_stmt_cond): Likewise.
3891         (finish_while_stmt): Likewise.
3892         (begin_do_stmt): Likewise.
3893         (finish_do_body): Likewise.
3894         (finish_do_stmt): Likewise.
3895         (finish_return_stmt): Likewise.
3896         (begin_for_stmt): Likewise.
3897         (finish_for_init_stmt): Likewise.
3898         (finish_for_cond): Likewise.
3899         (finish_for_expr): Likewise.
3900         (finish_break_stmt): Likewise.
3901         (finish_continue_stmt): Likewise.
3902         (begin_switch_stmt): Likewise.
3903         (finish_switch_cond): Likewise.
3904         (finish_case_label): Likewise.
3905         (begin_try_block): Likewise.
3906         (begin_function_try_block): Likewise.
3907         (finish_try_block): Likewise.
3908         (finish_cleanup_try_block): Likewise.
3909         (finish_cleanup): Likewise.
3910         (finish_function_try_block): Likewise.
3911         (finish_handler_sequence): Likewise.
3912         (finish_function_handler_sequence): Likewise.
3913         (begin_handler): Likewise.
3914         (finish_handler_parms): Likewise.
3915         (begin_catch_block): Likewise.
3916         (finish_handler): Likewise.
3917         (begin_compound_stmt): Likewise.
3918         (finish_compound_stmt): Likewise.
3919         (finish_asm_stmt): Likewise.
3920         (finish_label_stmt): Likewise.
3921         (finish_label_decl): Likewise.
3922         (finish_subobject): Likewise.
3923         (finish_decl_cleanup): Likewise.
3924         (finish_named_return_value): Likewise.
3925         (begin_stmt_expr): Likewise.
3926         (finish_stmt_expr): Likewise.
3928         * decl.c (initialize_local_var): Changed call to finish_expr_stmt
3929         to call genrtl_expr_stmt when appropriate.
3931         * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
3932         begin_compound_expr to call genrtl_begin_stmt_expr and
3933         genrtl_begin_compound_expr when appropriate.
3934         (finish_init_stmts): Changed calls to finish_compound_expr and
3935         finish_stmt_expr to call genrtl_finish_compound_expr and
3936         genrtl_finish_stmt_expr when appropriate.
3937         (expand_default_init): Changed call to finish_expr_stmt to call
3938         genrtl_expr_stmt when appropriate.
3939         (build_vec_init): Likewise.
3941         * parse.y (simple_stmt): Removed first argument from call to
3942         finish_for_stmt. Removed first argument from call to
3943         finish_switch_stmt.
3945         * parse.c: Regenerated.
3947         * pt.c (tsubst_expr): Removed first argument from call to
3948         finish_for_stmt. Removed first argument from call to
3949         finish_switch_stmt.
3951 2000-06-16  Benjamin Chelf  <chelf@codesourcery.com>
3953         * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
3954         CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
3956         * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
3957         (cplus_tree_code_length[]): Likewise.
3958         (cplus_tree_code_name[]): Likewise.
3959         (init_parse): Added call to add_c_tree_codes. Changed
3960         LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
3962 2000-06-16  Mark Mitchell  <mark@codesourcery.com>
3964         * cp-tree.h (finish_mem_initializers): Declare.
3965         (count_trees): Likewise.
3966         * parse.y (base_init): Use finish_mem_initializers.
3967         * semantics.c (finish_mem_initializers): New function.
3969         * tree.c (count_trees_r): Prototype.  Use DATA parameter to store
3970         the number of trees.
3971         (n_trees): Remove.
3972         (count_trees): Don't use it.
3974 2000-06-15  Jason Merrill  <jason@redhat.com>
3976         * tree.c (count_trees): New debugging function.
3978         * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
3979         * init.c (build_member_call): Pull out the name of a DECL.
3981         * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
3982         * semantics.c (expand_body): Push to TV_INTEGRATION here.
3983         * optimize.c (optimize_function): Not here.
3984         * pt.c (instantiate_decl): Push to TV_PARSE.
3986 2000-06-15  Mark Mitchell  <mark@codesourcery.com>
3988         * cp-tree.h (struct language_function): Remove x_base_init_list
3989         and x_member_init_list.
3990         (current_base_init_list): Remove.
3991         (current_member_init_list): Likewise.
3992         (setup_vtbl_ptr): Change prototype.
3993         (emit_base_init): Likewise.
3994         (expand_member_init): Likewise.
3995         (reinit_parse_for_function): Remove.
3996         * decl.c (save_function_data): Don't clear x_base_init_list and
3997         x_member_init_list.
3998         (mark_language_function): Don't mark them.
3999         * init.c (perform_member_init): Tweak comment.
4000         (sort_member_init): Take the list of initializers as an argument.
4001         (sort_base_init): Likewise.
4002         (emit_base_init): Likewise.
4003         (expand_member_init): Return the initializer.  Don't use global
4004         variables.
4005         * lex.c (reinit_parse_for_function): Remove.
4006         * method.c (build_template_parm_names): Correct substitution.
4007         (do_build_copy_constructor): Don't use current_member_init_list
4008         and current_base_init_list.
4009         (synthesize_method): Likewise.
4010         * parse.y (base_init): Split mem-initializers into
4011         base-initializers and field-initializers.
4012         (member_init_list): Build up the list here.
4013         (member_init): Return the initializer.
4014         (fn.depfn): Don't use reinit_parse_for_function.
4015         * parse.c: Regenerated.
4016         * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
4017         ERROR_MARK.
4018         (tsubst_expr): Don't use current_member_init_list
4019         and current_base_init_list.
4020         (tsubst_expr_values): Rename to ...
4021         (tsubst_initializer_list): ... this.  Use convert_from_reference.
4022         * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
4023         and current_base_init_list.
4024         (begin_function_definition): Don't call reinit_parse_for_function.
4026         * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
4028         * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
4029         correctly.
4031         * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
4033 2000-06-14  Benjamin Chelf  <chelf@codesourcery.com>
4035         * cp-tree.h (IF_COND): Move to c-common.h.
4036         (THEN_CLAUSE): Likewise.
4037         (ELSE_CLAUSE): Likewise.
4038         (WHILE_COND): Likewise.
4039         (WHILE_BODY): Likewise.
4040         (DO_COND): Likewise.
4041         (DO_BODY): Likewise.
4042         (RETURN_EXPR): Likewise.
4043         (EXPR_STMT_EXPR): Likewise.
4044         (FOR_INIT_STMT): Likewise.
4045         (FOR_COND): Likewise.
4046         (FOR_EXPR): Likewise.
4047         (FOR_BODY): Likewise.
4048         (SWITCH_COND): Likewise.
4049         (SWITCH_BODY): Likewise.
4050         (CASE_LOW): Likewise.
4051         (CASE_HIGH): Likewise.
4052         (GOTO_DESTINATION): Likewise.
4053         (COMPOUND_BODY): Likewise.
4054         (ASM_CV_QUAL): Likewise.
4055         (ASM_STRING): Likewise.
4056         (ASM_OUTPUTS): Likewise.
4057         (ASM_INPUTS): Likewise.
4058         (ASM_CLOBBERS): Likewise.
4059         (DECL_STMT_DECL): Likewise.
4060         (STMT_EXPR_STMT): Likewise.
4061         (LABEL_STMT_LABEL): Likewise.
4062         (SCOPE_BEGIN_P): Likewise.
4063         (SCOPE_END_P): Likewise.
4064         (SCOPE_STMT_BLOCK): Likewise.
4065         (SCOPE_NULLIFIED_P): Likewise.
4066         (SCOPE_NO_CLEANUPS_P): Likewise.
4067         (SCOPE_PARTIAL_P): Likewise.
4068         (ASM_VOLATILE_P): Likewise.
4069         (STMT_LINENO): Likewise.
4070         (STMT_LINENO_FOR_FN_P): Likewise.
4072         * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
4073         ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
4074         FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
4075         CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
4076         SCOPE_STMT, CASE_LABEL, STMT_EXPR.
4078         * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
4080         * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
4081         (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
4083         * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
4084         (cplus_tree_code_length[]): Added '#include "c-common.def"'.
4085         (cplus_tree_code_name[]): Added '#include "c-common.def"'.
4087 2000-06-14  Mark Mitchell  <mark@codesourcery.com>
4089         * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
4090         * class.c (dfs_find_final_overrider): Set it appropriately.
4091         (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
4092         avoid unneeded secondary vptrs.
4094 2000-06-13  Jakub Jelinek  <jakub@redhat.com>
4096         * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
4097         (check_bitfield_decl, check_field_decl): Likewise.
4098         (build_vtbl_or_vbase_field, build_base_field): Likewise.
4099         (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
4100         * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
4101         (xfer_tag, finish_enum): Likewise.
4102         * decl2.c (finish_builtin_type): Likewise.
4103         * init.c (init_init_processing): Likewise.
4104         * pt.c (instantiate_class_template): Likewise.
4105         * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
4106         * cp-tree.h (struct lang_type): Add user_align member.
4107         (CLASSTYPE_USER_ALIGN): Define.
4109 Tue Jun 13 15:48:03 2000  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
4111         * Make-lang.in (c++.install-common): Install g++-cross in
4112         $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
4113         $(target_alias)-g++ and $(target_alias)-c++.
4115 2000-06-12  Mark Mitchell  <mark@codesourcery.com>
4117         * class.c (vcall_offset_data_s): Add last_init and fns.
4118         (overrides): Rename to same_signature_p.
4119         (dfs_find_final_overrider): Adjust accordingly.
4120         (mark_overriders): Likewise.
4121         (warn_hidden): Likewise.
4122         (build_vtbl_initializer): Reorganize machinery for building things
4123         at negative offsets.
4124         (build_vcall_and_vbase_vtbl_entries): Likewise.
4125         (build_vbase_offset_vtbl_entries): Likewise.
4126         (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
4127         offset entries.  Do not create two entries for functions with the
4128         same signature.
4129         (build_vcall_offset_vtbl_entries): Initialize vod->fns.
4130         (build_rtti_vtbl_entries): Reorganize machinery for building things
4131         at negative offsets.
4133         * optimize.c (expand_call_inline): Don't recurse into the code
4134         used to initialize the parameters more than once.
4136 2000-06-11  Mark Mitchell <mark@codesourcery.com>
4138         * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
4139         (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
4140         (find_substitution): Only use the `Sa' substitution for
4141         std::allocator, not instantiations of it.
4142         (write_template_prefix): Move comment.  Only use a TREE_LIST to
4143         represent substitutions for a member template.
4144         (write_array_type): Mangle array dimensions correctly.
4145         * optimize.c (maybe_clone_body): Copy more information from the
4146         cloned function.
4147         * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
4148         on the regenerated declaration.
4150 2000-06-11  Chip Salzenberg  <chip@valinux.com>
4151             Mark Mitchell <mark@codesourcery.com>
4153         * class.c (build_vtable): Clarify comment.
4154         (build_ctor_vtbl_group): Pass the most derived type to
4155         build_vtable.
4157 2000-06-11  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
4159         * decl2.c (compare_options): Don't needlessly cast away const-ness.
4161 2000-06-10  Mark Mitchell  <mark@codesourcery.com>
4163         * decl.c (add_binding): Handle duplicate declarations of external
4164         variables.
4166 2000-06-09  Chip Salzenberg  <chip@valinux.com>
4167             Mark Mitchell <mark@codesourcery.com>
4169         * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
4170         argument.
4171         (write_signed_number): New macro.
4172         (write_unsigned_number): Likewise.
4173         (write_source_name): Use them.
4174         (write_number): Handle signed and unsigned values.
4175         (write_integer_cst): Use tree_int_cst_sgn, and use
4176         write_unsigned_number or write_signed_number as appropriate.
4177         (write_discriminator): Use write_unsigned_number or
4178         write_signed_number as appropriate.
4179         (write_template_arg_literal): Likewise.
4180         (write_array_type): Use tree_low_cst.
4181         (write_template_parm):  Use write_unsigned_number or
4182         write_signed_number as appropriate.
4183         (write_substitution): Adjust call to write_number.
4184         (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
4185         (write_expression): Handle non-type template arguments of
4186         reference type correctly.
4187         (mangle_thunk): Use write_signed_number.
4189 2000-06-09  Chip Salzenberg  <chip@valinux.com>
4191         * mangle.c (find_substition): Don't mangle objects with typename
4192         substitutions (e.g. "cin" as "Si").
4194 2000-06-09  Zack Weinberg  <zack@wolery.cumb.org>
4196         * call.c (add_candidate): Use ggc_alloc_cleared.
4197         * decl.c (lookup_label): Likewise.
4198         * lex.c (retrofit_lang_decl): Likewise.
4200 2000-06-09  Jason Merrill  <jason@casey.soma.redhat.com>
4202         * semantics.c (expand_body): Push to TV_EXPAND.
4203         * optimize.c (optimize_function): Push to TV_INTEGRATION.
4204         * decl.c (start_function): Always call announce_function.
4206         * tinfo2.cc: Just declare abort.
4208 2000-06-09  Gabriel Dos Reis  <gdr@codesourcery.com>
4210         * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
4211         whenever @ is a symbolic name.
4213 2000-06-08  Jakub Jelinek  <jakub@redhat.com>
4215         * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
4217 2000-06-07  Mark Mitchell  <mark@codesourcery.com>
4219         * decl.c (pushdecl): Look up functions by DECL_NAME, not
4220         DECL_ASSEMBLER_NAME.
4222 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
4224         * decl2.c (c_language): Define.
4226 2000-06-06  Gabriel Dos Reis  <gdr@codesourcery.com>
4228         * lex.c (lang_init_options): Tweak.
4230         * decl2.c: Remove #inclusion of diagnostic.h
4231         (lang_decode_option): Move diagnostic formatting options to
4232         toplevel.
4234         * lang-options.h: Remove documentation for diagnostic options.
4236         * Makefile.in (lex.o): Depends upon diagnostic.h
4238 2000-06-06  Mark Mitchell  <mark@codesourcery.com>
4240         * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
4241         the same DECL_RESULT, it's not a redefinition.
4242         * pt.c (tsubst_decl): Remove code to handle illegal
4243         specializations.
4245 2000-06-06  Nathan Sidwell  <nathan@codesourcery.com>
4247         * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
4249 2000-06-05  Jason Merrill  <jason@casey.soma.redhat.com>
4251         * search.c (maybe_suppress_debug_info): Don't check
4252         CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
4254         * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
4255         here if extern_p.
4257         Remember instantiation context in deferred instantiations.
4258         * cp-tree.h (struct tinst_level): Remove.
4259         (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
4260         * pt.c (current_tinst_level): Now a tree.
4261         (print_template_context, push_tinst_level, pop_tinst_level,
4262         tinst_for_decl): Adjust.
4263         (reopen_tinst_level): New fn.
4264         (init_pt): Register current_tinst_level as a root.
4265         (add_pending_template): Put current_tinst_level in TREE_PURPOSE
4266         of the pending templates list.
4267         (instantiate_pending_templates): Adjust.  Call reopen_tinst_level.
4268         * lex.c (extract_interface_info): Adjust.
4269         * decl2.c (warn_if_unknown_interface): Adjust.
4271 2000-06-05  Mark Mitchell  <mark@codesourcery.com>
4273         * class.c (indirect_primary_base_p): New function.
4274         (determine_primary_base): Use it.
4276 2000-06-05  Nathan Sidwell  <nathan@codesourcery.com>
4278         Update new-abi dynamic cast algorithm.
4279         * tinfo.cc (__class_type_info::__dyncast_result): Add
4280         whole_details. Adjust constructor.
4281         (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
4282         Avoid unnecessary searching.
4283         (__dynamic_cast): Adjust for __dyncast_result::whole_details.
4285 Mon Jun  5 06:48:55 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4287         * decl.c (init_decl_processing): Don't call record_component_aliases.
4288         * tree.c (build_cplus_array_type_1): Likewise.
4290 2000-06-04  Mark Mitchell  <mark@codesourcery.com>
4292         * ir.texi: Correct typo.
4293         * mangle.c (write_expression): Handle non-type template arguments
4294         with reference type.
4295         * method.c (build_overload_value): Likewise.
4296         * pt.c (convert_nontype_argument): Explicitly represent conversion
4297         to a reference with an ADDR_EXPR.
4298         (unify): Always unify arguments in left-to-right order.
4300 2000-06-03  Alex Samuel    <samuel@codesourcery.com>
4301             Mark Mitchell  <mark@codesourcery.com>
4303         * Make-lang.in (CXX_SRCS): Add mangle.c.
4304         * Makefile.in (CXX_OBJS): Add mangle.o.
4305         (mangle.o): New rule.
4307         * class.c (local_classes): New variable.
4308         * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
4309         (get_vtt_name): Use mangle_vtt_name for new ABI.
4310         (init_class_processing): Initialize local_classes.
4311         (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
4312         * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
4313         (std_identifier): New macro.
4314         (DECL_VOLATILE_MEMFUNC_P): New macro.
4315         (DECL_NAMESPACE_STD_P): Likewise.
4316         (local_classes): Declare.
4317         (get_mostly_instantiated_function_type): Declare.
4318         (init_mangle): Declare.
4319         (mangle_decl): Likewise.
4320         (mangle_type_string): Likewise.
4321         (mangle_type): Likewise.
4322         (mangle_typeinfo_for_type): Likewise.
4323         (mangle_typeinfo_string_for_type): Likewise.
4324         (mangle_vtbl_for_type): Likewise.
4325         (mangle_vtt_for_type): Likewise.
4326         (mangle_ctor_vtbl_for_type): Likewise.
4327         (mangle_thunk): Likewise.
4328         (mangle_conv_op_name_for_type): Likewise.
4329         (mangle_guard_variable): Likewise.
4330         * decl.c (pushtag): Keep track of local classes.
4331         (initialize_predefined_identifiers): Initialize std_identifier.
4332         (init_decl_processing): Use std_identifier.
4333         (start_decl): Don't treat instantiations as specializations.
4334         (grokdeclarator): Likewise.
4335         (grokvardecl): Call mangle_decl for new ABI.  Only set mangled
4336         name for fully-instantiated templates.
4337         * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
4338         destructors with the new ABI.
4339         (finish_static_data_member_decl): Use mangle_decl under the new ABI.
4340         (grokfield): Use mangle_type for new ABI.
4341         (grokoptypename): Use mangle_conv_op_for_type for new ABI.
4342         (get_sentry): Use mangle_guard_variable for new ABI.
4343         (start_static_initialization_or_destruction): Likewise.
4344         * expr.c (extract_aggr_init): Remove.
4345         (extract_scalar_init): Likewise.
4346         (extract_init): Remove #if 0'd code.
4347         * mangle.c: New function.
4348         * method.c (build_mangled_name): Assert not flag_new_abi.
4349         (build_static_name): Likewise.
4350         (build_decl_overload_real): Likewise.
4351         (build_typename_overload): Likewise.
4352         (build_overload_with_type): Likewise.
4353         (build_overload_name): Likewise.
4354         (get_ctor_vtbl_name): Likewise.
4355         (start_squangling): Likewise.
4356         (get_id_2): Likewise.
4357         (set_mangled_name_for_decl): Call mangle_decl for new ABI.
4358         (init_method): Call init_mangle for new ABI.
4359         (make_thunk): Call mangle_thunk for new ABI.
4360         * operators.def: Correct new ABI manglings for the `%' operator.
4361         Add `::' operator.
4362         * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
4363         DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
4364         (lookup_template_class): Call mangle_decl for new ABI.
4365         (get_mostly_instantiated_function_type): New function.
4366         (set_mangled_name_for_template_decl): Use it.
4367         (tsubst_decl): Use set_mangled_name_for_decl for destructors with
4368         the new ABI.  Use mangle_conv_op_name_for_type for instantiated
4369         conversion op names.
4370         * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
4371         (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
4372         (tinfo_base_init):  Likewise.  Mangle typeinfo string name with
4373         mangle_typeinfo_string_for_type.
4375 2000-06-03  Mark Mitchell  <mark@codesourcery.com>
4377         * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
4378         (INNERMOST_TEMPLATE_ARGS): New macro.
4379         (innermost_args): Remove.
4380         (get_innermost_template_args): New function.
4381         * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
4382         * error.c (dump_function_decl): Be caution when using
4383         most_general_template.
4384         * method.c (build_template_parm_names):  Use
4385         INNERMOST_TEMPLATE_ARGS.
4386         * pt.c (add_to_template_args): Tidy comment
4387         (get_innermost_template_args): New function.
4388         (check_explicit_specialization): Clear DECL_INITIAL for a new
4389         specialization.
4390         (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
4391         Tidy.
4392         (push_template_decl): Always register specializations of the most
4393         general template.
4394         (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
4395         (coerce_template_parms): Likewise.
4396         (lookup_template_class): Likewise.
4397         (innermost_args): Remove.
4398         (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
4399         (tsubst_decl): Handle tricky specializations.  Use
4400         get_innermost_template_args.
4401         (instantiate_template): Simplify handling of partial
4402         instantiations.
4403         (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
4404         (most_general_template): Reimplement, in a more straightforward
4405         manner.
4406         (regenerate_decl_from_template): Tweak formatting.  Use
4407         TMPL_ARGS_DEPTH for clarity.
4408         (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
4410         * dump.c (dequeue_and_dump): Dump information about thunks.
4412 2000-06-01  Richard Henderson  <rth@cygnus.com>
4414         * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
4416 2000-06-01  Richard Henderson  <rth@cygnus.com>
4418         * decl2.c (unsupported_options): Fix typo, make const.
4419         (lang_decode_option): Fix bsearch argument order.
4421 2000-06-01  Mark Mitchell  <mark@codesourcery.com>
4423         * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
4424         on FIELD_DECLs.
4426 Wed May 31 14:09:00 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4428         * cp-tree.h (c_get_alias_set): Deleted.
4429         * Makefile.in (decl.o): Include ../expr.h.
4430         * decl.c (expr.h): Include.
4431         (init_decl_processing): Call record_component_aliases for arrays.
4432         (grokdeclarator): Likewise.
4433         Set TREE_ADDRESSABLE for fields that aren't bitfields.
4434         * tree.c (build_cplus_array_type_1): Call record_component_aliases.
4436 2000-05-31  Mark Mitchell  <mark@codesourcery.com>
4438         Remove guiding declaration support.
4439         * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
4440         (flag_guiding_decls): Remove.
4441         * call.c (build_user_type_conversion_1): Remove support for
4442         guiding decls.
4443         (build_new_function_call): Likewise.
4444         (build_new_op): Likewise.
4445         (build_new_method_call): Likewise.
4446         * decl.c (start_function): Likewise.
4447         * friend.c (is_friend): Likewise.
4448         (do_friend): Likewise.
4449         * decl2.c ((flag_dump_translation_unit): Make it const.
4450         (flag_guiding_decls): Remove.
4451         (unsupported_options): New variable
4452         (compare_options): New function.
4453         (lang_decode_option): Use them.
4455         * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
4457         * method.c (mangle_expression): Adjust test for legal expression
4458         operators.
4460         * pt.c (instantiate_decl): Save and restore the local
4461         specializations list.
4463 2000-05-30  Jason Merrill  <jason@decepticon.cygnus.com>
4465         * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
4467 2000-05-30  Mark Mitchell  <mark@codesourcery.com>
4469         * call.c (add_template_candidate_real): Handle member template
4470         constructors for classes with virtual bases.
4471         (build_user_type_conversion_1): Use in_charge_arg_for_name.
4472         (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
4474         * ir.texi: Update thunk documentation.
4476         * call.c (joust): Fix handling of overloaded builtin operators.
4478 2000-05-30  Zack Weinberg  <zack@wolery.cumb.org>
4480         * cp-tree.h (DECL_ANTICIPATED): New macro.
4481         Document new use of DECL_LANG_FLAG_7.
4482         * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
4483         in the user namespace.
4484         * lex.c (do_identifier): If the identifier's declaration has
4485         DECL_ANTICIPATED on, it has not yet been declared.  But do not
4486         replace it with an ordinary implicit declaration.
4488         * tinfo2.cc: Include stdlib.h.
4490 2000-05-29  Mark Mitchell  <mark@codesourcery.com>
4492         * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
4493         * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
4494         CLASSTYPE_ALIGN.
4496 2000-05-28  Gabriel Dos Reis  <gdr@codesourcery.com>
4498         * decl2.c (lang_decode_option): Use skip_leading_substring instead
4499         of plain strncmp.
4501 2000-05-28  Alexandre Oliva  <aoliva@cygnus.com>
4503         * operators.def (<?): Duplicated, should have been...
4504         (>?): this.  Fixed.
4506 2000-05-27  Alex Samuel    <samuel@codesourcery.com>
4507             Mark Mitchell  <mark@codesourcery.com>
4509         * cp-tree.h (ansi_opname): Make it a macro.
4510         (ansi_assopname): Likewise.
4511         (struct lang_decl_flags): Add assignment_operator_p.
4512         (struct lang_decl): Add operator_code.
4513         (DECL_VTT_PARM): Adjust.
4514         (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
4515         overloaded operator.
4516         (SET_OVERLOADED_OPERATOR_CODE): New macro.
4517         (DECL_ASSIGNMENT_OPERATOR_P): New macro.
4518         (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
4519         (opname_tab): Remove.
4520         (assignop_tab): Likewise.
4521         (operator_name_info_t): New type.
4522         (operator_name_info): New variable.
4523         (assignment_operator_name_info): Likewise.
4524         (build_cp_library_fn): Remove declaration.
4525         (push_cp_library_fn): Likewise.
4526         (operator_name_string): Likewise.
4527         (build_decl_overload): Likewise.
4528         * call.c (print_z_candidates): Simplify.
4529         (build_object_call): Adjust usage of ansi_opname.  Use
4530         DECL_OVERLOADED_OPERATOR_P.
4531         (op_error): Adjust operator name lookup.
4532         (build_conditional_expr): Adjust usage of ansi_opname.
4533         (build_new_op): Likewise.
4534         (build_op_delete_call): Likewise.
4535         (build_over_call): Likewise.
4536         (joust): Use DECL_OVERLOADED_OPERATOR_P.
4537         * decl.c (duplicate_decls): Copy operator_code.
4538         (init_decl_processing): Adjust parameters to push_cp_library_fn.
4539         (builtin_function): Adjust parameters to build_library_fn_1.
4540         (build_library_fn_1): Accept an overloaded operator code.
4541         (build_library_fn): Pass ERROR_MARK.
4542         (build_cp_library_fn): Accept an overloaded operator code.
4543         (push_cp_library_fn): Likewise.
4544         (grokfndecl): Tweak.
4545         (grokdeclarator): Simplify code to compute names of overloaded
4546         operators.  Adjust use of ansi_opname.
4547         (ambi_op_p): Work on tree_codes, not identifiers.
4548         (unary_op_p): Likewise.
4549         (grok_op_properties): Likewise.
4550         (start_function): Use DECL_OVERLOADED_OPERATOR_P.
4551         (lang_mark_tree): Don't try to mark the operator_code.
4552         * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
4553         * error.c (dump_decl): Remove special handling for operator
4554         names.
4555         (dump_function_name): Likewise.
4556         (dump_expr): Adjust name lookup of operators.
4557         (op_to_string): Simplify.
4558         (assop_to_string): Likewise.
4559         * init.c (build_new_1): Adjust use of ansi_opname.
4560         * lex.c (opname_tab): Remove.
4561         (assignop_tab): Likewise.
4562         (ansi_opname): Likewise.
4563         (ansi_assopname): Likewise.
4564         (operator_name_string): Likewise.
4565         (reinit_lang_specific): Likewise.
4566         (operator_name_info): New variable.
4567         (assignment_operator_name_info): Likewise.
4568         (init_operators): New function.
4569         (init_parse): Use it.
4570         (do_identifier): Adjust use of ansi_opname.
4571         * method.c (mangle_expression): Don't use ansi_opname for
4572         mangling.
4573         (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
4574         (build_decl_overload): Remove.
4575         (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
4576         (do_build_assign_ref): Adjust use of ansi_opname.
4577         (synthesize_method): Likewise.
4578         (implicitly_declare_fn): Likewise.
4579         * operators.def: New file.
4580         * parse.y (operator): Adjust use of ansi_opname.
4581         * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
4582         (set_mangled_name_for_template_decl): Don't play games with
4583         current_namespace.
4584         (special_function_p): Adjust use of ansi_opname.
4585         * typeck.c (check_return_expr): Likewise.
4586         * Make-lang.in (cc1plus): Depend on operators.def.
4587         * Makefile.in (lex.o): Likewise.
4588         (decl.o): Likewise.
4590 2000-05-27  Zack Weinberg  <zack@wolery.cumb.org>
4592         * Make-lang.in (cplib2.ready): Eradicate.
4594 Sat May 27 11:25:46 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
4596         * method.c (mangle_expression): Use TREE_CODE_LENGTH.
4597         * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
4598         (built_min, cp_tree_equal): Likewise.
4600 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
4602         * class.c (layout_nonempty_base_or_field): Replace
4603         `record_layout_info' with `record_layout_info_s'.
4605 2000-05-26  Jason Merrill  <jason@casey.soma.redhat.com>
4607         Fix goto checking.
4608         * cp-tree.h (struct language_function): x_named_labels is now
4609         a struct named_label_list*.
4610         * decl.c (struct named_label_use_list): Renamed from...
4611         (struct named_label_list): ...this.  New struct.
4612         (push_binding_level): Don't set eh_region.
4613         (note_level_for_eh): New fn.
4614         (pop_label): Take label and old value directly.
4615         (pop_labels): Adjust for new named_labels format.
4616         (lookup_label): Likewise.
4617         (poplevel): Note characteristics of a binding level containing a
4618         named label.  Mess with named label lists earlier.
4619         (mark_named_label_lists): New fn.
4620         (mark_lang_function): Call it.
4621         (use_label): New fn, split out from...
4622         (make_label_decl): ...here.  Don't call it.
4623         (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
4624         check_previous_gotos): New fns, split out from...
4625         (define_label): ...here.
4626         (check_switch_goto): New fn.
4627         (define_case_label): Call it.
4628         (check_goto): New fn.
4629         * semantics.c (finish_goto_stmt): Call it and use_label.
4630         (begin_compound_stmt): If we're a try block, call note_level_for_eh.
4631         (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
4633 2000-05-26  Mark Mitchell  <mark@codesourcery.com>
4635         * class.c (build_vtable_entry_ref): Correct usage of
4636         get_vtbl_decl_for_binfo.
4638         * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
4639         * method.c (implicitly_declare_fn): Not here.
4641 2000-05-26  Nathan Sidwell  <nathan@codesourcery.com>
4643         * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
4644         (CPTI_PTMD_DESC_TYPE): ... here.
4645         (ptmd_desc_type_node): Rename to ...
4646         (ptm_desc_type_node): ... here.
4647         * decl.c: Likewise.
4648         * rtti.c (ptmd_initializer): Rename to ...
4649         (ptm_initializer): ... here.
4650         (sythesize_tinfo_var): Adjust. Deal with pointer to member
4651         function.
4652         (create_tinfo_types): Adjust.
4654 2000-05-25  Mark Mitchell  <mark@codesourcery.com>
4656         Finish implementation of VTTs.
4657         * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
4658         CPTI_VTT_PARM_IDENTIFIER.
4659         (vtt_parm_identifier): New macro.
4660         (vtt_parm_type): Likewise.
4661         (BINFO_SUBVTT_INDEX): Likewise.
4662         (BINFO_VPTR_INDEX): Likewise.
4663         (struct lang_decl): Add vtt_parm.
4664         (DECL_VTT_PARM): New macro.
4665         (DECL_USE_VTT_PARM): Likewise.
4666         (DECL_NEEDS_VTT_PARM_P): Likewise.
4667         (get_vtt_name): Declare.
4668         (build_artifical_parm): Likewise.
4669         (fixup_all_virtual_upcast_offsets): Likewise.
4670         (expand_indirect_vtbls_init): Remove.
4671         * call.c (build_new_method_call): Pass the vtt to subobject
4672         constructors and destructors.
4673         * class.c (get_vtt_name): Give it external linkage.
4674         (build_clone): Handle the magic VTT parameters for clones.
4675         (clone_function_decl): Fix typo in comment.
4676         (build_vtt): Keep track of the indices in the VTTs where various
4677         entities are stored.
4678         (build_vtt_inits): Likewise.
4679         (dfs_build_vtt_inits): Likewise.
4680         (build_ctor_vtbl_group): Tweak type of construction vtables.
4681         (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
4682         primary bases, when building construction vtables.
4683         * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
4684         (initialize_predefined_identifiers): Add vtt_parm_identifier.
4685         (init_decl_processing): Initialize vtt_parm_type.
4686         (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
4687         (lang_mark_tree): Make vtt_parm.
4688         * decl2.c (build_artificial_parm): New function.
4689         (maybe_retrofit_in_chrg): Use it.  Add VTT parameters.
4690         (grokclassfn): Use build_artificial_parm.
4691         * init.c (initialize_vtbl_ptrs): Call
4692         fixup_all_virtual_upcast_offsets directly.
4693         (perform_member_init): Use the complete subobject destructor for
4694         member cleanups.
4695         (build_vtbl_address): New function.
4696         (expand_virtual_init): Handle VTTs.
4697         * optimize (maybe_clone_body): Likewise.
4698         * search.c (fixup_all_virtual_upcast_offsets): Give it external
4699         linkage.
4700         (expand_indirect_vtbls_init): Remove.
4701         * semantics.c (setup_vtbl_ptr): Fix typos in comment.
4702         * tree.c (make_binfo): Make them bigger.
4704 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
4706         * inc/cxxabi.h (__pbase_type_info): Define, based on
4707         __pointer_type_info.
4708         (__pointer_type_info): Derive from __pbase_type_info. Adjust.
4709         (__pointer_to_member_type_info): Likewise.
4710         * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
4711         (__pointer_to_member_type_info::__is_pointer_p): Remove.
4712         (__pointer_type_info::__do_catch): Rename to ...
4713         (__pbase_type_info::__do_catch): ... here. Adjust.
4714         (__pbase_type_info::__pointer_catch): Implement.
4715         (__pointer_type_info::__pointer_catch): Adjust.
4716         (__pointer_to_member_type_info::__pointer_catch): Adjust.
4718 2000-05-25  Nathan Sidwell  <nathan@codesourcery.com>
4720         * tinfo.h (__user_type_info::contained_virtual_p): New
4721         predicate.
4722         * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
4723         shaped heirarchy.
4724         (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
4725         diamond shaped heirarchy. Add early out for mixed diamond and
4726         duplicate shaped heirarchy.
4728 2000-05-24  Mark Mitchell  <mark@codesourcery.com>
4730         * cp-tree.h (build_delete): Change prototype.
4731         (build_vec_delete): Likewise.
4732         * call.c (build_scoped_method_call): Use special_function_kind
4733         values to indicate the kind of destruction to be done.
4734         (build_method_call): Likewise.
4735         * decl.c (finish_destructor_body): Likewise.
4736         (maybe_build_cleanup_1): Likewise.  Rename to ...
4737         (maybe_build_cleanup): ... this.
4738         * decl2.c (delete_sanity): Use special_function_kind
4739         values to indicate the kind of destruction to be done.
4740         (build_cleanup): Likewise.
4741         * init.c (perform_member_init): Likewise.
4742         (build_vec_delete_1): Likewise.
4743         (build_dtor_call): Simplify.
4744         (build_delete): Use special_function_kind
4745         values to indicate the kind of destruction to be done.
4746         (build_vbase_delete): Likewise.
4747         (build_vec_delete): Likewise.
4749         * init.c (sort_member_init): Fix typo in error message generation
4750         code.
4752 Mon May 15 11:46:29 2000  Donald Lindsay  <dlindsay@cygnus.com>
4754         * semantics.c (begin_class_definition): make the packed
4755         attribute be sensitive to the "-fpack-struct" command line flag
4757 2000-05-24  Nathan Sidwell  <nathan@codesourcery.com>
4759         Update new-abi upcast algorithm.
4760         * inc/cxxabi.h (__class_type_info::__do_upcast): Change
4761         prototype and meaning of return value.
4762         (__si_class_type_info::__do_upcast): Likewise.
4763         (__vmi_class_type_info::__do_upcast): Likewise.
4764         * tinfo.cc (__class_type_info::__upcast_result): Replace
4765         whole2dst with part2dst. Adjust ctor.
4766         (__class_type_info::__do_upcast): Adjust call of worker function.
4767         (__class_type_info::__do_upcast): Adjust.
4768         (__si_class_type_info::__do_upcast): Adjust. Use parent's
4769         __do_upcast.
4770         (__vmi_class_type_info::__do_upcast): Likewise. Fix private
4771         virtual base in diamond heirarchy bug.
4773 2000-05-23  Mark Mitchell  <mark@codesourcery.com>
4775         * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
4776         and bitfield to tinfo_fn_p.
4777         (DECL_TINFO_FN_P): Adjust.
4778         (SET_DECL_TINFO_FN_P): Likewise.
4779         (DECL_MUTABLE_P): Likewise.
4780         (DECL_C_BIT_FIELD): Likewise.
4781         (SET_DECL_C_BIT_FIELD): Likewise.
4782         (CLEAR_DECL_C_BIT_FIELD): Likewise.
4783         (DECL_UNINLINABLE): Likewise.
4784         * class.c (alter_access): Call retrofit_lang_decl if ncessary.
4785         (handle_using_decl): Remove assertion.
4786         (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
4787         to build FIELD_DECLs.
4788         (build_base_field): Likewise.
4789         (layout_class_type): Likewise.
4790         * decl.c (init_decl_processing): Likewise.
4791         (build_ptrmemfunc_type): Likewise.
4792         (grokdeclarator): Likewise.
4793         * decl2.c (grok_x_components): Likewise.
4794         * except.c (call_eh_info): Likewise.
4795         * init.c (init_init_processing): Likewise.
4796         * rtti.c (expand_class_desc): Likewise.
4797         (create_pseudo_type_info): Likewise.
4798         (get_vmi_pseudo_type_info): Likewise.
4799         (create_tinfo_types): Likewise.
4800         * ptree.c (print_lang_decl): Adjust.
4801         * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
4802         before checking DECL_MUTABLE_P.
4804         * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
4805         parameters for template functions.
4806         * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
4807         destructors as well as constructors.
4809 2000-05-22  Mark Mitchell  <mark@codesourcery.com>
4811         * class.c (build_ctor_vtbl_group): Set inits.
4812         * optimize.c (maybe_clone_body): Set DECL_INLINE and
4813         DECL_THIS_INLINE appropriately for clones.
4815         * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
4816         (DECL_CONV_FN_P): Simplify.
4817         (DECL_OPERATOR): Remove.
4818         (language_to_string): Declare.
4819         * decl.c (duplicate_decls): Fix typo in comment.
4820         (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
4821         (grok_op_properties): Use DECL_CONV_FN_P instead of
4822         IDENTIFIER_TYPENAME_P.
4823         * dump.c (dequeue_and_dump): Dump the language linkage of
4824         declarations.
4825         * error.c (language_to_string): Give it external linkage.
4826         * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
4827         (implicitly_declare_fn): Set DECL_LANGUAGE.
4828         * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
4829         IDENTIFIER_TYPENAME_P.
4830         (tsubst_decl): Likewise.
4831         (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
4832         * semantics.c (finish_member_declaration): Don't mark members of
4833         classes declared in an extern "C" region as extern "C".
4835 2000-05-22  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
4837         * decl2.c (qualified_lookup_using_namespace): Look through
4838         namespace aliases.
4840         * decl.c (push_using_decl): Return the old decl on namespace level.
4842 2000-05-21  Mark Mitchell  <mark@codesourcery.com>
4844         * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
4845         (VTT_NAME_PREFIX): New macro.
4846         (CTOR_VTBL_NAME_PREFIX): Likewise.
4847         (get_ctor_vtbl_name): New function.
4848         * class.c (get_vtable_name): Simplify.
4849         (get_vtt_name): New function.
4850         (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
4851         (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
4852         when a virtual base becomes primary.
4853         (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier.  Build
4854         VTTs.
4855         (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
4856         additional parameters.
4857         (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
4858         (initialize_array): New function.
4859         (build_vtt): Likewise.
4860         (build_vtt_inits): Likewise.
4861         (dfs_build_vtt_inits): Likewise.
4862         (dfs_fixup_binfo_vtbls): Likewise.
4863         (build_ctor_vtbl_group): Likewise.
4864         (initialize_vtable): Use initialize_array.
4865         (accumulate_vtbl_inits): Reimplement to handle construction
4866         vtables.
4867         (dfs_accumulate_vtbl_inits): Likewise.
4868         (bulid_vtbl_initializer): Adjust parameter name.
4869         * method.c (build_typename_overload): Remove #if 0'd code.
4870         (get_ctor_vtbl_name): New function.
4871         * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
4872         (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
4874         * cp-tree.h (struct lang_type): Remove search_slot.
4875         (CLASSTYPE_SEARCH_SLOT): Remove.
4876         (emit_base_init): Change prototype.
4877         (initialize_vtbl_ptrs): Likewise.
4878         (expand_indirect_vtbls_init): Likewise.
4879         (clear_search_slots): Remove.
4880         * decl.c (lang_mark_tree): Don't mark search_slot.
4881         * init.c (initialize_vtbl_ptrs): Simplify.
4882         (emit_base_init): Likewise.
4883         * search.c (struct vbase_info): Document decl_ptr.
4884         (convert_pointer_to_single_level): Remove.
4885         (dfs_find_vbases): Remove.
4886         (dfs_init_base_pointers): Simplify.
4887         (dfs_clear_vbase_slots): Remove.
4888         (dfs_vtable_path_unmark): New function.
4889         (init_vbase_pointers): Simplify.
4890         (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
4891         (expand_indirect_vtbls_init): Simplify.  Don't call
4892         mark_all_temps_used.
4893         * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
4894         initialize_vtbl_ptrs.
4896 2000-05-20  Zack Weinberg  <zack@wolery.cumb.org>
4898         * except.c: Add static prototypes.
4900 2000-05-20  H.J. Lu  <hjl@gnu.org>
4902         * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
4904 2000-05-19  Mark Mitchell  <mark@codesourcery.com>
4906         Don't create a separate copy of virtual bases for the
4907         CLASSTYPE_VBASECLASSES list.
4908         * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
4909         (BINFO_FOR_VBASE): Remove.
4910         (CANONICAL_BINFO): Adjust.
4911         (binfo_for_vbase): New function.
4912         * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
4913         instead of BINFO_FOR_VBASE.
4914         (build_vbase_pointer): Likewise.
4915         (build_secondary_vtable): Likewise.
4916         (dfs_mark_primary_bases): Likewise.
4917         (mark_primary_bases): Likewise.
4918         (layout_nonempty_base_or_field): Likewise.
4919         (dfs_set_offset_for_shared_vbases): Likewise.
4920         (dfs_set_offset_for_unshared_vbases): Likewise.
4921         (layout_virtual_bases): Likewise.  Adjust for changes to the
4922         CLASSTYPE_VBASECLASSES list.
4923         (dump_class_hierarchy_r): Use binfo_for_vbase
4924         instead of BINFO_FOR_VBASE.
4925         (dump_class_hierarchy): Likewise.
4926         (finish_vtbls): Likewise.
4927         (build_vtbl_initializer): Adjust for changes to the
4928         CLASSTYPE_VBASECLASSES list.
4929         (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
4930         * decl.c (finish_destructor_body): Adjust for changes to the
4931         CLASSTYPE_VBASECLASSES list.
4932         * init.c (sort_base_init): Use binfo_for_vbase.
4933         (construct_virtual_bases): Adjust for changes to the
4934         CLASSTYPE_VBASECLASSES list.
4935         (expand_member_init): Use binfo_for_vbase.
4936         (build_vbase_delete):  Adjust for changes to the
4937         CLASSTYPE_VBASECLASSES list.
4938         * method.c (do_build_copy_constructor): Likewise.
4939         * rtti.c (get_base_offset): Use binfo_for_vbase.
4940         (expand_class_desc): Remove #if 0'd code.
4941         * search.c (struct vbase_info): Remove vbase_types.
4942         (get_base_distance):  Use binfo_for_vbase.
4943         (lookup_field_queue_p): Use CANONICAL_BINFO.
4944         (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
4945         (get_pure_virtuals): Adjust for changes to the
4946         CLASSTYPE_VBASECLASSES list.
4947         (dfs_find_vbases): Use binfo_for_vbase.
4948         (dfs_init_vbase_pointers): Likewise.
4949         (init_vbase_pointers): Don't initialize vi.vbase_types.
4950         (virtual_context): Use binfo_for_vbase.
4951         (fixup_all_virtual_upcast_offsets): Adjust for changes to the
4952         CLASSTYPE_VBASECLASSES list.
4953         (expand_indirect_vtbls_init): Simplify.
4954         (dfs_get_vbase_types): Don't replicate virtual bases.
4955         (find_vbase_instance): Use binfo_for_vbase.
4956         (binfo_for_vbase): New function.
4957         * typeck.c (get_delta_difference): Use binfo_for_vbase.
4959 2000-05-17  Mark Mitchell  <mark@codesourcery.com>
4961         * decl2.c (finish_anon_union): Generalize error messages to handle
4962         anonymous structures.
4963         * init.c (perform_member_init): Remove `name' parameter.
4964         (build_field_list): New function.
4965         (sort_member_init): Handle anonymous union initialization order
4966         correctly.  Check for multiple initializations of the same union.
4967         (emit_base_init): Don't look up fields by name here.
4968         (expand_member_init): Record the result of name lookup for future
4969         reference.
4970         * typeck.c (build_component_ref): Fix formatting.
4972 Wed May 17 17:27:44 2000  Andrew Cagney  <cagney@b1.cygnus.com>
4974         * decl.c (pop_label): Replace warn_unused with warn_unused_label.
4975         * typeck.c (build_x_compound_expr): Replace warn_unused with
4976         warn_unused_value.
4978         * decl2.c (lang_decode_option): Update -Wall unused flags by
4979         calling set_Wunused.
4981 2000-05-16  Mark Mitchell  <mark@codesourcery.com>
4983         * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
4984         * init.c (dfs_vtable_path_unmark): Remove.
4985         * search.c (marked_new_vtable_p): Likewise.
4986         (unmarked_new_vtable_p): Likewise.
4987         (dfs_search_slot_nonempty_p): Likewise.
4988         (dfs_mark): Likewise.
4989         (dfs_vtable_path_unmark): Likewise.
4990         (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
4991         (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
4992         (dfs_init_vbase_pointers): Remove special-case new ABI code.
4993         (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
4994         (init_vbase_pointers): Simplify.
4995         (expand_indirect_vtbls_init): Likewise.
4997         * class.c (copy_virtuals): New function.
4998         (build_primary_table): Use it.
4999         (build_secondary_vtable): Likewise.
5000         (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
5001         indicate that no vcall offset is required.
5002         (add_virtual_function): Likewise.
5003         (modify_all_vtables): Likewise.
5004         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
5005         (dfs_accumulate_vtbl_inits): Likewise.
5006         (build_vtbl_initializer): Make changes to handle construction
5007         vtables.
5008         (dfs_build_vcall_offset_vtbl_entries): Likewise.
5009         (build_rtti_vtbl_entries): Likewise.
5010         (build_vtable_entries): Handle a NULL vcall_index.
5012 2000-05-15  Gabriel Dos Reis  <gdr@codesourcery.com>
5014         * decl2.c (lang_decode_option): Fix thinko.
5016 2000-05-14  Jason Merrill  <jason@casey.cygnus.com>
5018         * except.c (check_handlers): New fn.
5019         * cp-tree.h: Declare it.
5020         * semantics.c (finish_handler_sequence): Call it.
5021         (finish_function_handler_sequence): Likewise.
5022         (finish_handler_parms): Set TREE_TYPE on the handler.
5023         * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
5024         * search.c (get_base_distance_recursive): If protect>1, ignore
5025         special access.
5026         (get_base_distance): Don't reduce watch_access.
5028 2000-05-13  Gabriel Dos Reis <gdr@codesourcery.com>
5030         * lex.c: #include diagnostic.h.
5031         (lang_init_options): Set default prefixing rules.
5033         * lang-options.h: Add -fdiagnostics-show-location=.
5035         * decl2.c: #include diagnostic.h.
5036         (lang_decode_option): Handle -fdiagnostics-show-location=.
5038 2000-05-12  Nathan Sidwell  <nathan@codesourcery.com>
5040         * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
5041         * vec.cc: Revert my 2000-05-07 change.
5043 2000-05-11  Jason Merrill  <jason@casey.cygnus.com>
5045         * class.c (check_field_decls): Complain about non-static data
5046         members with same name as class in class with constructor.
5048 2000-05-10  Jason Merrill  <jason@casey.cygnus.com>
5050         * decl.c (grokdeclarator): Allow non-static data members with
5051         same name as class.
5053 2000-05-09  Zack Weinberg  <zack@wolery.cumb.org>
5055         * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
5056         and pending_inline.filename.  Update prototypes.
5057         * decl.c (define_label): Constify filename parameter.
5058         * decl2.c (warn_if_unknown_interface): Constify local char *.
5059         * input.c Constify input_source.filename. Don't declare
5060         input_filename or lineno.  Constify filename parameter to feed_input.
5061         * lex.c (init_parse): Constify parameter and return value.
5062         (cp_pragma_interface, cp_pragma_implementation): Constify
5063         filename argument.
5064         (reinit_parse_for_method, reinit_parse_for_block,
5065         reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
5066         Constify local char *.
5067         * pt.c: Don't declare lineno or input_filename.
5068         (print_template_context, tsubst_friend_function, tsubst_decl,
5069         tsubst, instantiate_decl): Constify local char *.
5070         * semantics.c (expand_body): Constify local char *.
5071         * tree.c (build_srcloc): Constify filename parameter.
5072         * typeck.c (c_expand_asm_operands): Constify filename
5073         parameter.
5075 2000-05-08  Nathan Sidwell  <nathan@codesourcery.com>
5077         * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
5078         offsetof expansion.
5080 2000-05-08  Branko Cibej  <branko.cibej@hermes.si>
5082         * inc/cxxabi.h:  Fix typos in comment.
5083         (__base_class_info::__offset): Use a static_cast.
5085 2000-05-07  Nathan Sidwell  <nathan@codesourcery.com>
5087         * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
5088         of std::size_t and std::ptrdiff_t respectively.
5089         * tinfo.cc: Likewise.
5090         * vec.cc: Likewise.
5092 2000-05-06  Richard Henderson  <rth@cygnus.com>
5094         * typeck.c (build_c_cast): Don't warn integer->pointer size
5095         mismatch for constants.
5097 2000-05-06  Nathan Sidwell  <nathan@codesourcery.com>
5099         * rtti.c (ptmd_initializer): Set non-public, if class is
5100         incomplete.
5102         * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
5103         (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5104         __cxa_vec_delete): Likewise.
5105         * tinfo.cc (__dynamic_cast): Likewise.
5106         * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5107         __cxa_vec_delete): Likewise.
5109 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
5111         * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
5112         (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
5113         (lang_decl_flags): Add vcall_offset.
5114         (THUNK_VCALL_OFFSET): Use it.
5115         * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
5116         * method.c (make_thunk): Create the lang_decl here, not in
5117         emit_thunk.
5118         (emit_thunk): Make generic thunks into ordinary functions once
5119         they have been fed to expand_body.
5120         * semantics.c (expand_body): Set current_function_is_thunk here.
5122 2000-05-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5124         * class.c (update_vtable_entry_for_fn): Prototype.
5126         * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
5127         and `tmpl'.
5129         * search.c (dfs_build_inheritance_graph_order): Prototype.
5131 2000-05-04  Mark Mitchell  <mark@codesourcery.com>
5133         * cp-tree.h (special_function_kind): Add various kinds of
5134         destructors.
5135         (special_function_p): New function.
5136         * class.c (overrides): Don't let one kind of destructor override
5137         another.
5138         * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
5139         whether or not to instantiate a template.
5140         * tree.c (special_function_p): Define.
5142 2000-05-03  Mark Mitchell  <mark@codesourcery.com>
5144         * cp-tree.def (THUNK_DECL): Remove.
5145         * cp-tree.h (DECL_THUNK_P): New macro.
5146         (DECL_NON_THUNK_FUNCTION_P): Likewise.
5147         (DECL_EXTERN_C_FUNCTION_P): Likewise.
5148         (SET_DECL_THUNK_P): Likewise.
5149         (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
5150         (FNADDR_FROM_VTABLE_ENTRY): Likewise.
5151         (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
5152         * decl.c (decls_match): Use DECL_EXTERN_C_P.
5153         (duplicate_decls): Likewise.
5154         (pushdecl): Likewise.  Adjust thunk handling.
5155         (grokfndecl): Use DECL_EXTERN_C_P.
5156         * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
5157         * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
5158         * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
5159         * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
5160         * method.c (make_thunk): Use SET_DECL_THUNK_P.  Set
5161         DECL_NO_STATIC_CHAIN.
5162         (emit_thunk): Don't play games with TREE_CODE on thunks.  Don't
5163         set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
5164         * search.c (covariant_return_p): Remove THUNK_DECL handling.
5165         * ir.texi: Update.
5167 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
5169         * tree.c (walk_tree): Set lineno.
5171 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
5173         * exception.cc: Update license notice.
5174         * new.cc: Likewise.
5175         * new1.cc: Likewise.
5176         * new2.cc: Likewise.
5177         * tinfo.cc: Likewise.
5178         * tinfo2.cc: Likewise.
5179         * vec.cc: Likewise.
5180         * inc/cxxabi.h: Likewise.
5181         * inc/exception: Likewise.
5182         * inc/new: Likewise.
5183         * inc/new.h: Likewise.
5184         * inc/typeinfo: Likewise.
5186 2000-05-01  Jason Merrill  <jason@casey.cygnus.com>
5188         * tree.c (build_target_expr_with_type): If we already have a
5189         TARGET_EXPR, just return it.
5191         * optimize.c (initialize_inlined_parameters): Don't generate an
5192         EXPR_STMT if we can just use DECL_INITIAL.
5193         * decl.c (emit_local_var): Only make the initialization a
5194         full-expression if stmts_are_full_exprs_p.
5196 2000-05-01  Mark Mitchell  <mark@codesourcery.com>
5198         * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
5199         macro.
5200         * call.c (standard_conversion): Use it.
5201         (direct_reference_binding): Likewise.
5202         (build_over_call): Likewise.
5203         (is_properly_derived_from): Likewise.
5204         (compare_ics): Likewise.
5205         * class.c (resolves_to_fixed_type_p): Likewise.
5206         * optimize.c (declare_return_variable): Likewise.
5207         * pt.c (is_specialization_of): Likewise.
5208         (unify): Likewise.
5209         * typeck.c (comp_target_parms): Likeiwse.
5210         (build_static_cast): Likewise.
5211         (build_reinterpret_cast): Likewise.
5212         (build_const_cast): Likewise.
5213         (comp_ptr_ttypes_real): Likewise.
5214         (comp_ptr_ttypes_const): Likewise.
5215         * typeck2.c (process_init_constructor): Likewise.
5217 2000-04-30  Scott Snyder <snyder@fnal.gov>
5219         * decl.c (finish_destructor_body): Use the base destructor when
5220         destroying virtual bases.
5222 2000-04-30  Mark Mitchell  <mark@codesourcery.com>
5224         * expr.c (cplus_expand_expr): Preserve temporaries when expanding
5225         STMT_EXPRs.
5226         * optimize.c (struct inline_data): Add target_exprs field.
5227         (declare_return_variable): When a function returns an aggregate,
5228         use the variable declared in the TARGET_EXPR as the remapped
5229         DECL_RESULT.
5230         (expand_call_inline): Update the pending target_exprs stack.
5231         (optimize_function): Initialize the stack.
5233         * decl2.c (finish_file): Fix typo in comment.
5235         * method.c (emit_thunk): Don't try to return a `void' value.
5237         * optimize.c (initialize_inlined_parameters): If the parameter is
5238         addressable, we need to make a new VAR_DECL, even if the
5239         initializer is constant.
5241 2000-04-28  Cosmin Truta  <cosmint@cs.ubbcluj.ro>
5243         * decl.c (grok_op_properties): Add an extra check of argtypes.
5245 2000-04-27  Mark Mitchell  <mark@codesourcery.com>
5247         * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
5248         variables.
5249         (initialize_inlined_parameters): Try to avoid creating new
5250         VAR_DECLs.
5252 2000-04-27  Alex Samuel  <samuel@codesourcery.com>
5254         * lex.c (my_get_run_time): Remove.
5255         (init_filename_times): Use get_run_time instead of my_get_run_time.
5256         (check_newline): Likewise.
5257         (dump_time_statistics): Likewise.
5258         * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
5259         of computing elapsed time explicitly.
5261 2000-04-26  Mark Mitchell  <mark@codesourcery.com>
5263         * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
5264         * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
5265         * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
5266         before calling decl_constant_value.
5267         * class.c (check_bitfield_decl): Likewise.
5268         * cvt.c (ocp_convert): Likewise.
5269         (convert): Likewise.
5270         * decl.c (compute_array_index_type): Likewise.
5271         (build_enumerator): Likewise.
5272         * decl2.c (check_cp_case_value): Likewise.
5273         * pt.c (convert_nontype_argument): Likewise.
5274         (tsubst): Likewise.
5275         * typeck.c (decay_conversion): Likewise.
5276         (build_compound_expr): Likewise.
5277         (build_reinterpret_cast): Likewise.
5278         (build_c_cast): Likewise.
5279         (convert_for_assignment): Likewise.
5281 2000-04-26  Jason Merrill  <jason@casey.cygnus.com>
5283         * decl.c (finish_function): Don't play games with DECL_INLINE.
5285 2000-04-25  Gabriel Dos Reis  <dosreis@cmla.ens-cachan.fr>
5287         * ir.texi: Correct typo.
5289 2000-04-25  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5291         * decl.c (grokdeclarator): Reject VLAs as members.
5293 2000-04-24  Gabriel Dos Reis  <gdr@codesourcery.com>
5295         * call.c (standard_conversion): Accept conversion between
5296         COMPLEX_TYPEs.
5298         * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
5300 2000-04-24  Zack Weinberg  <zack@wolery.cumb.org>
5302         * decl2.c (finish_file): Remove double setup for accounting
5303         compile time.
5305 2000-04-24  Robert Lipe <robertlipe@usa.net>
5307         * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
5309 2000-04-23  Benjamin Kosnik  <bkoz@cygnus.com>
5311         * new.cc (set_new_handler): Needs to be in std::.
5313 2000-04-23  Mark Mitchell  <mark@codesourcery.com>
5315         * cp-tree.h (lang_decl): Remove pretty_function_p.
5316         (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
5317         language-specific node.
5318         * decl.c (cp_make_fname_decl): Use build_decl, not
5319         build_lang_decl, to build the variables.
5320         (grokvardecl): Don't call build_lang_decl for local variables in
5321         templates.
5322         (grokdeclarator): Don't call build_lang_decl for local type
5323         declarations in templates.
5324         * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
5325         zero'd memory, rather than calling memset.
5326         * pt.c: Include hashtab.h.
5327         (local_specializations): New variable.
5328         (retrieve_local_specialization): Use it.
5329         (register_local_specialization): Likewise.
5330         (tsubst_decl): Don't assume local variables have
5331         DECL_LANG_SPECIFIC.
5332         (instantiate_decl): Set up local_specializations.
5333         * Makefile.in (HTAB_H): New variable.
5335 2000-04-23  Richard Henderson  <rth@cygnus.com>
5337         * typeck.c (c_expand_asm_operands): Restore the original
5338         contents of the output list.
5340 2000-04-22  Gabriel Dos Reis <gdr@codesourcery.com>
5342         * ir.texi:  Document complex number representation.
5344 2000-04-20  Nathan Sidwell  <nathan@codesourcery.com>
5346         * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
5347         (target_incomplete_p): New function.
5348         (tinfo_base_init): Create comdat NTBS name variable.
5349         (ptr_initializer): Add non_public parameter. Calculate it.
5350         (ptmd_initializer): Likewise.
5351         (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
5352         (create_real_tinfo_var): Add non_public parameter. Use it.
5353         Push proxy into global namespace.
5354         * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
5355         New enumeration.
5356         * inc/typeinfo (type_info::before, type_info::operator==):
5357         Compare __name addresses.
5359         * tinfo2.cc: Remove new-abi builtins comment.
5361 2000-04-20  Jason Merrill  <jason@casey.cygnus.com>
5363         * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
5365         * call.c (joust): Exit early if we get the same function, too.
5367         * decl2.c (key_method): Return NULL_TREE for template classes.
5368         (import_export_class): Don't need to check for template classes.
5370 2000-04-18  Zack Weinberg  <zack@wolery.cumb.org>
5372         * lex.c: Remove references to cccp.c.
5374 2000-04-18  Mark Mitchell  <mark@codesourcery.com>
5376         * cp-tree.h (lang_decl_flags): Remove const_memfunc and
5377         volatile_memfunc.  Add destructor_attr.  Adjust dummy.
5378         (DECL_DESTRUCTOR_P): Use destructor_attr.
5379         (DECL_CONST_MEMFUNC_P): Reimplement.
5380         (DECL_VOLATILE_MEMFUNC_P): Remove.
5381         * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
5382         (overrides): Use DECL_DESTRUCTOR_P.
5383         (check_for_override): Likewise.
5384         * decl.c (start_function): Likewise.
5385         * decl2.c (grokfclassfn): Likewise.
5386         (check_classfn): Likewise.
5387         (grok_function_init): Likewise.
5389 2000-04-17  Mark Mitchell  <mark@codesourcery.com>
5391         * decl2.c (grokfield): Issue error on illegal data member
5392         declaration.
5394 Mon Apr 17 17:11:16 2000  Mark P Mitchell  <mark@codesourcery.com>
5396         * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
5398 2000-04-16  Mark Mitchell  <mark@codesourcery.com>
5400         * class.c (build_vtable_entry): Don't build thunks for type-info
5401         functions.
5403 2000-04-16  Jason Merrill  <jason@casey.cygnus.com>
5405         * decl.c (decls_match): Allow a redeclaration of a builtin to
5406         specify args while the builtin did not.
5408 2000-04-15  Mark Mitchell  <mark@codesourcery.com>
5410         * cp-tree.def (THUNK_DECL): Add to documentation.
5411         * cp-tree.h (flag_huge_objects): Declare.
5412         * class.c (modify_vtable_entry): Tidy.
5413         (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
5414         Calculate delta appropriately for the new ABI.
5415         (dfs_modify_vtables): Use it.
5416         (modify_all_vtables): Fix thinko in code to add overriding copies
5417         of functions to primary vtables.
5418         (build_clone): Fix typo in comment.
5419         (clone_function_decl): Correct order of destructors in vtable.
5420         (build_vbase_offset_vtbl_entries): Adjust comment.
5421         (dfs_vcall_offset_queue_p): Remove.
5422         (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
5423         (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
5424         (build_vtable_entry): Correct check for pure virtual functions.
5425         Don't declare flag_huge_objects.
5426         * decl.c (flag_huge_objects): Remove declaration.
5427         * method.c (make_thunk): Tweak mangling for vcall offset thunks.
5428         Use int_size_in_bytes.
5429         (emit_thunk): Handle vcall offset thunks.
5431 Sat Apr 15 16:00:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
5433         * decl2.c (parse_time, varconst_time): Delete declarations.
5434         (finish_file): Delete LINENO declaration.
5435         START_TIME and THIS_TIME now long.
5437 2000-04-13  Nathan Sidwell  <nathan@codesourcery.com>
5439         * class.c (build_base_field): Reformat comment.
5441         * inc/cxxabi.h (stddef.h): Comment inclusion.
5442         (__base_class_info::__offset): Comment shift.
5444 2000-04-12  Mark Mitchell  <mark@codesourcery.com>
5446         * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
5447         (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
5448         (cp_push_exception_identifier): New macro.
5449         (DECL_COMPLETE_DESTRUCTOR_P): New macro.
5450         (DECL_BASE_DESTRUCTOR_P): Likewise.
5451         (DECL_DELETING_DESTRUCTOR_P): Likewise.
5452         (get_vtbl_decl_for_binfo): Fix formatting.
5453         (in_charge_arg_for_name): New macro.
5454         (maybe_build_cleanup_and_delete): Remove declaration.
5455         * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
5456         (in_charge_arg_for_name): New function.
5457         (build_new_method_call): Use it.  Handle cloned destructors.
5458         (build_clone): Don't make the base constructor virtual.
5459         Automatically defer generated functions.
5460         (clone_function_decl): Handle destructors, too.
5461         (clone_constructors_and_destructors): Likewise.
5462         (create_vtable_ptr): Don't create a vtable entry for a cloned
5463         function.
5464         * decl.c (predefined_identifier): Add ctor_or_dtor_p.
5465         (initialize_predefined_identifiers): Update appropriately.
5466         (finish_destructor_body): Simplify.
5467         (maybe_build_cleanup_and_delete): Remove.
5468         * except.c (expand_throw): Handle new-ABI destructors.
5469         * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
5470         (build_dtor_call): New function.
5471         (build_delete): Use it.  Simplify.
5472         * optimize.c (maybe_clone_body): Handle destructors.
5473         * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
5475         * exception.cc (cleanup_fn): New typedef.
5476         (CALL_CLEANUP): New macro.
5477         (cp_eh_info): Use them.
5478         (__cp_push_exception): Likewise.
5479         (__cp_pop_exception): Likewise.
5481 2000-04-11  Mark Mitchell  <mark@codesourcery.com>
5483         * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
5484         (complete_dtor_identifier): New macro.
5485         (CLASSTYPE_FIRST_CONVERSION): Remove.
5486         (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
5487         (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
5488         (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
5489         (CLASSTYPE_CONSTRUCTORS): Likewise.
5490         (CLASSTYPE_DESTRUCTORS): Likewise.
5491         (lang_decl): Add cloned_function.
5492         (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
5493         (DECL_BASE_CONSTRUCTOR_P): Likewise.
5494         (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
5495         (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
5496         (DECL_CLONED_FUNCTION_P): Likewise.
5497         (DECL_CLONED_FUNCTION): Likewise.
5498         (clone_function_decl): Declare.
5499         (maybe_clone_body): Likewise.
5500         * call.c (build_user_type_conversion_1): Call complete object
5501         constructors in the new ABI.
5502         (build_new_method_call): Don't add in-charge parameters under the
5503         new ABI.
5504         * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
5505         DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
5506         CLASSTYPE_DESTRUCTOR_SLOT.
5507         (build_clone): New function.
5508         (clone_function_decl): Likewise.
5509         (clone_constructors_and_destructors): Likewise.
5510         (check_bases_and_members): Use it.
5511         * decl.c (iniitialize_predefined_identifiers): Initialize
5512         complete_dtor_identifier.
5513         (finish_function): Don't add extra code to a clone.
5514         (lang_mark_tree): Mark cloned_function.
5515         * decl2.c (mark_used): Don't bother trying to instantiate things
5516         we synthesized.
5517         * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
5518         * method.c (set_mangled_name_for_decl): Don't treat clones as
5519         constructors.
5520         (synthesize_method): Sythesize cloned functions, not the clones.
5521         * optimize.c (inline_data): Update comment on ret_label.
5522         (remap_block): Don't assume DECL_INITIAL exists.
5523         (copy_body_r): Allow ret_label to be NULL.
5524         (maybe_clone_body): Define.
5525         * pt.c (tsubst_decl): Handle clones.
5526         (instantiate_clone): New function.
5527         (instantiate_template): Use it.
5528         (set_mangled_name_for_template_decl): Don't treat clones as
5529         constructors.
5530         * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
5531         CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
5532         * semantics.c (expand_body): Clone function bodies as necessary.
5534         * optimize.c (remap_decl): Avoid sharing structure for arrays
5535         whose size is only known at run-time.
5536         * tree.c (copy_tree_r): Don't copy PARM_DECLs.
5538         * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
5539         to has_in_charge_parm_p.
5540         (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
5541         (DECL_HAS_IN_CHARGE_PARM_P): ... this.
5542         (DECL_COPY_CONSTRUCTOR_P): New macro.
5543         * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
5544         (build_user_type_conversion_1): Likewise.
5545         (convert_like_real): Likewise.
5546         (build_over_call): Likeiwse.  Use DECL_COPY_CONSTRUCTOR_P.
5547         * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
5548         (copy_args_p): Likewise.
5549         (grok_ctor_properties): Likewise.
5550         (start_function): Likewise.
5551         * decl2.c (maybe_retrofit_in_charge): Likewise.  Set it.
5552         * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
5553         * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
5554         * method.c (do_build_copy_constructor): Use
5555         DECL_HAS_IN_CHARGE_PARM_P.
5556         (synthesize_method): Likewise.
5557         * pt.c (instantiate_template): Remove goto.
5558         * tree.c (build_cplus_method_type): Remove mention of obstacks in
5559         comment.
5561         * cp-tre.h (finish_function): Change prototype.
5562         * decl.c (end_cleanup_fn): Adjust caller.
5563         (finish_function): Take only one parameter.
5564         * decl2.c (finish_objects): Adjust caller.
5565         (finish_static_storage_duration_function): Likewise.
5566         * method.c (emit_thunk): Likewise.
5567         * parse.y: Likewise.
5568         * parse.c: Regenerated.
5569         * pt.c (instantiate_decl): Likewise.
5570         * rtti.c (synthesize_tinfo_fn): Likewise.
5571         * semantics.c (expand_body): Likewise.
5573         * cp-tree.h (copy_decl): New function.
5574         * class.c (finish_struct_1): Use it.
5575         * lex.c (copy_decl): Define it.
5576         * pt.c (tsubst_decl): Likewise.
5577         * tree.c (copy_template_template_parm): Likewise.
5579         * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
5580         has_nonpublic_assign_ref.
5581         (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
5582         (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
5583         * class.c (finish_struct_methods): Don't set
5584         TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
5585         (interface_only): Don't declare.
5586         (interface_unknown): Likewise.
5588 2000-04-11  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5590         * tree.h (HAVE_TEMPLATES): Remove definition.
5591         * lang-options.h (-fthis-is-variable): Remove documentation.
5593 2000-04-10  Jason Merrill  <jason@casey.cygnus.com>
5595         * class.c (instantiate_type): Handle object-relative template-id.
5597         * semantics.c (finish_expr_stmt): Call convert_to_void here.
5598         * decl.c (cplus_expand_expr_stmt): Not here.
5600         * rtti.c (build_dynamic_cast_1): Call non_lvalue.
5601         Initialize exprtype earlier.
5603         * parse.y (fn.def1): Check for defining types in return types.
5605         * decl.c (check_tag_decl): Notice extra fundamental types.
5606         Diagnose empty decls in classes, too.
5608         * decl.c (grokdeclarator): Don't override an anonymous name if no
5609         declarator was given.
5611         * cvt.c (convert_to_void): Call resolve_offset_ref.
5613         * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
5615         * decl2.c (decl_namespace): Handle getting a type.
5617         * typeck.c (build_c_cast): Re-enable warning for cast between
5618         pointer and integer of different size.
5620 2000-04-10  Nathan Sidwell  <nathan@codesourcery.com>
5622         * inc/cxxabi.h (__pointer_type_info): Add restrict and
5623         incomplete flags.
5624         (__pointer_type_info::__pointer_catch): New virtual function.
5625         (__pointer_to_member_type_info): Derive from
5626         __pointer_type_info. Adjust.
5627         (__pointer_to_member_type_info::__do_catch): Remove.
5628         (__pointer_to_member_type_info::__is_pointer_p): Declare.
5629         (__pointer_to_member_type_info::__pointer_catch): Declare.
5630         * rtti.c (qualifier_flags): Add restrict flag.
5631         (ptmd_initializer): Reorder members.
5632         (create_tinfo_types): Expand comments. Reorder
5633         ptmd_desc_type_node members.
5634         * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
5635         Implement.
5636         (__pointer_type_info::__do_catch): Move specific code into
5637         __pointer_catch. Call it.
5638         (__pointer_type_info::__pointer_catch): Non-pointer-to-member
5639         specific catch checking. Fix void conversion check.
5640         (__pointer_to_member_type_info::__do_catch): Remove.
5641         (__pointer_to_member_type_info::__pointer_catch): Implement.
5643 2000-04-10  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
5645         * lex.c (init_parse): Remove traces of classof and headof.
5646         * decl2.c (flag_operator_names): Default to 1.
5647         (lang_decode_option): Do not set it for -ansi.
5649 2000-04-09  Mark Mitchell  <mark@codesourcery.com>
5651         * cp-tree.h (struct lang_decl): Remove main_decl_variant.
5652         (DECL_MAIN_VARIANT): Remove.
5653         * decl.c (duplicate_decls): Don't set it.
5654         (start_function): Likewise.
5655         (lang_mark_tree): Don't mark it.
5656         * decl2.c (defer_fn): Don't use it.
5657         * lex.c (retrofit_lang_decl): Don't set it.
5658         * pt.c (tsubst_decl): Likewise.
5659         * ptree.c (print_lang_decl): Don't print it.
5660         * typeck.c (mark_addressable): Don't use it.
5662 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
5664         * vec.cc: Include <new> and <exception>.
5665         (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
5666         (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
5667         terminate.
5668         (__cxa_vec_delete): Catch dtor exceptions.
5670 2000-04-09  Nathan Sidwell  <nathan@codesourcery.com>
5672         Prepend __ to implementation defined names.
5673         * inc/typeinfo (type_info): Rename _name to __name.
5674         (type_info::type_info): Rename parameter.
5675         (type_info::operator==, type_info::operator!=,
5676         type_info::before): Likewise.
5677         (type_info::is_pointer_p, type_info::is_function_p,
5678         type_info::do_catch, type_info::do_upcast): Prepend __. Rename
5679         parameters.
5680         * inc/cxxabi.h
5681         (__fundamental_type_info::__fundamental_type_info) Rename parameters.
5682         (__pointer_type_info::__pointer_type_info): Likewise.
5683         (__pointer_type_info::is_pointer_p,
5684         __pointer_type_info::do_catch): Prepend __. Rename parameters.
5685         (__array_type_info::__array_type_info): Rename parameters.
5686         (__function_type_info::__function_type_info): Likewise.
5687         (__function_type_info::is_function_p): Prepend __.
5688         (__enum_type_info::__enum_type_info): Rename parameters.
5689         (__pointer_to_member_type_info::__pointer_to_member_type_info):
5690         Likewise.
5691         (__pointer_to_member_type_info::do_catch): Prepend __. Rename
5692         parameters.
5693         (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
5694         (__class_type_info::__class_type_info): Rename parameters.
5695         (__class_type_info::sub_kind): Prepend __. Adjust member names.
5696         (__class_type_info::upcast_result,
5697         __class_type_info::dyncast_result): Prepend __. Move definition
5698         into tinfo.cc.
5699         (__class_type_info::do_upcast, __class_type_info::do_catch,
5700         __class_type_info::find_public_src,
5701         __class_type_info::do_dyncast,
5702         __class_type_info::do_find_public_src): Prepend __. Rename
5703         parameters.
5704         (__si_class_type_info::__si_class_type_info): Rename parameters.
5705         (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
5706         __si_class_type_info::do_find_public_src): Prepent __. Rename
5707         parameters.
5708         (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
5709         (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
5710         __vmi_class_type_info::do_find_public_src): Prepent __. Rename
5711         parameters.
5712         (__dynamic_cast): Rename parameters.
5713         * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
5714         type_info::do_catch, type_info::do_upcast): Prepend __.
5715         (contained_p, public_p, virtual_p, contained_public_p,
5716         contained_nonpublic_p, contained_nonvirtual_p): Adjust.
5717         (__class_type_info::do_catch,
5718         __class_type_info::do_upcast): Prepend __. Adjust.
5719         (__class_type_info::__upcast_result,
5720         __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
5721         Adjust.
5722         (__class_type_info::find_public_src): Prepend __. Adjust.
5723         (__class_type_info::do_find_public_src,
5724         __si_class_type_info::do_find_public_src,
5725         __vmi_class_type_info::do_find_public_src): Likewise.
5726         (__class_type_info::do_dyncast,
5727         __si_class_type_info::do_dyncast,
5728         __vmi_class_type_info::do_dyncast): Likewise.
5729         (__class_type_info::do_upcast,
5730         __si_class_type_info::do_upcast,
5731         __vmi_class_type_info::do_upcast): Likewise.
5732         (__dynamic_cast): Adjust.
5733         * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
5734         (__function_type_info::is_function_p): Likewise.
5735         (__pointer_type_info::do_catch): Likewise. Adjust.
5736         (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
5737         (__throw_type_match_rtti_2): Adjust.
5738         (__is_pointer): Adjust.
5740 2000-04-08  Mark Mitchell  <mark@codesourcery.com>
5742         * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
5743         (complete_ctor_identifier): New macro.
5744         (special_function_kind): Add sfk_copy_constructor and
5745         sfk_assignment_operator.
5746         (LOOKUP_HAS_IN_CHARGE): Remove.
5747         (cons_up_default_function): Rename to ...
5748         (implicitly_declare_fn): ... this.
5749         * call.c (build_new_method_call): Add in-charge parameters for
5750         constructors here.
5751         * class.c (add_implicitly_declared_members): Change parameter name
5752         from cant_have_assignment to cant_have_const_assignment.
5753         Replace calls to cons_up_default_function to implicitly_declare_fn.
5754         * cvt.c (ocp_convert): Use complete_ctor_identifier.
5755         * decl.c (initialize_predefined_identifiers): Initialize it.
5756         (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
5757         complex expression.
5758         * init.c (expand_default_init): Don't calculate the in-charge
5759         parameter here.
5760         (build_new_1): Likewise.
5761         * lex.c (cons_up_default_function): Move to method.c.
5762         * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
5763         (implicitly_declare_fn): New function.
5764         * typeck.c (build_static_cast): Use complete_ctor_identifier.
5765         (build_modify_expr): Likewise.
5766         * typeck2.c (build_functional_cast): Likewise.
5768         Under the new ABI, constructors don't return `this'.
5769         * cp-tree.h (warn_reorder): Declare.
5770         (special_function_kind): New enum.
5771         (global_base_init_list): Remove declaration.
5772         (emit_base_init): Don't return a value.
5773         (check_base_init): Don't declare.
5774         (is_aggr_typedef): Likewise.
5775         * decl.c (check_special_function_return_type): New function.
5776         (return_types): Remove.
5777         (grokdeclarator): Use check_special_function_return_type.
5778         (start_function): Don't initialize ctor_label under the new ABI.
5779         (finish_construtor_body): Don't create a corresponding LABEL_STMT.
5780         * init.c (begin_init_stmts): Move to top of file.
5781         (finish_init_stmts): Likewise.
5782         (warn_reorder): Don't declare.
5783         (emit_base_init): Don't create a STMT_EXPR here.  Don't return a
5784         value.
5785         (check_base_init): Remove.
5786         (is_aggr_typedef): Likewise.
5787         (build_new_1): Don't use the return value of a constructor.
5788         * semantics.c (setup_vtbl_ptr): Don't use the return value
5789         of emit_base_init.
5790         * typeck.c (check_return_expr): Don't magically convert return
5791         statements into `return this' in constructors under the new ABI.
5793         * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
5794         CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
5795         (base_ctor_identifier): New macro.
5796         (base_dtor_identifier): Likewise.
5797         (deleting_dtor_identifier): Likewise.
5798         * decl.c: Don't include obstack.h.
5799         (obstack_chunk_alloc): Don't define.
5800         (obstack_chunk_free): Likewise.
5801         (struct predefined_identifier): New type.
5802         (initialize_predefined_identifiers): New function.
5803         (init_decl_processing): Use it.
5804         (debug_temp_inits): Remove.
5805         (start_method): Don't call preserve_data.
5806         (hack_incomplete_structures): Update comment.
5807         * init.c (init_init_processing): Don't initialize
5808         nelts_identifier.
5809         (build_offset_rf): Remove dead code.
5810         (build_delete): Use CLASSTYPE_N_BASECLASSES.
5811         * search.c (init_search_processing): Don't initialize
5812         vptr_identifier.
5814 2000-04-08  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5816         * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
5817         some sign_compare warnings.
5819 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
5821         Rename abi::__vmi_class_type_info members.
5822         * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
5823         base_list, detail_masks members to vmi_flags, vmi_base_count,
5824         vmi_bases and vmi_flags_masks respectively.
5825         (__vmi_class_type_info::vmi_flags_masks): Rename
5826         details_unknown_mask to flags_unknown_mask.
5827         * tinfo.cc (__class_type_info::do_upcast): Adjust.
5828         (__vmi_class_type_info::do_find_public_src): Adjust.
5829         (__vmi_class_type_info::do_dyncast): Adjust.
5830         (__vmi_class_type_info::do_upcast): Adjust.
5832 2000-04-07  Nathan Sidwell  <nathan@codesourcery.com>
5834         * tinfo.cc (convert_to_base): New function.
5835         (get_vbase_offset): Remove. Move into convert_to_base.
5836         (__vmi_class_type_info::do_find_public_src): Adjust.
5837         (__vmi_class_type_info::do_dyncast): Adjust.
5838         (__vmi_class_type_info::do_upcast): Adjust.
5840 2000-04-06  Jason Merrill  <jason@yorick.cygnus.com>
5842         * tinfo.cc (operator=): Use __builtin_strcmp.
5843         * tinfo2.cc (before): Likewise.
5845 2000-04-06  Mark Mitchell  <mark@codesourcery.com>
5847         * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
5848         (DECL_SAVED_INLINE): Rename to ...
5849         (DECL_DEFERRED_FN): ... this.
5850         (in_function_p): Remove declaration.
5851         (mark_inline_for_output): Rename to ...
5852         (defer_fn): ... this.
5853         * decl.c (finish_function): Adjust call to mark_inline_for_output.
5854         (in_function_p): Remove definition.
5855         * decl2.c (saved_inlines): Rename to ...
5856         (deferred_fns): ... this.
5857         (saved_inlines_used): Rename to ...
5858         (deferred_fns_used): ... this.
5859         (mark_inline_for_output): Rename to ...
5860         (defer_fn): ... this.
5861         (finish_file): Adjust accordingly.
5862         (init_decl2): Likewise.
5863         * lex.c (cons_up_default_function): Likewise.
5864         * pt.c (mark_decl_instantiated): Likewise.
5865         (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
5866         circumstances.
5867         * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
5868         * semantics.c (expand_body): Defer more functions.
5870 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
5872         * vec.cc: New file.
5873         * Make-lang.in (CXX_LIB2FUNCS): Add it.
5874         (vec.o): Build it.
5875         * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5876         __cxa_vec_delete): Declare.
5878 2000-04-06  Nathan Sidwell  <nathan@codesourcery.com>
5880         * rtti.c (dfs_class_hint_mark): New static function.
5881         (dfs_class_hint_unmark): New static function.
5882         (class_hint_flags): Use them.
5884 2000-04-05  Benjamin Kosnik  <bkoz@cygnus.com>
5886         * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
5888 2000-04-05  Mark Mitchell  <mark@codesourcery.com>
5890         * cp-tree.h (instantiate_decl): Change prototype.
5891         * decl2.c (mark_used): Adjust call.
5892         * optimize.c (inlinable_function_p): Adjust handling of templates.
5893         * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
5894         (do_type_instantiation): Likewise.
5895         (instantiate_decl): Defer more templates.
5896         (instantiate_pending_templates): Adjust logic to handle inline
5897         friend functions.
5899         * Makefile.in (GGC_H): New variable.  Use it throughout in place
5900         of ggc.h.
5902         * call.c: Don't include obstack.h.  Include ggc.h.
5903         (obstack_chunk_alloc): Don't define.
5904         (obstack_chunk_free): Likewise.
5905         (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
5906         * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
5907         (pop_switch): Free it.
5909         * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
5911         * dump.c (dequeue_and_dump): Don't try to print the bit_position
5912         if we don't have a DECL_FIELD_OFFSET.
5914 Wed Apr  5 15:12:18 MET DST 2000  Jan Hubicka  <jh@suse.cz>
5916         * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
5917         special_function_p.
5919 2000-04-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
5921         * cfns.gperf (hash, libc_name_p): Prototype.
5923         * rtti.c (build_dynamic_cast_1): Constification.
5925         * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
5927         * semantics.c (deferred_type_access_control): Prototype.
5929 2000-04-04  Mark Mitchell  <mark@codesourcery.com>
5931         Correct many new ABI issues regarding vbase and vcall offset
5932         layout.
5933         * cp-tree.h (BINFO_VTABLE): Document.
5934         (struct lang_type): Tweak formatting.
5935         (BINFO_PRIMARY_BINFO): Add to documentation.
5936         (CLASSTYPE_VSIZE): Fix typo in comment.
5937         (CLASSTYPE_VBASECLASSES): Update documentation.
5938         (BINFO_VBASE_MARKED): Remove.
5939         (SET_BINFO_VBASE_MARKED): Likewise.
5940         (CLEAR_BINFO_VBASE_MARKED): Likewise.
5941         (BINFO_FIELDS_MARKED): Remove.
5942         (SET_BINFO_FIELDS_MARKED): Likewise.
5943         (CLEAR_BINFO_FIELDS_MARKED): Likewise.
5944         (enum access_kind): New enumeration.
5945         (num_extra_vtbl_entries): Remove declaration.
5946         (size_extra_vtbl_entries): Likewise.
5947         (get_vtbl_decl_for_binfo): New function.
5948         (dfs_vbase_unmark): Remove declaration.
5949         (mark_primary_bases): Likewise.
5950         * class.c (SAME_FN): Remove.
5951         (struct vcall_offset_data_s): Move definition.
5952         (build_vbase_pointer): Use `build', not `build_binary_op', to
5953         access the vbase pointer under the new ABI.
5954         (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
5955         (build_primary_vtable): Likewise.
5956         (dfs_mark_primary_bases): Move here from search.c.
5957         (mark_primary_bases): Likewise.
5958         (determine_primary_bases): Under the new ABI, don't make a base
5959         class a primary base just because we don't yet have any virtual
5960         functions.
5961         (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
5962         (num_vfun_entries): Remove.
5963         (dfs_count_virtuals): Likewise.
5964         (num_extra_vtbl_entries): Likewise.
5965         (size_extra_vtbl_entries): Likewise.
5966         (layout_virtual_bases): Iterate in inheritance graph order under
5967         the new ABI.
5968         (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
5969         indicate that a vfield is present.
5970         (init_class_processing): Initialize access_public_node, etc., from
5971         ak_public, etc.
5972         (get_vtbl_decl_for_binfo): New function.
5973         (dump_class_hierarchy_r): Likewise.
5974         (dump_class_hierarchy): Use it.
5975         (finish_vtbls): Build the vtbls in inheritance graph order.
5976         (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
5977         (initialize_vtable): Use get_vtbl_decl_for_binfo.
5978         (accumulate_vtbl_inits): Add comments explaining why a pre-order
5979         walk is required.
5980         (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
5981         where the vptr points, even for primary vtables.
5982         (build_vtbl_initializer): Adjust handling of vbase and vcall
5983         offsets.
5984         (build_vcall_and_vbase_vtable_entries): New function.
5985         (dfs_build_vbase_offset_vtbl_entries): Remove.
5986         (build_vbase_offset_vtbl_entries): Reimplement.
5987         (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
5988         were already handled in a primary base class vtable.
5989         (build_vcall_offset_vtbl_entries): Adjust.
5990         (build_rtti_vtbl_entries): Adjust.
5991         * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
5992         * init.c (expand_virtual_init): Simplify.
5993         * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
5994         * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
5995         * search.c (BINFO_ACCESS): New macro.
5996         (SET_BINFO_ACCESS): Likewise.
5997         (dfs_access_in_type): Manipulate access_kinds, not access nodes.
5998         (access_in_type): Likewise.
5999         (dfs_accessible_p): Likewise.
6000         (protected_accessible_p): Likewise.
6001         (lookup_fnfields_1): Adjust documentation.
6002         (dfs_mark_primary_bases): Move to class.c
6003         (mark_primary_bases): Likewise.
6004         (dfs_vbase_unmark): Remove.
6005         (virtual_context): Use BINFO_FOR_VBASE.
6006         (dfs_get_vbase_types): Simplify.
6007         (dfs_build_inheritance_graph_order): New function.
6008         (get_vbase_types): Use it.
6009         * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
6011         * tinfo.cc (get_vbase_offset): New function.
6012         (__vmi_class_type_info::do_find_public_src): Use it.
6013         (__vmi_class_type_info::do_dyncast): Likewise.
6014         (__vmi_class_type_info::do_upcast): Likewise.
6016 2000-04-03  Zack Weinberg  <zack@wolery.cumb.org>
6018         * lang-specs.h: Pass -fno-show-column to the preprocessor.
6020 2000-03-30  Nathan Sidwell  <nathan@codesourcery.com>
6022         * rtti.c (class_hint_flags): Rename flags.
6023         (class_initializer): Remove flags.
6024         (synthesize_tinfo_var): Combine offset and flags. Add flags
6025         for __vmi_class_type_info.
6026         (create_tinfo_types): Remove flags from __class_type_info and
6027         __si_class_type_info. Merge flags and offset from
6028         base_class_type_info.
6029         * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
6030         (__base_class_info::is_virtual_p): Adjust.
6031         (__base_class_info::is_public_p): Adjust.
6032         (__base_class_info::offset): New accessor.
6033         (__class_type_info::details): Remove member.
6034         (__class_type_info::__class_type_info): Lose details.
6035         (__class_type_info::detail_masks): Remove.
6036         (__si_class_type_info::__si_class_type_info): Lose details.
6037         (__vmi_class_type_info::details): New member.
6038         (__vmi_class_type_info::__vmi_class_type_info): Adjust.
6039         (__vmi_class_type_info::detail_masks): New member.
6040         * tinfo.cc (__class_type_info::do_upcast): Initialize result
6041         with unknown_details_mask.
6042         (__vmi_class_type_info::do_find_public_src): Adjust
6043         (__vmi_class_type_info::do_dyncast): Adjust.
6044         (__vmi_class_type_info::do_upcast): Set result details, if
6045         needed. Adjust.
6046         (__dynamic_cast): Temporarily #if out optimization.
6048 2000-03-29  Nathan Sidwell  <nathan@codesourcery.com>
6050         * rtti.c (get_tinfo_decl): Mark used.
6051         (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
6052         mark as dealt with, if we output it.
6054 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
6056         * class.c: Reorganize to put virtual function table initialization
6057         machinery at the end of the file.
6059 2000-03-28  Jason Merrill  <jason@casey.cygnus.com>
6061         * class.c (finish_struct): Use bitsize_zero_node.
6062         * pt.c (instantiate_class_template): Likewise.
6064 2000-03-28  Mark Mitchell  <mark@codesourcery.com>
6066         Put RTTI entries at negative offsets in new ABI.
6067         * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
6068         vbase offset at index -3, not -1.
6069         (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
6070         dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
6071         (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
6072         (build_rtti_vtbl_entries): New function.
6073         (set_rtti_entry): Remove.
6074         (build_primary_vtable): Don't use it.
6075         (build_secondary_vtable): Likewise.
6076         (start_vtable): Remove.
6077         (first_vfun_index): New function.
6078         (set_vindex): Likewise.
6079         (add_virtual_function): Don't call start_vtable.  Do call
6080         set_vindex.
6081         (set_primary_base): Rename parameter.
6082         (determine_primary_base): Likewise.
6083         (num_vfun_entries): Don't use skip_rtti_stuff.
6084         (num_extra_vtbl_entries): Include RTTI information.
6085         (build_vtbl_initializer): Use build_rtti_vtbl_entries.
6086         (skip_rtti_stuff): Remove.
6087         (dfs_modify_vtables): Don't use it.
6088         (modify_all_vtables): Don't use start_vtable.  Do use set_vindex.
6089         (layout_nonempty_base_or_field): Update size handling.
6090         (create_vtable_ptr): Tweak.
6091         (layout_class_type): Adjust parameter names.
6092         (finish_struct_1): Simplify.
6093         * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
6094         (skip_rtti_stuff): Remove.
6095         (first_vfun_index): New function.
6096         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
6097         (dfs_vtable_path_marked_real_bases_queue_p): Remove.
6098         (marked_vtable_pathp): Declare.
6099         (unmarked_vtable_pathp): Likewise.
6100         * error.c (dump_expr): Use first_vfun_index to calculate vtable
6101         offsets.
6102         * rtti.c (build_headof): Look for RTTI at negative offsets.
6103         (get_tinfo_decl_dynamic): Likewise.
6104         (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
6105         here.
6106         (create_pseudo_type_info): Do it here instead.  Adjust so that
6107         vptr points at first virtual function.
6108         * search.c (marked_vtable_pathp): Make it global.
6109         (unmarked_vtable_pathp): Likewise.
6110         (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
6111         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
6112         (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
6113         (get_pure_virtuals): Likewise.
6114         (expand_upcast_fixups): Likewise.
6115         * tree.c (debug_binfo): Likewise.
6116         * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
6117         negative offset.
6119 Sun Mar 26 20:15:26 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6121         * class.c (check_field_decl): Fix typo.
6122         (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
6123         (check_methods): Likewise.
6124         (check_field_decls): Likewise.
6125         Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
6126         * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
6127         Use DECL_RESULT_FLD, not DECL_RESULT.
6128         * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
6129         * lex.c (identifier_type): Likewise.
6130         * pt.c (determine_specialization, lookup_template_class): Likewise.
6131         (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
6132         (resolve_overloaded_unification, more_specialized): Likewise.
6133         * semantics.c (finish_member_declaration): Likewise.
6134         * typeck.c (build_x_function_call): Likewise.
6136 2000-03-26  Mark Mitchell  <mark@codesourcery.com>
6138         * class.c (layout_empty_base): Handle empty bases with non-byte
6139         alignment.
6140         (build_base_field): Likewise.
6141         (layout_virtual_bases): Likewise.
6143         * class.c (finish_struct_1): Fix typo in this change:
6145         Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6147 2000-03-25  Mark Mitchell  <mark@codesourcery.com>
6149         * decl.c (grokdeclarator): Count partial specializations when
6150         keeping track of how many template classes have been seen.
6152         * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
6154 Sat Mar 25 09:12:10 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6156         * class.c (build_vbase_pointer_fields): layout_field now place_field.
6157         (get_vfield_offset): Use byte_position.
6158         (set_rtti_entry): Set OFFSET to ssizetype zero.
6159         (get_binfo_offset_as_int): Deleted.
6160         (dfs_record_base_offsets): Use tree_low_cst.
6161         (dfs_search_base_offsets): Likewise.
6162         (layout_nonempty_base_or_field): Reflect changes in RLI format
6163         and call byte_position.
6164         (layout_empty_base): Convert offset to ssizetype.
6165         (build_base_field): use rli_size_unit_so_far.
6166         (dfs_propagate_binfo_offsets): Do computation in proper type.
6167         (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
6168         (layout_class_type): Reflect changes in RLI names and fields.
6169         (finish_struct_1): Set DECL_FIELD_OFFSET.
6170         * dump.c (dequeue_and_dump): Call bit_position.
6171         * expr.c (cplus_expand_constant): Use byte_position.
6172         * rtti.c (expand_class_desc): Use bitsize_one_node.
6173         * typeck.c (build_component_addr): Use byte_position and don't
6174         special case for zero offset.
6176 2000-03-24  Nathan Sidwell  <nathan@codesourcery.com>
6178         * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
6180         * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
6181         tinfo object.
6182         (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
6183         vtable.
6185 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6187         * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
6188         DECL_P macros.
6189         * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
6190         make_typename_type, check_initializer, cp_finish_decl,
6191         xref_tag): Likewise.
6192         * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
6193         decl_namespace, arg_assoc_template_arg, arg_assoc,
6194         validate_nonmember_using_decl, do_class_using_decl): Likewise.
6195         * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
6196         args_to_string): Likewise.
6197         * friend.c (is_friend): Likewise.
6198         * lex.c (note_got_semicolon, note_list_got_semicolon,
6199         is_global): Likewise.
6200         * method.c (build_overload_nested_name, build_overload_value,
6201         build_qualified_name, build_qualified_name, hack_identifier): Likewise.
6202         * parse.y (typename_sub, typename_sub1): Likewise.
6203         * pt.c (push_inline_template_parms_recursive, check_template_shadow,
6204         process_partial_specialization, convert_template_argument,
6205         template_args_equal, add_pending_template, lookup_template_class,
6206         for_each_template_parm_r, maybe_fold_nontype_arg,
6207         tsubst, instantiate_template, type_unification_real, unify,
6208         instantiate_pending_templates, set_mangled_name_for_template_decl):
6209         Likewise.
6210         * repo.c (repo_get_id, repo_template_used): Likewise.
6211         * search.c (lookup_field_1): Likewise.
6212         * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
6213         * xref.c (classname): Likewise.
6215 2000-03-22  Mark Mitchell  <mark@codesourcery.com>
6217         * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
6218         (CANONICAL_BINFO): New macro.
6219         (BINFO_NEW_VTABLE_MARKED): Use it.
6220         (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
6221         (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
6222         * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
6223         not TREE_TYPE.
6224         (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6225         (build_secondary_vtable): Likewise.
6226         (dfs_finish_vtbls): Likewise.
6227         (dfs_accumulate_vtbl_inits): Likewise.
6228         (accumulate_vtbl_inits): New function.
6229         (finish_vtbls): Make sure that virtual bases come after
6230         non-virtual bases in the vtable group.
6231         (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
6232         (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6233         * search.c (struct vbase_info): Move definition.
6234         (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
6235         (unmarked_new_vtable_p): Likewise.
6236         (dfs_mark_vtable_path): Remove.
6237         (dfs_mark_new_vtable): Remove.
6238         (dfs_unmark_new_vtable): Likewise.
6239         (dfs_clear_search_slot): Likewise.
6240         (dfs_find_vbases):  Adjust usage of BINFO_NEW_VTABLE_MARKED.
6241         (dfs_clear_vbase_slots): Likewise.
6242         (init_vbase_pointers): LIkewise.
6244 2000-03-22  Jason Merrill  <jason@casey.cygnus.com>
6246         * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
6247         SIZETYPE to a non-SIZETYPE.
6249 2000-03-21  Mark Mitchell  <mark@codesourcery.com>
6251         * class.c (layout_virtual_bases): Adjust names in conditionally
6252         compiled code.
6254         * class.c (record_base_offsets): New function.
6255         (layout_conflict_p): Likewise.
6256         (layout_nonempty_base_or_field): Use it.
6257         (layout_empty_base): New function.
6258         (build_base_field): Use it.
6259         (build_base_fields): Update comment.
6260         (layout_virtual_bases): Fold in a little code form
6261         layout_basetypes.  Use layout_empty_base.
6262         (layout_basetypes): Remove.
6263         (end_of_class): New function.
6264         (layout_class_type): Use it.  Adjust.
6266         * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
6267         (fntype_p): Remove.
6268         * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
6269         comment.
6270         (dfs_skip_nonprimary_vbases_markedp): Likewise.
6271         * typeck.c (fntype_p): Remove.
6273         * cp-tree.h (TI_SPEC_INFO): Remove.
6274         (CLASSTYPE_TI_SPEC_INFO): Likewise.
6275         * pt.c (process_partial_specialization): Likewise.
6277         * class.c (build_base_field): Fix thinko in computation of binfo
6278         offsets.
6280         * tree.c (mark_local_for_remap_p): Mark variables declared in
6281         TARGET_EXPRs as well.
6283 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
6285         * typeck.c (require_complete_type, complete_type,
6286         complete_type_or_else, c_sizeof, c_sizeof_nowarn,
6287         build_array_ref, convert_arguments, pointer_diff,
6288         build_x_unary_op, build_unary_op, build_c_cast,
6289         build_modify_expr): Use COMPLETE_TYPE_P etc.
6290         * call.c (is_complete, convert_like_real,
6291         build_new_method_call): Likewise.
6292         * class.c (build_vbase_pointer_fields, check_bases,
6293         build_base_field, finish_struct_1, pushclass): Likewise.
6294         * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
6295         * decl.c (maybe_process_template_type_declaration, pushtag,
6296         pushdecl, redeclaration_error_message, start_decl, start_decl_1,
6297         layout_var_decl, check_initializer, cp_finish_decl,
6298         grokdeclarator, require_complete_types_for_parms,
6299         grok_op_properties, xref_tag, xref_basetypes,
6300         check_function_type): Likewise.
6301         * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
6302         * friend.c (do_friend): Likewise.
6303         * init.c (build_offset_ref): Likewise.
6304         * parse.y (structsp): Likewise.
6305         * pt.c (maybe_process_partial_specialization,
6306         tsubst_friend_function, instantiate_class_template, tsubst,
6307         do_type_instantiation, instantiate_pending_templates): Likewise.
6308         * repo.c (repo_get_id): Likewise.
6309         * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
6310         synthesize_tinfo_var, emit_support_tinfos): Likewise.
6311         * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
6312         * semantics.c (begin_class_definition): Likewise.
6313         * tree.c (build_cplus_method_type): Likewise.
6314         * typeck2.c (digest_init, build_functional_cast,
6315         add_exception_specifier): Likewise.
6316         * parse.h, parse.c: Regenerated.
6318 2000-03-21  Nathan Sidwell  <nathan@codesourcery.com>
6320         * inc/cxxabi.h: New header file. Define new-abi entry points.
6321         (__pointer_type_info::target): Rename member to ...
6322         (__pointer_type_info::type): ... here.
6323         (__base_class_info::type): Rename member to ...
6324         (__base_class_info::base): ... here.
6325         * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
6326         * cp-tree.h (CPTI_ABI): New global tree enumeration.
6327         (abi_node): New global tree node.
6328         * decl.c (abi_node): Document.
6329         (init_decl_processing): Initialize abi_node.
6330         * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
6331         (get_vmi_pseudo_type_info): Likewise.
6332         (create_tinfo_types): Likewise.
6333         (emit_support_tinfos): Likewise.
6334         * tinfo.h (cxxabi.h): Include for new-abi.
6335         Move rtti class definitions to new header file.
6336         * tinfo.cc (abi): Use the namespace.
6337         (std): Move new abi rtti classes from here ...
6338         (__cxxabiv1): ... to here.
6339         * tinfo2.cc (cxxabi.h): Include for new-abi.
6340         Move rtti class definitions to new header file.
6341         (std): Move new abi rtti classes from here ...
6342         (__cxxabiv1): ... to here.
6343         * inc/typeinfo (__class_type_info): Move into __cxxabiv1
6344         namespace.
6346 2000-03-20  Jed Wing <jedwin@zloty.ugcs.caltech.edu>
6347             Jason Merrill  <jason@casey.cygnus.com>
6349         * method.c (build_overload_int): Use host_integerp.
6351 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6353         * init.c (build_offset_ref): Handle the case of a templated member
6354         function.
6356 2000-03-19  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6358         * except.c (expand_exception_blocks): Clear catch_clauses_last.
6360 2000-03-18  Mark Mitchell  <mark@codesourcery.com>
6362         * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
6363         * class.c (check_bitfield_decl): Turn illegal bitfields into
6364         non-bitfields.
6365         (dfs_propagate_binfo_offsets): Adjust for new size_binop
6366         semantics.
6367         (dfs_offset_for_unshared_vbases): Likewise.
6368         * cvt.c (cp_convert_to_pointer): Convert NULL to a
6369         pointer-to-member correctly under the new ABI.
6370         * expr.c (cplus_expand_constant): Don't use cp_convert when
6371         turning an offset into a pointer-to-member.
6372         * init.c (resolve_offset_ref): Don't adjust pointers-to-members
6373         when dereferencing them under the new ABI.
6374         * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
6375         of pointers-to-members under the new ABI.
6377         * class.c (check_bitfield_decl): Remove restriction on really long
6378         bitfields.
6379         (layout_class_type): Implement new ABI handling of bitfields
6380         longer than their types.
6382 2000-03-18  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6384         * parse.y (extdefs): Call ggc_collect.
6385         * parse.c: Regenerated.
6387 2000-03-18  Nathan Sidwell  <nathan@codesourcery.com>
6389         * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
6390         (note_name_declared_in_class): Use OVL_CURRENT to get at a
6391         potential overload.
6393 Fri Mar 17 08:09:14 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6395         * class.c (build_vbase_path): Use integer_zerop.
6396         (build_vtable_entry): Use tree_low_cst.
6397         (get_vfield_offset): Use bit_position.
6398         (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
6399         Use tree_low_cst.
6400         (check_bitfield_decl): Set DECL_SIZE using convert.
6401         (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
6402         (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
6403         Use tree_low_cst.
6404         (finish_struct_1): Use bit_position.
6405         (dump_class_hierarchy): Use tree_low_cst.
6406         * cp-tree.h (min_precision): Add declaration.
6407         * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
6408         * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
6409         (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
6410         * expr.c (cplus_expand_constant): Use bit_position.
6411         * init.c (build_vec_init): Use host_integerp and tree_low_cst.
6412         * rtti.c (get_base_offset): Use bit_position.
6413         * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
6414         host_integerp, and tree_low_cst.
6415         (pointer_int_sum): Use integer_zerop.
6416         (build_component_addr): Use bit_position.
6418 2000-03-17  Nathan Sidwell  <nathan@codesourcery.com>
6420         * typeck.c (require_complete_type): Don't assume size_zero_node.
6421         (complete_type_or_else): Likewise.
6423 2000-03-16  Steven Grady <grady@digitaldeck.com>
6424             Jason Merrill  <jason@casey.cygnus.com>
6426         * rtti.c (build_dynamic_cast_1): Improve diagnostics.
6428 2000-03-16  Nathan Sidwell  <nathan@codesourcery.com>
6430         * decl2.c (grokfield): Bail out if type is error_mark_node.
6432 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
6434         * tinfo2.cc (__ptr_to_member_data): Rename to ...
6435         (__pointer_to_member_data): ... here. Adjust.
6436         * rtti.c (create_tinfo_types): Adjust.
6438 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
6440         * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
6441         * decl.c (ref_desc_type_node): Undocument.
6442         * rtti.c (ptr_ref_initializer): Rename to ...
6443         (ptr_initializer): ... here. Adjust comments.
6444         (ptmd_initializer): Fix comment thinko.
6445         (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
6446         (create_tinfo_types): Remove ref_desc_type_node init.
6447         * tinfo2.cc (__reference_type_info): Remove.
6449 2000-03-15  Nathan Sidwell  <nathan@codesourcery.com>
6451         * decl.c (cp_finish_decl): Remove obsolete comment.
6453         * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
6455 2000-03-14  Mark Mitchell  <mark@codesourcery.com>
6457         * cp-tree.h: Tweak documentation.
6458         * class.c (build_vbase_pointer_fields): Layout the fields, too.
6459         (avoid_overlap): Remove.
6460         (get_binfo_offset_as_int): New function.
6461         (dfs_serach_base_offsets): Likewise.
6462         (layout_nonempty_base_or_field): Likewise.
6463         (build_base_field): Layout fields here.  Avoid placing two objects
6464         of the same type at the same address, under the new ABI.
6465         (build_base_fields): Adjust accordingly.
6466         (create_vtable_ptr): Return the new field, but don't attach it to
6467         TYPE_FIELDS.
6468         (remove_base_field): Remove.
6469         (remove_base_fields): Remove.
6470         (layout_basetypes): Adjust accordingly.
6471         (layout_class_type): Call layout_field for each field, rather than
6472         just making a wholesale call to layout_type.
6474 2000-03-14  Jeff Sturm  <jsturm@sigma6.com>
6476         * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
6478 2000-03-13  Jason Merrill  <jason@casey.cygnus.com>
6480         * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
6482         * except.c (dtor_nothrow): New fn.
6483         (do_pop_exception): Use it.  Take type parm.
6484         (push_eh_cleanup): Take type parm.
6485         (expand_start_catch_block): Pass it.
6486         (build_eh_type_type_ref): Accept null type.
6488 2000-03-12  Mark Mitchell  <mark@codesourcery.com>
6490         * cp-tree.h (revert_static_member_fn): Change prototype.
6491         * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
6492         (grok_op_properties): Likewise.
6493         (start_function): Likewise.
6494         (revert_static_member_fn): Simplify.
6495         * pt.c (check_explicit_specialization): Adjust call to
6496         revert_static_member_fn.
6498 2000-03-11  Mark Mitchell  <mark@codesourcery.com>
6500         * cp-tree.h (scope_kind): New type.
6501         (tmpl_spec_kind): Likewise.
6502         (declare_pseudo_global_level): Remove.
6503         (pseudo_global_level_p): Rename to template_parm_scope_p.
6504         (pushlevel): Remove declaration.
6505         (begin_scope): New function.
6506         (finish_scope): Likewise.
6507         (current_tmpl_spec_kind): Likewise.
6508         * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
6509         Shorten keep to 2 bits.  Rename pseudo_global to template_parms_p.
6510         Add template_spec_p.
6511         (toplevel_bindings_p): Adjust.
6512         (declare_pseudo_global_level): Remove.
6513         (pseudo_global_level_p): Rename to template_parm_scope_p.
6514         (current_tmpl_spec_kind): New function.
6515         (begin_scope): Likewise.
6516         (finish_scope): Likewise.
6517         (maybe_push_to_top_level): Adjust.
6518         (maybe_process_template_type_declaration): Likewise.
6519         (pushtag): Likewise.
6520         (pushdecl_nonclass_level): Likewise.
6521         (lookup_tag): Likewise.
6522         (grokfndecl): Handle member template specializations.  Share
6523         constructor and non-constructor code.
6524         * decl2.c (check_classfn): Handle member template specializations.
6525         * pt.c (begin_template_parm_list): Use begin_scope.
6526         (begin_specialization): Likewise.
6527         (end_specialization): Likewise.
6528         (check_explicit_specialization): Use current_tmpl_spec_kind.
6529         Handle member template specializations.
6530         (end_template_decl): Use finish_scope.  Remove call to
6531         get_pending_sizes.
6532         (push_template_decl_real): Remove bogus error message.
6533         (tsubst_decl): Fix typo in code contained in comment.
6534         (instantiate_template): Handle member template specializations.
6535         (most_general_template): Likewise.
6537 2000-03-11  Gabriel Dos Reis  <gdr@codesourcery.com>
6539         * lex.c (whitespace_cr): Compress consecutive calls to warning().
6540         (do_identifier): Ditto for error().
6542         * pt.c (convert_nontype_argument): Ditto for cp_error().
6543         (convert_template_argument): Ditto for cp_pedwarn().
6545 2000-03-11  Jason Merrill  <jason@casey.cygnus.com>
6547         * exception.cc (__check_null_eh_spec): New fn.
6548         * except.c (expand_end_eh_spec): Call it if the spec is throw().
6550 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
6552         * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
6553         * except.c (expand_end_eh_spec): Add the return type.
6554         * rtti.c (throw_bad_cast): Add the parmtypes.
6555         (throw_bad_typeid): Likewise.
6557         * semantics.c (expand_stmt): Only leave out rtl for unused
6558         artificials, and set DECL_IGNORED_P on them as well.
6559         * decl.c (wrapup_globals_for_namespace): Likewise.
6561 2000-03-09  Nathan Sidwell  <nathan@codesourcery.com>
6563         * decl.c (maybe_commonize_var): Skip all artificial decls.
6564         * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
6566 2000-03-10  Jason Merrill  <jason@casey.cygnus.com>
6568         * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
6569         * cp-tree.h: Declare flag_enforce_eh_specs.
6570         * decl.c (store_parm_decls, finish_function): Check it.
6572         C library functions don't throw.
6573         * Makefile.in (cfns.h): New target.
6574         (except.o): Depend on it.
6575         * Make-lang.in (cc1plus): Depend on cfns.gperf.
6576         * cfns.gperf: New file.
6577         * cfns.h: Generated.
6578         * except.c: Include it.
6579         (nothrow_libfn_p): New fn.
6580         * decl.c (grokfndecl): Use it.
6581         * cp-tree.h: Declare it.
6583         * decl.c (push_overloaded_decl_1, auto_function,
6584         define_function): Lose.
6585         (build_library_fn_1): New static fn.
6586         (builtin_function): Use it.
6587         (get_atexit_node): Use build_library_fn_ptr.
6588         (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
6589         build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
6590         push_void_library_fn, push_throw_library_fn): New fns.
6591         * cp-tree.h: Declare them.
6592         (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
6593         (throw_bad_cast_node, throw_bad_typeid_node): Lose.
6594         * except.c (init_exception_processing, call_eh_info, do_pop_exception,
6595         (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
6596         * rtti.c (build_runtime_decl): Lose.
6597         (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
6598         build_dynamic_cast_1, expand_si_desc, expand_class_desc,
6599         expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
6601         * call.c (build_call): Remove result_type parm.
6602         Call mark_used on unused artificial fns.
6603         * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
6605 2000-03-09  Jason Merrill  <jason@casey.cygnus.com>
6607         * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
6608         appropriate.
6609         * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
6610         * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
6611         TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
6612         * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
6613         expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
6614         expand_generic_desc): Likewise.
6616 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
6618         * exception.cc (__cp_pop_exception): Cleanup the original object.
6620 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
6622         * decl.c (grok_op_properties): Merge conversion to void warning
6623         with other silly op warnings.
6625 2000-03-08  Jason Merrill  <jason@casey.cygnus.com>
6627         * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
6628         array CONSTRUCTOR elements.  Don't use expr_tree_cons.
6630 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
6632         * decl.c (cp_make_fname_decl): New function.
6633         (wrapup_globals_for_namespace): Don't emit unused static vars.
6634         (init_decl_processing): Remove comment about use of
6635         array_domain_type. Set make_fname_decl.
6636         (cp_finish_decl): Remove __FUNCTION__ nadgering.
6637         * semantics.c (begin_compound_stmt): Remove
6638         current_function_name_declared flagging.
6639         (expand_stmt): Don't emit unused local statics.
6640         * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
6641         specially.
6643 2000-03-08  Nathan Sidwell  <nathan@codesourcery.com>
6645         * typeck.c (convert_for_assignment): Don't look at array
6646         initializer.
6647         * call.c (convert_like_real): Likewise.
6649 2000-03-07  Jason Merrill  <jason@casey.cygnus.com>
6651         Add initial support for '\uNNNN' specifier.
6652         * lex.c (read_ucs): New fn.
6653         (readescape, skip_white_space): Call it.
6654         (is_extended_char, is_extended_char_1): New fns.
6655         (utf8_extend_token): New fn, #if 0'd out.
6656         (real_yylex): Treat extended chars like letters.
6658         * search.c (note_debug_info_needed): Walk the bases even if we
6659         weren't deferring the type itself.
6661 2000-03-07  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
6663         * decl2.c (finish_objects): Constify a char*.
6665         * method.c (emit_thunk): Likewise.
6667 2000-03-06  Nathan Sidwell  <nathan@codesourcery.com>
6669         * typeck.c (dubious_conversion_warnings): Look through
6670         REFERENCE_TYPE.
6672 Mon Mar  6 08:46:47 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6674         * class.c (dfs_modify_vtables): I is now unsigned.
6675         (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
6676         (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
6677         * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
6678         * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
6679         * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
6680         * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
6681         Call integer_all_onesp.
6682         * typeck2.c (process_init_constructor): Use compare_tree_int.
6684         * lang-specs.h (as): Don't call if -syntax-only.
6686 2000-03-06  Mark Mitchell  <mark@codesourcery.com>
6688         * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
6689         RTL_EXPR_HAS_NO_SCOPE after all.
6691 2000-03-05  Mark Mitchell  <mark@codesourcery.com>
6693         * expr.c (cplus_expand_expr, case STMT_EXPR): Use
6694         expand_start_stmt_expr and expand_end_stmt_expr directly.  Set
6695         RTL_EXPR_HAS_NO_SCOPE.
6697         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
6698         later.
6700         * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
6702 2000-03-05  Nathan Sidwell  <nathan@codesourcery.com>
6704         * call.c (convert_like): Macrofy.
6705         (convert_like_with_context): New macro.
6706         (convert_like_real): Renamed from convert_like.  Add calling
6707         context parameters, for diagnostics. Add recursive flag.  Call
6708         dubious_conversion_warnings for outer conversion.
6709         (build_user_type_conversion): Use convert_like_with_context.
6710         (build_over_call): Likewise. Don't warn about dubious
6711         conversions here. Adjust convert_default_arg calls.
6712         (convert_default_arg): Add context parameters for diagnostics.
6713         Pass throught to convert_like_with_context.
6714         * cp-tree.h (convert_default_arg): Add context parameters.
6715         (dubious_conversion_warnings): Prototype new function.
6716         * typeck.c (convert_arguments): Adjust convert_default_arg call.
6717         (dubious_conversion_warnings): New function, broken
6718         out of convert_for_assignment.
6719         (convert_for_assignment): Adjust.
6721 2000-03-03  Jason Merrill  <jason@casey.cygnus.com>
6723         * decl2.c (key_method): Break out from...
6724         (import_export_vtable, import_export_class): ...here.
6726         * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
6727         * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
6729         * search.c (note_debug_info_needed, dfs_debug_mark,
6730         dfs_debug_unmarkedp): Uncomment.  Adjust for new scheme.
6731         * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
6733 2000-03-03  Nathan Sidwell  <nathan@codesourcery.com>
6735         * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
6736         typos.
6738 2000-03-02  Mark Mitchell  <mark@codesourcery.com>
6740         * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
6741         (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
6742         (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
6743         (lang_type): Split gets_new into has_new and has_array_new.
6744         (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6745         (TYPE_GETS_NEW): Split into ...
6746         (TYPE_HAS_NEW_OPERATOR): ... this, and ...
6747         (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
6748         (DECL_ARRAY_DELETE_OPERATOR_P): New macro
6749         (build_op_new_call): Don't declare.
6750         (build_new_1): Likewise.
6751         * call.c (build_op_new_call): Remove.
6752         * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
6753         instead of TYPE_NEEDS_DESTRUCTOR.
6754         (finish_struct_bits): Likewise.
6755         (add_implicitly_declared_members): Likewise.
6756         (check_field_decl): Likewise.
6757         (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
6758         correctly under the new ABI.
6759         * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
6760         instead of TYPE_NEEDS_DESTRUCTOR.
6761         (initialize_local_var): Likewise.
6762         (destroy_local_var): Likewise.
6763         (cp_finish_decl): Likewise.
6764         (register_dtor_fn): Likewise.
6765         (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
6766         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.  Don't set
6767         TYPE_VEC_DELETE_TAKES_SIZE here.
6768         (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
6769         TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
6770         (store_parm_decls):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6771         (finish_destructor_body): Likewise.
6772         (maybe_build_cleanup_1): Likewise.
6773         * decl2.c (do_static_destruction): Likewise.
6774         * init.c (build_new_1): Make it static.
6775         (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6776         (expand_cleanup_for_base): Likewise.
6777         (get_cookie_size): New function.
6778         (build_new_1): Handle array-new cookies correctly under the new
6779         ABI.
6780         (build_vec_delete_1): Likewise.
6781         (build_vec_init):  Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6782         (build_delete): Likewise.
6783         (build_vec_delete): Handle array-new cookies correctly under the new
6784         ABI.
6785         * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6786         * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
6787         TYPE_HAS_ARRAY_NEW_OPERATOR.
6788         * ptree.c (print_lang_type): Check them.
6789         * search.c (context_for_name_lookup): Fix typo in comment.
6790         (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6791         * tree.c (break_out_cleanups): Likewise.
6792         (build_cplus_array_test_1): Likewise.
6793         (cp_build_qualified_type_real): Likewise.
6794         * typeck.c (complete_type): Likewise.
6796         * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
6797         the command-line, not the end.
6799 2000-03-01  Jason Merrill  <jason@casey.cygnus.com>
6801         * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
6803 2000-03-02  Tom Tromey  <tromey@cygnus.com>
6805         * cp-tree.h (build_java_class_ref): Declare.
6806         * init.c (build_java_class_ref): No longer static.
6807         * except.c (expand_throw): Generate a Java-style `throw' if the
6808         thrown object is a "Java" object.
6809         (initialize_handler_parm): Generate a Java-style lookup of
6810         exception info if the caught object is a "Java" object.
6811         (catch_language, catch_language_init): New globals.
6812         (decl_is_java_type): New function.
6813         (expand_start_catch_block): Don't call push_eh_info() or
6814         push_eh_cleanup() when handling a Java-style "catch".  Pass Java
6815         class reference to build_catch_block.
6817 Thu Mar  2 13:32:01 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6819         * typeck.c (comptypes): Treat sizetype like its language equivalent.
6821 2000-03-01  Bernd Schmidt  <bernds@cygnus.co.uk>
6823         * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
6824         to merge reference/pointer code and fix incorrect warnings.
6826 2000-02-29  Jason Merrill  <jason@casey.cygnus.com>
6828         * search.c (protected_accessible_p): Use context_for_name_lookup.
6830         * init.c (construct_virtual_bases): Fix thinko.
6831         * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
6833 2000-03-01  Martin von Loewis  <loewis@informatik.hu-berlin.de>
6835         * decl.c (current_function_decl): Move to toplev.c.
6837 2000-02-29  Nathan Sidwell  <nathan@codesourcery.com>
6839         * pt.c (fn_type_unification): Unify return type, whenever
6840         provided.
6841         (get_bindings_real): Only pass return type when necessary.
6842         Remove explicit return type check.
6843         * class.c (resolve_address_of_overloaded_function): Pass desired
6844         return type to fn_type_unification.
6846 Mon Feb 28 08:15:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6848         * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
6849         DECL_FIELD_SIZE.
6850         (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
6851         DECL_FIELD_SIZE.
6852         * rtti.c (expand_class_desc): Likewise.
6853         * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
6854         (THUNK_VCALL_OFFSET): Likewise.
6855         (THUNK_DELTA): Reflect changes in ../tree.h.
6857 2000-02-28  Jason Merrill  <jason@casey.cygnus.com>
6859         * search.c (protected_accessible_p): Also allow the access if
6860         the member is public in DERIVED.  Lose TYPE parm.
6861         (friend_accessible_p): Lose TYPE parm.
6862         (accessible_p): Adjust.
6864 Sun Feb 27 16:40:33 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6866         * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
6867         on things that are not sizes; ssize_binop deleted.
6868         Call size_diffop when appropriate.
6869         (dfs_build_vcall_offset_vtbl_entries): Likewise.
6870         (build_primary_vtable, build_secondary_vtable): Likewise.
6871         (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
6872         Variable I is HOST_WIDE_INT.
6873         (get_vfield_offset): Pass proper types to size_binop.
6874         (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
6875         (finish_struct_1): Likewise.
6876         (skip_rtti_stuff): Arg N is now pointer to signed.
6877         (layout_class_type): Use size_zero_node.
6878         * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
6879         * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
6880         * decl.c (complete_arry_type): Pass proper types to size_binop.
6881         (xref_basetypes): BINFO_OFFSET is sizetype.
6882         * error.c (dump_expr): Don't use size_binop non-sizes.
6883         * expr.c (cplus_expand_constant): Pass proper types to size_binop.
6884         * init.c (construct_virtual_bases): Fix type error.
6885         (build_vec_delete_1): Pass proper type to size_binop and don't
6886         fold result.
6887         * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
6888         * rtti.c (get_base_offset): Pass proper type to size_binop.
6889         * search.c (dfs_find_vbases): Fix type error.
6890         (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
6891         (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
6892         * tree.c (debug_binfo): Variable N is signed.
6893         Use HOST_WIDE_INT_PRINT_DEC.
6894         * typeck.c (comptypes): sizetype is same as equivalent integer type.
6895         (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
6896         size_one_node and size_zero_node.
6897         (c_alignof): Use size_one_node.
6898         (build_component_addr): Pass proper types to size_binop.
6899         (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
6901 2000-02-26  Jason Merrill  <jason@casey.cygnus.com>
6903         Implement class scope using-declarations for functions.
6904         * class.c (handle_using_decl): Call add_method for used functions.
6905         Use IDENTIFIER_CLASS_VALUE to check for conflicts.
6906         (add_method): Used functions are hidden by local functions.
6907         (check_bases_and_members): Handle using-decls before finalizing
6908         CLASSTYPE_METHOD_VEC.
6909         * call.c (add_function_candidate): Add ctype parm; if non-zero,
6910         override the type of 'this' accordingly.
6911         (add_template_candidate, add_template_candidate_real): Add ctype parm.
6912         (convert_class_to_reference, build_user_type_conversion_1,
6913         build_new_function_call, build_object_call, build_new_op,
6914         build_new_method_call): Pass ctype parm.
6916         * search.c (lookup_member): Put rval_binfo, not basetype_path, in
6917         the baselink.
6918         * call.c (convert_class_to_reference, build_user_type_conversion_1,
6919         build_new_function_call, build_object_call, build_new_op,
6920         build_new_method_call, build_op_delete_call): Don't get basetype_path
6921         from a baselink.
6922         * typeck.c (build_component_ref): Likewise.
6923         * init.c (build_offset_ref): Likewise.
6924         (resolve_offset_ref): Don't call enforce_access.
6925         Call build_scoped_ref.
6926         * typeck2.c (build_scoped_ref): Simplify.  Do nothing if it
6927         would cause an error or if -pedantic.
6928         * class.c (alter_access): Lose binfo parm.
6930 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
6932         * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
6933         types.
6935 2000-02-25  Alfred Minarik <a8601248@unet.univie.ac.at>
6937         * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
6938         pseudo_type_info creation into the std namespace
6940 2000-02-26  Mark Mitchell  <mark@codesourcery.com>
6942         * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
6943         (import_export_class): Remove declaration.
6944         * decl2.c (import_export_class): Make it static.
6945         * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
6946         PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
6947         EXPR_WITH_FILE_LOCATION.
6948         * lex.c (check_newline): Tweak filename/lineno setting.
6949         * semantics.c (begin_while_stmt): Fix typo in comment.
6951 Sat Feb 26 19:50:23 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
6953         * lang-options.h (-fmessage-length=): Add missing option.
6955         * Make-lang.in (CXX_SRCS): Add .h files and sort list.
6957 2000-02-26  Zack Weinberg  <zack@wolery.cumb.org>
6959         * Make-lang.in: Delete refs to LIBGCC2_DEPS.
6961 Fri Feb 25 14:52:33 2000  Jim Wilson  <wilson@cygnus.com>
6963         * optimize.c (expand_call_inline): Emit the return label before
6964         evaluating the return value.
6966 2000-02-24  Mark Mitchell  <mark@codesourcery.com>
6968         * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
6969         than duplicating functionality here.
6970         * optimize.c: Include input.h.
6971         (expand_call_inline): Use push_srcloc and pop_srcloc.
6972         * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
6973         * parse.c: Regenerated.
6974         * Makefile.in (lex.o): Depend on input.h.
6975         (optimize.o): Likewise.
6977 2000-02-24  Nathan Sidwell  <nathan@codesourcery.com>
6979         * decl.c (grokdeclarator): Diagnose qualifiers on non-member
6980         function type, rather than ICE.
6982 2000-02-23  Jason Merrill  <jason@casey.cygnus.com>
6984         * decl.c (grokdeclarator): Call decl_type_access_control.
6985         * parse.y (parse_end_decl): Don't call decl_type_access_control if
6986         decl is null.
6988 2000-02-23  Nathan Sidwell  <nathan@codesourcery.com>
6990         * decl.c (decls_match): Remove obsolete static member nadgering.
6992 2000-02-21  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
6994         * decl.c (grokdeclarator): Change ANSI to ISO.
6995         * lex.c (consume_string, readescape, do_identifier): Likewise.
6996         (parse_float, real_yylex): Likewise.
6997         * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
6998         (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
6999         new_type_id, maybe_label_decls, simple_stmt,
7000         for.init.statement): Likewise.
7001         * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
7002         * semantics.c (finish_named_return_value): Likewise.
7003         * parse.c: Regenerate.
7005 2000-02-21  Mark Mitchell  <mark@codesourcery.com>
7007         * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
7008         (CPTI_CLASS_STAR_TYPE): Remove.
7009         (vtable_index_type): Likewise.
7010         (class_star_type_node): Remove.
7011         (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
7012         (build_binary_op_nodefault): Remove.
7013         * call.c (build_new_op): Use build_binary_op instead of
7014         build_binary_op_nodefault.
7015         * decl.c (init_decl_processing): Remove class_star_type_node
7016         initialization.  Make delta_type_node ptrdiff_type_node under the
7017         new ABI.  Initialize vtable_index_type.
7018         (build_ptrmemfunc_type): Build different structures for the new
7019         ABI.
7020         (build_enumerator): Use build_binary_op instead of
7021         build_binary_op_nodefault.
7022         * method.c (build_overload_value): Mangle pointers-to-members
7023         appropriately under the new ABI.
7024         * typeck.c (build_array_ref): Use build_binary_op instead of
7025         build_binary_op_nodefault.
7026         (get_member_function_from_ptrfunc): Adjust for the new ABI.
7027         (build_binary_op_nodefault): Rename to ...
7028         (build_binary_op): ... this.  Remove old version.  Adjust for
7029         pointer-to-member comparisons under the new ABI.
7030         (build_ptrmemfunc1): Remove dead code.  Adjust for the new ABI.
7031         (build_ptrmemfunc): Adjust for the new ABI.
7032         (expand_ptrmemfunc_cst): Likewise.
7033         (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
7034         (pfn_from_ptrmemfunc): Adjust for the new ABI.
7036 2000-02-21  Gabriel Dos Reis  <gdr@codesourcery.com>
7038         * call.c (build_object_call): Compress consecutive calls to
7039         cp_error.
7040         (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
7041         (build_op_delete_call): Adjust message formatting.
7043         * class.c (check_bases): Compress consecutive calls to
7044         cp_pedwarn.
7045         (finish_struct_anon): Say 'ISO C++'.
7047         * decl.c (start_decl): Same here.
7048         (grok_reference_init): Likewise.
7049         (grokfndecl): Correct message formatting.
7050         (grokfndecl): Improve diagnostic.
7051         (check_static_variable_definition): Likewise. Say 'ISO C++'
7052         (compute_array_index_type): Say 'ISO C++'
7053         (create_array_type_for_decl): Compress consecutive calls to
7054         cp_error.
7055         (grokdeclarator): Say 'ISO C++'
7056         (grok_op_properties): Likewise.
7058         * decl2.c (delete_sanity): Clairify diagnostic.
7059         (check_member_template): Same here.
7060         (grok_function_init): Use consistent terminology.
7062         * expr.c (do_case): Say 'ISO C++'
7064         * friend.c (do_friend): Compress consecutive calls to warning.
7066 2000-02-20  Mark Mitchell  <mark@codesourcery.com>
7068         * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
7069         * class.c (build_secondary_vtable): Reorganize.  Don't create a
7070         new vtable under the new ABI.
7071         (layout_vtable_decl): Don't add num_extra_vtbl_entries when
7072         computing the size.
7073         (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
7074         the initializing elements.
7075         (initialize_vtable): New function.
7076         (dfs_finish_vtbls): Use it.
7077         (dfs_accumulate_vtbl_inits): New function.
7078         (finish_vtbls): Merge primary and secondary vtables under the new
7079         ABI.
7080         (finish_struct_1): Remove redundant call to layout_vtable_decl.
7081         * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
7082         aren't VAR_DECLs.
7084         * class.c (build_vtable): New function, split out from ...
7085         (get_vtable_decl): ... here, and ...
7086         (build_secondary_vtable): ... here.
7088         * pt.c (tsubst_decl): Fix formatting.
7090 Sat Feb 19 18:43:13 2000  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
7092         * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
7093         (avoid_overlap, build_base_field): Likewise.
7094         (build_base_field, build_base_fields, is_empty_class):
7095         Test DECL_SIZE with integer_zero.
7096         (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
7097         * cp-tree.h (struct lang_type): New field size_unit.
7098         (CLASSTYPE_SIZE_UNIT): New macro.
7099         * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
7100         (cp_finish_decl): Delete -Wlarger-than processing.
7101         * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
7102         * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
7103         * tree.c (make_binfo): binfo vector is one entry longer.
7104         (walk_tree): Walk DECL_SIZE_UNIT.
7106 2000-02-19  Mark Mitchell  <mark@codesourcery.com>
7108         * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
7109         comment.
7110         (build_vtable_entry): Don't assume all vtable entries are
7111         functions.
7112         (build_vtbl_initializer): Adjust accordingly.
7113         (get_vtable_decl): Fix formatting.
7115 2000-02-18  Jason Merrill  <jason@casey.cygnus.com>
7117         * semantics.c (deferred_type_access_control): Walk the entire
7118         type_lookups list.
7119         (save_type_access_control): Rename from
7120         initial_deferred_type_access_control.  Just remember the value.
7121         (decl_type_access_control): New fn.
7122         (begin_function_definition): Use deferred_type_access_control, after
7123         we've started the function.  Set type_lookups to error_mark_node.
7124         * parse.y (frob_specs, fn.def1): Adjust.
7125         (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
7126         (parse_end_decl, parse_bitfield0, parse_method): New fns.
7127         (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
7128         (after_type_component_declarator0): Likewise.
7129         (after_type_component_declarator): Likewise.
7130         (notype_component_declarator): Likewise.
7131         * cp-tree.h: Adjust.
7133         * decl.c (redeclaration_error_message): Allow redeclaration of
7134         namespace-scope decls.
7136 2000-02-18  Martin von Loewis  <loewis@informatik.hu-berlin.de>
7138         * typeck2.c (my_friendly_abort): Use GCCBUGURL.
7140 2000-02-17  Mark Mitchell  <mark@codesourcery.com>
7142         * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
7143         * decl2.c (grokclassfn): Likewise.
7145         * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
7147         * decl2.c (lang_decode_option): Don't set default message length
7148         here.
7149         * lex.c (lang_init_options): Set it here.
7151 2000-02-16  Mark Mitchell  <mark@codesourcery.com>
7153         Make DECL_CONTEXT mean the class in which a member function was
7154         declared, even for a virtual function.
7155         * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
7156         (DECL_FRIEND_CONTEXT): New macro.
7157         (DECL_REAL_CONTEXT): Remove.
7158         (SET_DECL_FRIEND_CONTEXT): Likewise.
7159         (DECL_VIRTUAL_CONTEXT): Adjust.
7160         (DECL_CLASS_SCOPE_P): Use TYPE_P.
7161         (add_friends): Remove.
7162         (hack_decl_function_context): Likewise.
7163         * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
7164         CP_DECL_CONTEXT.
7165         (build_over_call): Fix indentation.  Use DECL_CONTEXT
7166         instead of DECL_CLASS_CONTEXT.
7167         * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
7168         (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
7169         (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7170         (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
7171         (build_base_field): Likewise.
7172         (finish_struct_1): Likewise.
7173         (build_self_reference): Likewise.
7174         * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
7175         DECL_REAL_CONTEXT.
7176         (pushtag): Use decl_function_context, not
7177         hack_decl_function_context.
7178         (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7179         (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
7180         (pushdecl): Remove bogus code.
7181         (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
7182         (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7183         (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7184         Use decl_function_context, nothack_decl_function_context.
7185         (grokvardecl): Don't set DECL_CLASS_CONTEXT.
7186         (grokdeclarator): Likewise.  Use decl_function_context, not
7187         hack_decl_function_context.
7188         (copy_args_p): Document.  Don't use DECL_CLASS_CONTEXT.
7189         (start_function): Use DECL_FRIEND_CONTEXT, not
7190         DECL_CLASS_CONTEXT.  Use decl_function_context, not
7191         hack_decl_function_context.
7192         (finish_function): Use decl_function_context, not
7193         hack_decl_function_context.
7194         (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
7195         DECL_CLASS_CONTEXT.
7196         (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
7197         (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
7198         (grokfield): Likewise.
7199         (finish_builtin_type): Likewise.
7200         (finish_vtable_vardec): Use decl_function_context, not
7201         hack_decl_function_context.
7202         (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7203         (start_static_initialization_or_destruction): Likewise.
7204         (finish_static_initialization_or_destruction): Likewise.
7205         (mark_used): Adjust logic for deciding when to synthesize methods.
7206         * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
7207         DECL_REAL_CONTEXT.
7208         * error.c (dump_function_decl): Use DECL_CONTEXT, not
7209         DECL_CLASS_CONTEXT.
7210         * friend.c (is_friend): Likewise.
7211         (add_friends): Remove.
7212         (do_friend): Use SET_DECL_FRIEND_CONTEXT.
7213         * lex.c (begin_definition_of_inclass_inline): Use
7214         decl_function_context, not hack_decl_function_context.
7215         (process_next_inline): Likewise.
7216         (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
7217         * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
7218         DECL_CLASSS_CONTEXT.
7219         (hack_identifier): Likewise.
7220         (synthesize_method):  Use decl_function_context, not
7221         hack_decl_function_context.
7222         * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
7223         DECL_REAL_CONTEXT.
7224         (is_member_template): Use decl_function_context, not
7225         hack_decl_function_context.  Use DECL_CONTEXT, not
7226         DECL_CLASS_CONTEXT.
7227         (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
7228         DECL_CLASS_CONTEXT.
7229         (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
7230         DECL_REAL_CONTEXT.
7231         (push_template_decl_real): Likewise.
7232         (instantiate_class_template): Don't call add_friends.
7233         (tsubst_default_argument): Use DECL_CONTEXT, not
7234         DECL_REAL_CONTEXT.
7235         (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
7236         Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7237         (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
7238         DECL_CLASS_CONTEXT.
7239         * repo.c (repo_inline_used): Likewise.
7240         * search.c (current_scope): Adjust for new _CONTEXT macros.
7241         (context_for_name_lookup): Use CP_DECL_CONTEXT, not
7242         DECL_REAL_CONTEXT.
7243         (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
7244         (lookup_fnfields_here):Likewise.
7245         (check_final_overrider): Likewise.
7246         (init_vbase_pointers): Likewise.
7247         (virtual_context): Likewise.
7248         * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
7249         (expand_body): Use decl_function_context, not
7250         hack_decl_function_context.
7251         * tree.c (hack_decl_function_context): Remove.
7252         * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
7253         DECL_CLASS_CONTEXT.
7254         * typeck2.c (error_not_base_type): Likewise.
7256 2000-02-15  Jason Merrill  <jason@casey.cygnus.com>
7258         * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
7260 2000-02-16  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7262         * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
7264 2000-02-15  Jonathan Larmour  <jlarmour@redhat.co.uk>
7266         * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
7268 2000-01-16  Gabriel Dos Reis  <gdr@codesourcery.com>
7270         * decl2.c (lang_decode_option): Enable automatic line wrapping.
7272 2000-02-13  Jason Merrill  <jason@casey.cygnus.com>
7274         * parse.y (frob_specs): Split out...
7275         (parse_decl): From here.
7276         (fn.def2): Call initial_deferred_type_access_control.
7277         (after_type_component_declarator0): Call frob_specs.
7278         (notype_component_declarator0): Likewise.
7279         * search.c (friend_accessible_p): Nested classes are friends of their
7280         enclosing classes.
7282 2000-02-10  Mark Mitchell  <mark@codesourcery.com>
7284         * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
7285         used to create an implicit temporary.
7287         * class.c (dfs_modify_vtables): Tweak calculation of functions to
7288         override.
7290 2000-02-08  Nathan Sidwell  <nathan@acm.org>
7292         * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
7293         strip array element qualifiers too.
7295 2000-02-07  Mark Mitchell  <mark@codesourcery.com>
7297         * decl.c (store_parm_decls): Don't build cleanups for parameters
7298         while processing_template_decl.
7300 2000-02-07  Jason Merrill  <jason@casey.cygnus.com>
7302         * cp-tree.h (struct saved_scope): Add incomplete field.
7303         (namespace_scope_incomplete): New macro.
7304         * decl.c (pushdecl): Use it.
7305         (hack_incomplete_structures): Use it.  See through artificial
7306         binding levels.
7307         (mark_saved_scope): Mark it.
7309         Implement access control for nested types.
7310         * search.c (type_access_control): New fn.
7311         (accessible_p): Now we do perform access control for types.
7312         * semantics.c (deferred_type_access_control): New fn.
7313         (initial_deferred_type_access_control): New fn.
7314         (begin_function_definition): Call it.  Add lookups parm.
7315         * decl.c (struct binding_level): Add this_class field.
7316         (pushlevel_class): Set it.
7317         (mark_binding_level): Mark it.
7318         (lookup_name_real): Use it.  Call type_access_control.
7319         (mark_saved_scope): Mark lookups field.
7320         * cp-tree.h (flagged_type_tree): Add lookups field.
7321         (struct saved_scope): Add lookups field.
7322         (type_lookups): New macro.
7323         * parse.y (declmods): Now <ftype>.
7324         (parse_decl): Add lookups parm.  Call
7325         initial_deferred_type_access_control.
7326         (lang_extdef): Clear type_lookups.
7327         (typed_declspecs, declmods, typespec): Set lookups field.
7328         (initdcl): Call deferred_type_access_control.
7329         (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
7330         component_decl_1, named_parm): Adjust.
7331         * friend.c (is_friend): Nested classes are friends of their
7332         enclosing classes.
7334         * class.c (currently_open_derived_class): New fn.
7335         * method.c (hack_identifier): Use it.
7337         * lex.c (do_identifier): Remove obsolete code.
7339         * parse.y (typed_typespecs): Propagate new_type_flag properly.
7341 2000-02-05  Zack Weinberg  <zack@wolery.cumb.org>
7343         * tinfo.h: Remove apostrophes from C++ comment (xgettext
7344         thinks this file is plain C).
7346 2000-02-05  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7348         * Makefile.in (call.o): Depend on $(EXPR_H).
7350         * call.c: Include "expr.h".
7352         * class.c (dump_class_hierarchy): Add prototype.
7354         * search.c (dfs_get_pure_virtuals): Likewise.
7356 2000-02-1  Ulrich Drepper  <drepper@redhat.com>
7358         * parse.y (simple_stmt): Allow :: token in asm parameter list.
7359         * parse.c: Rebuilt.
7361 Mon Jan 31 15:35:29 2000  Jim Wilson  <wilson@cygnus.com>
7363         * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
7364         Store it in DECL_FCONTEXT.
7365         (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
7367 2000-01-31  Jason Merrill  <jason@casey.cygnus.com>
7369         * tinfo.h (old abi): #include "tconfig.h".
7370         * tinfo.cc (convert_to_base): Move into old abi section.
7372 2000-01-31  Mark Mitchell  <mark@codesourcery.com>
7374         * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
7375         (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
7376         (BINFO_PRIMARY_BINFO): New macro.
7377         (BF_DELTA): Rename to ...
7378         (BV_DELTA): ... this.
7379         (BF_VCALL_INDEX): Rename to ...
7380         (BV_VCALL_INDEX): ... this.
7381         (BF_FN): Rename to ...
7382         (BV_FN): ... this.
7383         * class.c (build_vbase_path): Adjust for changes to reverse_path.
7384         (set_rtti_entry): Rename BF_ macros to BV_ variants.
7385         (modify_vtable_entry): Simplify.
7386         (add_virtual_function): Rename BF_ macros to BV_ variants.
7387         (build_vtable_initializer): Likewise.
7388         (get_class_offset_1): Remove.
7389         (dfs_get_class_offset): Likewise.
7390         (get_class_offset): Likewise.
7391         (dfs_find_final_overrider): New function.
7392         (find_final_overrider): Likewise.
7393         (modify_one_vtable): Remove.
7394         (dfs_find_base): New function.
7395         (dfs_modify_vtables): Fold modify_one_vtable in here.  Use
7396         find_final_overrider.
7397         (modify_all_vtables): Adjust.  Set BV_VCALL_INDEX on new
7398         virtuals.
7399         (dfs_fixup_vtable_deltas): Remove.
7400         (override_one_vtable): Remove.
7401         (merge_overrides): Likewise.
7402         (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
7403         unreal chilren of virtual bases.
7404         (finish_struct_1): Don't use merge_overrides.  Don't use
7405         dfs_fixup_vtable_deltas.
7406         * tree.c (reverse_path): Return a TREE_LIST, not a chain of
7407         BINFOs.
7409 2000-01-31  Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
7410             Jason Merrill  <jason@yorick.cygnus.com>
7412         * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
7414 2000-01-31  Alfred Minarik <a8601248@unet.univie.ac.at>
7416         * exception.cc (__throw_bad_typeid): Add missing std::.
7418 2000-01-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7420         * cp-tree.h (make_thunk): PROTO -> PARAMS.
7422 2000-01-31  Nathan Sidwell  <sidwell@codesourcery.com>
7424         * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
7426         Runtime support for new-abi rtti.
7427         * inc/typeinfo (type_info::operator!=): Define in class.
7428         (type_info::before, type_info::name, type_info::operator==,
7429         type_info::operator!=): Define new ABI implementations.
7430         (type_info::is_pointer_p, type_info::is_function_p): Declare
7431         new virtual functions.
7432         (type_info::do_catch, type_info::do_upcast): Likewise.
7434         * tinfo.h (__base_class_info): Define new class.
7435         (__class_type_info): Likewise.
7436         (__si_class_type_info): Likewise.
7437         (__vmi_class_type_info): Likewise.
7438         (__dynamic_cast): Prototype.
7440         * tinfo.cc: Conditionalize old and new rtti mechanisms.
7441         (type_info::is_pointer_p): Define new function.
7442         (type_info::is_function_p): Likewise.
7443         (type_info::do_catch): Likewise.
7444         (type_info::do_upcast): Likewise.
7445         (vtable_prefix): New structure for vtable access.
7446         (adjust_pointer): Define new template function.
7447         (contained_p, public_p, virtual_p, contained_public_p,
7448         contained_nonpublic_p, contained_nonvirtual_p): Define new
7449         functions.
7450         (nonvirtual_base_type): New local variable.
7451         (__class_type_info::~__class_type_info): Define.
7452         (__si_class_type_info::~__si_class_type_info): Likewise.
7453         (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
7454         (__class_type_info::do_catch): Define new function.
7455         (__class_type_info::do_upcast): Likewise.
7456         (__class_type_info::find_public_src): Likewise.
7457         (__class_type_info::do_find_public_src): Likewise.
7458         (__si_class_type_info::do_find_public_src): Likewise.
7459         (__vmi_class_type_info::do_find_public_src): Likewise.
7460         (__class_type_info::do_dyncast): Likewise.
7461         (__si_class_type_info::do_dyncast): Likewise.
7462         (__vmi_class_type_info::do_dyncast): Likewise.
7463         (__class_type_info::do_upcast): Likewise.
7464         (__si_class_type_info::do_upcast): Likewise.
7465         (__vmi_class_type_info::do_upcast): Likewise.
7466         (__dynamic_cast): Likewise.
7468         * tinfo2.cc (__fundamental_type_info): Define new class.
7469         (__pointer_type_info): Likewise.
7470         (__reference_type_info): Likewise.
7471         (__array_type_info): Likewise.
7472         (__function_type_info): Likewise.
7473         (__enum_type_info): Likewise.
7474         (__ptr_to_member_type_info): Likewise.
7475         (__fundamental_type_info::~__fundamental_type_info): Define.
7476         (__pointer_type_info::~__pointer_type_info): Likewise.
7477         (__reference_type_info::~__reference_type_info): Likewise.
7478         (__array_type_info::~__array_type_info): Likewise.
7479         (__function_type_info::~__function_type_info): Likewise.
7480         (__enum_type_info::~__enum_type_info): Likewise.
7481         (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
7482         (__pointer_type_info::do_catch): Define new function.
7483         (__ptr_to_member_type_info::do_catch): Define new function.
7485         (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
7486         (__is_pointer): Likewise.
7488         * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
7490 2000-01-30  Mark Mitchell  <mark@codesourcery.com>
7492         * cp/class.c (build_vtable): Rename to build_primary_vtable.
7493         (prepare_fresh_vtable): Rename to build_secondary_vtable.
7494         (make_new_vtable): New function.
7495         (modify_vtable_entry): Handle generation of new vtables correctly.
7496         (modify_one_vtable): Remove unused parameter.
7497         (dfs_fixup_vtable_deltas): Likewise.
7498         (override_one_vtable): Use build_secondary_vtable.
7499         (finish_struct_1): Use build_primary_vtable and
7500         build_secondary_vtable.
7502 2000-01-28  Ulrich Drepper  <drepper@redhat.com>
7504         * cp/decl.c: Adjust variable names, comments, help strings.
7506 2000-01-29  Nathan Sidwell  <nathan@acm.org>
7508         * new2.cc (operator delete[]): Use operator delete, don't assume
7509         implementation.
7511 2000-01-29  Nathan Sidwell  <sidwell@codesourcery.com>
7513         * class.c (build_vtbl_initializer): Add argument to
7514         build_vtable_entry call.
7516 2000-01-27  Mark Mitchell  <mark@codesourcery.com>
7518         * cp-tree.def (THUNK_DECL): Discuss vcall indices.
7519         * cp-tree.h (BINFO_VIRTUALS): Update documentation.
7520         (BF_DELTA): New macro.
7521         (BF_VCALL_INDEX): Likewise.
7522         (BF_FN): Likewise.
7523         (THUNK_VCALL_OFFSET): Likewise.
7524         (make_thunk): Change prototype.
7525         * class.c (build_vtable_entry): Integrate
7526         build_vtable_entry_for_fn.  Handle vcall indices.
7527         (build_vtable_entry_for_fn): Remove.
7528         (set_rtti_entry): Handle vcall indices.  Use BF_DELTA,
7529         BF_VCALL_INDEX, BF_FN.
7530         (modify_vtable_entry): Integrate common code from
7531         modify_one_vtable and dfs_fixup_vtable_deltas.
7532         (add_virtual_function): Set BF_VCALL_INDEX.
7533         (build_vtbl_initializer): Simplify.  Use BF_DELTA, BF_VCALL_INDEX,
7534         and BF_FN.
7535         (modify_one_vtable): Simplify.
7536         (dfs_fixup_vtable_deltas): Likewise.
7537         (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
7538         * method.c (make_thunk): Handle vcall indices.
7540 2000-01-28  Nathan Sidwell  <sidwell@codesourcery.com>
7542         Compiler side new abi rtti (not enabled).
7543         * cp-tree.h (new_abi_rtti_p): New macro.
7544         (emit_support_tinfos): Prototype new function.
7545         (tinfo_decl_p): Likewise.
7546         (emit_tinfo_decl): Likwise.
7547         * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
7548         macros.
7549         (doing_runtime): New local static.
7550         (init_rtti_processing): Add new-abi initializer.
7551         (get_tinfo_decl): Add new-abi logic.
7552         (tinfo_from_decl): Likewise.
7553         (build_dynamic_cast_1): Likewise.
7554         (qualifier_flags): New static function.
7555         (tinfo_base_init): Likewise.
7556         (generic_initializer): Likewise.
7557         (ptr_ref_initializer): Likewise.
7558         (ptmd_initializer): Likewise.
7559         (class_hint_flags): Likewise.
7560         (class_initializer): Likewise.
7561         (synthesize_tinfo_var): Likewise.
7562         (create_real_tinfo_var): Likewise.
7563         (create_pseudo_type_info): Likewise.
7564         (get_vmi_pseudo_type_info): Likewise.
7565         (create_tinfo_types): Likewise.
7566         (emit_support_tinfos): New global function.
7567         (tinfo_decl_p): New global predicate.
7568         (emit_tinfo_decl): New global function.
7569         * class.c (set_rtti_entry): Generalize for old and new rtti.
7570         (build_vtbl_initializer): Likewise.
7571         * decl2.c (finish_file): Likewise.
7573 Thu Jan 27 20:53:36 2000  Jim Wilson  <wilson@cygnus.com>
7575         * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
7576         and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
7578 Thu Jan 27 13:54:12 2000  Mike Stump  <mrs@wrs.com>
7580         * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
7581         for scopes.
7583 2000-01-26  Jason Merrill  <jason@casey.cygnus.com>
7585         * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
7587 Wed Jan 26 22:19:14 2000  J"orn Rennecke <amylaar@cygnus.co.uk>
7589         * optimize.c (calls_setjmp_r): Supply new argument
7590         to special_function_p.
7592 2000-01-26  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7594         * call.c: PROTO -> PARAMS.
7595         * class.c: Likewise.
7596         * cp-tree.h: Likewise.
7597         * cvt.c: Likewise.
7598         * decl.c: Likewise.
7599         * decl.h: Likewise.
7600         * decl2.c: Likewise.
7601         * dump.c: Likewise.
7602         * errfn.c: Likewise.
7603         * error.c: Likewise.
7604         * except.c: Likewise.
7605         * expr.c: Likewise.
7606         * init.c: Likewise.
7607         * input.c: Likewise.
7608         * lex.c: Likewise.
7609         * lex.h: Likewise.
7610         * method.c: Likewise.
7611         * optimize.c: Likewise.
7612         * parse.y: Likewise.
7613         * pt.c: Likewise.
7614         * repo.c: Likewise.
7615         * rtti.c: Likewise.
7616         * search.c: Likewise.
7617         * semantics.c: Likewise.
7618         * spew.c: Likewise.
7619         * tree.c: Likewise.
7620         * typeck.c: Likewise.
7621         * typeck2.c: Likewise.
7622         * xref.c: Likewise.
7624 2000-01-25  Richard Henderson  <rth@cygnus.com>
7626         * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
7628 2000-01-25  Mark Mitchell  <mark@codesourcery.com>
7630         * cp-tree.h (vcall_offset_in_vtable_p): New macro.
7631         * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
7632         (struct vcall_offset_data_s): New type.
7633         (dfs_vcall_offset_queue_p): New function.
7634         (dfs_build_vcall_offset_vtbl_entries): Likewise.
7635         (build_vcall_offset_vtbl_entries): Likewise.
7636         (layout_vtable_decl): Likewise.
7637         (num_vfun_entries): Likewise.
7638         (num_extra_vtbl_entries): Add the entries for vcall offsets.
7639         (build_vtbl_initializer): Likewise.
7640         (dfs_finish_vtabls): Use layout_vtable_decl.
7641         (modify_one_vtables): Always duplicate vtables under the new ABI.
7642         (finish_struct_1): Use layout_vtable_decl.
7644 2000-01-25  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
7646         * decl.c (member_function_or_else): Change third arg from a format
7647         specifier to an `enum overload_flags'.  Callers changed.
7649 2000-01-25  Gabriel Dos Reis  <gdr@codesourcery.com>
7651         * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
7652         build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
7653         build_const_cast, get_delta_difference, check_return_expr): Avoid
7654         ANSI string concatenation usage.
7656 2000-01-24  Mark Mitchell  <mark@codesourcery.com>
7658         * class.c (layout_class_type): Put the fields required to make a
7659         class non-empty at the end, not the beginning, of the TYPE_FIELDs
7660         list.
7662 2000-01-24  Jason Merrill  <jason@casey.cygnus.com>
7664         * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
7665         template.
7667         * decl2.c (mark_used): Do instantiate inlines that have been
7668         explicitly instantiated.
7670 2000-01-24  Richard Henderson  <rth@cygnus.com>
7672         * call.c (build_over_call): Use expand_tree_builtin.
7673         * typeck.c (build_function_call_real): Likewise.
7674         (build_binary_op_nodefault): Handle unordered compares.
7676 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
7678         * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
7679         cp_tree_index values.
7680         (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
7681         New global node #defines for them.
7682         * rtti.c (call_void_fn): Replace with ...
7683         (build_runtime_decl): ... new static function.
7684         (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
7685         (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
7686         (build_dynamic_cast_1): Always produce correctly typed result.
7687         Explicitly produce type_info addresses. Use dynamic_cast_node.
7688         * exception.cc (__throw_bad_cast): Return `void *'.
7689         (__throw_bad_typeid): Return `const type_info &'.
7691 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
7693         * cp-tree.h (get_vtable_decl): Prototype new function.
7694         * class.c (get_vtable_decl): New function. Broken out from ...
7695         (build_vtable): ... here. Use it.
7696         * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
7697         by get_vtable_decl.
7699 2000-01-24  Nathan Sidwell  <sidwell@codesourcery.com>
7701         * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
7702         CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
7703         CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
7704         (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
7705         CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
7706         CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
7707         (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
7708         (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
7709         (CPTI_TINFO_VAR_ID): New enumeration.
7710         (__tp_desc_type_node, __access_mode_type_node,
7711         __bltn_desc_type_node, __user_desc_type_node,
7712         __class_desc_type_node, __ptr_desc_type_node,
7713         __attr_desc_type_node, __func_desc_type_node,
7714         __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
7715         (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
7716         ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
7717         enum_desc_type_node, class_desc_type_node,
7718         si_class_desc_type_node, vmi_class_desc_type_node,
7719         ptmd_desc_type_node, base_desc_type_node): New #defines.
7720         (tinfo_fn_id, tinfo_fn_type): Rename to ...
7721         (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
7722         (tinfo_var_id): New enumeration.
7723         (DECL_TINFO_FN_P): Augment comment.
7724         * decl.c (cp_global_trees): Adjust documentation.
7725         * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
7726         tinfo_decl_type and tinfo_var_id.
7727         (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
7728         (build_typeid): Remove unused variable.
7729         (get_tinfo_var): Use tinfo_var_id.
7730         (tinfo_name): New static function.
7731         (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
7732         (tinfo_from_decl): Likewise.
7733         (get_base_offset): New static function, broken out of
7734         expand_class_desc.
7735         (expand_si_desc): Use tinfo_name.
7736         (expand_class_desc): Likewise. Lose local static variable.
7737         Use base_desc_type_node. Use get_base_offset.
7738         (expand_ptr_desc): Use tinfo_name.
7739         (expand_attr_desc): Likewise.
7740         (expand_generic_desc): Likewise.
7742         * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
7743         * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
7745 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
7747         * cp-tree.h (__eprintf): Remove declaration.
7748         * tree.c (__eprintf): Remove definition.
7750 2000-01-23  Zack Weinberg  <zack@rabi.columbia.edu>
7751             Mark Mitchell  <mark@codesourcery.com>
7753         * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
7754         CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
7756 2000-01-23  Brad Lucier  <lucier@math.purdue.edu>
7758         * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
7760 2000-01-23  Mark Mitchell  <mark@codesourcery.com>
7762         * cp-tree.h (register_dtor_fn): New function.
7763         * decl.c (destroy_local_static): Rename to ...
7764         (register_dtor_fn): ... this.  Give it external linkage.
7765         (expand_static_init): Use it.
7766         * decl2.c (do_static_initialization): Likewise, if using
7767         __cxa_atexit.
7768         (do_static_destruction): Check that __cxa_atexit is not in use.
7769         (finish_file): Don't call do_static_destruction if using
7770         __cxa_atexit.
7772         * typeck.c (convert_arguments): Restore two-message error
7773         reporting.
7775 2000-01-20  Nathan Sidwell  <sidwell@codesourcery.com>
7777         Remap dynamic cast hint values to be consistent across ABIs.
7778         * search.c (dynamic_cast_base_recurse): Remap generated value.
7779         (get_dynamic_cast_base_type): Adjust documentation.
7780         * tinfo.h (__user_type_info::dyncast): Likewise.
7781         (__user_type_info::find_public_subobj): Remap BOFF meaning.
7782         * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
7783         (__class_type_info::do_dyncast): Likewise.
7784         (__class_type_info::do_find_public_subobj): Likewise.
7785         * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
7787 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
7789         * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
7791         * typeck2.c (incomplete_type_error): Restore previous
7792         cp_error and cp_error_at call sequence.
7794 2000-01-20  Brad Lucier  <lucier@math.purdue.edu>
7796         * class.c (dump_class_hierarchy): Make format agree with argument;
7797         cast pointer to unsigned long and print with %lx.
7799 2000-01-19  Gabriel Dos Reis  <gdr@codesourcery.com>
7801         * decl2.c (lang_decode_option): Set default line-wrap length to 72.
7803         * typeck.c (composite_pointer_type, common_type,
7804         comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
7805         build_function_call_real, convert_arguments,
7806         build_binary_op_nodefault, pointer_int_sum, pointer_diff,
7807         build_unary_op, mark_addressable, build_compound_expr,
7808         build_static_cast, build_reinterpret_cast, build_const_cast,
7809         build_c_cast, build_modify_expr, get_delta_difference,
7810         build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
7811         'ISO C++'.  Fusion consecutive calls to diagnotic message routines
7812         into a single one.
7813         * typeck2.c (readonly_error, abstract_virtuals_error,
7814         process_init_constructor, check_for_new_type): Likewise.
7816 2000-01-19  Mark Mitchell  <mark@codesourcery.com>
7818         * tree.c (bot_manip): Set DECL_CONTEXT for newly created
7819         VAR_DECLs.
7821 2000-01-18  Nathan Sidwell  <sidwell@codesourcery.com>
7823         * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
7824         (build_x_typeid): Likewise.
7825         (get_tinfo_fn): Likewise.
7826         (get_tinfo_fn_unused): Rename to ...
7827         (get_tinfo_decl): ... here.
7828         * rtti.c (build_headof): Replace logic error with assertion.
7829         (get_tinfo_fn_dynamic): Rename to ...
7830         (get_tinfo_decl_dynamic): ... here. Make static. Use
7831         complete_type_or_else.
7832         (build_x_typeid): Move into ...
7833         (build_typeid): ... here. Adjust call to
7834         get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
7835         throw_bad_typeid expression.
7836         (get_tinfo_fn_unused): Rename to ...
7837         (get_tinfo_decl): ... here. Adjust comment.
7838         (get_tinfo_fn): Delete.
7839         (tinfo_from_decl): New static function.
7840         (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
7841         (get_typeid): Use complete_type_or_else.
7842         (build_dynamic_cast_1): Adjust calls to
7843         get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
7844         * parse.y (primary): Adjust call to build_typeid.
7845         * except.c (build_eh_type_type_ref): Adjust call to
7846         get_tinfo_decl. Mark as used.
7847         * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
7848         * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
7849         * parse.c: Regenerated.
7851 2000-01-17  Mark Mitchell  <mark@codesourcery.com>
7853         * class.c (fixed_type_or_null): Don't clear NONNULL.  Document
7854         calling convention.
7855         (resolves_to_fixed_type_p): Document calling convention.
7856         * rtti.c (build_x_typeid): Initialize NONNULL.
7858         * cp-tree.h (build_shared_int_cst): New function.
7859         * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
7860         * class.c (modify_vtable_entry): Likewise.
7861         (add_virtual_function): Split out code to generated shared
7862         INTEGER_CSTs to build_share_int_cst.
7863         (modify_all_vtables): Handle all the overridden functions here.
7864         Add overridden functions from non-primary virtual bases to the
7865         primary vtable.
7866         (finish_struct_1): Adjust call to modify_all_vtables.  Add
7867         overridden functions from non-primary bases to the vtable.
7868         * tree.c (build_shared_int_cst): New function.
7870         * cp-tree.h (scratchalloc): Remove.
7871         (build_scratch_list): Likewise.
7872         * call.c (convert_class_to_reference): Replace build_scratch_list
7873         and build_expr_list with build_tree_list.
7874         (add_candidate): Replace scratchalloc with expralloc.  Note memory
7875         leak.
7876         (build_user_type_conversion_1):  Replace build_scratch_list
7877         and build_expr_list with build_tree_list.
7878         (build_new_op): Likewise.
7879         (build_op_delete_call): Likewise.
7880         (convert_like): Likewise.
7881         * cvt.c (ocp_convert): Likewise.
7882         * decl.c (start_decl): Likewise.
7883         (start_function): Likewise.
7884         (finish_destructor_body): Likewise.
7885         (maybe_build_cleanup_1): Likewise.
7886         * decl2.c (reparse_decl_as_expr): Likewise.
7887         * init.c (perform_member_init): Likewise.
7888         (expand_cleanup_for_base): Likewise.
7889         (build_builtin_delete_call): Likewise.
7890         (build_new_1): Likewise.
7891         (build_delete): Likewise.
7892         * method.c (do_build_assign_ref): Likewise.
7893         * parse.y (already_scoped_stmt): Likewise.
7894         (nontrivial_exprlist): Likewise.
7895         (net_initializer): Likewise.
7896         (initlist): Likewise.
7897         * parse.c: Regenerated.
7898         * rtti.c (build_x_typeid): Likewise.
7899         (build_dynamic_cast_1): Likewise.
7900         * typeck.c (build_x_compound_expr): Likewise.
7901         (build_static_cast): Likewise.
7902         (build_modify_expr): Likewise.
7904         * cp-tree.h (DECL_VINDEX): Add documentation.
7905         * class.c (build_vtable_entry): Likewise.
7906         (start_vtable): Add comment.
7907         (add_virtual_function): Replace pending_hard_virtuals with
7908         overridden_virtuals and pending_virtuals with new_virtuals.
7909         Replace redundant assignments with assertions.
7910         (check_for_override): Add comment.
7911         (check_bases_and_members): Replace pending_hard_virtuals with
7912         overridden_virtuals and pending_virtuals with new_virtuals.
7913         (create_vtbl_ptr): Likewise.
7914         (layout_class_type): Likewise.
7915         (finish_struct_1): Likewise.  Add comments.
7917 2000-01-16  Mark Mitchell  <mark@codesourcery.com>
7919         * class.c (finish_struct_1): Replace redundant code with
7920         assertions.
7922         * cp-tree.h (flag_new_abi): Move.
7923         (flag_use_cxa_atexit): Likewise.
7924         (flag_honor_std): Likewise.
7925         (flag_rtti): Likewise.
7926         (vbase_offsets_in_vtable_p): Define.
7927         (vptrs_present_everywhere_p): Likewise.
7928         (TYPE_CONTAINS_VPTR_P): Likewise.
7929         (dfs_walk_real): Declare.
7930         * class.c (build_vbase_pointer_fields): Check
7931         vbase_offsets_in_vtable_p.
7932         (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
7933         BINFO_VPTR_FIELD.
7934         (build_vbase_offset_vtbl_entries): Simplify.
7935         (build_vbase_offset_vtbl_entries): Adjust.
7936         (build_vbase_pointer): Add ability to look up vbase offsets in
7937         vtable.
7938         (start_vtable): New function.
7939         (add_virtual_function): Use it.
7940         (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
7941         (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
7942         (build_vtbl_initializer): Take the type of the complete object as
7943         input.  Use it to correctly calculate vbase offsets.
7944         (dfs_finish_vtbls): Pass the complete type to
7945         build_vtbl_initializer.
7946         (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
7947         (create_vtable_ptr): Create a vtable even if there are no
7948         new virtual functions, under the new ABI.
7949         (finish_struct_1): Likewise.
7950         (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
7951         * decl.c (exapnd_static_init): Remove call to
7952         preserve_initializer.
7953         * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
7954         vtables.
7955         * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
7956         (expand_virtual_init): Use vbase_offsets_in_vtable_p.
7957         (construct_virtual_bases): Don't initialize virtual base pointers
7958         under the new ABI.
7959         (build_aggr_init): Clean up comment.
7960         (expand_aggr_init_1): Likewise.
7961         * rtti.c (expand_class_desc): Store the virtual function table
7962         index where the vbase offset lives in the offset field.
7963         * search.c (dfs_walk_real): Make it global.
7964         (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
7965         * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
7967         * tinfo.h (USItype): Make it signed under the new ABI.
7968         * tinfo.cc (convert_to_base): New function.  Encapsulate base
7969         conversion logic here.
7970         (__class_type_info::do_upcast): Use it.
7971         (__class_type_info::do_dyncast): Likewise.
7972         (__class_type_info::do_find_public_subobj): Likewise.
7974         * init.c (construct_virtual_bases): Don't look up the addresses of
7975         virtual bases at run-time.
7977         * class.c (build_vbase_pointer): Relocate.
7978         (build_vbase_pointer_fields): Likewise.
7979         (dfs_build_vbase_offset_vtbl_entries): Likewise.
7980         (build_vbase_offset_vtbl_entries): Likewise.
7982         * decl.c (init_decl_processing): Complain if -fnew-abi
7983         -fno-vtable-thunks is used.
7985         * decl2.c (lang_decode_option): Don't couple flag_honor_std to
7986         flag_new_abi.
7988 2000-01-15  Mark Mitchell  <mark@codesourcery.com>
7990         * cp-tree.h (num_extra_vtbl_entries): New function.
7991         (size_extra_vtbl_entries): Likewise.
7992         (dfs_vtable_path_unmark): Likewise.
7993         (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
7994         (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
7995         * class.c (num_extra_vtbl_entries): New function.
7996         (size_extra_vtbl_entries): Likewise.
7997         (dfs_build_vbase_offset_vtbl_entries): New function.
7998         (build_vbase_offset_vtbl_entries): Likewise.
7999         (build_vtbl_initializer): Use it.
8000         (finish_struct_1): Adjust vtable sizes (using
8001         num_extra_vtbl_entries).
8002         * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
8003         THUNK_DECL is non-NULL before expanding it.
8004         * init.c (expand_virtual_init): Adjust the vtable pointer by
8005         size_extra_vtbl_entries before storing it.
8006         * search.c (get_shared_vase_if_not_primary): Adjust prototype.
8007         Handle TREE_LIST parameters here, not in the dfs_* functions.
8008         (dfs_unmarked_real_bases_queue_p): Adjust.
8009         (dfs_marked_real_bases_queue_p): Likewise.
8010         (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
8011         (dfs_vtable_path_marked_real_bases_queue_p): New function.
8012         (dfs_vtable_path_unmark): Likewise.
8014 2000-01-14  Mark Mitchell  <mark@codesourcery.com>
8016         * optimize.c (copy_body_r): Clear the operand three of a
8017         TARGET_EXPR when copying it.
8019 2000-01-14  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8021         * method.c (build_decl_overload_real): Check whether we are in ::
8022         before returning __builtin_new/delete.
8024 2000-01-13  Mark Mitchell  <mark@codesourcery.com>
8026         * pt.c (tsubst_friend_function): Improve comment.
8027         (instantiate_decl): Avoid crashing when a "nested" function is
8028         instantiated from the top level.
8030         * dump.c (dqeueue_and_dump): Dump
8031         DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
8033 2000-01-13  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8035         * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
8037 2000-01-13  Nathan Sidwell  <sidwell@codesourcery.com>
8039         * g++spec.c (lang_specific_driver): Add -fnew-abi if
8040         ENABLE_NEW_GXX_ABI defined.
8041         * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
8042         opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
8043         opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
8045 2000-01-12  Mark Mitchell  <mark@codesourcery.com>
8047         * decl.c (start_cleanup_fn): Call pushdecl.
8049         * call.c (convert_class_to_reference): Fix typos.
8050         (build_conditional_expr): Handle errors gracefully.
8051         * class.c (push_nested_class): Likewise.
8052         * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
8053         (DECL_THIS_EXTERN): Use it.
8054         (DECL_THIS_STATIC): Likewise.
8055         * cvt.c (convert_to_void): Handle errors gracefully.
8056         (build_expr_type_conversion): Likewise.
8057         * decl.c (maybe_push_decl): Likewise.
8058         (start_decl_1): Likewise.
8059         (require_complete_types_for_parms): Likewise.
8060         * parse.y (structsp): Likewise.
8061         (base_class): Likewise.
8062         * parse.c: Regenerated.
8063         * pt.c (finish_member_template_decl): Likewise.
8064         * typeck.c (decay_conversion): Likewise.
8066         * cp-tree.h (dfs_skip_vbases): New function.
8067         (find_vbase_instance): Likewise.
8068         * class.c (determine_primary_base): Allow a nearly empty base to
8069         serve as a primary base class under the new ABI.
8070         (get_class_offset_1): Rename to ...
8071         (dfs_get_class_offset): ... this.  Simplify.  Don't issue error
8072         messages here.
8073         (get_class_offset): Use it.  Issue error messages here.
8074         (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
8075         find the right copies of virtual bases.
8076         (fixup_vtable_deltas1): Rename to ...
8077         (dfs_fixup_vtable_deltas): ... this.  Adjust to handle virtual
8078         bases as primary bases.
8079         (fixup_vtable_deltas): Remove.
8080         (override_one_vtable): Handle virtual bases as primary bases.
8081         (merge_overrides): Likewise.
8082         (finish_struct_1): Likewise.
8083         (dump_class_hierarchy): Dump primary-ness of bases as well.
8084         * search.c (mark_primary_bases): Use a pre-order traversal to
8085         handle primary virtual bases.
8086         (dfs_skip_vbases): New fiunction.
8087         (expand_upcast_fixups): Adjust to handle primary virtual bases.
8088         (fixup_virtual_upcast_offsets): Likewise.
8089         (fixup_all_virtual_upcast_offsets): Likewise.
8090         (dfs_find_vbase_instances): New function.
8091         (find_vbase_instance): Likewise.
8093 2000-01-11  Mumit Khan  <khan@xraylith.wisc.edu>
8095         * lex.c (DIR_SEPARATOR): Delete macro.
8097 2000-01-12  Gabriel Dos Reis  <gdr@codesourcery.com>
8099        * decl2.c (lang_decode_option): Handle automatic line wrapping
8100        option.
8102 2000-01-11  Mark Mitchell  <mark@codesourcery.com>
8104         * friend.c (do_friend): Don't resolve scopes when processing
8105         template declarations, even if the qualifying scope doesn't
8106         involve template parameters.
8108 2000-01-10  Mark Mitchell  <mitchell@dumbledore.codesourcery.com>
8110         * class.c (dfs_modify_vtables_queue_p): Remove.
8111         (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
8112         and dfs_marked_real_bases_queue_p instead of
8113         dfs_modify_vtables_queue_p.
8115         * class.c (build_vbase_path): Simplify.
8116         (dfs_propagate_binfo_offsets): New function.
8117         (propagate_binfo_offsets): Use it.
8118         (remove_base_field): Simplify.
8119         (dfs_set_offset_for_vbases): Remove.
8120         (dfs_set_offset_for_shared_vbases): New function.
8121         (dfs_set_offset_for_unshared_vbases): Likewise.
8122         (layout_virtual_bases): Use them.
8123         (layout_basetypes): Don't call propagate_binfo_offsets.
8124         * search.c (dfs_get_vbase_types): Clone completely fresh binfos
8125         for the vbases.
8127         * class.c (build_base_field): New function, split out from ...
8128         (build_base_fields): ... here.  Use it.  Allocate primary bases
8129         first, under the new ABI.
8130         (get_vtable_entry): Remove.
8131         (remove_base_field): New function, split out from ...
8132         (remove_base_fields): ... here.  Adjust since primary bases come
8133         first under the new ABI.
8135         * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
8136         (initialize_vtbl_ptrs): New function.
8137         (expand_indirect_vtbls_init): Change prototype.
8138         (convert_pointer_to_vbase): Declare.
8139         * init.c (expand_direct_vtbls_init): Remove.
8140         (dfs_initialize_vtbl_ptrs): New function.
8141         (initialize_vtbl_ptrs): Likewise.
8142         (emit_base_init): Use initialize_vtbl_ptrs.
8143         * search.c (convert_pointer_to_vbase): Make it global.
8144         (expand_indirect_vtbls_init): Remove vtable initialization code.
8145         * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
8147         * class.c (dfs_finish_vtbls): New function.
8148         (finish_vtbls): Use it.
8149         (dump_class_hierarchy): New function.
8151         * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
8152         (BINFO_VBASE_PRIMARY_P): New macro.
8153         (BINFO_VIRTUALS): Add to documentation.
8154         (SET_BINFO_PRIMARY_MARKED_P): Remove.
8155         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8156         (dfs_mark_primary_bases_queue_p): Likewise.
8157         (dfs_unmarked_real_bases_queue_p): New function.
8158         (dfs_marked_real_bases_queue_p): Likewise.
8159         * search.c (dfs_mark_primary_bases): Adjust.
8160         (mark_primary_bases): Likewise.
8161         (get_shared_vbase_if_not_primary): New function.
8162         (dfs_unmarked_real_bases_queue_p): Likewise.
8163         (dfs_marked_real_bases_queue_p): Likewise.
8164         (dfs_get_pure_virtuals): Simplify.
8165         (get_pure_virtuals): Likewise.
8167 2000-01-10  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8169         * lex.c: Include tm_p.h.
8171 2000-01-07  Nathan Sidwell  <sidwell@codesourcery.com>
8173         * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
8175 2000-01-06  Jason Merrill  <jason@casey.cygnus.com>
8177         * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
8178         * pt.c (instantiate_decl): Defer comdat templates that might not be
8179         needed.
8181         * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
8182         * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
8183         (finish_file): Likewise.
8185         * decl2.c (import_export_class): Undo 12/14 change.
8187         * error.c (dump_decl): operator new, not operatornew.
8189         * class.c (field_decl_cmp): A nontype is "greater" than a type.
8190         * search.c (lookup_field_1): Look for the last field with the
8191         desired name.
8193 2000-01-05  Nathan Sidwell  <nathan@acm.org>
8195         * decl2.c (lookup_arg_dependent): Deal with FNS not being a
8196         FUNCTION_DECL.
8198 2000-01-05  Nathan Sidwell  <nathan@acm.org>
8200         * typeck.c (build_static_cast): Don't strip target qualifiers
8201         when casting from a class.
8203 2000-01-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
8205         * class.c (warn_hidden): Initialize variable `fndecl'.
8207 2000-01-03  Ulrich Drepper  <drepper@cygnus.com>
8209         * decl.c (flag_isoc9x): New variable to be able to use code in
8210         c-common.c.  For now always zero.
8212 2000-01-03  Mark Mitchell  <mark@codesourcery.com>
8214         * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
8215         * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
8216         or unshare_base_binfos for virtual bases here.
8217         * search.c (dfs_get_vbase_types): Do it here.
8218         (get_vbase_types): Adjust.
8220 2000-01-02  Mark Mitchell  <mark@codesourcery.com>
8222         * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
8223         (BINFO_PRIMARY_MARKED_P): Use flag 5.
8224         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
8225         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8226         (unmark_primary_bases): Remove declaration.
8227         (unmarkedp): Declare.
8228         (dfs_vbase_unmark): Likewise.
8229         * class.c (determine_primary_base): Return immediately if there
8230         are no base classes.  Call mark_primary_bases here.
8231         (modify_all_direct_vtables): Remove.
8232         (modify_all_indirect_vtables): Remove.
8233         (dfs_modify_vtables_queue_p): New function.
8234         (dfs_modify_vtables): New function.
8235         (modify_all_vtables): Use them.
8236         (build_base_fields): Build FIELD_DECLs for primary virtual base
8237         classes.
8238         (create_vtable_ptr): Don't call determine_primary_base here.
8239         (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
8240         (dfs_set_offset_for_vbases): ... this.
8241         (layout_virtual_bases): Use it.
8242         (layout_class_type): Call determine_primary_base here.
8243         * search.c (unmarkedp): Make it global.
8244         (shared_marked_p): Simplify.
8245         (shared_unmarked_p): Likewise.
8246         (dfs_primary_bases_queue_p): Remove.
8247         (dfs_unmark_primary_bases): Likewise.
8248         (unmark_primary_bases): Likewise.
8249         (mark_primary_bases): Simplify.
8250         (get_pure_virtuals): Don't call mark_primary_bases here.
8251         (dfs_vbase_unmark): New function.
8252         (get_vbase_types): Simplify.
8254         * class.c (struct base_info): Remove.
8255         (determine_primary_base): Take has_virtual_p rather than a
8256         base_info as input.  Don't calculate max_has_virtual.
8257         (finish_struct_bits): Remove max_has_virtual argument.
8258         (create_vtable_ptr): Remove max_has_virtual_p argument.
8259         (layout_virtual_bases): Remove max argument.
8260         (layout_basetypes): Likewise.
8261         (layout_class_type): Remove max_has_virtual_p argument.
8262         (finish_struct_1): Remove max_has_virtual.
8264         * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
8265         (layout_basetypes): Remove.
8266         * class.c (propagate_binfo_offsets): Moved here from tree.c.
8267         Update to handle primary virtual bases.
8268         (remove_base_fields): New function, split out from
8269         layout_basetypes.
8270         (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
8271         (layout_virtual_bases): New function, split out from
8272         layout_basetypes.  Update to handle primary virtual bases.
8273         (layout_basetypes): Moved here from tree.c.  Use
8274         remove_base_fields and layout_virtual_bases.
8275         * search.c (dfs_mark_primary_bases_queue_p): New function.
8276         (mark_primary_bases): Use it.
8277         * tree.c (CEIL): Remove.
8278         (propagate_binfo_offsets): Remove.
8279         (layout_basetypes): Remove.
8281 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
8283         * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
8284         (BINFO_PRIMARY_MARKED_P): New macro.
8285         (SET_BINFO_PRIMARY_MARKED_P): Likewise.
8286         (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
8287         (mark_primary_bases): New function.
8288         (unmark_primary_bases): Likewise.
8289         * search.c (get_abstract_virtuals_1): Remove.
8290         (dfs_mark_primary_bases): New function.
8291         (mark_primary_bases): Likewise.
8292         (dfs_unmark_primary_bases): Likewise.
8293         (unmark_primary_bases): Likewise.
8294         (dfs_get_pure_virtuals): Likewise.
8296 2000-01-01  Mark Mitchell  <mark@codesourcery.com>
8298         * cp-tree.h (skip_rtti_stuff): Adjust prototype.
8299         * class.c (skip_rtti_stuff): Reorganize parameters and return value.
8300         (modify_one_vtable): Adjust.
8301         (fixup_vtable_deltas1): Likewise.
8302         (override_one_vtable): Likewise.
8303         * search.c (get_abstract_virtuals_1): Likewise.
8304         (get_pure_virtuals): Likewise.
8305         (expand_upcast_fixups): Likewise.
8306         * tree.c (debug_binfo): Likewise.
8308         * class.c (build_vtable): Don't return a value.  Don't rebuild
8309         vtables for bases that have already been handled.
8310         (prepare_fresh_vtable): Don't rebuild vtables for bases that have
8311         already been handled.
8312         (modify_one_vtable): Adjust accordingly.
8313         (fixup_vtable_deltas1): Likewise.
8314         (finish_struct_1): Likewise.
8316 2000-01-01  Martin v. Löwis  <loewis@informatik.hu-berlin.de>
8318         * call.c (build_new_method_call): Also check destructors.