1 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
3 Table-driven attributes.
4 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
5 * decl2.c (cplus_decl_attributes): Only take one attributes
7 * cp-tree.c (cplus_decl_attributes): Update prototype.
8 * class.c (finish_struct), decl.c (start_decl, start_function),
9 decl2.c (grokfield), friend.c (do_friend), parse.y
10 (parse_bitfield): Update calls to cplus_decl_attributes.
11 * decl.c (grokdeclarator): Take a pointer to a single ordinary
13 * decl.h (grokdeclarator): Update prototype.
14 * decl2.c (grokfield): Take a single ordinary attribute list.
15 * friend.c (do_friend): Likewise.
16 * decl.c (shadow_tag, groktypename, start_decl,
17 start_handler_parms, grokdeclarator, grokparms, start_function,
18 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
19 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
20 (process_template_parm, do_decl_instantiation): Pass single
21 ordinary attribute lists around.
22 * decl.c (grokdeclarator): Correct handling of nested attributes.
24 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
25 * decl.c (grokdeclarator): Embedded attrs bind to the right,
28 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
29 (cp_attribute_table): Declare.
30 * decl.c (valid_lang_attribute): Don't define.
31 (lang_attribute_table): Define.
32 (init_decl_processing): Initialize lang_attribute_table instead of
34 * tree.c (cp_valid_lang_attribute): Remove.
35 (handle_java_interface_attribute, handle_com_interface_attribute,
36 handle_init_priority_attribute): New functions.
37 (cp_attribute_table): New array.
38 * decl2.c (import_export_class): Don't use
39 targetm.valid_type_attribute.
41 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
43 * Make-lang.in (cp/error.o): Depend on real.h
44 * error.c: #include "real.h"
46 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
48 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
49 xmalloc/strcpy/strcat.
51 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
53 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
55 * pt.c (tsubst_decl): Likewise.
57 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
59 * decl2.c (lang_f_options): Const-ification.
60 * lex.c (cplus_tree_code_name): Likewise.
61 * spew.c (yyerror): Likewise.
63 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
66 * class.c (force_canonical_binfo_r): Check & move an indirect
68 (force_canonical_binfo): Check that it's not already
70 (mark_primary_virtual_base): Remove BINFO parameter.
71 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
73 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
75 Remove TYPE_NONCOPIED_PARTS.
76 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
77 CLASSTYPE_PURE_VIRTUALS.
78 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
79 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
80 (layout_class_type): Don't call fixup_inlin_methods here ...
81 (finish_struct_1): ... call it here.
83 2001-09-04 Mark Mitchell <mark@codesourcery.com>
85 * decl.c (duplicate_decls): Remove code deadling with
87 * decl2.c (finish_file): Likewise.
88 * pt.c (instantiate_decl): Likewise.
89 * semantics.c (expand_body): Don't defer local functions if
90 they wouldn't be deferred for some other reason. Don't
91 generate RTL for functions that will not be emitted.
92 (genrtl_start_function): Remove code deadling with
94 (genrtl_finish_function): Likewise.
96 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
99 * call.c (build_over_call): Do not optimize any empty base
102 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
104 * error.c (dump_template_decl): Output template parameters
105 together with their specifiers.
106 Output `class' prefix for template template parameter.
107 (dump_decl): Fix formatting.
109 2001-08-30 Kurt Garloff <garloff@suse.de>
111 * optimize.c (inlinable_function_p): Allow only smaller single
112 functions. Halve inline limit after reaching recursive limit.
114 2001-08-30 Joern Rennecke <amylaar@redhat.com>
115 Jason Merrill <jason_merrill@redhat.com>
117 * class.c (build_vtable_entry_ref): Subtract in char*, not
120 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
122 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
123 (build_cplus_array_type): Use cp_build_qualified_type, not
124 TYPE_MAIN_VARIANT, to get an unqualified version.
126 * decl2.c (grok_alignof): Lose.
127 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
128 * typeck.c (c_alignof): Lose.
129 * semantics.c (finish_sizeof, finish_alignof): New.
131 * cp-tree.h: Declare them.
133 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
135 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
136 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
137 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
139 2001-08-19 Jakub Jelinek <jakub@redhat.com>
141 * typeck2.c (add_exception_specifier): Only require complete type if
142 not in processing template declaration.
144 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
146 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
147 GNU_xref_start_scope and GNU_xref_end_scope.
149 * tree.c (TYPE_HASH): Moved to ../tree.h.
151 2001-08-16 Mark Mitchell <mark@codesourcery.com>
153 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
156 2001-08-14 Richard Henderson <rth@redhat.com>
158 * class.c, cp-tree.h (build_vfn_ref): Remove.
159 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
161 2001-08-13 Mark Mitchell <mark@codesourcery.com>
163 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
164 empty class assignment as having side-effects to avoid
167 2001-08-13 Zack Weinberg <zackw@panix.com>
169 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
170 * except.c: Include libfuncs.h.
172 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
174 * decl.c (grokdeclarator): Clarify diagnostic message.
176 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
178 * decl2.c (do_nonmember_using_decl): Replace using directive
179 with using declaration in the error message.
181 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
183 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
184 criterion to avoid rebuilding expression tree instead of
185 processing_template_decl.
187 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
189 Support named return value optimization for inlines, too.
190 * decl.c (finish_function): Nullify returns here.
191 * semantics.c (genrtl_start_function): Not here.
192 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
193 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
194 Also nullify the CLEANUP_STMT for the nrv.
195 * cp-tree.h: Declare it.
196 * optimize.c (declare_return_variable): Replace the nrv with the
198 * typeck.c (check_return_expr): Be more flexible on alignment check.
199 Ignore cv-quals when checking for a matching type.
201 2001-08-09 Richard Henderson <rth@redhat.com>
203 * decl2.c (finish_objects): Use target hooks instead of
204 assemble_constructor and assemble_destructor.
206 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
208 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
210 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
213 Stop using TYPE_NONCOPIED_PARTS.
214 * call.c (build_over_call): Be careful when copy constructing
215 or assigning to an empty class.
216 * class.c (check_bases_and_members): It has a
217 COMPLEX_ASSIGN_REF if it has a vptr.
218 (layout_class_type): Don't add empty class padding to
219 TYPE_NONCOPIED_PARTS.
220 (finish_struct_1): Don't add the VFIELD either.
221 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
224 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
226 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
228 2001-08-06 Richard Henderson <rth@redhat.com>
230 * decl2.c (finish_objects): Pass a symbol_ref and priority to
231 assemble_{constructor,destructor}. Remove priority handling.
233 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
235 Don't allow template-id in using-declaration.
236 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
237 (do_class_using_decl): Likewise.
239 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
241 * cp/spew.c (read_token): No need to pop buffers.
243 2001-08-02 Stan Shebs <shebs@apple.com>
245 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
246 (fnaddr_from_vtable_entry): Remove decl.
247 * method.c (use_thunk): Update comment.
249 2001-08-01 Andrew Cagney <ac131313@redhat.com>
251 * repo.c (get_base_filename): Change return value to const char
254 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
258 * cp-tree.h (flag_honor_std): Remove.
259 (CPTI_FAKE_STD): Remove.
260 (std_node): Remove comment about it being NULL.
261 (fake_std_node): Remove.
262 * decl.c (in_fake_std): Remove.
263 (walk_namespaces_r): Remove fake_std_node check.
264 (push_namespace): Remove in_fake_std code.
265 (pop_namespace): Likewise.
266 (lookup_name_real): Remove fake_std_node check.
267 (init_decl_processing): Always create std_node. Always add
269 (builtin_function): Always put non '_' fns in std.
270 * decl2.c (flag_honor_std): Remove.
271 (lang_f_options): Remove honor-std.
272 (unsupported_options): Add honor-std.
273 (set_decl_namespace): Remove fake_std_node check.
274 (validate_nonmember_using_decl): Likewise.
275 (do_using_directive): Likewise.
276 (handle_class_head): Likewise.
277 * dump.c (cp_dump_tree): Likewise.
278 * except.c (init_exception_processing): Adjust.
279 * init.c (build_member_call): Remove fake_std_node check.
280 (build_offset_ref): Likewise.
281 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
282 * rtti.c (init_rtti_processing): Adjust.
284 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
286 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
287 operand while calling cp_tree_equal.
289 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
291 The 3.0 ABI no longer has vbase pointer fields.
292 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
293 FORMAT_VBASE_NAME): Remove.
294 * method.c (do_build_copy_constructor): Adjust.
295 (do_build_assign_ref): Adjust.
296 * search.c (lookup_field_r): Adjust.
297 * typeck.c (build_component_ref): Adjust.
299 The 3.0 ABI always has a vtable pointer at the start of every
301 * rtti.c (build_headof_sub): Remove.
302 (build_headof): Adjust.
303 (get_tinfo_decl_dynamic): No need to check flag_rtti
305 (create_real_tinfo_var): Explain why we need a hidden name.
307 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
310 * class.c (update_vtable_entry_for_fn): The fixed adjustment
311 of a virtual thunk should be from declaring base.
313 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
315 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
316 the shared virtual base, so preserving inheritance graph order.
318 2001-07-30 Andreas Jaeger <aj@suse.de>
320 * decl2.c: Remove unused var global_temp_name_counter.
322 2001-07-28 Richard Henderson <rth@redhat.com>
324 * method.c (pending_inlines): Remove.
326 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
328 * class.c (mark_primary_virtual_base): Don't adjust base
330 (dfs_unshared_virtual_bases): Adjust them here.
331 (mark_primary_bases): Explain why we adjust at the end.
333 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
335 * class.c (finish_struct_1): When copying the primary base's
336 VFIELD, make sure we find it is at offset zero.
338 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
340 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
341 tsubst_expr for default template arguments.
343 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
346 * spew.c (yylex): Only copy the token's lineno, if it is
349 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
352 * call.c (resolve_args): Simplify, call
353 convert_from_reference.
354 (build_new_op): Resolve and convert from reference ARG1
355 earlier. Adjust ARG2 & ARG3 resolve and conversion.
357 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
359 * decl.c (last_function_parm_tags): Remove.
360 (current_function_parm_tags): Remove.
361 (init_decl_processing): Adjust.
362 (start_function): Adjust.
363 (store_parm_decls): Adjust.
366 * decl.c (grokdeclarator): Detect when a function typedef is
367 declaring a function, and create last_function_parms correctly.
369 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
371 * call.c (joust): Only prefer a non-builtin candidate to a builtin
372 one if they have the same signature.
374 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
375 it rather than toplevel_bindings_p. Give it a mangled name if static.
376 (convert_to_reference): Adjust.
377 * decl2.c (get_temp_name): Lose.
378 * mangle.c (mangle_ref_init_variable): New fn.
379 (mangle_guard_variable): Strip the ref-init header.
381 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
383 (grok_reference_init): Always use DECL_INITIAL.
385 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
388 * call.c (build_conditional_expr): Recheck args after
390 * cp-tree.h (build_conditional_expr): Move to correct file.
391 * typeck.c (decay_conversion): Diagnose any unknown types
393 (build_binary_op): Don't do initial decay or default
394 conversions on overloaded functions.
395 (build_static_cast): Don't do a decay conversion here.
397 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
400 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
401 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
403 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
405 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
406 (create_vtbl_ptr): ... here.
408 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
410 * class.c (build_vbase_offset_vbtl_entries): Look for
411 non-primary base of which we are a sub vtable.
413 2001-07-24 Phil Edwards <pme@sources.redhat.com>
415 * semantics.c (finish_this_expr): Remove unused code.
417 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
419 Simplify rtti, now we've only one ABI.
420 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
422 (tinfo_decl_id, tinfo_var_id): Remove.
423 (get_typeid_1): Remove.
425 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
426 (typeid_ok_p): New function.
427 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
428 (get_tinfo_decl): Remove old abi documentation.
429 (tinfo_from_decl): Remove.
430 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
431 (get_typeid_1): Remove.
432 (get_base_offset): Remove.
433 (synthesize_tinfo_var): Absorb get_base_offset.
434 (create_real_tinfo_var): Don't use tinfo_decl_id.
436 2001-07-23 Graham Stott <grahams@redhat.com>
438 * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
439 variable has_two_argument_delete_p.
441 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
443 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
444 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
445 (CPTI_INDEX_IDENTIFIER): Remove.
446 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
447 (delta2_identifier): Remove.
448 (index_identifier): Remove.
449 (pfn_or_delta2_identifier): Remove.
450 (flag_vtable_thunks): Remove.
451 (VTABLE_DELTA2_NAME): Remove.
452 (VTABLE_INDEX_NAME): Remove.
453 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
454 (vfunc_ptr_type_node): Adjust.
455 (VTABLE_NAME_PREFIX): Adjust.
456 (build_vfn_ref): Lose first parameter.
457 (fixup_all_virtual_upcast_offsets): Remove.
458 * decl.c (initialize_predefined_identifiers): Remove
459 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
460 (init_decl_processing): Remove no-vtable-thunk code.
461 * decl2.c (flag_vtable_thunks): Remove.
462 (mark_vtable_entries): Remove no-vtable-thunk code.
463 * error.c (dump_decl): Remove no-vtable-thunk code.
464 (dump_expr): Adjust ptr to member function code.
465 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
467 * rtti.c (build_headof): Remove no-vtable-thunk code.
468 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
469 * search.c (get_base_distance): Remove expand_upcast_fixups case.
470 (virtual_context) Remove.
471 (expand_upcast_fixups): Remove.
472 (fixup_virtual_upcast_offsets): Remove.
473 (fixup_all_virtual_upcast_offsets): Remove.
474 * typeck.c (get_member_function_from_ptrfunc): Remove
475 no-vtable-thunk code.
476 * call.c (build_over_call): Adjust call to build_vfn_ref.
477 * class.c (build_vfn_ref): Lose first parameter. Remove
478 no-vtable-thunk code.
479 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
480 (build_vtable_entry): Remove no-vtable-thunk code.
482 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
484 Remove old-abi remnants. Remove comments about old abi
485 behaviour. Remove refences to 'new-abi' in comments.
486 * cp-tree.h: Adjust comments.
487 (vbase_offsets_in_vtable_p): Delete.
488 (vcall_offsets_in_vtable_p): Delete.
489 (vptrs_present_everywhere_p): Delete.
490 (all_overridden_vfuns_in_vtables_p): Delete.
491 (merge_primary_and_secondary_vtables_p): Delete.
492 (TYPE_CONTAINS_VPTR_P): Adjust.
493 (VTT_NAME_PREFIX): Remove.
494 (CTOR_VTBL_NAME_PREFIX): Remove.
495 (init_vbase_pointers): Remove.
496 * class.c: Adjust coments.
497 (build_vbase_pointer_fields): Delete.
498 (build_vbase_pointer): Remove old-abi code.
499 (build_secondary_vtable): Likewise.
500 (modify_all_vtables): Likewise.
501 (create_vtable_ptr): Likewise.
502 (layout_class_type): Likewise.
503 (finish_struct_1): Likewise.
504 (finish_vtbls): Likewise.
505 (dfs_finish_vtbls): Delete.
506 (build_vbase_offset_vtbl_entries): Remove old-abi code.
507 * cvt.c: Adjust comments.
508 * decl.c: Adjust comments.
509 * decl2.c: Adjust comments.
510 * init.c: Adjust comments.
511 (construct_virtual_bases): Remove old-abi code.
512 * lang-specs.h: Remove -fno-new-abi.
513 * mangle.c: Adjust comments.
514 * rtti.c: Adjust comments.
515 (get_base_offset): Remove old-abi-code.
516 * search.c: Adjust comments.
517 (dfs_init_vbase_pointers): Remove.
518 (dfs_vtable_path_unmark): Remove.
519 (init_vbase_pointers): Remove.
520 * semantics.c: Adjust comments.
521 (emit_associated_thunks): Remove old-abi code.
522 * typeck.c: Adjust comments.
524 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
526 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
529 2001-07-19 Mark Mitchell <mark@codesourcery.com>
531 * class.c (finish_struct_anon): Forbid nested classes.
533 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
535 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
536 * optimize.c: Include debug.h.
537 (maybe_clone_body): Use debug hook.
538 * semantics.c: Include debug.h.
539 (expand_body): Use debug hook.
541 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
543 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
545 2001-07-18 Mark Mitchell <mark@codesourcery.com>
547 * class.c (type_requires_array_cookie): New function.
548 (check_methods): Don't try to figure out whether the type needs a
550 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
551 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
552 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
553 * pt.c (instantiate_class_template): Don't set
554 TYPE_VEC_DELETE_TAKES_SIZE.
555 * NEWS: Document ABI changes from GCC 3.0.
557 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
558 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
560 * NEWS (Changes in GCC 3.0): Fix typo.
562 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
564 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
565 which attributes are to be attached, and a flags argument. Update
566 call to decl_attributes.
567 (grokfield): Update call to decl_attributes.
568 * class.c (finish_struct): Update call to cplus_decl_attributes.
569 * cp-tree.h (cplus_decl_attributes): Update prototype.
570 * decl.c (start_decl, grokdeclarator, start_function): Update
571 calls to decl_attributes and cplus_decl_attributes.
572 * friend.c (do_friend): Update call to cplus_decl_attributes.
573 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
575 2001-07-12 Mark Mitchell <mark@codesourcery.com>
577 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
578 for `register' variables with an asm-specification.
580 2001-07-11 Mark Mitchell <mark@codesourcery.com>
582 * semantics.c (finish_asm_stmt): Mark the output operands
583 to an asm addressable, if necessary.
585 2001-07-11 Ben Elliston <bje@redhat.com>
587 * Revert this change -- there is a subtle bug.
590 * decl.c (finish_enum): New "attributes" argument; pass it to
591 cplus_decl_attributes. Use a narrower type if the enum is packed.
592 * cp-tree.h (finish_enum): Adjust prototype.
593 * parse.y (enum_head): New non-terminal.
594 (structsp): Use it. Enums now may be preceded or followed by
595 optional attributes -- pass their chained tree to finish_enum().
596 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
598 2001-07-10 Mark Mitchell <mark@codesourcery.com>
600 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
603 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
605 * semantics.c (cp_expand_stmt): Fix for null
606 current_function_return_value.
608 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
610 * call.c (build_op_delete_call): Initialize fn.
611 (convert_like_real): Delete conditional.
612 (joust): Initialize *w and *l.
613 * class.c: Add prototype for binfo_ctor_vtable.
614 (get_primary_binfo): Initialize result.
615 * init.c (build_java_class_ref): Initialize name.
617 2001-07-09 Erik Rozendaal <dlr@acm.org>
619 * typeck.c (unary_complex_lvalue): Do not duplicate the
620 argument to modify, pre-, or post-increment when used as an
621 lvalue and when the argument has side-effects.
623 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
625 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
626 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
627 cplus_decl_attributes even if attrs is NULL.
628 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
630 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
632 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
633 calls to decl_attributes.
635 2001-07-06 Ira Ruben <ira@apple.com>
637 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
638 be DECL_TEMPLATE_RESULT.
640 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
642 * cp-tree.h (copy_template_template_parm): Rename to ...
643 (bind_template_template_parm): ... here.
644 * tree.c (copy_template_template_parm): Rename to ...
645 (bind_template_template_parm): ... here. Remove the case when
646 NEWARGS is NULL_TREE.
647 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
648 BOUND_TEMPLATE_TEMPLATE_PARM.
649 * pt.c (lookup_template_class): Adjust.
651 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
653 * cvt.c (convert_lvalue): New fn.
654 * cp-tree.h: Declare it.
655 * method.c (do_build_assign_ref): Use it.
656 (do_build_copy_constructor): Convert parm to base types
657 before calling base constructors.
659 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
660 DECL_USER_ALIGN. Check flag_elide_constructors instead of
662 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
664 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
666 * optimize.c (optimize_inline_calls): New function, broken out
668 (optimize_function): ... here. Call it. Don't inline if it is
670 (dump_function): Print name of dump flag causing this dump.
671 * semantics.c (expand_body): Move thunk inline check to
674 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
676 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
677 (comptypes): Use target.comp_type_attributes.
679 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
681 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
683 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
685 * error.c (lang_print_error_function): Add a `diagnostic_context *'
688 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
690 * decl2.c (import_export_class): Update.
692 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
694 * error.c (init_error): Adjust settings.
696 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
698 * error.c (init_error): Adjust settings.
700 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
702 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
703 return pointers to data members by reference rather than by value.
705 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
707 Implement the Named Return Value optimization.
708 * cp-tree.h (struct cp_language_function): Add x_return_value.
709 (current_function_return_value): Now a macro.
710 * decl.c: Don't define it.
711 (define_label, finish_case_label): Don't clear it.
712 (init_decl_processing): Don't register it with GC.
713 * semantics.c (genrtl_finish_function): Don't check it for
714 no_return_label. Copy the RTL from the return value to
715 current_function_return_value and walk, calling...
716 (nullify_returns_r): ...this new fn.
717 * typeck.c (check_return_expr): Set current_function_return_value.
719 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
721 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
722 sharing a ctor vtable with. Merge code for cases 1 and 2.
723 (binfo_ctor_vtable): New fn.
724 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
726 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
728 * class.c (dfs_find_final_overrider): Fix logic.
730 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
731 virtual thunk instead of non-virtual.
732 (get_matching_virtual): Uncomment.
734 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
735 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
738 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
740 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
741 we've not emerged from the hierarchy of RTTI_BINFO on reaching
744 2001-06-13 Mark Mitchell <mark@codesourcery.com>
746 * NEWS: Update release number.
748 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
750 PR c++/3130, c++/3131, c++/3132
751 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
752 * class.c (force_canonical_binfo_r): Move
753 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
754 virtual bases unless they're primary and what they're primary
756 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
757 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
758 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
760 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
761 (layout_nonempty_base_or_field): Add most derived type
763 (layout_empty_base): Likewise.
764 (build_base_field): Likewise.
765 (build_base_fields): Likewise.
766 (propagate_binfo_offsets): Add most derived type
767 parameter. Skip non canonical virtual bases too.
768 (dfs_set_offset_for_unshared_vbases): Don't skip primary
769 bases. Do skip canonical bases.
770 (layout_virtual_bases): Adjust.
771 (layout_class_type): Adjust.
772 (dfs_get_primary_binfo): Build list of virtual primary base
774 (get_primary_binfo): Check that the shared virtual primary
775 base candidate was found first.
776 (accumulate_vtbl_inits): Don't do anything for non-vptr
777 containing binfos. For case 1 primary virtual bases, keep
778 checking that we've not emerged from the hierarchy of RTTI_BINFO.
780 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
783 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
784 hierarchy looking for primary bases for a ctor
785 vtable. Recursively call oneself, if we meet our primary via
786 this route and haven't met it yet via inheritance graph order.
788 2001-06-11 Mark Mitchell <mark@codesourcery.com>
790 * lang-options.h: Emit documentation for -fno-honor-std, not
793 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
795 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
797 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
799 2001-06-10 Mark Mitchell <mark@codesourcery.com>
800 Gabriel Dos Reis <gdr@codesourcery.com>
802 * Make-lang.in (cp/call.o): Depend on diagnostic.h
803 (cp/typeck.o): Depend on diagnostic.h
804 (cp/typeck2.o): Depend on diagnostic.h
805 (cp/repo.o): Depend on dignostic.h
806 * typeck.c: #include diagnostic.h
807 (convert_for_initialization): Remove extern declaration for
808 warningcount and errorcount.
810 * call.c: #include diagnostic.h
811 (convert_like_real): Remove extern declaration for warnincount and
814 * repo.c: #include diagnostic.h
815 * typeck2.c: #include diagnostic.h
817 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
819 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
822 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
825 * friend.c (do_friend): Use push_decl_namespace for classes at
828 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
829 Jason Merrill <jason_merrill@redhat.com>
832 * class.c (build_secondary_vtable): Use assert, rather than an error
834 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
835 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
836 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
837 Don't set BINFO_VTABLE for a primary virtual base.
839 2001-06-07 Mark Mitchell <mark@codesourcery.com>
841 * decl.c (duplicate_decls): Update source position information
842 when a template function is defined.
844 2001-06-07 Phil Edwards <pme@sources.redhat.com>
846 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
848 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
851 * decl.c (pushtag): Don't push into a complete type's scope.
853 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
855 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
856 (struct lang_decl_flags): Lose generate_with_vtable_p.
857 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
858 * class.c (copy_virtuals): Adjust.
859 * decl2.c (mark_vtable_entries): Adjust.
860 * method.c (make_thunk, build_vtable_entry): Adjust.
861 * class.c (update_vtable_entry_for_fn): Only look as far as the
862 first defining class.
863 (build_vtbl_initializer): Put nothing in the slot for a function only
864 defined in a lost primary virtual base.
865 (add_vcall_offset_vtbl_entries_1): Use the same code for
866 the lost primary case and the normal case.
867 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
868 (get_vfield_offset, get_derived_offset): Lose.
869 (dfs_find_final_overrider): Use look_for_overrides_here.
870 (get_matching_virtual): New fn.
871 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
873 * search.c (look_for_overrides_here): Split out from...
874 (look_for_overrides_r): Here.
876 * class.c (find_final_overrider): Return error_mark_node on error.
878 * decl2.c (key_method): #if 0 accidental change.
880 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
882 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
883 (build_over_call): Likewise.
884 * decl.c (grokparms): Likewise.
885 * pt.c (tsubst_decl): Likewise.
886 * typeck.c (convert_arguments): Likewise.
888 2001-06-05 Mark Mitchell <mark@codesourcery.com>
890 * semantics.c (begin_class_definition): Robustify.
892 * pt.c (instantiate_decl): Tell the repository code about the
893 clones, not the cloned functions.
894 * repo.c (repo_template_used): Explicitly instantiate the cloned
895 function, not the clones.
897 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
899 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
900 ICS_BAD_FLAG on created conversion.
901 (compare_ics): Break out rank.
903 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
905 * decl.c (xref_tag): Remove extraneous %s on dependent name
908 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
910 * class.c (layout_vtable_decl): Fix off by one error on
912 (build_vtt): Likewise.
913 (build_ctor_vtbl_group): Likewise.
915 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
917 * class.c (maybe_indent_hierarchy): New function.
918 (dump_class_hierarchy_r): Add flags. Dump extra binfo
919 information, if enabled. Use maybe_indent_hierarchy. Adjust
921 (dump_class_hierarchy): Adjust prototype. Adjust output format.
922 (dump_array, dump_vtable, dump_vtt): New functions.
923 (finish_struct_1): Adjust hierarchy dumping.
924 (initialize_vtable): Call dump_vtable.
925 (build_vtt): Call dump_vtt.
926 (build_ctor_vtbl_group): Call dump_vtable.
927 * decl2.c (flag_dump_class_layout): Remove.
928 (cxx_decode_option): Remove dump translation unit
929 and dump class hierarchy check. Call dump_switch_p.
930 (finish_file): Adjust dumping.
931 (dump.c): Only dump base classes if not TDF_SLIM.
932 Only dump namespace members if not TDF_SLIM.
933 * optimize.c (dump_function): New function.
934 (optimize_function): Call dump_function.
935 * semantics.c (expand_body): Use dump_enabled_p.
937 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
940 Part missed from first commit
941 * decl2.c (finish_anon_union): Copy context.
943 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
946 * optimize.c (remap_decl): Remap anonymous aggregate members too.
948 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
951 * semantics.c (expand_body): Don't optimize thunks.
953 2001-05-25 Sam TH <sam@uchicago.edu>
955 * cp-tree.h lex.h: Fix header include guards.
957 2001-05-25 Mark Mitchell <mark@codesourcery.com>
959 * decl.c (init_decl_processing): Tweak.
961 2001-05-24 Mark Mitchell <mark@codesourcery.com>
963 * decl.c (duplicate_decls): Tidy.
964 (init_decl_processing): Always set flag_no_builtin.
966 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
969 * decl2.c (do_local_using_decl): Push the decls, even in a
972 2001-05-22 Mark Mitchell <mark@codesourcery.com>
974 * optimize.c (initialize_inlined_parameters): Don't set
975 TREE_READONLY for a VAR_DECL taking the place of an inlined
978 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
980 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
981 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
984 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
986 * parse.y: Refer to compound literals as such, not as
987 constructor-expressions.
989 2001-05-21 Mark Mitchell <mark@codesourcery.com>
991 * call.c (build_op_delete_call): Ignore exception-specifications
992 when looking for matching delete operators.
993 * init.c (build_new_1): Compute whether or not the allocation
994 function used is a placement allocation function or not, and
995 communicate this information to build_op_delete_call.
997 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
999 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
1000 (build_vtbl_ref): Adjust.
1001 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
1002 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
1004 (unsupported_options): Correspondingly.
1006 * decl2.c (maybe_make_one_only): Check flag_weak, not
1007 supports_one_only().
1009 * cp-tree.def (START_CATCH_STMT): Lose.
1010 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
1011 * tree.c (cp_statement_code_p): Don't case it.
1012 * semantics.c (cp_expand_stmt): Likewise.
1013 * cp-tree.h (START_CATCH_TYPE): Lose.
1014 (HANDLER_TYPE): New.
1015 * except.c (expand_start_catch_block): Don't start any blocks.
1017 (expand_end_catch_block): Don't end any blocks.
1018 * parse.y (handler): Don't pass anything from finish_handler_parms
1020 * pt.c (tsubst_expr): Likewise.
1021 * semantics.c (begin_handler): Call note_level_for_catch here.
1022 (finish_handler_parms): Don't return anything.
1023 (genrtl_catch_block, begin_catch_block): Lose.
1024 (genrtl_handler): Call expand_start_catch here.
1026 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
1028 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
1029 (get_vtable_decl, build_vtt): Not here.
1031 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
1034 * optimize.c (update_cloned_parm): Copy addressability and other
1037 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1039 * pt.c (determine_specialization): Ignore artificial functions.
1041 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
1043 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
1044 (C_RID_CODE): Remove.
1045 * lex.c (cxx_init_options): Call set_identifier_size. Update.
1046 (init_parse): Don't do it here.
1048 2001-05-18 Diego Novillo <dnovillo@redhat.com>
1050 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
1051 function declaration to avoid stripping the symbol's attributes.
1053 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
1055 * decl.c (pushdecl): Adjust error string.
1056 (xref_tag): Adjust friend class injection warning. Remove the
1057 inherited name from the class shadowed scope.
1059 2001-05-17 Mark Mitchell <mark@codesourcery.com>
1061 * except.c (cp_protect_cleanup_actions): New function.
1062 (init_exception_processing): Don't set protect_cleanup_actions
1063 here. Do set lang_protect_cleanup_actions.
1065 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
1067 * spew.c (read_token): Call yyerror on all unexpected tokens.
1069 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
1071 * init.c (member_init_ok_or_else): Take a tree rather than
1073 (expand_member_init): Adjust.
1075 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
1077 * decl.c (duplicate_decls): Suppress warning about duplicate
1078 decls if the first decl is a friend.
1080 2001-05-12 Zack Weinberg <zackw@stanford.edu>
1082 * except.c (choose_personality_routine): Export. Add
1083 explanatory comment. Take an enum languages, not a boolean.
1084 (initialize_handler_parm): Adjust to match.
1085 * cp-tree.h: Prototype choose_personality_routine.
1086 * lex.c (handle_pragma_java_exceptions): New function.
1087 (init_cp_pragma): Register #pragma GCC java_exceptions.
1089 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
1091 * method.c (build_mangled_C99_name): Remove unused prototype.
1093 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
1095 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
1096 * typeck.c (get_member_function_from_ptrfunc,
1097 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
1098 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
1100 Reverted Geoff Keating's 2001-05-03's patch.
1102 2001-05-11 Ira Ruben <ira@apple.com>
1104 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
1106 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
1108 * cp-tree.h (finish_label_expr, lookup_label): Delete.
1109 * parse.y: Update for '&&'; don't issue warning here.
1110 * semantics.c (finish_label_expr): Delete.
1112 2001-05-07 Mark Mitchell <mark@codesourcery.com>
1114 * splay-tree.h (splay_tree_max): New function.
1115 (splay_tree_min): Likewise.
1117 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
1119 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
1120 (pfn_vflag_identifier): Define.
1121 Update comment about layout of pointer functions.
1122 (build_ptrmemfunc1): Update prototype.
1123 (expand_ptrmemfunc_cst): Update prototype.
1124 * decl.c (initialize_predefined_identifiers): Initialize
1125 pfn_vflag_identifier.
1126 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
1127 an extra field to the type.
1128 * expr.c (cplus_expand_constant): Pass 'flag' between
1129 expand_ptrmemfunc_cst and build_ptrmemfunc1.
1130 * typeck.c (get_member_function_from_ptrfunc): When
1131 FUNCTION_BOUNDARY < 16, look at additional field to determine
1132 if a pointer-to-member is a real pointer or a vtable offset.
1133 (build_ptrmemfunc1): Add new parameter to contain extra field.
1134 (build_ptrmemfunc): Pass the extra field around.
1135 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
1136 (pfn_from_ptrmemfunc): Ignore the extra field.
1138 2001-05-03 Mark Mitchell <mark@codesourcery.com>
1140 * cp-tree.h (flag_inline_trees): Update documentation.
1141 * decl.c (init_decl_processing): Adjust handling of
1142 flag_inline_functions and flag_inline_trees to support -O3.
1143 (grokfndecl): Set DECL_INLINE on all functions if that's what
1145 (save_function_data): Clear DECL_INLINE in
1146 current_function_cannot_inline is non-NULL.
1147 * decl2.c (flag_inline_trees): Update documentation.
1149 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
1151 * dump.c (cp_dump_tree, USING_STMT case): New case.
1152 * tree.c (cp_statement_code_p): Add USING_STMT.
1153 * decl2.c (do_using_directive): Add the using directive statement.
1155 * tree.c (walk_tree): Reformat an if block.
1157 2001-05-02 Mark Mitchell <mark@codesourcery.com>
1159 * decl.c (compute_array_index_type): Don't try to do anything with
1160 the indices when processing a template.
1162 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1164 * call.c: NULL_PTR -> NULL.
1165 * class.c: Likewise.
1168 * decl2.c: Likewise.
1169 * except.c: Likewise.
1172 * search.c: Likewise.
1174 * typeck.c: Likewise.
1175 * typeck2.c: Likewise.
1177 2001-05-02 Mark Mitchell <mark@codesourcery.com>
1179 * decl2.c (do_using_directive): Revert previous patch.
1181 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
1183 * cp-tree.def (USING_STMT): New statement node.
1184 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
1185 * decl2.c (do_using_directive): Add USING_STMT to statement
1186 tree. Don't emit errors when processing template decl.
1187 * pt.c (tsubst_expr, USING_STMT case): New case.
1188 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
1190 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
1192 * call.c (build_new_op): Convert args from reference here.
1193 (build_conditional_expr): Don't convert here.
1195 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
1197 * spew.c (last_token_id): New static variable.
1198 (read_token): Set it here.
1199 (yyerror): Use it here.
1201 2001-04-30 Richard Henderson <rth@redhat.com>
1203 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
1206 2001-04-30 Mark Mitchell <mark@codesourcery.com>
1208 * gxxint.texi: Remove.
1209 * Make-lang.in: Remove all traces of gxxint.texi.
1211 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
1213 * decl2.c (start_static_initialization_or_destruction): Correct
1214 logic to handle the -fno-use-cxa-atexit case.
1216 2001-04-30 Mark Mitchell <mark@codesourcery.com>
1218 * optimize.c (update_cloned_parm): New function.
1219 (maybe_clone_body): Use it. Update the `this' parameter too.
1221 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
1223 * decl2.c (unsupported_options): Add new-abi.
1224 * lang-options.h: Remove no longer supported options.
1226 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
1228 * except.c (can_convert_eh): Don't check template parms,
1231 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
1233 * optimize.c (maybe_clone_body): Copy parameter names and locations.
1235 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
1237 * cp-tree.h (adjust_clone_args): Prototype new function.
1238 * class.c (adjust_clone_args): New function.
1239 * decl.c (start_function): Call it for in charge ctors.
1241 2001-04-26 Mark Mitchell <mark@codesourcery.com>
1243 * method.c (use_thunk): Make sure that thunks really are emitted
1246 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
1248 * mangle.c (write_chars): New macro.
1249 (hwint_to_ascii): New function
1250 (write_number): Use it.
1251 (write_integer_cst): Deal with really big numbers.
1253 2001-04-25 Mark Mitchell <mark@codesourcery.com>
1255 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
1258 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
1260 * decl.c (grokdeclarator): Set context of namespace scope
1263 2001-04-24 Zack Weinberg <zackw@stanford.edu>
1265 * cp/optimize.c: Include hashtab.h.
1266 (struct inline_data): Add tree_pruner.
1267 (expand_call_inline, expand_calls_inline): Use it when calling
1269 (optimize_function): Initialize and free tree_pruner.
1271 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
1273 Lazy __FUNCTION__ generation.
1274 * cp-tree.def (FUNCTION_NAME): Remove.
1275 * cp-tree.h (function_name_declared_p): Remove.
1276 (cp_fname_init): Prototype.
1277 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
1278 don't call declare_function_name. Call start_fname_decls.
1279 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
1280 clobber the line number.
1281 (cp_fname_init): New function.
1282 (start_function): Call start_fname_decls.
1283 (finish_function): Call finish_fname_decls.
1284 * lex.c (reswords): Add slots for __FUNCTION__ et al.
1285 (rid_to_yy): Add mappings for __FUNCTION__ et al.
1286 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
1287 * parse.y (VAR_FUNC_NAME): New token.
1288 (primary): Add VAR_FUNC_NAME.
1289 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
1291 (tsubst, FUNCTION_NAME case): Remove.
1292 (tsubst_copy, FUNCTION_NAME case): Remove.
1293 (tsubst_expr, DECL_STMT case): Be careful with a
1294 DECL_PRETTY_FUNCTION_P.
1295 (instantiate_decl): Remove function_name_declared_p.
1296 * semantics.c (begin_compound_statement): Don't call
1297 declare_function_name here.
1298 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
1299 (finish_translation_unit): Call finish_fname_decls.
1300 (expand_body): Remove function_name_declared_p.
1301 * typeck2.c (digest_init): Allow any ERROR_MARK.
1303 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
1305 * pt.c (tsubst_decl): Use VOID_TYPE_P.
1306 * semantics.c: Fix some typos.
1308 2001-04-23 Phil Edwards <pme@sources.redhat.com>
1310 * cp/decl2.c (flag_honor_std): Always initialize to 1.
1312 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1314 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
1316 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
1318 * except.c (build_throw): Wrap the initialization of the exception
1319 object in a MUST_NOT_THROW_EXPR.
1320 (do_free_exception): #if 0.
1322 2001-04-20 Mark Mitchell <mark@codesourcery.com>
1324 * cp-tree.h (finish_enum): Change prototype.
1325 * decl.c (finish_enum): Reorganize.
1326 * parse.y (structsp): Adjust calls to finish_enum.
1328 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
1330 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
1333 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
1335 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
1336 (layout_empty_base): Return at end flag.
1337 (build_base_field): Likewise.
1338 (build_base_fields): Likewise.
1339 (layout_virtual_bases): Don't add 1 to eoc value.
1340 (end_of_class): Use full size for empty bases.
1341 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
1342 empty bases. Don't add 1 to eoc value. Only add trailing padding
1343 if we're an empty class with no empty bases.
1344 (dump_class_hierarchy): Dump size and alignment.
1346 2001-04-20 Jakub Jelinek <jakub@redhat.com>
1348 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
1351 2001-04-20 Jakub Jelinek <jakub@redhat.com>
1353 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
1354 is found, look first if name does not match the structure name.
1356 2001-04-19 Mark Mitchell <mark@codesourcery.com>
1358 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
1360 (SET_DECL_LANGUAGE): New macro.
1361 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
1362 (pushdecl): Likewise.
1363 (build_library_fn_1): Likewise.
1364 (build_cp_library_fn): Likewise.
1365 (grokfndecl): Likewise.
1366 (grokvardecl): Mark `extern "C"' variables as having C linkage.
1367 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
1368 * lex.c (retrofit_lang_decl): Likewise.
1369 * mangle.c (mangle_decl_string): Don't mangle the names of
1370 variables declared with C language linkage.
1371 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
1373 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
1375 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
1376 flag_access_control from uninitialized storage.
1378 2001-04-15 Mark Mitchell <mark@codesourcery.com>
1380 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
1381 * mangle.c (write_pointer_to_member_type): Fix mangling of
1382 pointers to cv-qualified member function types.
1384 * init.c (build_delete): Create a SAVE_EXPR for the address if
1385 we're going to use it more than once.
1387 2001-04-13 Mark Mitchell <mark@codesourcery.com>
1389 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
1390 (expand_ptremfunc_cst): Change prototype.
1391 (delta2_from_ptrmemfunc): Remove.
1392 * expr.c (cplus_expand_constant): Adjust call to
1393 expand_ptrmemfunc_cst.
1394 * typeck.c (build_ptrmemfunc1): Simplify.
1395 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
1396 results in a constant.
1397 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
1398 (delta2_from_ptrmemfunc): Remove.
1399 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
1401 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
1403 * cp-tree.h (decl_namespace_list): New macro.
1404 (struct saved_scope): Add decl_ns_list.
1405 * decl.c (mark_saved_scope): Mark it.
1406 * decl2.c: Lose static decl_namespace_list.
1407 (init_decl2): Don't save it.
1409 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1411 * cp-tree.h (warn_return_type, yylex): Delete redundant
1414 * decl.c (current_class_depth, global_namespace): Likewise.
1416 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
1418 * repo.c (flag_use_repository): Likewise.
1420 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1422 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
1423 set_block, pushdecl, getdecls, gettags, init_decl_processing,
1424 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
1425 lvalue_or_else, print_lang_statistics, comp_target_types,
1426 unsigned_type, signed_type, signed_or_unsigned_type,
1427 build_function_call, mark_addressable, incomplete_type_error):
1428 Delete redundant declarations.
1430 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
1432 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
1433 (TYPE_ANONYMOUS_P): New macro.
1434 (TAGGED_TYPE_P): New macro.
1435 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
1436 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
1437 * tree.c (no_linkage_helper): Likewise.
1438 * semantics.c (begin_class_definition): Likewise.
1439 * pt.c (convert_template_argument): Likewise.
1440 * lex.c (check_for_missing_semicolon): Likewise.
1442 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
1444 * class.c (dfs_unshared_virtual_bases): New function.
1445 (mark_primary_bases): Call it.
1446 (check_bases): Ignore virtual bases when determining
1449 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
1451 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
1453 2001-04-11 Mark Mitchell <mark@codesourcery.com>
1455 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
1456 cloned function to the clone.
1458 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1460 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
1462 * semantics.c: Include expr.h.
1464 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
1466 * method.c (implicitly_declare_fn): Commonize code for copy ctor
1467 and assignment op. Set TREE_USED for parameter.
1469 2001-04-10 Mark Mitchell <mark@codesourcery.com>
1471 * class.c (find_final_overrider_data): Add `candidates'.
1472 (dfs_find_final_overrider): Don't issue error messages
1474 (find_final_overrider): Issue error messages here.
1475 (build_base_field): Don't warn about amgibuous direct bases here.
1476 (warn_about_ambiguous_direct_bases): New function.
1477 (layout_class_type): Use it.
1479 2001-04-10 Richard Henderson <rth@redhat.com>
1481 * typeck.c (build_array_ref): Push the array reference inside
1482 COMPOUND_EXPR and COND_EXPR.
1484 2001-04-05 Mark Mitchell <mark@codesourcery.com>
1486 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
1487 * decl.c (duplicate_decls): Adjust accordingly.
1488 (maybe_commonize_var): Likewise.
1489 (grokfndecl): Likewise.
1490 (start_function): Likewise.
1491 (start_method): Likewise.
1492 * decl2.c (key_method): Likewise.
1493 (import_export_decl): Likewise.
1494 * method.c (implicitly_declare_fn): Likewise.
1495 * optimize.c (maybe_clone_body): Likewise.
1497 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
1499 * lang-specs.h: Add __DEPRECATED.
1501 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
1503 * search.c (get_dynamic_cast_base_type): When building a new
1504 constant, set its type to ssizetype.
1506 2001-04-04 Jakub Jelinek <jakub@redhat.com>
1508 * optimize.c (expand_call_inline): Only add newly inlined statements
1511 2001-04-03 Mark Mitchell <mark@codesourcery.com>
1513 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
1514 (OPERATOR_FORMAT): Likewise.
1515 (OPERATOR_TYPENAME_FORMAT): Likewise.
1516 * operators.def: Remove old name-mangling information.
1517 * decl.c (grok_op_properties): Adjust accordingly.
1518 * lex.c (init_operators): Likewise.
1519 * rtti.c (get_tinfo_decl): Issue error messages about types that
1522 2001-04-03 Mark Mitchell <mark@codesourcery.com>
1524 * decl2.c (import_export_decl): Don't call import_export_class
1525 when processing an inline member function.
1526 * semantics.c (expand_body): Call import_export_decl before
1527 emitting inline functions.
1529 2001-03-28 Richard Henderson <rth@redhat.com>
1531 IA-64 ABI Exception Handling:
1532 * cp-tree.def (EH_SPEC_BLOCK): New.
1533 (MUST_NOT_THROW_EXPR): New.
1534 * cp-tree.h: Update changed function declarations.
1535 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
1536 (CPTI_CALL_UNEXPECTED): New.
1537 (struct cp_language_function): Rename x_eh_spec_try_block
1539 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
1540 * decl.c (current_binding_level): If no current function
1541 bindings, revert to scope_chain.
1542 (initialize_predefined_identifiers): Remove __cp_push_exception.
1543 (store_parm_decls): Use begin_eh_spec_block.
1544 (finish_function): Use finish_eh_spec_block.
1545 (mark_lang_function): Update for name changes.
1546 * decl2.c (finish_file): No mark_all_runtime_matches.
1547 * dump.c (cp_dump_tree): Handle new tree codes.
1548 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
1549 * except.c (catch_language_init, catch_language): Remove.
1550 (init_exception_processing): Don't set language code.
1551 Initialize call_unexpected_node, protect_cleanup_actions,
1552 eh_personality_libfunc, lang_eh_runtime_type.
1553 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
1554 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
1555 (prepare_eh_type): Split out type canonicalizations ...
1556 (build_eh_type_type): ... from here.
1557 (build_eh_type_type_ref): Remove.
1558 (mark_all_runtime_matches): Remove.
1559 (build_exc_ptr): New.
1560 (do_begin_catch, do_end_catch): New.
1561 (do_pop_exception): Remove.
1562 (build_terminate_handler): Remove.
1563 (choose_personality_routine): Split out language choice from ...
1564 (initialize_handler_parm): ... here.
1565 Use MUST_NOT_THROW_EXPR.
1566 (expand_start_catch_block): Use do_begin_catch. Simplify Java
1567 exception object handling.
1568 (expand_start_eh_spec, expand_end_eh_spec): Remove.
1569 (expand_exception_blocks, alloc_eh_object): Remove.
1570 (begin_eh_spec_block, finish_eh_spec_block): New.
1571 (do_allocate_exception, do_free_exception): New.
1572 (expand_throw): Merge into ...
1573 (build_throw): ... here. Update for abi.
1574 * expr.c (cplus_expand_expr): No expand_internal_throw.
1575 Handle MUST_NOT_THROW_EXPR.
1576 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
1577 * semantics.c (*) Update for except.h name changes.
1578 (genrtl_try_block): No protect_with_terminate.
1579 (genrtl_eh_spec_block): New.
1580 (genrtl_handler): Don't emit the goto here.
1581 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
1582 (genrtl_finish_function): Don't expand_exception_blocks.
1583 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
1585 2001-03-28 Richard Henderson <rth@redhat.com>
1587 * decl.c (struct named_label_list): Rename eh_region to
1588 in_try_scope, add in_catch_scope.
1589 (struct binding_level): Rename eh_region to is_try_scope,
1591 (note_level_for_try): Rename from note_level_for_eh.
1592 (note_level_for_catch): New.
1593 (poplevel): Copy both is_try_scope and is_catch_scope to
1594 the named_label_list struct.
1595 (check_previous_goto_1): Don't check for catch block via
1596 DECL_ARTIFICIAL; use in_try_scope instead.
1597 (check_goto): Likewise.
1598 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
1599 * except.c (expand_start_catch_block): Call note_level_for_catch.
1600 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
1602 2001-03-27 Richard Henderson <rth@redhat.com>
1604 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
1605 exceptions_via_longjmp.
1607 2001-03-27 Phil Edwards <pme@sources.redhat.com>
1609 * pt.c (check_default_tmpl_args): Make error messages clearer.
1611 2001-03-26 Phil Edwards <pme@sources.redhat.com>
1613 * error.c: Also undefine 'A' macro used for cp_printers definition.
1615 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1617 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
1619 2001-03-26 Mike Yang <yang@research.att.com>
1620 Mark Mitchell <mark@codesourcery.com>
1622 * dump.c (dump_access): New function.
1623 (cp_dump_tree): Use it. Dump basetype information for class
1626 2001-03-26 Mark Mitchell <mark@codesourcery.com>
1628 * Makefile.in (optimize.o): Depend on params.h.
1629 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
1630 (init_decl_processing): Set flag_no_inline when doing
1632 * optimize.c: Include params.h.
1633 (struct inline_data): Improve documentation of FNS. Add
1634 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
1635 (INSNS_PER_STMT): New macro.
1636 (remap_block): Use CLONING_P.
1637 (inlinable_function_p): Don't inline big functions.
1638 (expand_call_inline): Keep track of how much inlining we've done.
1639 (optimize_function): Set FIRST_INLINED_FN.
1640 (maybe_clone_body): Set CLONING_P.
1641 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
1643 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
1644 rest_of_compilation. Clear DECL_RTL for local variables
1646 (clear_decl_rtl): New function.
1648 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
1651 * cp-tree.h (skip_type_access_control,
1652 reset_type_access_control): Prototype.
1653 * decl.c (grokdeclarator): Access of friends is not checked.
1654 * parse.y (component_decl_list): Reset type access control.
1655 * semantics.c (decl_type_access_control): Clear
1656 current_type_lookups.
1657 (save_type_access_control): Don't save if not deferring.
1658 (skip_type_access_control, reset_type_access_control): New
1660 (begin_class_definition): Do type access control for basetypes.
1661 Start deferred access control.
1662 (finish_class_definition): Resume immediate access control if
1663 this is a local class.
1665 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1667 * class.c (add_method): Use memcpy/memmove, not bcopy.
1669 * decl.c (duplicate_decls): Likewise.
1671 2001-03-23 Jakub Jelinek <jakub@redhat.com>
1673 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
1676 2001-03-23 Jakub Jelinek <jakub@redhat.com>
1678 * decl.c (local_names): Define.
1679 (push_local_name): New.
1680 (grok_reference_init): Return init if initializing static reference
1681 variable with non-constant instead of emitting it.
1682 Move expand_static_init call to cp_finish_decl.
1683 (layout_var_decl): Call push_local_name.
1684 (maybe_commonize_var): Allow inlining functions even if they have
1685 static local variables, use comdat_linkage for them if flag_weak.
1686 (check_initializer): Call obscure_complex_init if
1687 grok_reference_init returned non-zero.
1688 (save_function_data): Clear x_local_names.
1689 (pop_cp_function_context): Free x_local_names.
1690 (mark_inlined_fns): Remove.
1691 (mark_lang_function): Mark x_local_names.
1692 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
1693 Mark inlined_fns as tree, remove call to mark_inlined_fns.
1694 * class.c (alter_access): Ensure DECL_ACCESS is never set if
1695 DECL_DISCRIMINATOR_P.
1696 * cp-tree.h (cp_language_function): Add x_local_names.
1697 (lang_decl_flags): Add discriminator into u2.
1698 (lang_decl_inlined_fns): Remove.
1699 (lang_decl): inlined_fns is now a TREE_VEC.
1700 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
1701 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
1702 TREE_VEC, not a custom structure.
1703 (optimize_function): Likewise.
1704 * mangle.c (discriminator_for_local_entity): Discriminate among
1705 VAR_DECL local entities.
1706 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
1709 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
1711 Add support for Java interface method calls.
1712 * cp-tree.h (struct lang_type): Add java_interface flag.
1713 (TYPE_JAVA_INTERFACE): New macro.
1714 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
1715 by setting TYPE_JAVA_INTERFACE.
1716 * call.c (java_iface_lookup_fn): New static.
1717 (build_over_call): If calling a method declared in a
1718 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
1719 expression which resolves the function address.
1720 (build_java_interface_fn_ref): New function.
1722 2001-03-22 Richard Henderson <rth@redhat.com>
1724 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
1725 * except.c: Don't include it.
1727 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
1728 based on an idea from Joe Buck <jbuck@synopsys.com>
1730 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
1732 (data_def, component_decl): Add reductions to bad_decl.
1734 2001-03-22 Jakub Jelinek <jakub@redhat.com>
1736 * method.c (do_build_assign_ref): Don't use build_modify_expr for
1737 anonymous aggregates, since they don't have assignment operator
1739 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
1740 assignment operators for anonymous structure fields.
1742 2001-03-21 Jason Merrill <jason@redhat.com>
1744 * pt.c (instantiate_decl): Abort if we see a member constant
1745 instantiation that doesn't already have its initializer.
1746 Downgrade explicit instantiation without definition to pedwarn.
1748 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
1749 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
1750 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
1752 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
1753 (pending_vtables): Remove.
1754 * decl2.c (pending_vtables): Remove.
1755 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
1756 CLASSTYPE_VTABLE_NEEDS_WRITING.
1757 (import_export_class): Likewise.
1758 (init_decl2): Don't mark pending_vtables.
1759 * lex.c (handle_pragma_vtable): Just sorry.
1760 * pt.c (instantiate_class_template): Don't mess with
1761 CLASSTYPE_VTABLE_NEEDS_WRITING.
1762 (mark_class_instantiated): Likewise.
1763 * ptree.c (print_lang_type): Don't print it.
1764 * semantics.c (begin_class_definition): Don't set it.
1766 * pt.c (template_tail): Replace with last_pending_template.
1767 (maybe_templates, maybe_template_tail): Remove.
1768 (add_pending_template): Adjust.
1769 (instantiate_pending_templates): Adjust.
1771 * cp-tree.h (struct saved_scope): Remove lang_stack field.
1772 (current_lang_stack): Remove.
1773 * decl.c (maybe_push_to_top_level): Don't initialize it.
1774 (duplicate_decls): Use current_lang_depth.
1775 (xref_basetypes): Likewise.
1776 * class.c (current_lang_depth): New fn.
1777 (push_lang_context): Use more varray functionality.
1778 (pop_lang_context): Likewise.
1780 * error.c (GLOBAL_THING): Always use '__'.
1782 2001-03-21 Mark Mitchell <mark@codesourcery.com>
1784 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
1786 * mangle.c (mangle_decl_string): Mangle the names of overloaded
1787 operators, even when they have `extern "C"' linkage.
1789 2001-03-19 Mark Mitchell <mark@codesourcery.com>
1791 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
1792 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1793 where it's not necessary.
1794 (add_method): Remove optimization involving comparison of
1795 DECL_ASSEMBLER_NAME.
1796 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
1797 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1798 where it's not necessary.
1799 (check_methods): Likewise.
1800 (build_clone): Likewise.
1801 (built_vtt): Likewise.
1802 * cp-tree.h (DECL_NEEDED_P): Likewise.
1803 * decl.c (pushtag): Likewise.
1804 (duplicate_decls): Likewise.
1805 (pushdecl): Likewise.
1806 (builtin_function): Likewise.
1807 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
1808 (build_cp_library_fn): Likewise.
1809 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
1810 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1811 where it's not necessary.
1812 (make_rtl_for_nonlocal_decl): Likewise.
1813 (cp_finish_decl): Likewise.
1814 (grokfndecl): Likewise.
1815 (grokvardecl): Likewise.
1816 (grokdeclarator): Likewise.
1817 (start_function): Likewise.
1818 (cp_missing_return_ok_p): Likewise.
1819 * decl2.c (grokclassfn): Likewise.
1820 (check_classfn): Likewise.
1821 (finish_static_data_member_decl): Likewise.
1822 (grokfield): Likewise.
1823 * error.c (GLOBAL_IORD_P): Remove.
1824 (dump_global_iord): Improve output.
1825 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
1826 * except.c (nothrow_libfn_p): Summarily reject any function not in
1828 * init.c (build_java_class_ref): Don't explicitly set
1829 DECL_ASSEMBLER_NAME after calling mangle_decl.
1830 * mangle.c (mangle_decl_string): Handle extern "C" functions.
1831 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
1832 * method.c (set_mangled_name_for_decl): Don't explicitly set
1833 DECL_ASSEMBLER_NAME after calling mangle_decl.
1834 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
1835 IDENTIFIER_GLOBAL_VALUE for the thunk.
1836 * pt.c (set_mangled_name_for_template_decl): Remove.
1837 (check_explicit_specialization): Don't use it.
1838 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
1839 (tsubst_friend_function): Likewise.
1840 (tsubst_decl): Likewise.
1841 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
1842 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
1843 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1844 where it's not necessary.
1845 (tinfo_base_init): Likewise.
1846 (create_real_tinfo_var): Likewise.
1847 * search.c (looup_field_1): Likewise.
1848 * semantics.c (finish_named_return_value): Likewise.
1849 * tree.c (init_tree): Set lang_set_decl_assembler_name.
1851 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
1853 Correct semantics restrictions checking in throw-expression.
1854 * except.c (is_admissible_throw_operand): New function.
1855 (build_throw): Use it.
1857 2001-03-14 Mark Mitchell <mark@codesourcery.com>
1859 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
1862 2001-03-14 Mark Mitchell <mark@codesourcery.com>
1864 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1865 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
1866 * decl.c (duplicate_decls): Likewise.
1867 (builtin_function): Likewise.
1868 (build_library_fn): Likewise.
1869 (build_cp_library_fn): Likewise.
1870 (check_initializer): Likewise.
1871 (cp_finish_decl): Likewise.
1872 * decl2.c (grokfield): Likewise.
1873 (grok_function_init): Remove #if 0'd code.
1874 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1875 * friend.c (do_friend): Likewise.
1876 * init.c (get_temp_regvar): Likewise.
1877 * method.c (make_thunk): Likewise.
1878 * pt.c (tsubst_friend_function): Likewise.
1879 (tsubst_decl): Likewise.
1880 (regenerate_decl_from_template): Likewise.
1881 * semantics.c (genrtl_named_return_value): Likewise.
1882 (expand_body): Likewise.
1883 (genrtl_finish_function): Likewise.
1884 * tree.c (cp_tree_equal): Likewise.
1886 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
1888 * call.c (convert_like_real): Add extra semantics to INNER
1889 parameter. Don't convert to temporary if a user conversion
1890 gives us an lvalue that we're about to bind to a reference.
1891 Set INNER to indicate pending reference binding on recursive
1894 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
1896 * cp/lex.c: Delete duplicate pending_lang_change.
1898 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
1900 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
1902 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
1903 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
1905 2001-03-09 Zack Weinberg <zackw@stanford.edu>
1907 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
1909 2001-03-08 Stan Shebs <shebs@apple.com>
1911 * cp-tree.h (set_identifier_local_value): Remove unused decl.
1913 2001-03-06 Zack Weinberg <zackw@stanford.edu>
1915 * spew.c: Remove references to CPP_OSTRING.
1917 2001-03-06 Andrew Haley <aph@redhat.com>
1919 * typeck.c (convert_arguments): Check that we have an fndecl.
1921 2001-03-05 Andrew Haley <aph@redhat.com>
1923 * typeck.c (convert_arguments): Don't do ellipsis conversion for
1924 __built_in_constant_p.
1926 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1928 * typeck.c (build_static_cast): Allow enum to enum conversions
1931 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1933 * class.c (check_field_decls): Pointers to member do not a
1934 non-pod struct make, as per DR 148.
1936 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1938 * call.c (joust): cp_pedwarn when using gnu extension concerning
1939 worst conversion sequences.
1941 2001-03-01 Zack Weinberg <zackw@stanford.edu>
1943 * decl.c: Replace all uses of 'boolean' with 'bool'.
1945 2001-03-01 Zack Weinberg <zackw@stanford.edu>
1947 * lang-specs.h: Add zero initializer for cpp_spec field to
1948 all array elements that need one. Don't put an #ifdef inside
1949 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
1952 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
1954 Implement using decls inside template functions.
1955 * decl2.c (validate_nonmember_using_decl): Don't special case
1956 fake_std_node in the global namespace. Don't reject early when
1957 processing a template.
1958 (do_local_using_decl): Add to statement tree. Don't do further
1959 processing when building a template.
1960 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
1962 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
1964 * decl2.c (do_nonmember_using_decl): Don't complain if we find
1965 same function. Do complain about ambiguating extern "C"
1968 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
1970 Remove floating point and complex type template constant parms.
1971 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
1972 COMPLEX_TYPE extensions.
1973 (invalid_nontype_parm_type_p): Likewise.
1975 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
1977 * except.c (call_eh_info): Revert "match_function"'s type.
1979 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
1981 Fix ctor vtable vcall offsets.
1982 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
1983 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
1984 (get_matching_base): Remove.
1985 (get_original_base): New function.
1986 (build_vtbl_initializer): Initialize vid.rtti_binfo.
1987 Use a virtual thunk for a ctor vtable with an index
1988 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
1989 primary base within a constructor vtable. Only set
1990 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
1991 when primary base has been lost.
1992 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
1994 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
1996 * call.c (joust): Ensure more_specialized()'s argument length
1997 parameter has correct value for constructors.
1999 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
2001 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
2003 * decl.c (mark_inlined_fns): Prototype.
2005 2001-02-22 Mark Mitchell <mark@codesourcery.com>
2007 * spew.c (yylex): Correct handling of friends.
2009 2001-02-22 Mark Mitchell <mark@codesourcery.com>
2011 * mangle.c (write_encoding): Pass write_function_type the
2012 FUNCTION_DECL for the function being encoded.
2013 (write_function_type): Pass it along to write_bare_function_type.
2014 (write_bare_function_type): Pass it along to write_method_parms.
2015 (write_method_parms): Don't mangle the compiler-generated
2016 parameters to a constructor or destructor.
2018 2001-02-22 Andreas Jaeger <aj@suse.de>
2020 * optimize.c: Include toplev.h for
2021 note_deferral_of_defined_inline_function prototype.
2023 2001-02-22 Jakub Jelinek <jakub@redhat.com>
2025 * cp-tree.h (struct lang_decl_inlined_fns): New.
2026 (struct lang_decls): Add inlined_fns.
2027 (DECL_INLINED_FNS): New macro.
2028 * optimize.c (struct inline_data): Add inlined_fns.
2029 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
2030 (inlinable_function_p): Likewise, fix typo in comment,
2031 function is not inlinable if it already inlined function currently
2033 (expand_call_inline): Add fn to inlined_fns if neccessary.
2034 (optimize_function): Initialize inlined_fns.
2035 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
2036 * decl.c (mark_inlined_fns): New function.
2037 (lang_mark_tree): Call it.
2039 2001-02-21 Jason Merrill <jason@redhat.com>
2041 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
2042 (DECL_UNINLINABLE): Move to middle-end.
2044 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
2045 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
2046 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
2047 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
2048 parms and outer BLOCK. note_deferral_of_defined_inline_function.
2050 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
2053 2001-02-19 Mark Mitchell <mark@codesourcery.com>
2055 * decl2.c (set_decl_namespace): Allow explicit instantiations in
2058 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2060 * optimize.c (expand_call_inline): Don't walk subtrees of type
2063 2001-02-18 Mark Mitchell <mark@codesourcery.com>
2065 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
2068 2001-02-18 Jason Merrill <jason@redhat.com>
2070 Do put the VTT parameter in DECL_ARGUMENTS.
2071 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
2072 (current_vtt_parm): New macro.
2073 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
2074 (DECL_HAS_VTT_PARM_P): New macro.
2075 (DECL_VTT_PARM): Remove.
2076 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
2077 * decl.c (duplicate_decls): Only copy the operator code if
2079 (start_function): Set current_vtt_parm.
2080 (lang_mark_tree): Don't mark vtt_parm.
2081 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
2082 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
2083 * class.c (build_clone): Maybe remove the VTT parm.
2084 * optimize.c (maybe_clone_body): Set up the VTT parm.
2085 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
2086 * call.c (build_over_call): Just allow the VTT arg.
2087 * method.c (make_thunk): Don't set DECL_VTT_PARM.
2088 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
2089 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
2090 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
2091 * error.c (dump_function_decl): Likewise.
2092 * call.c (build_user_type_conversion_1, convert_like_real): Abort
2093 if we try to call a constructor with in-charge or VTT parms.
2094 * method.c (skip_artificial_parms_for): New fn.
2095 * call.c (add_function_candidate, build_over_call): Call it.
2096 * call.c (build_new_method_call): Use current_vtt_parm.
2097 * init.c (expand_virtual_init): Likewise.
2098 * class.c (same_signature_p): No longer static.
2099 * cp-tree.h: Declare it.
2100 * search.c (look_for_overrides_r): Use it.
2102 2001-02-17 Mark Mitchell <mark@codesourcery.com>
2104 * cp-tree.h (new_abi_rtti_p): Remove.
2105 (name_mangling_version): Likewise.
2106 (flag_do_squangling): Likewise.
2107 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
2108 * decl.c (grokfndecl): Likewise.
2109 * decl2.c (name_mangling_version): Remove.
2110 (flag_do_squangling): Likewise.
2111 (lang_f_options): Remove `squangle'.
2112 (unsupported_options): Add `squangle'.
2113 (cxx_decode_option): Issue a warning about uses of
2114 -fname-mangling-version.
2115 (finish_file): Remove old ABI support.
2116 * pt.c (check_explicit_specialization): Likewise.
2117 (tsubst_decl): Likewise.
2118 * rtti.c (init_rtti_processing): Likewise.
2119 (build_headof): Likewise.
2120 (get_tinfo_decl_dynamic): Likewise.
2121 (tinfo_from_decl): Likewise.
2122 (build_dynamic_cast_1): Likewise.
2123 (synthesize_tinfo_var): Likewise.
2124 * init.c (build_new): Allow enumeration types for the array-bounds
2125 in a direct-new-declarator.
2127 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
2129 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
2130 TREE_PROTECTED from the template being specialized.
2132 2001-02-17 Jason Merrill <jason@redhat.com>
2134 * decl2.c (build_artificial_parm): Set TREE_READONLY.
2136 * decl.c (bad_specifiers): Allow throw specs on things with
2137 pointer-to-function or -member-function type.
2138 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
2141 2001-02-17 Mark Mitchell <mark@codesourcery.com>
2143 * call.c (check_dtor_name): Handle template names correctly.
2145 2001-02-16 Jason Merrill <jason@redhat.com>
2147 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
2148 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
2149 * optimize.c (maybe_clone_body): Don't substitute it.
2150 * call.c (build_new_method_call): Check in_chrg instead.
2151 * init.c (expand_virtual_init): Likewise.
2153 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
2155 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
2156 class-type introduces at least a type-name.
2158 2001-02-16 Jakub Jelinek <jakub@redhat.com>
2160 * call.c (convert_like_real): Create a temporary for non-lvalue.
2162 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
2164 * cp-tree.h: Fix typos in comments.
2166 2001-02-16 Jason Merrill <jason@redhat.com>
2168 * optimize.c (remap_block): If we're compiling a clone, pass the
2169 new block to insert_block.
2171 2001-02-16 Mark Mitchell <mark@codesourcery.com>
2173 * semantics.c (finish_asm_stmt): Robustify.
2175 2001-02-15 Mark Mitchell <mark@codesourcery.com>
2177 * pt.c (push_template_decl_real): Don't remangle the name of a
2180 2001-02-15 Jim Meyering <meyering@lucent.com>
2182 * Make-lang.in (c++.install-common): Depend on installdirs.
2183 (c++.install-info): Likewise.
2184 (c++.install-man): Likewise.
2186 2001-02-15 Mark Mitchell <mark@codesourcery.com>
2188 * typeck2.c (build_m_component_ref): Robustify.
2190 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
2192 * friend.c (do_friend): Don't take the nested [template] class
2193 into account when deciding whether to warn about the friend
2194 function not referring to a template function.
2196 2001-02-14 Jakub Jelinek <jakub@redhat.com>
2198 * typeck.c (build_unary_op): Clarify error message.
2200 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
2202 * parse.y (component_constructor_declarator): allow optional
2203 parentheses around constructor class name.
2205 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
2207 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
2209 * init.c (emit_base_init): Remove incorrect comment about
2211 * method.c (make_thunk): Fix comment alignment.
2213 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
2215 Kill remnants of this is variable.
2216 * cp-tree.h (flag_this_is_variable): Remove.
2217 * decl2.c (flag_this_is_variable): Remove.
2218 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
2219 (build_vbase_path): The path is non-static, even in a cdtor.
2220 (resolves_to_fixed_type_p): Add additional return value.
2221 * search.c (init_vbase_pointers): Adjust.
2222 * tree.c (lvalue_p_1): Adjust.
2223 * typeck.c (mark_addressable): Adjust.
2225 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
2227 * pt.c (unify): Don't check cv quals of array types.
2229 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
2231 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
2232 check whether we already have the type.
2234 2001-02-13 Mark Mitchell <mark@codesourcery.com>
2236 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
2237 * call.c (build_op_delete_call): Simplify to remove duplicate
2239 * class.c (clone_function_decl): Don't build the deleting variant
2240 of a non-virtual destructor.
2241 * decl.c (finish_destructor_body): Don't call delete if this is a
2242 non-virtual destructor.
2243 * init.c (build_delete): Explicitly call `operator delete' when
2244 deleting an object with a non-virtual destructor.
2246 2001-02-13 Jason Merrill <jason@redhat.com>
2248 * lang-specs.h: Add more __EXCEPTIONS.
2250 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
2252 * typeck2.c (process_init_constructor): Check
2253 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
2255 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
2257 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
2258 Remove spurious information in comment. Allow further
2259 adjustments of REFERENCE_TYPE args.
2261 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
2263 * errfn.c (cp_deprecated): Tweak diagnostic text.
2264 * parse.y (new_initializer): Deprecate initializer lists
2267 2001-02-12 Mark Mitchell <mark@codesourcery.com>
2269 Remove old ABI support.
2271 2001-02-11 Mark Mitchell <mark@codesourcery.com>
2273 * decl2.c (flag_vtable_thunks): Always set it to 1.
2274 (flag_new_abi): Likewise.
2275 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
2277 * Makefile.in (g++spec.o): Fix typo.
2279 2001-02-09 Jason Merrill <jason@redhat.com>
2281 * lang-specs.h: Restore definition of __EXCEPTIONS.
2283 2001-02-08 Jason Merrill <jason@redhat.com>
2285 * search.c (shared_member_p): New function.
2286 (lookup_field_r): Use it.
2287 * cp-tree.h (SHARED_MEMBER_P): Remove.
2289 * method.c (process_overload_item): Handle template-dependent array
2291 * pt.c (type_unification_real): If we end up with undeduced nontype
2294 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
2297 * typeck2.c (friendly_abort): Don't say anything if we have
2298 earlier errors or sorries.
2300 * decl.c (check_tag_decl): Notice attempts to redefine bool and
2301 wchar_t. Ignore if in_system_header.
2303 * decl.c (maybe_push_cleanup_level): New fn...
2304 (start_decl_1): ...split out from here.
2305 * cvt.c (build_up_reference): Use it.
2306 * cp-tree.h: Declare it.
2308 2001-02-07 Mark Mitchell <mark@codesourcery.com>
2310 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
2313 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
2315 * pt.c (lookup_template_class): Make sure it's a primary
2316 template or template_template_parm when called from the parser.
2317 (instantiate_template_class): Add assertion.
2319 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
2321 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
2322 from error_mark_node.
2324 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
2326 Fix specification and implementation bugs in V3 ABI
2327 construction vtables.
2328 * cp-tree.h (flag_dump_class_layout): New flag.
2329 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
2330 (BINFO_LOST_PRIMARY_P): New flag.
2331 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
2332 (BINFO_PRIMARY_MARKED_P): Rename to ...
2333 (BINFO_PRIMARY_P): ... here.
2334 (binfo_via_virtual): New prototype.
2335 * decl2.c (flag_dump_class_layout): New flag.
2336 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
2337 use `=' as a file name separator.
2338 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
2340 (build_vtbl_address): If this is a virtual primary base, then
2341 get the vtbl of what it is ultimately primary for.
2342 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
2343 for BINFO_PRIMARY_P.
2344 (dfs_skip_nonprimary_vbases_markedp): Likewise.
2345 (get_shared_vbase_if_not_primary): Likewise.
2346 (dfs_get_pure_virtuals): Likewise.
2347 (expand_upcast_fixups): Likewise.
2348 (fixup_virtual_upcast_offsets): Likewise.
2349 (dfs_find_vbase_instance): Likewise.
2350 (find_vbase_instance): Likewise.
2351 (binfo_from_vbase): Adjust comment to reflect reality.
2352 (binfo_via_virtual): New function.
2353 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
2354 for binfo walking during VTT construction.
2355 (dfs_mark_primary_bases): Remove.
2356 (force_canonical_binfo_r): New function.
2357 (force_canonical_binfo): New function.
2358 (mark_primary_virtual_base): New function.
2359 (mark_primary_bases): Walk in inheritance graph order, use
2360 mark_primary_virtual_base.
2361 (determine_primary_base): Use some more intermediate variables.
2362 (dfs_find_final_overrider): Don't check for overriding along a
2364 (dfs_modify_vtables): Walk into primary virtual bases too.
2365 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
2366 (build_base_fields): Likewise.
2367 (dfs_set_offset_for_unshared_vbases): Likewise.
2368 (layout_virtual_bases): Likewise.
2369 (end_of_class): Likewise.
2370 (finish_struct_1): Call dump_class_hierarchy, if requested.
2371 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
2372 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
2373 (dump_class_hierarchy): Add file parameter. Append to file, if
2375 (finish_vtbls): Adjust accumulate_vtbl_inits call.
2376 Use canonical base for virtual bases.
2377 (build_vtt): Add more comments. Adjust build_vtt_inits call.
2378 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
2379 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
2380 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
2382 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
2383 from DATA. We want virtual primary bases and all bases via virtual.
2384 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
2385 virtual base when not a construction vtable.
2386 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
2387 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
2388 Use canonical bases when processing virtual bases.
2389 (accumulate_vtbl_inits): We're interested in any base via a
2391 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
2392 within a construction vtable, determine what is being overridden.
2393 (build_vtbl_initializer): Add more comments
2394 (add_vcall_offset_vtbl_entries_1): Adjust comment.
2395 (build_rtti_vtbl_entries): Check if the base has lost its
2398 2001-02-05 Mark Mitchell <mark@codesourcery.com>
2400 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
2402 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2404 * decl.c (pushdecl): Call abort instead of fatal.
2405 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
2406 * init.c (build_new_1): Likewise.
2407 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
2408 * decl.c (build_typename_type): hash_table_init now returns void.
2409 decl.c (init_decl_processing): Make an error non-fatal.
2411 2001-02-04 Mark Mitchell <mark@codesourcery.com>
2413 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
2415 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2416 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2417 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2418 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2419 * decl.c (maybe_commonize_var): Use the new name-mangling where
2421 * decl2.c (comdat_linkage): Enhance comments. Make all
2422 compiler-generated things static, if COMDAT is not available.
2423 (get_tinfo_decl): Do not make typeinfo objects that belong in the
2425 (tinfo_base_init): Use the correct mangled name for typeinfo
2426 strings, and push them into the global scope.
2427 (typeinfo_in_lib_p): New function.
2428 (synthesize_tinfo_var): Use it.
2429 (create_real_tinfo_var): Likewise.
2431 2001-02-03 Jakub Jelinek <jakub@redhat.com>
2433 * decl.c (push_class_binding): Use context_for_name_lookup instead
2435 * search.c (context_for_name_lookup): Remove static. Check for NULL
2436 context in the loop.
2437 * cp-tree.h (context_for_name_lookup): Add prototype.
2439 2001-02-02 Jakub Jelinek <jakub@redhat.com>
2441 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
2442 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
2444 * call.c (convert_class_to_reference, build_user_type_conversion_1,
2445 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
2447 2001-02-02 Mark Mitchell <mark@codesourcery.com>
2449 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
2450 of macros used when compiling g++spec.c.
2451 * g++spec.c (lang_specific_driver): Link with the shared
2454 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
2456 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
2457 make_reference_declarator, make_call_declarator), method.c
2458 (implicitly_declare_fn), parse.y (namespace_using_decl,
2459 notype_unqualified_id, expr_or_declarator, new_type_id,
2460 after_type_declarator, direct_after_type_declarator,
2461 notype_declarator, complex_notype_declarator,
2462 complex_direct_notype_declarator, qualified_id,
2463 notype_qualified_id, overqualified_id, direct_new_declarator,
2464 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
2465 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
2466 instead of build_parse_node.
2468 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2470 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
2471 (minus_one_node): Moved to top level gcc directory. Renamed
2472 to integer_minus_one_node.
2474 * init.c (init_init_processing): Don't set minus_one_node.
2475 (build_vec_init): Use integer_minus_one_node.
2477 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2479 2001-01-28 Jakub Jelinek <jakub@redhat.com>
2481 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
2482 identical and they would be replaced with constant, remove
2483 MODIFY_EXPR from the tree.
2485 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2487 * Make-lang.in: Remove all dependencies on defaults.h.
2488 * call.c: Don't include defaults.h.
2490 * decl2.c: Likewise.
2491 * except.c: Likewise.
2495 * typeck.c: Likewise.
2497 2001-01-25 Jakub Jelinek <jakub@redhat.com>
2499 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
2500 operators even in "C" linkage.
2501 * method.c (set_mangled_name_for_decl): Likewise.
2502 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
2503 overloaded operators in "C" linkage.
2505 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
2507 * pt.c (tsubst_decl): Remove IN_DECL parameter.
2508 (tsubst_arg_types): Check parameter is not void.
2509 (tsubst): Adjust tsubst_decl call.
2511 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
2513 * call.c (add_builtin_candidate): Quote std properly, from
2516 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2518 * pt.c (check_explicit_specialization): Clone constructors and
2521 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
2523 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
2524 indicates anything special about template depth. Make sure we
2525 only count the user visible template classes.
2527 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
2529 * call.c (build_conv): Typo in comment.
2530 (add_builtin_candidate): Add more explanation.
2531 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
2532 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
2533 when we have enumeral types.
2534 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
2535 candidates for relops and eqops.
2536 (joust): Simplify control flow. Allow a non-template user
2537 function to hide a builtin.
2539 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
2541 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
2542 (more_specialized): Add deduction parameter.
2543 * call.c (joust): Adjust more_specialized call.
2544 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
2545 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
2546 (get_bindings_order): Remove.
2547 (get_bindings_real): Add DEDUCE parameter.
2548 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
2549 REFERENCE_TYPE jig for DEDUCE_ORDER.
2550 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
2551 maybe_adjust_types_for_deduction.
2552 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
2554 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
2555 (check_cv_quals_for_unify): Use new unify qualifier flags.
2556 (unify): Clear new unify qualifier flags.
2557 (get_bindings_real): Add DEDUCE parameter.
2558 (get_bindings): Adjust call to get_bindings_real.
2559 (get_bindings_overload): Likewise.
2560 (most_specialized_instantiation): Adjust call to
2563 2001-01-19 Jason Merrill <jason@redhat.com>
2565 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
2567 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
2570 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
2572 * decl2.c (arg_assoc_class): Fix double iteration logic.
2574 2001-01-19 Jason Merrill <jason@redhat.com>
2576 * init.c (build_delete): Always call convert_force to strip cv-quals.
2578 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
2579 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
2580 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
2582 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2584 * search.c (get_vbase_1): Count only virtual bases.
2586 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2588 * class.c (duplicate_tag_error): Robustify flag clearing.
2590 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2592 * cp-tree.h (lookup_template_class): Add complain parm.
2593 * decl.c (lookup_namespace_name): Adjust call to
2594 lookup_template_class.
2595 (make_typename_type): Likewise.
2596 * semantics.c (finish_template_type): Likewise.
2597 * pt.c (lookup_template_class): Add complain parm. Adjust.
2598 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
2601 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2603 * pt.c (copy_default_args_to_explicit_spec): Preserve
2604 object's CV quals. Reorganize.
2606 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2608 * typeck.c (build_modify_expr): Say `initialization' for
2610 * init.c (build_default_init): Convert to enumeral type, if
2613 2001-01-18 Jakub Jelinek <jakub@redhat.com>
2615 * parse.y (nomods_initdcl0): Properly set things up for
2618 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2620 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
2621 (type_unification_real): Set it.
2624 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2626 * decl.c (finish_destructor_body): Convert to vbase pointer here.
2628 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2630 * semantics.c (begin_class_definition): Check we're not inside a
2633 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2635 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
2638 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2640 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
2641 * call.c (build_over_call): Add comment.
2643 2001-01-16 Daniel Berlin <dberlin@redhat.com>
2645 * cvt.c (ocp_convert): Handle vector type conversion
2646 * typeck2.c (digest_init): Handle vector type initializations
2648 2001-01-16 Phil Edwards <pme@sources.redhat.com>
2650 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
2653 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
2655 * pt.c (check_nontype_parm): Rename to ...
2656 (invalid_nontype_parm_type_p): ... here.
2657 (process_template_parm): Adjust.
2658 (convert_template_argument): Adjust.
2660 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
2662 * pt.c (check_nontype_parm): New function.
2663 (process_template_parm): Use it.
2664 (convert_template_argument): Use it.
2665 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
2668 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
2670 * tree.c: Add defaults.h
2671 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
2672 * Make-lang.in (cp/tree.o): Add defaults.h.
2674 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2676 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
2678 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2680 * g++.1: Change to be ".so man1/gcc.1".
2682 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2684 * Make-lang.in (c++.info, c++.install-info): Build and install g++
2686 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
2687 ($(srcdir)/cp/g++int.info): New target.
2688 * gxxint.texi: Add info directory entry. Use @@ in email address.
2689 * .cvsignore: Update.
2691 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
2693 * typeck.c (build_c_cast): Do template processing earlier.
2694 Always pedwarn on array casts.
2696 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
2698 * friend.c (make_friend_class): Make sure a templated class is
2699 actually a template.
2701 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2703 * decl2.c (get_guard): Set linkage from guarded decl.
2705 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2707 * call.c (convert_default_arg): Check for unprocessed
2709 * cp-tree.h (replace_defarg): Move to spew.c.
2710 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
2711 spew.c, which is where they really are.
2712 (done_pending_defargs): Declare.
2713 (unprocessed_defarg_fn): Declare.
2714 * decl.c (replace_defarg): Move to spew.c
2715 * parse.y (structsp): Call done_pending_defargs.
2716 * spew.c (defarg_fns): Rearrange list structure.
2717 (defarg_fnsdone): New static variable.
2718 (defarg_depfns): New static variable.
2719 (init_spew): Adjust.
2720 (add_defarg_fn): Store the type in TREE_TYPE.
2721 (do_pending_defargs): Detect and deal with ordering constraints
2723 (done_pending_defargs): New function.
2724 (unprocessed_defarg_fn): New function.
2725 (replace_defarg): Moved from decl.c. Robustify. Don't save
2726 if circularity detected.
2728 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2730 * pt.c (unify): Check array has a domain, before checking
2731 whether it is variable sized.
2733 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2735 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
2736 parameters with pointers to arrays of unknown bound.
2738 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2740 * parse.y (template_parm_header, template_spec_header): New
2741 reductions. Split out from ...
2742 (template_header): ... here. Use them.
2743 (template_template_parm): Use template_parm_header.
2744 * semantics.c (finish_template_template_parm): Add assert.
2746 2001-01-10 Mark Mitchell <mark@codesourcery.com>
2748 * mangle.c (write_builtin_type): Fix thinko.
2750 * pt.c (copy_default_args_to_explicit_spec_1): New function.
2751 (copy_default_args_to_explicit_spec): Likewise.
2752 (check_explicit_specialization): Use it.
2754 * class.c (finish_struct_1): Remove last argument in call to
2755 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
2756 * decl.c (builtin_function): Likewise.
2757 (build_cp_library_fn): Likewise.
2758 (check_initializer): Likewise.
2759 (make_rtl_for_nonlocal_decl): Likewise.
2760 (cp_finish_decl): Likewise.
2761 (start_function): Likewise.
2762 * decl2.c (finish_anon_union): Likewise.
2763 * friend.c (do_friend): Likewise.
2764 * init.c (build_java_class_ref): Likewise.
2765 * method.c (make_thunk): Likewise.
2766 * pt.c (tsubst_friend_function): Likewise.
2767 * semantics.c (expand_body): Likewise.
2769 2001-01-10 Mark Mitchell <mark@codesourcery.com>
2771 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
2772 looking at DECL_CLONED_FUNCTION for non-functions.
2774 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2776 * error.c (dump_template_parameter): Use parm to determine how
2777 to print default value.
2779 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2781 * class.c (duplicate_tag_error): Clear more flags.
2783 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2785 * call.c (build_new_method_call): Use binfo_for_vbase.
2787 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
2789 * cp-tree.h (flag_cond_mismatch): Don't declare.
2790 * decl2.c (flag_cond_mismatch): Don't define.
2791 (lang_f_options): Remove cond-mismatch.
2792 (unsupported_options): Add cond-mismatch.
2794 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
2796 * class.c (handle_using_decl): Reject using of constructor name
2797 of sourcing class. Allow injecting of a method with same name as
2798 nested class. Fixup error messages.
2800 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
2802 * decl2.c (lang_decode_option): Handle -Wformat=2.
2804 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2806 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
2807 initialized_in_class.
2808 (DECL_DEFINED_IN_CLASS_P): Rename to ...
2809 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
2810 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
2811 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
2812 * pt.c (check_default_tmpl_args): Adjust for
2813 DECL_INITIALIZED_IN_CLASS_P.
2814 (instantiate_class_template): Likewise.
2815 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
2817 * class.c (finish_struct): Constify saved_filename.
2819 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2821 * class.c (duplicate_tag_error): Adjust diagnostic.
2822 (finish_struct): Locally set location to start of struct.
2823 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
2825 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2827 * decl.c (struct binding_level): Adjust class_shadowed comments
2829 (push_class_level_binding): Ajust comments to reflect reality.
2830 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
2831 Don't set TREE_VALUE on the class_shadowed list.
2833 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
2835 * decl2.c (acceptable_java_type): Allow references too.
2836 * init.c (build_java_class_ref): When using the new ABI, search
2837 `class$' and have it mangled with `mangle_decl.'
2838 * mangle.c (write_java_integer_type_codes): New function.
2839 (write_builtin_type): Detect and mangle Java integer and real
2842 2001-01-07 Mark Mitchell <mark@codesourcery.com>
2844 * decl2.c (grokfield): Don't accept `asm' specifiers for
2845 non-static data members.
2847 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2849 * expr.c (cplus_expand_expr): Don't reset `target'.
2851 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
2853 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
2855 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
2857 * parse.y (template_datadef): Check for error_mark_node.
2859 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
2861 * cp-tree.def (DEFAULT_ARG): Make `x' class.
2863 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
2865 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
2866 (record_builtin_type): Make non-static.
2867 (flag_short_double): Don't declare.
2868 (init_decl_processing): Remove the creation of many tree nodes now
2869 in c_common_nodes_and_builtins.
2870 (build_void_list_node): New function.
2871 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
2872 * cp-tree.h (flag_short_wchar): Don't declare.
2874 2001-01-04 Mark Mitchell <mark@codesourcery.com>
2876 * call.c (build_conv): Don't use build1 for USER_CONV.
2877 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
2879 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
2881 * lex.c (lang_init): Call c_common_lang_init.
2883 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
2885 * search.c (lookup_fnfields_here): Remove.
2886 (look_for_overrides_r): Use lookup_fnfields_1.
2887 Ignore functions from using declarations.
2889 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
2891 Implement exceptions specifiers for implicit member functions.
2892 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
2893 * method.c (synthesize_exception_spec): New function.
2894 (locate_dtor, locate_ctor, locate_copy): New functions.
2895 (implicitly_declare_fn): Generate the exception spec too.
2896 * search.c (check_final_overrider): Check artificial functions
2898 * typeck2.c (merge_exception_specifiers): New function.
2900 2001-01-03 Jason Merrill <jason@redhat.com>
2902 * init.c (build_default_init): New fn.
2903 (perform_member_init): Split out from here.
2904 (build_new_1): Use it. Simplify initialization logic.
2905 (build_vec_init): Take an array, rather than a pointer and maxindex.
2906 Speed up simple initializations. Don't clean up if we're assigning.
2907 * cp-tree.h: Adjust.
2908 * decl2.c (do_static_initialization): Remove TREE_VEC case.
2909 * parse.y (new_initializer): Return void_zero_node for ().
2910 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
2911 * typeck2.c (digest_init): Only complain about user-written
2914 2000-12-22 Mike Stump <mrs@wrs.com>
2916 * decl2.c: (max_tinst_depth): Increase to 50.
2918 2001-01-02 Mark Mitchell <mark@codesourcery.com>
2920 * class.c (invalidate_class_lookup_cache): Zero the
2921 previous_class_values.
2922 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
2924 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
2925 * decl.c (free_bindings): New variable.
2926 (push_binding): Don't create a new binding if we have one on the
2928 (pop_binding): Put old bindings on the free list.
2929 (init_decl_processing): Use size_int, not build_int_2.
2930 Register free_bindings as a GC root.
2931 (cp_make_fname_decl): Use size_int, not build_int_2.
2932 (push_inline_template_parms_recursive): Likewise.
2933 (end_template_parm_list): Likewise.
2934 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
2935 (tsubst_template_parms): Use size_int, not build_int_2.
2937 * rtti.c (get_vmi_pseudo_type_info): Likewise.
2939 2001-01-02 Richard Henderson <rth@redhat.com>
2941 * parse.y (asm): Set ASM_INPUT_P.
2943 2001-01-02 Jason Merrill <jason@redhat.com>
2945 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
2948 * typeck.c (cp_truthvalue_conversion): New fn.
2949 * cvt.c (ocp_convert): Use it.
2951 * cp-tree.h: Lose c-common.c decls.
2953 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
2954 * cvt.c (convert_to_void): Use type_unknown_p.
2956 * typeck.c (strip_all_pointer_quals): Also strip quals from
2957 pointer-to-member types.
2959 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
2962 * call.c (build_new_method_call): Do evaluate the object parameter
2963 when accessing a static member.
2964 * typeck.c (build_component_ref): Likewise.
2966 2001-01-02 Andreas Jaeger <aj@suse.de>
2968 * decl.c (cp_missing_noreturn_ok_p): New.
2969 (init_decl_processing): Set lang_missing_noreturn_ok_p.
2971 2000-12-29 Jakub Jelinek <jakub@redhat.com>
2973 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
2975 2000-12-29 Mark Mitchell <mark@codesourcery.com>
2977 * class.c (pushclass): Remove #if 0'd code.
2978 * cp-tree.h (overload_template_name): Remove.
2979 * decl.c (store_bindings): Simplify.
2980 (pop_from_top_level): Likewise.
2981 * pt.c (overload_template_name): Remove.
2982 (instantiate_decl): Don't call push_to_top_level if it's not
2985 2000-12-28 Mark Mitchell <mark@codesourcery.com>
2987 * pt.c (register_local_specialization): Don't return a value.
2988 (lookup_template_class): Use move-to-front heuristic when looking
2989 up template instantiations.
2990 (instantiate_decl): Only push_to_top_level when we're actually
2991 going to instantiate the template.
2993 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
2995 * search.c (binfo_for_vtable): Return least derived class, not
2996 most. Handle secondary vtables.
2998 2000-12-22 Jason Merrill <jason@redhat.com>
3000 * pt.c (more_specialized): Don't optimize len==0.
3001 (fn_type_unification): If we're adding the return type, increase len.
3003 * typeck.c (build_binary_op): Fix pmf comparison logic.
3005 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
3006 DECL_STATIC_FUNCTION_P.
3008 * semantics.c (genrtl_finish_function): Don't try to jump to
3009 return_label unless it exists.
3011 In partial ordering for a call, ignore parms for which we don't have
3013 * call.c (joust): Pass len to more_specialized.
3014 (add_template_candidate_real): Strip 'this', pass len.
3015 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
3016 (get_bindings_order): New fn. Pass len down.
3017 (get_bindings_real): Strip 'this', pass len.
3018 (fn_type_unification): Likewise.
3019 (type_unification_real): Succeed after checking 'len' args.
3020 (most_specialized_instantiation): Lose explicit_args parm.
3021 * class.c (resolve_address_of_overloaded_function): Strip 'this',
3024 2000-12-21 Jason Merrill <jason@redhat.com>
3026 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
3027 DECL_TEMPLATE_RESULT.
3029 * search.c (lookup_field_r): Call lookup_fnfields_1, not
3030 lookup_fnfields_here.
3032 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
3034 * call.c (build_object_call): Also allow conversions that return
3035 reference to pointer to function.
3036 (add_conv_candidate): Handle totype being ref to ptr to fn.
3037 (build_field_call): Also allow members of type reference to function.
3038 Lose support for calling pointer to METHOD_TYPE fields.
3040 * error.c (dump_expr): Handle *_CAST_EXPR.
3042 * typeck2.c (build_scoped_ref): Always convert to the naming class.
3044 * tree.c (break_out_cleanups): Lose.
3045 * cp-tree.h: Remove prototype.
3046 * typeck.c (build_component_ref): Don't break_out_cleanups.
3047 (build_compound_expr): Likewise.
3048 * semantics.c (finish_expr_stmt): Likewise.
3050 2000-12-20 Richard Henderson <rth@redhat.com>
3052 * cp-tree.h: Update declarations.
3053 * decl.c (finish_case_label): Return the new stmt node.
3054 * semantics.c (finish_goto_stmt): Likewise.
3055 (finish_expr_stmt, finish_return_stmt): Likewise.
3056 (finish_break_stmt, finish_continue_stmt): Likewise.
3057 (finish_asm_stmt): Likewise.
3058 * parse.y (already_scoped_stmt): Set STMT_LINENO.
3059 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
3060 (simple_if, simple_stmt): Return the new stmt node.
3063 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
3065 * cp-tree.h: Don't declare warn_long_long.
3067 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3069 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
3072 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3074 * pt.c (unify): Handle when both ARG and PARM are
3075 BOUND_TEMPLATE_TEMPLATE_PARM.
3077 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3079 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
3080 DECL_TEMPLATE_PARM_P.
3082 2000-12-15 Jason Merrill <jason@redhat.com>
3084 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
3086 * init.c (build_new_1): Don't strip quals from type.
3088 * decl.c (pushdecl): Don't check for linkage on a non-decl.
3090 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
3092 * call.c (build_new_function_call): Lose space before paren in
3094 (build_new_method_call): Likewise.
3096 * typeck2.c (build_m_component_ref): Propagate quals from datum.
3098 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3100 * pt.c (check_explicit_specialization): Propagate default
3101 function arguments to explicit specializations.
3103 2000-12-13 DJ Delorie <dj@redhat.com>
3105 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
3108 2000-12-08 Jason Merrill <jason@redhat.com>
3110 * error.c (dump_function_name): Don't let the user see __comp_ctor.
3112 Clean up copy-initialization in overloading code.
3113 * call.c (build_user_type_conversion_1): Die if we are asked to
3114 convert to the same or a base type.
3115 (implicit_conversion): Avoid doing so. Lose reference binding code.
3116 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
3117 direct-initialization. Also do direct-init part of copy-init.
3118 (build_user_type_conversion): Don't provide context to convert_like.
3119 * cvt.c (ocp_convert): build_user_type_conversion will now provide
3120 the constructor call for copy-init.
3122 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
3123 instantiation of a member template.
3124 (do_decl_instantiation): Not here.
3126 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
3128 * class.c (check_field_decls): Don't special case anonymous
3129 fields in error messages.
3130 (note_name_declared_in_class): Use %D on diagnostic.
3132 * tree.c (pod_type_p): Use strip_array_types.
3133 (cp_valid_lang_attribute): Likewise.
3134 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
3135 multiple evaluations.
3136 (cp_has_mutable_p): Use strip_array_types.
3138 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
3140 * cp-tree.h (sufficient_parms_p): Declare new function.
3141 * call.c (sufficient_parms_p): New function, broken out of ...
3142 (add_function_candidate): ... here. Use it.
3143 (add_conv_candidate): Use it.
3144 * decl.c (grok_ctor_properties): Use it.
3146 2000-12-07 Jakub Jelinek <jakub@redhat.com>
3148 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
3150 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
3152 * decl2.c (lang_decode_option): Handle -Wformat-security.
3154 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3156 * pt.c (verify_class_unification): New function.
3157 (get_class_bindings): Use it.
3158 (try_class_unification): Tidy.
3159 (unify): Handle when argument of a template-id is not
3160 template parameter dependent.
3161 (template_args_equal): Handle when TREE_CODE's do not match.
3163 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
3165 * lang-specs.h (c++): When invoking the stand-alone preprocessor
3166 for -save-temps, pass all relevant -Defines to it, and then don't
3167 pass them to cc1plus.
3169 2000-12-05 Will Cohen <wcohen@redhat.com>
3171 * decl.c (finish_case_label): Cleared
3172 more_cleanups_ok in surrounding function scopes.
3173 (define_label): Likewise.
3175 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
3177 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
3178 (get_matching_virtual): Remove.
3179 (look_for_overrides): Declare new function.
3180 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
3182 * class.c (check_for_override): Move base class iteration code
3183 to look_for_overrides.
3184 * search.c (next_baselink): Remove.
3185 (get_virtuals_named_this): Remove.
3186 (get_virtual_destructor): Remove.
3187 (tree_has_any_destructors_p): Remove.
3188 (struct gvnt_info): Remove.
3189 (check_final_overrider): Remove `virtual' from error messages.
3190 (get_matching_virtuals): Remove. Move functionality to ...
3191 (look_for_overrides): ... here, and ...
3192 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
3195 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
3197 * typeck.c (get_delta_difference): If via a virtual base,
3199 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
3202 2000-12-04 Richard Henderson <rth@redhat.com>
3204 * error.c (dump_tree): Use output_add_string not OB_PUTS.
3206 2000-12-04 Jason Merrill <jason@redhat.com>
3208 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
3209 (write_builtin_type): Pass intSI_type_node and the like through
3211 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
3212 Pass intSI_type_node and the like through type_for_mode.
3213 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
3214 * pt.c (tsubst, unify): Likewise.
3215 * tree.c (walk_tree): Likewise.
3216 * error.c (dump_type): Likewise.
3217 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
3219 * Make-lang.in: Tweak top comment for emacs.
3222 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
3224 * class.c (clone_function_decl): Robustify.
3226 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
3228 * decl.c (store_bindings): Only search in the non modified
3229 old_bindings for duplicates.
3231 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
3233 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
3236 * typeck.c (build_static_cast): Remove unused variable.
3238 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3240 * pt.c: Fix typo in comment.
3242 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
3244 * decl2.c (warn_format): Remove definition.
3245 (lang_decode_option): Handle -Wformat-nonliteral,
3246 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
3248 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
3250 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
3251 (init_decl_processing): Don't create string_type_node,
3252 const_string_type_node, wint_type_node, intmax_type_node,
3253 uintmax_type_node, default_function_type, ptrdiff_type_node and
3254 unsigned_ptrdiff_type_node. Adjust position of call to
3255 c_common_nodes_and_builtins.
3256 (identifier_global_value): New function.
3258 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
3260 * call.c (standard_conversion): Reject pointer to member
3261 conversions from ambiguous, inaccessible or virtual bases.
3262 * typeck.c (build_static_cast): Don't check pointers to members
3265 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3267 * method.c (do_build_copy_constructor): Preserve cv
3268 qualifications when accessing source object members.
3269 (do_build_assign_ref): Likewise. Remove separate diagnostics for
3272 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3274 * method.c (do_build_assign_ref): Construct appropriately
3275 CV-qualified base reference. Don't allow const casts in base
3278 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3280 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
3281 incomplete return type.
3283 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3285 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
3286 * semantics.c (finish_base_specifier): Accept a _TYPE not a
3289 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3291 * spew.c (yyerror): Cope if yylval.ttype is NULL.
3293 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3295 * decl.c (grokdeclarator): Diagnose undefined template contexts.
3297 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3299 * decl.c (grokdeclarator): Do type access control on friend
3302 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
3304 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
3305 bison parser ickiness.
3306 * pt.c (tsubst_friend_function): Enter namespace scope when
3307 tsubsting the function name.
3308 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
3310 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
3312 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
3313 * cvt.c (cp_convert_to_pointer): Add force parameter.
3314 Allow conversions via virtual base if forced.
3315 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
3316 (ocp_convert): Likewise.
3317 * search.c (binfo_from_vbase): Return the virtual base's binfo.
3318 * typeck.c (get_delta_difference): Adjust handling of virtual
3321 2000-11-26 Mark Mitchell <mark@codesourcery.com>
3323 * tree.c (struct list_hash): Remove.
3324 (list_hash_table): Make it be an htab.
3325 (struct list_proxy): New type.
3326 (list_hash_eq): New function.
3327 (list_hash_pieces): Renamed from ...
3328 (list_hash): ... this.
3329 (list_hash_lookup): Remove.
3330 (list_hash_add): Remove.
3331 (hash_tree_cons): Use the generic hashtable.
3332 (mark_list_hash): Remove.
3333 (init_tree): Create the hashtable.
3335 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
3337 * method.c (build_mangled_C9x_name): Rename to
3338 build_mangled_C99_name. Change C9X references in comments to
3341 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
3343 * parse.y (unary_expr): Move VA_ARG from here ...
3344 (primary): ... to here.
3346 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
3348 * semantics.c (finish_id_expr): If type is error_mark, return
3351 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
3353 * pt.c (lookup_template_class): Simplify loop exit constructs.
3354 Cope when there is no partial instantiation of a template
3357 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
3359 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
3361 2000-11-22 Mark Mitchell <mark@codesourcery.com>
3363 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
3366 * pt.c (do_decl_instantiate): Explicitly clone constructors and
3367 destructors that haven't already been cloned.
3369 2000-11-20 Richard Henderson <rth@redhat.com>
3371 * parse.y (yyparse_1): Rename the parser entry point.
3373 2000-11-20 Alex Samuel <samuel@codesourcery.com>
3375 * mangle.c (write_name): Use <unscoped-name> for names directly in
3377 (write_unscoped_name): Accept names directly in function scope.
3379 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
3381 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
3382 * parse.y (extdef): Add EXPORT reduction.
3383 * spew.c (yylex): Don't skip export here.
3385 2000-11-19 Mark Mitchell <mark@codesourcery.com>
3387 * decl.c (init_decl_processing): Correct name of pure virtual
3388 function under the new ABI.
3389 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
3390 (throw_bad_typeid): Likewise for bad typeid function.
3392 2000-11-18 Mark Mitchell <mark@codesourcery.com>
3394 * decl.c (grokparms): Don't even function types of `void' type,
3396 * mangle.c (write_type): Don't crash when confronted with the
3399 * decl.c (grokparms): Don't create parameters of `void' type.
3401 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
3403 * lex.c (mark_impl_file_chain): Delete.
3404 (init_parse): Remove call to ggc_add_string_root. No need to
3405 ggc_strdup a string constant. Do not add impl_file_chain to GC
3407 (handle_pragma_implementation): No need to ggc_strdup main_filename.
3409 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3411 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
3413 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3415 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
3416 * decl.c (grokdeclarator): Don't reject void parms here.
3417 (require_complete_types_for_parms): Simplify, use
3418 complete_type_or_else.
3419 (grokparms): Remove bitrot. Remove funcdef parm.
3420 Deal with ellipsis parm lists here.
3421 * semantics.c (finish_parmlist): Don't append void_list_node
3422 here. Set PARMLIST_ELLIPSIS_P.
3424 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3426 * typeck2.c (incomplete_type_error): Reorganise to avoid
3427 excessive diagnostics.
3429 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
3431 * lex.c (struct impl_files, internal_filename): Constify a char *.
3433 2000-11-16 Mark Mitchell <mark@codesourcery.com>
3435 * mangle.c (write_special_name_constructor): Don't generate
3436 assembler junk when confronted with an old-style constructor.
3437 (write_special_name_destructor): Likewise.
3438 (mangle_decl_string): Do it here instead.
3440 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
3442 * call.c (op_error): Make error messages clearer.
3444 2000-11-15 Mark Mitchell <mark@codesourcery.com>
3446 * decl.c (wrapup_globals_for_namespace): Don't mark things
3447 TREE_ASM_WRITTEN when they're not.
3449 2000-11-15 Jason Merrill <jason@redhat.com>
3451 * typeck2.c (friendly_abort): Uncount the error before handing
3454 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
3456 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
3458 2000-11-14 Mark Mitchell <mark@codesourcery.com>
3460 * class.c (build_vtbl_initializer): Fix typo in comment.
3461 * typeck.c (expr_sizeof): Don't crash on errors.
3463 2000-11-14 Jim Wilson <wilson@redhat.com>
3465 * lang-specs.h: Add %2 after %(cc1_options).
3467 2000-11-14 Richard Henderson <rth@redhat.com>
3469 * typeck.c (c_sizeof): Be strict about casting result value
3470 back to c_size_type_node.
3471 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
3473 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
3475 * typeck.c (build_unary_op): Use boolean_increment from
3476 c-common.c, moving the relevant code there.
3478 2000-11-11 Jason Merrill <jason@redhat.com>
3480 * typeck.c (mark_addressable): Don't call put_var_into_stack.
3482 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
3485 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3487 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
3488 * lex.c (copy_lang_decl): Likewise.
3490 2000-11-09 Mark Mitchell <mark@codesourcery.com>
3492 * dump.c (cp_dump_tree): Don't dump function bodies here.
3494 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3495 (dump.o): Update dependency list.
3496 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
3497 (flag_dump_translation_unit): Likewise.
3498 (CP_TYPE_QUALS): Adjust definition.
3499 (DECL_C_BIT_FIELD): Remove.
3500 (SET_DECL_C_BIT_FIELD): Likewise.
3501 (CLEAR_DECL_C_BIT_FIELD): Likewise.
3502 (add_maybe_template): Likewise.
3503 (strip_array_types): Likewise.
3504 (dump_node_to_file): Likewise.
3505 (cp_dump_tree): New function.
3506 * decl.c (init_decl_processing): Set lang_dump_tree.
3507 * decl2.c (flag_dump_translation_unit): Remove.
3508 * dump.c: Move most of it to ../c-dump.c.
3509 (cp_dump_tree): New function.
3510 * pt.c (add_maybe_template): Remove.
3511 * typeck.c (strip_array_types): Likewise.
3513 2000-11-07 Eric Christopher <echristo@redhat.com>
3515 * decl.c (init_decl_processing): Change definition of
3516 __wchar_t to wchar_t. Remove artificial declaration of
3518 * lex.c: Change instances of __wchar_t to wchar_t.
3520 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
3522 * lex.c (do_identifier): Don't lookup_name for operators.
3523 * parse.y (operator): Save looking_for_typename.
3524 (unoperator): Restore it.
3525 * spew.c (frob_opname): Use nth_token for lookahead.
3527 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
3529 * decl.c (grok_op_properties): Always use coerce_new_type and
3531 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
3532 exception specification. Tidy up.
3533 (coerce_delete_type): Preserve exception specification. Tidy up.
3535 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
3537 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
3538 (push_binding_level), error.c (cp_tree_printer), pt.c
3539 (process_partial_specialization, tsubst_template_arg_vector),
3540 search.c (lookup_member): Use memset () instead of bzero ().
3542 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
3544 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
3546 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
3548 * Make-lang.in (c++.distdir): Remove.
3550 2000-11-04 Mark Mitchell <mark@codesourcery.com>
3552 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
3553 declarations from different namespaces to be combined.
3555 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
3557 * decl.c: Include tm_p.h.
3559 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
3561 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
3563 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
3565 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
3566 (build_overload_value), repo.c (open_repo_file), xref.c
3567 (open_xref_file): Use strchr () and strrchr () instead of index ()
3570 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
3572 * call.c (build_over_call): Call fold on the CALL_EXPR.
3574 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
3576 * error.c (dump_template_decl): Separate template hearders with
3579 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
3581 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
3582 TS_* flags with corresponding TFF_*. Adjust prototypes of
3583 functions (which used to take a tree_string_flags) to take an int.
3585 * cp-tree.h (enum tree_string_flags): Remove
3586 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
3587 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
3588 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3589 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3590 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
3591 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
3592 (type_as_string, decl_as_string, expr_as_string,
3593 context_as_string): Adjust prototype.
3595 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
3596 instead of TS_PLAIN.
3598 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
3599 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
3602 2000-10-30 Mark Mitchell <mark@codesourcery.com>
3604 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
3605 (linkage_kind): New enumeration.
3606 (decl_linkage): New function.
3607 * decl2.c (comdat_linkage): Extend comment.
3608 * error.c (dump_function_decl): Print the arguments used to
3609 instantiate a template, even when not printing the type of the
3611 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
3612 not TREE_PUBLIC, to test for external linkage.
3613 * tree.c (decl_linkage): New function.
3615 2000-10-28 Mark Mitchell <mark@codesourcery.com>
3617 * pt.c (instantiate_decl): Always instantiate static data members
3618 initialized in-class.
3620 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
3622 * Make-lang.in: Move all build rules here from Makefile.in,
3623 adapt to new context. Wrap all rules that change the current
3624 directory in parentheses. Expunge all references to $(P).
3625 When one command depends on another and they're run all at
3626 once, use && to separate them, not ;. Add OUTPUT_OPTION to
3627 all object-file generation rules. Delete obsolete variables.
3629 * Makefile.in: Delete.
3630 * config-lang.in: Delete outputs= line.
3632 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
3634 * error.c (dump_function_decl): Print no space between
3635 `ptr-operator' the `type-specifier' of the return type.
3636 (dump_type_prefix): Make sure we put space at the appropriate
3639 2000-10-23 Jason Merrill <jason@redhat.com>
3641 * call.c (equal_functions): Also call decls_match for extern "C" fns.
3643 2000-10-22 Jason Merrill <jason@redhat.com>
3645 * call.c (build_conditional_expr): Use ocp_convert to force
3648 2000-10-22 Mark Mitchell <mark@codesourcery.com>
3650 * call.c (standard_conversion): Use RVALUE_CONVs for all
3651 expressions that satisfy lvalue_p, not just those that satisfy
3654 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
3656 * typeck.c (c_sizeof): Return an expression of `size_t' type,
3657 not one with TYPE_IS_SIZETYPE set.
3658 (dubious_conversion_warnings): Remove special-case code.
3660 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
3662 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
3663 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
3664 (dump_type_prefix): Print vector-of-int as 'int vector'.
3665 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
3666 * tree.c (walk_tree): Handle VECTOR_TYPE.
3668 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
3670 2000-10-21 Jason Merrill <jason@redhat.com>
3672 * parse.y (operator): Set got_object from got_scope.
3673 Set looking_for_typename.
3674 * decl.c (lookup_name_real): Clear val after setting from_obj.
3675 Reorganize diagnostic.
3677 2000-10-20 Jason Merrill <jason@redhat.com>
3679 * tree.c (walk_tree): Don't walk into default args.
3681 * error.c (dump_expr): Use host_integerp.
3683 2000-10-20 David Edelsohn <edelsohn@gnu.org>
3685 * typeck2.c (abstract_virtuals_error): Use "because" instead of
3686 "since" in error message.
3688 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3690 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
3692 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
3694 * decl.c (revert_static_member_fn): Fixed typo.
3696 2000-10-19 Mark Mitchell <mark@codesourcery.com>
3698 * class.c (subobject_offset_fn): New type.
3699 (dfs_record_base_offsets): Remove.
3700 (record_base_offsets): Likewise.
3701 (dfs_search_base_offsets): Likewise.
3702 (record_subobject_offset): New function.
3703 (check_subobject_offset): Likewise.
3704 (walk_subobject_offsets): Likewise.
3705 (record_subobject_offsets): Likewise.
3706 (layout_conflict_p): Reimplement.
3707 (layout_nonempty_base_or_field): Correct handling of type
3708 conflicts during layout.
3709 (layout_empty_base): Likewise.
3710 (build_base_field): Adjust to handle new representation of empty
3712 (build_base_fields): Likewise.
3713 (layout_virtual_bases): Likewise.
3714 (splay_tree_compare_integer_csts): New function.
3715 (layout_class_type): Use a splay_tree, rather than a varray, to
3716 represent the offsets of empty bases.
3718 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
3719 * decl.c (select_decl): Don't return declarations that are
3722 2000-10-18 Mark Mitchell <mark@codesourcery.com>
3724 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
3725 (fake_std_node): New macro.
3726 * decl.c (in_std): Rename to ...
3727 (in_fake_std): ... this.
3728 (flag_no_builtin): Remove.
3729 (flag_no_nonansi_builtin): Likewise.
3730 (walk_namespaces_r): Use fake_std_node.
3731 (push_namespace): Use std_identifier.
3732 (pop_namespace): Use in_fake_std.
3733 (lookup_name_real): Use fake_std_node.
3734 (init_decl_processing): When -fhonor-std, create the `std'
3735 namespace. Don't create a dummy fake_std_node in that case.
3736 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
3737 (builtin_function): Put builtins whose names don't begin
3738 with `_' in the std namespace.
3739 * decl2.c (flag_no_builtin): Remove.
3740 (flag_no_nonansi_builtin): Likewise.
3741 (set_decl_namespace): Use fake_std_node.
3742 (validate_nonmember_using_decl): Likewise.
3743 (do_using_directive): Likewise.
3744 (handle_class_head): Likewise.
3745 * dump.c (dequeue_and_dump): Likewise.
3746 * except.c (init_exception_processing): Use std_identifier.
3747 * init.c (build_member_call): Use fake_std_node.
3748 * rtti.c (init_rtti_processing): Use std_identifier.
3750 2000-10-17 Mark Mitchell <mark@codesourcery.com>
3752 * cp-tree.h (back_end_hook): Remove declaration.
3753 * decl2.c (back_end_hook): Remove definition.
3755 * dump.c (dequeue_and_dump): Dump TREE_USED.
3757 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
3759 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
3761 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
3763 * decl.c (WINT_TYPE): Define.
3764 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
3765 c_size_type_node, signed_size_type_node and wint_type_node.
3767 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
3769 * decl2.c (warn_missing_format_attribute): New variable.
3770 (lang_decode_option): Decode -Wmissing-format-attribute.
3772 2000-10-16 Mark Mitchell <mark@codesourcery.com>
3774 * typeck.c (qualify_type): Remove.
3775 (composite_pointer_type): Fix handling of conversions to `cv void*'.
3777 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3779 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
3781 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3783 * Makefile.in (parse.c, parse.h): Create atomically.
3785 2000-10-12 Mark Mitchell <mark@codesourcery.com>
3787 * class.c (current_obstack): Remove.
3788 * decl.c (ggc_p): Remove.
3789 (start_decl): Don't use decl_tree_cons.
3790 (grokdeclarator): Don't use build_decl_list.
3791 (start_function): Don't use decl_tree_cons.
3792 (finish_function): Don't mess with obstacks.
3793 * decl2.c (grok_x_components): Don't use build_decl_list.
3794 * lex.c (make_call_declarator): Don't call decl_tree_cons.
3795 (implicitly_declare_fn): Don't call build_decl_list.
3796 * parse.y (frob_specs): Don't call build_decl_list or
3798 (expr_or_declarator_intern): Don't call decl_tree_cons.
3799 (primary): Don't call build_decl_list.
3800 (fcast_or_absdcl): Likewise.
3801 (typed_declspecs): Don't call decl_tree_cons.
3802 (reserved_declspecs): Don't call build_decl_list.
3803 (declmods): Likewise.
3804 (reserved_typespecquals): Likewise.
3806 (new_type_id): Likewise.
3807 (cv_qualifiers): Likewise.
3808 (after_type_declarator_intern): Likewise.
3809 (notype_declarator_intern): Likewise.
3810 (absdcl_intern): Likewise.
3811 (named_parm): Likewise.
3812 * pt.c (most_specialized_class): Likewise.
3813 * repo.c (temporary_obstack): Make it a structure, not a pointer.
3814 (init_repo): Initialize it.
3815 * search.c (current_obstack): Remove.
3816 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
3818 2000-10-09 Richard Henderson <rth@cygnus.com>
3820 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
3821 (c++ language support bits for libgcc): Remove.
3822 (c++.clean): Remove cplib2.txt cleanup.
3823 * config-lang.in (headers, lib2funcs): Remove.
3825 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
3826 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
3827 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
3828 * inc/new.h, inc/typeinfo: Remove files.
3830 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
3832 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
3834 (init_decl_processing): Initialize intmax_type_node and
3837 2000-10-06 Richard Henderson <rth@cygnus.com>
3839 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
3840 (original_result_rtx): Remove.
3841 * decl.c (save_function_data): Don't clear x_result_rtx.
3842 (mark_lang_function): Don't mark it either.
3843 * expr.c (fixup_result_decl): Remove.
3844 * semantics.c (genrtl_named_return_value): Frob the return decl
3845 before calling emit_local_var.
3846 (genrtl_finish_function): Don't call fixup_result_decl.
3847 Always emit the jump to return_label.
3849 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
3851 * pt.c (lookup_template_class): Set current access for enum.
3852 (tsubst_enum): Set file & line for enum decl.
3854 * spew.c (yylex): Remove unused variable.
3856 2000-10-05 Richard Henderson <rth@cygnus.com>
3858 * semantics.c (genrtl_finish_function): Don't init or check
3859 can_reach_end; remove noreturn and return value checks.
3861 2000-10-05 Tom Tromey <tromey@cygnus.com>
3863 * init.c (build_java_class_ref): Use `build_static_name' with a
3864 suffix, not a prefix, to build the class object's name.
3866 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3868 * cp-tree.h (access_kind): Fix comment typo.
3869 * decl2.c (grokfield): Fix diagnostic typo.
3870 * semantics.c (finish_template_type): Fix comment typo.
3871 (finish_qualified_object_call_expr): Likewise.
3873 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3875 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
3878 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3880 * spew.c (frob_id): New static function.
3881 (frob_opname): Use it.
3884 2000-10-01 Mark Mitchell <mark@codesourcery.com>
3886 * decl.c (lang_mark_false_label_stack): Remove.
3887 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
3889 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
3891 * gxxint.texi: Use @email for formatting email addresses.
3893 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
3895 * error.c: Remove direct obstack manipulation. Replace with
3896 output_buffer-based formatting. Adjust calls to removed macros.
3897 (obstack_chunk_alloc, obstack_chunk_free): Remove.
3898 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
3899 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
3901 2000-09-24 Mark Mitchell <mark@codesourcery.com>
3903 * ir.texi: Move to ../c-tree.texi.
3905 2000-09-20 Jason Merrill <jason@redhat.com>
3907 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
3909 2000-09-21 Andreas Jaeger <aj@suse.de>
3911 * errfn.c: Move declaration of cp_printer and cp_printers to ...
3912 * cp-tree.h: ... here.
3914 * error.c: Remove declaration of cp_printer.
3916 2000-09-20 Mark Mitchell <mark@codesourcery.com>
3918 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
3920 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
3922 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
3925 2000-09-18 Mark Mitchell <mark@codesourcery.com>
3927 * decl.c (start_function): Robustify.
3929 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3931 * cp-tree.h (check_function_format): Accept a `status' parameter.
3933 * call.c, typeck.c: Updates calls to `check_function_format'.
3935 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
3937 * decl2.c (handle_class_head): Always push some scope even
3940 2000-09-16 Mark Mitchell <mark@codesourcery.com>
3942 * cp-tree.h (struct cp_language_function): Remove
3943 x_scope_stmt_stack and name_declared.
3944 (current_scope_stmt_stack): Remove.
3945 (function_name_declared_p): New macro.
3946 (struct lang_decl_flags): Use c_lang_decl as a base class.
3948 (struct lang_decl): Replace saved_tree with context.
3949 (DECL_FRIEND_CONTEXT): Adjust accordingly.
3950 (SET_DECL_FRIEND_CONTEXT): Likewise.
3951 (DECL_VIRTUAL_CONTEXT): Likewise.
3952 (DECL_SAVED_TREE): Remove.
3953 (C_DECLARED_LABEL_FLAG): Likewise.
3954 (cplus_expand_expr_stmt): Don't declare.
3955 (add_decl_stmt): Likewise.
3956 (add_scope_stmt): Likewise.
3957 * decl.c (mark_stmt_tree): Remove.
3958 (case_compare): Likewise.
3959 (finish_case_label): Use c_add_case_label.
3960 (init_decl_processing): Set more language-specific hooks.
3961 (build_enumerator): Fix typo in comment.
3962 (cplus_expand_expr_stmt): Remove.
3963 (mark_lang_function): Use mark_c_language_function.
3964 (lang_mark_tree): Use c_mark_lang_decl.
3965 * decl2.c: Change order of inclusion.
3966 * except.c: Likewise.
3967 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
3968 back on c_expand_expr.
3969 * friend.c: Include expr.h.
3970 * init.c: Change order of inclusion.
3971 * Makefile.in: Update dependencies.
3972 * lex.h (free_lang_decl_chain): Remove.
3973 * optimize.c (maybe_clone_body): Use function_name_declared_p.
3974 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
3976 (instantiate_decl): Use function_name_declared_p.
3977 * semantics.c (lang_expand_expr_stmt): Remove.
3978 (set_current_function_name_declared): Likewise.
3979 (current_function_name_declared): Likewise.
3980 (begin_compound_stmt): Use function_name_declared_p.
3981 (add_decl_stmt): Remove.
3982 (setup_vtbl_ptr): Use function_name_declared_p.
3983 (add_scope_stmt): Remove.
3984 (current_scope_stmt_stack): New function.
3985 (cp_expand_stmt): Don't handle SCOPE_STMTs.
3986 (expand_body): Use function_name_declared_p.
3987 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
3988 * typeck.c: Change order of includes.
3989 (convert_sequence): Remove.
3991 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
3993 * lex.c (reswords): Add _Complex.
3995 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3997 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
3999 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
4001 * init.c (begin_init_stmts): Don't use // comments.
4003 2000-09-12 Jason Merrill <jason@redhat.com>
4005 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
4006 all non-extern arrays.
4008 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
4009 typenames, too. Downgrade complaint to pedwarn.
4010 (xref_tag): Warn about surprising behavior of 'friend struct T'.
4011 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
4012 'class This::Inherited'.
4014 2000-09-12 Mark Mitchell <mark@codesourcery.com>
4016 * decl.c (finish_case_label): Given the LABEL_DECL a
4019 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
4021 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
4022 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
4023 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
4024 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
4025 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
4027 (sorry_for_unsupported_tree, print_scope_operator,
4028 print_left_paren, print_right_paren, print_left_bracket,
4029 print_right_bracket, print_whitespace): Likewise.
4030 (aggr_variety): Rename to class_key_or_enum.
4031 (print_type): Rename to print_type_id.
4032 (print_type_specifier_seq, print_simple_type_specifier,
4033 print_elaborated_type_specifier,
4034 print_rest_of_abstract_declarator,
4035 print_parameter_declaration_clause, print_exception_specification,
4036 print_nested_name_specifier, print_template_id,
4037 typedef_original_name, print_template_argument_list_start,
4038 print_template_argument_list_end): New functions.
4040 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
4042 * ir.texi: Add more documentation.
4044 2000-09-11 Mark Mitchell <mark@codesourcery.com>
4046 * cp-tree.h (struct saved_scope): Remove x_function_parms.
4047 (current_function_parms): Don't define.
4048 (struct cp_language_function): Remove parms_stored.
4049 (current_function_just_assigned_this): Don't define.
4050 (current_function_parms_stored): Likewise.
4051 (static_ctors): Declare.
4052 (static_dtors): Likewise.
4053 (SF_EXPAND): Don't define.
4054 (expand_start_early_try_stmts): Remove declaration.
4055 (store_parm_decls): Likewise.
4056 * decl.c (static_ctors): Don't declare.
4057 (static_dtors): Likewise.
4058 (struct binding_level): Remove this_block.
4059 (poplevel): Remove dead code.
4060 (set_block): Likewise.
4061 (mark_binding_level): Don't mark this_block.
4062 (mark_saved_scope): Don't mark x_function_parms.
4063 (init_decl_processing): Don't add current_function_parms as a GC
4065 (check_function_type): Change prototype.
4066 (start_function): Remove RTL-generation code.
4067 (expand_start_early_try_stmts): Remove.
4068 (store_parm_decls): Give it internal linkage. Remove
4069 RTL-generation code.
4070 (finish_function): Remove RTL-generation code.
4071 * decl2.c (static_ctors): Fix formatting.
4072 (static_dtors): Likewise.
4073 * method.c (use_thunk): Don't call store_parm_decls.
4074 (synthesize_method): Likewise.
4075 * optimize.c (maybe_clone_body): Likewise.
4076 * parse.y (fn.def2): Likewise.
4077 (.set_base_init): Likewise.
4078 (nodecls): Likewise.
4079 * pt.c (instantiate_decl): Likewise.
4080 * rtti.c (synthesize_tinfo_fn): Likewise.
4081 * semantics.c (genrtl_try_block): Simplify.
4082 (expand_body): Use genrtl_start_function and
4083 genrtl_finish_function.
4084 (genrtl_start_function): New function.
4085 (genrtl_finish_function): Likewise.
4087 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
4089 * error.c (cp_tree_printer, case 'P'): Append break.
4091 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
4093 * cp-tree.h (frob_opname): Declare.
4094 * parse.y (saved_scopes): New static variable.
4095 (cp_parse_init): Adjust.
4096 (do_id): If lastiddecl is NULL, do do_identifier.
4097 (operator): Save scope information.
4098 (unoperator): New reduction. Restore scope information.
4099 (operator_name): Append unoperator. Call frob_opname.
4100 * spew.c (frob_opname): Define.
4102 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
4104 * decl.c, rtti.c: Include defaults.h if not already included.
4105 Don't define the *_TYPE_SIZE macros.
4107 2000-09-09 Mark Mitchell <mark@codesourcery.com>
4109 * cp-tree.h (push_switch): Change prototype.
4110 (check_cp_case_value): Remove declaration.
4111 (decl_constant_value): Likewise.
4112 * decl.c (struct cp_switch): Add switch_stmt and cases.
4113 (case_compare): New function.
4114 (push_switch): Set switch_stmt. Initialize cases.
4115 (pop_switch): Clean up cases.
4116 (define_case_label): Rename to ...
4117 (finish_case_label): ... this. Do semantic analysis for case
4119 (start_function): Correct comment.
4120 * decl2.c (check_cp_case_value): Remove.
4121 * expr.c (do_case): Remove.
4122 * pt.c (tsubst_expr): Adjust call to finish_case_label.
4123 * semantics.c (genrtl_do_poplevel): Remove declaration.
4124 (RECHAIN_STMTS): Remove.
4125 (finish_break_stmt): Use build_break_stmt.
4126 (finish_continue_stmt): Use build_continue_stmt.
4127 (finish_switch_cond): Adjust condition here, rater than in
4128 c_expand_start_case.
4129 (finish_case_label): Remove.
4130 * typeck.c (c_expand_return): Remove.
4131 (c_expand_start_case): Likewise.
4133 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
4135 * ir.texi: Document type nodes.
4137 2000-09-06 Mark Mitchell <mark@codesourcery.com>
4139 * cp-tree.h (init_cp_semantics): Declare.
4140 (genrtl_try_block): Don't declare.
4141 (genrtl_handler): Likewise.
4142 (genrtl_catch_block): Likewise.
4143 (genrtl_ctor_stmt): Likewise.
4144 (genrtl_subobject): Likewise.
4145 (genrtl_do_poplevel): Likewise.
4146 (genrtl_named_return_value): Likewise.
4147 * lex.c (init_parse): Call init_cp_semantics.
4148 * semantics.c (genrtl_try_block): Give it internal linkage.
4149 (genrtl_handler): Likewise.
4150 (genrtl_catch_block): Likewise.
4151 (genrtl_ctor_stmt): Likewise.
4152 (genrtl_subobject): Likewise.
4153 (genrtl_do_poplevel): Likewise.
4154 (genrtl_named_return_value): Likewise.
4155 (lang_expand_stmt): Rename to ...
4156 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
4157 (init_cp_semantics): Define.
4159 * decl.c (initialize_local_var): Remove RTL-generating code.
4160 * semantics.c (genrtl_try_block): Fix formatting.
4162 Move statement-tree facilities from C++ to C front-end.
4163 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
4164 (void_zero_node): Remove.
4165 (stmt_tree): Likewise.
4166 (scope_chain): Adjust.
4167 (language_function): Rename to cp_language_function.
4168 (cp_function_chain): Adjust.
4169 (current_stmt_tree): Remove.
4170 (last_tree): Likewise.
4171 (last_expr_type): Likewise.
4172 (struct lang_decl): Adjust.
4173 (STMT_IS_FULL_EXPR_P): Remove.
4175 (begin_stmt_tree): Likewise.
4176 (finish_stmt_tree): Likewise.
4177 (walk_tree_fn): Likewise.
4178 (walk_stmt_tree): Likewise.
4179 * class.c (finish_struct): Replace use of add_tree with add_stmt.
4180 * decl.c (mark_stmt_tree): Adjust type.
4181 (init_decl_processing): Don't build void_zero_node.
4182 (initialize_local_var): Adjust usage of current_stmt_tree.
4183 (finish_enum): Use add_stmt, not add_tree.
4184 (save_function_data): Adjust use of language_function.
4185 (finish_constructor_body): Use add_stmt, not add_tree.
4186 (finish_destructor_body): Likewise.
4187 (push_cp_function_context): Adjust use of language_function.
4188 (pop_cp_function_context): Likewise.
4189 (mark_lang_function): Likewise.
4190 (mark_cp_function_context): Likewise.
4191 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
4192 (build_vec_init): Likewise.
4193 * semantics.c (SET_LAST_STMT): Remove.
4194 (RECHAIN_STMTS): Don't use it.
4195 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
4196 (current_stmt_tree): Define.
4198 (finish_goto_stmt): Use add_stmt, not add_tree.
4199 (finish_expr_stmt): Likewise.
4200 (begin_if_stmt): Likewise.
4201 (finish_then_clause): Likewise.
4202 (begin_while_stmt): Likewise.
4203 (begin_do_stmt): Likewise.
4204 (finish_return_stmt): Likewise.
4205 (begin_for_stmt): Likewise.
4206 (finish_break_stmt): Likewise.
4207 (finish_continue_stmt): Likewise.
4208 (begin_switch_stmt): Likewise.
4209 (finish_case_label): Likewise.
4210 (begin_try_block): Likewise.
4211 (begin_function_try_block): Likewise.
4212 (begin_handler): Likewise.
4213 (begin_catch_block): Likewise.
4214 (begin_compound_stmt): Likewise.
4215 (begin_asm_stmt): Likewise.
4216 (finish_asm_stmt): Likewise.
4217 (finish_label_stmt): Likewise.
4218 (add_decl_stmt): Likewise.
4219 (finish_subobject): Likewise.
4220 (finish_decl_cleanup): Likewise.
4221 (finish_named_return_value): Likewise.
4222 (setup_vtbl_ptr): Likewise.
4223 (add_scope_stmt): Likewise.
4224 (finish_stmt_expr): Likewise.
4225 (prune_unused_decls): Remove.
4226 (begin_stmt_tree): Likewise.
4227 (finish_stmt_tree): Likewise.
4228 (prep_stmt): Adjust use of current_stmt_tree.
4229 (lang_expand_stmt): Likewise.
4230 * tree.c (statement_code_p): Remove.
4231 (cp_statement_code_p): New function.
4232 (walk_stmt_tree): Remove.
4233 (init_tree): Set lang_statement_code_p.
4235 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
4237 Integrated preprocessor.
4239 * Make-lang.in, Makefile.in: Remove all references to input.c,
4240 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
4241 * gxx.gperf, hash.h, input.c: Delete.
4242 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
4243 initialized properly.
4245 * class.c (fixup_pending_inline): Take a tree, not a
4246 struct pending_inline *. All callers changed.
4247 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
4248 RID_PROTECTED entries in ridpointers[] array here.
4249 * decl.c (duplicate_decls): Do not refer to struct
4251 (record_builtin_type, init_decl_processing): Use RID_MAX not
4253 (grokdeclarator): Use C_IS_RESERVED_WORD.
4254 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
4256 (grok_x_components): Do not inspect pending_inlines chain.
4258 * cp-tree.h (struct lang_identifier): Add rid_code entry.
4259 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
4260 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
4261 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
4262 TIME_IDENTIFIER_FILEINFO): Kill.
4264 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
4266 * parse.y: Call do_pending_inlines unconditionally.
4267 reinit_parse_for_method is now snarf_method. fn.defpen is no
4268 longer necessary. Remove unnecessary <itype> annotation on
4269 SCOPE. Do not refer to end_of_file or struct pending_inline.
4270 * semantics.c (begin_inline_definitions): Call
4271 do_pending_inlines unconditionally.
4273 * lex.c: Remove all code now shared with C front end.
4274 Initialize cpplib properly if USE_CPPLIB. Put reserved words
4275 into the get_identifier table. Rewrite pragma handling to
4276 work with the registry. Move code to save tokens for later
4277 processing to spew.c.
4279 * spew.c: Rewrite everything in terms of token streams instead
4280 of text. Move routines here from lex.c / input.c as
4281 appropriate. GC-mark trees hanging off the pending inlines
4284 2000-09-06 Mark Mitchell <mark@codesourcery.com>
4286 * NEWS: Mention that the named return value extension has been
4288 * cp-tree.h (original_result_rtx): Define.
4289 (TREE_REFERENCE_EXPR): Remove.
4290 (DECL_VPARENT): Likewise.
4291 (pushdecl_nonclass_level): Likewise.
4292 (store_return_init): Likewise.
4293 (reinit_lang_specific): Likewise.
4294 (genrtl_named_return_value): Change prototype.
4295 * decl.c (original_result_rtx): Remove.
4296 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
4297 Do not generate RTL for local variables here.
4298 (store_return_init): Remove.
4299 * semantics.c (genrtl_named_return_value): Simplify. Fold in
4301 (finish_named_return_value): Adjust accordingly. Warn that this
4302 extension is deprecated.
4303 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
4305 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4307 * pt.c (type_unification_real): Replace switch with if.
4308 (unify): Tsubst non-type parms before comparing.
4310 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4312 * error.c (dump_typename): New function, broken out of ...
4313 (dump_type): ... here. Use it.
4314 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
4316 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4318 * init.c (build_offset_ref): Deal with namespace scoped
4321 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4323 * class.c (resolve_address_of_overloaded_function): Add
4324 explanation message.
4325 * decl.c (define_case_label): Reformat explanation.
4326 * decl2.c (finish_static_data_member_decl): Likewise.
4327 (grokfield): Likewise.
4328 * friend.c (do_friend): Likewise.
4330 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
4332 * tree.c (walk_tree): Expose tail recursion.
4333 (walk_stmt_tree): New function.
4334 * cp-tree.h: Prototype walk_stmt_tree.
4335 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
4336 the BLOCKs directly. If a BLOCK has no variables after
4337 pruning, discard it.
4338 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
4339 restore the line number.
4341 2000-09-05 Mark Mitchell <mark@codesourcery.com>
4343 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
4344 (pt.o): Remove dependency on HTAB_H.
4345 * cp-tree.h: Include hashtab.h.
4346 (walk_tree): Change prototype.
4347 (walk_tree_without_duplicates): New function.
4348 * decl.c (check_default_argument): Use it.
4349 * optimize.c (remap_decl): Adjust calls to walk_tree.
4350 (copy_body): Likewise.
4351 (expand_calls_inline): Likewise.
4352 (calls_setjmp_p): Use walk_tree_without_duplicates.
4353 * pt.c: Don't include hashtab.h.
4354 (for_each_template_parm): Use walk_tree_without_duplicates.
4355 * semantics.c (finish-stmt_tree): Likewise.
4356 (expand_body): Likewise.
4357 * tree.c (walk_tree): Add additional parameter.
4358 (walk_tree_without_duplicates): New function.
4359 (count_trees): Use it.
4360 (verify_stmt_tree): Adjust call to walk_tree.
4361 (find_tree): Use walk_tree_without_duplicates.
4362 (no_linkage_check): Likewise.
4363 (break_out_target_exprs): Adjust call to walk_tree.
4364 (cp_unsave): Likewise.
4366 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4368 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
4369 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
4370 * cp-tree.h (TYPE_BINFO): Adjust comment.
4371 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
4372 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
4373 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4374 (TYPE_TEMPLATE_INFO): Likewise.
4375 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
4376 * class.c (push_nested_class): Likewise.
4377 * decl.c (lookup_name_real): Likewise.
4378 (grokdeclarator): Likewise.
4379 (grok_op_properties): Likewise.
4380 (xref_tag): Likewise.
4381 (xref_basetypes): Likewise.
4382 * decl2.c (constructor_name_full): Likewise.
4383 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
4384 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4385 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
4386 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4387 (dump_type_suffix): Likewise.
4388 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
4390 (get_aggr_from_typedef): Likewise.
4391 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
4392 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4393 (write_template_parm): Likewise.
4394 (write_template_template_parm): Check tree code instead of
4395 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4396 * method.c (build_overload_nested_name): Add
4397 BOUND_TEMPLATE_TEMPLATE_PARM.
4398 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
4399 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4400 * pt.c (convert_template_argument): Check tree code instead of
4401 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4402 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
4403 (for_each_template_parm): Adjust comment.
4404 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
4405 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4406 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
4407 template_args_equal to compare template template parameter cases.
4408 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4409 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
4411 * tree.c (copy_template_template_parm): Decide whether to create
4412 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
4413 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4414 (copy_tree_r): Likewise.
4415 * typeck.c (comptypes): Likewise. Check tree code instead of
4416 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4418 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
4420 * decl.c (finish_function): Move the code for handling functions
4421 marked with the constructor and destructor attributes inside the
4424 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4426 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
4428 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4430 * pt.c (lookup_template_class): Remove abort.
4431 * tree.c (get_type_decl): Allow error_mark_node.
4433 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4435 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
4438 2000-09-03 Mark Mitchell <mark@codesourcery.com>
4440 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
4443 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
4445 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
4446 union tag mismatch error reporting.
4448 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
4450 * call.c (build_scoped_method_call): Check it is not a namespace.
4452 2000-08-30 Jason Merrill <jason@redhat.com>
4454 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
4456 * tree.c (bot_manip): Check TREE_CONSTANT rather than
4457 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
4458 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
4460 * decl.c (start_function): Always call make_function_rtl.
4462 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
4464 * semantics.c (prune_unused_decls): New function.
4465 (finish_stmt_tree): Call it via walk_tree.
4467 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
4469 * class.c (build_secondary_vtable): Constify a char *.
4470 * decl.c (init_decl_processing): Initialize function_id_node,
4471 pretty_function_id_node, and func_id_node.
4472 * input.c (struct input_source): Constify 'str'.
4473 (feed_input): Constify first argument.
4474 * mangle.c (write_identifier): Constify argument.
4475 * pt.c (mangle_class_name_for_template): Constify argument.
4477 2000-08-29 Mark Mitchell <mark@codesourcery.com>
4479 * typeck.c (mark_addressable): Remove code that pokes around in
4482 2000-08-28 Jason Merrill <jason@redhat.com>
4484 * lex.c (file_name_nondirectory): Move to toplev.c.
4486 * cp-tree.h (LOCAL_CLASS_P): New macro.
4487 * class.c (finish_struct_1): Use it.
4489 2000-08-27 Alex Samuel <samuel@codesourcery.com>
4491 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
4492 (write_encoding): Pass another argument to write_name.
4493 (write_name): Add ignore_local_scope parameter. Fix handling of
4495 (write_nested_name): Use write_unqualified_name.
4496 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
4497 (write_template_prefix): Use write_unqualified_name.
4498 (write_component): Remove.
4499 (write_local_name): Add parameter. Use direct local entity to
4500 discriminator calculation.
4501 (write_class_enum_type): Pass another argument to write_name.
4502 (write_template_template_arg): Likewise.
4503 (make_guard_variable): Likewise.
4505 2000-08-27 Jason Merrill <jason@redhat.com>
4507 * decl.c (pushdecl): Matching decls for local externs are found in
4508 the current level. Propagate linkage information from previous
4511 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
4513 * ir.texi (Expressions): Fix typo.
4515 2000-08-25 Greg McGary <greg@mcgary.org>
4517 * tree.c (init_tree): Use ARRAY_SIZE.
4519 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
4521 * error.c (cp_tree_printer): Rework.
4523 2000-08-25 Mark Mitchell <mark@codesourcery.com>
4525 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
4527 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
4528 (cp-demangle.o): Remove target.
4529 (dyn-string.o): Likewise.
4531 * decl.c (grokfndecl): Require that `main' return an `int'.
4532 * mangle.c (write_encoding): Don't mangle return types for
4533 conversion functions.
4535 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
4537 * error.c (tree_formatting_info): New data type.
4538 (tree_being_formatted): New macro.
4539 (tree_formatting_flags): Likewise.
4540 (put_whitespace): Likewise.
4541 (print_tree_identifier): Likewise.
4542 (print_identifier): Likewise.
4543 (cp_tree_printer, print_function_argument_list, print_declaration,
4544 print_expression, print_function_declaration,
4545 print_function_parameter, print_type, print_cv_qualifier): New
4547 (init_error): Initialize lang_printer.
4549 2000-08-24 Jason Merrill <jason@redhat.com>
4551 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
4552 adjustment necessary.
4554 2000-08-24 Greg McGary <greg@mcgary.org>
4556 * cp-tree.h (MAIN_NAME_P): Remove macro.
4558 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
4560 * error.c (print_instantiation_context): Don't forget to flush the
4563 2000-08-23 Jason Merrill <jason@redhat.com>
4565 * typeck.c (build_ptrmemfunc): Save the input pmf.
4567 * method.c (process_modifiers): Use same_type_p.
4569 2000-08-23 Mark Mitchell <mark@codesourcery.com>
4571 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
4572 * mangle.c (write_function_type): Change prototype.
4573 (write_encoding): Don't mangle return types for
4574 constructors or destructors.
4575 (write_type): Adjust call to write_function_type.
4576 * pt.c (instantiate_template): Instantiate alternate entry points
4577 when instantiating the main function.
4579 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
4581 * error.c (cp_print_error_function): Don't use embedded '\n' in
4584 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
4586 * decl.c (init_decl_processing): Remove bogus initialization.
4587 * error.c (lang_print_error_function): Restore here.
4588 (init_error): Initialize print_error_function.
4590 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4592 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
4594 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
4596 * Makefile.in (error.o): Depends on diagnostic.h
4598 * cp-tree.h (problematic_instantiation_changed,
4599 record_last_problematic_instantiation, current_instantiation,
4600 print_instantiation_context): Declare.
4601 (maybe_print_template_context): Remove.
4603 * decl.c (init_decl_processing): Set print_error_function to NULL.
4604 (lang_print_error_function): Remove, since we're using a new
4607 * error.c: #include diagnostic.h
4608 (function_category): New function.
4609 (cp_diagnostic_starter): Likewise.
4610 (cp_diagnostic_finalizer): Likewise.
4611 (cp_print_error_function): Likewise.
4612 (maybe_print_instantiation_context): Likewise.
4613 (print_instantiation_full_context): Likewise.
4614 (print_instantiation_partial_context): Likewise.
4615 (print_instantiation_context): Define.
4616 (init_error): Initialize diagnostic pager and finalizer.
4618 * pt.c (problematic_instantiation_changed): Define.
4619 (record_last_problematic_instantiation): Likewise.
4620 (current_instantiation): Likewise.
4621 (maybe_print_template_context): Remove.
4622 (print_template_context): Likewise.
4623 (current_tinst_level): Make static to reflect Brendan Kehoe's
4624 change of 1995-04-13.
4625 (push_tinst_level): Call print_instantiation_context.
4627 2000-08-21 Nix <nix@esperi.demon.co.uk>
4629 * lang-specs.h: Do not process -o or run the assembler if
4632 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
4634 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
4636 * decl2.c (lang_decode_option): Disable gettext attributes for
4639 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
4641 * lex.c (lang_init_options): Default diagnostic message maximum
4642 length to 80, when line-wrapping.
4644 2000-08-20 Mark Mitchell <mark@codesourcery.com>
4646 * class.c (build_vtbl_initializer): Clear the entire
4647 vtbl_init_data. Start keeping track of the functions for which we
4648 have created vcall offsets here.
4649 (dfs_build_vcall_offset_vtbl_entries): Remove.
4650 (build_vcall_offset_vtbl_entries): Reimplement.
4651 (add_vcall_offset_vtbl_entries_r): New function.
4652 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
4653 computing when vcall offsets are necessary.
4655 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4657 * decl.c (member_function_or_else): Use cp_error ... %T.
4658 (grokdeclarator): Likewise.
4659 (start_method): Likewise.
4660 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
4662 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4664 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
4667 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4669 * cp-tree.h (PTRMEM_OK_P): New macro.
4670 (itf_ptrmem_ok): New enumeration value.
4671 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
4672 argument. Diagnose implicit pointer to member.
4673 (instantiate_type): Don't diagnose implicit pointer to member
4674 here. Pass itf_ptrmem_ok if ok. Adjust calls to
4675 resolve_address_of_overloaded_function.
4676 * init.c (build_offset_ref): Set PTRMEM_OK_P.
4677 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
4678 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
4679 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
4680 (build_unary_op): Deal with single non-static member in
4683 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4685 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
4687 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4689 * cp-tree.h (enum_name_string): Remove prototype.
4690 (report_case_error): Remove prototype.
4691 * cp/typeck2.c (enum_name_string): Remove.
4692 (report_case_error): Remove.
4693 * error.c (dump_expr): Deal with enum values directly.
4694 Correctly negate integer constant.
4696 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4698 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
4699 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
4700 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
4701 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
4702 (__cxa_vec_new): Use __cxa_vec_new2.
4703 (__cxa_vec_delete): Use __cxa_vec_delete2.
4705 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4707 * vec.cc (__cxa_vec_new): Set "C" linkage.
4708 (__cxa_vec_ctor): Likewise.
4709 (__cxa_vec_cctor): Likewise.
4710 (__cxa_vec_dtor): Likewise.
4711 (__cxa_vec_delete): Likewise.
4712 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
4713 (__cxa_vec_ctor): Likewise.
4714 (__cxa_vec_cctor): Likewise.
4715 (__cxa_vec_dtor): Likewise.
4716 (__cxa_vec_delete): Likewise.
4718 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4720 * class.c (instantiate_type): Reinstate local variable
4721 deleted in previous change.
4723 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
4726 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4728 * cp-tree.h (instantiate_type_flags): New enumeration.
4729 (instantiate_type): Change parameter.
4730 * class.c (instantiate_type): Adjust prototype. Adjust.
4731 * call.c (standard_conversion): Adjust instantiate_type call.
4732 (reference_binding): Likewise.
4733 (build_op_delete_call): Likewise.
4734 (convert_like_real): Likewise.
4735 * cvt.c (cp_convert_to_pointer): Likewise.
4736 (convert_to_reference): Likewise.
4737 * pt.c (convert_nontype_argument): Likewise.
4738 * typeck.c (build_binary_op): Likewise.
4739 (build_ptrmemfunc): Likewise.
4740 (convert_for_assignment): Likewise.
4742 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4744 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
4745 (current_aggr): Define.
4746 * decl.c (grokdeclarator): Make sure a friend class is an
4747 elaborated type specifier.
4748 * parse.y (current_aggr): Remove static definition.
4749 (cp_parse_init): Adjust.
4750 (structsp): Clear and restore current_aggr.
4751 (component_decl_list): Clear current_aggr.
4753 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
4754 aggregate tag on the typename's context.
4756 * pt.c (tsubst_friend_class): Return error_mark_node, if
4758 (instantiate_class_template): Ignore error_mark_node friend types.
4760 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
4762 * cvt.c (warn_ref_binding): New static function, broken out of ...
4763 (convert_to_reference): ... here. Use it.
4765 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4767 * parse.y (template_arg): Add rule for template qualified with
4770 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4772 * decl2.c (add_function): Reorganize.
4773 (arg_assoc): Do not consider function template decls.
4775 2000-08-11 Jason Merrill <jason@redhat.com>
4777 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
4780 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4782 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
4783 (lookup_nested_tag): Likewise.
4785 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
4788 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4790 * parse.y (named_complex_class_head_sans_basetype): Remove
4793 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4795 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
4796 explicit TEMPLATE_ID_EXPR args.
4797 (build_expr_from_tree, case CALL_EXPR): Likewise.
4799 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4801 * decl.c (check_tag_decl): Diagnose typename's which don't
4804 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
4806 * init.c (build_aggr_init): Reject bogus array initializers
4809 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
4811 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
4813 * cp/tinfo.cc (__dynamic_cast): Likewise.
4814 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
4816 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
4818 * cvt.c (convert_to_pointer_force): Fix error message when
4819 attempting to cast from ambiguous base.
4821 2000-08-08 Jason Merrill <jason@redhat.com>
4823 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
4824 (tsubst_template_arg_vector): Likewise.
4826 * decl2.c (build_anon_union_vars): Choose the largest field; don't
4827 assume that one will be as large as the union.
4829 2000-08-07 Kazu Hirata <kazu@hxi.com>
4831 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
4832 * decl.c (pop_labels): Likewise.
4834 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
4836 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
4838 (__pointer_to_member_type_info): Likewise.
4839 (__base_class_info): Likewise.
4840 (__class_type_info): Likewise.
4841 (__si_class_type_info): Likewise.
4842 (__vmi_class_type_info): Likewise.
4843 * tinfo.cc (__si_class_type_info::__do_find_public_src):
4844 Changed member names to match specifications.
4845 (__vmi_class_type_info::__do_find_public_src): Likewise.
4846 (__si_class_type_info::__do_dyncast): Likewise.
4847 (__vmi_class_type_info::__do_dyncast): Likewise.
4848 (__si_class_type_info::__do_upcast): Likewise.
4849 (__vmi_class_type_info::__do_upcast): Likewise.
4850 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
4851 (__pbase_type_info::__pointer_catch): Likewise.
4852 (__pointer_type_info::__pointer_catch): Likewise.
4853 (__pointer_to_member_type_info::__pointer_catch): Likewise.
4855 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
4857 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
4858 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
4859 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
4861 2000-08-04 Mark Mitchell <mark@codesourcery.com>
4863 * cp-tree.h (add_method): Change prototype.
4864 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
4865 Don't double the size of the method vector in the error case.
4866 (handle_using_decl): Adjust call to add_method.
4867 (add_implicitly_declared_members): Likewise.
4868 (clone_function_decl): Likewise.
4869 * decl2.c (check_classfn): Likewise.
4870 * semantics.c (finish_member_declaration): Likewise.
4872 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
4874 * decl.c (flag_isoc94): New variable.
4876 2000-08-02 Jason Merrill <jason@redhat.com>
4878 * pt.c (do_type_instantiation): Add complain parm; don't complain
4879 if called recursively.
4880 * cp-tree.h, parse.y: Adjust.
4882 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
4884 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
4885 -Wno-strict-prototypes.
4887 * g++spec.c: Adjust type of second argument to
4888 lang_specific_driver, and update code as necessary.
4890 * cp-tree.h: Don't prototype min_precision here.
4891 (my_friendly_assert): Cast expression to void.
4892 * semantics.c (do_poplevel): Initialize scope_stmts.
4894 2000-08-02 Mark Mitchell <mark@codesourcery.com>
4896 * cp-tree.h (DECL_NEEDED_P): Tweak.
4898 2000-07-28 Jason Merrill <jason@redhat.com>
4900 * lang-specs.h: Use %i in rule for .ii files.
4902 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
4904 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
4906 2000-07-30 Mark Mitchell <mark@codesourcery.com>
4908 Allow indirect primary bases.
4909 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
4911 (CLASSTYPE_VFIELD_PARENT): Remove.
4912 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
4913 (BINFO_PRIMARY_BINFO): Remove.
4914 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
4915 (BINFO_VBASE_PRIMARY_P): Likewise.
4916 (BINFO_PRIMARY_BASE_OF): New macro.
4917 (BINFO_INDIRECT_PRIMARY_P): Likewise.
4918 (get_primary_binfo): New function.
4919 * decl.c (lang_mark_tree): Make lang_type::primary_base.
4920 * class.c (vcall_offset_data_s): Rename to ...
4921 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
4922 and add ctor_vtbl_p.
4923 (get_derived_offset): Use get_primary_binfo.
4924 (dfs_mark_primary_bases): Adjust handling of virtual primary
4926 (mark_primary_bases): Likewise.
4927 (set_primary_base): Take a binfo, not an integer, as a
4928 representation of the primary base.
4929 (indirect_primary_base_p): Remove.
4930 (determine_primary_base): Adjust for indirect primary bases.
4931 (dfs_find_final_overrider): Fix typo in coment.
4932 (update_vtable_entry_for_fn): Use get_primary_binfo.
4933 (layout_nonempty_base_or_field): Tweak.
4934 (build_base_fields): Adjust for new primary base semantics.
4935 (dfs_propagate_binfo_offsets): Remove.
4936 (propagate_binfo_offsets): Rewrite.
4937 (dfs_set_offset_for_shared_vbases): Remove.
4938 (layout_virtual_bases): Don't use it.
4939 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
4941 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
4942 CLASSTYPE_VFIELD_PARENT.
4943 (dfs_get_primary_binfo): New function.
4944 (get_primary_binfo): Likewise.
4945 (dump_class_hierarchy_r): Tweak printing of primary bases.
4946 (build_vtbl_initializer): Fix typo in comments. Use
4948 (build_vcall_and_vbase_vtbl_entries): Likewise.
4949 (build_vbaes_offset_vtbl_entries): Likewise.
4950 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
4951 BV_VCALL_INDEX to handle indirect primary bases.
4952 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
4953 (build_rtti_vtbl_entries): Likewise.
4954 * search.c (get_shared_vbase_if_not_primary): Tweak.
4955 (find_vbase_instance): Likewise.
4956 (binfo_for_vtable): Simplify.
4957 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
4958 (make_binfo): Make it have 11 entries.
4960 2000-07-30 Alex Samuel <samuel@codesourcery.com>
4962 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
4963 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
4964 ascertaining primaryness.
4965 (G): Remove template_args.
4966 (decl_is_template_id): New function.
4967 (write_encoding): Use decl_is_template_id.
4968 (write_name): Likewise. Handle type_decls. Get main variant of
4970 (write_nested_name): Likewise.
4971 (write_prefix): Likewise.
4972 (write_template_prefix): Likewise.
4973 (write_special_name_constructor): Remove defunct production from
4975 (write_bare_function_type): Remove comment about absent parameter.
4976 (write_template_template_arg): Add missing grammar production to
4979 2000-07-27 Jason Merrill <jason@redhat.com>
4981 * decl.c (duplicate_decls): If common_type produces a non-typedef
4982 type for a typedef, just use the old type.
4984 2000-07-27 Mark Mitchell <mark@codesourcery.com>
4986 * cp-tree.h (function_depth): Declare.
4987 (verify_stmt_tree): Likewise.
4988 (find_tree): Likewise.
4989 * decl.c (function_depth): Give it external linkage.
4990 * optimize.c (optimize_function): Increment and decrement it.
4991 * tree.c (verify_stmt_tree_r): New function.
4992 (verify_stmt_tree): Likewise.
4993 (find_tree_r): Likewise.
4994 (find_tree): Likewise.
4996 2000-07-27 Jason Merrill <jason@redhat.com>
4998 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
5000 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
5002 2000-07-26 Mark Mitchell <mark@codesourcery.com>
5004 * decl.c (start_cleanup_fn): Mark the function as `inline'.
5005 * decl2.c (get_guard): Call cp_finish_decl, not
5006 rest_of_decl_compilation, for local guards.
5007 * lex.c (do_identifier): Remove unused variable.
5009 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
5011 * parse.y: Add missing ';'.
5013 2000-07-26 Mark Mitchell <mark@codesourcery.com>
5015 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
5018 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
5020 Kill strict_prototype. Backwards compatibility only for
5021 non NO_IMPLICIT_EXTERN_C systems.
5022 * cp-tree.h (flag_strict_prototype): Remove.
5023 (strict_prototype): Remove.
5024 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
5025 * decl.c (maybe_push_to_top_level): Adjust.
5026 (pop_from_top_level): Adjust.
5027 (decls_match): Only allow sloppy parm matching for ancient
5029 (init_decl_processing): Adjust.
5030 (grokdeclarator): Adjust.
5031 * decl2.c (flag_strict_prototype): Remove.
5032 (strict_prototype): Remove.
5033 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
5034 (lang_f_options): Remove "strict-prototype".
5035 (unsupported-options): Add "strict-prototype".
5036 * lex.c (do_identifier): Adjust.
5037 (do_scoped_id): Adjust.
5038 * parse.y (empty_parms): Adjust.
5039 * class.c (push_lang_context): Adjust.
5040 (pop_lang_context): Adjust.
5041 * typeck.c (comp_target_parms): Adjust.
5043 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
5045 * decl.c (poplevel): Deal with anonymous variables at for scope.
5046 (maybe_inject_for_scope_var): Likewise.
5048 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
5050 * decl.c: Remove all signal handling code, now done in toplev.c.
5052 2000-07-23 Mark Mitchell <mark@codesourcery.com>
5054 * decl.c (make_rtl_for_nonlocal_decl): Rework.
5056 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
5059 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
5061 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
5062 Define my_friendly_assert and my_friendly_abort as macros
5063 which may call friendly_abort. Prototype friendly abort, not
5064 my_friendly_abort or my_friendly_assert.
5065 * decl.c (signal_catch): Report the signal caught in the error
5066 message. Call fatal directly.
5067 * typeck2.c (ack, my_friendly_assert): Delete.
5068 (my_friendly_abort): Rename to friendly_abort. Expect file,
5069 line, and function parameters. Report the abort code, then
5070 call fancy_abort. Do not mask an abort if errors have
5073 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
5075 * typeck.c (comp_target_parms): Remove obsolete parameter.
5076 (comp_target_types): Adjust.
5078 2000-07-17 Jason Merrill <jason@redhat.com>
5080 * typeck.c (mark_addressable): Never set TREE_USED.
5081 * call.c (build_call): Don't abort on calls to library functions
5082 that have been declared normally.
5084 * typeck.c (build_binary_op): Fix grammar in warning.
5086 * exception.cc (__eh_free): Fix prototype.
5088 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
5090 * decl.c (pushdecl): Handle seeing an OVERLOAD in
5091 IDENTIFIER_NAMESPACE_VALUE.
5093 2000-07-16 Mark Mitchell <mark@codesourcery.com>
5095 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
5096 * method.c (use_thunk): Correct handling of vcall offsets.
5098 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
5100 * .cvsignore: parse.h and parse.c have no cp- prefix.
5102 2000-07-13 Mark Mitchell <mark@codesourcery.com>
5104 * .cvsignore: New file.
5106 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
5108 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
5110 2000-07-12 Mark Mitchell <mark@codesourcery.com>
5112 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
5114 * parse.h: Likewise.
5116 2000-07-11 Mark Mitchell <mark@codesourcery.com>
5118 * class.c (layout_class_type): Add pointers to virtual bases after
5119 base classes under the old ABI.
5121 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
5123 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
5124 (finish_continue_stmt): Likewise.
5125 (begin_for_stmt): Remove call to note_level_for_for.
5126 (finish_goto_stmt): Change call from build_min_nt
5128 (finish_expr_stmt): Likewise.
5129 (begin_if_stmt): Likewise.
5130 (begin_while_stmt): Likewise.
5131 (finish_while_stmt): Likewise.
5132 (finish_return_stmt): Likewise.
5133 (begin_for_stmt): Likewise.
5134 (finish_for_stmt): Likewise.
5135 (finish_break_stmt): Likewise.
5136 (begin_switch_stmt): Likewise.
5137 (finish_case_label): Likewise.
5138 (genrtl_try_block): Likewise.
5139 (begin_try_block): Likewise.
5140 (begin_handler): Likewise.
5141 (begin_compound_stmt): Likewise.
5142 (finish_asm_stmt): Likewise.
5143 (finish_label_stmt): Likewise.
5144 (add_decl_stmt): Likewise.
5145 (finish_subobject): Likewise.
5146 (finish_decl_cleanup): Likewise.
5147 (finish_named_return_value): Likewise.
5148 (setup_vtbl_ptr): Likewise.
5149 (add_scope_stmt): Likewise.
5150 * decl.c (finish_constructor_body): Likewise.
5151 (finish_destructor_body): Likewise.
5152 * optimize.c (copy_body_r): Likewise.
5153 (initialize_inlined_parameters): Likewise.
5154 (declare_return_variable): Likewise.
5155 (expand_call_inline): Likewise.
5157 2000-07-10 Jakub Jelinek <jakub@redhat.com>
5159 * semantics.c (expand_body): Sync interface information
5160 at the end of function body expansion.
5162 2000-07-09 Jason Merrill <jason@redhat.com>
5164 * init.c (build_new_1): Bail early if the call to new fails.
5166 * decl.c (compute_array_index_type): Check specifically for
5167 an INTEGER_CST, not just TREE_CONSTANT.
5169 * decl.c (duplicate_decls): Don't call duplicate_decls on
5170 the DECL_TEMPLATE_RESULT.
5171 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
5174 * error.c (dump_template_bindings): Don't crash if we had an
5175 invalid argument list.
5177 * typeck.c (c_expand_start_case): Do narrowing here.
5178 * semantics.c (finish_switch_cond): Not here.
5180 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
5182 * parse.y (asm_clobbers): Do string concatenation.
5184 2000-07-09 Mark Mitchell <mark@codesourcery.com>
5186 * decl.c (pushtag): Don't put local classes in template functions
5187 on the local_classes list.
5189 2000-07-04 Scott Snyder <snyder@fnal.gov>
5191 * decl2.c (get_guard): Add missing return for old ABI local
5194 2000-07-09 Mark Mitchell <mark@codesourcery.com>
5196 * cp-tree.h (char_type_p): New function.
5197 * decl.c (init_decl_processing): Don't initialize
5198 signed_wchar_type_node or unsigned_wchar_type_node.
5199 (complete_array_type): Handle brace-enclosed string-constants.
5200 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
5201 * tree.c (char_type_p): New function.
5202 * typeck2.c (digest_init): Use char_type_p.
5204 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
5206 * pt.c (tsubst): Don't layout type, if it's error_mark.
5208 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
5210 * pt.c (instantiate_pending_templates): Reset template level.
5212 2000-07-05 Jason Merrill <jason@redhat.com>
5214 * call.c (joust): Don't complain about `operator char *()' beating
5215 `operator const char *() const'.
5217 2000-07-04 scott snyder <snyder@fnal.gov>
5218 Jason Merrill <jason@redhat.com>
5220 * repo.c (repo_get_id): Handle the case where a class with virtual
5221 bases has a null TYPE_BINFO_VTABLE.
5223 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
5224 Jason Merrill <jason@redhat.com>
5226 * parse.y (member_init): Just pass in the type.
5227 * init.c (expand_member_init): Handle getting a type.
5229 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5230 Jason Merrill <jason@redhat.com>
5232 * decl.c (finish_function): Warn if a function has no return
5234 Suggested by Andrew Koenig.
5235 * typeck.c (check_return_expr): Do set current_function_returns_value
5236 if we got an error_mark_node.
5238 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
5240 * decl2.c (push_decl_namespace): Push the original namespace.
5242 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
5244 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
5245 * semantics.c (begin_class_definition): Clear it.
5247 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
5249 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
5250 (genrtl_expr_stmt): Likewise.
5251 (genrtl_decl_stmt): Likewise.
5252 (genrtl_if_stmt): Likewise.
5253 (genrtl_while_stmt): Likewise.
5254 (genrtl_do_stmt): Likewise.
5255 (genrtl_return_stmt): Likewise.
5256 (genrtl_for_stmt): Likewise.
5257 (genrtl_break_stmt): Likewise.
5258 (genrtl_continue_stmt): Likewise.
5259 (genrtl_scope_stmt): Likewise.
5260 (genrtl_switch_stmt): Likewise.
5261 (genrtl_case_label): Likewise.
5262 (genrtl_begin_compound_stmt): Likewise.
5263 (genrtl_finish_compound_stmt): Likewise.
5264 (genrtl_compound_stmt): Likewise.
5265 (genrtl_asm_stmt): Likewise.
5267 * init.c (begin_init_stmts): Remove call to
5268 genrtl_begin_compound_stmt.
5269 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
5271 * semantics.c (lang_expand_stmt): Changed call to
5272 genrtl_compound_stmt to ignore return value.
5274 2000-07-02 Mark Mitchell <mark@codesourcery.com>
5276 * mangle.c (canonicalize_for_substitution): Return the canonical
5279 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
5281 * typeck.c (commonparms): Remove obstack manipulations.
5283 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
5285 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
5287 * Makefile.in (OBJS): Added ../c-semantics.o.
5288 (OBJDEPS): Likewise.
5290 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
5292 (struct stmt_tree): Added comment.
5293 (current_function_name_declared): Removed.
5294 (stmts_are_full_exprs_p): Likewise.
5295 (genrtl_do_pushlevel): Likewise.
5296 (genrtl_clear_out_block): Likewise.
5297 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
5298 (DECL_ANON_UNION_ELEMS): Likewise.
5299 (emit_local_var): Likewise.
5300 (make_rtl_for_local_static): Likewise.
5301 (do_case): Likewise.
5302 (expand_stmt): Likewise.
5303 (genrtl_decl_cleanup): Likewise.
5304 (c_expand_asm_operands): Likewise.
5305 (c_expand_return): Likewise.
5306 (c_expand_start_case): Likewise.
5308 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
5309 (emit_local_var): Likewise.
5310 (initialize_local_var): Change reference to
5311 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5312 Change reference to stmts_are_full_exprs_p to
5313 current_stmt_tree->stmts_are_full_exprs_p.
5314 (push_cp_function_context): Likewise.
5316 * expect.c (expand_throw): Change reference to
5317 stmts_are_full_exprs_p.
5319 * init.c (build_aggr_init): Change reference to
5320 stmts_are_full_exprs_p.
5321 (build_vec_init): Likewise.
5323 * optimize.c (maybe_clone_body): Change reference to
5324 current_function_name_declared to
5325 cp_function_chain->name_declared.
5327 * pt.c (instantiate_decl): Change reference to
5328 current_function_name_declared to
5329 cp_function_chain->name_declared.
5331 * semantics.c (expand_cond): Moved declaration to c-common.h.
5332 (genrtl_do_pushlevel): Moved to c-semantics.c.
5333 (genrtl_clear_out_block): Likewise.
5334 (genrtl_goto_stmt): Likewise.
5335 (genrtl_expr_stmt): Likewise.
5336 (genrtl_decl_stmt): Likewise.
5337 (gerntl_if_stmt): Likewise.
5338 (genrtl_while_stmt): Likewise.
5339 (genrtl_do_stmt): Likewise.
5340 (genrtl_return_stmt): Likewise.
5341 (genrtl_for_stmt): Likewise.
5342 (genrtl_break_stmt): Likewise.
5343 (genrtl_continue_stmt): Likewise.
5344 (genrtl_scope_stmt): Likewise.
5345 (genrtl_switch_stmt): Likewise.
5346 (genrtl_case_label): Likewise.
5347 (genrtl_begin_compound_stmt): Likewise.
5348 (genrtl_finish_compound_stmt): Likewise.
5349 (genrtl_compound_stmt): Likewise.
5350 (genrtl_asm_stmt): Likewise.
5351 (genrtl_decl_cleanup): Likewise.
5352 (expand_cond): Likewise.
5353 (expand_stmt): Renamed to ...
5354 (lang_expand_stmt): ... this.
5355 (lang_expand_expr_stmt): Initialize.
5356 (set_current_function_name_declared): Likewise.
5357 (stmts_are_full_exprs_p): Likewise.
5358 (current_function_name_declared): Likewise.
5359 (anon_aggr_type_p): Likewise.
5360 (do_poplevel): Change reference to
5361 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5362 Change reference to stmts_are_full_exprs_p to
5363 current_stmt_tree->stmts_are_full_exprs_p.
5364 (add_tree): Likewise.
5365 (finish_expr_stmt): Likewise.
5366 (prep_stmt): Likewise.
5367 (lang_expand_stmt): Likewise.
5368 (begin_compound_stmt): Change reference to
5369 current_function_name_declared to
5370 cp_function_chain->name_declared and call to
5371 current_function_name_declared().
5372 (setup_vtbl_ptr): Likewise.
5373 (genrtl_do_poplevel): Removed.
5375 2000-06-30 Jason Merrill <jason@redhat.com>
5377 * init.c (init_init_processing): Go back to aligning like
5378 double_type_node for old ABI.
5379 (get_cookie_size): Make cookie larger if we get a type that needs
5381 (build_vec_delete): Call it.
5383 * typeck.c (qualify_type_recursive): New fn.
5384 (composite_pointer_type): Use it.
5385 (build_binary_op): Use composite_pointer_type.
5387 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
5388 Jason Merrill <jason@redhat.com>
5390 * typeck.c (check_return_expr): Don't complain about returning
5391 NULL from operator new if -fcheck-new.
5392 * cp-tree.h: Declare flag_check_new here.
5395 2000-06-28 Alex Samuel <samuel@codesourcery.com>
5397 * mangle.c (find_substitution): Use same_type_p.
5398 (write_encoding): Don't check for substitutions.
5400 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
5402 * parse.y (expr_no_comma_rangle): New non-terminal.
5403 (template_parm): Use it for default parameter case.
5404 (template_arg): Use it.
5405 (expr_no_commas): Remove commented out undefined extensions.
5406 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5407 * parse.h, parse.c: Rebuilt.
5409 2000-06-30 Mark Mitchell <mark@codesourcery.com>
5411 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
5412 (finish_asm_stmt): Do it here, instead.
5414 * cp-tree.h (ridpointers): Don't declare.
5415 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
5416 (record_builtin_java_type): Likewise.
5417 (init_decl_processing): Likewise.
5418 * lex.c: Move inclusion of lex.h.
5419 (ridpointers): Don't define.
5420 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
5422 * lex.h (enum rid): Rename to ...
5423 (enum cp_rid): ... this.
5424 (ridpointers): Don't declare.
5425 * parse.y: Move inclusion of lex.h.
5426 * parse.c: Regenerated.
5427 * spew.c: Move inclusion of lex.h.
5429 * cp-tree.h (struct language_function): Remove temp_name_counter.
5430 (temp_name_counter): Remove.
5431 (get_temp_name): Change prototype.
5432 (get_guard): New function.
5433 (get_guard_cond): Likewise.
5434 (set_guard): Likewise.
5435 * cvt.c (build_up_reference): Adjust call to get_temp_name.
5436 * decl.c (expand_static_init): Use get_guard and friends to
5437 implement guard variables.
5438 * decl2.c (get_temp_name): Assume that the variables created are
5440 (get_sentry): Rename to ...
5441 (get_guard): ... this. Implement new ABI guard variables.
5442 (get_guard_bits): New function.
5443 (get_guard_cond): Likewise.
5444 (set_guard): Likewise.
5445 (start_static_initialization_or_destruction): Use them.
5446 (do_static_initialization): Replace sentry with guard throughout.
5447 (do_static_destruction): Likewise.
5448 * init.c (create_temporary_var): Add comment.
5450 2000-06-28 Alex Samuel <samuel@codesourcery.com>
5452 * mangle.c (find_substitution): Use same_type_p.
5453 (write_encoding): Don't check for substitutions.
5455 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
5457 * parse.y (expr_no_comma_rangle): New non-terminal.
5458 (template_parm): Use it for default parameter case.
5459 (template_arg): Use it.
5460 (expr_no_commas): Remove commented out undefined extensions.
5461 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5462 * parse.h, parse.c: Rebuilt.
5464 2000-06-29 Mark Mitchell <mark@codesourcery.com>
5466 * cp-tree.h (flag_const_strings): Remove.
5467 (warn_parentheses): Likewise.
5468 (warn_format): Likewise.
5469 (common_type): Likewise.
5470 (default_conversion): Likewise.
5471 (build_binary_op): Likewise.
5472 (cp_build_binary_op): New macro.
5473 * call.c (build_new_op): Use cp_build_binary_op instead of
5475 * class.c (build_vtable_entry_ref): Likewise.
5476 * decl.c (expand_static_init): Likewise.
5477 (compute_array_index_type): Likewise.
5478 (build_enumerator): Likewise.
5479 * decl2.c (delete_sanity): Likewise.
5480 (start_static_initialization_or_destruction): Likewise.
5481 * error.c (dump_type_suffix): Likewise.
5482 * init.c (resolve_offset_ref): Likewise.
5483 (build_new): Likewise.
5484 (build_new_1): Likewise.
5485 (build_vec_delete_1): Likewise.
5486 (build_vec_init): Likewise.
5487 (build_delete): Likewise.
5488 * rtti.c (synthesize_tinfo_fn): Likewise.
5489 (synthesize_tinfo_var): Likewise.
5490 * search.c (expand_upcast_fixups): Likewise.
5491 (fixup_all_virtual_upcast_offsets): Likewise.
5492 * typeck.c (build_array_ref): Likewise.
5493 (get_member_function_from_ptrfunc): Likewise.
5494 (build_binary_op): Add parameter.
5495 (pointer_int_sum): Use cp_build_binary_op.
5496 (pointer_diff): Likewise.
5497 (build_modify_expr): Likewise.
5498 (get_delta_difference): Likewise.
5499 (build_ptrmemfunc): Likewise.
5501 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
5503 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
5504 * decl.c (create_implicit_typedef): Adjust.
5505 * decl2.c (build_artificial_parm): Adjust.
5506 * method.c (implicitly_declare_fn): Adjust.
5507 * pt.c (push_inline_template_parms_recursive): Adjust.
5508 (process_template_parm): Adjust.
5509 (overloaded_template_name): Adjust.
5510 * semantics.c (finish_template_template_parm): Adjust.
5512 2000-06-28 Mark Mitchell <mark@codesourcery.com>
5514 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
5515 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
5516 where to emit thunks.
5517 (build_vtt): Adjust call to build_vtt_inits.
5518 (build_vtt_inits): Add parameter to indicate whether or not
5519 sub-VTTs for virtual bases should be included. Adjust handling of
5520 construction vtables.
5521 (get_matching_base): New function.
5522 (dfs_build_vtt_inits): Rename to ...
5523 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
5524 construction vtables.
5525 (dfs_fixup_binfo_vtbls): Likewise.
5526 (build_ctor_vtbl_groups): Build construction vtables for virtual
5528 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
5529 to build construction vtbls.
5530 (dfs_accumulate_vtbl_inits): Adjust handling of
5531 construction vtables.
5533 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
5536 2000-06-27 Mark Mitchell <mark@codesourcery.com>
5538 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
5540 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
5542 * search.c (hides): Remove.
5543 (is_subobject_of_p): Add most_derived parameter. Use
5545 (lookup_field_queue_p): Adjust.
5546 (lookup_field_r): Adjust.
5548 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
5550 * decl2.c (handle_class_head): Bash typedefs to the type's main
5553 2000-06-25 Mark Mitchell <mark@codesourcery.com>
5555 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
5556 (begin_global_stmt_expr): ... this.
5557 (genrtl_finish_stmt_expr): Rename to ...
5558 (finish_global_stmt_expr): ... this.
5559 * init.c (begin_init_stmts): Adjust calls.
5560 (finish_init_stmts): Likewise.
5561 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
5562 (begin_global_stmt_expr): ... this.
5563 (genrtl_finish_stmt_expr): Rename to ...
5564 (finish_global_stmt_expr): ... this.
5566 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5568 * search.c (lookup_member): Fix typo in comment.
5570 2000-06-24 Jason Merrill <jason@redhat.com>
5572 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
5573 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
5575 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5577 * parse.y (complex_direct_notype_declarator): Support global_scope.
5578 * Makefile.in: Adjust conflict count.
5580 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5582 * parse.y (template_arg): Convert TEMPLATE_DECL
5583 that is a template template paramter to
5584 TEMPLATE_TEMPLATE_PARM here.
5586 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
5587 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
5588 (copy_template_template_parm): Adjust prototype.
5589 * decl.c (grokdeclarator): Remove dead code.
5590 * pt.c (process_template_parm): Tidy.
5591 (lookup_template_class): Construct nodes in
5592 copy_template_template_parm.
5593 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
5594 lookup_template_class. Use TYPE_TI_TEMPLATE.
5595 * tree.c (copy_template_template_parm): Add NEWARGS
5597 (mapcar): Adjust call to copy_template_template_parm.
5598 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
5599 * method.c (build_template_template_parm_names): Change error
5600 code to avoid compilation warning.
5602 * gxxint.texi: Document template template parameter
5605 2000-06-21 Alex Samuel <samuel@codesourcery.com>
5607 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
5608 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
5609 (cp-demangle.o): New rule.
5610 (dyn-string.o): Likewise.
5611 * inc/cxxabi.h (__cxa_demangle): New declaration.
5613 2000-06-22 Mark Mitchell <mark@codesourcery.com>
5615 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
5616 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
5617 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
5619 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
5620 (make_thunk): Change prototype.
5621 (emit_thunk): Rename to use_thunk.
5622 (mangle_thunk): Change prototype.
5623 * class.c (get_derived_offset): Simplify.
5624 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
5625 BV_GENERATE_THUNK_WITH_VTABLE_P.
5626 (build_primary_vtable): Simplify.
5627 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
5628 (dfs_find_base): Remove.
5629 (update_vtable_entry_for_fn): Correct bug in finding the base
5630 where a virtual function was first declared. Figure out whether
5631 or not to emit a vcall-thunk with the vtables in which it appears.
5632 Correct logic for deciding whether to use an ordinary thunk, or a
5634 (finish_struct_1): Remove unnecssary code.
5635 (build_vtbl_initializer): Use ssize_int for the running counter of
5637 (build_vtbl_initializer): Only use vcall thunks where necessary.
5638 Mark thunks as needing to be emitted with their vtables, or not.
5639 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
5640 indices. Use size_binop.
5641 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
5642 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
5644 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
5645 (build_vtable_entry): Mark thunks as needing to be emitted with
5646 their vtables, or not.
5647 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
5648 * decl2.c (mark_vtable_entries): Use use_thunk instead of
5650 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
5652 * error.c (dump_expr): Use BV_FN.
5653 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
5655 * method.c (make_thunk): Likewise.
5656 (emit_thunk): Rename to use_thunk. Allow callers to decide
5657 whether or not to actually emit the thunk. Adjust for changes in
5658 representation of vcall offsets.
5659 * search.c (dfs_get_pure_virtuals): Use BV_FN.
5660 * semantics.c (emit_associated_thunks): New function.
5661 (expand_body): Use it.
5662 * ir.texi: Adjust decriptions of thunks.
5664 2000-06-22 Jason Merrill <jason@redhat.com>
5666 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
5667 (tsubst_friend_function): Copy it here.
5669 * decl.c (grok_op_properties): Fix typo.
5671 * decl2.c (delete_sanity): Clarify warning, avoid failure on
5674 * pt.c (check_explicit_specialization): Clarify error.
5676 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
5677 an old OVERLOAD when we're declaring a non-function.
5678 (pushdecl, destroy_local_var): Check for error_mark_node.
5679 (warn_extern_redeclared_static): Also bail early if
5681 (push_overloaded_decl): Ignore an old error_mark_node.
5683 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
5685 * call.c (build_x_va_arg): Check if in a template decl.
5686 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
5688 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
5690 * class.c (push_lang_context): TYPE_NAME gets you to the Java
5692 * decl.c (check_goto): Computed gotos assumed OK.
5694 2000-06-20 Jason Merrill <jason@redhat.com>
5696 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
5697 for which we don't need to look for instantiations.
5699 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
5701 * parse.y (program): Always call finish_translation_unit.
5702 * parse.c, parse.h: Rebuilt.
5704 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
5706 * method.c: Don't include hard-reg-set.h.
5708 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
5710 * rtti.c (get_base_offset): Cope when vbase field is in a base.
5712 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
5714 * call.c (build_conditional_expr): Use VOID_TYPE_P.
5715 * cvt.c (cp_convert_to_pointer): Likewise.
5716 (convert_to_void): Likewise.
5717 * error.c (dump_expr): Likewise.
5718 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
5719 * init.c (build_delete): Likewise.
5720 * method.c (emit_thunk): Likewise.
5721 * optmize.c (declare_return_variable): Likewise.
5722 * rtti.c (get_tinfo_decl_dynamic): Likewise.
5723 (get_typeid): Likewise.
5724 (build_dynamic_cast_1): Likewise.
5725 * typeck.c (composite_pointer_type): Likewise.
5726 (common_type): Likewise.
5727 (build_indirect_ref): Likewise.
5728 (build_binary_op): Likewise.
5729 (build_x_compound_expr): Likewise.
5730 (check_return_expr): Likewise.
5731 * typeck2.c (add_exception_specifier): Likewise.
5733 * mangle.c (write_method_parms): Use direct comparison for end
5736 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
5738 * cp-tree.h (genrtl_try_block): Declare function.
5739 (genrtl_handler): Likewise.
5740 (genrtl_catch_block): Likewise.
5741 (genrtl_ctor_stmt): Likewise.
5742 (genrtl_subobject): Likewise.
5743 (genrtl_decl_cleanup): Likewise.
5744 (genrtl_do_poplevel): Likewise.
5745 (genrtl_do_pushlevel): Likewise.
5746 (genrtl_clear_out_block): Likewise.
5747 (genrtl_goto_stmt): Likewise.
5748 (genrtl_expr_stmt): Likewise.
5749 (genrtl_decl_stmt): Likewise.
5750 (genrtl_if_stmt): Likewise.
5751 (genrtl_while_stmt): Likewise.
5752 (genrtl_do_stmt): Likewise.
5753 (genrtl_return_stmt): Likewise.
5754 (genrtl_for_stmt): Likewise.
5755 (genrtl_break_stmt): Likewise.
5756 (genrtl_continue_stmt): Likewise.
5757 (genrtl_scope_stmt): Likewise.
5758 (genrtl_switch_stmt): Likewise.
5759 (genrtl_case_label): Likewise.
5760 (genrtl_begin_compound_stmt): Likewise.
5761 (genrtl_finish_compound_stmt): Likewise.
5762 (genrtl_compound_stmt): Likewise.
5763 (genrtl_asm_stmt): Likewise.
5764 (genrtl_named_return_value): Likewise.
5765 (genrtl_begin_stmt_expr): Likewise.
5766 (genrtl_finish_stmt_expr): Likewise.
5767 (finish_for_stmt): Removed first argument.
5768 (finish_switch_stmt): Likewise.
5770 * semantics.c (genrtl_try_block): Define function.
5771 (genrtl_handler): Likewise.
5772 (genrtl_catch_block): Likewise.
5773 (genrtl_ctor_stmt): Likewise.
5774 (genrtl_subobject): Likewise.
5775 (genrtl_decl_cleanup): Likewise.
5776 (genrtl_do_poplevel): Likewise.
5777 (genrtl_do_pushlevel): Likewise.
5778 (genrtl_clear_out_block): Likewise.
5779 (genrtl_goto_stmt): Likewise.
5780 (genrtl_expr_stmt): Likewise.
5781 (genrtl_decl_stmt): Likewise.
5782 (genrtl_if_stmt): Likewise.
5783 (genrtl_while_stmt): Likewise.
5784 (genrtl_do_stmt): Likewise.
5785 (genrtl_return_stmt): Likewise.
5786 (genrtl_for_stmt): Likewise.
5787 (genrtl_break_stmt): Likewise.
5788 (genrtl_continue_stmt): Likewise.
5789 (genrtl_scope_stmt): Likewise.
5790 (genrtl_switch_stmt): Likewise.
5791 (genrtl_case_label): Likewise.
5792 (genrtl_begin_compound_stmt): Likewise.
5793 (genrtl_finish_compound_stmt): Likewise.
5794 (genrtl_compound_stmt): Likewise.
5795 (genrtl_asm_stmt): Likewise.
5796 (genrtl_named_return_value): Likewise.
5797 (genrtl_begin_stmt_expr): Likewise.
5798 (genrtl_finish_stmt_expr): Likewise.
5799 (finish_for_stmt): Removed first argument and generate rtl
5801 (finish_switch_stmt): Likewise.
5802 (do_poplevel): Removed generate rtl specific code.
5803 (do_pushlevel): Likewise.
5804 (add_tree): Likewise.
5805 (finish_goto_stmt): Likewise.
5806 (finish_expr_stmt): Likewise.
5807 (begin_if_stmt): Likewise.
5808 (finish_if_stmt_cond): Likewise.
5809 (finish_then_clause): Likewise.
5810 (begin_else_clause): Likewise.
5811 (finish_else_clause): Likewise.
5812 (finish_if_stmt): Likewise.
5813 (clear_out_block): Likewise.
5814 (begin_while_stmt): Likewise.
5815 (finish_while_stmt_cond): Likewise.
5816 (finish_while_stmt): Likewise.
5817 (begin_do_stmt): Likewise.
5818 (finish_do_body): Likewise.
5819 (finish_do_stmt): Likewise.
5820 (finish_return_stmt): Likewise.
5821 (begin_for_stmt): Likewise.
5822 (finish_for_init_stmt): Likewise.
5823 (finish_for_cond): Likewise.
5824 (finish_for_expr): Likewise.
5825 (finish_break_stmt): Likewise.
5826 (finish_continue_stmt): Likewise.
5827 (begin_switch_stmt): Likewise.
5828 (finish_switch_cond): Likewise.
5829 (finish_case_label): Likewise.
5830 (begin_try_block): Likewise.
5831 (begin_function_try_block): Likewise.
5832 (finish_try_block): Likewise.
5833 (finish_cleanup_try_block): Likewise.
5834 (finish_cleanup): Likewise.
5835 (finish_function_try_block): Likewise.
5836 (finish_handler_sequence): Likewise.
5837 (finish_function_handler_sequence): Likewise.
5838 (begin_handler): Likewise.
5839 (finish_handler_parms): Likewise.
5840 (begin_catch_block): Likewise.
5841 (finish_handler): Likewise.
5842 (begin_compound_stmt): Likewise.
5843 (finish_compound_stmt): Likewise.
5844 (finish_asm_stmt): Likewise.
5845 (finish_label_stmt): Likewise.
5846 (finish_label_decl): Likewise.
5847 (finish_subobject): Likewise.
5848 (finish_decl_cleanup): Likewise.
5849 (finish_named_return_value): Likewise.
5850 (begin_stmt_expr): Likewise.
5851 (finish_stmt_expr): Likewise.
5853 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
5854 to call genrtl_expr_stmt when appropriate.
5856 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
5857 begin_compound_expr to call genrtl_begin_stmt_expr and
5858 genrtl_begin_compound_expr when appropriate.
5859 (finish_init_stmts): Changed calls to finish_compound_expr and
5860 finish_stmt_expr to call genrtl_finish_compound_expr and
5861 genrtl_finish_stmt_expr when appropriate.
5862 (expand_default_init): Changed call to finish_expr_stmt to call
5863 genrtl_expr_stmt when appropriate.
5864 (build_vec_init): Likewise.
5866 * parse.y (simple_stmt): Removed first argument from call to
5867 finish_for_stmt. Removed first argument from call to
5870 * parse.c: Regenerated.
5872 * pt.c (tsubst_expr): Removed first argument from call to
5873 finish_for_stmt. Removed first argument from call to
5876 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
5878 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
5879 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
5881 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
5882 (cplus_tree_code_length[]): Likewise.
5883 (cplus_tree_code_name[]): Likewise.
5884 (init_parse): Added call to add_c_tree_codes. Changed
5885 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
5887 2000-06-16 Mark Mitchell <mark@codesourcery.com>
5889 * cp-tree.h (finish_mem_initializers): Declare.
5890 (count_trees): Likewise.
5891 * parse.y (base_init): Use finish_mem_initializers.
5892 * semantics.c (finish_mem_initializers): New function.
5894 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
5895 the number of trees.
5897 (count_trees): Don't use it.
5899 2000-06-15 Jason Merrill <jason@redhat.com>
5901 * tree.c (count_trees): New debugging function.
5903 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
5904 * init.c (build_member_call): Pull out the name of a DECL.
5906 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
5907 * semantics.c (expand_body): Push to TV_INTEGRATION here.
5908 * optimize.c (optimize_function): Not here.
5909 * pt.c (instantiate_decl): Push to TV_PARSE.
5911 2000-06-15 Mark Mitchell <mark@codesourcery.com>
5913 * cp-tree.h (struct language_function): Remove x_base_init_list
5914 and x_member_init_list.
5915 (current_base_init_list): Remove.
5916 (current_member_init_list): Likewise.
5917 (setup_vtbl_ptr): Change prototype.
5918 (emit_base_init): Likewise.
5919 (expand_member_init): Likewise.
5920 (reinit_parse_for_function): Remove.
5921 * decl.c (save_function_data): Don't clear x_base_init_list and
5923 (mark_language_function): Don't mark them.
5924 * init.c (perform_member_init): Tweak comment.
5925 (sort_member_init): Take the list of initializers as an argument.
5926 (sort_base_init): Likewise.
5927 (emit_base_init): Likewise.
5928 (expand_member_init): Return the initializer. Don't use global
5930 * lex.c (reinit_parse_for_function): Remove.
5931 * method.c (build_template_parm_names): Correct substitution.
5932 (do_build_copy_constructor): Don't use current_member_init_list
5933 and current_base_init_list.
5934 (synthesize_method): Likewise.
5935 * parse.y (base_init): Split mem-initializers into
5936 base-initializers and field-initializers.
5937 (member_init_list): Build up the list here.
5938 (member_init): Return the initializer.
5939 (fn.depfn): Don't use reinit_parse_for_function.
5940 * parse.c: Regenerated.
5941 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
5943 (tsubst_expr): Don't use current_member_init_list
5944 and current_base_init_list.
5945 (tsubst_expr_values): Rename to ...
5946 (tsubst_initializer_list): ... this. Use convert_from_reference.
5947 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
5948 and current_base_init_list.
5949 (begin_function_definition): Don't call reinit_parse_for_function.
5951 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
5953 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
5956 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
5958 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
5960 * cp-tree.h (IF_COND): Move to c-common.h.
5961 (THEN_CLAUSE): Likewise.
5962 (ELSE_CLAUSE): Likewise.
5963 (WHILE_COND): Likewise.
5964 (WHILE_BODY): Likewise.
5965 (DO_COND): Likewise.
5966 (DO_BODY): Likewise.
5967 (RETURN_EXPR): Likewise.
5968 (EXPR_STMT_EXPR): Likewise.
5969 (FOR_INIT_STMT): Likewise.
5970 (FOR_COND): Likewise.
5971 (FOR_EXPR): Likewise.
5972 (FOR_BODY): Likewise.
5973 (SWITCH_COND): Likewise.
5974 (SWITCH_BODY): Likewise.
5975 (CASE_LOW): Likewise.
5976 (CASE_HIGH): Likewise.
5977 (GOTO_DESTINATION): Likewise.
5978 (COMPOUND_BODY): Likewise.
5979 (ASM_CV_QUAL): Likewise.
5980 (ASM_STRING): Likewise.
5981 (ASM_OUTPUTS): Likewise.
5982 (ASM_INPUTS): Likewise.
5983 (ASM_CLOBBERS): Likewise.
5984 (DECL_STMT_DECL): Likewise.
5985 (STMT_EXPR_STMT): Likewise.
5986 (LABEL_STMT_LABEL): Likewise.
5987 (SCOPE_BEGIN_P): Likewise.
5988 (SCOPE_END_P): Likewise.
5989 (SCOPE_STMT_BLOCK): Likewise.
5990 (SCOPE_NULLIFIED_P): Likewise.
5991 (SCOPE_NO_CLEANUPS_P): Likewise.
5992 (SCOPE_PARTIAL_P): Likewise.
5993 (ASM_VOLATILE_P): Likewise.
5994 (STMT_LINENO): Likewise.
5995 (STMT_LINENO_FOR_FN_P): Likewise.
5997 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
5998 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
5999 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
6000 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
6001 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
6003 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
6005 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
6006 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
6008 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
6009 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
6010 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
6012 2000-06-14 Mark Mitchell <mark@codesourcery.com>
6014 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
6015 * class.c (dfs_find_final_overrider): Set it appropriately.
6016 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
6017 avoid unneeded secondary vptrs.
6019 2000-06-13 Jakub Jelinek <jakub@redhat.com>
6021 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
6022 (check_bitfield_decl, check_field_decl): Likewise.
6023 (build_vtbl_or_vbase_field, build_base_field): Likewise.
6024 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
6025 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
6026 (xfer_tag, finish_enum): Likewise.
6027 * decl2.c (finish_builtin_type): Likewise.
6028 * init.c (init_init_processing): Likewise.
6029 * pt.c (instantiate_class_template): Likewise.
6030 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
6031 * cp-tree.h (struct lang_type): Add user_align member.
6032 (CLASSTYPE_USER_ALIGN): Define.
6034 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
6036 * Make-lang.in (c++.install-common): Install g++-cross in
6037 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
6038 $(target_alias)-g++ and $(target_alias)-c++.
6040 2000-06-12 Mark Mitchell <mark@codesourcery.com>
6042 * class.c (vcall_offset_data_s): Add last_init and fns.
6043 (overrides): Rename to same_signature_p.
6044 (dfs_find_final_overrider): Adjust accordingly.
6045 (mark_overriders): Likewise.
6046 (warn_hidden): Likewise.
6047 (build_vtbl_initializer): Reorganize machinery for building things
6048 at negative offsets.
6049 (build_vcall_and_vbase_vtbl_entries): Likewise.
6050 (build_vbase_offset_vtbl_entries): Likewise.
6051 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
6052 offset entries. Do not create two entries for functions with the
6054 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
6055 (build_rtti_vtbl_entries): Reorganize machinery for building things
6056 at negative offsets.
6058 * optimize.c (expand_call_inline): Don't recurse into the code
6059 used to initialize the parameters more than once.
6061 2000-06-11 Mark Mitchell <mark@codesourcery.com>
6063 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
6064 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
6065 (find_substitution): Only use the `Sa' substitution for
6066 std::allocator, not instantiations of it.
6067 (write_template_prefix): Move comment. Only use a TREE_LIST to
6068 represent substitutions for a member template.
6069 (write_array_type): Mangle array dimensions correctly.
6070 * optimize.c (maybe_clone_body): Copy more information from the
6072 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
6073 on the regenerated declaration.
6075 2000-06-11 Chip Salzenberg <chip@valinux.com>
6076 Mark Mitchell <mark@codesourcery.com>
6078 * class.c (build_vtable): Clarify comment.
6079 (build_ctor_vtbl_group): Pass the most derived type to
6082 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6084 * decl2.c (compare_options): Don't needlessly cast away const-ness.
6086 2000-06-10 Mark Mitchell <mark@codesourcery.com>
6088 * decl.c (add_binding): Handle duplicate declarations of external
6091 2000-06-09 Chip Salzenberg <chip@valinux.com>
6092 Mark Mitchell <mark@codesourcery.com>
6094 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
6096 (write_signed_number): New macro.
6097 (write_unsigned_number): Likewise.
6098 (write_source_name): Use them.
6099 (write_number): Handle signed and unsigned values.
6100 (write_integer_cst): Use tree_int_cst_sgn, and use
6101 write_unsigned_number or write_signed_number as appropriate.
6102 (write_discriminator): Use write_unsigned_number or
6103 write_signed_number as appropriate.
6104 (write_template_arg_literal): Likewise.
6105 (write_array_type): Use tree_low_cst.
6106 (write_template_parm): Use write_unsigned_number or
6107 write_signed_number as appropriate.
6108 (write_substitution): Adjust call to write_number.
6109 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
6110 (write_expression): Handle non-type template arguments of
6111 reference type correctly.
6112 (mangle_thunk): Use write_signed_number.
6114 2000-06-09 Chip Salzenberg <chip@valinux.com>
6116 * mangle.c (find_substition): Don't mangle objects with typename
6117 substitutions (e.g. "cin" as "Si").
6119 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
6121 * call.c (add_candidate): Use ggc_alloc_cleared.
6122 * decl.c (lookup_label): Likewise.
6123 * lex.c (retrofit_lang_decl): Likewise.
6125 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
6127 * semantics.c (expand_body): Push to TV_EXPAND.
6128 * optimize.c (optimize_function): Push to TV_INTEGRATION.
6129 * decl.c (start_function): Always call announce_function.
6131 * tinfo2.cc: Just declare abort.
6133 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
6135 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
6136 whenever @ is a symbolic name.
6138 2000-06-08 Jakub Jelinek <jakub@redhat.com>
6140 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
6142 2000-06-07 Mark Mitchell <mark@codesourcery.com>
6144 * decl.c (pushdecl): Look up functions by DECL_NAME, not
6145 DECL_ASSEMBLER_NAME.
6147 2000-06-06 Mark Mitchell <mark@codesourcery.com>
6149 * decl2.c (c_language): Define.
6151 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
6153 * lex.c (lang_init_options): Tweak.
6155 * decl2.c: Remove #inclusion of diagnostic.h
6156 (lang_decode_option): Move diagnostic formatting options to
6159 * lang-options.h: Remove documentation for diagnostic options.
6161 * Makefile.in (lex.o): Depends upon diagnostic.h
6163 2000-06-06 Mark Mitchell <mark@codesourcery.com>
6165 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
6166 the same DECL_RESULT, it's not a redefinition.
6167 * pt.c (tsubst_decl): Remove code to handle illegal
6170 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
6172 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
6174 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
6176 * search.c (maybe_suppress_debug_info): Don't check
6177 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
6179 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
6182 Remember instantiation context in deferred instantiations.
6183 * cp-tree.h (struct tinst_level): Remove.
6184 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
6185 * pt.c (current_tinst_level): Now a tree.
6186 (print_template_context, push_tinst_level, pop_tinst_level,
6187 tinst_for_decl): Adjust.
6188 (reopen_tinst_level): New fn.
6189 (init_pt): Register current_tinst_level as a root.
6190 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
6191 of the pending templates list.
6192 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
6193 * lex.c (extract_interface_info): Adjust.
6194 * decl2.c (warn_if_unknown_interface): Adjust.
6196 2000-06-05 Mark Mitchell <mark@codesourcery.com>
6198 * class.c (indirect_primary_base_p): New function.
6199 (determine_primary_base): Use it.
6201 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
6203 Update new-abi dynamic cast algorithm.
6204 * tinfo.cc (__class_type_info::__dyncast_result): Add
6205 whole_details. Adjust constructor.
6206 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
6207 Avoid unnecessary searching.
6208 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
6210 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6212 * decl.c (init_decl_processing): Don't call record_component_aliases.
6213 * tree.c (build_cplus_array_type_1): Likewise.
6215 2000-06-04 Mark Mitchell <mark@codesourcery.com>
6217 * ir.texi: Correct typo.
6218 * mangle.c (write_expression): Handle non-type template arguments
6219 with reference type.
6220 * method.c (build_overload_value): Likewise.
6221 * pt.c (convert_nontype_argument): Explicitly represent conversion
6222 to a reference with an ADDR_EXPR.
6223 (unify): Always unify arguments in left-to-right order.
6225 2000-06-03 Alex Samuel <samuel@codesourcery.com>
6226 Mark Mitchell <mark@codesourcery.com>
6228 * Make-lang.in (CXX_SRCS): Add mangle.c.
6229 * Makefile.in (CXX_OBJS): Add mangle.o.
6230 (mangle.o): New rule.
6232 * class.c (local_classes): New variable.
6233 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
6234 (get_vtt_name): Use mangle_vtt_name for new ABI.
6235 (init_class_processing): Initialize local_classes.
6236 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
6237 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
6238 (std_identifier): New macro.
6239 (DECL_VOLATILE_MEMFUNC_P): New macro.
6240 (DECL_NAMESPACE_STD_P): Likewise.
6241 (local_classes): Declare.
6242 (get_mostly_instantiated_function_type): Declare.
6243 (init_mangle): Declare.
6244 (mangle_decl): Likewise.
6245 (mangle_type_string): Likewise.
6246 (mangle_type): Likewise.
6247 (mangle_typeinfo_for_type): Likewise.
6248 (mangle_typeinfo_string_for_type): Likewise.
6249 (mangle_vtbl_for_type): Likewise.
6250 (mangle_vtt_for_type): Likewise.
6251 (mangle_ctor_vtbl_for_type): Likewise.
6252 (mangle_thunk): Likewise.
6253 (mangle_conv_op_name_for_type): Likewise.
6254 (mangle_guard_variable): Likewise.
6255 * decl.c (pushtag): Keep track of local classes.
6256 (initialize_predefined_identifiers): Initialize std_identifier.
6257 (init_decl_processing): Use std_identifier.
6258 (start_decl): Don't treat instantiations as specializations.
6259 (grokdeclarator): Likewise.
6260 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
6261 name for fully-instantiated templates.
6262 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
6263 destructors with the new ABI.
6264 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
6265 (grokfield): Use mangle_type for new ABI.
6266 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
6267 (get_sentry): Use mangle_guard_variable for new ABI.
6268 (start_static_initialization_or_destruction): Likewise.
6269 * expr.c (extract_aggr_init): Remove.
6270 (extract_scalar_init): Likewise.
6271 (extract_init): Remove #if 0'd code.
6272 * mangle.c: New function.
6273 * method.c (build_mangled_name): Assert not flag_new_abi.
6274 (build_static_name): Likewise.
6275 (build_decl_overload_real): Likewise.
6276 (build_typename_overload): Likewise.
6277 (build_overload_with_type): Likewise.
6278 (build_overload_name): Likewise.
6279 (get_ctor_vtbl_name): Likewise.
6280 (start_squangling): Likewise.
6281 (get_id_2): Likewise.
6282 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
6283 (init_method): Call init_mangle for new ABI.
6284 (make_thunk): Call mangle_thunk for new ABI.
6285 * operators.def: Correct new ABI manglings for the `%' operator.
6287 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
6288 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
6289 (lookup_template_class): Call mangle_decl for new ABI.
6290 (get_mostly_instantiated_function_type): New function.
6291 (set_mangled_name_for_template_decl): Use it.
6292 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
6293 the new ABI. Use mangle_conv_op_name_for_type for instantiated
6294 conversion op names.
6295 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
6296 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
6297 (tinfo_base_init): Likewise. Mangle typeinfo string name with
6298 mangle_typeinfo_string_for_type.
6300 2000-06-03 Mark Mitchell <mark@codesourcery.com>
6302 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
6303 (INNERMOST_TEMPLATE_ARGS): New macro.
6304 (innermost_args): Remove.
6305 (get_innermost_template_args): New function.
6306 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
6307 * error.c (dump_function_decl): Be caution when using
6308 most_general_template.
6309 * method.c (build_template_parm_names): Use
6310 INNERMOST_TEMPLATE_ARGS.
6311 * pt.c (add_to_template_args): Tidy comment
6312 (get_innermost_template_args): New function.
6313 (check_explicit_specialization): Clear DECL_INITIAL for a new
6315 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
6317 (push_template_decl): Always register specializations of the most
6319 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
6320 (coerce_template_parms): Likewise.
6321 (lookup_template_class): Likewise.
6322 (innermost_args): Remove.
6323 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
6324 (tsubst_decl): Handle tricky specializations. Use
6325 get_innermost_template_args.
6326 (instantiate_template): Simplify handling of partial
6328 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
6329 (most_general_template): Reimplement, in a more straightforward
6331 (regenerate_decl_from_template): Tweak formatting. Use
6332 TMPL_ARGS_DEPTH for clarity.
6333 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
6335 * dump.c (dequeue_and_dump): Dump information about thunks.
6337 2000-06-01 Richard Henderson <rth@cygnus.com>
6339 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
6341 2000-06-01 Richard Henderson <rth@cygnus.com>
6343 * decl2.c (unsupported_options): Fix typo, make const.
6344 (lang_decode_option): Fix bsearch argument order.
6346 2000-06-01 Mark Mitchell <mark@codesourcery.com>
6348 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
6351 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6353 * cp-tree.h (c_get_alias_set): Deleted.
6354 * Makefile.in (decl.o): Include ../expr.h.
6355 * decl.c (expr.h): Include.
6356 (init_decl_processing): Call record_component_aliases for arrays.
6357 (grokdeclarator): Likewise.
6358 Set TREE_ADDRESSABLE for fields that aren't bitfields.
6359 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
6361 2000-05-31 Mark Mitchell <mark@codesourcery.com>
6363 Remove guiding declaration support.
6364 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
6365 (flag_guiding_decls): Remove.
6366 * call.c (build_user_type_conversion_1): Remove support for
6368 (build_new_function_call): Likewise.
6369 (build_new_op): Likewise.
6370 (build_new_method_call): Likewise.
6371 * decl.c (start_function): Likewise.
6372 * friend.c (is_friend): Likewise.
6373 (do_friend): Likewise.
6374 * decl2.c ((flag_dump_translation_unit): Make it const.
6375 (flag_guiding_decls): Remove.
6376 (unsupported_options): New variable
6377 (compare_options): New function.
6378 (lang_decode_option): Use them.
6380 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
6382 * method.c (mangle_expression): Adjust test for legal expression
6385 * pt.c (instantiate_decl): Save and restore the local
6386 specializations list.
6388 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
6390 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
6392 2000-05-30 Mark Mitchell <mark@codesourcery.com>
6394 * call.c (add_template_candidate_real): Handle member template
6395 constructors for classes with virtual bases.
6396 (build_user_type_conversion_1): Use in_charge_arg_for_name.
6397 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
6399 * ir.texi: Update thunk documentation.
6401 * call.c (joust): Fix handling of overloaded builtin operators.
6403 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
6405 * cp-tree.h (DECL_ANTICIPATED): New macro.
6406 Document new use of DECL_LANG_FLAG_7.
6407 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
6408 in the user namespace.
6409 * lex.c (do_identifier): If the identifier's declaration has
6410 DECL_ANTICIPATED on, it has not yet been declared. But do not
6411 replace it with an ordinary implicit declaration.
6413 * tinfo2.cc: Include stdlib.h.
6415 2000-05-29 Mark Mitchell <mark@codesourcery.com>
6417 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
6418 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
6421 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
6423 * decl2.c (lang_decode_option): Use skip_leading_substring instead
6426 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
6428 * operators.def (<?): Duplicated, should have been...
6431 2000-05-27 Alex Samuel <samuel@codesourcery.com>
6432 Mark Mitchell <mark@codesourcery.com>
6434 * cp-tree.h (ansi_opname): Make it a macro.
6435 (ansi_assopname): Likewise.
6436 (struct lang_decl_flags): Add assignment_operator_p.
6437 (struct lang_decl): Add operator_code.
6438 (DECL_VTT_PARM): Adjust.
6439 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
6440 overloaded operator.
6441 (SET_OVERLOADED_OPERATOR_CODE): New macro.
6442 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
6443 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
6444 (opname_tab): Remove.
6445 (assignop_tab): Likewise.
6446 (operator_name_info_t): New type.
6447 (operator_name_info): New variable.
6448 (assignment_operator_name_info): Likewise.
6449 (build_cp_library_fn): Remove declaration.
6450 (push_cp_library_fn): Likewise.
6451 (operator_name_string): Likewise.
6452 (build_decl_overload): Likewise.
6453 * call.c (print_z_candidates): Simplify.
6454 (build_object_call): Adjust usage of ansi_opname. Use
6455 DECL_OVERLOADED_OPERATOR_P.
6456 (op_error): Adjust operator name lookup.
6457 (build_conditional_expr): Adjust usage of ansi_opname.
6458 (build_new_op): Likewise.
6459 (build_op_delete_call): Likewise.
6460 (build_over_call): Likewise.
6461 (joust): Use DECL_OVERLOADED_OPERATOR_P.
6462 * decl.c (duplicate_decls): Copy operator_code.
6463 (init_decl_processing): Adjust parameters to push_cp_library_fn.
6464 (builtin_function): Adjust parameters to build_library_fn_1.
6465 (build_library_fn_1): Accept an overloaded operator code.
6466 (build_library_fn): Pass ERROR_MARK.
6467 (build_cp_library_fn): Accept an overloaded operator code.
6468 (push_cp_library_fn): Likewise.
6469 (grokfndecl): Tweak.
6470 (grokdeclarator): Simplify code to compute names of overloaded
6471 operators. Adjust use of ansi_opname.
6472 (ambi_op_p): Work on tree_codes, not identifiers.
6473 (unary_op_p): Likewise.
6474 (grok_op_properties): Likewise.
6475 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
6476 (lang_mark_tree): Don't try to mark the operator_code.
6477 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
6478 * error.c (dump_decl): Remove special handling for operator
6480 (dump_function_name): Likewise.
6481 (dump_expr): Adjust name lookup of operators.
6482 (op_to_string): Simplify.
6483 (assop_to_string): Likewise.
6484 * init.c (build_new_1): Adjust use of ansi_opname.
6485 * lex.c (opname_tab): Remove.
6486 (assignop_tab): Likewise.
6487 (ansi_opname): Likewise.
6488 (ansi_assopname): Likewise.
6489 (operator_name_string): Likewise.
6490 (reinit_lang_specific): Likewise.
6491 (operator_name_info): New variable.
6492 (assignment_operator_name_info): Likewise.
6493 (init_operators): New function.
6494 (init_parse): Use it.
6495 (do_identifier): Adjust use of ansi_opname.
6496 * method.c (mangle_expression): Don't use ansi_opname for
6498 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
6499 (build_decl_overload): Remove.
6500 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
6501 (do_build_assign_ref): Adjust use of ansi_opname.
6502 (synthesize_method): Likewise.
6503 (implicitly_declare_fn): Likewise.
6504 * operators.def: New file.
6505 * parse.y (operator): Adjust use of ansi_opname.
6506 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
6507 (set_mangled_name_for_template_decl): Don't play games with
6509 (special_function_p): Adjust use of ansi_opname.
6510 * typeck.c (check_return_expr): Likewise.
6511 * Make-lang.in (cc1plus): Depend on operators.def.
6512 * Makefile.in (lex.o): Likewise.
6515 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
6517 * Make-lang.in (cplib2.ready): Eradicate.
6519 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6521 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
6522 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
6523 (built_min, cp_tree_equal): Likewise.
6525 2000-05-26 Mark Mitchell <mark@codesourcery.com>
6527 * class.c (layout_nonempty_base_or_field): Replace
6528 `record_layout_info' with `record_layout_info_s'.
6530 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
6533 * cp-tree.h (struct language_function): x_named_labels is now
6534 a struct named_label_list*.
6535 * decl.c (struct named_label_use_list): Renamed from...
6536 (struct named_label_list): ...this. New struct.
6537 (push_binding_level): Don't set eh_region.
6538 (note_level_for_eh): New fn.
6539 (pop_label): Take label and old value directly.
6540 (pop_labels): Adjust for new named_labels format.
6541 (lookup_label): Likewise.
6542 (poplevel): Note characteristics of a binding level containing a
6543 named label. Mess with named label lists earlier.
6544 (mark_named_label_lists): New fn.
6545 (mark_lang_function): Call it.
6546 (use_label): New fn, split out from...
6547 (make_label_decl): ...here. Don't call it.
6548 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
6549 check_previous_gotos): New fns, split out from...
6550 (define_label): ...here.
6551 (check_switch_goto): New fn.
6552 (define_case_label): Call it.
6553 (check_goto): New fn.
6554 * semantics.c (finish_goto_stmt): Call it and use_label.
6555 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
6556 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
6558 2000-05-26 Mark Mitchell <mark@codesourcery.com>
6560 * class.c (build_vtable_entry_ref): Correct usage of
6561 get_vtbl_decl_for_binfo.
6563 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
6564 * method.c (implicitly_declare_fn): Not here.
6566 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
6568 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
6569 (CPTI_PTMD_DESC_TYPE): ... here.
6570 (ptmd_desc_type_node): Rename to ...
6571 (ptm_desc_type_node): ... here.
6573 * rtti.c (ptmd_initializer): Rename to ...
6574 (ptm_initializer): ... here.
6575 (sythesize_tinfo_var): Adjust. Deal with pointer to member
6577 (create_tinfo_types): Adjust.
6579 2000-05-25 Mark Mitchell <mark@codesourcery.com>
6581 Finish implementation of VTTs.
6582 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
6583 CPTI_VTT_PARM_IDENTIFIER.
6584 (vtt_parm_identifier): New macro.
6585 (vtt_parm_type): Likewise.
6586 (BINFO_SUBVTT_INDEX): Likewise.
6587 (BINFO_VPTR_INDEX): Likewise.
6588 (struct lang_decl): Add vtt_parm.
6589 (DECL_VTT_PARM): New macro.
6590 (DECL_USE_VTT_PARM): Likewise.
6591 (DECL_NEEDS_VTT_PARM_P): Likewise.
6592 (get_vtt_name): Declare.
6593 (build_artifical_parm): Likewise.
6594 (fixup_all_virtual_upcast_offsets): Likewise.
6595 (expand_indirect_vtbls_init): Remove.
6596 * call.c (build_new_method_call): Pass the vtt to subobject
6597 constructors and destructors.
6598 * class.c (get_vtt_name): Give it external linkage.
6599 (build_clone): Handle the magic VTT parameters for clones.
6600 (clone_function_decl): Fix typo in comment.
6601 (build_vtt): Keep track of the indices in the VTTs where various
6602 entities are stored.
6603 (build_vtt_inits): Likewise.
6604 (dfs_build_vtt_inits): Likewise.
6605 (build_ctor_vtbl_group): Tweak type of construction vtables.
6606 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
6607 primary bases, when building construction vtables.
6608 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
6609 (initialize_predefined_identifiers): Add vtt_parm_identifier.
6610 (init_decl_processing): Initialize vtt_parm_type.
6611 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
6612 (lang_mark_tree): Make vtt_parm.
6613 * decl2.c (build_artificial_parm): New function.
6614 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
6615 (grokclassfn): Use build_artificial_parm.
6616 * init.c (initialize_vtbl_ptrs): Call
6617 fixup_all_virtual_upcast_offsets directly.
6618 (perform_member_init): Use the complete subobject destructor for
6620 (build_vtbl_address): New function.
6621 (expand_virtual_init): Handle VTTs.
6622 * optimize (maybe_clone_body): Likewise.
6623 * search.c (fixup_all_virtual_upcast_offsets): Give it external
6625 (expand_indirect_vtbls_init): Remove.
6626 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
6627 * tree.c (make_binfo): Make them bigger.
6629 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
6631 * inc/cxxabi.h (__pbase_type_info): Define, based on
6632 __pointer_type_info.
6633 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
6634 (__pointer_to_member_type_info): Likewise.
6635 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
6636 (__pointer_to_member_type_info::__is_pointer_p): Remove.
6637 (__pointer_type_info::__do_catch): Rename to ...
6638 (__pbase_type_info::__do_catch): ... here. Adjust.
6639 (__pbase_type_info::__pointer_catch): Implement.
6640 (__pointer_type_info::__pointer_catch): Adjust.
6641 (__pointer_to_member_type_info::__pointer_catch): Adjust.
6643 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
6645 * tinfo.h (__user_type_info::contained_virtual_p): New
6647 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
6649 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
6650 diamond shaped heirarchy. Add early out for mixed diamond and
6651 duplicate shaped heirarchy.
6653 2000-05-24 Mark Mitchell <mark@codesourcery.com>
6655 * cp-tree.h (build_delete): Change prototype.
6656 (build_vec_delete): Likewise.
6657 * call.c (build_scoped_method_call): Use special_function_kind
6658 values to indicate the kind of destruction to be done.
6659 (build_method_call): Likewise.
6660 * decl.c (finish_destructor_body): Likewise.
6661 (maybe_build_cleanup_1): Likewise. Rename to ...
6662 (maybe_build_cleanup): ... this.
6663 * decl2.c (delete_sanity): Use special_function_kind
6664 values to indicate the kind of destruction to be done.
6665 (build_cleanup): Likewise.
6666 * init.c (perform_member_init): Likewise.
6667 (build_vec_delete_1): Likewise.
6668 (build_dtor_call): Simplify.
6669 (build_delete): Use special_function_kind
6670 values to indicate the kind of destruction to be done.
6671 (build_vbase_delete): Likewise.
6672 (build_vec_delete): Likewise.
6674 * init.c (sort_member_init): Fix typo in error message generation
6677 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
6679 * semantics.c (begin_class_definition): make the packed
6680 attribute be sensitive to the "-fpack-struct" command line flag
6682 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
6684 Update new-abi upcast algorithm.
6685 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
6686 prototype and meaning of return value.
6687 (__si_class_type_info::__do_upcast): Likewise.
6688 (__vmi_class_type_info::__do_upcast): Likewise.
6689 * tinfo.cc (__class_type_info::__upcast_result): Replace
6690 whole2dst with part2dst. Adjust ctor.
6691 (__class_type_info::__do_upcast): Adjust call of worker function.
6692 (__class_type_info::__do_upcast): Adjust.
6693 (__si_class_type_info::__do_upcast): Adjust. Use parent's
6695 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
6696 virtual base in diamond heirarchy bug.
6698 2000-05-23 Mark Mitchell <mark@codesourcery.com>
6700 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
6701 and bitfield to tinfo_fn_p.
6702 (DECL_TINFO_FN_P): Adjust.
6703 (SET_DECL_TINFO_FN_P): Likewise.
6704 (DECL_MUTABLE_P): Likewise.
6705 (DECL_C_BIT_FIELD): Likewise.
6706 (SET_DECL_C_BIT_FIELD): Likewise.
6707 (CLEAR_DECL_C_BIT_FIELD): Likewise.
6708 (DECL_UNINLINABLE): Likewise.
6709 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
6710 (handle_using_decl): Remove assertion.
6711 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
6712 to build FIELD_DECLs.
6713 (build_base_field): Likewise.
6714 (layout_class_type): Likewise.
6715 * decl.c (init_decl_processing): Likewise.
6716 (build_ptrmemfunc_type): Likewise.
6717 (grokdeclarator): Likewise.
6718 * decl2.c (grok_x_components): Likewise.
6719 * except.c (call_eh_info): Likewise.
6720 * init.c (init_init_processing): Likewise.
6721 * rtti.c (expand_class_desc): Likewise.
6722 (create_pseudo_type_info): Likewise.
6723 (get_vmi_pseudo_type_info): Likewise.
6724 (create_tinfo_types): Likewise.
6725 * ptree.c (print_lang_decl): Adjust.
6726 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
6727 before checking DECL_MUTABLE_P.
6729 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
6730 parameters for template functions.
6731 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
6732 destructors as well as constructors.
6734 2000-05-22 Mark Mitchell <mark@codesourcery.com>
6736 * class.c (build_ctor_vtbl_group): Set inits.
6737 * optimize.c (maybe_clone_body): Set DECL_INLINE and
6738 DECL_THIS_INLINE appropriately for clones.
6740 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
6741 (DECL_CONV_FN_P): Simplify.
6742 (DECL_OPERATOR): Remove.
6743 (language_to_string): Declare.
6744 * decl.c (duplicate_decls): Fix typo in comment.
6745 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
6746 (grok_op_properties): Use DECL_CONV_FN_P instead of
6747 IDENTIFIER_TYPENAME_P.
6748 * dump.c (dequeue_and_dump): Dump the language linkage of
6750 * error.c (language_to_string): Give it external linkage.
6751 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
6752 (implicitly_declare_fn): Set DECL_LANGUAGE.
6753 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
6754 IDENTIFIER_TYPENAME_P.
6755 (tsubst_decl): Likewise.
6756 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
6757 * semantics.c (finish_member_declaration): Don't mark members of
6758 classes declared in an extern "C" region as extern "C".
6760 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6762 * decl2.c (qualified_lookup_using_namespace): Look through
6765 * decl.c (push_using_decl): Return the old decl on namespace level.
6767 2000-05-21 Mark Mitchell <mark@codesourcery.com>
6769 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
6770 (VTT_NAME_PREFIX): New macro.
6771 (CTOR_VTBL_NAME_PREFIX): Likewise.
6772 (get_ctor_vtbl_name): New function.
6773 * class.c (get_vtable_name): Simplify.
6774 (get_vtt_name): New function.
6775 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
6776 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
6777 when a virtual base becomes primary.
6778 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
6780 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
6781 additional parameters.
6782 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
6783 (initialize_array): New function.
6784 (build_vtt): Likewise.
6785 (build_vtt_inits): Likewise.
6786 (dfs_build_vtt_inits): Likewise.
6787 (dfs_fixup_binfo_vtbls): Likewise.
6788 (build_ctor_vtbl_group): Likewise.
6789 (initialize_vtable): Use initialize_array.
6790 (accumulate_vtbl_inits): Reimplement to handle construction
6792 (dfs_accumulate_vtbl_inits): Likewise.
6793 (bulid_vtbl_initializer): Adjust parameter name.
6794 * method.c (build_typename_overload): Remove #if 0'd code.
6795 (get_ctor_vtbl_name): New function.
6796 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
6797 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
6799 * cp-tree.h (struct lang_type): Remove search_slot.
6800 (CLASSTYPE_SEARCH_SLOT): Remove.
6801 (emit_base_init): Change prototype.
6802 (initialize_vtbl_ptrs): Likewise.
6803 (expand_indirect_vtbls_init): Likewise.
6804 (clear_search_slots): Remove.
6805 * decl.c (lang_mark_tree): Don't mark search_slot.
6806 * init.c (initialize_vtbl_ptrs): Simplify.
6807 (emit_base_init): Likewise.
6808 * search.c (struct vbase_info): Document decl_ptr.
6809 (convert_pointer_to_single_level): Remove.
6810 (dfs_find_vbases): Remove.
6811 (dfs_init_base_pointers): Simplify.
6812 (dfs_clear_vbase_slots): Remove.
6813 (dfs_vtable_path_unmark): New function.
6814 (init_vbase_pointers): Simplify.
6815 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
6816 (expand_indirect_vtbls_init): Simplify. Don't call
6817 mark_all_temps_used.
6818 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
6819 initialize_vtbl_ptrs.
6821 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
6823 * except.c: Add static prototypes.
6825 2000-05-20 H.J. Lu <hjl@gnu.org>
6827 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
6829 2000-05-19 Mark Mitchell <mark@codesourcery.com>
6831 Don't create a separate copy of virtual bases for the
6832 CLASSTYPE_VBASECLASSES list.
6833 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
6834 (BINFO_FOR_VBASE): Remove.
6835 (CANONICAL_BINFO): Adjust.
6836 (binfo_for_vbase): New function.
6837 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
6838 instead of BINFO_FOR_VBASE.
6839 (build_vbase_pointer): Likewise.
6840 (build_secondary_vtable): Likewise.
6841 (dfs_mark_primary_bases): Likewise.
6842 (mark_primary_bases): Likewise.
6843 (layout_nonempty_base_or_field): Likewise.
6844 (dfs_set_offset_for_shared_vbases): Likewise.
6845 (dfs_set_offset_for_unshared_vbases): Likewise.
6846 (layout_virtual_bases): Likewise. Adjust for changes to the
6847 CLASSTYPE_VBASECLASSES list.
6848 (dump_class_hierarchy_r): Use binfo_for_vbase
6849 instead of BINFO_FOR_VBASE.
6850 (dump_class_hierarchy): Likewise.
6851 (finish_vtbls): Likewise.
6852 (build_vtbl_initializer): Adjust for changes to the
6853 CLASSTYPE_VBASECLASSES list.
6854 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
6855 * decl.c (finish_destructor_body): Adjust for changes to the
6856 CLASSTYPE_VBASECLASSES list.
6857 * init.c (sort_base_init): Use binfo_for_vbase.
6858 (construct_virtual_bases): Adjust for changes to the
6859 CLASSTYPE_VBASECLASSES list.
6860 (expand_member_init): Use binfo_for_vbase.
6861 (build_vbase_delete): Adjust for changes to the
6862 CLASSTYPE_VBASECLASSES list.
6863 * method.c (do_build_copy_constructor): Likewise.
6864 * rtti.c (get_base_offset): Use binfo_for_vbase.
6865 (expand_class_desc): Remove #if 0'd code.
6866 * search.c (struct vbase_info): Remove vbase_types.
6867 (get_base_distance): Use binfo_for_vbase.
6868 (lookup_field_queue_p): Use CANONICAL_BINFO.
6869 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
6870 (get_pure_virtuals): Adjust for changes to the
6871 CLASSTYPE_VBASECLASSES list.
6872 (dfs_find_vbases): Use binfo_for_vbase.
6873 (dfs_init_vbase_pointers): Likewise.
6874 (init_vbase_pointers): Don't initialize vi.vbase_types.
6875 (virtual_context): Use binfo_for_vbase.
6876 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
6877 CLASSTYPE_VBASECLASSES list.
6878 (expand_indirect_vtbls_init): Simplify.
6879 (dfs_get_vbase_types): Don't replicate virtual bases.
6880 (find_vbase_instance): Use binfo_for_vbase.
6881 (binfo_for_vbase): New function.
6882 * typeck.c (get_delta_difference): Use binfo_for_vbase.
6884 2000-05-17 Mark Mitchell <mark@codesourcery.com>
6886 * decl2.c (finish_anon_union): Generalize error messages to handle
6887 anonymous structures.
6888 * init.c (perform_member_init): Remove `name' parameter.
6889 (build_field_list): New function.
6890 (sort_member_init): Handle anonymous union initialization order
6891 correctly. Check for multiple initializations of the same union.
6892 (emit_base_init): Don't look up fields by name here.
6893 (expand_member_init): Record the result of name lookup for future
6895 * typeck.c (build_component_ref): Fix formatting.
6897 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
6899 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
6900 * typeck.c (build_x_compound_expr): Replace warn_unused with
6903 * decl2.c (lang_decode_option): Update -Wall unused flags by
6904 calling set_Wunused.
6906 2000-05-16 Mark Mitchell <mark@codesourcery.com>
6908 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
6909 * init.c (dfs_vtable_path_unmark): Remove.
6910 * search.c (marked_new_vtable_p): Likewise.
6911 (unmarked_new_vtable_p): Likewise.
6912 (dfs_search_slot_nonempty_p): Likewise.
6913 (dfs_mark): Likewise.
6914 (dfs_vtable_path_unmark): Likewise.
6915 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
6916 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
6917 (dfs_init_vbase_pointers): Remove special-case new ABI code.
6918 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
6919 (init_vbase_pointers): Simplify.
6920 (expand_indirect_vtbls_init): Likewise.
6922 * class.c (copy_virtuals): New function.
6923 (build_primary_table): Use it.
6924 (build_secondary_vtable): Likewise.
6925 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
6926 indicate that no vcall offset is required.
6927 (add_virtual_function): Likewise.
6928 (modify_all_vtables): Likewise.
6929 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
6930 (dfs_accumulate_vtbl_inits): Likewise.
6931 (build_vtbl_initializer): Make changes to handle construction
6933 (dfs_build_vcall_offset_vtbl_entries): Likewise.
6934 (build_rtti_vtbl_entries): Likewise.
6935 (build_vtable_entries): Handle a NULL vcall_index.
6937 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
6939 * decl2.c (lang_decode_option): Fix thinko.
6941 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
6943 * except.c (check_handlers): New fn.
6944 * cp-tree.h: Declare it.
6945 * semantics.c (finish_handler_sequence): Call it.
6946 (finish_function_handler_sequence): Likewise.
6947 (finish_handler_parms): Set TREE_TYPE on the handler.
6948 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
6949 * search.c (get_base_distance_recursive): If protect>1, ignore
6951 (get_base_distance): Don't reduce watch_access.
6953 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
6955 * lex.c: #include diagnostic.h.
6956 (lang_init_options): Set default prefixing rules.
6958 * lang-options.h: Add -fdiagnostics-show-location=.
6960 * decl2.c: #include diagnostic.h.
6961 (lang_decode_option): Handle -fdiagnostics-show-location=.
6963 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
6965 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
6966 * vec.cc: Revert my 2000-05-07 change.
6968 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
6970 * class.c (check_field_decls): Complain about non-static data
6971 members with same name as class in class with constructor.
6973 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
6975 * decl.c (grokdeclarator): Allow non-static data members with
6978 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
6980 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
6981 and pending_inline.filename. Update prototypes.
6982 * decl.c (define_label): Constify filename parameter.
6983 * decl2.c (warn_if_unknown_interface): Constify local char *.
6984 * input.c Constify input_source.filename. Don't declare
6985 input_filename or lineno. Constify filename parameter to feed_input.
6986 * lex.c (init_parse): Constify parameter and return value.
6987 (cp_pragma_interface, cp_pragma_implementation): Constify
6989 (reinit_parse_for_method, reinit_parse_for_block,
6990 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
6991 Constify local char *.
6992 * pt.c: Don't declare lineno or input_filename.
6993 (print_template_context, tsubst_friend_function, tsubst_decl,
6994 tsubst, instantiate_decl): Constify local char *.
6995 * semantics.c (expand_body): Constify local char *.
6996 * tree.c (build_srcloc): Constify filename parameter.
6997 * typeck.c (c_expand_asm_operands): Constify filename
7000 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
7002 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
7005 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
7007 * inc/cxxabi.h: Fix typos in comment.
7008 (__base_class_info::__offset): Use a static_cast.
7010 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
7012 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
7013 of std::size_t and std::ptrdiff_t respectively.
7014 * tinfo.cc: Likewise.
7017 2000-05-06 Richard Henderson <rth@cygnus.com>
7019 * typeck.c (build_c_cast): Don't warn integer->pointer size
7020 mismatch for constants.
7022 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
7024 * rtti.c (ptmd_initializer): Set non-public, if class is
7027 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
7028 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7029 __cxa_vec_delete): Likewise.
7030 * tinfo.cc (__dynamic_cast): Likewise.
7031 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7032 __cxa_vec_delete): Likewise.
7034 2000-05-04 Mark Mitchell <mark@codesourcery.com>
7036 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
7037 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
7038 (lang_decl_flags): Add vcall_offset.
7039 (THUNK_VCALL_OFFSET): Use it.
7040 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
7041 * method.c (make_thunk): Create the lang_decl here, not in
7043 (emit_thunk): Make generic thunks into ordinary functions once
7044 they have been fed to expand_body.
7045 * semantics.c (expand_body): Set current_function_is_thunk here.
7047 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7049 * class.c (update_vtable_entry_for_fn): Prototype.
7051 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
7054 * search.c (dfs_build_inheritance_graph_order): Prototype.
7056 2000-05-04 Mark Mitchell <mark@codesourcery.com>
7058 * cp-tree.h (special_function_kind): Add various kinds of
7060 (special_function_p): New function.
7061 * class.c (overrides): Don't let one kind of destructor override
7063 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
7064 whether or not to instantiate a template.
7065 * tree.c (special_function_p): Define.
7067 2000-05-03 Mark Mitchell <mark@codesourcery.com>
7069 * cp-tree.def (THUNK_DECL): Remove.
7070 * cp-tree.h (DECL_THUNK_P): New macro.
7071 (DECL_NON_THUNK_FUNCTION_P): Likewise.
7072 (DECL_EXTERN_C_FUNCTION_P): Likewise.
7073 (SET_DECL_THUNK_P): Likewise.
7074 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
7075 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
7076 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
7077 * decl.c (decls_match): Use DECL_EXTERN_C_P.
7078 (duplicate_decls): Likewise.
7079 (pushdecl): Likewise. Adjust thunk handling.
7080 (grokfndecl): Use DECL_EXTERN_C_P.
7081 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
7082 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
7083 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
7084 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
7085 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
7086 DECL_NO_STATIC_CHAIN.
7087 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
7088 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
7089 * search.c (covariant_return_p): Remove THUNK_DECL handling.
7092 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
7094 * tree.c (walk_tree): Set lineno.
7096 2000-05-01 Mark Mitchell <mark@codesourcery.com>
7098 * exception.cc: Update license notice.
7100 * new1.cc: Likewise.
7101 * new2.cc: Likewise.
7102 * tinfo.cc: Likewise.
7103 * tinfo2.cc: Likewise.
7105 * inc/cxxabi.h: Likewise.
7106 * inc/exception: Likewise.
7107 * inc/new: Likewise.
7108 * inc/new.h: Likewise.
7109 * inc/typeinfo: Likewise.
7111 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
7113 * tree.c (build_target_expr_with_type): If we already have a
7114 TARGET_EXPR, just return it.
7116 * optimize.c (initialize_inlined_parameters): Don't generate an
7117 EXPR_STMT if we can just use DECL_INITIAL.
7118 * decl.c (emit_local_var): Only make the initialization a
7119 full-expression if stmts_are_full_exprs_p.
7121 2000-05-01 Mark Mitchell <mark@codesourcery.com>
7123 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
7125 * call.c (standard_conversion): Use it.
7126 (direct_reference_binding): Likewise.
7127 (build_over_call): Likewise.
7128 (is_properly_derived_from): Likewise.
7129 (compare_ics): Likewise.
7130 * class.c (resolves_to_fixed_type_p): Likewise.
7131 * optimize.c (declare_return_variable): Likewise.
7132 * pt.c (is_specialization_of): Likewise.
7134 * typeck.c (comp_target_parms): Likeiwse.
7135 (build_static_cast): Likewise.
7136 (build_reinterpret_cast): Likewise.
7137 (build_const_cast): Likewise.
7138 (comp_ptr_ttypes_real): Likewise.
7139 (comp_ptr_ttypes_const): Likewise.
7140 * typeck2.c (process_init_constructor): Likewise.
7142 2000-04-30 Scott Snyder <snyder@fnal.gov>
7144 * decl.c (finish_destructor_body): Use the base destructor when
7145 destroying virtual bases.
7147 2000-04-30 Mark Mitchell <mark@codesourcery.com>
7149 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
7151 * optimize.c (struct inline_data): Add target_exprs field.
7152 (declare_return_variable): When a function returns an aggregate,
7153 use the variable declared in the TARGET_EXPR as the remapped
7155 (expand_call_inline): Update the pending target_exprs stack.
7156 (optimize_function): Initialize the stack.
7158 * decl2.c (finish_file): Fix typo in comment.
7160 * method.c (emit_thunk): Don't try to return a `void' value.
7162 * optimize.c (initialize_inlined_parameters): If the parameter is
7163 addressable, we need to make a new VAR_DECL, even if the
7164 initializer is constant.
7166 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
7168 * decl.c (grok_op_properties): Add an extra check of argtypes.
7170 2000-04-27 Mark Mitchell <mark@codesourcery.com>
7172 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
7174 (initialize_inlined_parameters): Try to avoid creating new
7177 2000-04-27 Alex Samuel <samuel@codesourcery.com>
7179 * lex.c (my_get_run_time): Remove.
7180 (init_filename_times): Use get_run_time instead of my_get_run_time.
7181 (check_newline): Likewise.
7182 (dump_time_statistics): Likewise.
7183 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
7184 of computing elapsed time explicitly.
7186 2000-04-26 Mark Mitchell <mark@codesourcery.com>
7188 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
7189 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
7190 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
7191 before calling decl_constant_value.
7192 * class.c (check_bitfield_decl): Likewise.
7193 * cvt.c (ocp_convert): Likewise.
7194 (convert): Likewise.
7195 * decl.c (compute_array_index_type): Likewise.
7196 (build_enumerator): Likewise.
7197 * decl2.c (check_cp_case_value): Likewise.
7198 * pt.c (convert_nontype_argument): Likewise.
7200 * typeck.c (decay_conversion): Likewise.
7201 (build_compound_expr): Likewise.
7202 (build_reinterpret_cast): Likewise.
7203 (build_c_cast): Likewise.
7204 (convert_for_assignment): Likewise.
7206 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
7208 * decl.c (finish_function): Don't play games with DECL_INLINE.
7210 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
7212 * ir.texi: Correct typo.
7214 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7216 * decl.c (grokdeclarator): Reject VLAs as members.
7218 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
7220 * call.c (standard_conversion): Accept conversion between
7223 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
7225 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
7227 * decl2.c (finish_file): Remove double setup for accounting
7230 2000-04-24 Robert Lipe <robertlipe@usa.net>
7232 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
7234 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
7236 * new.cc (set_new_handler): Needs to be in std::.
7238 2000-04-23 Mark Mitchell <mark@codesourcery.com>
7240 * cp-tree.h (lang_decl): Remove pretty_function_p.
7241 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
7242 language-specific node.
7243 * decl.c (cp_make_fname_decl): Use build_decl, not
7244 build_lang_decl, to build the variables.
7245 (grokvardecl): Don't call build_lang_decl for local variables in
7247 (grokdeclarator): Don't call build_lang_decl for local type
7248 declarations in templates.
7249 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
7250 zero'd memory, rather than calling memset.
7251 * pt.c: Include hashtab.h.
7252 (local_specializations): New variable.
7253 (retrieve_local_specialization): Use it.
7254 (register_local_specialization): Likewise.
7255 (tsubst_decl): Don't assume local variables have
7257 (instantiate_decl): Set up local_specializations.
7258 * Makefile.in (HTAB_H): New variable.
7260 2000-04-23 Richard Henderson <rth@cygnus.com>
7262 * typeck.c (c_expand_asm_operands): Restore the original
7263 contents of the output list.
7265 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
7267 * ir.texi: Document complex number representation.
7269 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
7271 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
7272 (target_incomplete_p): New function.
7273 (tinfo_base_init): Create comdat NTBS name variable.
7274 (ptr_initializer): Add non_public parameter. Calculate it.
7275 (ptmd_initializer): Likewise.
7276 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
7277 (create_real_tinfo_var): Add non_public parameter. Use it.
7278 Push proxy into global namespace.
7279 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
7281 * inc/typeinfo (type_info::before, type_info::operator==):
7282 Compare __name addresses.
7284 * tinfo2.cc: Remove new-abi builtins comment.
7286 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
7288 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
7290 * call.c (joust): Exit early if we get the same function, too.
7292 * decl2.c (key_method): Return NULL_TREE for template classes.
7293 (import_export_class): Don't need to check for template classes.
7295 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
7297 * lex.c: Remove references to cccp.c.
7299 2000-04-18 Mark Mitchell <mark@codesourcery.com>
7301 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
7302 volatile_memfunc. Add destructor_attr. Adjust dummy.
7303 (DECL_DESTRUCTOR_P): Use destructor_attr.
7304 (DECL_CONST_MEMFUNC_P): Reimplement.
7305 (DECL_VOLATILE_MEMFUNC_P): Remove.
7306 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
7307 (overrides): Use DECL_DESTRUCTOR_P.
7308 (check_for_override): Likewise.
7309 * decl.c (start_function): Likewise.
7310 * decl2.c (grokfclassfn): Likewise.
7311 (check_classfn): Likewise.
7312 (grok_function_init): Likewise.
7314 2000-04-17 Mark Mitchell <mark@codesourcery.com>
7316 * decl2.c (grokfield): Issue error on illegal data member
7319 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
7321 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
7323 2000-04-16 Mark Mitchell <mark@codesourcery.com>
7325 * class.c (build_vtable_entry): Don't build thunks for type-info
7328 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
7330 * decl.c (decls_match): Allow a redeclaration of a builtin to
7331 specify args while the builtin did not.
7333 2000-04-15 Mark Mitchell <mark@codesourcery.com>
7335 * cp-tree.def (THUNK_DECL): Add to documentation.
7336 * cp-tree.h (flag_huge_objects): Declare.
7337 * class.c (modify_vtable_entry): Tidy.
7338 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
7339 Calculate delta appropriately for the new ABI.
7340 (dfs_modify_vtables): Use it.
7341 (modify_all_vtables): Fix thinko in code to add overriding copies
7342 of functions to primary vtables.
7343 (build_clone): Fix typo in comment.
7344 (clone_function_decl): Correct order of destructors in vtable.
7345 (build_vbase_offset_vtbl_entries): Adjust comment.
7346 (dfs_vcall_offset_queue_p): Remove.
7347 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
7348 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
7349 (build_vtable_entry): Correct check for pure virtual functions.
7350 Don't declare flag_huge_objects.
7351 * decl.c (flag_huge_objects): Remove declaration.
7352 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
7353 Use int_size_in_bytes.
7354 (emit_thunk): Handle vcall offset thunks.
7356 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7358 * decl2.c (parse_time, varconst_time): Delete declarations.
7359 (finish_file): Delete LINENO declaration.
7360 START_TIME and THIS_TIME now long.
7362 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
7364 * class.c (build_base_field): Reformat comment.
7366 * inc/cxxabi.h (stddef.h): Comment inclusion.
7367 (__base_class_info::__offset): Comment shift.
7369 2000-04-12 Mark Mitchell <mark@codesourcery.com>
7371 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
7372 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
7373 (cp_push_exception_identifier): New macro.
7374 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
7375 (DECL_BASE_DESTRUCTOR_P): Likewise.
7376 (DECL_DELETING_DESTRUCTOR_P): Likewise.
7377 (get_vtbl_decl_for_binfo): Fix formatting.
7378 (in_charge_arg_for_name): New macro.
7379 (maybe_build_cleanup_and_delete): Remove declaration.
7380 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
7381 (in_charge_arg_for_name): New function.
7382 (build_new_method_call): Use it. Handle cloned destructors.
7383 (build_clone): Don't make the base constructor virtual.
7384 Automatically defer generated functions.
7385 (clone_function_decl): Handle destructors, too.
7386 (clone_constructors_and_destructors): Likewise.
7387 (create_vtable_ptr): Don't create a vtable entry for a cloned
7389 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
7390 (initialize_predefined_identifiers): Update appropriately.
7391 (finish_destructor_body): Simplify.
7392 (maybe_build_cleanup_and_delete): Remove.
7393 * except.c (expand_throw): Handle new-ABI destructors.
7394 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
7395 (build_dtor_call): New function.
7396 (build_delete): Use it. Simplify.
7397 * optimize.c (maybe_clone_body): Handle destructors.
7398 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
7400 * exception.cc (cleanup_fn): New typedef.
7401 (CALL_CLEANUP): New macro.
7402 (cp_eh_info): Use them.
7403 (__cp_push_exception): Likewise.
7404 (__cp_pop_exception): Likewise.
7406 2000-04-11 Mark Mitchell <mark@codesourcery.com>
7408 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
7409 (complete_dtor_identifier): New macro.
7410 (CLASSTYPE_FIRST_CONVERSION): Remove.
7411 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
7412 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
7413 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
7414 (CLASSTYPE_CONSTRUCTORS): Likewise.
7415 (CLASSTYPE_DESTRUCTORS): Likewise.
7416 (lang_decl): Add cloned_function.
7417 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
7418 (DECL_BASE_CONSTRUCTOR_P): Likewise.
7419 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
7420 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
7421 (DECL_CLONED_FUNCTION_P): Likewise.
7422 (DECL_CLONED_FUNCTION): Likewise.
7423 (clone_function_decl): Declare.
7424 (maybe_clone_body): Likewise.
7425 * call.c (build_user_type_conversion_1): Call complete object
7426 constructors in the new ABI.
7427 (build_new_method_call): Don't add in-charge parameters under the
7429 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
7430 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
7431 CLASSTYPE_DESTRUCTOR_SLOT.
7432 (build_clone): New function.
7433 (clone_function_decl): Likewise.
7434 (clone_constructors_and_destructors): Likewise.
7435 (check_bases_and_members): Use it.
7436 * decl.c (iniitialize_predefined_identifiers): Initialize
7437 complete_dtor_identifier.
7438 (finish_function): Don't add extra code to a clone.
7439 (lang_mark_tree): Mark cloned_function.
7440 * decl2.c (mark_used): Don't bother trying to instantiate things
7442 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
7443 * method.c (set_mangled_name_for_decl): Don't treat clones as
7445 (synthesize_method): Sythesize cloned functions, not the clones.
7446 * optimize.c (inline_data): Update comment on ret_label.
7447 (remap_block): Don't assume DECL_INITIAL exists.
7448 (copy_body_r): Allow ret_label to be NULL.
7449 (maybe_clone_body): Define.
7450 * pt.c (tsubst_decl): Handle clones.
7451 (instantiate_clone): New function.
7452 (instantiate_template): Use it.
7453 (set_mangled_name_for_template_decl): Don't treat clones as
7455 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
7456 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
7457 * semantics.c (expand_body): Clone function bodies as necessary.
7459 * optimize.c (remap_decl): Avoid sharing structure for arrays
7460 whose size is only known at run-time.
7461 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
7463 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
7464 to has_in_charge_parm_p.
7465 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
7466 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
7467 (DECL_COPY_CONSTRUCTOR_P): New macro.
7468 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
7469 (build_user_type_conversion_1): Likewise.
7470 (convert_like_real): Likewise.
7471 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
7472 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
7473 (copy_args_p): Likewise.
7474 (grok_ctor_properties): Likewise.
7475 (start_function): Likewise.
7476 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
7477 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
7478 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
7479 * method.c (do_build_copy_constructor): Use
7480 DECL_HAS_IN_CHARGE_PARM_P.
7481 (synthesize_method): Likewise.
7482 * pt.c (instantiate_template): Remove goto.
7483 * tree.c (build_cplus_method_type): Remove mention of obstacks in
7486 * cp-tre.h (finish_function): Change prototype.
7487 * decl.c (end_cleanup_fn): Adjust caller.
7488 (finish_function): Take only one parameter.
7489 * decl2.c (finish_objects): Adjust caller.
7490 (finish_static_storage_duration_function): Likewise.
7491 * method.c (emit_thunk): Likewise.
7492 * parse.y: Likewise.
7493 * parse.c: Regenerated.
7494 * pt.c (instantiate_decl): Likewise.
7495 * rtti.c (synthesize_tinfo_fn): Likewise.
7496 * semantics.c (expand_body): Likewise.
7498 * cp-tree.h (copy_decl): New function.
7499 * class.c (finish_struct_1): Use it.
7500 * lex.c (copy_decl): Define it.
7501 * pt.c (tsubst_decl): Likewise.
7502 * tree.c (copy_template_template_parm): Likewise.
7504 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
7505 has_nonpublic_assign_ref.
7506 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
7507 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
7508 * class.c (finish_struct_methods): Don't set
7509 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
7510 (interface_only): Don't declare.
7511 (interface_unknown): Likewise.
7513 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7515 * tree.h (HAVE_TEMPLATES): Remove definition.
7516 * lang-options.h (-fthis-is-variable): Remove documentation.
7518 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
7520 * class.c (instantiate_type): Handle object-relative template-id.
7522 * semantics.c (finish_expr_stmt): Call convert_to_void here.
7523 * decl.c (cplus_expand_expr_stmt): Not here.
7525 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
7526 Initialize exprtype earlier.
7528 * parse.y (fn.def1): Check for defining types in return types.
7530 * decl.c (check_tag_decl): Notice extra fundamental types.
7531 Diagnose empty decls in classes, too.
7533 * decl.c (grokdeclarator): Don't override an anonymous name if no
7534 declarator was given.
7536 * cvt.c (convert_to_void): Call resolve_offset_ref.
7538 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
7540 * decl2.c (decl_namespace): Handle getting a type.
7542 * typeck.c (build_c_cast): Re-enable warning for cast between
7543 pointer and integer of different size.
7545 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
7547 * inc/cxxabi.h (__pointer_type_info): Add restrict and
7549 (__pointer_type_info::__pointer_catch): New virtual function.
7550 (__pointer_to_member_type_info): Derive from
7551 __pointer_type_info. Adjust.
7552 (__pointer_to_member_type_info::__do_catch): Remove.
7553 (__pointer_to_member_type_info::__is_pointer_p): Declare.
7554 (__pointer_to_member_type_info::__pointer_catch): Declare.
7555 * rtti.c (qualifier_flags): Add restrict flag.
7556 (ptmd_initializer): Reorder members.
7557 (create_tinfo_types): Expand comments. Reorder
7558 ptmd_desc_type_node members.
7559 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
7561 (__pointer_type_info::__do_catch): Move specific code into
7562 __pointer_catch. Call it.
7563 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
7564 specific catch checking. Fix void conversion check.
7565 (__pointer_to_member_type_info::__do_catch): Remove.
7566 (__pointer_to_member_type_info::__pointer_catch): Implement.
7568 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7570 * lex.c (init_parse): Remove traces of classof and headof.
7571 * decl2.c (flag_operator_names): Default to 1.
7572 (lang_decode_option): Do not set it for -ansi.
7574 2000-04-09 Mark Mitchell <mark@codesourcery.com>
7576 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
7577 (DECL_MAIN_VARIANT): Remove.
7578 * decl.c (duplicate_decls): Don't set it.
7579 (start_function): Likewise.
7580 (lang_mark_tree): Don't mark it.
7581 * decl2.c (defer_fn): Don't use it.
7582 * lex.c (retrofit_lang_decl): Don't set it.
7583 * pt.c (tsubst_decl): Likewise.
7584 * ptree.c (print_lang_decl): Don't print it.
7585 * typeck.c (mark_addressable): Don't use it.
7587 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
7589 * vec.cc: Include <new> and <exception>.
7590 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
7591 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
7593 (__cxa_vec_delete): Catch dtor exceptions.
7595 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
7597 Prepend __ to implementation defined names.
7598 * inc/typeinfo (type_info): Rename _name to __name.
7599 (type_info::type_info): Rename parameter.
7600 (type_info::operator==, type_info::operator!=,
7601 type_info::before): Likewise.
7602 (type_info::is_pointer_p, type_info::is_function_p,
7603 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
7606 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
7607 (__pointer_type_info::__pointer_type_info): Likewise.
7608 (__pointer_type_info::is_pointer_p,
7609 __pointer_type_info::do_catch): Prepend __. Rename parameters.
7610 (__array_type_info::__array_type_info): Rename parameters.
7611 (__function_type_info::__function_type_info): Likewise.
7612 (__function_type_info::is_function_p): Prepend __.
7613 (__enum_type_info::__enum_type_info): Rename parameters.
7614 (__pointer_to_member_type_info::__pointer_to_member_type_info):
7616 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
7618 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
7619 (__class_type_info::__class_type_info): Rename parameters.
7620 (__class_type_info::sub_kind): Prepend __. Adjust member names.
7621 (__class_type_info::upcast_result,
7622 __class_type_info::dyncast_result): Prepend __. Move definition
7624 (__class_type_info::do_upcast, __class_type_info::do_catch,
7625 __class_type_info::find_public_src,
7626 __class_type_info::do_dyncast,
7627 __class_type_info::do_find_public_src): Prepend __. Rename
7629 (__si_class_type_info::__si_class_type_info): Rename parameters.
7630 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
7631 __si_class_type_info::do_find_public_src): Prepent __. Rename
7633 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
7634 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
7635 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
7637 (__dynamic_cast): Rename parameters.
7638 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
7639 type_info::do_catch, type_info::do_upcast): Prepend __.
7640 (contained_p, public_p, virtual_p, contained_public_p,
7641 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
7642 (__class_type_info::do_catch,
7643 __class_type_info::do_upcast): Prepend __. Adjust.
7644 (__class_type_info::__upcast_result,
7645 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
7647 (__class_type_info::find_public_src): Prepend __. Adjust.
7648 (__class_type_info::do_find_public_src,
7649 __si_class_type_info::do_find_public_src,
7650 __vmi_class_type_info::do_find_public_src): Likewise.
7651 (__class_type_info::do_dyncast,
7652 __si_class_type_info::do_dyncast,
7653 __vmi_class_type_info::do_dyncast): Likewise.
7654 (__class_type_info::do_upcast,
7655 __si_class_type_info::do_upcast,
7656 __vmi_class_type_info::do_upcast): Likewise.
7657 (__dynamic_cast): Adjust.
7658 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
7659 (__function_type_info::is_function_p): Likewise.
7660 (__pointer_type_info::do_catch): Likewise. Adjust.
7661 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
7662 (__throw_type_match_rtti_2): Adjust.
7663 (__is_pointer): Adjust.
7665 2000-04-08 Mark Mitchell <mark@codesourcery.com>
7667 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
7668 (complete_ctor_identifier): New macro.
7669 (special_function_kind): Add sfk_copy_constructor and
7670 sfk_assignment_operator.
7671 (LOOKUP_HAS_IN_CHARGE): Remove.
7672 (cons_up_default_function): Rename to ...
7673 (implicitly_declare_fn): ... this.
7674 * call.c (build_new_method_call): Add in-charge parameters for
7676 * class.c (add_implicitly_declared_members): Change parameter name
7677 from cant_have_assignment to cant_have_const_assignment.
7678 Replace calls to cons_up_default_function to implicitly_declare_fn.
7679 * cvt.c (ocp_convert): Use complete_ctor_identifier.
7680 * decl.c (initialize_predefined_identifiers): Initialize it.
7681 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
7683 * init.c (expand_default_init): Don't calculate the in-charge
7685 (build_new_1): Likewise.
7686 * lex.c (cons_up_default_function): Move to method.c.
7687 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
7688 (implicitly_declare_fn): New function.
7689 * typeck.c (build_static_cast): Use complete_ctor_identifier.
7690 (build_modify_expr): Likewise.
7691 * typeck2.c (build_functional_cast): Likewise.
7693 Under the new ABI, constructors don't return `this'.
7694 * cp-tree.h (warn_reorder): Declare.
7695 (special_function_kind): New enum.
7696 (global_base_init_list): Remove declaration.
7697 (emit_base_init): Don't return a value.
7698 (check_base_init): Don't declare.
7699 (is_aggr_typedef): Likewise.
7700 * decl.c (check_special_function_return_type): New function.
7701 (return_types): Remove.
7702 (grokdeclarator): Use check_special_function_return_type.
7703 (start_function): Don't initialize ctor_label under the new ABI.
7704 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
7705 * init.c (begin_init_stmts): Move to top of file.
7706 (finish_init_stmts): Likewise.
7707 (warn_reorder): Don't declare.
7708 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
7710 (check_base_init): Remove.
7711 (is_aggr_typedef): Likewise.
7712 (build_new_1): Don't use the return value of a constructor.
7713 * semantics.c (setup_vtbl_ptr): Don't use the return value
7715 * typeck.c (check_return_expr): Don't magically convert return
7716 statements into `return this' in constructors under the new ABI.
7718 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
7719 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
7720 (base_ctor_identifier): New macro.
7721 (base_dtor_identifier): Likewise.
7722 (deleting_dtor_identifier): Likewise.
7723 * decl.c: Don't include obstack.h.
7724 (obstack_chunk_alloc): Don't define.
7725 (obstack_chunk_free): Likewise.
7726 (struct predefined_identifier): New type.
7727 (initialize_predefined_identifiers): New function.
7728 (init_decl_processing): Use it.
7729 (debug_temp_inits): Remove.
7730 (start_method): Don't call preserve_data.
7731 (hack_incomplete_structures): Update comment.
7732 * init.c (init_init_processing): Don't initialize
7734 (build_offset_rf): Remove dead code.
7735 (build_delete): Use CLASSTYPE_N_BASECLASSES.
7736 * search.c (init_search_processing): Don't initialize
7739 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7741 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
7742 some sign_compare warnings.
7744 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
7746 Rename abi::__vmi_class_type_info members.
7747 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
7748 base_list, detail_masks members to vmi_flags, vmi_base_count,
7749 vmi_bases and vmi_flags_masks respectively.
7750 (__vmi_class_type_info::vmi_flags_masks): Rename
7751 details_unknown_mask to flags_unknown_mask.
7752 * tinfo.cc (__class_type_info::do_upcast): Adjust.
7753 (__vmi_class_type_info::do_find_public_src): Adjust.
7754 (__vmi_class_type_info::do_dyncast): Adjust.
7755 (__vmi_class_type_info::do_upcast): Adjust.
7757 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
7759 * tinfo.cc (convert_to_base): New function.
7760 (get_vbase_offset): Remove. Move into convert_to_base.
7761 (__vmi_class_type_info::do_find_public_src): Adjust.
7762 (__vmi_class_type_info::do_dyncast): Adjust.
7763 (__vmi_class_type_info::do_upcast): Adjust.
7765 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
7767 * tinfo.cc (operator=): Use __builtin_strcmp.
7768 * tinfo2.cc (before): Likewise.
7770 2000-04-06 Mark Mitchell <mark@codesourcery.com>
7772 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
7773 (DECL_SAVED_INLINE): Rename to ...
7774 (DECL_DEFERRED_FN): ... this.
7775 (in_function_p): Remove declaration.
7776 (mark_inline_for_output): Rename to ...
7777 (defer_fn): ... this.
7778 * decl.c (finish_function): Adjust call to mark_inline_for_output.
7779 (in_function_p): Remove definition.
7780 * decl2.c (saved_inlines): Rename to ...
7781 (deferred_fns): ... this.
7782 (saved_inlines_used): Rename to ...
7783 (deferred_fns_used): ... this.
7784 (mark_inline_for_output): Rename to ...
7785 (defer_fn): ... this.
7786 (finish_file): Adjust accordingly.
7787 (init_decl2): Likewise.
7788 * lex.c (cons_up_default_function): Likewise.
7789 * pt.c (mark_decl_instantiated): Likewise.
7790 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
7792 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
7793 * semantics.c (expand_body): Defer more functions.
7795 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
7798 * Make-lang.in (CXX_LIB2FUNCS): Add it.
7800 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7801 __cxa_vec_delete): Declare.
7803 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
7805 * rtti.c (dfs_class_hint_mark): New static function.
7806 (dfs_class_hint_unmark): New static function.
7807 (class_hint_flags): Use them.
7809 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
7811 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
7813 2000-04-05 Mark Mitchell <mark@codesourcery.com>
7815 * cp-tree.h (instantiate_decl): Change prototype.
7816 * decl2.c (mark_used): Adjust call.
7817 * optimize.c (inlinable_function_p): Adjust handling of templates.
7818 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
7819 (do_type_instantiation): Likewise.
7820 (instantiate_decl): Defer more templates.
7821 (instantiate_pending_templates): Adjust logic to handle inline
7824 * Makefile.in (GGC_H): New variable. Use it throughout in place
7827 * call.c: Don't include obstack.h. Include ggc.h.
7828 (obstack_chunk_alloc): Don't define.
7829 (obstack_chunk_free): Likewise.
7830 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
7831 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
7832 (pop_switch): Free it.
7834 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
7836 * dump.c (dequeue_and_dump): Don't try to print the bit_position
7837 if we don't have a DECL_FIELD_OFFSET.
7839 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
7841 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
7844 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7846 * cfns.gperf (hash, libc_name_p): Prototype.
7848 * rtti.c (build_dynamic_cast_1): Constification.
7850 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
7852 * semantics.c (deferred_type_access_control): Prototype.
7854 2000-04-04 Mark Mitchell <mark@codesourcery.com>
7856 Correct many new ABI issues regarding vbase and vcall offset
7858 * cp-tree.h (BINFO_VTABLE): Document.
7859 (struct lang_type): Tweak formatting.
7860 (BINFO_PRIMARY_BINFO): Add to documentation.
7861 (CLASSTYPE_VSIZE): Fix typo in comment.
7862 (CLASSTYPE_VBASECLASSES): Update documentation.
7863 (BINFO_VBASE_MARKED): Remove.
7864 (SET_BINFO_VBASE_MARKED): Likewise.
7865 (CLEAR_BINFO_VBASE_MARKED): Likewise.
7866 (BINFO_FIELDS_MARKED): Remove.
7867 (SET_BINFO_FIELDS_MARKED): Likewise.
7868 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
7869 (enum access_kind): New enumeration.
7870 (num_extra_vtbl_entries): Remove declaration.
7871 (size_extra_vtbl_entries): Likewise.
7872 (get_vtbl_decl_for_binfo): New function.
7873 (dfs_vbase_unmark): Remove declaration.
7874 (mark_primary_bases): Likewise.
7875 * class.c (SAME_FN): Remove.
7876 (struct vcall_offset_data_s): Move definition.
7877 (build_vbase_pointer): Use `build', not `build_binary_op', to
7878 access the vbase pointer under the new ABI.
7879 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
7880 (build_primary_vtable): Likewise.
7881 (dfs_mark_primary_bases): Move here from search.c.
7882 (mark_primary_bases): Likewise.
7883 (determine_primary_bases): Under the new ABI, don't make a base
7884 class a primary base just because we don't yet have any virtual
7886 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
7887 (num_vfun_entries): Remove.
7888 (dfs_count_virtuals): Likewise.
7889 (num_extra_vtbl_entries): Likewise.
7890 (size_extra_vtbl_entries): Likewise.
7891 (layout_virtual_bases): Iterate in inheritance graph order under
7893 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
7894 indicate that a vfield is present.
7895 (init_class_processing): Initialize access_public_node, etc., from
7897 (get_vtbl_decl_for_binfo): New function.
7898 (dump_class_hierarchy_r): Likewise.
7899 (dump_class_hierarchy): Use it.
7900 (finish_vtbls): Build the vtbls in inheritance graph order.
7901 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
7902 (initialize_vtable): Use get_vtbl_decl_for_binfo.
7903 (accumulate_vtbl_inits): Add comments explaining why a pre-order
7905 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
7906 where the vptr points, even for primary vtables.
7907 (build_vtbl_initializer): Adjust handling of vbase and vcall
7909 (build_vcall_and_vbase_vtable_entries): New function.
7910 (dfs_build_vbase_offset_vtbl_entries): Remove.
7911 (build_vbase_offset_vtbl_entries): Reimplement.
7912 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
7913 were already handled in a primary base class vtable.
7914 (build_vcall_offset_vtbl_entries): Adjust.
7915 (build_rtti_vtbl_entries): Adjust.
7916 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
7917 * init.c (expand_virtual_init): Simplify.
7918 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
7919 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
7920 * search.c (BINFO_ACCESS): New macro.
7921 (SET_BINFO_ACCESS): Likewise.
7922 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
7923 (access_in_type): Likewise.
7924 (dfs_accessible_p): Likewise.
7925 (protected_accessible_p): Likewise.
7926 (lookup_fnfields_1): Adjust documentation.
7927 (dfs_mark_primary_bases): Move to class.c
7928 (mark_primary_bases): Likewise.
7929 (dfs_vbase_unmark): Remove.
7930 (virtual_context): Use BINFO_FOR_VBASE.
7931 (dfs_get_vbase_types): Simplify.
7932 (dfs_build_inheritance_graph_order): New function.
7933 (get_vbase_types): Use it.
7934 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
7936 * tinfo.cc (get_vbase_offset): New function.
7937 (__vmi_class_type_info::do_find_public_src): Use it.
7938 (__vmi_class_type_info::do_dyncast): Likewise.
7939 (__vmi_class_type_info::do_upcast): Likewise.
7941 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
7943 * lang-specs.h: Pass -fno-show-column to the preprocessor.
7945 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
7947 * rtti.c (class_hint_flags): Rename flags.
7948 (class_initializer): Remove flags.
7949 (synthesize_tinfo_var): Combine offset and flags. Add flags
7950 for __vmi_class_type_info.
7951 (create_tinfo_types): Remove flags from __class_type_info and
7952 __si_class_type_info. Merge flags and offset from
7953 base_class_type_info.
7954 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
7955 (__base_class_info::is_virtual_p): Adjust.
7956 (__base_class_info::is_public_p): Adjust.
7957 (__base_class_info::offset): New accessor.
7958 (__class_type_info::details): Remove member.
7959 (__class_type_info::__class_type_info): Lose details.
7960 (__class_type_info::detail_masks): Remove.
7961 (__si_class_type_info::__si_class_type_info): Lose details.
7962 (__vmi_class_type_info::details): New member.
7963 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
7964 (__vmi_class_type_info::detail_masks): New member.
7965 * tinfo.cc (__class_type_info::do_upcast): Initialize result
7966 with unknown_details_mask.
7967 (__vmi_class_type_info::do_find_public_src): Adjust
7968 (__vmi_class_type_info::do_dyncast): Adjust.
7969 (__vmi_class_type_info::do_upcast): Set result details, if
7971 (__dynamic_cast): Temporarily #if out optimization.
7973 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
7975 * rtti.c (get_tinfo_decl): Mark used.
7976 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
7977 mark as dealt with, if we output it.
7979 2000-03-28 Mark Mitchell <mark@codesourcery.com>
7981 * class.c: Reorganize to put virtual function table initialization
7982 machinery at the end of the file.
7984 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
7986 * class.c (finish_struct): Use bitsize_zero_node.
7987 * pt.c (instantiate_class_template): Likewise.
7989 2000-03-28 Mark Mitchell <mark@codesourcery.com>
7991 Put RTTI entries at negative offsets in new ABI.
7992 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
7993 vbase offset at index -3, not -1.
7994 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
7995 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
7996 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
7997 (build_rtti_vtbl_entries): New function.
7998 (set_rtti_entry): Remove.
7999 (build_primary_vtable): Don't use it.
8000 (build_secondary_vtable): Likewise.
8001 (start_vtable): Remove.
8002 (first_vfun_index): New function.
8003 (set_vindex): Likewise.
8004 (add_virtual_function): Don't call start_vtable. Do call
8006 (set_primary_base): Rename parameter.
8007 (determine_primary_base): Likewise.
8008 (num_vfun_entries): Don't use skip_rtti_stuff.
8009 (num_extra_vtbl_entries): Include RTTI information.
8010 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
8011 (skip_rtti_stuff): Remove.
8012 (dfs_modify_vtables): Don't use it.
8013 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
8014 (layout_nonempty_base_or_field): Update size handling.
8015 (create_vtable_ptr): Tweak.
8016 (layout_class_type): Adjust parameter names.
8017 (finish_struct_1): Simplify.
8018 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
8019 (skip_rtti_stuff): Remove.
8020 (first_vfun_index): New function.
8021 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
8022 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
8023 (marked_vtable_pathp): Declare.
8024 (unmarked_vtable_pathp): Likewise.
8025 * error.c (dump_expr): Use first_vfun_index to calculate vtable
8027 * rtti.c (build_headof): Look for RTTI at negative offsets.
8028 (get_tinfo_decl_dynamic): Likewise.
8029 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
8031 (create_pseudo_type_info): Do it here instead. Adjust so that
8032 vptr points at first virtual function.
8033 * search.c (marked_vtable_pathp): Make it global.
8034 (unmarked_vtable_pathp): Likewise.
8035 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
8036 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
8037 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
8038 (get_pure_virtuals): Likewise.
8039 (expand_upcast_fixups): Likewise.
8040 * tree.c (debug_binfo): Likewise.
8041 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
8044 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8046 * class.c (check_field_decl): Fix typo.
8047 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
8048 (check_methods): Likewise.
8049 (check_field_decls): Likewise.
8050 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
8051 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
8052 Use DECL_RESULT_FLD, not DECL_RESULT.
8053 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
8054 * lex.c (identifier_type): Likewise.
8055 * pt.c (determine_specialization, lookup_template_class): Likewise.
8056 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
8057 (resolve_overloaded_unification, more_specialized): Likewise.
8058 * semantics.c (finish_member_declaration): Likewise.
8059 * typeck.c (build_x_function_call): Likewise.
8061 2000-03-26 Mark Mitchell <mark@codesourcery.com>
8063 * class.c (layout_empty_base): Handle empty bases with non-byte
8065 (build_base_field): Likewise.
8066 (layout_virtual_bases): Likewise.
8068 * class.c (finish_struct_1): Fix typo in this change:
8070 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8072 2000-03-25 Mark Mitchell <mark@codesourcery.com>
8074 * decl.c (grokdeclarator): Count partial specializations when
8075 keeping track of how many template classes have been seen.
8077 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
8079 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8081 * class.c (build_vbase_pointer_fields): layout_field now place_field.
8082 (get_vfield_offset): Use byte_position.
8083 (set_rtti_entry): Set OFFSET to ssizetype zero.
8084 (get_binfo_offset_as_int): Deleted.
8085 (dfs_record_base_offsets): Use tree_low_cst.
8086 (dfs_search_base_offsets): Likewise.
8087 (layout_nonempty_base_or_field): Reflect changes in RLI format
8088 and call byte_position.
8089 (layout_empty_base): Convert offset to ssizetype.
8090 (build_base_field): use rli_size_unit_so_far.
8091 (dfs_propagate_binfo_offsets): Do computation in proper type.
8092 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
8093 (layout_class_type): Reflect changes in RLI names and fields.
8094 (finish_struct_1): Set DECL_FIELD_OFFSET.
8095 * dump.c (dequeue_and_dump): Call bit_position.
8096 * expr.c (cplus_expand_constant): Use byte_position.
8097 * rtti.c (expand_class_desc): Use bitsize_one_node.
8098 * typeck.c (build_component_addr): Use byte_position and don't
8099 special case for zero offset.
8101 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
8103 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
8105 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
8107 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
8110 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8112 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
8114 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
8115 make_typename_type, check_initializer, cp_finish_decl,
8116 xref_tag): Likewise.
8117 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
8118 decl_namespace, arg_assoc_template_arg, arg_assoc,
8119 validate_nonmember_using_decl, do_class_using_decl): Likewise.
8120 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
8121 args_to_string): Likewise.
8122 * friend.c (is_friend): Likewise.
8123 * lex.c (note_got_semicolon, note_list_got_semicolon,
8124 is_global): Likewise.
8125 * method.c (build_overload_nested_name, build_overload_value,
8126 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
8127 * parse.y (typename_sub, typename_sub1): Likewise.
8128 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
8129 process_partial_specialization, convert_template_argument,
8130 template_args_equal, add_pending_template, lookup_template_class,
8131 for_each_template_parm_r, maybe_fold_nontype_arg,
8132 tsubst, instantiate_template, type_unification_real, unify,
8133 instantiate_pending_templates, set_mangled_name_for_template_decl):
8135 * repo.c (repo_get_id, repo_template_used): Likewise.
8136 * search.c (lookup_field_1): Likewise.
8137 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
8138 * xref.c (classname): Likewise.
8140 2000-03-22 Mark Mitchell <mark@codesourcery.com>
8142 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
8143 (CANONICAL_BINFO): New macro.
8144 (BINFO_NEW_VTABLE_MARKED): Use it.
8145 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
8146 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
8147 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
8149 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8150 (build_secondary_vtable): Likewise.
8151 (dfs_finish_vtbls): Likewise.
8152 (dfs_accumulate_vtbl_inits): Likewise.
8153 (accumulate_vtbl_inits): New function.
8154 (finish_vtbls): Make sure that virtual bases come after
8155 non-virtual bases in the vtable group.
8156 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
8157 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8158 * search.c (struct vbase_info): Move definition.
8159 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8160 (unmarked_new_vtable_p): Likewise.
8161 (dfs_mark_vtable_path): Remove.
8162 (dfs_mark_new_vtable): Remove.
8163 (dfs_unmark_new_vtable): Likewise.
8164 (dfs_clear_search_slot): Likewise.
8165 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
8166 (dfs_clear_vbase_slots): Likewise.
8167 (init_vbase_pointers): LIkewise.
8169 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
8171 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
8172 SIZETYPE to a non-SIZETYPE.
8174 2000-03-21 Mark Mitchell <mark@codesourcery.com>
8176 * class.c (layout_virtual_bases): Adjust names in conditionally
8179 * class.c (record_base_offsets): New function.
8180 (layout_conflict_p): Likewise.
8181 (layout_nonempty_base_or_field): Use it.
8182 (layout_empty_base): New function.
8183 (build_base_field): Use it.
8184 (build_base_fields): Update comment.
8185 (layout_virtual_bases): Fold in a little code form
8186 layout_basetypes. Use layout_empty_base.
8187 (layout_basetypes): Remove.
8188 (end_of_class): New function.
8189 (layout_class_type): Use it. Adjust.
8191 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
8193 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
8195 (dfs_skip_nonprimary_vbases_markedp): Likewise.
8196 * typeck.c (fntype_p): Remove.
8198 * cp-tree.h (TI_SPEC_INFO): Remove.
8199 (CLASSTYPE_TI_SPEC_INFO): Likewise.
8200 * pt.c (process_partial_specialization): Likewise.
8202 * class.c (build_base_field): Fix thinko in computation of binfo
8205 * tree.c (mark_local_for_remap_p): Mark variables declared in
8206 TARGET_EXPRs as well.
8208 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
8210 * typeck.c (require_complete_type, complete_type,
8211 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
8212 build_array_ref, convert_arguments, pointer_diff,
8213 build_x_unary_op, build_unary_op, build_c_cast,
8214 build_modify_expr): Use COMPLETE_TYPE_P etc.
8215 * call.c (is_complete, convert_like_real,
8216 build_new_method_call): Likewise.
8217 * class.c (build_vbase_pointer_fields, check_bases,
8218 build_base_field, finish_struct_1, pushclass): Likewise.
8219 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
8220 * decl.c (maybe_process_template_type_declaration, pushtag,
8221 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
8222 layout_var_decl, check_initializer, cp_finish_decl,
8223 grokdeclarator, require_complete_types_for_parms,
8224 grok_op_properties, xref_tag, xref_basetypes,
8225 check_function_type): Likewise.
8226 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
8227 * friend.c (do_friend): Likewise.
8228 * init.c (build_offset_ref): Likewise.
8229 * parse.y (structsp): Likewise.
8230 * pt.c (maybe_process_partial_specialization,
8231 tsubst_friend_function, instantiate_class_template, tsubst,
8232 do_type_instantiation, instantiate_pending_templates): Likewise.
8233 * repo.c (repo_get_id): Likewise.
8234 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
8235 synthesize_tinfo_var, emit_support_tinfos): Likewise.
8236 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
8237 * semantics.c (begin_class_definition): Likewise.
8238 * tree.c (build_cplus_method_type): Likewise.
8239 * typeck2.c (digest_init, build_functional_cast,
8240 add_exception_specifier): Likewise.
8241 * parse.h, parse.c: Regenerated.
8243 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
8245 * inc/cxxabi.h: New header file. Define new-abi entry points.
8246 (__pointer_type_info::target): Rename member to ...
8247 (__pointer_type_info::type): ... here.
8248 (__base_class_info::type): Rename member to ...
8249 (__base_class_info::base): ... here.
8250 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
8251 * cp-tree.h (CPTI_ABI): New global tree enumeration.
8252 (abi_node): New global tree node.
8253 * decl.c (abi_node): Document.
8254 (init_decl_processing): Initialize abi_node.
8255 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
8256 (get_vmi_pseudo_type_info): Likewise.
8257 (create_tinfo_types): Likewise.
8258 (emit_support_tinfos): Likewise.
8259 * tinfo.h (cxxabi.h): Include for new-abi.
8260 Move rtti class definitions to new header file.
8261 * tinfo.cc (abi): Use the namespace.
8262 (std): Move new abi rtti classes from here ...
8263 (__cxxabiv1): ... to here.
8264 * tinfo2.cc (cxxabi.h): Include for new-abi.
8265 Move rtti class definitions to new header file.
8266 (std): Move new abi rtti classes from here ...
8267 (__cxxabiv1): ... to here.
8268 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
8271 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
8272 Jason Merrill <jason@casey.cygnus.com>
8274 * method.c (build_overload_int): Use host_integerp.
8276 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8278 * init.c (build_offset_ref): Handle the case of a templated member
8281 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8283 * except.c (expand_exception_blocks): Clear catch_clauses_last.
8285 2000-03-18 Mark Mitchell <mark@codesourcery.com>
8287 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
8288 * class.c (check_bitfield_decl): Turn illegal bitfields into
8290 (dfs_propagate_binfo_offsets): Adjust for new size_binop
8292 (dfs_offset_for_unshared_vbases): Likewise.
8293 * cvt.c (cp_convert_to_pointer): Convert NULL to a
8294 pointer-to-member correctly under the new ABI.
8295 * expr.c (cplus_expand_constant): Don't use cp_convert when
8296 turning an offset into a pointer-to-member.
8297 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
8298 when dereferencing them under the new ABI.
8299 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
8300 of pointers-to-members under the new ABI.
8302 * class.c (check_bitfield_decl): Remove restriction on really long
8304 (layout_class_type): Implement new ABI handling of bitfields
8305 longer than their types.
8307 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8309 * parse.y (extdefs): Call ggc_collect.
8310 * parse.c: Regenerated.
8312 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
8314 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
8315 (note_name_declared_in_class): Use OVL_CURRENT to get at a
8318 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8320 * class.c (build_vbase_path): Use integer_zerop.
8321 (build_vtable_entry): Use tree_low_cst.
8322 (get_vfield_offset): Use bit_position.
8323 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
8325 (check_bitfield_decl): Set DECL_SIZE using convert.
8326 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
8327 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
8329 (finish_struct_1): Use bit_position.
8330 (dump_class_hierarchy): Use tree_low_cst.
8331 * cp-tree.h (min_precision): Add declaration.
8332 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
8333 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
8334 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
8335 * expr.c (cplus_expand_constant): Use bit_position.
8336 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
8337 * rtti.c (get_base_offset): Use bit_position.
8338 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
8339 host_integerp, and tree_low_cst.
8340 (pointer_int_sum): Use integer_zerop.
8341 (build_component_addr): Use bit_position.
8343 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
8345 * typeck.c (require_complete_type): Don't assume size_zero_node.
8346 (complete_type_or_else): Likewise.
8348 2000-03-16 Steven Grady <grady@digitaldeck.com>
8349 Jason Merrill <jason@casey.cygnus.com>
8351 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
8353 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
8355 * decl2.c (grokfield): Bail out if type is error_mark_node.
8357 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
8359 * tinfo2.cc (__ptr_to_member_data): Rename to ...
8360 (__pointer_to_member_data): ... here. Adjust.
8361 * rtti.c (create_tinfo_types): Adjust.
8363 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
8365 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
8366 * decl.c (ref_desc_type_node): Undocument.
8367 * rtti.c (ptr_ref_initializer): Rename to ...
8368 (ptr_initializer): ... here. Adjust comments.
8369 (ptmd_initializer): Fix comment thinko.
8370 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
8371 (create_tinfo_types): Remove ref_desc_type_node init.
8372 * tinfo2.cc (__reference_type_info): Remove.
8374 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
8376 * decl.c (cp_finish_decl): Remove obsolete comment.
8378 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
8380 2000-03-14 Mark Mitchell <mark@codesourcery.com>
8382 * cp-tree.h: Tweak documentation.
8383 * class.c (build_vbase_pointer_fields): Layout the fields, too.
8384 (avoid_overlap): Remove.
8385 (get_binfo_offset_as_int): New function.
8386 (dfs_serach_base_offsets): Likewise.
8387 (layout_nonempty_base_or_field): Likewise.
8388 (build_base_field): Layout fields here. Avoid placing two objects
8389 of the same type at the same address, under the new ABI.
8390 (build_base_fields): Adjust accordingly.
8391 (create_vtable_ptr): Return the new field, but don't attach it to
8393 (remove_base_field): Remove.
8394 (remove_base_fields): Remove.
8395 (layout_basetypes): Adjust accordingly.
8396 (layout_class_type): Call layout_field for each field, rather than
8397 just making a wholesale call to layout_type.
8399 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
8401 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
8403 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
8405 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
8407 * except.c (dtor_nothrow): New fn.
8408 (do_pop_exception): Use it. Take type parm.
8409 (push_eh_cleanup): Take type parm.
8410 (expand_start_catch_block): Pass it.
8411 (build_eh_type_type_ref): Accept null type.
8413 2000-03-12 Mark Mitchell <mark@codesourcery.com>
8415 * cp-tree.h (revert_static_member_fn): Change prototype.
8416 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
8417 (grok_op_properties): Likewise.
8418 (start_function): Likewise.
8419 (revert_static_member_fn): Simplify.
8420 * pt.c (check_explicit_specialization): Adjust call to
8421 revert_static_member_fn.
8423 2000-03-11 Mark Mitchell <mark@codesourcery.com>
8425 * cp-tree.h (scope_kind): New type.
8426 (tmpl_spec_kind): Likewise.
8427 (declare_pseudo_global_level): Remove.
8428 (pseudo_global_level_p): Rename to template_parm_scope_p.
8429 (pushlevel): Remove declaration.
8430 (begin_scope): New function.
8431 (finish_scope): Likewise.
8432 (current_tmpl_spec_kind): Likewise.
8433 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
8434 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
8435 Add template_spec_p.
8436 (toplevel_bindings_p): Adjust.
8437 (declare_pseudo_global_level): Remove.
8438 (pseudo_global_level_p): Rename to template_parm_scope_p.
8439 (current_tmpl_spec_kind): New function.
8440 (begin_scope): Likewise.
8441 (finish_scope): Likewise.
8442 (maybe_push_to_top_level): Adjust.
8443 (maybe_process_template_type_declaration): Likewise.
8444 (pushtag): Likewise.
8445 (pushdecl_nonclass_level): Likewise.
8446 (lookup_tag): Likewise.
8447 (grokfndecl): Handle member template specializations. Share
8448 constructor and non-constructor code.
8449 * decl2.c (check_classfn): Handle member template specializations.
8450 * pt.c (begin_template_parm_list): Use begin_scope.
8451 (begin_specialization): Likewise.
8452 (end_specialization): Likewise.
8453 (check_explicit_specialization): Use current_tmpl_spec_kind.
8454 Handle member template specializations.
8455 (end_template_decl): Use finish_scope. Remove call to
8457 (push_template_decl_real): Remove bogus error message.
8458 (tsubst_decl): Fix typo in code contained in comment.
8459 (instantiate_template): Handle member template specializations.
8460 (most_general_template): Likewise.
8462 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
8464 * lex.c (whitespace_cr): Compress consecutive calls to warning().
8465 (do_identifier): Ditto for error().
8467 * pt.c (convert_nontype_argument): Ditto for cp_error().
8468 (convert_template_argument): Ditto for cp_pedwarn().
8470 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
8472 * exception.cc (__check_null_eh_spec): New fn.
8473 * except.c (expand_end_eh_spec): Call it if the spec is throw().
8475 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
8477 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
8478 * except.c (expand_end_eh_spec): Add the return type.
8479 * rtti.c (throw_bad_cast): Add the parmtypes.
8480 (throw_bad_typeid): Likewise.
8482 * semantics.c (expand_stmt): Only leave out rtl for unused
8483 artificials, and set DECL_IGNORED_P on them as well.
8484 * decl.c (wrapup_globals_for_namespace): Likewise.
8486 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
8488 * decl.c (maybe_commonize_var): Skip all artificial decls.
8489 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
8491 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
8493 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
8494 * cp-tree.h: Declare flag_enforce_eh_specs.
8495 * decl.c (store_parm_decls, finish_function): Check it.
8497 C library functions don't throw.
8498 * Makefile.in (cfns.h): New target.
8499 (except.o): Depend on it.
8500 * Make-lang.in (cc1plus): Depend on cfns.gperf.
8501 * cfns.gperf: New file.
8502 * cfns.h: Generated.
8503 * except.c: Include it.
8504 (nothrow_libfn_p): New fn.
8505 * decl.c (grokfndecl): Use it.
8506 * cp-tree.h: Declare it.
8508 * decl.c (push_overloaded_decl_1, auto_function,
8509 define_function): Lose.
8510 (build_library_fn_1): New static fn.
8511 (builtin_function): Use it.
8512 (get_atexit_node): Use build_library_fn_ptr.
8513 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
8514 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
8515 push_void_library_fn, push_throw_library_fn): New fns.
8516 * cp-tree.h: Declare them.
8517 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
8518 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
8519 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
8520 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
8521 * rtti.c (build_runtime_decl): Lose.
8522 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
8523 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
8524 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
8526 * call.c (build_call): Remove result_type parm.
8527 Call mark_used on unused artificial fns.
8528 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
8530 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
8532 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
8534 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
8535 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
8536 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
8537 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
8538 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8539 expand_generic_desc): Likewise.
8541 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8543 * exception.cc (__cp_pop_exception): Cleanup the original object.
8545 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8547 * decl.c (grok_op_properties): Merge conversion to void warning
8548 with other silly op warnings.
8550 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
8552 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
8553 array CONSTRUCTOR elements. Don't use expr_tree_cons.
8555 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8557 * decl.c (cp_make_fname_decl): New function.
8558 (wrapup_globals_for_namespace): Don't emit unused static vars.
8559 (init_decl_processing): Remove comment about use of
8560 array_domain_type. Set make_fname_decl.
8561 (cp_finish_decl): Remove __FUNCTION__ nadgering.
8562 * semantics.c (begin_compound_stmt): Remove
8563 current_function_name_declared flagging.
8564 (expand_stmt): Don't emit unused local statics.
8565 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
8568 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8570 * typeck.c (convert_for_assignment): Don't look at array
8572 * call.c (convert_like_real): Likewise.
8574 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
8576 Add initial support for '\uNNNN' specifier.
8577 * lex.c (read_ucs): New fn.
8578 (readescape, skip_white_space): Call it.
8579 (is_extended_char, is_extended_char_1): New fns.
8580 (utf8_extend_token): New fn, #if 0'd out.
8581 (real_yylex): Treat extended chars like letters.
8583 * search.c (note_debug_info_needed): Walk the bases even if we
8584 weren't deferring the type itself.
8586 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8588 * decl2.c (finish_objects): Constify a char*.
8590 * method.c (emit_thunk): Likewise.
8592 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
8594 * typeck.c (dubious_conversion_warnings): Look through
8597 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8599 * class.c (dfs_modify_vtables): I is now unsigned.
8600 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
8601 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
8602 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
8603 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8604 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
8605 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
8606 Call integer_all_onesp.
8607 * typeck2.c (process_init_constructor): Use compare_tree_int.
8609 * lang-specs.h (as): Don't call if -syntax-only.
8611 2000-03-06 Mark Mitchell <mark@codesourcery.com>
8613 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
8614 RTL_EXPR_HAS_NO_SCOPE after all.
8616 2000-03-05 Mark Mitchell <mark@codesourcery.com>
8618 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
8619 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
8620 RTL_EXPR_HAS_NO_SCOPE.
8622 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
8625 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
8627 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
8629 * call.c (convert_like): Macrofy.
8630 (convert_like_with_context): New macro.
8631 (convert_like_real): Renamed from convert_like. Add calling
8632 context parameters, for diagnostics. Add recursive flag. Call
8633 dubious_conversion_warnings for outer conversion.
8634 (build_user_type_conversion): Use convert_like_with_context.
8635 (build_over_call): Likewise. Don't warn about dubious
8636 conversions here. Adjust convert_default_arg calls.
8637 (convert_default_arg): Add context parameters for diagnostics.
8638 Pass throught to convert_like_with_context.
8639 * cp-tree.h (convert_default_arg): Add context parameters.
8640 (dubious_conversion_warnings): Prototype new function.
8641 * typeck.c (convert_arguments): Adjust convert_default_arg call.
8642 (dubious_conversion_warnings): New function, broken
8643 out of convert_for_assignment.
8644 (convert_for_assignment): Adjust.
8646 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
8648 * decl2.c (key_method): Break out from...
8649 (import_export_vtable, import_export_class): ...here.
8651 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
8652 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
8654 * search.c (note_debug_info_needed, dfs_debug_mark,
8655 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
8656 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
8658 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
8660 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
8663 2000-03-02 Mark Mitchell <mark@codesourcery.com>
8665 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
8666 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
8667 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
8668 (lang_type): Split gets_new into has_new and has_array_new.
8669 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8670 (TYPE_GETS_NEW): Split into ...
8671 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
8672 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
8673 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
8674 (build_op_new_call): Don't declare.
8675 (build_new_1): Likewise.
8676 * call.c (build_op_new_call): Remove.
8677 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
8678 instead of TYPE_NEEDS_DESTRUCTOR.
8679 (finish_struct_bits): Likewise.
8680 (add_implicitly_declared_members): Likewise.
8681 (check_field_decl): Likewise.
8682 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
8683 correctly under the new ABI.
8684 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
8685 instead of TYPE_NEEDS_DESTRUCTOR.
8686 (initialize_local_var): Likewise.
8687 (destroy_local_var): Likewise.
8688 (cp_finish_decl): Likewise.
8689 (register_dtor_fn): Likewise.
8690 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
8691 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
8692 TYPE_VEC_DELETE_TAKES_SIZE here.
8693 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
8694 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
8695 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8696 (finish_destructor_body): Likewise.
8697 (maybe_build_cleanup_1): Likewise.
8698 * decl2.c (do_static_destruction): Likewise.
8699 * init.c (build_new_1): Make it static.
8700 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8701 (expand_cleanup_for_base): Likewise.
8702 (get_cookie_size): New function.
8703 (build_new_1): Handle array-new cookies correctly under the new
8705 (build_vec_delete_1): Likewise.
8706 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8707 (build_delete): Likewise.
8708 (build_vec_delete): Handle array-new cookies correctly under the new
8710 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8711 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
8712 TYPE_HAS_ARRAY_NEW_OPERATOR.
8713 * ptree.c (print_lang_type): Check them.
8714 * search.c (context_for_name_lookup): Fix typo in comment.
8715 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8716 * tree.c (break_out_cleanups): Likewise.
8717 (build_cplus_array_test_1): Likewise.
8718 (cp_build_qualified_type_real): Likewise.
8719 * typeck.c (complete_type): Likewise.
8721 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
8722 the command-line, not the end.
8724 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
8726 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
8728 2000-03-02 Tom Tromey <tromey@cygnus.com>
8730 * cp-tree.h (build_java_class_ref): Declare.
8731 * init.c (build_java_class_ref): No longer static.
8732 * except.c (expand_throw): Generate a Java-style `throw' if the
8733 thrown object is a "Java" object.
8734 (initialize_handler_parm): Generate a Java-style lookup of
8735 exception info if the caught object is a "Java" object.
8736 (catch_language, catch_language_init): New globals.
8737 (decl_is_java_type): New function.
8738 (expand_start_catch_block): Don't call push_eh_info() or
8739 push_eh_cleanup() when handling a Java-style "catch". Pass Java
8740 class reference to build_catch_block.
8742 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8744 * typeck.c (comptypes): Treat sizetype like its language equivalent.
8746 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
8748 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
8749 to merge reference/pointer code and fix incorrect warnings.
8751 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
8753 * search.c (protected_accessible_p): Use context_for_name_lookup.
8755 * init.c (construct_virtual_bases): Fix thinko.
8756 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
8758 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
8760 * decl.c (current_function_decl): Move to toplev.c.
8762 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
8764 * pt.c (fn_type_unification): Unify return type, whenever
8766 (get_bindings_real): Only pass return type when necessary.
8767 Remove explicit return type check.
8768 * class.c (resolve_address_of_overloaded_function): Pass desired
8769 return type to fn_type_unification.
8771 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8773 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
8775 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
8777 * rtti.c (expand_class_desc): Likewise.
8778 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
8779 (THUNK_VCALL_OFFSET): Likewise.
8780 (THUNK_DELTA): Reflect changes in ../tree.h.
8782 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
8784 * search.c (protected_accessible_p): Also allow the access if
8785 the member is public in DERIVED. Lose TYPE parm.
8786 (friend_accessible_p): Lose TYPE parm.
8787 (accessible_p): Adjust.
8789 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8791 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
8792 on things that are not sizes; ssize_binop deleted.
8793 Call size_diffop when appropriate.
8794 (dfs_build_vcall_offset_vtbl_entries): Likewise.
8795 (build_primary_vtable, build_secondary_vtable): Likewise.
8796 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
8797 Variable I is HOST_WIDE_INT.
8798 (get_vfield_offset): Pass proper types to size_binop.
8799 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
8800 (finish_struct_1): Likewise.
8801 (skip_rtti_stuff): Arg N is now pointer to signed.
8802 (layout_class_type): Use size_zero_node.
8803 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
8804 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
8805 * decl.c (complete_arry_type): Pass proper types to size_binop.
8806 (xref_basetypes): BINFO_OFFSET is sizetype.
8807 * error.c (dump_expr): Don't use size_binop non-sizes.
8808 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
8809 * init.c (construct_virtual_bases): Fix type error.
8810 (build_vec_delete_1): Pass proper type to size_binop and don't
8812 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
8813 * rtti.c (get_base_offset): Pass proper type to size_binop.
8814 * search.c (dfs_find_vbases): Fix type error.
8815 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
8816 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
8817 * tree.c (debug_binfo): Variable N is signed.
8818 Use HOST_WIDE_INT_PRINT_DEC.
8819 * typeck.c (comptypes): sizetype is same as equivalent integer type.
8820 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
8821 size_one_node and size_zero_node.
8822 (c_alignof): Use size_one_node.
8823 (build_component_addr): Pass proper types to size_binop.
8824 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
8826 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
8828 Implement class scope using-declarations for functions.
8829 * class.c (handle_using_decl): Call add_method for used functions.
8830 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
8831 (add_method): Used functions are hidden by local functions.
8832 (check_bases_and_members): Handle using-decls before finalizing
8833 CLASSTYPE_METHOD_VEC.
8834 * call.c (add_function_candidate): Add ctype parm; if non-zero,
8835 override the type of 'this' accordingly.
8836 (add_template_candidate, add_template_candidate_real): Add ctype parm.
8837 (convert_class_to_reference, build_user_type_conversion_1,
8838 build_new_function_call, build_object_call, build_new_op,
8839 build_new_method_call): Pass ctype parm.
8841 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
8843 * call.c (convert_class_to_reference, build_user_type_conversion_1,
8844 build_new_function_call, build_object_call, build_new_op,
8845 build_new_method_call, build_op_delete_call): Don't get basetype_path
8847 * typeck.c (build_component_ref): Likewise.
8848 * init.c (build_offset_ref): Likewise.
8849 (resolve_offset_ref): Don't call enforce_access.
8850 Call build_scoped_ref.
8851 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
8852 would cause an error or if -pedantic.
8853 * class.c (alter_access): Lose binfo parm.
8855 2000-02-26 Mark Mitchell <mark@codesourcery.com>
8857 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
8860 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
8862 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
8863 pseudo_type_info creation into the std namespace
8865 2000-02-26 Mark Mitchell <mark@codesourcery.com>
8867 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
8868 (import_export_class): Remove declaration.
8869 * decl2.c (import_export_class): Make it static.
8870 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
8871 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
8872 EXPR_WITH_FILE_LOCATION.
8873 * lex.c (check_newline): Tweak filename/lineno setting.
8874 * semantics.c (begin_while_stmt): Fix typo in comment.
8876 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8878 * lang-options.h (-fmessage-length=): Add missing option.
8880 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
8882 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
8884 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
8886 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
8888 * optimize.c (expand_call_inline): Emit the return label before
8889 evaluating the return value.
8891 2000-02-24 Mark Mitchell <mark@codesourcery.com>
8893 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
8894 than duplicating functionality here.
8895 * optimize.c: Include input.h.
8896 (expand_call_inline): Use push_srcloc and pop_srcloc.
8897 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
8898 * parse.c: Regenerated.
8899 * Makefile.in (lex.o): Depend on input.h.
8900 (optimize.o): Likewise.
8902 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
8904 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
8905 function type, rather than ICE.
8907 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
8909 * decl.c (grokdeclarator): Call decl_type_access_control.
8910 * parse.y (parse_end_decl): Don't call decl_type_access_control if
8913 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
8915 * decl.c (decls_match): Remove obsolete static member nadgering.
8917 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8919 * decl.c (grokdeclarator): Change ANSI to ISO.
8920 * lex.c (consume_string, readescape, do_identifier): Likewise.
8921 (parse_float, real_yylex): Likewise.
8922 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
8923 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
8924 new_type_id, maybe_label_decls, simple_stmt,
8925 for.init.statement): Likewise.
8926 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
8927 * semantics.c (finish_named_return_value): Likewise.
8928 * parse.c: Regenerate.
8930 2000-02-21 Mark Mitchell <mark@codesourcery.com>
8932 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
8933 (CPTI_CLASS_STAR_TYPE): Remove.
8934 (vtable_index_type): Likewise.
8935 (class_star_type_node): Remove.
8936 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
8937 (build_binary_op_nodefault): Remove.
8938 * call.c (build_new_op): Use build_binary_op instead of
8939 build_binary_op_nodefault.
8940 * decl.c (init_decl_processing): Remove class_star_type_node
8941 initialization. Make delta_type_node ptrdiff_type_node under the
8942 new ABI. Initialize vtable_index_type.
8943 (build_ptrmemfunc_type): Build different structures for the new
8945 (build_enumerator): Use build_binary_op instead of
8946 build_binary_op_nodefault.
8947 * method.c (build_overload_value): Mangle pointers-to-members
8948 appropriately under the new ABI.
8949 * typeck.c (build_array_ref): Use build_binary_op instead of
8950 build_binary_op_nodefault.
8951 (get_member_function_from_ptrfunc): Adjust for the new ABI.
8952 (build_binary_op_nodefault): Rename to ...
8953 (build_binary_op): ... this. Remove old version. Adjust for
8954 pointer-to-member comparisons under the new ABI.
8955 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
8956 (build_ptrmemfunc): Adjust for the new ABI.
8957 (expand_ptrmemfunc_cst): Likewise.
8958 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
8959 (pfn_from_ptrmemfunc): Adjust for the new ABI.
8961 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
8963 * call.c (build_object_call): Compress consecutive calls to
8965 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
8966 (build_op_delete_call): Adjust message formatting.
8968 * class.c (check_bases): Compress consecutive calls to
8970 (finish_struct_anon): Say 'ISO C++'.
8972 * decl.c (start_decl): Same here.
8973 (grok_reference_init): Likewise.
8974 (grokfndecl): Correct message formatting.
8975 (grokfndecl): Improve diagnostic.
8976 (check_static_variable_definition): Likewise. Say 'ISO C++'
8977 (compute_array_index_type): Say 'ISO C++'
8978 (create_array_type_for_decl): Compress consecutive calls to
8980 (grokdeclarator): Say 'ISO C++'
8981 (grok_op_properties): Likewise.
8983 * decl2.c (delete_sanity): Clairify diagnostic.
8984 (check_member_template): Same here.
8985 (grok_function_init): Use consistent terminology.
8987 * expr.c (do_case): Say 'ISO C++'
8989 * friend.c (do_friend): Compress consecutive calls to warning.
8991 2000-02-20 Mark Mitchell <mark@codesourcery.com>
8993 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
8994 * class.c (build_secondary_vtable): Reorganize. Don't create a
8995 new vtable under the new ABI.
8996 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
8998 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
8999 the initializing elements.
9000 (initialize_vtable): New function.
9001 (dfs_finish_vtbls): Use it.
9002 (dfs_accumulate_vtbl_inits): New function.
9003 (finish_vtbls): Merge primary and secondary vtables under the new
9005 (finish_struct_1): Remove redundant call to layout_vtable_decl.
9006 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
9009 * class.c (build_vtable): New function, split out from ...
9010 (get_vtable_decl): ... here, and ...
9011 (build_secondary_vtable): ... here.
9013 * pt.c (tsubst_decl): Fix formatting.
9015 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9017 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
9018 (avoid_overlap, build_base_field): Likewise.
9019 (build_base_field, build_base_fields, is_empty_class):
9020 Test DECL_SIZE with integer_zero.
9021 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
9022 * cp-tree.h (struct lang_type): New field size_unit.
9023 (CLASSTYPE_SIZE_UNIT): New macro.
9024 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
9025 (cp_finish_decl): Delete -Wlarger-than processing.
9026 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
9027 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
9028 * tree.c (make_binfo): binfo vector is one entry longer.
9029 (walk_tree): Walk DECL_SIZE_UNIT.
9031 2000-02-19 Mark Mitchell <mark@codesourcery.com>
9033 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
9035 (build_vtable_entry): Don't assume all vtable entries are
9037 (build_vtbl_initializer): Adjust accordingly.
9038 (get_vtable_decl): Fix formatting.
9040 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
9042 * semantics.c (deferred_type_access_control): Walk the entire
9044 (save_type_access_control): Rename from
9045 initial_deferred_type_access_control. Just remember the value.
9046 (decl_type_access_control): New fn.
9047 (begin_function_definition): Use deferred_type_access_control, after
9048 we've started the function. Set type_lookups to error_mark_node.
9049 * parse.y (frob_specs, fn.def1): Adjust.
9050 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
9051 (parse_end_decl, parse_bitfield0, parse_method): New fns.
9052 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
9053 (after_type_component_declarator0): Likewise.
9054 (after_type_component_declarator): Likewise.
9055 (notype_component_declarator): Likewise.
9056 * cp-tree.h: Adjust.
9058 * decl.c (redeclaration_error_message): Allow redeclaration of
9059 namespace-scope decls.
9061 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
9063 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
9065 2000-02-17 Mark Mitchell <mark@codesourcery.com>
9067 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
9068 * decl2.c (grokclassfn): Likewise.
9070 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
9072 * decl2.c (lang_decode_option): Don't set default message length
9074 * lex.c (lang_init_options): Set it here.
9076 2000-02-16 Mark Mitchell <mark@codesourcery.com>
9078 Make DECL_CONTEXT mean the class in which a member function was
9079 declared, even for a virtual function.
9080 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
9081 (DECL_FRIEND_CONTEXT): New macro.
9082 (DECL_REAL_CONTEXT): Remove.
9083 (SET_DECL_FRIEND_CONTEXT): Likewise.
9084 (DECL_VIRTUAL_CONTEXT): Adjust.
9085 (DECL_CLASS_SCOPE_P): Use TYPE_P.
9086 (add_friends): Remove.
9087 (hack_decl_function_context): Likewise.
9088 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
9090 (build_over_call): Fix indentation. Use DECL_CONTEXT
9091 instead of DECL_CLASS_CONTEXT.
9092 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
9093 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
9094 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9095 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
9096 (build_base_field): Likewise.
9097 (finish_struct_1): Likewise.
9098 (build_self_reference): Likewise.
9099 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
9101 (pushtag): Use decl_function_context, not
9102 hack_decl_function_context.
9103 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
9104 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
9105 (pushdecl): Remove bogus code.
9106 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
9107 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
9108 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9109 Use decl_function_context, nothack_decl_function_context.
9110 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
9111 (grokdeclarator): Likewise. Use decl_function_context, not
9112 hack_decl_function_context.
9113 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
9114 (start_function): Use DECL_FRIEND_CONTEXT, not
9115 DECL_CLASS_CONTEXT. Use decl_function_context, not
9116 hack_decl_function_context.
9117 (finish_function): Use decl_function_context, not
9118 hack_decl_function_context.
9119 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
9121 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
9122 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
9123 (grokfield): Likewise.
9124 (finish_builtin_type): Likewise.
9125 (finish_vtable_vardec): Use decl_function_context, not
9126 hack_decl_function_context.
9127 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9128 (start_static_initialization_or_destruction): Likewise.
9129 (finish_static_initialization_or_destruction): Likewise.
9130 (mark_used): Adjust logic for deciding when to synthesize methods.
9131 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
9133 * error.c (dump_function_decl): Use DECL_CONTEXT, not
9135 * friend.c (is_friend): Likewise.
9136 (add_friends): Remove.
9137 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
9138 * lex.c (begin_definition_of_inclass_inline): Use
9139 decl_function_context, not hack_decl_function_context.
9140 (process_next_inline): Likewise.
9141 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
9142 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
9143 DECL_CLASSS_CONTEXT.
9144 (hack_identifier): Likewise.
9145 (synthesize_method): Use decl_function_context, not
9146 hack_decl_function_context.
9147 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
9149 (is_member_template): Use decl_function_context, not
9150 hack_decl_function_context. Use DECL_CONTEXT, not
9152 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
9154 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
9156 (push_template_decl_real): Likewise.
9157 (instantiate_class_template): Don't call add_friends.
9158 (tsubst_default_argument): Use DECL_CONTEXT, not
9160 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
9161 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9162 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
9164 * repo.c (repo_inline_used): Likewise.
9165 * search.c (current_scope): Adjust for new _CONTEXT macros.
9166 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
9168 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
9169 (lookup_fnfields_here):Likewise.
9170 (check_final_overrider): Likewise.
9171 (init_vbase_pointers): Likewise.
9172 (virtual_context): Likewise.
9173 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
9174 (expand_body): Use decl_function_context, not
9175 hack_decl_function_context.
9176 * tree.c (hack_decl_function_context): Remove.
9177 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
9179 * typeck2.c (error_not_base_type): Likewise.
9181 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
9183 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
9185 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9187 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
9189 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
9191 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
9193 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
9195 * decl2.c (lang_decode_option): Enable automatic line wrapping.
9197 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
9199 * parse.y (frob_specs): Split out...
9200 (parse_decl): From here.
9201 (fn.def2): Call initial_deferred_type_access_control.
9202 (after_type_component_declarator0): Call frob_specs.
9203 (notype_component_declarator0): Likewise.
9204 * search.c (friend_accessible_p): Nested classes are friends of their
9207 2000-02-10 Mark Mitchell <mark@codesourcery.com>
9209 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
9210 used to create an implicit temporary.
9212 * class.c (dfs_modify_vtables): Tweak calculation of functions to
9215 2000-02-08 Nathan Sidwell <nathan@acm.org>
9217 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
9218 strip array element qualifiers too.
9220 2000-02-07 Mark Mitchell <mark@codesourcery.com>
9222 * decl.c (store_parm_decls): Don't build cleanups for parameters
9223 while processing_template_decl.
9225 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
9227 * cp-tree.h (struct saved_scope): Add incomplete field.
9228 (namespace_scope_incomplete): New macro.
9229 * decl.c (pushdecl): Use it.
9230 (hack_incomplete_structures): Use it. See through artificial
9232 (mark_saved_scope): Mark it.
9234 Implement access control for nested types.
9235 * search.c (type_access_control): New fn.
9236 (accessible_p): Now we do perform access control for types.
9237 * semantics.c (deferred_type_access_control): New fn.
9238 (initial_deferred_type_access_control): New fn.
9239 (begin_function_definition): Call it. Add lookups parm.
9240 * decl.c (struct binding_level): Add this_class field.
9241 (pushlevel_class): Set it.
9242 (mark_binding_level): Mark it.
9243 (lookup_name_real): Use it. Call type_access_control.
9244 (mark_saved_scope): Mark lookups field.
9245 * cp-tree.h (flagged_type_tree): Add lookups field.
9246 (struct saved_scope): Add lookups field.
9247 (type_lookups): New macro.
9248 * parse.y (declmods): Now <ftype>.
9249 (parse_decl): Add lookups parm. Call
9250 initial_deferred_type_access_control.
9251 (lang_extdef): Clear type_lookups.
9252 (typed_declspecs, declmods, typespec): Set lookups field.
9253 (initdcl): Call deferred_type_access_control.
9254 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
9255 component_decl_1, named_parm): Adjust.
9256 * friend.c (is_friend): Nested classes are friends of their
9259 * class.c (currently_open_derived_class): New fn.
9260 * method.c (hack_identifier): Use it.
9262 * lex.c (do_identifier): Remove obsolete code.
9264 * parse.y (typed_typespecs): Propagate new_type_flag properly.
9266 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
9268 * tinfo.h: Remove apostrophes from C++ comment (xgettext
9269 thinks this file is plain C).
9271 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9273 * Makefile.in (call.o): Depend on $(EXPR_H).
9275 * call.c: Include "expr.h".
9277 * class.c (dump_class_hierarchy): Add prototype.
9279 * search.c (dfs_get_pure_virtuals): Likewise.
9281 2000-02-1 Ulrich Drepper <drepper@redhat.com>
9283 * parse.y (simple_stmt): Allow :: token in asm parameter list.
9286 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
9288 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
9289 Store it in DECL_FCONTEXT.
9290 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
9292 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
9294 * tinfo.h (old abi): #include "tconfig.h".
9295 * tinfo.cc (convert_to_base): Move into old abi section.
9297 2000-01-31 Mark Mitchell <mark@codesourcery.com>
9299 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
9300 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
9301 (BINFO_PRIMARY_BINFO): New macro.
9302 (BF_DELTA): Rename to ...
9303 (BV_DELTA): ... this.
9304 (BF_VCALL_INDEX): Rename to ...
9305 (BV_VCALL_INDEX): ... this.
9306 (BF_FN): Rename to ...
9308 * class.c (build_vbase_path): Adjust for changes to reverse_path.
9309 (set_rtti_entry): Rename BF_ macros to BV_ variants.
9310 (modify_vtable_entry): Simplify.
9311 (add_virtual_function): Rename BF_ macros to BV_ variants.
9312 (build_vtable_initializer): Likewise.
9313 (get_class_offset_1): Remove.
9314 (dfs_get_class_offset): Likewise.
9315 (get_class_offset): Likewise.
9316 (dfs_find_final_overrider): New function.
9317 (find_final_overrider): Likewise.
9318 (modify_one_vtable): Remove.
9319 (dfs_find_base): New function.
9320 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
9321 find_final_overrider.
9322 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
9324 (dfs_fixup_vtable_deltas): Remove.
9325 (override_one_vtable): Remove.
9326 (merge_overrides): Likewise.
9327 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
9328 unreal chilren of virtual bases.
9329 (finish_struct_1): Don't use merge_overrides. Don't use
9330 dfs_fixup_vtable_deltas.
9331 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
9334 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
9335 Jason Merrill <jason@yorick.cygnus.com>
9337 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
9339 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
9341 * exception.cc (__throw_bad_typeid): Add missing std::.
9343 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9345 * cp-tree.h (make_thunk): PROTO -> PARAMS.
9347 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
9349 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
9351 Runtime support for new-abi rtti.
9352 * inc/typeinfo (type_info::operator!=): Define in class.
9353 (type_info::before, type_info::name, type_info::operator==,
9354 type_info::operator!=): Define new ABI implementations.
9355 (type_info::is_pointer_p, type_info::is_function_p): Declare
9356 new virtual functions.
9357 (type_info::do_catch, type_info::do_upcast): Likewise.
9359 * tinfo.h (__base_class_info): Define new class.
9360 (__class_type_info): Likewise.
9361 (__si_class_type_info): Likewise.
9362 (__vmi_class_type_info): Likewise.
9363 (__dynamic_cast): Prototype.
9365 * tinfo.cc: Conditionalize old and new rtti mechanisms.
9366 (type_info::is_pointer_p): Define new function.
9367 (type_info::is_function_p): Likewise.
9368 (type_info::do_catch): Likewise.
9369 (type_info::do_upcast): Likewise.
9370 (vtable_prefix): New structure for vtable access.
9371 (adjust_pointer): Define new template function.
9372 (contained_p, public_p, virtual_p, contained_public_p,
9373 contained_nonpublic_p, contained_nonvirtual_p): Define new
9375 (nonvirtual_base_type): New local variable.
9376 (__class_type_info::~__class_type_info): Define.
9377 (__si_class_type_info::~__si_class_type_info): Likewise.
9378 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
9379 (__class_type_info::do_catch): Define new function.
9380 (__class_type_info::do_upcast): Likewise.
9381 (__class_type_info::find_public_src): Likewise.
9382 (__class_type_info::do_find_public_src): Likewise.
9383 (__si_class_type_info::do_find_public_src): Likewise.
9384 (__vmi_class_type_info::do_find_public_src): Likewise.
9385 (__class_type_info::do_dyncast): Likewise.
9386 (__si_class_type_info::do_dyncast): Likewise.
9387 (__vmi_class_type_info::do_dyncast): Likewise.
9388 (__class_type_info::do_upcast): Likewise.
9389 (__si_class_type_info::do_upcast): Likewise.
9390 (__vmi_class_type_info::do_upcast): Likewise.
9391 (__dynamic_cast): Likewise.
9393 * tinfo2.cc (__fundamental_type_info): Define new class.
9394 (__pointer_type_info): Likewise.
9395 (__reference_type_info): Likewise.
9396 (__array_type_info): Likewise.
9397 (__function_type_info): Likewise.
9398 (__enum_type_info): Likewise.
9399 (__ptr_to_member_type_info): Likewise.
9400 (__fundamental_type_info::~__fundamental_type_info): Define.
9401 (__pointer_type_info::~__pointer_type_info): Likewise.
9402 (__reference_type_info::~__reference_type_info): Likewise.
9403 (__array_type_info::~__array_type_info): Likewise.
9404 (__function_type_info::~__function_type_info): Likewise.
9405 (__enum_type_info::~__enum_type_info): Likewise.
9406 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
9407 (__pointer_type_info::do_catch): Define new function.
9408 (__ptr_to_member_type_info::do_catch): Define new function.
9410 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
9411 (__is_pointer): Likewise.
9413 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
9415 2000-01-30 Mark Mitchell <mark@codesourcery.com>
9417 * cp/class.c (build_vtable): Rename to build_primary_vtable.
9418 (prepare_fresh_vtable): Rename to build_secondary_vtable.
9419 (make_new_vtable): New function.
9420 (modify_vtable_entry): Handle generation of new vtables correctly.
9421 (modify_one_vtable): Remove unused parameter.
9422 (dfs_fixup_vtable_deltas): Likewise.
9423 (override_one_vtable): Use build_secondary_vtable.
9424 (finish_struct_1): Use build_primary_vtable and
9425 build_secondary_vtable.
9427 2000-01-28 Ulrich Drepper <drepper@redhat.com>
9429 * cp/decl.c: Adjust variable names, comments, help strings.
9431 2000-01-29 Nathan Sidwell <nathan@acm.org>
9433 * new2.cc (operator delete[]): Use operator delete, don't assume
9436 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
9438 * class.c (build_vtbl_initializer): Add argument to
9439 build_vtable_entry call.
9441 2000-01-27 Mark Mitchell <mark@codesourcery.com>
9443 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
9444 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
9445 (BF_DELTA): New macro.
9446 (BF_VCALL_INDEX): Likewise.
9448 (THUNK_VCALL_OFFSET): Likewise.
9449 (make_thunk): Change prototype.
9450 * class.c (build_vtable_entry): Integrate
9451 build_vtable_entry_for_fn. Handle vcall indices.
9452 (build_vtable_entry_for_fn): Remove.
9453 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
9454 BF_VCALL_INDEX, BF_FN.
9455 (modify_vtable_entry): Integrate common code from
9456 modify_one_vtable and dfs_fixup_vtable_deltas.
9457 (add_virtual_function): Set BF_VCALL_INDEX.
9458 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
9460 (modify_one_vtable): Simplify.
9461 (dfs_fixup_vtable_deltas): Likewise.
9462 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
9463 * method.c (make_thunk): Handle vcall indices.
9465 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
9467 Compiler side new abi rtti (not enabled).
9468 * cp-tree.h (new_abi_rtti_p): New macro.
9469 (emit_support_tinfos): Prototype new function.
9470 (tinfo_decl_p): Likewise.
9471 (emit_tinfo_decl): Likwise.
9472 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
9474 (doing_runtime): New local static.
9475 (init_rtti_processing): Add new-abi initializer.
9476 (get_tinfo_decl): Add new-abi logic.
9477 (tinfo_from_decl): Likewise.
9478 (build_dynamic_cast_1): Likewise.
9479 (qualifier_flags): New static function.
9480 (tinfo_base_init): Likewise.
9481 (generic_initializer): Likewise.
9482 (ptr_ref_initializer): Likewise.
9483 (ptmd_initializer): Likewise.
9484 (class_hint_flags): Likewise.
9485 (class_initializer): Likewise.
9486 (synthesize_tinfo_var): Likewise.
9487 (create_real_tinfo_var): Likewise.
9488 (create_pseudo_type_info): Likewise.
9489 (get_vmi_pseudo_type_info): Likewise.
9490 (create_tinfo_types): Likewise.
9491 (emit_support_tinfos): New global function.
9492 (tinfo_decl_p): New global predicate.
9493 (emit_tinfo_decl): New global function.
9494 * class.c (set_rtti_entry): Generalize for old and new rtti.
9495 (build_vtbl_initializer): Likewise.
9496 * decl2.c (finish_file): Likewise.
9498 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
9500 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
9501 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
9503 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
9505 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
9508 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
9510 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
9512 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
9514 * optimize.c (calls_setjmp_r): Supply new argument
9515 to special_function_p.
9517 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9519 * call.c: PROTO -> PARAMS.
9520 * class.c: Likewise.
9521 * cp-tree.h: Likewise.
9525 * decl2.c: Likewise.
9527 * errfn.c: Likewise.
9528 * error.c: Likewise.
9529 * except.c: Likewise.
9532 * input.c: Likewise.
9535 * method.c: Likewise.
9536 * optimize.c: Likewise.
9537 * parse.y: Likewise.
9541 * search.c: Likewise.
9542 * semantics.c: Likewise.
9545 * typeck.c: Likewise.
9546 * typeck2.c: Likewise.
9549 2000-01-25 Richard Henderson <rth@cygnus.com>
9551 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
9553 2000-01-25 Mark Mitchell <mark@codesourcery.com>
9555 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
9556 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
9557 (struct vcall_offset_data_s): New type.
9558 (dfs_vcall_offset_queue_p): New function.
9559 (dfs_build_vcall_offset_vtbl_entries): Likewise.
9560 (build_vcall_offset_vtbl_entries): Likewise.
9561 (layout_vtable_decl): Likewise.
9562 (num_vfun_entries): Likewise.
9563 (num_extra_vtbl_entries): Add the entries for vcall offsets.
9564 (build_vtbl_initializer): Likewise.
9565 (dfs_finish_vtabls): Use layout_vtable_decl.
9566 (modify_one_vtables): Always duplicate vtables under the new ABI.
9567 (finish_struct_1): Use layout_vtable_decl.
9569 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9571 * decl.c (member_function_or_else): Change third arg from a format
9572 specifier to an `enum overload_flags'. Callers changed.
9574 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
9576 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
9577 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
9578 build_const_cast, get_delta_difference, check_return_expr): Avoid
9579 ANSI string concatenation usage.
9581 2000-01-24 Mark Mitchell <mark@codesourcery.com>
9583 * class.c (layout_class_type): Put the fields required to make a
9584 class non-empty at the end, not the beginning, of the TYPE_FIELDs
9587 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
9589 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
9592 * decl2.c (mark_used): Do instantiate inlines that have been
9593 explicitly instantiated.
9595 2000-01-24 Richard Henderson <rth@cygnus.com>
9597 * call.c (build_over_call): Use expand_tree_builtin.
9598 * typeck.c (build_function_call_real): Likewise.
9599 (build_binary_op_nodefault): Handle unordered compares.
9601 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9603 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
9604 cp_tree_index values.
9605 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
9606 New global node #defines for them.
9607 * rtti.c (call_void_fn): Replace with ...
9608 (build_runtime_decl): ... new static function.
9609 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
9610 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
9611 (build_dynamic_cast_1): Always produce correctly typed result.
9612 Explicitly produce type_info addresses. Use dynamic_cast_node.
9613 * exception.cc (__throw_bad_cast): Return `void *'.
9614 (__throw_bad_typeid): Return `const type_info &'.
9616 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9618 * cp-tree.h (get_vtable_decl): Prototype new function.
9619 * class.c (get_vtable_decl): New function. Broken out from ...
9620 (build_vtable): ... here. Use it.
9621 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
9624 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9626 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
9627 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
9628 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
9629 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
9630 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
9631 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
9632 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
9633 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
9634 (CPTI_TINFO_VAR_ID): New enumeration.
9635 (__tp_desc_type_node, __access_mode_type_node,
9636 __bltn_desc_type_node, __user_desc_type_node,
9637 __class_desc_type_node, __ptr_desc_type_node,
9638 __attr_desc_type_node, __func_desc_type_node,
9639 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
9640 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
9641 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
9642 enum_desc_type_node, class_desc_type_node,
9643 si_class_desc_type_node, vmi_class_desc_type_node,
9644 ptmd_desc_type_node, base_desc_type_node): New #defines.
9645 (tinfo_fn_id, tinfo_fn_type): Rename to ...
9646 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
9647 (tinfo_var_id): New enumeration.
9648 (DECL_TINFO_FN_P): Augment comment.
9649 * decl.c (cp_global_trees): Adjust documentation.
9650 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
9651 tinfo_decl_type and tinfo_var_id.
9652 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
9653 (build_typeid): Remove unused variable.
9654 (get_tinfo_var): Use tinfo_var_id.
9655 (tinfo_name): New static function.
9656 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
9657 (tinfo_from_decl): Likewise.
9658 (get_base_offset): New static function, broken out of
9660 (expand_si_desc): Use tinfo_name.
9661 (expand_class_desc): Likewise. Lose local static variable.
9662 Use base_desc_type_node. Use get_base_offset.
9663 (expand_ptr_desc): Use tinfo_name.
9664 (expand_attr_desc): Likewise.
9665 (expand_generic_desc): Likewise.
9667 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
9668 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
9670 2000-01-23 Mark Mitchell <mark@codesourcery.com>
9672 * cp-tree.h (__eprintf): Remove declaration.
9673 * tree.c (__eprintf): Remove definition.
9675 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
9676 Mark Mitchell <mark@codesourcery.com>
9678 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
9679 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
9681 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
9683 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
9685 2000-01-23 Mark Mitchell <mark@codesourcery.com>
9687 * cp-tree.h (register_dtor_fn): New function.
9688 * decl.c (destroy_local_static): Rename to ...
9689 (register_dtor_fn): ... this. Give it external linkage.
9690 (expand_static_init): Use it.
9691 * decl2.c (do_static_initialization): Likewise, if using
9693 (do_static_destruction): Check that __cxa_atexit is not in use.
9694 (finish_file): Don't call do_static_destruction if using
9697 * typeck.c (convert_arguments): Restore two-message error
9700 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
9702 Remap dynamic cast hint values to be consistent across ABIs.
9703 * search.c (dynamic_cast_base_recurse): Remap generated value.
9704 (get_dynamic_cast_base_type): Adjust documentation.
9705 * tinfo.h (__user_type_info::dyncast): Likewise.
9706 (__user_type_info::find_public_subobj): Remap BOFF meaning.
9707 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
9708 (__class_type_info::do_dyncast): Likewise.
9709 (__class_type_info::do_find_public_subobj): Likewise.
9710 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
9712 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
9714 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
9716 * typeck2.c (incomplete_type_error): Restore previous
9717 cp_error and cp_error_at call sequence.
9719 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
9721 * class.c (dump_class_hierarchy): Make format agree with argument;
9722 cast pointer to unsigned long and print with %lx.
9724 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
9726 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
9728 * typeck.c (composite_pointer_type, common_type,
9729 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
9730 build_function_call_real, convert_arguments,
9731 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
9732 build_unary_op, mark_addressable, build_compound_expr,
9733 build_static_cast, build_reinterpret_cast, build_const_cast,
9734 build_c_cast, build_modify_expr, get_delta_difference,
9735 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
9736 'ISO C++'. Fusion consecutive calls to diagnotic message routines
9738 * typeck2.c (readonly_error, abstract_virtuals_error,
9739 process_init_constructor, check_for_new_type): Likewise.
9741 2000-01-19 Mark Mitchell <mark@codesourcery.com>
9743 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
9746 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
9748 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
9749 (build_x_typeid): Likewise.
9750 (get_tinfo_fn): Likewise.
9751 (get_tinfo_fn_unused): Rename to ...
9752 (get_tinfo_decl): ... here.
9753 * rtti.c (build_headof): Replace logic error with assertion.
9754 (get_tinfo_fn_dynamic): Rename to ...
9755 (get_tinfo_decl_dynamic): ... here. Make static. Use
9756 complete_type_or_else.
9757 (build_x_typeid): Move into ...
9758 (build_typeid): ... here. Adjust call to
9759 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
9760 throw_bad_typeid expression.
9761 (get_tinfo_fn_unused): Rename to ...
9762 (get_tinfo_decl): ... here. Adjust comment.
9763 (get_tinfo_fn): Delete.
9764 (tinfo_from_decl): New static function.
9765 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
9766 (get_typeid): Use complete_type_or_else.
9767 (build_dynamic_cast_1): Adjust calls to
9768 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
9769 * parse.y (primary): Adjust call to build_typeid.
9770 * except.c (build_eh_type_type_ref): Adjust call to
9771 get_tinfo_decl. Mark as used.
9772 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
9773 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
9774 * parse.c: Regenerated.
9776 2000-01-17 Mark Mitchell <mark@codesourcery.com>
9778 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
9780 (resolves_to_fixed_type_p): Document calling convention.
9781 * rtti.c (build_x_typeid): Initialize NONNULL.
9783 * cp-tree.h (build_shared_int_cst): New function.
9784 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
9785 * class.c (modify_vtable_entry): Likewise.
9786 (add_virtual_function): Split out code to generated shared
9787 INTEGER_CSTs to build_share_int_cst.
9788 (modify_all_vtables): Handle all the overridden functions here.
9789 Add overridden functions from non-primary virtual bases to the
9791 (finish_struct_1): Adjust call to modify_all_vtables. Add
9792 overridden functions from non-primary bases to the vtable.
9793 * tree.c (build_shared_int_cst): New function.
9795 * cp-tree.h (scratchalloc): Remove.
9796 (build_scratch_list): Likewise.
9797 * call.c (convert_class_to_reference): Replace build_scratch_list
9798 and build_expr_list with build_tree_list.
9799 (add_candidate): Replace scratchalloc with expralloc. Note memory
9801 (build_user_type_conversion_1): Replace build_scratch_list
9802 and build_expr_list with build_tree_list.
9803 (build_new_op): Likewise.
9804 (build_op_delete_call): Likewise.
9805 (convert_like): Likewise.
9806 * cvt.c (ocp_convert): Likewise.
9807 * decl.c (start_decl): Likewise.
9808 (start_function): Likewise.
9809 (finish_destructor_body): Likewise.
9810 (maybe_build_cleanup_1): Likewise.
9811 * decl2.c (reparse_decl_as_expr): Likewise.
9812 * init.c (perform_member_init): Likewise.
9813 (expand_cleanup_for_base): Likewise.
9814 (build_builtin_delete_call): Likewise.
9815 (build_new_1): Likewise.
9816 (build_delete): Likewise.
9817 * method.c (do_build_assign_ref): Likewise.
9818 * parse.y (already_scoped_stmt): Likewise.
9819 (nontrivial_exprlist): Likewise.
9820 (net_initializer): Likewise.
9821 (initlist): Likewise.
9822 * parse.c: Regenerated.
9823 * rtti.c (build_x_typeid): Likewise.
9824 (build_dynamic_cast_1): Likewise.
9825 * typeck.c (build_x_compound_expr): Likewise.
9826 (build_static_cast): Likewise.
9827 (build_modify_expr): Likewise.
9829 * cp-tree.h (DECL_VINDEX): Add documentation.
9830 * class.c (build_vtable_entry): Likewise.
9831 (start_vtable): Add comment.
9832 (add_virtual_function): Replace pending_hard_virtuals with
9833 overridden_virtuals and pending_virtuals with new_virtuals.
9834 Replace redundant assignments with assertions.
9835 (check_for_override): Add comment.
9836 (check_bases_and_members): Replace pending_hard_virtuals with
9837 overridden_virtuals and pending_virtuals with new_virtuals.
9838 (create_vtbl_ptr): Likewise.
9839 (layout_class_type): Likewise.
9840 (finish_struct_1): Likewise. Add comments.
9842 2000-01-16 Mark Mitchell <mark@codesourcery.com>
9844 * class.c (finish_struct_1): Replace redundant code with
9847 * cp-tree.h (flag_new_abi): Move.
9848 (flag_use_cxa_atexit): Likewise.
9849 (flag_honor_std): Likewise.
9850 (flag_rtti): Likewise.
9851 (vbase_offsets_in_vtable_p): Define.
9852 (vptrs_present_everywhere_p): Likewise.
9853 (TYPE_CONTAINS_VPTR_P): Likewise.
9854 (dfs_walk_real): Declare.
9855 * class.c (build_vbase_pointer_fields): Check
9856 vbase_offsets_in_vtable_p.
9857 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
9859 (build_vbase_offset_vtbl_entries): Simplify.
9860 (build_vbase_offset_vtbl_entries): Adjust.
9861 (build_vbase_pointer): Add ability to look up vbase offsets in
9863 (start_vtable): New function.
9864 (add_virtual_function): Use it.
9865 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
9866 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
9867 (build_vtbl_initializer): Take the type of the complete object as
9868 input. Use it to correctly calculate vbase offsets.
9869 (dfs_finish_vtbls): Pass the complete type to
9870 build_vtbl_initializer.
9871 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
9872 (create_vtable_ptr): Create a vtable even if there are no
9873 new virtual functions, under the new ABI.
9874 (finish_struct_1): Likewise.
9875 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
9876 * decl.c (exapnd_static_init): Remove call to
9877 preserve_initializer.
9878 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
9880 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
9881 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
9882 (construct_virtual_bases): Don't initialize virtual base pointers
9884 (build_aggr_init): Clean up comment.
9885 (expand_aggr_init_1): Likewise.
9886 * rtti.c (expand_class_desc): Store the virtual function table
9887 index where the vbase offset lives in the offset field.
9888 * search.c (dfs_walk_real): Make it global.
9889 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
9890 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
9892 * tinfo.h (USItype): Make it signed under the new ABI.
9893 * tinfo.cc (convert_to_base): New function. Encapsulate base
9894 conversion logic here.
9895 (__class_type_info::do_upcast): Use it.
9896 (__class_type_info::do_dyncast): Likewise.
9897 (__class_type_info::do_find_public_subobj): Likewise.
9899 * init.c (construct_virtual_bases): Don't look up the addresses of
9900 virtual bases at run-time.
9902 * class.c (build_vbase_pointer): Relocate.
9903 (build_vbase_pointer_fields): Likewise.
9904 (dfs_build_vbase_offset_vtbl_entries): Likewise.
9905 (build_vbase_offset_vtbl_entries): Likewise.
9907 * decl.c (init_decl_processing): Complain if -fnew-abi
9908 -fno-vtable-thunks is used.
9910 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
9913 2000-01-15 Mark Mitchell <mark@codesourcery.com>
9915 * cp-tree.h (num_extra_vtbl_entries): New function.
9916 (size_extra_vtbl_entries): Likewise.
9917 (dfs_vtable_path_unmark): Likewise.
9918 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
9919 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
9920 * class.c (num_extra_vtbl_entries): New function.
9921 (size_extra_vtbl_entries): Likewise.
9922 (dfs_build_vbase_offset_vtbl_entries): New function.
9923 (build_vbase_offset_vtbl_entries): Likewise.
9924 (build_vtbl_initializer): Use it.
9925 (finish_struct_1): Adjust vtable sizes (using
9926 num_extra_vtbl_entries).
9927 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
9928 THUNK_DECL is non-NULL before expanding it.
9929 * init.c (expand_virtual_init): Adjust the vtable pointer by
9930 size_extra_vtbl_entries before storing it.
9931 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
9932 Handle TREE_LIST parameters here, not in the dfs_* functions.
9933 (dfs_unmarked_real_bases_queue_p): Adjust.
9934 (dfs_marked_real_bases_queue_p): Likewise.
9935 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
9936 (dfs_vtable_path_marked_real_bases_queue_p): New function.
9937 (dfs_vtable_path_unmark): Likewise.
9939 2000-01-14 Mark Mitchell <mark@codesourcery.com>
9941 * optimize.c (copy_body_r): Clear the operand three of a
9942 TARGET_EXPR when copying it.
9944 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9946 * method.c (build_decl_overload_real): Check whether we are in ::
9947 before returning __builtin_new/delete.
9949 2000-01-13 Mark Mitchell <mark@codesourcery.com>
9951 * pt.c (tsubst_friend_function): Improve comment.
9952 (instantiate_decl): Avoid crashing when a "nested" function is
9953 instantiated from the top level.
9955 * dump.c (dqeueue_and_dump): Dump
9956 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
9958 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9960 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
9962 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
9964 * g++spec.c (lang_specific_driver): Add -fnew-abi if
9965 ENABLE_NEW_GXX_ABI defined.
9966 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
9967 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
9968 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
9970 2000-01-12 Mark Mitchell <mark@codesourcery.com>
9972 * decl.c (start_cleanup_fn): Call pushdecl.
9974 * call.c (convert_class_to_reference): Fix typos.
9975 (build_conditional_expr): Handle errors gracefully.
9976 * class.c (push_nested_class): Likewise.
9977 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
9978 (DECL_THIS_EXTERN): Use it.
9979 (DECL_THIS_STATIC): Likewise.
9980 * cvt.c (convert_to_void): Handle errors gracefully.
9981 (build_expr_type_conversion): Likewise.
9982 * decl.c (maybe_push_decl): Likewise.
9983 (start_decl_1): Likewise.
9984 (require_complete_types_for_parms): Likewise.
9985 * parse.y (structsp): Likewise.
9986 (base_class): Likewise.
9987 * parse.c: Regenerated.
9988 * pt.c (finish_member_template_decl): Likewise.
9989 * typeck.c (decay_conversion): Likewise.
9991 * cp-tree.h (dfs_skip_vbases): New function.
9992 (find_vbase_instance): Likewise.
9993 * class.c (determine_primary_base): Allow a nearly empty base to
9994 serve as a primary base class under the new ABI.
9995 (get_class_offset_1): Rename to ...
9996 (dfs_get_class_offset): ... this. Simplify. Don't issue error
9998 (get_class_offset): Use it. Issue error messages here.
9999 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
10000 find the right copies of virtual bases.
10001 (fixup_vtable_deltas1): Rename to ...
10002 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
10003 bases as primary bases.
10004 (fixup_vtable_deltas): Remove.
10005 (override_one_vtable): Handle virtual bases as primary bases.
10006 (merge_overrides): Likewise.
10007 (finish_struct_1): Likewise.
10008 (dump_class_hierarchy): Dump primary-ness of bases as well.
10009 * search.c (mark_primary_bases): Use a pre-order traversal to
10010 handle primary virtual bases.
10011 (dfs_skip_vbases): New fiunction.
10012 (expand_upcast_fixups): Adjust to handle primary virtual bases.
10013 (fixup_virtual_upcast_offsets): Likewise.
10014 (fixup_all_virtual_upcast_offsets): Likewise.
10015 (dfs_find_vbase_instances): New function.
10016 (find_vbase_instance): Likewise.
10018 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
10020 * lex.c (DIR_SEPARATOR): Delete macro.
10022 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
10024 * decl2.c (lang_decode_option): Handle automatic line wrapping
10027 2000-01-11 Mark Mitchell <mark@codesourcery.com>
10029 * friend.c (do_friend): Don't resolve scopes when processing
10030 template declarations, even if the qualifying scope doesn't
10031 involve template parameters.
10033 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
10035 * class.c (dfs_modify_vtables_queue_p): Remove.
10036 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
10037 and dfs_marked_real_bases_queue_p instead of
10038 dfs_modify_vtables_queue_p.
10040 * class.c (build_vbase_path): Simplify.
10041 (dfs_propagate_binfo_offsets): New function.
10042 (propagate_binfo_offsets): Use it.
10043 (remove_base_field): Simplify.
10044 (dfs_set_offset_for_vbases): Remove.
10045 (dfs_set_offset_for_shared_vbases): New function.
10046 (dfs_set_offset_for_unshared_vbases): Likewise.
10047 (layout_virtual_bases): Use them.
10048 (layout_basetypes): Don't call propagate_binfo_offsets.
10049 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
10052 * class.c (build_base_field): New function, split out from ...
10053 (build_base_fields): ... here. Use it. Allocate primary bases
10054 first, under the new ABI.
10055 (get_vtable_entry): Remove.
10056 (remove_base_field): New function, split out from ...
10057 (remove_base_fields): ... here. Adjust since primary bases come
10058 first under the new ABI.
10060 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
10061 (initialize_vtbl_ptrs): New function.
10062 (expand_indirect_vtbls_init): Change prototype.
10063 (convert_pointer_to_vbase): Declare.
10064 * init.c (expand_direct_vtbls_init): Remove.
10065 (dfs_initialize_vtbl_ptrs): New function.
10066 (initialize_vtbl_ptrs): Likewise.
10067 (emit_base_init): Use initialize_vtbl_ptrs.
10068 * search.c (convert_pointer_to_vbase): Make it global.
10069 (expand_indirect_vtbls_init): Remove vtable initialization code.
10070 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
10072 * class.c (dfs_finish_vtbls): New function.
10073 (finish_vtbls): Use it.
10074 (dump_class_hierarchy): New function.
10076 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
10077 (BINFO_VBASE_PRIMARY_P): New macro.
10078 (BINFO_VIRTUALS): Add to documentation.
10079 (SET_BINFO_PRIMARY_MARKED_P): Remove.
10080 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10081 (dfs_mark_primary_bases_queue_p): Likewise.
10082 (dfs_unmarked_real_bases_queue_p): New function.
10083 (dfs_marked_real_bases_queue_p): Likewise.
10084 * search.c (dfs_mark_primary_bases): Adjust.
10085 (mark_primary_bases): Likewise.
10086 (get_shared_vbase_if_not_primary): New function.
10087 (dfs_unmarked_real_bases_queue_p): Likewise.
10088 (dfs_marked_real_bases_queue_p): Likewise.
10089 (dfs_get_pure_virtuals): Simplify.
10090 (get_pure_virtuals): Likewise.
10092 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10094 * lex.c: Include tm_p.h.
10096 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
10098 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
10100 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
10102 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
10103 * pt.c (instantiate_decl): Defer comdat templates that might not be
10106 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
10107 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
10108 (finish_file): Likewise.
10110 * decl2.c (import_export_class): Undo 12/14 change.
10112 * error.c (dump_decl): operator new, not operatornew.
10114 * class.c (field_decl_cmp): A nontype is "greater" than a type.
10115 * search.c (lookup_field_1): Look for the last field with the
10118 2000-01-05 Nathan Sidwell <nathan@acm.org>
10120 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
10123 2000-01-05 Nathan Sidwell <nathan@acm.org>
10125 * typeck.c (build_static_cast): Don't strip target qualifiers
10126 when casting from a class.
10128 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10130 * class.c (warn_hidden): Initialize variable `fndecl'.
10132 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
10134 * decl.c (flag_isoc9x): New variable to be able to use code in
10135 c-common.c. For now always zero.
10137 2000-01-03 Mark Mitchell <mark@codesourcery.com>
10139 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
10140 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
10141 or unshare_base_binfos for virtual bases here.
10142 * search.c (dfs_get_vbase_types): Do it here.
10143 (get_vbase_types): Adjust.
10145 2000-01-02 Mark Mitchell <mark@codesourcery.com>
10147 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
10148 (BINFO_PRIMARY_MARKED_P): Use flag 5.
10149 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
10150 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10151 (unmark_primary_bases): Remove declaration.
10152 (unmarkedp): Declare.
10153 (dfs_vbase_unmark): Likewise.
10154 * class.c (determine_primary_base): Return immediately if there
10155 are no base classes. Call mark_primary_bases here.
10156 (modify_all_direct_vtables): Remove.
10157 (modify_all_indirect_vtables): Remove.
10158 (dfs_modify_vtables_queue_p): New function.
10159 (dfs_modify_vtables): New function.
10160 (modify_all_vtables): Use them.
10161 (build_base_fields): Build FIELD_DECLs for primary virtual base
10163 (create_vtable_ptr): Don't call determine_primary_base here.
10164 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
10165 (dfs_set_offset_for_vbases): ... this.
10166 (layout_virtual_bases): Use it.
10167 (layout_class_type): Call determine_primary_base here.
10168 * search.c (unmarkedp): Make it global.
10169 (shared_marked_p): Simplify.
10170 (shared_unmarked_p): Likewise.
10171 (dfs_primary_bases_queue_p): Remove.
10172 (dfs_unmark_primary_bases): Likewise.
10173 (unmark_primary_bases): Likewise.
10174 (mark_primary_bases): Simplify.
10175 (get_pure_virtuals): Don't call mark_primary_bases here.
10176 (dfs_vbase_unmark): New function.
10177 (get_vbase_types): Simplify.
10179 * class.c (struct base_info): Remove.
10180 (determine_primary_base): Take has_virtual_p rather than a
10181 base_info as input. Don't calculate max_has_virtual.
10182 (finish_struct_bits): Remove max_has_virtual argument.
10183 (create_vtable_ptr): Remove max_has_virtual_p argument.
10184 (layout_virtual_bases): Remove max argument.
10185 (layout_basetypes): Likewise.
10186 (layout_class_type): Remove max_has_virtual_p argument.
10187 (finish_struct_1): Remove max_has_virtual.
10189 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
10190 (layout_basetypes): Remove.
10191 * class.c (propagate_binfo_offsets): Moved here from tree.c.
10192 Update to handle primary virtual bases.
10193 (remove_base_fields): New function, split out from
10195 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
10196 (layout_virtual_bases): New function, split out from
10197 layout_basetypes. Update to handle primary virtual bases.
10198 (layout_basetypes): Moved here from tree.c. Use
10199 remove_base_fields and layout_virtual_bases.
10200 * search.c (dfs_mark_primary_bases_queue_p): New function.
10201 (mark_primary_bases): Use it.
10202 * tree.c (CEIL): Remove.
10203 (propagate_binfo_offsets): Remove.
10204 (layout_basetypes): Remove.
10206 2000-01-01 Mark Mitchell <mark@codesourcery.com>
10208 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
10209 (BINFO_PRIMARY_MARKED_P): New macro.
10210 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
10211 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10212 (mark_primary_bases): New function.
10213 (unmark_primary_bases): Likewise.
10214 * search.c (get_abstract_virtuals_1): Remove.
10215 (dfs_mark_primary_bases): New function.
10216 (mark_primary_bases): Likewise.
10217 (dfs_unmark_primary_bases): Likewise.
10218 (unmark_primary_bases): Likewise.
10219 (dfs_get_pure_virtuals): Likewise.
10221 2000-01-01 Mark Mitchell <mark@codesourcery.com>
10223 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
10224 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
10225 (modify_one_vtable): Adjust.
10226 (fixup_vtable_deltas1): Likewise.
10227 (override_one_vtable): Likewise.
10228 * search.c (get_abstract_virtuals_1): Likewise.
10229 (get_pure_virtuals): Likewise.
10230 (expand_upcast_fixups): Likewise.
10231 * tree.c (debug_binfo): Likewise.
10233 * class.c (build_vtable): Don't return a value. Don't rebuild
10234 vtables for bases that have already been handled.
10235 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
10236 already been handled.
10237 (modify_one_vtable): Adjust accordingly.
10238 (fixup_vtable_deltas1): Likewise.
10239 (finish_struct_1): Likewise.
10241 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10243 * call.c (build_new_method_call): Also check destructors.