1 2001-07-24 Phil Edwards <pme@sources.redhat.com>
3 * semantics.c (finish_this_expr): Remove unused code.
5 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
7 Simplify rtti, now we've only one ABI.
8 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
10 (tinfo_decl_id, tinfo_var_id): Remove.
11 (get_typeid_1): Remove.
13 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
14 (typeid_ok_p): New function.
15 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
16 (get_tinfo_decl): Remove old abi documentation.
17 (tinfo_from_decl): Remove.
18 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
19 (get_typeid_1): Remove.
20 (get_base_offset): Remove.
21 (synthesize_tinfo_var): Absorb get_base_offset.
22 (create_real_tinfo_var): Don't use tinfo_decl_id.
24 2001-07-23 Graham Stott <grahams@redhat.com>
26 * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
27 variable has_two_argument_delete_p.
29 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
31 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
32 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
33 (CPTI_INDEX_IDENTIFIER): Remove.
34 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
35 (delta2_identifier): Remove.
36 (index_identifier): Remove.
37 (pfn_or_delta2_identifier): Remove.
38 (flag_vtable_thunks): Remove.
39 (VTABLE_DELTA2_NAME): Remove.
40 (VTABLE_INDEX_NAME): Remove.
41 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
42 (vfunc_ptr_type_node): Adjust.
43 (VTABLE_NAME_PREFIX): Adjust.
44 (build_vfn_ref): Lose first parameter.
45 (fixup_all_virtual_upcast_offsets): Remove.
46 * decl.c (initialize_predefined_identifiers): Remove
47 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
48 (init_decl_processing): Remove no-vtable-thunk code.
49 * decl2.c (flag_vtable_thunks): Remove.
50 (mark_vtable_entries): Remove no-vtable-thunk code.
51 * error.c (dump_decl): Remove no-vtable-thunk code.
52 (dump_expr): Adjust ptr to member function code.
53 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
55 * rtti.c (build_headof): Remove no-vtable-thunk code.
56 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
57 * search.c (get_base_distance): Remove expand_upcast_fixups case.
58 (virtual_context) Remove.
59 (expand_upcast_fixups): Remove.
60 (fixup_virtual_upcast_offsets): Remove.
61 (fixup_all_virtual_upcast_offsets): Remove.
62 * typeck.c (get_member_function_from_ptrfunc): Remove
64 * call.c (build_over_call): Adjust call to build_vfn_ref.
65 * class.c (build_vfn_ref): Lose first parameter. Remove
67 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
68 (build_vtable_entry): Remove no-vtable-thunk code.
70 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
72 Remove old-abi remnants. Remove comments about old abi
73 behaviour. Remove refences to 'new-abi' in comments.
74 * cp-tree.h: Adjust comments.
75 (vbase_offsets_in_vtable_p): Delete.
76 (vcall_offsets_in_vtable_p): Delete.
77 (vptrs_present_everywhere_p): Delete.
78 (all_overridden_vfuns_in_vtables_p): Delete.
79 (merge_primary_and_secondary_vtables_p): Delete.
80 (TYPE_CONTAINS_VPTR_P): Adjust.
81 (VTT_NAME_PREFIX): Remove.
82 (CTOR_VTBL_NAME_PREFIX): Remove.
83 (init_vbase_pointers): Remove.
84 * class.c: Adjust coments.
85 (build_vbase_pointer_fields): Delete.
86 (build_vbase_pointer): Remove old-abi code.
87 (build_secondary_vtable): Likewise.
88 (modify_all_vtables): Likewise.
89 (create_vtable_ptr): Likewise.
90 (layout_class_type): Likewise.
91 (finish_struct_1): Likewise.
92 (finish_vtbls): Likewise.
93 (dfs_finish_vtbls): Delete.
94 (build_vbase_offset_vtbl_entries): Remove old-abi code.
95 * cvt.c: Adjust comments.
96 * decl.c: Adjust comments.
97 * decl2.c: Adjust comments.
98 * init.c: Adjust comments.
99 (construct_virtual_bases): Remove old-abi code.
100 * lang-specs.h: Remove -fno-new-abi.
101 * mangle.c: Adjust comments.
102 * rtti.c: Adjust comments.
103 (get_base_offset): Remove old-abi-code.
104 * search.c: Adjust comments.
105 (dfs_init_vbase_pointers): Remove.
106 (dfs_vtable_path_unmark): Remove.
107 (init_vbase_pointers): Remove.
108 * semantics.c: Adjust comments.
109 (emit_associated_thunks): Remove old-abi code.
110 * typeck.c: Adjust comments.
112 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
114 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
117 2001-07-19 Mark Mitchell <mark@codesourcery.com>
119 * class.c (finish_struct_anon): Forbid nested classes.
121 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
123 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
124 * optimize.c: Include debug.h.
125 (maybe_clone_body): Use debug hook.
126 * semantics.c: Include debug.h.
127 (expand_body): Use debug hook.
129 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
131 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
133 2001-07-18 Mark Mitchell <mark@codesourcery.com>
135 * class.c (type_requires_array_cookie): New function.
136 (check_methods): Don't try to figure out whether the type needs a
138 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
139 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
140 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
141 * pt.c (instantiate_class_template): Don't set
142 TYPE_VEC_DELETE_TAKES_SIZE.
143 * NEWS: Document ABI changes from GCC 3.0.
145 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
146 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
148 * NEWS (Changes in GCC 3.0): Fix typo.
150 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
152 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
153 which attributes are to be attached, and a flags argument. Update
154 call to decl_attributes.
155 (grokfield): Update call to decl_attributes.
156 * class.c (finish_struct): Update call to cplus_decl_attributes.
157 * cp-tree.h (cplus_decl_attributes): Update prototype.
158 * decl.c (start_decl, grokdeclarator, start_function): Update
159 calls to decl_attributes and cplus_decl_attributes.
160 * friend.c (do_friend): Update call to cplus_decl_attributes.
161 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
163 2001-07-12 Mark Mitchell <mark@codesourcery.com>
165 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
166 for `register' variables with an asm-specification.
168 2001-07-11 Mark Mitchell <mark@codesourcery.com>
170 * semantics.c (finish_asm_stmt): Mark the output operands
171 to an asm addressable, if necessary.
173 2001-07-11 Ben Elliston <bje@redhat.com>
175 * Revert this change -- there is a subtle bug.
178 * decl.c (finish_enum): New "attributes" argument; pass it to
179 cplus_decl_attributes. Use a narrower type if the enum is packed.
180 * cp-tree.h (finish_enum): Adjust prototype.
181 * parse.y (enum_head): New non-terminal.
182 (structsp): Use it. Enums now may be preceded or followed by
183 optional attributes -- pass their chained tree to finish_enum().
184 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
186 2001-07-10 Mark Mitchell <mark@codesourcery.com>
188 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
191 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
193 * semantics.c (cp_expand_stmt): Fix for null
194 current_function_return_value.
196 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
198 * call.c (build_op_delete_call): Initialize fn.
199 (convert_like_real): Delete conditional.
200 (joust): Initialize *w and *l.
201 * class.c: Add prototype for binfo_ctor_vtable.
202 (get_primary_binfo): Initialize result.
203 * init.c (build_java_class_ref): Initialize name.
205 2001-07-09 Erik Rozendaal <dlr@acm.org>
207 * typeck.c (unary_complex_lvalue): Do not duplicate the
208 argument to modify, pre-, or post-increment when used as an
209 lvalue and when the argument has side-effects.
211 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
213 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
214 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
215 cplus_decl_attributes even if attrs is NULL.
216 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
218 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
220 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
221 calls to decl_attributes.
223 2001-07-06 Ira Ruben <ira@apple.com>
225 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
226 be DECL_TEMPLATE_RESULT.
228 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
230 * cp-tree.h (copy_template_template_parm): Rename to ...
231 (bind_template_template_parm): ... here.
232 * tree.c (copy_template_template_parm): Rename to ...
233 (bind_template_template_parm): ... here. Remove the case when
234 NEWARGS is NULL_TREE.
235 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
236 BOUND_TEMPLATE_TEMPLATE_PARM.
237 * pt.c (lookup_template_class): Adjust.
239 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
241 * cvt.c (convert_lvalue): New fn.
242 * cp-tree.h: Declare it.
243 * method.c (do_build_assign_ref): Use it.
244 (do_build_copy_constructor): Convert parm to base types
245 before calling base constructors.
247 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
248 DECL_USER_ALIGN. Check flag_elide_constructors instead of
250 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
252 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
254 * optimize.c (optimize_inline_calls): New function, broken out
256 (optimize_function): ... here. Call it. Don't inline if it is
258 (dump_function): Print name of dump flag causing this dump.
259 * semantics.c (expand_body): Move thunk inline check to
262 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
264 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
265 (comptypes): Use target.comp_type_attributes.
267 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
269 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
271 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
273 * error.c (lang_print_error_function): Add a `diagnostic_context *'
276 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
278 * decl2.c (import_export_class): Update.
280 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
282 * error.c (init_error): Adjust settings.
284 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
286 * error.c (init_error): Adjust settings.
288 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
290 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
291 return pointers to data members by reference rather than by value.
293 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
295 Implement the Named Return Value optimization.
296 * cp-tree.h (struct cp_language_function): Add x_return_value.
297 (current_function_return_value): Now a macro.
298 * decl.c: Don't define it.
299 (define_label, finish_case_label): Don't clear it.
300 (init_decl_processing): Don't register it with GC.
301 * semantics.c (genrtl_finish_function): Don't check it for
302 no_return_label. Copy the RTL from the return value to
303 current_function_return_value and walk, calling...
304 (nullify_returns_r): ...this new fn.
305 * typeck.c (check_return_expr): Set current_function_return_value.
307 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
309 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
310 sharing a ctor vtable with. Merge code for cases 1 and 2.
311 (binfo_ctor_vtable): New fn.
312 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
314 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
316 * class.c (dfs_find_final_overrider): Fix logic.
318 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
319 virtual thunk instead of non-virtual.
320 (get_matching_virtual): Uncomment.
322 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
323 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
326 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
328 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
329 we've not emerged from the hierarchy of RTTI_BINFO on reaching
332 2001-06-13 Mark Mitchell <mark@codesourcery.com>
334 * NEWS: Update release number.
336 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
338 PR c++/3130, c++/3131, c++/3132
339 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
340 * class.c (force_canonical_binfo_r): Move
341 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
342 virtual bases unless they're primary and what they're primary
344 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
345 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
346 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
348 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
349 (layout_nonempty_base_or_field): Add most derived type
351 (layout_empty_base): Likewise.
352 (build_base_field): Likewise.
353 (build_base_fields): Likewise.
354 (propagate_binfo_offsets): Add most derived type
355 parameter. Skip non canonical virtual bases too.
356 (dfs_set_offset_for_unshared_vbases): Don't skip primary
357 bases. Do skip canonical bases.
358 (layout_virtual_bases): Adjust.
359 (layout_class_type): Adjust.
360 (dfs_get_primary_binfo): Build list of virtual primary base
362 (get_primary_binfo): Check that the shared virtual primary
363 base candidate was found first.
364 (accumulate_vtbl_inits): Don't do anything for non-vptr
365 containing binfos. For case 1 primary virtual bases, keep
366 checking that we've not emerged from the hierarchy of RTTI_BINFO.
368 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
371 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
372 hierarchy looking for primary bases for a ctor
373 vtable. Recursively call oneself, if we meet our primary via
374 this route and haven't met it yet via inheritance graph order.
376 2001-06-11 Mark Mitchell <mark@codesourcery.com>
378 * lang-options.h: Emit documentation for -fno-honor-std, not
381 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
383 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
385 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
387 2001-06-10 Mark Mitchell <mark@codesourcery.com>
388 Gabriel Dos Reis <gdr@codesourcery.com>
390 * Make-lang.in (cp/call.o): Depend on diagnostic.h
391 (cp/typeck.o): Depend on diagnostic.h
392 (cp/typeck2.o): Depend on diagnostic.h
393 (cp/repo.o): Depend on dignostic.h
394 * typeck.c: #include diagnostic.h
395 (convert_for_initialization): Remove extern declaration for
396 warningcount and errorcount.
398 * call.c: #include diagnostic.h
399 (convert_like_real): Remove extern declaration for warnincount and
402 * repo.c: #include diagnostic.h
403 * typeck2.c: #include diagnostic.h
405 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
407 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
410 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
413 * friend.c (do_friend): Use push_decl_namespace for classes at
416 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
417 Jason Merrill <jason_merrill@redhat.com>
420 * class.c (build_secondary_vtable): Use assert, rather than an error
422 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
423 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
424 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
425 Don't set BINFO_VTABLE for a primary virtual base.
427 2001-06-07 Mark Mitchell <mark@codesourcery.com>
429 * decl.c (duplicate_decls): Update source position information
430 when a template function is defined.
432 2001-06-07 Phil Edwards <pme@sources.redhat.com>
434 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
436 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
439 * decl.c (pushtag): Don't push into a complete type's scope.
441 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
443 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
444 (struct lang_decl_flags): Lose generate_with_vtable_p.
445 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
446 * class.c (copy_virtuals): Adjust.
447 * decl2.c (mark_vtable_entries): Adjust.
448 * method.c (make_thunk, build_vtable_entry): Adjust.
449 * class.c (update_vtable_entry_for_fn): Only look as far as the
450 first defining class.
451 (build_vtbl_initializer): Put nothing in the slot for a function only
452 defined in a lost primary virtual base.
453 (add_vcall_offset_vtbl_entries_1): Use the same code for
454 the lost primary case and the normal case.
455 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
456 (get_vfield_offset, get_derived_offset): Lose.
457 (dfs_find_final_overrider): Use look_for_overrides_here.
458 (get_matching_virtual): New fn.
459 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
461 * search.c (look_for_overrides_here): Split out from...
462 (look_for_overrides_r): Here.
464 * class.c (find_final_overrider): Return error_mark_node on error.
466 * decl2.c (key_method): #if 0 accidental change.
468 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
470 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
471 (build_over_call): Likewise.
472 * decl.c (grokparms): Likewise.
473 * pt.c (tsubst_decl): Likewise.
474 * typeck.c (convert_arguments): Likewise.
476 2001-06-05 Mark Mitchell <mark@codesourcery.com>
478 * semantics.c (begin_class_definition): Robustify.
480 * pt.c (instantiate_decl): Tell the repository code about the
481 clones, not the cloned functions.
482 * repo.c (repo_template_used): Explicitly instantiate the cloned
483 function, not the clones.
485 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
487 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
488 ICS_BAD_FLAG on created conversion.
489 (compare_ics): Break out rank.
491 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
493 * decl.c (xref_tag): Remove extraneous %s on dependent name
496 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
498 * class.c (layout_vtable_decl): Fix off by one error on
500 (build_vtt): Likewise.
501 (build_ctor_vtbl_group): Likewise.
503 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
505 * class.c (maybe_indent_hierarchy): New function.
506 (dump_class_hierarchy_r): Add flags. Dump extra binfo
507 information, if enabled. Use maybe_indent_hierarchy. Adjust
509 (dump_class_hierarchy): Adjust prototype. Adjust output format.
510 (dump_array, dump_vtable, dump_vtt): New functions.
511 (finish_struct_1): Adjust hierarchy dumping.
512 (initialize_vtable): Call dump_vtable.
513 (build_vtt): Call dump_vtt.
514 (build_ctor_vtbl_group): Call dump_vtable.
515 * decl2.c (flag_dump_class_layout): Remove.
516 (cxx_decode_option): Remove dump translation unit
517 and dump class hierarchy check. Call dump_switch_p.
518 (finish_file): Adjust dumping.
519 (dump.c): Only dump base classes if not TDF_SLIM.
520 Only dump namespace members if not TDF_SLIM.
521 * optimize.c (dump_function): New function.
522 (optimize_function): Call dump_function.
523 * semantics.c (expand_body): Use dump_enabled_p.
525 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
528 Part missed from first commit
529 * decl2.c (finish_anon_union): Copy context.
531 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
534 * optimize.c (remap_decl): Remap anonymous aggregate members too.
536 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
539 * semantics.c (expand_body): Don't optimize thunks.
541 2001-05-25 Sam TH <sam@uchicago.edu>
543 * cp-tree.h lex.h: Fix header include guards.
545 2001-05-25 Mark Mitchell <mark@codesourcery.com>
547 * decl.c (init_decl_processing): Tweak.
549 2001-05-24 Mark Mitchell <mark@codesourcery.com>
551 * decl.c (duplicate_decls): Tidy.
552 (init_decl_processing): Always set flag_no_builtin.
554 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
557 * decl2.c (do_local_using_decl): Push the decls, even in a
560 2001-05-22 Mark Mitchell <mark@codesourcery.com>
562 * optimize.c (initialize_inlined_parameters): Don't set
563 TREE_READONLY for a VAR_DECL taking the place of an inlined
566 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
568 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
569 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
572 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
574 * parse.y: Refer to compound literals as such, not as
575 constructor-expressions.
577 2001-05-21 Mark Mitchell <mark@codesourcery.com>
579 * call.c (build_op_delete_call): Ignore exception-specifications
580 when looking for matching delete operators.
581 * init.c (build_new_1): Compute whether or not the allocation
582 function used is a placement allocation function or not, and
583 communicate this information to build_op_delete_call.
585 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
587 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
588 (build_vtbl_ref): Adjust.
589 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
590 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
592 (unsupported_options): Correspondingly.
594 * decl2.c (maybe_make_one_only): Check flag_weak, not
597 * cp-tree.def (START_CATCH_STMT): Lose.
598 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
599 * tree.c (cp_statement_code_p): Don't case it.
600 * semantics.c (cp_expand_stmt): Likewise.
601 * cp-tree.h (START_CATCH_TYPE): Lose.
603 * except.c (expand_start_catch_block): Don't start any blocks.
605 (expand_end_catch_block): Don't end any blocks.
606 * parse.y (handler): Don't pass anything from finish_handler_parms
608 * pt.c (tsubst_expr): Likewise.
609 * semantics.c (begin_handler): Call note_level_for_catch here.
610 (finish_handler_parms): Don't return anything.
611 (genrtl_catch_block, begin_catch_block): Lose.
612 (genrtl_handler): Call expand_start_catch here.
614 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
616 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
617 (get_vtable_decl, build_vtt): Not here.
619 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
622 * optimize.c (update_cloned_parm): Copy addressability and other
625 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
627 * pt.c (determine_specialization): Ignore artificial functions.
629 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
631 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
632 (C_RID_CODE): Remove.
633 * lex.c (cxx_init_options): Call set_identifier_size. Update.
634 (init_parse): Don't do it here.
636 2001-05-18 Diego Novillo <dnovillo@redhat.com>
638 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
639 function declaration to avoid stripping the symbol's attributes.
641 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
643 * decl.c (pushdecl): Adjust error string.
644 (xref_tag): Adjust friend class injection warning. Remove the
645 inherited name from the class shadowed scope.
647 2001-05-17 Mark Mitchell <mark@codesourcery.com>
649 * except.c (cp_protect_cleanup_actions): New function.
650 (init_exception_processing): Don't set protect_cleanup_actions
651 here. Do set lang_protect_cleanup_actions.
653 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
655 * spew.c (read_token): Call yyerror on all unexpected tokens.
657 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
659 * init.c (member_init_ok_or_else): Take a tree rather than
661 (expand_member_init): Adjust.
663 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
665 * decl.c (duplicate_decls): Suppress warning about duplicate
666 decls if the first decl is a friend.
668 2001-05-12 Zack Weinberg <zackw@stanford.edu>
670 * except.c (choose_personality_routine): Export. Add
671 explanatory comment. Take an enum languages, not a boolean.
672 (initialize_handler_parm): Adjust to match.
673 * cp-tree.h: Prototype choose_personality_routine.
674 * lex.c (handle_pragma_java_exceptions): New function.
675 (init_cp_pragma): Register #pragma GCC java_exceptions.
677 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
679 * method.c (build_mangled_C99_name): Remove unused prototype.
681 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
683 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
684 * typeck.c (get_member_function_from_ptrfunc,
685 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
686 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
688 Reverted Geoff Keating's 2001-05-03's patch.
690 2001-05-11 Ira Ruben <ira@apple.com>
692 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
694 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
696 * cp-tree.h (finish_label_expr, lookup_label): Delete.
697 * parse.y: Update for '&&'; don't issue warning here.
698 * semantics.c (finish_label_expr): Delete.
700 2001-05-07 Mark Mitchell <mark@codesourcery.com>
702 * splay-tree.h (splay_tree_max): New function.
703 (splay_tree_min): Likewise.
705 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
707 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
708 (pfn_vflag_identifier): Define.
709 Update comment about layout of pointer functions.
710 (build_ptrmemfunc1): Update prototype.
711 (expand_ptrmemfunc_cst): Update prototype.
712 * decl.c (initialize_predefined_identifiers): Initialize
713 pfn_vflag_identifier.
714 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
715 an extra field to the type.
716 * expr.c (cplus_expand_constant): Pass 'flag' between
717 expand_ptrmemfunc_cst and build_ptrmemfunc1.
718 * typeck.c (get_member_function_from_ptrfunc): When
719 FUNCTION_BOUNDARY < 16, look at additional field to determine
720 if a pointer-to-member is a real pointer or a vtable offset.
721 (build_ptrmemfunc1): Add new parameter to contain extra field.
722 (build_ptrmemfunc): Pass the extra field around.
723 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
724 (pfn_from_ptrmemfunc): Ignore the extra field.
726 2001-05-03 Mark Mitchell <mark@codesourcery.com>
728 * cp-tree.h (flag_inline_trees): Update documentation.
729 * decl.c (init_decl_processing): Adjust handling of
730 flag_inline_functions and flag_inline_trees to support -O3.
731 (grokfndecl): Set DECL_INLINE on all functions if that's what
733 (save_function_data): Clear DECL_INLINE in
734 current_function_cannot_inline is non-NULL.
735 * decl2.c (flag_inline_trees): Update documentation.
737 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
739 * dump.c (cp_dump_tree, USING_STMT case): New case.
740 * tree.c (cp_statement_code_p): Add USING_STMT.
741 * decl2.c (do_using_directive): Add the using directive statement.
743 * tree.c (walk_tree): Reformat an if block.
745 2001-05-02 Mark Mitchell <mark@codesourcery.com>
747 * decl.c (compute_array_index_type): Don't try to do anything with
748 the indices when processing a template.
750 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
752 * call.c: NULL_PTR -> NULL.
757 * except.c: Likewise.
760 * search.c: Likewise.
762 * typeck.c: Likewise.
763 * typeck2.c: Likewise.
765 2001-05-02 Mark Mitchell <mark@codesourcery.com>
767 * decl2.c (do_using_directive): Revert previous patch.
769 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
771 * cp-tree.def (USING_STMT): New statement node.
772 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
773 * decl2.c (do_using_directive): Add USING_STMT to statement
774 tree. Don't emit errors when processing template decl.
775 * pt.c (tsubst_expr, USING_STMT case): New case.
776 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
778 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
780 * call.c (build_new_op): Convert args from reference here.
781 (build_conditional_expr): Don't convert here.
783 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
785 * spew.c (last_token_id): New static variable.
786 (read_token): Set it here.
787 (yyerror): Use it here.
789 2001-04-30 Richard Henderson <rth@redhat.com>
791 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
794 2001-04-30 Mark Mitchell <mark@codesourcery.com>
796 * gxxint.texi: Remove.
797 * Make-lang.in: Remove all traces of gxxint.texi.
799 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
801 * decl2.c (start_static_initialization_or_destruction): Correct
802 logic to handle the -fno-use-cxa-atexit case.
804 2001-04-30 Mark Mitchell <mark@codesourcery.com>
806 * optimize.c (update_cloned_parm): New function.
807 (maybe_clone_body): Use it. Update the `this' parameter too.
809 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
811 * decl2.c (unsupported_options): Add new-abi.
812 * lang-options.h: Remove no longer supported options.
814 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
816 * except.c (can_convert_eh): Don't check template parms,
819 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
821 * optimize.c (maybe_clone_body): Copy parameter names and locations.
823 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
825 * cp-tree.h (adjust_clone_args): Prototype new function.
826 * class.c (adjust_clone_args): New function.
827 * decl.c (start_function): Call it for in charge ctors.
829 2001-04-26 Mark Mitchell <mark@codesourcery.com>
831 * method.c (use_thunk): Make sure that thunks really are emitted
834 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
836 * mangle.c (write_chars): New macro.
837 (hwint_to_ascii): New function
838 (write_number): Use it.
839 (write_integer_cst): Deal with really big numbers.
841 2001-04-25 Mark Mitchell <mark@codesourcery.com>
843 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
846 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
848 * decl.c (grokdeclarator): Set context of namespace scope
851 2001-04-24 Zack Weinberg <zackw@stanford.edu>
853 * cp/optimize.c: Include hashtab.h.
854 (struct inline_data): Add tree_pruner.
855 (expand_call_inline, expand_calls_inline): Use it when calling
857 (optimize_function): Initialize and free tree_pruner.
859 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
861 Lazy __FUNCTION__ generation.
862 * cp-tree.def (FUNCTION_NAME): Remove.
863 * cp-tree.h (function_name_declared_p): Remove.
864 (cp_fname_init): Prototype.
865 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
866 don't call declare_function_name. Call start_fname_decls.
867 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
868 clobber the line number.
869 (cp_fname_init): New function.
870 (start_function): Call start_fname_decls.
871 (finish_function): Call finish_fname_decls.
872 * lex.c (reswords): Add slots for __FUNCTION__ et al.
873 (rid_to_yy): Add mappings for __FUNCTION__ et al.
874 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
875 * parse.y (VAR_FUNC_NAME): New token.
876 (primary): Add VAR_FUNC_NAME.
877 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
879 (tsubst, FUNCTION_NAME case): Remove.
880 (tsubst_copy, FUNCTION_NAME case): Remove.
881 (tsubst_expr, DECL_STMT case): Be careful with a
882 DECL_PRETTY_FUNCTION_P.
883 (instantiate_decl): Remove function_name_declared_p.
884 * semantics.c (begin_compound_statement): Don't call
885 declare_function_name here.
886 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
887 (finish_translation_unit): Call finish_fname_decls.
888 (expand_body): Remove function_name_declared_p.
889 * typeck2.c (digest_init): Allow any ERROR_MARK.
891 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
893 * pt.c (tsubst_decl): Use VOID_TYPE_P.
894 * semantics.c: Fix some typos.
896 2001-04-23 Phil Edwards <pme@sources.redhat.com>
898 * cp/decl2.c (flag_honor_std): Always initialize to 1.
900 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
902 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
904 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
906 * except.c (build_throw): Wrap the initialization of the exception
907 object in a MUST_NOT_THROW_EXPR.
908 (do_free_exception): #if 0.
910 2001-04-20 Mark Mitchell <mark@codesourcery.com>
912 * cp-tree.h (finish_enum): Change prototype.
913 * decl.c (finish_enum): Reorganize.
914 * parse.y (structsp): Adjust calls to finish_enum.
916 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
918 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
921 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
923 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
924 (layout_empty_base): Return at end flag.
925 (build_base_field): Likewise.
926 (build_base_fields): Likewise.
927 (layout_virtual_bases): Don't add 1 to eoc value.
928 (end_of_class): Use full size for empty bases.
929 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
930 empty bases. Don't add 1 to eoc value. Only add trailing padding
931 if we're an empty class with no empty bases.
932 (dump_class_hierarchy): Dump size and alignment.
934 2001-04-20 Jakub Jelinek <jakub@redhat.com>
936 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
939 2001-04-20 Jakub Jelinek <jakub@redhat.com>
941 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
942 is found, look first if name does not match the structure name.
944 2001-04-19 Mark Mitchell <mark@codesourcery.com>
946 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
948 (SET_DECL_LANGUAGE): New macro.
949 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
950 (pushdecl): Likewise.
951 (build_library_fn_1): Likewise.
952 (build_cp_library_fn): Likewise.
953 (grokfndecl): Likewise.
954 (grokvardecl): Mark `extern "C"' variables as having C linkage.
955 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
956 * lex.c (retrofit_lang_decl): Likewise.
957 * mangle.c (mangle_decl_string): Don't mangle the names of
958 variables declared with C language linkage.
959 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
961 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
963 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
964 flag_access_control from uninitialized storage.
966 2001-04-15 Mark Mitchell <mark@codesourcery.com>
968 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
969 * mangle.c (write_pointer_to_member_type): Fix mangling of
970 pointers to cv-qualified member function types.
972 * init.c (build_delete): Create a SAVE_EXPR for the address if
973 we're going to use it more than once.
975 2001-04-13 Mark Mitchell <mark@codesourcery.com>
977 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
978 (expand_ptremfunc_cst): Change prototype.
979 (delta2_from_ptrmemfunc): Remove.
980 * expr.c (cplus_expand_constant): Adjust call to
981 expand_ptrmemfunc_cst.
982 * typeck.c (build_ptrmemfunc1): Simplify.
983 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
984 results in a constant.
985 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
986 (delta2_from_ptrmemfunc): Remove.
987 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
989 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
991 * cp-tree.h (decl_namespace_list): New macro.
992 (struct saved_scope): Add decl_ns_list.
993 * decl.c (mark_saved_scope): Mark it.
994 * decl2.c: Lose static decl_namespace_list.
995 (init_decl2): Don't save it.
997 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
999 * cp-tree.h (warn_return_type, yylex): Delete redundant
1002 * decl.c (current_class_depth, global_namespace): Likewise.
1004 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
1006 * repo.c (flag_use_repository): Likewise.
1008 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1010 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
1011 set_block, pushdecl, getdecls, gettags, init_decl_processing,
1012 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
1013 lvalue_or_else, print_lang_statistics, comp_target_types,
1014 unsigned_type, signed_type, signed_or_unsigned_type,
1015 build_function_call, mark_addressable, incomplete_type_error):
1016 Delete redundant declarations.
1018 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
1020 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
1021 (TYPE_ANONYMOUS_P): New macro.
1022 (TAGGED_TYPE_P): New macro.
1023 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
1024 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
1025 * tree.c (no_linkage_helper): Likewise.
1026 * semantics.c (begin_class_definition): Likewise.
1027 * pt.c (convert_template_argument): Likewise.
1028 * lex.c (check_for_missing_semicolon): Likewise.
1030 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
1032 * class.c (dfs_unshared_virtual_bases): New function.
1033 (mark_primary_bases): Call it.
1034 (check_bases): Ignore virtual bases when determining
1037 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
1039 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
1041 2001-04-11 Mark Mitchell <mark@codesourcery.com>
1043 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
1044 cloned function to the clone.
1046 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1048 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
1050 * semantics.c: Include expr.h.
1052 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
1054 * method.c (implicitly_declare_fn): Commonize code for copy ctor
1055 and assignment op. Set TREE_USED for parameter.
1057 2001-04-10 Mark Mitchell <mark@codesourcery.com>
1059 * class.c (find_final_overrider_data): Add `candidates'.
1060 (dfs_find_final_overrider): Don't issue error messages
1062 (find_final_overrider): Issue error messages here.
1063 (build_base_field): Don't warn about amgibuous direct bases here.
1064 (warn_about_ambiguous_direct_bases): New function.
1065 (layout_class_type): Use it.
1067 2001-04-10 Richard Henderson <rth@redhat.com>
1069 * typeck.c (build_array_ref): Push the array reference inside
1070 COMPOUND_EXPR and COND_EXPR.
1072 2001-04-05 Mark Mitchell <mark@codesourcery.com>
1074 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
1075 * decl.c (duplicate_decls): Adjust accordingly.
1076 (maybe_commonize_var): Likewise.
1077 (grokfndecl): Likewise.
1078 (start_function): Likewise.
1079 (start_method): Likewise.
1080 * decl2.c (key_method): Likewise.
1081 (import_export_decl): Likewise.
1082 * method.c (implicitly_declare_fn): Likewise.
1083 * optimize.c (maybe_clone_body): Likewise.
1085 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
1087 * lang-specs.h: Add __DEPRECATED.
1089 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
1091 * search.c (get_dynamic_cast_base_type): When building a new
1092 constant, set its type to ssizetype.
1094 2001-04-04 Jakub Jelinek <jakub@redhat.com>
1096 * optimize.c (expand_call_inline): Only add newly inlined statements
1099 2001-04-03 Mark Mitchell <mark@codesourcery.com>
1101 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
1102 (OPERATOR_FORMAT): Likewise.
1103 (OPERATOR_TYPENAME_FORMAT): Likewise.
1104 * operators.def: Remove old name-mangling information.
1105 * decl.c (grok_op_properties): Adjust accordingly.
1106 * lex.c (init_operators): Likewise.
1107 * rtti.c (get_tinfo_decl): Issue error messages about types that
1110 2001-04-03 Mark Mitchell <mark@codesourcery.com>
1112 * decl2.c (import_export_decl): Don't call import_export_class
1113 when processing an inline member function.
1114 * semantics.c (expand_body): Call import_export_decl before
1115 emitting inline functions.
1117 2001-03-28 Richard Henderson <rth@redhat.com>
1119 IA-64 ABI Exception Handling:
1120 * cp-tree.def (EH_SPEC_BLOCK): New.
1121 (MUST_NOT_THROW_EXPR): New.
1122 * cp-tree.h: Update changed function declarations.
1123 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
1124 (CPTI_CALL_UNEXPECTED): New.
1125 (struct cp_language_function): Rename x_eh_spec_try_block
1127 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
1128 * decl.c (current_binding_level): If no current function
1129 bindings, revert to scope_chain.
1130 (initialize_predefined_identifiers): Remove __cp_push_exception.
1131 (store_parm_decls): Use begin_eh_spec_block.
1132 (finish_function): Use finish_eh_spec_block.
1133 (mark_lang_function): Update for name changes.
1134 * decl2.c (finish_file): No mark_all_runtime_matches.
1135 * dump.c (cp_dump_tree): Handle new tree codes.
1136 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
1137 * except.c (catch_language_init, catch_language): Remove.
1138 (init_exception_processing): Don't set language code.
1139 Initialize call_unexpected_node, protect_cleanup_actions,
1140 eh_personality_libfunc, lang_eh_runtime_type.
1141 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
1142 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
1143 (prepare_eh_type): Split out type canonicalizations ...
1144 (build_eh_type_type): ... from here.
1145 (build_eh_type_type_ref): Remove.
1146 (mark_all_runtime_matches): Remove.
1147 (build_exc_ptr): New.
1148 (do_begin_catch, do_end_catch): New.
1149 (do_pop_exception): Remove.
1150 (build_terminate_handler): Remove.
1151 (choose_personality_routine): Split out language choice from ...
1152 (initialize_handler_parm): ... here.
1153 Use MUST_NOT_THROW_EXPR.
1154 (expand_start_catch_block): Use do_begin_catch. Simplify Java
1155 exception object handling.
1156 (expand_start_eh_spec, expand_end_eh_spec): Remove.
1157 (expand_exception_blocks, alloc_eh_object): Remove.
1158 (begin_eh_spec_block, finish_eh_spec_block): New.
1159 (do_allocate_exception, do_free_exception): New.
1160 (expand_throw): Merge into ...
1161 (build_throw): ... here. Update for abi.
1162 * expr.c (cplus_expand_expr): No expand_internal_throw.
1163 Handle MUST_NOT_THROW_EXPR.
1164 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
1165 * semantics.c (*) Update for except.h name changes.
1166 (genrtl_try_block): No protect_with_terminate.
1167 (genrtl_eh_spec_block): New.
1168 (genrtl_handler): Don't emit the goto here.
1169 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
1170 (genrtl_finish_function): Don't expand_exception_blocks.
1171 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
1173 2001-03-28 Richard Henderson <rth@redhat.com>
1175 * decl.c (struct named_label_list): Rename eh_region to
1176 in_try_scope, add in_catch_scope.
1177 (struct binding_level): Rename eh_region to is_try_scope,
1179 (note_level_for_try): Rename from note_level_for_eh.
1180 (note_level_for_catch): New.
1181 (poplevel): Copy both is_try_scope and is_catch_scope to
1182 the named_label_list struct.
1183 (check_previous_goto_1): Don't check for catch block via
1184 DECL_ARTIFICIAL; use in_try_scope instead.
1185 (check_goto): Likewise.
1186 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
1187 * except.c (expand_start_catch_block): Call note_level_for_catch.
1188 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
1190 2001-03-27 Richard Henderson <rth@redhat.com>
1192 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
1193 exceptions_via_longjmp.
1195 2001-03-27 Phil Edwards <pme@sources.redhat.com>
1197 * pt.c (check_default_tmpl_args): Make error messages clearer.
1199 2001-03-26 Phil Edwards <pme@sources.redhat.com>
1201 * error.c: Also undefine 'A' macro used for cp_printers definition.
1203 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1205 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
1207 2001-03-26 Mike Yang <yang@research.att.com>
1208 Mark Mitchell <mark@codesourcery.com>
1210 * dump.c (dump_access): New function.
1211 (cp_dump_tree): Use it. Dump basetype information for class
1214 2001-03-26 Mark Mitchell <mark@codesourcery.com>
1216 * Makefile.in (optimize.o): Depend on params.h.
1217 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
1218 (init_decl_processing): Set flag_no_inline when doing
1220 * optimize.c: Include params.h.
1221 (struct inline_data): Improve documentation of FNS. Add
1222 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
1223 (INSNS_PER_STMT): New macro.
1224 (remap_block): Use CLONING_P.
1225 (inlinable_function_p): Don't inline big functions.
1226 (expand_call_inline): Keep track of how much inlining we've done.
1227 (optimize_function): Set FIRST_INLINED_FN.
1228 (maybe_clone_body): Set CLONING_P.
1229 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
1231 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
1232 rest_of_compilation. Clear DECL_RTL for local variables
1234 (clear_decl_rtl): New function.
1236 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
1239 * cp-tree.h (skip_type_access_control,
1240 reset_type_access_control): Prototype.
1241 * decl.c (grokdeclarator): Access of friends is not checked.
1242 * parse.y (component_decl_list): Reset type access control.
1243 * semantics.c (decl_type_access_control): Clear
1244 current_type_lookups.
1245 (save_type_access_control): Don't save if not deferring.
1246 (skip_type_access_control, reset_type_access_control): New
1248 (begin_class_definition): Do type access control for basetypes.
1249 Start deferred access control.
1250 (finish_class_definition): Resume immediate access control if
1251 this is a local class.
1253 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1255 * class.c (add_method): Use memcpy/memmove, not bcopy.
1257 * decl.c (duplicate_decls): Likewise.
1259 2001-03-23 Jakub Jelinek <jakub@redhat.com>
1261 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
1264 2001-03-23 Jakub Jelinek <jakub@redhat.com>
1266 * decl.c (local_names): Define.
1267 (push_local_name): New.
1268 (grok_reference_init): Return init if initializing static reference
1269 variable with non-constant instead of emitting it.
1270 Move expand_static_init call to cp_finish_decl.
1271 (layout_var_decl): Call push_local_name.
1272 (maybe_commonize_var): Allow inlining functions even if they have
1273 static local variables, use comdat_linkage for them if flag_weak.
1274 (check_initializer): Call obscure_complex_init if
1275 grok_reference_init returned non-zero.
1276 (save_function_data): Clear x_local_names.
1277 (pop_cp_function_context): Free x_local_names.
1278 (mark_inlined_fns): Remove.
1279 (mark_lang_function): Mark x_local_names.
1280 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
1281 Mark inlined_fns as tree, remove call to mark_inlined_fns.
1282 * class.c (alter_access): Ensure DECL_ACCESS is never set if
1283 DECL_DISCRIMINATOR_P.
1284 * cp-tree.h (cp_language_function): Add x_local_names.
1285 (lang_decl_flags): Add discriminator into u2.
1286 (lang_decl_inlined_fns): Remove.
1287 (lang_decl): inlined_fns is now a TREE_VEC.
1288 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
1289 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
1290 TREE_VEC, not a custom structure.
1291 (optimize_function): Likewise.
1292 * mangle.c (discriminator_for_local_entity): Discriminate among
1293 VAR_DECL local entities.
1294 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
1297 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
1299 Add support for Java interface method calls.
1300 * cp-tree.h (struct lang_type): Add java_interface flag.
1301 (TYPE_JAVA_INTERFACE): New macro.
1302 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
1303 by setting TYPE_JAVA_INTERFACE.
1304 * call.c (java_iface_lookup_fn): New static.
1305 (build_over_call): If calling a method declared in a
1306 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
1307 expression which resolves the function address.
1308 (build_java_interface_fn_ref): New function.
1310 2001-03-22 Richard Henderson <rth@redhat.com>
1312 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
1313 * except.c: Don't include it.
1315 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
1316 based on an idea from Joe Buck <jbuck@synopsys.com>
1318 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
1320 (data_def, component_decl): Add reductions to bad_decl.
1322 2001-03-22 Jakub Jelinek <jakub@redhat.com>
1324 * method.c (do_build_assign_ref): Don't use build_modify_expr for
1325 anonymous aggregates, since they don't have assignment operator
1327 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
1328 assignment operators for anonymous structure fields.
1330 2001-03-21 Jason Merrill <jason@redhat.com>
1332 * pt.c (instantiate_decl): Abort if we see a member constant
1333 instantiation that doesn't already have its initializer.
1334 Downgrade explicit instantiation without definition to pedwarn.
1336 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
1337 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
1338 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
1340 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
1341 (pending_vtables): Remove.
1342 * decl2.c (pending_vtables): Remove.
1343 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
1344 CLASSTYPE_VTABLE_NEEDS_WRITING.
1345 (import_export_class): Likewise.
1346 (init_decl2): Don't mark pending_vtables.
1347 * lex.c (handle_pragma_vtable): Just sorry.
1348 * pt.c (instantiate_class_template): Don't mess with
1349 CLASSTYPE_VTABLE_NEEDS_WRITING.
1350 (mark_class_instantiated): Likewise.
1351 * ptree.c (print_lang_type): Don't print it.
1352 * semantics.c (begin_class_definition): Don't set it.
1354 * pt.c (template_tail): Replace with last_pending_template.
1355 (maybe_templates, maybe_template_tail): Remove.
1356 (add_pending_template): Adjust.
1357 (instantiate_pending_templates): Adjust.
1359 * cp-tree.h (struct saved_scope): Remove lang_stack field.
1360 (current_lang_stack): Remove.
1361 * decl.c (maybe_push_to_top_level): Don't initialize it.
1362 (duplicate_decls): Use current_lang_depth.
1363 (xref_basetypes): Likewise.
1364 * class.c (current_lang_depth): New fn.
1365 (push_lang_context): Use more varray functionality.
1366 (pop_lang_context): Likewise.
1368 * error.c (GLOBAL_THING): Always use '__'.
1370 2001-03-21 Mark Mitchell <mark@codesourcery.com>
1372 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
1374 * mangle.c (mangle_decl_string): Mangle the names of overloaded
1375 operators, even when they have `extern "C"' linkage.
1377 2001-03-19 Mark Mitchell <mark@codesourcery.com>
1379 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
1380 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1381 where it's not necessary.
1382 (add_method): Remove optimization involving comparison of
1383 DECL_ASSEMBLER_NAME.
1384 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
1385 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1386 where it's not necessary.
1387 (check_methods): Likewise.
1388 (build_clone): Likewise.
1389 (built_vtt): Likewise.
1390 * cp-tree.h (DECL_NEEDED_P): Likewise.
1391 * decl.c (pushtag): Likewise.
1392 (duplicate_decls): Likewise.
1393 (pushdecl): Likewise.
1394 (builtin_function): Likewise.
1395 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
1396 (build_cp_library_fn): Likewise.
1397 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
1398 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1399 where it's not necessary.
1400 (make_rtl_for_nonlocal_decl): Likewise.
1401 (cp_finish_decl): Likewise.
1402 (grokfndecl): Likewise.
1403 (grokvardecl): Likewise.
1404 (grokdeclarator): Likewise.
1405 (start_function): Likewise.
1406 (cp_missing_return_ok_p): Likewise.
1407 * decl2.c (grokclassfn): Likewise.
1408 (check_classfn): Likewise.
1409 (finish_static_data_member_decl): Likewise.
1410 (grokfield): Likewise.
1411 * error.c (GLOBAL_IORD_P): Remove.
1412 (dump_global_iord): Improve output.
1413 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
1414 * except.c (nothrow_libfn_p): Summarily reject any function not in
1416 * init.c (build_java_class_ref): Don't explicitly set
1417 DECL_ASSEMBLER_NAME after calling mangle_decl.
1418 * mangle.c (mangle_decl_string): Handle extern "C" functions.
1419 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
1420 * method.c (set_mangled_name_for_decl): Don't explicitly set
1421 DECL_ASSEMBLER_NAME after calling mangle_decl.
1422 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
1423 IDENTIFIER_GLOBAL_VALUE for the thunk.
1424 * pt.c (set_mangled_name_for_template_decl): Remove.
1425 (check_explicit_specialization): Don't use it.
1426 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
1427 (tsubst_friend_function): Likewise.
1428 (tsubst_decl): Likewise.
1429 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
1430 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
1431 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1432 where it's not necessary.
1433 (tinfo_base_init): Likewise.
1434 (create_real_tinfo_var): Likewise.
1435 * search.c (looup_field_1): Likewise.
1436 * semantics.c (finish_named_return_value): Likewise.
1437 * tree.c (init_tree): Set lang_set_decl_assembler_name.
1439 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
1441 Correct semantics restrictions checking in throw-expression.
1442 * except.c (is_admissible_throw_operand): New function.
1443 (build_throw): Use it.
1445 2001-03-14 Mark Mitchell <mark@codesourcery.com>
1447 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
1450 2001-03-14 Mark Mitchell <mark@codesourcery.com>
1452 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1453 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
1454 * decl.c (duplicate_decls): Likewise.
1455 (builtin_function): Likewise.
1456 (build_library_fn): Likewise.
1457 (build_cp_library_fn): Likewise.
1458 (check_initializer): Likewise.
1459 (cp_finish_decl): Likewise.
1460 * decl2.c (grokfield): Likewise.
1461 (grok_function_init): Remove #if 0'd code.
1462 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1463 * friend.c (do_friend): Likewise.
1464 * init.c (get_temp_regvar): Likewise.
1465 * method.c (make_thunk): Likewise.
1466 * pt.c (tsubst_friend_function): Likewise.
1467 (tsubst_decl): Likewise.
1468 (regenerate_decl_from_template): Likewise.
1469 * semantics.c (genrtl_named_return_value): Likewise.
1470 (expand_body): Likewise.
1471 (genrtl_finish_function): Likewise.
1472 * tree.c (cp_tree_equal): Likewise.
1474 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
1476 * call.c (convert_like_real): Add extra semantics to INNER
1477 parameter. Don't convert to temporary if a user conversion
1478 gives us an lvalue that we're about to bind to a reference.
1479 Set INNER to indicate pending reference binding on recursive
1482 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
1484 * cp/lex.c: Delete duplicate pending_lang_change.
1486 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
1488 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
1490 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
1491 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
1493 2001-03-09 Zack Weinberg <zackw@stanford.edu>
1495 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
1497 2001-03-08 Stan Shebs <shebs@apple.com>
1499 * cp-tree.h (set_identifier_local_value): Remove unused decl.
1501 2001-03-06 Zack Weinberg <zackw@stanford.edu>
1503 * spew.c: Remove references to CPP_OSTRING.
1505 2001-03-06 Andrew Haley <aph@redhat.com>
1507 * typeck.c (convert_arguments): Check that we have an fndecl.
1509 2001-03-05 Andrew Haley <aph@redhat.com>
1511 * typeck.c (convert_arguments): Don't do ellipsis conversion for
1512 __built_in_constant_p.
1514 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1516 * typeck.c (build_static_cast): Allow enum to enum conversions
1519 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1521 * class.c (check_field_decls): Pointers to member do not a
1522 non-pod struct make, as per DR 148.
1524 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1526 * call.c (joust): cp_pedwarn when using gnu extension concerning
1527 worst conversion sequences.
1529 2001-03-01 Zack Weinberg <zackw@stanford.edu>
1531 * decl.c: Replace all uses of 'boolean' with 'bool'.
1533 2001-03-01 Zack Weinberg <zackw@stanford.edu>
1535 * lang-specs.h: Add zero initializer for cpp_spec field to
1536 all array elements that need one. Don't put an #ifdef inside
1537 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
1540 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
1542 Implement using decls inside template functions.
1543 * decl2.c (validate_nonmember_using_decl): Don't special case
1544 fake_std_node in the global namespace. Don't reject early when
1545 processing a template.
1546 (do_local_using_decl): Add to statement tree. Don't do further
1547 processing when building a template.
1548 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
1550 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
1552 * decl2.c (do_nonmember_using_decl): Don't complain if we find
1553 same function. Do complain about ambiguating extern "C"
1556 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
1558 Remove floating point and complex type template constant parms.
1559 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
1560 COMPLEX_TYPE extensions.
1561 (invalid_nontype_parm_type_p): Likewise.
1563 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
1565 * except.c (call_eh_info): Revert "match_function"'s type.
1567 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
1569 Fix ctor vtable vcall offsets.
1570 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
1571 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
1572 (get_matching_base): Remove.
1573 (get_original_base): New function.
1574 (build_vtbl_initializer): Initialize vid.rtti_binfo.
1575 Use a virtual thunk for a ctor vtable with an index
1576 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
1577 primary base within a constructor vtable. Only set
1578 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
1579 when primary base has been lost.
1580 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
1582 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
1584 * call.c (joust): Ensure more_specialized()'s argument length
1585 parameter has correct value for constructors.
1587 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
1589 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
1591 * decl.c (mark_inlined_fns): Prototype.
1593 2001-02-22 Mark Mitchell <mark@codesourcery.com>
1595 * spew.c (yylex): Correct handling of friends.
1597 2001-02-22 Mark Mitchell <mark@codesourcery.com>
1599 * mangle.c (write_encoding): Pass write_function_type the
1600 FUNCTION_DECL for the function being encoded.
1601 (write_function_type): Pass it along to write_bare_function_type.
1602 (write_bare_function_type): Pass it along to write_method_parms.
1603 (write_method_parms): Don't mangle the compiler-generated
1604 parameters to a constructor or destructor.
1606 2001-02-22 Andreas Jaeger <aj@suse.de>
1608 * optimize.c: Include toplev.h for
1609 note_deferral_of_defined_inline_function prototype.
1611 2001-02-22 Jakub Jelinek <jakub@redhat.com>
1613 * cp-tree.h (struct lang_decl_inlined_fns): New.
1614 (struct lang_decls): Add inlined_fns.
1615 (DECL_INLINED_FNS): New macro.
1616 * optimize.c (struct inline_data): Add inlined_fns.
1617 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
1618 (inlinable_function_p): Likewise, fix typo in comment,
1619 function is not inlinable if it already inlined function currently
1621 (expand_call_inline): Add fn to inlined_fns if neccessary.
1622 (optimize_function): Initialize inlined_fns.
1623 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
1624 * decl.c (mark_inlined_fns): New function.
1625 (lang_mark_tree): Call it.
1627 2001-02-21 Jason Merrill <jason@redhat.com>
1629 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
1630 (DECL_UNINLINABLE): Move to middle-end.
1632 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
1633 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
1634 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
1635 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
1636 parms and outer BLOCK. note_deferral_of_defined_inline_function.
1638 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
1641 2001-02-19 Mark Mitchell <mark@codesourcery.com>
1643 * decl2.c (set_decl_namespace): Allow explicit instantiations in
1646 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1648 * optimize.c (expand_call_inline): Don't walk subtrees of type
1651 2001-02-18 Mark Mitchell <mark@codesourcery.com>
1653 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
1656 2001-02-18 Jason Merrill <jason@redhat.com>
1658 Do put the VTT parameter in DECL_ARGUMENTS.
1659 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
1660 (current_vtt_parm): New macro.
1661 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
1662 (DECL_HAS_VTT_PARM_P): New macro.
1663 (DECL_VTT_PARM): Remove.
1664 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
1665 * decl.c (duplicate_decls): Only copy the operator code if
1667 (start_function): Set current_vtt_parm.
1668 (lang_mark_tree): Don't mark vtt_parm.
1669 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
1670 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
1671 * class.c (build_clone): Maybe remove the VTT parm.
1672 * optimize.c (maybe_clone_body): Set up the VTT parm.
1673 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
1674 * call.c (build_over_call): Just allow the VTT arg.
1675 * method.c (make_thunk): Don't set DECL_VTT_PARM.
1676 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
1677 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
1678 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
1679 * error.c (dump_function_decl): Likewise.
1680 * call.c (build_user_type_conversion_1, convert_like_real): Abort
1681 if we try to call a constructor with in-charge or VTT parms.
1682 * method.c (skip_artificial_parms_for): New fn.
1683 * call.c (add_function_candidate, build_over_call): Call it.
1684 * call.c (build_new_method_call): Use current_vtt_parm.
1685 * init.c (expand_virtual_init): Likewise.
1686 * class.c (same_signature_p): No longer static.
1687 * cp-tree.h: Declare it.
1688 * search.c (look_for_overrides_r): Use it.
1690 2001-02-17 Mark Mitchell <mark@codesourcery.com>
1692 * cp-tree.h (new_abi_rtti_p): Remove.
1693 (name_mangling_version): Likewise.
1694 (flag_do_squangling): Likewise.
1695 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
1696 * decl.c (grokfndecl): Likewise.
1697 * decl2.c (name_mangling_version): Remove.
1698 (flag_do_squangling): Likewise.
1699 (lang_f_options): Remove `squangle'.
1700 (unsupported_options): Add `squangle'.
1701 (cxx_decode_option): Issue a warning about uses of
1702 -fname-mangling-version.
1703 (finish_file): Remove old ABI support.
1704 * pt.c (check_explicit_specialization): Likewise.
1705 (tsubst_decl): Likewise.
1706 * rtti.c (init_rtti_processing): Likewise.
1707 (build_headof): Likewise.
1708 (get_tinfo_decl_dynamic): Likewise.
1709 (tinfo_from_decl): Likewise.
1710 (build_dynamic_cast_1): Likewise.
1711 (synthesize_tinfo_var): Likewise.
1712 * init.c (build_new): Allow enumeration types for the array-bounds
1713 in a direct-new-declarator.
1715 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
1717 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
1718 TREE_PROTECTED from the template being specialized.
1720 2001-02-17 Jason Merrill <jason@redhat.com>
1722 * decl2.c (build_artificial_parm): Set TREE_READONLY.
1724 * decl.c (bad_specifiers): Allow throw specs on things with
1725 pointer-to-function or -member-function type.
1726 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
1729 2001-02-17 Mark Mitchell <mark@codesourcery.com>
1731 * call.c (check_dtor_name): Handle template names correctly.
1733 2001-02-16 Jason Merrill <jason@redhat.com>
1735 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
1736 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
1737 * optimize.c (maybe_clone_body): Don't substitute it.
1738 * call.c (build_new_method_call): Check in_chrg instead.
1739 * init.c (expand_virtual_init): Likewise.
1741 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
1743 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
1744 class-type introduces at least a type-name.
1746 2001-02-16 Jakub Jelinek <jakub@redhat.com>
1748 * call.c (convert_like_real): Create a temporary for non-lvalue.
1750 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
1752 * cp-tree.h: Fix typos in comments.
1754 2001-02-16 Jason Merrill <jason@redhat.com>
1756 * optimize.c (remap_block): If we're compiling a clone, pass the
1757 new block to insert_block.
1759 2001-02-16 Mark Mitchell <mark@codesourcery.com>
1761 * semantics.c (finish_asm_stmt): Robustify.
1763 2001-02-15 Mark Mitchell <mark@codesourcery.com>
1765 * pt.c (push_template_decl_real): Don't remangle the name of a
1768 2001-02-15 Jim Meyering <meyering@lucent.com>
1770 * Make-lang.in (c++.install-common): Depend on installdirs.
1771 (c++.install-info): Likewise.
1772 (c++.install-man): Likewise.
1774 2001-02-15 Mark Mitchell <mark@codesourcery.com>
1776 * typeck2.c (build_m_component_ref): Robustify.
1778 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
1780 * friend.c (do_friend): Don't take the nested [template] class
1781 into account when deciding whether to warn about the friend
1782 function not referring to a template function.
1784 2001-02-14 Jakub Jelinek <jakub@redhat.com>
1786 * typeck.c (build_unary_op): Clarify error message.
1788 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
1790 * parse.y (component_constructor_declarator): allow optional
1791 parentheses around constructor class name.
1793 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1795 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
1797 * init.c (emit_base_init): Remove incorrect comment about
1799 * method.c (make_thunk): Fix comment alignment.
1801 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1803 Kill remnants of this is variable.
1804 * cp-tree.h (flag_this_is_variable): Remove.
1805 * decl2.c (flag_this_is_variable): Remove.
1806 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
1807 (build_vbase_path): The path is non-static, even in a cdtor.
1808 (resolves_to_fixed_type_p): Add additional return value.
1809 * search.c (init_vbase_pointers): Adjust.
1810 * tree.c (lvalue_p_1): Adjust.
1811 * typeck.c (mark_addressable): Adjust.
1813 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1815 * pt.c (unify): Don't check cv quals of array types.
1817 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1819 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
1820 check whether we already have the type.
1822 2001-02-13 Mark Mitchell <mark@codesourcery.com>
1824 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
1825 * call.c (build_op_delete_call): Simplify to remove duplicate
1827 * class.c (clone_function_decl): Don't build the deleting variant
1828 of a non-virtual destructor.
1829 * decl.c (finish_destructor_body): Don't call delete if this is a
1830 non-virtual destructor.
1831 * init.c (build_delete): Explicitly call `operator delete' when
1832 deleting an object with a non-virtual destructor.
1834 2001-02-13 Jason Merrill <jason@redhat.com>
1836 * lang-specs.h: Add more __EXCEPTIONS.
1838 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
1840 * typeck2.c (process_init_constructor): Check
1841 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
1843 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
1845 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
1846 Remove spurious information in comment. Allow further
1847 adjustments of REFERENCE_TYPE args.
1849 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
1851 * errfn.c (cp_deprecated): Tweak diagnostic text.
1852 * parse.y (new_initializer): Deprecate initializer lists
1855 2001-02-12 Mark Mitchell <mark@codesourcery.com>
1857 Remove old ABI support.
1859 2001-02-11 Mark Mitchell <mark@codesourcery.com>
1861 * decl2.c (flag_vtable_thunks): Always set it to 1.
1862 (flag_new_abi): Likewise.
1863 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
1865 * Makefile.in (g++spec.o): Fix typo.
1867 2001-02-09 Jason Merrill <jason@redhat.com>
1869 * lang-specs.h: Restore definition of __EXCEPTIONS.
1871 2001-02-08 Jason Merrill <jason@redhat.com>
1873 * search.c (shared_member_p): New function.
1874 (lookup_field_r): Use it.
1875 * cp-tree.h (SHARED_MEMBER_P): Remove.
1877 * method.c (process_overload_item): Handle template-dependent array
1879 * pt.c (type_unification_real): If we end up with undeduced nontype
1882 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
1885 * typeck2.c (friendly_abort): Don't say anything if we have
1886 earlier errors or sorries.
1888 * decl.c (check_tag_decl): Notice attempts to redefine bool and
1889 wchar_t. Ignore if in_system_header.
1891 * decl.c (maybe_push_cleanup_level): New fn...
1892 (start_decl_1): ...split out from here.
1893 * cvt.c (build_up_reference): Use it.
1894 * cp-tree.h: Declare it.
1896 2001-02-07 Mark Mitchell <mark@codesourcery.com>
1898 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
1901 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
1903 * pt.c (lookup_template_class): Make sure it's a primary
1904 template or template_template_parm when called from the parser.
1905 (instantiate_template_class): Add assertion.
1907 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
1909 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
1910 from error_mark_node.
1912 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
1914 Fix specification and implementation bugs in V3 ABI
1915 construction vtables.
1916 * cp-tree.h (flag_dump_class_layout): New flag.
1917 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
1918 (BINFO_LOST_PRIMARY_P): New flag.
1919 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
1920 (BINFO_PRIMARY_MARKED_P): Rename to ...
1921 (BINFO_PRIMARY_P): ... here.
1922 (binfo_via_virtual): New prototype.
1923 * decl2.c (flag_dump_class_layout): New flag.
1924 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
1925 use `=' as a file name separator.
1926 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
1928 (build_vtbl_address): If this is a virtual primary base, then
1929 get the vtbl of what it is ultimately primary for.
1930 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
1931 for BINFO_PRIMARY_P.
1932 (dfs_skip_nonprimary_vbases_markedp): Likewise.
1933 (get_shared_vbase_if_not_primary): Likewise.
1934 (dfs_get_pure_virtuals): Likewise.
1935 (expand_upcast_fixups): Likewise.
1936 (fixup_virtual_upcast_offsets): Likewise.
1937 (dfs_find_vbase_instance): Likewise.
1938 (find_vbase_instance): Likewise.
1939 (binfo_from_vbase): Adjust comment to reflect reality.
1940 (binfo_via_virtual): New function.
1941 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
1942 for binfo walking during VTT construction.
1943 (dfs_mark_primary_bases): Remove.
1944 (force_canonical_binfo_r): New function.
1945 (force_canonical_binfo): New function.
1946 (mark_primary_virtual_base): New function.
1947 (mark_primary_bases): Walk in inheritance graph order, use
1948 mark_primary_virtual_base.
1949 (determine_primary_base): Use some more intermediate variables.
1950 (dfs_find_final_overrider): Don't check for overriding along a
1952 (dfs_modify_vtables): Walk into primary virtual bases too.
1953 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
1954 (build_base_fields): Likewise.
1955 (dfs_set_offset_for_unshared_vbases): Likewise.
1956 (layout_virtual_bases): Likewise.
1957 (end_of_class): Likewise.
1958 (finish_struct_1): Call dump_class_hierarchy, if requested.
1959 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
1960 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
1961 (dump_class_hierarchy): Add file parameter. Append to file, if
1963 (finish_vtbls): Adjust accumulate_vtbl_inits call.
1964 Use canonical base for virtual bases.
1965 (build_vtt): Add more comments. Adjust build_vtt_inits call.
1966 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
1967 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
1968 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
1970 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
1971 from DATA. We want virtual primary bases and all bases via virtual.
1972 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
1973 virtual base when not a construction vtable.
1974 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
1975 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
1976 Use canonical bases when processing virtual bases.
1977 (accumulate_vtbl_inits): We're interested in any base via a
1979 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
1980 within a construction vtable, determine what is being overridden.
1981 (build_vtbl_initializer): Add more comments
1982 (add_vcall_offset_vtbl_entries_1): Adjust comment.
1983 (build_rtti_vtbl_entries): Check if the base has lost its
1986 2001-02-05 Mark Mitchell <mark@codesourcery.com>
1988 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
1990 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1992 * decl.c (pushdecl): Call abort instead of fatal.
1993 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
1994 * init.c (build_new_1): Likewise.
1995 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
1996 * decl.c (build_typename_type): hash_table_init now returns void.
1997 decl.c (init_decl_processing): Make an error non-fatal.
1999 2001-02-04 Mark Mitchell <mark@codesourcery.com>
2001 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
2003 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2004 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2005 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2006 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2007 * decl.c (maybe_commonize_var): Use the new name-mangling where
2009 * decl2.c (comdat_linkage): Enhance comments. Make all
2010 compiler-generated things static, if COMDAT is not available.
2011 (get_tinfo_decl): Do not make typeinfo objects that belong in the
2013 (tinfo_base_init): Use the correct mangled name for typeinfo
2014 strings, and push them into the global scope.
2015 (typeinfo_in_lib_p): New function.
2016 (synthesize_tinfo_var): Use it.
2017 (create_real_tinfo_var): Likewise.
2019 2001-02-03 Jakub Jelinek <jakub@redhat.com>
2021 * decl.c (push_class_binding): Use context_for_name_lookup instead
2023 * search.c (context_for_name_lookup): Remove static. Check for NULL
2024 context in the loop.
2025 * cp-tree.h (context_for_name_lookup): Add prototype.
2027 2001-02-02 Jakub Jelinek <jakub@redhat.com>
2029 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
2030 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
2032 * call.c (convert_class_to_reference, build_user_type_conversion_1,
2033 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
2035 2001-02-02 Mark Mitchell <mark@codesourcery.com>
2037 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
2038 of macros used when compiling g++spec.c.
2039 * g++spec.c (lang_specific_driver): Link with the shared
2042 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
2044 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
2045 make_reference_declarator, make_call_declarator), method.c
2046 (implicitly_declare_fn), parse.y (namespace_using_decl,
2047 notype_unqualified_id, expr_or_declarator, new_type_id,
2048 after_type_declarator, direct_after_type_declarator,
2049 notype_declarator, complex_notype_declarator,
2050 complex_direct_notype_declarator, qualified_id,
2051 notype_qualified_id, overqualified_id, direct_new_declarator,
2052 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
2053 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
2054 instead of build_parse_node.
2056 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2058 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
2059 (minus_one_node): Moved to top level gcc directory. Renamed
2060 to integer_minus_one_node.
2062 * init.c (init_init_processing): Don't set minus_one_node.
2063 (build_vec_init): Use integer_minus_one_node.
2065 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2067 2001-01-28 Jakub Jelinek <jakub@redhat.com>
2069 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
2070 identical and they would be replaced with constant, remove
2071 MODIFY_EXPR from the tree.
2073 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2075 * Make-lang.in: Remove all dependencies on defaults.h.
2076 * call.c: Don't include defaults.h.
2078 * decl2.c: Likewise.
2079 * except.c: Likewise.
2083 * typeck.c: Likewise.
2085 2001-01-25 Jakub Jelinek <jakub@redhat.com>
2087 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
2088 operators even in "C" linkage.
2089 * method.c (set_mangled_name_for_decl): Likewise.
2090 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
2091 overloaded operators in "C" linkage.
2093 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
2095 * pt.c (tsubst_decl): Remove IN_DECL parameter.
2096 (tsubst_arg_types): Check parameter is not void.
2097 (tsubst): Adjust tsubst_decl call.
2099 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
2101 * call.c (add_builtin_candidate): Quote std properly, from
2104 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2106 * pt.c (check_explicit_specialization): Clone constructors and
2109 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
2111 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
2112 indicates anything special about template depth. Make sure we
2113 only count the user visible template classes.
2115 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
2117 * call.c (build_conv): Typo in comment.
2118 (add_builtin_candidate): Add more explanation.
2119 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
2120 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
2121 when we have enumeral types.
2122 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
2123 candidates for relops and eqops.
2124 (joust): Simplify control flow. Allow a non-template user
2125 function to hide a builtin.
2127 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
2129 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
2130 (more_specialized): Add deduction parameter.
2131 * call.c (joust): Adjust more_specialized call.
2132 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
2133 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
2134 (get_bindings_order): Remove.
2135 (get_bindings_real): Add DEDUCE parameter.
2136 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
2137 REFERENCE_TYPE jig for DEDUCE_ORDER.
2138 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
2139 maybe_adjust_types_for_deduction.
2140 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
2142 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
2143 (check_cv_quals_for_unify): Use new unify qualifier flags.
2144 (unify): Clear new unify qualifier flags.
2145 (get_bindings_real): Add DEDUCE parameter.
2146 (get_bindings): Adjust call to get_bindings_real.
2147 (get_bindings_overload): Likewise.
2148 (most_specialized_instantiation): Adjust call to
2151 2001-01-19 Jason Merrill <jason@redhat.com>
2153 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
2155 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
2158 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
2160 * decl2.c (arg_assoc_class): Fix double iteration logic.
2162 2001-01-19 Jason Merrill <jason@redhat.com>
2164 * init.c (build_delete): Always call convert_force to strip cv-quals.
2166 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
2167 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
2168 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
2170 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2172 * search.c (get_vbase_1): Count only virtual bases.
2174 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2176 * class.c (duplicate_tag_error): Robustify flag clearing.
2178 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2180 * cp-tree.h (lookup_template_class): Add complain parm.
2181 * decl.c (lookup_namespace_name): Adjust call to
2182 lookup_template_class.
2183 (make_typename_type): Likewise.
2184 * semantics.c (finish_template_type): Likewise.
2185 * pt.c (lookup_template_class): Add complain parm. Adjust.
2186 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
2189 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2191 * pt.c (copy_default_args_to_explicit_spec): Preserve
2192 object's CV quals. Reorganize.
2194 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2196 * typeck.c (build_modify_expr): Say `initialization' for
2198 * init.c (build_default_init): Convert to enumeral type, if
2201 2001-01-18 Jakub Jelinek <jakub@redhat.com>
2203 * parse.y (nomods_initdcl0): Properly set things up for
2206 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2208 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
2209 (type_unification_real): Set it.
2212 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2214 * decl.c (finish_destructor_body): Convert to vbase pointer here.
2216 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2218 * semantics.c (begin_class_definition): Check we're not inside a
2221 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2223 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
2226 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2228 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
2229 * call.c (build_over_call): Add comment.
2231 2001-01-16 Daniel Berlin <dberlin@redhat.com>
2233 * cvt.c (ocp_convert): Handle vector type conversion
2234 * typeck2.c (digest_init): Handle vector type initializations
2236 2001-01-16 Phil Edwards <pme@sources.redhat.com>
2238 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
2241 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
2243 * pt.c (check_nontype_parm): Rename to ...
2244 (invalid_nontype_parm_type_p): ... here.
2245 (process_template_parm): Adjust.
2246 (convert_template_argument): Adjust.
2248 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
2250 * pt.c (check_nontype_parm): New function.
2251 (process_template_parm): Use it.
2252 (convert_template_argument): Use it.
2253 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
2256 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
2258 * tree.c: Add defaults.h
2259 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
2260 * Make-lang.in (cp/tree.o): Add defaults.h.
2262 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2264 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
2266 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2268 * g++.1: Change to be ".so man1/gcc.1".
2270 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2272 * Make-lang.in (c++.info, c++.install-info): Build and install g++
2274 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
2275 ($(srcdir)/cp/g++int.info): New target.
2276 * gxxint.texi: Add info directory entry. Use @@ in email address.
2277 * .cvsignore: Update.
2279 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
2281 * typeck.c (build_c_cast): Do template processing earlier.
2282 Always pedwarn on array casts.
2284 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
2286 * friend.c (make_friend_class): Make sure a templated class is
2287 actually a template.
2289 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2291 * decl2.c (get_guard): Set linkage from guarded decl.
2293 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2295 * call.c (convert_default_arg): Check for unprocessed
2297 * cp-tree.h (replace_defarg): Move to spew.c.
2298 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
2299 spew.c, which is where they really are.
2300 (done_pending_defargs): Declare.
2301 (unprocessed_defarg_fn): Declare.
2302 * decl.c (replace_defarg): Move to spew.c
2303 * parse.y (structsp): Call done_pending_defargs.
2304 * spew.c (defarg_fns): Rearrange list structure.
2305 (defarg_fnsdone): New static variable.
2306 (defarg_depfns): New static variable.
2307 (init_spew): Adjust.
2308 (add_defarg_fn): Store the type in TREE_TYPE.
2309 (do_pending_defargs): Detect and deal with ordering constraints
2311 (done_pending_defargs): New function.
2312 (unprocessed_defarg_fn): New function.
2313 (replace_defarg): Moved from decl.c. Robustify. Don't save
2314 if circularity detected.
2316 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2318 * pt.c (unify): Check array has a domain, before checking
2319 whether it is variable sized.
2321 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2323 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
2324 parameters with pointers to arrays of unknown bound.
2326 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2328 * parse.y (template_parm_header, template_spec_header): New
2329 reductions. Split out from ...
2330 (template_header): ... here. Use them.
2331 (template_template_parm): Use template_parm_header.
2332 * semantics.c (finish_template_template_parm): Add assert.
2334 2001-01-10 Mark Mitchell <mark@codesourcery.com>
2336 * mangle.c (write_builtin_type): Fix thinko.
2338 * pt.c (copy_default_args_to_explicit_spec_1): New function.
2339 (copy_default_args_to_explicit_spec): Likewise.
2340 (check_explicit_specialization): Use it.
2342 * class.c (finish_struct_1): Remove last argument in call to
2343 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
2344 * decl.c (builtin_function): Likewise.
2345 (build_cp_library_fn): Likewise.
2346 (check_initializer): Likewise.
2347 (make_rtl_for_nonlocal_decl): Likewise.
2348 (cp_finish_decl): Likewise.
2349 (start_function): Likewise.
2350 * decl2.c (finish_anon_union): Likewise.
2351 * friend.c (do_friend): Likewise.
2352 * init.c (build_java_class_ref): Likewise.
2353 * method.c (make_thunk): Likewise.
2354 * pt.c (tsubst_friend_function): Likewise.
2355 * semantics.c (expand_body): Likewise.
2357 2001-01-10 Mark Mitchell <mark@codesourcery.com>
2359 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
2360 looking at DECL_CLONED_FUNCTION for non-functions.
2362 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2364 * error.c (dump_template_parameter): Use parm to determine how
2365 to print default value.
2367 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2369 * class.c (duplicate_tag_error): Clear more flags.
2371 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2373 * call.c (build_new_method_call): Use binfo_for_vbase.
2375 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
2377 * cp-tree.h (flag_cond_mismatch): Don't declare.
2378 * decl2.c (flag_cond_mismatch): Don't define.
2379 (lang_f_options): Remove cond-mismatch.
2380 (unsupported_options): Add cond-mismatch.
2382 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
2384 * class.c (handle_using_decl): Reject using of constructor name
2385 of sourcing class. Allow injecting of a method with same name as
2386 nested class. Fixup error messages.
2388 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
2390 * decl2.c (lang_decode_option): Handle -Wformat=2.
2392 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2394 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
2395 initialized_in_class.
2396 (DECL_DEFINED_IN_CLASS_P): Rename to ...
2397 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
2398 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
2399 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
2400 * pt.c (check_default_tmpl_args): Adjust for
2401 DECL_INITIALIZED_IN_CLASS_P.
2402 (instantiate_class_template): Likewise.
2403 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
2405 * class.c (finish_struct): Constify saved_filename.
2407 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2409 * class.c (duplicate_tag_error): Adjust diagnostic.
2410 (finish_struct): Locally set location to start of struct.
2411 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
2413 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2415 * decl.c (struct binding_level): Adjust class_shadowed comments
2417 (push_class_level_binding): Ajust comments to reflect reality.
2418 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
2419 Don't set TREE_VALUE on the class_shadowed list.
2421 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
2423 * decl2.c (acceptable_java_type): Allow references too.
2424 * init.c (build_java_class_ref): When using the new ABI, search
2425 `class$' and have it mangled with `mangle_decl.'
2426 * mangle.c (write_java_integer_type_codes): New function.
2427 (write_builtin_type): Detect and mangle Java integer and real
2430 2001-01-07 Mark Mitchell <mark@codesourcery.com>
2432 * decl2.c (grokfield): Don't accept `asm' specifiers for
2433 non-static data members.
2435 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2437 * expr.c (cplus_expand_expr): Don't reset `target'.
2439 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
2441 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
2443 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
2445 * parse.y (template_datadef): Check for error_mark_node.
2447 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
2449 * cp-tree.def (DEFAULT_ARG): Make `x' class.
2451 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
2453 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
2454 (record_builtin_type): Make non-static.
2455 (flag_short_double): Don't declare.
2456 (init_decl_processing): Remove the creation of many tree nodes now
2457 in c_common_nodes_and_builtins.
2458 (build_void_list_node): New function.
2459 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
2460 * cp-tree.h (flag_short_wchar): Don't declare.
2462 2001-01-04 Mark Mitchell <mark@codesourcery.com>
2464 * call.c (build_conv): Don't use build1 for USER_CONV.
2465 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
2467 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
2469 * lex.c (lang_init): Call c_common_lang_init.
2471 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
2473 * search.c (lookup_fnfields_here): Remove.
2474 (look_for_overrides_r): Use lookup_fnfields_1.
2475 Ignore functions from using declarations.
2477 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
2479 Implement exceptions specifiers for implicit member functions.
2480 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
2481 * method.c (synthesize_exception_spec): New function.
2482 (locate_dtor, locate_ctor, locate_copy): New functions.
2483 (implicitly_declare_fn): Generate the exception spec too.
2484 * search.c (check_final_overrider): Check artificial functions
2486 * typeck2.c (merge_exception_specifiers): New function.
2488 2001-01-03 Jason Merrill <jason@redhat.com>
2490 * init.c (build_default_init): New fn.
2491 (perform_member_init): Split out from here.
2492 (build_new_1): Use it. Simplify initialization logic.
2493 (build_vec_init): Take an array, rather than a pointer and maxindex.
2494 Speed up simple initializations. Don't clean up if we're assigning.
2495 * cp-tree.h: Adjust.
2496 * decl2.c (do_static_initialization): Remove TREE_VEC case.
2497 * parse.y (new_initializer): Return void_zero_node for ().
2498 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
2499 * typeck2.c (digest_init): Only complain about user-written
2502 2000-12-22 Mike Stump <mrs@wrs.com>
2504 * decl2.c: (max_tinst_depth): Increase to 50.
2506 2001-01-02 Mark Mitchell <mark@codesourcery.com>
2508 * class.c (invalidate_class_lookup_cache): Zero the
2509 previous_class_values.
2510 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
2512 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
2513 * decl.c (free_bindings): New variable.
2514 (push_binding): Don't create a new binding if we have one on the
2516 (pop_binding): Put old bindings on the free list.
2517 (init_decl_processing): Use size_int, not build_int_2.
2518 Register free_bindings as a GC root.
2519 (cp_make_fname_decl): Use size_int, not build_int_2.
2520 (push_inline_template_parms_recursive): Likewise.
2521 (end_template_parm_list): Likewise.
2522 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
2523 (tsubst_template_parms): Use size_int, not build_int_2.
2525 * rtti.c (get_vmi_pseudo_type_info): Likewise.
2527 2001-01-02 Richard Henderson <rth@redhat.com>
2529 * parse.y (asm): Set ASM_INPUT_P.
2531 2001-01-02 Jason Merrill <jason@redhat.com>
2533 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
2536 * typeck.c (cp_truthvalue_conversion): New fn.
2537 * cvt.c (ocp_convert): Use it.
2539 * cp-tree.h: Lose c-common.c decls.
2541 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
2542 * cvt.c (convert_to_void): Use type_unknown_p.
2544 * typeck.c (strip_all_pointer_quals): Also strip quals from
2545 pointer-to-member types.
2547 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
2550 * call.c (build_new_method_call): Do evaluate the object parameter
2551 when accessing a static member.
2552 * typeck.c (build_component_ref): Likewise.
2554 2001-01-02 Andreas Jaeger <aj@suse.de>
2556 * decl.c (cp_missing_noreturn_ok_p): New.
2557 (init_decl_processing): Set lang_missing_noreturn_ok_p.
2559 2000-12-29 Jakub Jelinek <jakub@redhat.com>
2561 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
2563 2000-12-29 Mark Mitchell <mark@codesourcery.com>
2565 * class.c (pushclass): Remove #if 0'd code.
2566 * cp-tree.h (overload_template_name): Remove.
2567 * decl.c (store_bindings): Simplify.
2568 (pop_from_top_level): Likewise.
2569 * pt.c (overload_template_name): Remove.
2570 (instantiate_decl): Don't call push_to_top_level if it's not
2573 2000-12-28 Mark Mitchell <mark@codesourcery.com>
2575 * pt.c (register_local_specialization): Don't return a value.
2576 (lookup_template_class): Use move-to-front heuristic when looking
2577 up template instantiations.
2578 (instantiate_decl): Only push_to_top_level when we're actually
2579 going to instantiate the template.
2581 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
2583 * search.c (binfo_for_vtable): Return least derived class, not
2584 most. Handle secondary vtables.
2586 2000-12-22 Jason Merrill <jason@redhat.com>
2588 * pt.c (more_specialized): Don't optimize len==0.
2589 (fn_type_unification): If we're adding the return type, increase len.
2591 * typeck.c (build_binary_op): Fix pmf comparison logic.
2593 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
2594 DECL_STATIC_FUNCTION_P.
2596 * semantics.c (genrtl_finish_function): Don't try to jump to
2597 return_label unless it exists.
2599 In partial ordering for a call, ignore parms for which we don't have
2601 * call.c (joust): Pass len to more_specialized.
2602 (add_template_candidate_real): Strip 'this', pass len.
2603 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
2604 (get_bindings_order): New fn. Pass len down.
2605 (get_bindings_real): Strip 'this', pass len.
2606 (fn_type_unification): Likewise.
2607 (type_unification_real): Succeed after checking 'len' args.
2608 (most_specialized_instantiation): Lose explicit_args parm.
2609 * class.c (resolve_address_of_overloaded_function): Strip 'this',
2612 2000-12-21 Jason Merrill <jason@redhat.com>
2614 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
2615 DECL_TEMPLATE_RESULT.
2617 * search.c (lookup_field_r): Call lookup_fnfields_1, not
2618 lookup_fnfields_here.
2620 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
2622 * call.c (build_object_call): Also allow conversions that return
2623 reference to pointer to function.
2624 (add_conv_candidate): Handle totype being ref to ptr to fn.
2625 (build_field_call): Also allow members of type reference to function.
2626 Lose support for calling pointer to METHOD_TYPE fields.
2628 * error.c (dump_expr): Handle *_CAST_EXPR.
2630 * typeck2.c (build_scoped_ref): Always convert to the naming class.
2632 * tree.c (break_out_cleanups): Lose.
2633 * cp-tree.h: Remove prototype.
2634 * typeck.c (build_component_ref): Don't break_out_cleanups.
2635 (build_compound_expr): Likewise.
2636 * semantics.c (finish_expr_stmt): Likewise.
2638 2000-12-20 Richard Henderson <rth@redhat.com>
2640 * cp-tree.h: Update declarations.
2641 * decl.c (finish_case_label): Return the new stmt node.
2642 * semantics.c (finish_goto_stmt): Likewise.
2643 (finish_expr_stmt, finish_return_stmt): Likewise.
2644 (finish_break_stmt, finish_continue_stmt): Likewise.
2645 (finish_asm_stmt): Likewise.
2646 * parse.y (already_scoped_stmt): Set STMT_LINENO.
2647 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
2648 (simple_if, simple_stmt): Return the new stmt node.
2651 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
2653 * cp-tree.h: Don't declare warn_long_long.
2655 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2657 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
2660 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2662 * pt.c (unify): Handle when both ARG and PARM are
2663 BOUND_TEMPLATE_TEMPLATE_PARM.
2665 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2667 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
2668 DECL_TEMPLATE_PARM_P.
2670 2000-12-15 Jason Merrill <jason@redhat.com>
2672 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
2674 * init.c (build_new_1): Don't strip quals from type.
2676 * decl.c (pushdecl): Don't check for linkage on a non-decl.
2678 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
2680 * call.c (build_new_function_call): Lose space before paren in
2682 (build_new_method_call): Likewise.
2684 * typeck2.c (build_m_component_ref): Propagate quals from datum.
2686 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2688 * pt.c (check_explicit_specialization): Propagate default
2689 function arguments to explicit specializations.
2691 2000-12-13 DJ Delorie <dj@redhat.com>
2693 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
2696 2000-12-08 Jason Merrill <jason@redhat.com>
2698 * error.c (dump_function_name): Don't let the user see __comp_ctor.
2700 Clean up copy-initialization in overloading code.
2701 * call.c (build_user_type_conversion_1): Die if we are asked to
2702 convert to the same or a base type.
2703 (implicit_conversion): Avoid doing so. Lose reference binding code.
2704 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
2705 direct-initialization. Also do direct-init part of copy-init.
2706 (build_user_type_conversion): Don't provide context to convert_like.
2707 * cvt.c (ocp_convert): build_user_type_conversion will now provide
2708 the constructor call for copy-init.
2710 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
2711 instantiation of a member template.
2712 (do_decl_instantiation): Not here.
2714 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
2716 * class.c (check_field_decls): Don't special case anonymous
2717 fields in error messages.
2718 (note_name_declared_in_class): Use %D on diagnostic.
2720 * tree.c (pod_type_p): Use strip_array_types.
2721 (cp_valid_lang_attribute): Likewise.
2722 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
2723 multiple evaluations.
2724 (cp_has_mutable_p): Use strip_array_types.
2726 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
2728 * cp-tree.h (sufficient_parms_p): Declare new function.
2729 * call.c (sufficient_parms_p): New function, broken out of ...
2730 (add_function_candidate): ... here. Use it.
2731 (add_conv_candidate): Use it.
2732 * decl.c (grok_ctor_properties): Use it.
2734 2000-12-07 Jakub Jelinek <jakub@redhat.com>
2736 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
2738 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
2740 * decl2.c (lang_decode_option): Handle -Wformat-security.
2742 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2744 * pt.c (verify_class_unification): New function.
2745 (get_class_bindings): Use it.
2746 (try_class_unification): Tidy.
2747 (unify): Handle when argument of a template-id is not
2748 template parameter dependent.
2749 (template_args_equal): Handle when TREE_CODE's do not match.
2751 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
2753 * lang-specs.h (c++): When invoking the stand-alone preprocessor
2754 for -save-temps, pass all relevant -Defines to it, and then don't
2755 pass them to cc1plus.
2757 2000-12-05 Will Cohen <wcohen@redhat.com>
2759 * decl.c (finish_case_label): Cleared
2760 more_cleanups_ok in surrounding function scopes.
2761 (define_label): Likewise.
2763 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
2765 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
2766 (get_matching_virtual): Remove.
2767 (look_for_overrides): Declare new function.
2768 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
2770 * class.c (check_for_override): Move base class iteration code
2771 to look_for_overrides.
2772 * search.c (next_baselink): Remove.
2773 (get_virtuals_named_this): Remove.
2774 (get_virtual_destructor): Remove.
2775 (tree_has_any_destructors_p): Remove.
2776 (struct gvnt_info): Remove.
2777 (check_final_overrider): Remove `virtual' from error messages.
2778 (get_matching_virtuals): Remove. Move functionality to ...
2779 (look_for_overrides): ... here, and ...
2780 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
2783 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
2785 * typeck.c (get_delta_difference): If via a virtual base,
2787 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
2790 2000-12-04 Richard Henderson <rth@redhat.com>
2792 * error.c (dump_tree): Use output_add_string not OB_PUTS.
2794 2000-12-04 Jason Merrill <jason@redhat.com>
2796 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
2797 (write_builtin_type): Pass intSI_type_node and the like through
2799 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
2800 Pass intSI_type_node and the like through type_for_mode.
2801 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
2802 * pt.c (tsubst, unify): Likewise.
2803 * tree.c (walk_tree): Likewise.
2804 * error.c (dump_type): Likewise.
2805 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
2807 * Make-lang.in: Tweak top comment for emacs.
2810 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
2812 * class.c (clone_function_decl): Robustify.
2814 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
2816 * decl.c (store_bindings): Only search in the non modified
2817 old_bindings for duplicates.
2819 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
2821 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
2824 * typeck.c (build_static_cast): Remove unused variable.
2826 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2828 * pt.c: Fix typo in comment.
2830 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
2832 * decl2.c (warn_format): Remove definition.
2833 (lang_decode_option): Handle -Wformat-nonliteral,
2834 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
2836 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
2838 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
2839 (init_decl_processing): Don't create string_type_node,
2840 const_string_type_node, wint_type_node, intmax_type_node,
2841 uintmax_type_node, default_function_type, ptrdiff_type_node and
2842 unsigned_ptrdiff_type_node. Adjust position of call to
2843 c_common_nodes_and_builtins.
2844 (identifier_global_value): New function.
2846 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
2848 * call.c (standard_conversion): Reject pointer to member
2849 conversions from ambiguous, inaccessible or virtual bases.
2850 * typeck.c (build_static_cast): Don't check pointers to members
2853 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
2855 * method.c (do_build_copy_constructor): Preserve cv
2856 qualifications when accessing source object members.
2857 (do_build_assign_ref): Likewise. Remove separate diagnostics for
2860 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
2862 * method.c (do_build_assign_ref): Construct appropriately
2863 CV-qualified base reference. Don't allow const casts in base
2866 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
2868 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
2869 incomplete return type.
2871 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2873 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
2874 * semantics.c (finish_base_specifier): Accept a _TYPE not a
2877 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2879 * spew.c (yyerror): Cope if yylval.ttype is NULL.
2881 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2883 * decl.c (grokdeclarator): Diagnose undefined template contexts.
2885 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2887 * decl.c (grokdeclarator): Do type access control on friend
2890 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
2892 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
2893 bison parser ickiness.
2894 * pt.c (tsubst_friend_function): Enter namespace scope when
2895 tsubsting the function name.
2896 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
2898 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
2900 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
2901 * cvt.c (cp_convert_to_pointer): Add force parameter.
2902 Allow conversions via virtual base if forced.
2903 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
2904 (ocp_convert): Likewise.
2905 * search.c (binfo_from_vbase): Return the virtual base's binfo.
2906 * typeck.c (get_delta_difference): Adjust handling of virtual
2909 2000-11-26 Mark Mitchell <mark@codesourcery.com>
2911 * tree.c (struct list_hash): Remove.
2912 (list_hash_table): Make it be an htab.
2913 (struct list_proxy): New type.
2914 (list_hash_eq): New function.
2915 (list_hash_pieces): Renamed from ...
2916 (list_hash): ... this.
2917 (list_hash_lookup): Remove.
2918 (list_hash_add): Remove.
2919 (hash_tree_cons): Use the generic hashtable.
2920 (mark_list_hash): Remove.
2921 (init_tree): Create the hashtable.
2923 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
2925 * method.c (build_mangled_C9x_name): Rename to
2926 build_mangled_C99_name. Change C9X references in comments to
2929 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
2931 * parse.y (unary_expr): Move VA_ARG from here ...
2932 (primary): ... to here.
2934 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
2936 * semantics.c (finish_id_expr): If type is error_mark, return
2939 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
2941 * pt.c (lookup_template_class): Simplify loop exit constructs.
2942 Cope when there is no partial instantiation of a template
2945 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
2947 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
2949 2000-11-22 Mark Mitchell <mark@codesourcery.com>
2951 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
2954 * pt.c (do_decl_instantiate): Explicitly clone constructors and
2955 destructors that haven't already been cloned.
2957 2000-11-20 Richard Henderson <rth@redhat.com>
2959 * parse.y (yyparse_1): Rename the parser entry point.
2961 2000-11-20 Alex Samuel <samuel@codesourcery.com>
2963 * mangle.c (write_name): Use <unscoped-name> for names directly in
2965 (write_unscoped_name): Accept names directly in function scope.
2967 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
2969 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
2970 * parse.y (extdef): Add EXPORT reduction.
2971 * spew.c (yylex): Don't skip export here.
2973 2000-11-19 Mark Mitchell <mark@codesourcery.com>
2975 * decl.c (init_decl_processing): Correct name of pure virtual
2976 function under the new ABI.
2977 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
2978 (throw_bad_typeid): Likewise for bad typeid function.
2980 2000-11-18 Mark Mitchell <mark@codesourcery.com>
2982 * decl.c (grokparms): Don't even function types of `void' type,
2984 * mangle.c (write_type): Don't crash when confronted with the
2987 * decl.c (grokparms): Don't create parameters of `void' type.
2989 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
2991 * lex.c (mark_impl_file_chain): Delete.
2992 (init_parse): Remove call to ggc_add_string_root. No need to
2993 ggc_strdup a string constant. Do not add impl_file_chain to GC
2995 (handle_pragma_implementation): No need to ggc_strdup main_filename.
2997 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
2999 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
3001 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3003 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
3004 * decl.c (grokdeclarator): Don't reject void parms here.
3005 (require_complete_types_for_parms): Simplify, use
3006 complete_type_or_else.
3007 (grokparms): Remove bitrot. Remove funcdef parm.
3008 Deal with ellipsis parm lists here.
3009 * semantics.c (finish_parmlist): Don't append void_list_node
3010 here. Set PARMLIST_ELLIPSIS_P.
3012 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3014 * typeck2.c (incomplete_type_error): Reorganise to avoid
3015 excessive diagnostics.
3017 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
3019 * lex.c (struct impl_files, internal_filename): Constify a char *.
3021 2000-11-16 Mark Mitchell <mark@codesourcery.com>
3023 * mangle.c (write_special_name_constructor): Don't generate
3024 assembler junk when confronted with an old-style constructor.
3025 (write_special_name_destructor): Likewise.
3026 (mangle_decl_string): Do it here instead.
3028 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
3030 * call.c (op_error): Make error messages clearer.
3032 2000-11-15 Mark Mitchell <mark@codesourcery.com>
3034 * decl.c (wrapup_globals_for_namespace): Don't mark things
3035 TREE_ASM_WRITTEN when they're not.
3037 2000-11-15 Jason Merrill <jason@redhat.com>
3039 * typeck2.c (friendly_abort): Uncount the error before handing
3042 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
3044 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
3046 2000-11-14 Mark Mitchell <mark@codesourcery.com>
3048 * class.c (build_vtbl_initializer): Fix typo in comment.
3049 * typeck.c (expr_sizeof): Don't crash on errors.
3051 2000-11-14 Jim Wilson <wilson@redhat.com>
3053 * lang-specs.h: Add %2 after %(cc1_options).
3055 2000-11-14 Richard Henderson <rth@redhat.com>
3057 * typeck.c (c_sizeof): Be strict about casting result value
3058 back to c_size_type_node.
3059 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
3061 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
3063 * typeck.c (build_unary_op): Use boolean_increment from
3064 c-common.c, moving the relevant code there.
3066 2000-11-11 Jason Merrill <jason@redhat.com>
3068 * typeck.c (mark_addressable): Don't call put_var_into_stack.
3070 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
3073 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3075 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
3076 * lex.c (copy_lang_decl): Likewise.
3078 2000-11-09 Mark Mitchell <mark@codesourcery.com>
3080 * dump.c (cp_dump_tree): Don't dump function bodies here.
3082 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3083 (dump.o): Update dependency list.
3084 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
3085 (flag_dump_translation_unit): Likewise.
3086 (CP_TYPE_QUALS): Adjust definition.
3087 (DECL_C_BIT_FIELD): Remove.
3088 (SET_DECL_C_BIT_FIELD): Likewise.
3089 (CLEAR_DECL_C_BIT_FIELD): Likewise.
3090 (add_maybe_template): Likewise.
3091 (strip_array_types): Likewise.
3092 (dump_node_to_file): Likewise.
3093 (cp_dump_tree): New function.
3094 * decl.c (init_decl_processing): Set lang_dump_tree.
3095 * decl2.c (flag_dump_translation_unit): Remove.
3096 * dump.c: Move most of it to ../c-dump.c.
3097 (cp_dump_tree): New function.
3098 * pt.c (add_maybe_template): Remove.
3099 * typeck.c (strip_array_types): Likewise.
3101 2000-11-07 Eric Christopher <echristo@redhat.com>
3103 * decl.c (init_decl_processing): Change definition of
3104 __wchar_t to wchar_t. Remove artificial declaration of
3106 * lex.c: Change instances of __wchar_t to wchar_t.
3108 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
3110 * lex.c (do_identifier): Don't lookup_name for operators.
3111 * parse.y (operator): Save looking_for_typename.
3112 (unoperator): Restore it.
3113 * spew.c (frob_opname): Use nth_token for lookahead.
3115 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
3117 * decl.c (grok_op_properties): Always use coerce_new_type and
3119 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
3120 exception specification. Tidy up.
3121 (coerce_delete_type): Preserve exception specification. Tidy up.
3123 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
3125 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
3126 (push_binding_level), error.c (cp_tree_printer), pt.c
3127 (process_partial_specialization, tsubst_template_arg_vector),
3128 search.c (lookup_member): Use memset () instead of bzero ().
3130 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
3132 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
3134 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
3136 * Make-lang.in (c++.distdir): Remove.
3138 2000-11-04 Mark Mitchell <mark@codesourcery.com>
3140 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
3141 declarations from different namespaces to be combined.
3143 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
3145 * decl.c: Include tm_p.h.
3147 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
3149 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
3151 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
3153 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
3154 (build_overload_value), repo.c (open_repo_file), xref.c
3155 (open_xref_file): Use strchr () and strrchr () instead of index ()
3158 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
3160 * call.c (build_over_call): Call fold on the CALL_EXPR.
3162 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
3164 * error.c (dump_template_decl): Separate template hearders with
3167 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
3169 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
3170 TS_* flags with corresponding TFF_*. Adjust prototypes of
3171 functions (which used to take a tree_string_flags) to take an int.
3173 * cp-tree.h (enum tree_string_flags): Remove
3174 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
3175 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
3176 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3177 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3178 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
3179 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
3180 (type_as_string, decl_as_string, expr_as_string,
3181 context_as_string): Adjust prototype.
3183 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
3184 instead of TS_PLAIN.
3186 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
3187 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
3190 2000-10-30 Mark Mitchell <mark@codesourcery.com>
3192 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
3193 (linkage_kind): New enumeration.
3194 (decl_linkage): New function.
3195 * decl2.c (comdat_linkage): Extend comment.
3196 * error.c (dump_function_decl): Print the arguments used to
3197 instantiate a template, even when not printing the type of the
3199 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
3200 not TREE_PUBLIC, to test for external linkage.
3201 * tree.c (decl_linkage): New function.
3203 2000-10-28 Mark Mitchell <mark@codesourcery.com>
3205 * pt.c (instantiate_decl): Always instantiate static data members
3206 initialized in-class.
3208 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
3210 * Make-lang.in: Move all build rules here from Makefile.in,
3211 adapt to new context. Wrap all rules that change the current
3212 directory in parentheses. Expunge all references to $(P).
3213 When one command depends on another and they're run all at
3214 once, use && to separate them, not ;. Add OUTPUT_OPTION to
3215 all object-file generation rules. Delete obsolete variables.
3217 * Makefile.in: Delete.
3218 * config-lang.in: Delete outputs= line.
3220 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
3222 * error.c (dump_function_decl): Print no space between
3223 `ptr-operator' the `type-specifier' of the return type.
3224 (dump_type_prefix): Make sure we put space at the appropriate
3227 2000-10-23 Jason Merrill <jason@redhat.com>
3229 * call.c (equal_functions): Also call decls_match for extern "C" fns.
3231 2000-10-22 Jason Merrill <jason@redhat.com>
3233 * call.c (build_conditional_expr): Use ocp_convert to force
3236 2000-10-22 Mark Mitchell <mark@codesourcery.com>
3238 * call.c (standard_conversion): Use RVALUE_CONVs for all
3239 expressions that satisfy lvalue_p, not just those that satisfy
3242 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
3244 * typeck.c (c_sizeof): Return an expression of `size_t' type,
3245 not one with TYPE_IS_SIZETYPE set.
3246 (dubious_conversion_warnings): Remove special-case code.
3248 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
3250 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
3251 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
3252 (dump_type_prefix): Print vector-of-int as 'int vector'.
3253 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
3254 * tree.c (walk_tree): Handle VECTOR_TYPE.
3256 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
3258 2000-10-21 Jason Merrill <jason@redhat.com>
3260 * parse.y (operator): Set got_object from got_scope.
3261 Set looking_for_typename.
3262 * decl.c (lookup_name_real): Clear val after setting from_obj.
3263 Reorganize diagnostic.
3265 2000-10-20 Jason Merrill <jason@redhat.com>
3267 * tree.c (walk_tree): Don't walk into default args.
3269 * error.c (dump_expr): Use host_integerp.
3271 2000-10-20 David Edelsohn <edelsohn@gnu.org>
3273 * typeck2.c (abstract_virtuals_error): Use "because" instead of
3274 "since" in error message.
3276 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3278 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
3280 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
3282 * decl.c (revert_static_member_fn): Fixed typo.
3284 2000-10-19 Mark Mitchell <mark@codesourcery.com>
3286 * class.c (subobject_offset_fn): New type.
3287 (dfs_record_base_offsets): Remove.
3288 (record_base_offsets): Likewise.
3289 (dfs_search_base_offsets): Likewise.
3290 (record_subobject_offset): New function.
3291 (check_subobject_offset): Likewise.
3292 (walk_subobject_offsets): Likewise.
3293 (record_subobject_offsets): Likewise.
3294 (layout_conflict_p): Reimplement.
3295 (layout_nonempty_base_or_field): Correct handling of type
3296 conflicts during layout.
3297 (layout_empty_base): Likewise.
3298 (build_base_field): Adjust to handle new representation of empty
3300 (build_base_fields): Likewise.
3301 (layout_virtual_bases): Likewise.
3302 (splay_tree_compare_integer_csts): New function.
3303 (layout_class_type): Use a splay_tree, rather than a varray, to
3304 represent the offsets of empty bases.
3306 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
3307 * decl.c (select_decl): Don't return declarations that are
3310 2000-10-18 Mark Mitchell <mark@codesourcery.com>
3312 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
3313 (fake_std_node): New macro.
3314 * decl.c (in_std): Rename to ...
3315 (in_fake_std): ... this.
3316 (flag_no_builtin): Remove.
3317 (flag_no_nonansi_builtin): Likewise.
3318 (walk_namespaces_r): Use fake_std_node.
3319 (push_namespace): Use std_identifier.
3320 (pop_namespace): Use in_fake_std.
3321 (lookup_name_real): Use fake_std_node.
3322 (init_decl_processing): When -fhonor-std, create the `std'
3323 namespace. Don't create a dummy fake_std_node in that case.
3324 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
3325 (builtin_function): Put builtins whose names don't begin
3326 with `_' in the std namespace.
3327 * decl2.c (flag_no_builtin): Remove.
3328 (flag_no_nonansi_builtin): Likewise.
3329 (set_decl_namespace): Use fake_std_node.
3330 (validate_nonmember_using_decl): Likewise.
3331 (do_using_directive): Likewise.
3332 (handle_class_head): Likewise.
3333 * dump.c (dequeue_and_dump): Likewise.
3334 * except.c (init_exception_processing): Use std_identifier.
3335 * init.c (build_member_call): Use fake_std_node.
3336 * rtti.c (init_rtti_processing): Use std_identifier.
3338 2000-10-17 Mark Mitchell <mark@codesourcery.com>
3340 * cp-tree.h (back_end_hook): Remove declaration.
3341 * decl2.c (back_end_hook): Remove definition.
3343 * dump.c (dequeue_and_dump): Dump TREE_USED.
3345 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
3347 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
3349 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
3351 * decl.c (WINT_TYPE): Define.
3352 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
3353 c_size_type_node, signed_size_type_node and wint_type_node.
3355 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
3357 * decl2.c (warn_missing_format_attribute): New variable.
3358 (lang_decode_option): Decode -Wmissing-format-attribute.
3360 2000-10-16 Mark Mitchell <mark@codesourcery.com>
3362 * typeck.c (qualify_type): Remove.
3363 (composite_pointer_type): Fix handling of conversions to `cv void*'.
3365 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3367 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
3369 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3371 * Makefile.in (parse.c, parse.h): Create atomically.
3373 2000-10-12 Mark Mitchell <mark@codesourcery.com>
3375 * class.c (current_obstack): Remove.
3376 * decl.c (ggc_p): Remove.
3377 (start_decl): Don't use decl_tree_cons.
3378 (grokdeclarator): Don't use build_decl_list.
3379 (start_function): Don't use decl_tree_cons.
3380 (finish_function): Don't mess with obstacks.
3381 * decl2.c (grok_x_components): Don't use build_decl_list.
3382 * lex.c (make_call_declarator): Don't call decl_tree_cons.
3383 (implicitly_declare_fn): Don't call build_decl_list.
3384 * parse.y (frob_specs): Don't call build_decl_list or
3386 (expr_or_declarator_intern): Don't call decl_tree_cons.
3387 (primary): Don't call build_decl_list.
3388 (fcast_or_absdcl): Likewise.
3389 (typed_declspecs): Don't call decl_tree_cons.
3390 (reserved_declspecs): Don't call build_decl_list.
3391 (declmods): Likewise.
3392 (reserved_typespecquals): Likewise.
3394 (new_type_id): Likewise.
3395 (cv_qualifiers): Likewise.
3396 (after_type_declarator_intern): Likewise.
3397 (notype_declarator_intern): Likewise.
3398 (absdcl_intern): Likewise.
3399 (named_parm): Likewise.
3400 * pt.c (most_specialized_class): Likewise.
3401 * repo.c (temporary_obstack): Make it a structure, not a pointer.
3402 (init_repo): Initialize it.
3403 * search.c (current_obstack): Remove.
3404 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
3406 2000-10-09 Richard Henderson <rth@cygnus.com>
3408 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
3409 (c++ language support bits for libgcc): Remove.
3410 (c++.clean): Remove cplib2.txt cleanup.
3411 * config-lang.in (headers, lib2funcs): Remove.
3413 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
3414 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
3415 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
3416 * inc/new.h, inc/typeinfo: Remove files.
3418 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
3420 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
3422 (init_decl_processing): Initialize intmax_type_node and
3425 2000-10-06 Richard Henderson <rth@cygnus.com>
3427 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
3428 (original_result_rtx): Remove.
3429 * decl.c (save_function_data): Don't clear x_result_rtx.
3430 (mark_lang_function): Don't mark it either.
3431 * expr.c (fixup_result_decl): Remove.
3432 * semantics.c (genrtl_named_return_value): Frob the return decl
3433 before calling emit_local_var.
3434 (genrtl_finish_function): Don't call fixup_result_decl.
3435 Always emit the jump to return_label.
3437 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
3439 * pt.c (lookup_template_class): Set current access for enum.
3440 (tsubst_enum): Set file & line for enum decl.
3442 * spew.c (yylex): Remove unused variable.
3444 2000-10-05 Richard Henderson <rth@cygnus.com>
3446 * semantics.c (genrtl_finish_function): Don't init or check
3447 can_reach_end; remove noreturn and return value checks.
3449 2000-10-05 Tom Tromey <tromey@cygnus.com>
3451 * init.c (build_java_class_ref): Use `build_static_name' with a
3452 suffix, not a prefix, to build the class object's name.
3454 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3456 * cp-tree.h (access_kind): Fix comment typo.
3457 * decl2.c (grokfield): Fix diagnostic typo.
3458 * semantics.c (finish_template_type): Fix comment typo.
3459 (finish_qualified_object_call_expr): Likewise.
3461 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3463 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
3466 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3468 * spew.c (frob_id): New static function.
3469 (frob_opname): Use it.
3472 2000-10-01 Mark Mitchell <mark@codesourcery.com>
3474 * decl.c (lang_mark_false_label_stack): Remove.
3475 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
3477 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
3479 * gxxint.texi: Use @email for formatting email addresses.
3481 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
3483 * error.c: Remove direct obstack manipulation. Replace with
3484 output_buffer-based formatting. Adjust calls to removed macros.
3485 (obstack_chunk_alloc, obstack_chunk_free): Remove.
3486 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
3487 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
3489 2000-09-24 Mark Mitchell <mark@codesourcery.com>
3491 * ir.texi: Move to ../c-tree.texi.
3493 2000-09-20 Jason Merrill <jason@redhat.com>
3495 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
3497 2000-09-21 Andreas Jaeger <aj@suse.de>
3499 * errfn.c: Move declaration of cp_printer and cp_printers to ...
3500 * cp-tree.h: ... here.
3502 * error.c: Remove declaration of cp_printer.
3504 2000-09-20 Mark Mitchell <mark@codesourcery.com>
3506 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
3508 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
3510 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
3513 2000-09-18 Mark Mitchell <mark@codesourcery.com>
3515 * decl.c (start_function): Robustify.
3517 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3519 * cp-tree.h (check_function_format): Accept a `status' parameter.
3521 * call.c, typeck.c: Updates calls to `check_function_format'.
3523 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
3525 * decl2.c (handle_class_head): Always push some scope even
3528 2000-09-16 Mark Mitchell <mark@codesourcery.com>
3530 * cp-tree.h (struct cp_language_function): Remove
3531 x_scope_stmt_stack and name_declared.
3532 (current_scope_stmt_stack): Remove.
3533 (function_name_declared_p): New macro.
3534 (struct lang_decl_flags): Use c_lang_decl as a base class.
3536 (struct lang_decl): Replace saved_tree with context.
3537 (DECL_FRIEND_CONTEXT): Adjust accordingly.
3538 (SET_DECL_FRIEND_CONTEXT): Likewise.
3539 (DECL_VIRTUAL_CONTEXT): Likewise.
3540 (DECL_SAVED_TREE): Remove.
3541 (C_DECLARED_LABEL_FLAG): Likewise.
3542 (cplus_expand_expr_stmt): Don't declare.
3543 (add_decl_stmt): Likewise.
3544 (add_scope_stmt): Likewise.
3545 * decl.c (mark_stmt_tree): Remove.
3546 (case_compare): Likewise.
3547 (finish_case_label): Use c_add_case_label.
3548 (init_decl_processing): Set more language-specific hooks.
3549 (build_enumerator): Fix typo in comment.
3550 (cplus_expand_expr_stmt): Remove.
3551 (mark_lang_function): Use mark_c_language_function.
3552 (lang_mark_tree): Use c_mark_lang_decl.
3553 * decl2.c: Change order of inclusion.
3554 * except.c: Likewise.
3555 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
3556 back on c_expand_expr.
3557 * friend.c: Include expr.h.
3558 * init.c: Change order of inclusion.
3559 * Makefile.in: Update dependencies.
3560 * lex.h (free_lang_decl_chain): Remove.
3561 * optimize.c (maybe_clone_body): Use function_name_declared_p.
3562 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
3564 (instantiate_decl): Use function_name_declared_p.
3565 * semantics.c (lang_expand_expr_stmt): Remove.
3566 (set_current_function_name_declared): Likewise.
3567 (current_function_name_declared): Likewise.
3568 (begin_compound_stmt): Use function_name_declared_p.
3569 (add_decl_stmt): Remove.
3570 (setup_vtbl_ptr): Use function_name_declared_p.
3571 (add_scope_stmt): Remove.
3572 (current_scope_stmt_stack): New function.
3573 (cp_expand_stmt): Don't handle SCOPE_STMTs.
3574 (expand_body): Use function_name_declared_p.
3575 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
3576 * typeck.c: Change order of includes.
3577 (convert_sequence): Remove.
3579 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
3581 * lex.c (reswords): Add _Complex.
3583 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3585 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
3587 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
3589 * init.c (begin_init_stmts): Don't use // comments.
3591 2000-09-12 Jason Merrill <jason@redhat.com>
3593 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
3594 all non-extern arrays.
3596 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
3597 typenames, too. Downgrade complaint to pedwarn.
3598 (xref_tag): Warn about surprising behavior of 'friend struct T'.
3599 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
3600 'class This::Inherited'.
3602 2000-09-12 Mark Mitchell <mark@codesourcery.com>
3604 * decl.c (finish_case_label): Given the LABEL_DECL a
3607 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
3609 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
3610 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
3611 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3612 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3613 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
3615 (sorry_for_unsupported_tree, print_scope_operator,
3616 print_left_paren, print_right_paren, print_left_bracket,
3617 print_right_bracket, print_whitespace): Likewise.
3618 (aggr_variety): Rename to class_key_or_enum.
3619 (print_type): Rename to print_type_id.
3620 (print_type_specifier_seq, print_simple_type_specifier,
3621 print_elaborated_type_specifier,
3622 print_rest_of_abstract_declarator,
3623 print_parameter_declaration_clause, print_exception_specification,
3624 print_nested_name_specifier, print_template_id,
3625 typedef_original_name, print_template_argument_list_start,
3626 print_template_argument_list_end): New functions.
3628 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
3630 * ir.texi: Add more documentation.
3632 2000-09-11 Mark Mitchell <mark@codesourcery.com>
3634 * cp-tree.h (struct saved_scope): Remove x_function_parms.
3635 (current_function_parms): Don't define.
3636 (struct cp_language_function): Remove parms_stored.
3637 (current_function_just_assigned_this): Don't define.
3638 (current_function_parms_stored): Likewise.
3639 (static_ctors): Declare.
3640 (static_dtors): Likewise.
3641 (SF_EXPAND): Don't define.
3642 (expand_start_early_try_stmts): Remove declaration.
3643 (store_parm_decls): Likewise.
3644 * decl.c (static_ctors): Don't declare.
3645 (static_dtors): Likewise.
3646 (struct binding_level): Remove this_block.
3647 (poplevel): Remove dead code.
3648 (set_block): Likewise.
3649 (mark_binding_level): Don't mark this_block.
3650 (mark_saved_scope): Don't mark x_function_parms.
3651 (init_decl_processing): Don't add current_function_parms as a GC
3653 (check_function_type): Change prototype.
3654 (start_function): Remove RTL-generation code.
3655 (expand_start_early_try_stmts): Remove.
3656 (store_parm_decls): Give it internal linkage. Remove
3657 RTL-generation code.
3658 (finish_function): Remove RTL-generation code.
3659 * decl2.c (static_ctors): Fix formatting.
3660 (static_dtors): Likewise.
3661 * method.c (use_thunk): Don't call store_parm_decls.
3662 (synthesize_method): Likewise.
3663 * optimize.c (maybe_clone_body): Likewise.
3664 * parse.y (fn.def2): Likewise.
3665 (.set_base_init): Likewise.
3666 (nodecls): Likewise.
3667 * pt.c (instantiate_decl): Likewise.
3668 * rtti.c (synthesize_tinfo_fn): Likewise.
3669 * semantics.c (genrtl_try_block): Simplify.
3670 (expand_body): Use genrtl_start_function and
3671 genrtl_finish_function.
3672 (genrtl_start_function): New function.
3673 (genrtl_finish_function): Likewise.
3675 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
3677 * error.c (cp_tree_printer, case 'P'): Append break.
3679 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
3681 * cp-tree.h (frob_opname): Declare.
3682 * parse.y (saved_scopes): New static variable.
3683 (cp_parse_init): Adjust.
3684 (do_id): If lastiddecl is NULL, do do_identifier.
3685 (operator): Save scope information.
3686 (unoperator): New reduction. Restore scope information.
3687 (operator_name): Append unoperator. Call frob_opname.
3688 * spew.c (frob_opname): Define.
3690 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
3692 * decl.c, rtti.c: Include defaults.h if not already included.
3693 Don't define the *_TYPE_SIZE macros.
3695 2000-09-09 Mark Mitchell <mark@codesourcery.com>
3697 * cp-tree.h (push_switch): Change prototype.
3698 (check_cp_case_value): Remove declaration.
3699 (decl_constant_value): Likewise.
3700 * decl.c (struct cp_switch): Add switch_stmt and cases.
3701 (case_compare): New function.
3702 (push_switch): Set switch_stmt. Initialize cases.
3703 (pop_switch): Clean up cases.
3704 (define_case_label): Rename to ...
3705 (finish_case_label): ... this. Do semantic analysis for case
3707 (start_function): Correct comment.
3708 * decl2.c (check_cp_case_value): Remove.
3709 * expr.c (do_case): Remove.
3710 * pt.c (tsubst_expr): Adjust call to finish_case_label.
3711 * semantics.c (genrtl_do_poplevel): Remove declaration.
3712 (RECHAIN_STMTS): Remove.
3713 (finish_break_stmt): Use build_break_stmt.
3714 (finish_continue_stmt): Use build_continue_stmt.
3715 (finish_switch_cond): Adjust condition here, rater than in
3716 c_expand_start_case.
3717 (finish_case_label): Remove.
3718 * typeck.c (c_expand_return): Remove.
3719 (c_expand_start_case): Likewise.
3721 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
3723 * ir.texi: Document type nodes.
3725 2000-09-06 Mark Mitchell <mark@codesourcery.com>
3727 * cp-tree.h (init_cp_semantics): Declare.
3728 (genrtl_try_block): Don't declare.
3729 (genrtl_handler): Likewise.
3730 (genrtl_catch_block): Likewise.
3731 (genrtl_ctor_stmt): Likewise.
3732 (genrtl_subobject): Likewise.
3733 (genrtl_do_poplevel): Likewise.
3734 (genrtl_named_return_value): Likewise.
3735 * lex.c (init_parse): Call init_cp_semantics.
3736 * semantics.c (genrtl_try_block): Give it internal linkage.
3737 (genrtl_handler): Likewise.
3738 (genrtl_catch_block): Likewise.
3739 (genrtl_ctor_stmt): Likewise.
3740 (genrtl_subobject): Likewise.
3741 (genrtl_do_poplevel): Likewise.
3742 (genrtl_named_return_value): Likewise.
3743 (lang_expand_stmt): Rename to ...
3744 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
3745 (init_cp_semantics): Define.
3747 * decl.c (initialize_local_var): Remove RTL-generating code.
3748 * semantics.c (genrtl_try_block): Fix formatting.
3750 Move statement-tree facilities from C++ to C front-end.
3751 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
3752 (void_zero_node): Remove.
3753 (stmt_tree): Likewise.
3754 (scope_chain): Adjust.
3755 (language_function): Rename to cp_language_function.
3756 (cp_function_chain): Adjust.
3757 (current_stmt_tree): Remove.
3758 (last_tree): Likewise.
3759 (last_expr_type): Likewise.
3760 (struct lang_decl): Adjust.
3761 (STMT_IS_FULL_EXPR_P): Remove.
3763 (begin_stmt_tree): Likewise.
3764 (finish_stmt_tree): Likewise.
3765 (walk_tree_fn): Likewise.
3766 (walk_stmt_tree): Likewise.
3767 * class.c (finish_struct): Replace use of add_tree with add_stmt.
3768 * decl.c (mark_stmt_tree): Adjust type.
3769 (init_decl_processing): Don't build void_zero_node.
3770 (initialize_local_var): Adjust usage of current_stmt_tree.
3771 (finish_enum): Use add_stmt, not add_tree.
3772 (save_function_data): Adjust use of language_function.
3773 (finish_constructor_body): Use add_stmt, not add_tree.
3774 (finish_destructor_body): Likewise.
3775 (push_cp_function_context): Adjust use of language_function.
3776 (pop_cp_function_context): Likewise.
3777 (mark_lang_function): Likewise.
3778 (mark_cp_function_context): Likewise.
3779 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
3780 (build_vec_init): Likewise.
3781 * semantics.c (SET_LAST_STMT): Remove.
3782 (RECHAIN_STMTS): Don't use it.
3783 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
3784 (current_stmt_tree): Define.
3786 (finish_goto_stmt): Use add_stmt, not add_tree.
3787 (finish_expr_stmt): Likewise.
3788 (begin_if_stmt): Likewise.
3789 (finish_then_clause): Likewise.
3790 (begin_while_stmt): Likewise.
3791 (begin_do_stmt): Likewise.
3792 (finish_return_stmt): Likewise.
3793 (begin_for_stmt): Likewise.
3794 (finish_break_stmt): Likewise.
3795 (finish_continue_stmt): Likewise.
3796 (begin_switch_stmt): Likewise.
3797 (finish_case_label): Likewise.
3798 (begin_try_block): Likewise.
3799 (begin_function_try_block): Likewise.
3800 (begin_handler): Likewise.
3801 (begin_catch_block): Likewise.
3802 (begin_compound_stmt): Likewise.
3803 (begin_asm_stmt): Likewise.
3804 (finish_asm_stmt): Likewise.
3805 (finish_label_stmt): Likewise.
3806 (add_decl_stmt): Likewise.
3807 (finish_subobject): Likewise.
3808 (finish_decl_cleanup): Likewise.
3809 (finish_named_return_value): Likewise.
3810 (setup_vtbl_ptr): Likewise.
3811 (add_scope_stmt): Likewise.
3812 (finish_stmt_expr): Likewise.
3813 (prune_unused_decls): Remove.
3814 (begin_stmt_tree): Likewise.
3815 (finish_stmt_tree): Likewise.
3816 (prep_stmt): Adjust use of current_stmt_tree.
3817 (lang_expand_stmt): Likewise.
3818 * tree.c (statement_code_p): Remove.
3819 (cp_statement_code_p): New function.
3820 (walk_stmt_tree): Remove.
3821 (init_tree): Set lang_statement_code_p.
3823 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
3825 Integrated preprocessor.
3827 * Make-lang.in, Makefile.in: Remove all references to input.c,
3828 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
3829 * gxx.gperf, hash.h, input.c: Delete.
3830 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
3831 initialized properly.
3833 * class.c (fixup_pending_inline): Take a tree, not a
3834 struct pending_inline *. All callers changed.
3835 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
3836 RID_PROTECTED entries in ridpointers[] array here.
3837 * decl.c (duplicate_decls): Do not refer to struct
3839 (record_builtin_type, init_decl_processing): Use RID_MAX not
3841 (grokdeclarator): Use C_IS_RESERVED_WORD.
3842 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
3844 (grok_x_components): Do not inspect pending_inlines chain.
3846 * cp-tree.h (struct lang_identifier): Add rid_code entry.
3847 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
3848 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
3849 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
3850 TIME_IDENTIFIER_FILEINFO): Kill.
3852 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
3854 * parse.y: Call do_pending_inlines unconditionally.
3855 reinit_parse_for_method is now snarf_method. fn.defpen is no
3856 longer necessary. Remove unnecessary <itype> annotation on
3857 SCOPE. Do not refer to end_of_file or struct pending_inline.
3858 * semantics.c (begin_inline_definitions): Call
3859 do_pending_inlines unconditionally.
3861 * lex.c: Remove all code now shared with C front end.
3862 Initialize cpplib properly if USE_CPPLIB. Put reserved words
3863 into the get_identifier table. Rewrite pragma handling to
3864 work with the registry. Move code to save tokens for later
3865 processing to spew.c.
3867 * spew.c: Rewrite everything in terms of token streams instead
3868 of text. Move routines here from lex.c / input.c as
3869 appropriate. GC-mark trees hanging off the pending inlines
3872 2000-09-06 Mark Mitchell <mark@codesourcery.com>
3874 * NEWS: Mention that the named return value extension has been
3876 * cp-tree.h (original_result_rtx): Define.
3877 (TREE_REFERENCE_EXPR): Remove.
3878 (DECL_VPARENT): Likewise.
3879 (pushdecl_nonclass_level): Likewise.
3880 (store_return_init): Likewise.
3881 (reinit_lang_specific): Likewise.
3882 (genrtl_named_return_value): Change prototype.
3883 * decl.c (original_result_rtx): Remove.
3884 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
3885 Do not generate RTL for local variables here.
3886 (store_return_init): Remove.
3887 * semantics.c (genrtl_named_return_value): Simplify. Fold in
3889 (finish_named_return_value): Adjust accordingly. Warn that this
3890 extension is deprecated.
3891 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
3893 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3895 * pt.c (type_unification_real): Replace switch with if.
3896 (unify): Tsubst non-type parms before comparing.
3898 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3900 * error.c (dump_typename): New function, broken out of ...
3901 (dump_type): ... here. Use it.
3902 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
3904 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3906 * init.c (build_offset_ref): Deal with namespace scoped
3909 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3911 * class.c (resolve_address_of_overloaded_function): Add
3912 explanation message.
3913 * decl.c (define_case_label): Reformat explanation.
3914 * decl2.c (finish_static_data_member_decl): Likewise.
3915 (grokfield): Likewise.
3916 * friend.c (do_friend): Likewise.
3918 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
3920 * tree.c (walk_tree): Expose tail recursion.
3921 (walk_stmt_tree): New function.
3922 * cp-tree.h: Prototype walk_stmt_tree.
3923 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
3924 the BLOCKs directly. If a BLOCK has no variables after
3925 pruning, discard it.
3926 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
3927 restore the line number.
3929 2000-09-05 Mark Mitchell <mark@codesourcery.com>
3931 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
3932 (pt.o): Remove dependency on HTAB_H.
3933 * cp-tree.h: Include hashtab.h.
3934 (walk_tree): Change prototype.
3935 (walk_tree_without_duplicates): New function.
3936 * decl.c (check_default_argument): Use it.
3937 * optimize.c (remap_decl): Adjust calls to walk_tree.
3938 (copy_body): Likewise.
3939 (expand_calls_inline): Likewise.
3940 (calls_setjmp_p): Use walk_tree_without_duplicates.
3941 * pt.c: Don't include hashtab.h.
3942 (for_each_template_parm): Use walk_tree_without_duplicates.
3943 * semantics.c (finish-stmt_tree): Likewise.
3944 (expand_body): Likewise.
3945 * tree.c (walk_tree): Add additional parameter.
3946 (walk_tree_without_duplicates): New function.
3947 (count_trees): Use it.
3948 (verify_stmt_tree): Adjust call to walk_tree.
3949 (find_tree): Use walk_tree_without_duplicates.
3950 (no_linkage_check): Likewise.
3951 (break_out_target_exprs): Adjust call to walk_tree.
3952 (cp_unsave): Likewise.
3954 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3956 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
3957 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
3958 * cp-tree.h (TYPE_BINFO): Adjust comment.
3959 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
3960 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
3961 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
3962 (TYPE_TEMPLATE_INFO): Likewise.
3963 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
3964 * class.c (push_nested_class): Likewise.
3965 * decl.c (lookup_name_real): Likewise.
3966 (grokdeclarator): Likewise.
3967 (grok_op_properties): Likewise.
3968 (xref_tag): Likewise.
3969 (xref_basetypes): Likewise.
3970 * decl2.c (constructor_name_full): Likewise.
3971 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
3972 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
3973 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
3974 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3975 (dump_type_suffix): Likewise.
3976 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
3978 (get_aggr_from_typedef): Likewise.
3979 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
3980 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3981 (write_template_parm): Likewise.
3982 (write_template_template_parm): Check tree code instead of
3983 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3984 * method.c (build_overload_nested_name): Add
3985 BOUND_TEMPLATE_TEMPLATE_PARM.
3986 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
3987 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3988 * pt.c (convert_template_argument): Check tree code instead of
3989 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
3990 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
3991 (for_each_template_parm): Adjust comment.
3992 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
3993 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3994 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
3995 template_args_equal to compare template template parameter cases.
3996 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
3997 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
3999 * tree.c (copy_template_template_parm): Decide whether to create
4000 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
4001 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4002 (copy_tree_r): Likewise.
4003 * typeck.c (comptypes): Likewise. Check tree code instead of
4004 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4006 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
4008 * decl.c (finish_function): Move the code for handling functions
4009 marked with the constructor and destructor attributes inside the
4012 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4014 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
4016 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4018 * pt.c (lookup_template_class): Remove abort.
4019 * tree.c (get_type_decl): Allow error_mark_node.
4021 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4023 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
4026 2000-09-03 Mark Mitchell <mark@codesourcery.com>
4028 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
4031 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
4033 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
4034 union tag mismatch error reporting.
4036 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
4038 * call.c (build_scoped_method_call): Check it is not a namespace.
4040 2000-08-30 Jason Merrill <jason@redhat.com>
4042 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
4044 * tree.c (bot_manip): Check TREE_CONSTANT rather than
4045 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
4046 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
4048 * decl.c (start_function): Always call make_function_rtl.
4050 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
4052 * semantics.c (prune_unused_decls): New function.
4053 (finish_stmt_tree): Call it via walk_tree.
4055 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
4057 * class.c (build_secondary_vtable): Constify a char *.
4058 * decl.c (init_decl_processing): Initialize function_id_node,
4059 pretty_function_id_node, and func_id_node.
4060 * input.c (struct input_source): Constify 'str'.
4061 (feed_input): Constify first argument.
4062 * mangle.c (write_identifier): Constify argument.
4063 * pt.c (mangle_class_name_for_template): Constify argument.
4065 2000-08-29 Mark Mitchell <mark@codesourcery.com>
4067 * typeck.c (mark_addressable): Remove code that pokes around in
4070 2000-08-28 Jason Merrill <jason@redhat.com>
4072 * lex.c (file_name_nondirectory): Move to toplev.c.
4074 * cp-tree.h (LOCAL_CLASS_P): New macro.
4075 * class.c (finish_struct_1): Use it.
4077 2000-08-27 Alex Samuel <samuel@codesourcery.com>
4079 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
4080 (write_encoding): Pass another argument to write_name.
4081 (write_name): Add ignore_local_scope parameter. Fix handling of
4083 (write_nested_name): Use write_unqualified_name.
4084 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
4085 (write_template_prefix): Use write_unqualified_name.
4086 (write_component): Remove.
4087 (write_local_name): Add parameter. Use direct local entity to
4088 discriminator calculation.
4089 (write_class_enum_type): Pass another argument to write_name.
4090 (write_template_template_arg): Likewise.
4091 (make_guard_variable): Likewise.
4093 2000-08-27 Jason Merrill <jason@redhat.com>
4095 * decl.c (pushdecl): Matching decls for local externs are found in
4096 the current level. Propagate linkage information from previous
4099 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
4101 * ir.texi (Expressions): Fix typo.
4103 2000-08-25 Greg McGary <greg@mcgary.org>
4105 * tree.c (init_tree): Use ARRAY_SIZE.
4107 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
4109 * error.c (cp_tree_printer): Rework.
4111 2000-08-25 Mark Mitchell <mark@codesourcery.com>
4113 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
4115 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
4116 (cp-demangle.o): Remove target.
4117 (dyn-string.o): Likewise.
4119 * decl.c (grokfndecl): Require that `main' return an `int'.
4120 * mangle.c (write_encoding): Don't mangle return types for
4121 conversion functions.
4123 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
4125 * error.c (tree_formatting_info): New data type.
4126 (tree_being_formatted): New macro.
4127 (tree_formatting_flags): Likewise.
4128 (put_whitespace): Likewise.
4129 (print_tree_identifier): Likewise.
4130 (print_identifier): Likewise.
4131 (cp_tree_printer, print_function_argument_list, print_declaration,
4132 print_expression, print_function_declaration,
4133 print_function_parameter, print_type, print_cv_qualifier): New
4135 (init_error): Initialize lang_printer.
4137 2000-08-24 Jason Merrill <jason@redhat.com>
4139 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
4140 adjustment necessary.
4142 2000-08-24 Greg McGary <greg@mcgary.org>
4144 * cp-tree.h (MAIN_NAME_P): Remove macro.
4146 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
4148 * error.c (print_instantiation_context): Don't forget to flush the
4151 2000-08-23 Jason Merrill <jason@redhat.com>
4153 * typeck.c (build_ptrmemfunc): Save the input pmf.
4155 * method.c (process_modifiers): Use same_type_p.
4157 2000-08-23 Mark Mitchell <mark@codesourcery.com>
4159 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
4160 * mangle.c (write_function_type): Change prototype.
4161 (write_encoding): Don't mangle return types for
4162 constructors or destructors.
4163 (write_type): Adjust call to write_function_type.
4164 * pt.c (instantiate_template): Instantiate alternate entry points
4165 when instantiating the main function.
4167 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
4169 * error.c (cp_print_error_function): Don't use embedded '\n' in
4172 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
4174 * decl.c (init_decl_processing): Remove bogus initialization.
4175 * error.c (lang_print_error_function): Restore here.
4176 (init_error): Initialize print_error_function.
4178 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4180 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
4182 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
4184 * Makefile.in (error.o): Depends on diagnostic.h
4186 * cp-tree.h (problematic_instantiation_changed,
4187 record_last_problematic_instantiation, current_instantiation,
4188 print_instantiation_context): Declare.
4189 (maybe_print_template_context): Remove.
4191 * decl.c (init_decl_processing): Set print_error_function to NULL.
4192 (lang_print_error_function): Remove, since we're using a new
4195 * error.c: #include diagnostic.h
4196 (function_category): New function.
4197 (cp_diagnostic_starter): Likewise.
4198 (cp_diagnostic_finalizer): Likewise.
4199 (cp_print_error_function): Likewise.
4200 (maybe_print_instantiation_context): Likewise.
4201 (print_instantiation_full_context): Likewise.
4202 (print_instantiation_partial_context): Likewise.
4203 (print_instantiation_context): Define.
4204 (init_error): Initialize diagnostic pager and finalizer.
4206 * pt.c (problematic_instantiation_changed): Define.
4207 (record_last_problematic_instantiation): Likewise.
4208 (current_instantiation): Likewise.
4209 (maybe_print_template_context): Remove.
4210 (print_template_context): Likewise.
4211 (current_tinst_level): Make static to reflect Brendan Kehoe's
4212 change of 1995-04-13.
4213 (push_tinst_level): Call print_instantiation_context.
4215 2000-08-21 Nix <nix@esperi.demon.co.uk>
4217 * lang-specs.h: Do not process -o or run the assembler if
4220 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
4222 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
4224 * decl2.c (lang_decode_option): Disable gettext attributes for
4227 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
4229 * lex.c (lang_init_options): Default diagnostic message maximum
4230 length to 80, when line-wrapping.
4232 2000-08-20 Mark Mitchell <mark@codesourcery.com>
4234 * class.c (build_vtbl_initializer): Clear the entire
4235 vtbl_init_data. Start keeping track of the functions for which we
4236 have created vcall offsets here.
4237 (dfs_build_vcall_offset_vtbl_entries): Remove.
4238 (build_vcall_offset_vtbl_entries): Reimplement.
4239 (add_vcall_offset_vtbl_entries_r): New function.
4240 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
4241 computing when vcall offsets are necessary.
4243 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4245 * decl.c (member_function_or_else): Use cp_error ... %T.
4246 (grokdeclarator): Likewise.
4247 (start_method): Likewise.
4248 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
4250 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4252 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
4255 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4257 * cp-tree.h (PTRMEM_OK_P): New macro.
4258 (itf_ptrmem_ok): New enumeration value.
4259 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
4260 argument. Diagnose implicit pointer to member.
4261 (instantiate_type): Don't diagnose implicit pointer to member
4262 here. Pass itf_ptrmem_ok if ok. Adjust calls to
4263 resolve_address_of_overloaded_function.
4264 * init.c (build_offset_ref): Set PTRMEM_OK_P.
4265 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
4266 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
4267 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
4268 (build_unary_op): Deal with single non-static member in
4271 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4273 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
4275 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4277 * cp-tree.h (enum_name_string): Remove prototype.
4278 (report_case_error): Remove prototype.
4279 * cp/typeck2.c (enum_name_string): Remove.
4280 (report_case_error): Remove.
4281 * error.c (dump_expr): Deal with enum values directly.
4282 Correctly negate integer constant.
4284 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4286 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
4287 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
4288 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
4289 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
4290 (__cxa_vec_new): Use __cxa_vec_new2.
4291 (__cxa_vec_delete): Use __cxa_vec_delete2.
4293 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4295 * vec.cc (__cxa_vec_new): Set "C" linkage.
4296 (__cxa_vec_ctor): Likewise.
4297 (__cxa_vec_cctor): Likewise.
4298 (__cxa_vec_dtor): Likewise.
4299 (__cxa_vec_delete): Likewise.
4300 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
4301 (__cxa_vec_ctor): Likewise.
4302 (__cxa_vec_cctor): Likewise.
4303 (__cxa_vec_dtor): Likewise.
4304 (__cxa_vec_delete): Likewise.
4306 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4308 * class.c (instantiate_type): Reinstate local variable
4309 deleted in previous change.
4311 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
4314 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4316 * cp-tree.h (instantiate_type_flags): New enumeration.
4317 (instantiate_type): Change parameter.
4318 * class.c (instantiate_type): Adjust prototype. Adjust.
4319 * call.c (standard_conversion): Adjust instantiate_type call.
4320 (reference_binding): Likewise.
4321 (build_op_delete_call): Likewise.
4322 (convert_like_real): Likewise.
4323 * cvt.c (cp_convert_to_pointer): Likewise.
4324 (convert_to_reference): Likewise.
4325 * pt.c (convert_nontype_argument): Likewise.
4326 * typeck.c (build_binary_op): Likewise.
4327 (build_ptrmemfunc): Likewise.
4328 (convert_for_assignment): Likewise.
4330 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4332 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
4333 (current_aggr): Define.
4334 * decl.c (grokdeclarator): Make sure a friend class is an
4335 elaborated type specifier.
4336 * parse.y (current_aggr): Remove static definition.
4337 (cp_parse_init): Adjust.
4338 (structsp): Clear and restore current_aggr.
4339 (component_decl_list): Clear current_aggr.
4341 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
4342 aggregate tag on the typename's context.
4344 * pt.c (tsubst_friend_class): Return error_mark_node, if
4346 (instantiate_class_template): Ignore error_mark_node friend types.
4348 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
4350 * cvt.c (warn_ref_binding): New static function, broken out of ...
4351 (convert_to_reference): ... here. Use it.
4353 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4355 * parse.y (template_arg): Add rule for template qualified with
4358 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4360 * decl2.c (add_function): Reorganize.
4361 (arg_assoc): Do not consider function template decls.
4363 2000-08-11 Jason Merrill <jason@redhat.com>
4365 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
4368 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4370 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
4371 (lookup_nested_tag): Likewise.
4373 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
4376 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4378 * parse.y (named_complex_class_head_sans_basetype): Remove
4381 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4383 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
4384 explicit TEMPLATE_ID_EXPR args.
4385 (build_expr_from_tree, case CALL_EXPR): Likewise.
4387 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4389 * decl.c (check_tag_decl): Diagnose typename's which don't
4392 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
4394 * init.c (build_aggr_init): Reject bogus array initializers
4397 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
4399 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
4401 * cp/tinfo.cc (__dynamic_cast): Likewise.
4402 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
4404 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
4406 * cvt.c (convert_to_pointer_force): Fix error message when
4407 attempting to cast from ambiguous base.
4409 2000-08-08 Jason Merrill <jason@redhat.com>
4411 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
4412 (tsubst_template_arg_vector): Likewise.
4414 * decl2.c (build_anon_union_vars): Choose the largest field; don't
4415 assume that one will be as large as the union.
4417 2000-08-07 Kazu Hirata <kazu@hxi.com>
4419 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
4420 * decl.c (pop_labels): Likewise.
4422 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
4424 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
4426 (__pointer_to_member_type_info): Likewise.
4427 (__base_class_info): Likewise.
4428 (__class_type_info): Likewise.
4429 (__si_class_type_info): Likewise.
4430 (__vmi_class_type_info): Likewise.
4431 * tinfo.cc (__si_class_type_info::__do_find_public_src):
4432 Changed member names to match specifications.
4433 (__vmi_class_type_info::__do_find_public_src): Likewise.
4434 (__si_class_type_info::__do_dyncast): Likewise.
4435 (__vmi_class_type_info::__do_dyncast): Likewise.
4436 (__si_class_type_info::__do_upcast): Likewise.
4437 (__vmi_class_type_info::__do_upcast): Likewise.
4438 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
4439 (__pbase_type_info::__pointer_catch): Likewise.
4440 (__pointer_type_info::__pointer_catch): Likewise.
4441 (__pointer_to_member_type_info::__pointer_catch): Likewise.
4443 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
4445 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
4446 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
4447 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
4449 2000-08-04 Mark Mitchell <mark@codesourcery.com>
4451 * cp-tree.h (add_method): Change prototype.
4452 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
4453 Don't double the size of the method vector in the error case.
4454 (handle_using_decl): Adjust call to add_method.
4455 (add_implicitly_declared_members): Likewise.
4456 (clone_function_decl): Likewise.
4457 * decl2.c (check_classfn): Likewise.
4458 * semantics.c (finish_member_declaration): Likewise.
4460 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
4462 * decl.c (flag_isoc94): New variable.
4464 2000-08-02 Jason Merrill <jason@redhat.com>
4466 * pt.c (do_type_instantiation): Add complain parm; don't complain
4467 if called recursively.
4468 * cp-tree.h, parse.y: Adjust.
4470 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
4472 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
4473 -Wno-strict-prototypes.
4475 * g++spec.c: Adjust type of second argument to
4476 lang_specific_driver, and update code as necessary.
4478 * cp-tree.h: Don't prototype min_precision here.
4479 (my_friendly_assert): Cast expression to void.
4480 * semantics.c (do_poplevel): Initialize scope_stmts.
4482 2000-08-02 Mark Mitchell <mark@codesourcery.com>
4484 * cp-tree.h (DECL_NEEDED_P): Tweak.
4486 2000-07-28 Jason Merrill <jason@redhat.com>
4488 * lang-specs.h: Use %i in rule for .ii files.
4490 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
4492 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
4494 2000-07-30 Mark Mitchell <mark@codesourcery.com>
4496 Allow indirect primary bases.
4497 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
4499 (CLASSTYPE_VFIELD_PARENT): Remove.
4500 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
4501 (BINFO_PRIMARY_BINFO): Remove.
4502 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
4503 (BINFO_VBASE_PRIMARY_P): Likewise.
4504 (BINFO_PRIMARY_BASE_OF): New macro.
4505 (BINFO_INDIRECT_PRIMARY_P): Likewise.
4506 (get_primary_binfo): New function.
4507 * decl.c (lang_mark_tree): Make lang_type::primary_base.
4508 * class.c (vcall_offset_data_s): Rename to ...
4509 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
4510 and add ctor_vtbl_p.
4511 (get_derived_offset): Use get_primary_binfo.
4512 (dfs_mark_primary_bases): Adjust handling of virtual primary
4514 (mark_primary_bases): Likewise.
4515 (set_primary_base): Take a binfo, not an integer, as a
4516 representation of the primary base.
4517 (indirect_primary_base_p): Remove.
4518 (determine_primary_base): Adjust for indirect primary bases.
4519 (dfs_find_final_overrider): Fix typo in coment.
4520 (update_vtable_entry_for_fn): Use get_primary_binfo.
4521 (layout_nonempty_base_or_field): Tweak.
4522 (build_base_fields): Adjust for new primary base semantics.
4523 (dfs_propagate_binfo_offsets): Remove.
4524 (propagate_binfo_offsets): Rewrite.
4525 (dfs_set_offset_for_shared_vbases): Remove.
4526 (layout_virtual_bases): Don't use it.
4527 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
4529 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
4530 CLASSTYPE_VFIELD_PARENT.
4531 (dfs_get_primary_binfo): New function.
4532 (get_primary_binfo): Likewise.
4533 (dump_class_hierarchy_r): Tweak printing of primary bases.
4534 (build_vtbl_initializer): Fix typo in comments. Use
4536 (build_vcall_and_vbase_vtbl_entries): Likewise.
4537 (build_vbaes_offset_vtbl_entries): Likewise.
4538 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
4539 BV_VCALL_INDEX to handle indirect primary bases.
4540 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
4541 (build_rtti_vtbl_entries): Likewise.
4542 * search.c (get_shared_vbase_if_not_primary): Tweak.
4543 (find_vbase_instance): Likewise.
4544 (binfo_for_vtable): Simplify.
4545 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
4546 (make_binfo): Make it have 11 entries.
4548 2000-07-30 Alex Samuel <samuel@codesourcery.com>
4550 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
4551 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
4552 ascertaining primaryness.
4553 (G): Remove template_args.
4554 (decl_is_template_id): New function.
4555 (write_encoding): Use decl_is_template_id.
4556 (write_name): Likewise. Handle type_decls. Get main variant of
4558 (write_nested_name): Likewise.
4559 (write_prefix): Likewise.
4560 (write_template_prefix): Likewise.
4561 (write_special_name_constructor): Remove defunct production from
4563 (write_bare_function_type): Remove comment about absent parameter.
4564 (write_template_template_arg): Add missing grammar production to
4567 2000-07-27 Jason Merrill <jason@redhat.com>
4569 * decl.c (duplicate_decls): If common_type produces a non-typedef
4570 type for a typedef, just use the old type.
4572 2000-07-27 Mark Mitchell <mark@codesourcery.com>
4574 * cp-tree.h (function_depth): Declare.
4575 (verify_stmt_tree): Likewise.
4576 (find_tree): Likewise.
4577 * decl.c (function_depth): Give it external linkage.
4578 * optimize.c (optimize_function): Increment and decrement it.
4579 * tree.c (verify_stmt_tree_r): New function.
4580 (verify_stmt_tree): Likewise.
4581 (find_tree_r): Likewise.
4582 (find_tree): Likewise.
4584 2000-07-27 Jason Merrill <jason@redhat.com>
4586 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
4588 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
4590 2000-07-26 Mark Mitchell <mark@codesourcery.com>
4592 * decl.c (start_cleanup_fn): Mark the function as `inline'.
4593 * decl2.c (get_guard): Call cp_finish_decl, not
4594 rest_of_decl_compilation, for local guards.
4595 * lex.c (do_identifier): Remove unused variable.
4597 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
4599 * parse.y: Add missing ';'.
4601 2000-07-26 Mark Mitchell <mark@codesourcery.com>
4603 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
4606 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
4608 Kill strict_prototype. Backwards compatibility only for
4609 non NO_IMPLICIT_EXTERN_C systems.
4610 * cp-tree.h (flag_strict_prototype): Remove.
4611 (strict_prototype): Remove.
4612 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
4613 * decl.c (maybe_push_to_top_level): Adjust.
4614 (pop_from_top_level): Adjust.
4615 (decls_match): Only allow sloppy parm matching for ancient
4617 (init_decl_processing): Adjust.
4618 (grokdeclarator): Adjust.
4619 * decl2.c (flag_strict_prototype): Remove.
4620 (strict_prototype): Remove.
4621 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
4622 (lang_f_options): Remove "strict-prototype".
4623 (unsupported-options): Add "strict-prototype".
4624 * lex.c (do_identifier): Adjust.
4625 (do_scoped_id): Adjust.
4626 * parse.y (empty_parms): Adjust.
4627 * class.c (push_lang_context): Adjust.
4628 (pop_lang_context): Adjust.
4629 * typeck.c (comp_target_parms): Adjust.
4631 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
4633 * decl.c (poplevel): Deal with anonymous variables at for scope.
4634 (maybe_inject_for_scope_var): Likewise.
4636 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
4638 * decl.c: Remove all signal handling code, now done in toplev.c.
4640 2000-07-23 Mark Mitchell <mark@codesourcery.com>
4642 * decl.c (make_rtl_for_nonlocal_decl): Rework.
4644 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
4647 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
4649 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
4650 Define my_friendly_assert and my_friendly_abort as macros
4651 which may call friendly_abort. Prototype friendly abort, not
4652 my_friendly_abort or my_friendly_assert.
4653 * decl.c (signal_catch): Report the signal caught in the error
4654 message. Call fatal directly.
4655 * typeck2.c (ack, my_friendly_assert): Delete.
4656 (my_friendly_abort): Rename to friendly_abort. Expect file,
4657 line, and function parameters. Report the abort code, then
4658 call fancy_abort. Do not mask an abort if errors have
4661 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
4663 * typeck.c (comp_target_parms): Remove obsolete parameter.
4664 (comp_target_types): Adjust.
4666 2000-07-17 Jason Merrill <jason@redhat.com>
4668 * typeck.c (mark_addressable): Never set TREE_USED.
4669 * call.c (build_call): Don't abort on calls to library functions
4670 that have been declared normally.
4672 * typeck.c (build_binary_op): Fix grammar in warning.
4674 * exception.cc (__eh_free): Fix prototype.
4676 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
4678 * decl.c (pushdecl): Handle seeing an OVERLOAD in
4679 IDENTIFIER_NAMESPACE_VALUE.
4681 2000-07-16 Mark Mitchell <mark@codesourcery.com>
4683 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
4684 * method.c (use_thunk): Correct handling of vcall offsets.
4686 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
4688 * .cvsignore: parse.h and parse.c have no cp- prefix.
4690 2000-07-13 Mark Mitchell <mark@codesourcery.com>
4692 * .cvsignore: New file.
4694 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
4696 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
4698 2000-07-12 Mark Mitchell <mark@codesourcery.com>
4700 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
4702 * parse.h: Likewise.
4704 2000-07-11 Mark Mitchell <mark@codesourcery.com>
4706 * class.c (layout_class_type): Add pointers to virtual bases after
4707 base classes under the old ABI.
4709 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
4711 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
4712 (finish_continue_stmt): Likewise.
4713 (begin_for_stmt): Remove call to note_level_for_for.
4714 (finish_goto_stmt): Change call from build_min_nt
4716 (finish_expr_stmt): Likewise.
4717 (begin_if_stmt): Likewise.
4718 (begin_while_stmt): Likewise.
4719 (finish_while_stmt): Likewise.
4720 (finish_return_stmt): Likewise.
4721 (begin_for_stmt): Likewise.
4722 (finish_for_stmt): Likewise.
4723 (finish_break_stmt): Likewise.
4724 (begin_switch_stmt): Likewise.
4725 (finish_case_label): Likewise.
4726 (genrtl_try_block): Likewise.
4727 (begin_try_block): Likewise.
4728 (begin_handler): Likewise.
4729 (begin_compound_stmt): Likewise.
4730 (finish_asm_stmt): Likewise.
4731 (finish_label_stmt): Likewise.
4732 (add_decl_stmt): Likewise.
4733 (finish_subobject): Likewise.
4734 (finish_decl_cleanup): Likewise.
4735 (finish_named_return_value): Likewise.
4736 (setup_vtbl_ptr): Likewise.
4737 (add_scope_stmt): Likewise.
4738 * decl.c (finish_constructor_body): Likewise.
4739 (finish_destructor_body): Likewise.
4740 * optimize.c (copy_body_r): Likewise.
4741 (initialize_inlined_parameters): Likewise.
4742 (declare_return_variable): Likewise.
4743 (expand_call_inline): Likewise.
4745 2000-07-10 Jakub Jelinek <jakub@redhat.com>
4747 * semantics.c (expand_body): Sync interface information
4748 at the end of function body expansion.
4750 2000-07-09 Jason Merrill <jason@redhat.com>
4752 * init.c (build_new_1): Bail early if the call to new fails.
4754 * decl.c (compute_array_index_type): Check specifically for
4755 an INTEGER_CST, not just TREE_CONSTANT.
4757 * decl.c (duplicate_decls): Don't call duplicate_decls on
4758 the DECL_TEMPLATE_RESULT.
4759 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
4762 * error.c (dump_template_bindings): Don't crash if we had an
4763 invalid argument list.
4765 * typeck.c (c_expand_start_case): Do narrowing here.
4766 * semantics.c (finish_switch_cond): Not here.
4768 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
4770 * parse.y (asm_clobbers): Do string concatenation.
4772 2000-07-09 Mark Mitchell <mark@codesourcery.com>
4774 * decl.c (pushtag): Don't put local classes in template functions
4775 on the local_classes list.
4777 2000-07-04 Scott Snyder <snyder@fnal.gov>
4779 * decl2.c (get_guard): Add missing return for old ABI local
4782 2000-07-09 Mark Mitchell <mark@codesourcery.com>
4784 * cp-tree.h (char_type_p): New function.
4785 * decl.c (init_decl_processing): Don't initialize
4786 signed_wchar_type_node or unsigned_wchar_type_node.
4787 (complete_array_type): Handle brace-enclosed string-constants.
4788 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
4789 * tree.c (char_type_p): New function.
4790 * typeck2.c (digest_init): Use char_type_p.
4792 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
4794 * pt.c (tsubst): Don't layout type, if it's error_mark.
4796 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
4798 * pt.c (instantiate_pending_templates): Reset template level.
4800 2000-07-05 Jason Merrill <jason@redhat.com>
4802 * call.c (joust): Don't complain about `operator char *()' beating
4803 `operator const char *() const'.
4805 2000-07-04 scott snyder <snyder@fnal.gov>
4806 Jason Merrill <jason@redhat.com>
4808 * repo.c (repo_get_id): Handle the case where a class with virtual
4809 bases has a null TYPE_BINFO_VTABLE.
4811 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
4812 Jason Merrill <jason@redhat.com>
4814 * parse.y (member_init): Just pass in the type.
4815 * init.c (expand_member_init): Handle getting a type.
4817 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4818 Jason Merrill <jason@redhat.com>
4820 * decl.c (finish_function): Warn if a function has no return
4822 Suggested by Andrew Koenig.
4823 * typeck.c (check_return_expr): Do set current_function_returns_value
4824 if we got an error_mark_node.
4826 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
4828 * decl2.c (push_decl_namespace): Push the original namespace.
4830 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
4832 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
4833 * semantics.c (begin_class_definition): Clear it.
4835 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
4837 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
4838 (genrtl_expr_stmt): Likewise.
4839 (genrtl_decl_stmt): Likewise.
4840 (genrtl_if_stmt): Likewise.
4841 (genrtl_while_stmt): Likewise.
4842 (genrtl_do_stmt): Likewise.
4843 (genrtl_return_stmt): Likewise.
4844 (genrtl_for_stmt): Likewise.
4845 (genrtl_break_stmt): Likewise.
4846 (genrtl_continue_stmt): Likewise.
4847 (genrtl_scope_stmt): Likewise.
4848 (genrtl_switch_stmt): Likewise.
4849 (genrtl_case_label): Likewise.
4850 (genrtl_begin_compound_stmt): Likewise.
4851 (genrtl_finish_compound_stmt): Likewise.
4852 (genrtl_compound_stmt): Likewise.
4853 (genrtl_asm_stmt): Likewise.
4855 * init.c (begin_init_stmts): Remove call to
4856 genrtl_begin_compound_stmt.
4857 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
4859 * semantics.c (lang_expand_stmt): Changed call to
4860 genrtl_compound_stmt to ignore return value.
4862 2000-07-02 Mark Mitchell <mark@codesourcery.com>
4864 * mangle.c (canonicalize_for_substitution): Return the canonical
4867 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
4869 * typeck.c (commonparms): Remove obstack manipulations.
4871 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
4873 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
4875 * Makefile.in (OBJS): Added ../c-semantics.o.
4876 (OBJDEPS): Likewise.
4878 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
4880 (struct stmt_tree): Added comment.
4881 (current_function_name_declared): Removed.
4882 (stmts_are_full_exprs_p): Likewise.
4883 (genrtl_do_pushlevel): Likewise.
4884 (genrtl_clear_out_block): Likewise.
4885 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
4886 (DECL_ANON_UNION_ELEMS): Likewise.
4887 (emit_local_var): Likewise.
4888 (make_rtl_for_local_static): Likewise.
4889 (do_case): Likewise.
4890 (expand_stmt): Likewise.
4891 (genrtl_decl_cleanup): Likewise.
4892 (c_expand_asm_operands): Likewise.
4893 (c_expand_return): Likewise.
4894 (c_expand_start_case): Likewise.
4896 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
4897 (emit_local_var): Likewise.
4898 (initialize_local_var): Change reference to
4899 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
4900 Change reference to stmts_are_full_exprs_p to
4901 current_stmt_tree->stmts_are_full_exprs_p.
4902 (push_cp_function_context): Likewise.
4904 * expect.c (expand_throw): Change reference to
4905 stmts_are_full_exprs_p.
4907 * init.c (build_aggr_init): Change reference to
4908 stmts_are_full_exprs_p.
4909 (build_vec_init): Likewise.
4911 * optimize.c (maybe_clone_body): Change reference to
4912 current_function_name_declared to
4913 cp_function_chain->name_declared.
4915 * pt.c (instantiate_decl): Change reference to
4916 current_function_name_declared to
4917 cp_function_chain->name_declared.
4919 * semantics.c (expand_cond): Moved declaration to c-common.h.
4920 (genrtl_do_pushlevel): Moved to c-semantics.c.
4921 (genrtl_clear_out_block): Likewise.
4922 (genrtl_goto_stmt): Likewise.
4923 (genrtl_expr_stmt): Likewise.
4924 (genrtl_decl_stmt): Likewise.
4925 (gerntl_if_stmt): Likewise.
4926 (genrtl_while_stmt): Likewise.
4927 (genrtl_do_stmt): Likewise.
4928 (genrtl_return_stmt): Likewise.
4929 (genrtl_for_stmt): Likewise.
4930 (genrtl_break_stmt): Likewise.
4931 (genrtl_continue_stmt): Likewise.
4932 (genrtl_scope_stmt): Likewise.
4933 (genrtl_switch_stmt): Likewise.
4934 (genrtl_case_label): Likewise.
4935 (genrtl_begin_compound_stmt): Likewise.
4936 (genrtl_finish_compound_stmt): Likewise.
4937 (genrtl_compound_stmt): Likewise.
4938 (genrtl_asm_stmt): Likewise.
4939 (genrtl_decl_cleanup): Likewise.
4940 (expand_cond): Likewise.
4941 (expand_stmt): Renamed to ...
4942 (lang_expand_stmt): ... this.
4943 (lang_expand_expr_stmt): Initialize.
4944 (set_current_function_name_declared): Likewise.
4945 (stmts_are_full_exprs_p): Likewise.
4946 (current_function_name_declared): Likewise.
4947 (anon_aggr_type_p): Likewise.
4948 (do_poplevel): Change reference to
4949 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
4950 Change reference to stmts_are_full_exprs_p to
4951 current_stmt_tree->stmts_are_full_exprs_p.
4952 (add_tree): Likewise.
4953 (finish_expr_stmt): Likewise.
4954 (prep_stmt): Likewise.
4955 (lang_expand_stmt): Likewise.
4956 (begin_compound_stmt): Change reference to
4957 current_function_name_declared to
4958 cp_function_chain->name_declared and call to
4959 current_function_name_declared().
4960 (setup_vtbl_ptr): Likewise.
4961 (genrtl_do_poplevel): Removed.
4963 2000-06-30 Jason Merrill <jason@redhat.com>
4965 * init.c (init_init_processing): Go back to aligning like
4966 double_type_node for old ABI.
4967 (get_cookie_size): Make cookie larger if we get a type that needs
4969 (build_vec_delete): Call it.
4971 * typeck.c (qualify_type_recursive): New fn.
4972 (composite_pointer_type): Use it.
4973 (build_binary_op): Use composite_pointer_type.
4975 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
4976 Jason Merrill <jason@redhat.com>
4978 * typeck.c (check_return_expr): Don't complain about returning
4979 NULL from operator new if -fcheck-new.
4980 * cp-tree.h: Declare flag_check_new here.
4983 2000-06-28 Alex Samuel <samuel@codesourcery.com>
4985 * mangle.c (find_substitution): Use same_type_p.
4986 (write_encoding): Don't check for substitutions.
4988 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
4990 * parse.y (expr_no_comma_rangle): New non-terminal.
4991 (template_parm): Use it for default parameter case.
4992 (template_arg): Use it.
4993 (expr_no_commas): Remove commented out undefined extensions.
4994 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
4995 * parse.h, parse.c: Rebuilt.
4997 2000-06-30 Mark Mitchell <mark@codesourcery.com>
4999 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
5000 (finish_asm_stmt): Do it here, instead.
5002 * cp-tree.h (ridpointers): Don't declare.
5003 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
5004 (record_builtin_java_type): Likewise.
5005 (init_decl_processing): Likewise.
5006 * lex.c: Move inclusion of lex.h.
5007 (ridpointers): Don't define.
5008 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
5010 * lex.h (enum rid): Rename to ...
5011 (enum cp_rid): ... this.
5012 (ridpointers): Don't declare.
5013 * parse.y: Move inclusion of lex.h.
5014 * parse.c: Regenerated.
5015 * spew.c: Move inclusion of lex.h.
5017 * cp-tree.h (struct language_function): Remove temp_name_counter.
5018 (temp_name_counter): Remove.
5019 (get_temp_name): Change prototype.
5020 (get_guard): New function.
5021 (get_guard_cond): Likewise.
5022 (set_guard): Likewise.
5023 * cvt.c (build_up_reference): Adjust call to get_temp_name.
5024 * decl.c (expand_static_init): Use get_guard and friends to
5025 implement guard variables.
5026 * decl2.c (get_temp_name): Assume that the variables created are
5028 (get_sentry): Rename to ...
5029 (get_guard): ... this. Implement new ABI guard variables.
5030 (get_guard_bits): New function.
5031 (get_guard_cond): Likewise.
5032 (set_guard): Likewise.
5033 (start_static_initialization_or_destruction): Use them.
5034 (do_static_initialization): Replace sentry with guard throughout.
5035 (do_static_destruction): Likewise.
5036 * init.c (create_temporary_var): Add comment.
5038 2000-06-28 Alex Samuel <samuel@codesourcery.com>
5040 * mangle.c (find_substitution): Use same_type_p.
5041 (write_encoding): Don't check for substitutions.
5043 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
5045 * parse.y (expr_no_comma_rangle): New non-terminal.
5046 (template_parm): Use it for default parameter case.
5047 (template_arg): Use it.
5048 (expr_no_commas): Remove commented out undefined extensions.
5049 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5050 * parse.h, parse.c: Rebuilt.
5052 2000-06-29 Mark Mitchell <mark@codesourcery.com>
5054 * cp-tree.h (flag_const_strings): Remove.
5055 (warn_parentheses): Likewise.
5056 (warn_format): Likewise.
5057 (common_type): Likewise.
5058 (default_conversion): Likewise.
5059 (build_binary_op): Likewise.
5060 (cp_build_binary_op): New macro.
5061 * call.c (build_new_op): Use cp_build_binary_op instead of
5063 * class.c (build_vtable_entry_ref): Likewise.
5064 * decl.c (expand_static_init): Likewise.
5065 (compute_array_index_type): Likewise.
5066 (build_enumerator): Likewise.
5067 * decl2.c (delete_sanity): Likewise.
5068 (start_static_initialization_or_destruction): Likewise.
5069 * error.c (dump_type_suffix): Likewise.
5070 * init.c (resolve_offset_ref): Likewise.
5071 (build_new): Likewise.
5072 (build_new_1): Likewise.
5073 (build_vec_delete_1): Likewise.
5074 (build_vec_init): Likewise.
5075 (build_delete): Likewise.
5076 * rtti.c (synthesize_tinfo_fn): Likewise.
5077 (synthesize_tinfo_var): Likewise.
5078 * search.c (expand_upcast_fixups): Likewise.
5079 (fixup_all_virtual_upcast_offsets): Likewise.
5080 * typeck.c (build_array_ref): Likewise.
5081 (get_member_function_from_ptrfunc): Likewise.
5082 (build_binary_op): Add parameter.
5083 (pointer_int_sum): Use cp_build_binary_op.
5084 (pointer_diff): Likewise.
5085 (build_modify_expr): Likewise.
5086 (get_delta_difference): Likewise.
5087 (build_ptrmemfunc): Likewise.
5089 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
5091 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
5092 * decl.c (create_implicit_typedef): Adjust.
5093 * decl2.c (build_artificial_parm): Adjust.
5094 * method.c (implicitly_declare_fn): Adjust.
5095 * pt.c (push_inline_template_parms_recursive): Adjust.
5096 (process_template_parm): Adjust.
5097 (overloaded_template_name): Adjust.
5098 * semantics.c (finish_template_template_parm): Adjust.
5100 2000-06-28 Mark Mitchell <mark@codesourcery.com>
5102 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
5103 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
5104 where to emit thunks.
5105 (build_vtt): Adjust call to build_vtt_inits.
5106 (build_vtt_inits): Add parameter to indicate whether or not
5107 sub-VTTs for virtual bases should be included. Adjust handling of
5108 construction vtables.
5109 (get_matching_base): New function.
5110 (dfs_build_vtt_inits): Rename to ...
5111 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
5112 construction vtables.
5113 (dfs_fixup_binfo_vtbls): Likewise.
5114 (build_ctor_vtbl_groups): Build construction vtables for virtual
5116 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
5117 to build construction vtbls.
5118 (dfs_accumulate_vtbl_inits): Adjust handling of
5119 construction vtables.
5121 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
5124 2000-06-27 Mark Mitchell <mark@codesourcery.com>
5126 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
5128 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
5130 * search.c (hides): Remove.
5131 (is_subobject_of_p): Add most_derived parameter. Use
5133 (lookup_field_queue_p): Adjust.
5134 (lookup_field_r): Adjust.
5136 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
5138 * decl2.c (handle_class_head): Bash typedefs to the type's main
5141 2000-06-25 Mark Mitchell <mark@codesourcery.com>
5143 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
5144 (begin_global_stmt_expr): ... this.
5145 (genrtl_finish_stmt_expr): Rename to ...
5146 (finish_global_stmt_expr): ... this.
5147 * init.c (begin_init_stmts): Adjust calls.
5148 (finish_init_stmts): Likewise.
5149 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
5150 (begin_global_stmt_expr): ... this.
5151 (genrtl_finish_stmt_expr): Rename to ...
5152 (finish_global_stmt_expr): ... this.
5154 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5156 * search.c (lookup_member): Fix typo in comment.
5158 2000-06-24 Jason Merrill <jason@redhat.com>
5160 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
5161 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
5163 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5165 * parse.y (complex_direct_notype_declarator): Support global_scope.
5166 * Makefile.in: Adjust conflict count.
5168 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5170 * parse.y (template_arg): Convert TEMPLATE_DECL
5171 that is a template template paramter to
5172 TEMPLATE_TEMPLATE_PARM here.
5174 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
5175 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
5176 (copy_template_template_parm): Adjust prototype.
5177 * decl.c (grokdeclarator): Remove dead code.
5178 * pt.c (process_template_parm): Tidy.
5179 (lookup_template_class): Construct nodes in
5180 copy_template_template_parm.
5181 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
5182 lookup_template_class. Use TYPE_TI_TEMPLATE.
5183 * tree.c (copy_template_template_parm): Add NEWARGS
5185 (mapcar): Adjust call to copy_template_template_parm.
5186 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
5187 * method.c (build_template_template_parm_names): Change error
5188 code to avoid compilation warning.
5190 * gxxint.texi: Document template template parameter
5193 2000-06-21 Alex Samuel <samuel@codesourcery.com>
5195 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
5196 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
5197 (cp-demangle.o): New rule.
5198 (dyn-string.o): Likewise.
5199 * inc/cxxabi.h (__cxa_demangle): New declaration.
5201 2000-06-22 Mark Mitchell <mark@codesourcery.com>
5203 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
5204 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
5205 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
5207 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
5208 (make_thunk): Change prototype.
5209 (emit_thunk): Rename to use_thunk.
5210 (mangle_thunk): Change prototype.
5211 * class.c (get_derived_offset): Simplify.
5212 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
5213 BV_GENERATE_THUNK_WITH_VTABLE_P.
5214 (build_primary_vtable): Simplify.
5215 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
5216 (dfs_find_base): Remove.
5217 (update_vtable_entry_for_fn): Correct bug in finding the base
5218 where a virtual function was first declared. Figure out whether
5219 or not to emit a vcall-thunk with the vtables in which it appears.
5220 Correct logic for deciding whether to use an ordinary thunk, or a
5222 (finish_struct_1): Remove unnecssary code.
5223 (build_vtbl_initializer): Use ssize_int for the running counter of
5225 (build_vtbl_initializer): Only use vcall thunks where necessary.
5226 Mark thunks as needing to be emitted with their vtables, or not.
5227 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
5228 indices. Use size_binop.
5229 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
5230 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
5232 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
5233 (build_vtable_entry): Mark thunks as needing to be emitted with
5234 their vtables, or not.
5235 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
5236 * decl2.c (mark_vtable_entries): Use use_thunk instead of
5238 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
5240 * error.c (dump_expr): Use BV_FN.
5241 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
5243 * method.c (make_thunk): Likewise.
5244 (emit_thunk): Rename to use_thunk. Allow callers to decide
5245 whether or not to actually emit the thunk. Adjust for changes in
5246 representation of vcall offsets.
5247 * search.c (dfs_get_pure_virtuals): Use BV_FN.
5248 * semantics.c (emit_associated_thunks): New function.
5249 (expand_body): Use it.
5250 * ir.texi: Adjust decriptions of thunks.
5252 2000-06-22 Jason Merrill <jason@redhat.com>
5254 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
5255 (tsubst_friend_function): Copy it here.
5257 * decl.c (grok_op_properties): Fix typo.
5259 * decl2.c (delete_sanity): Clarify warning, avoid failure on
5262 * pt.c (check_explicit_specialization): Clarify error.
5264 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
5265 an old OVERLOAD when we're declaring a non-function.
5266 (pushdecl, destroy_local_var): Check for error_mark_node.
5267 (warn_extern_redeclared_static): Also bail early if
5269 (push_overloaded_decl): Ignore an old error_mark_node.
5271 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
5273 * call.c (build_x_va_arg): Check if in a template decl.
5274 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
5276 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
5278 * class.c (push_lang_context): TYPE_NAME gets you to the Java
5280 * decl.c (check_goto): Computed gotos assumed OK.
5282 2000-06-20 Jason Merrill <jason@redhat.com>
5284 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
5285 for which we don't need to look for instantiations.
5287 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
5289 * parse.y (program): Always call finish_translation_unit.
5290 * parse.c, parse.h: Rebuilt.
5292 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
5294 * method.c: Don't include hard-reg-set.h.
5296 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
5298 * rtti.c (get_base_offset): Cope when vbase field is in a base.
5300 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
5302 * call.c (build_conditional_expr): Use VOID_TYPE_P.
5303 * cvt.c (cp_convert_to_pointer): Likewise.
5304 (convert_to_void): Likewise.
5305 * error.c (dump_expr): Likewise.
5306 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
5307 * init.c (build_delete): Likewise.
5308 * method.c (emit_thunk): Likewise.
5309 * optmize.c (declare_return_variable): Likewise.
5310 * rtti.c (get_tinfo_decl_dynamic): Likewise.
5311 (get_typeid): Likewise.
5312 (build_dynamic_cast_1): Likewise.
5313 * typeck.c (composite_pointer_type): Likewise.
5314 (common_type): Likewise.
5315 (build_indirect_ref): Likewise.
5316 (build_binary_op): Likewise.
5317 (build_x_compound_expr): Likewise.
5318 (check_return_expr): Likewise.
5319 * typeck2.c (add_exception_specifier): Likewise.
5321 * mangle.c (write_method_parms): Use direct comparison for end
5324 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
5326 * cp-tree.h (genrtl_try_block): Declare function.
5327 (genrtl_handler): Likewise.
5328 (genrtl_catch_block): Likewise.
5329 (genrtl_ctor_stmt): Likewise.
5330 (genrtl_subobject): Likewise.
5331 (genrtl_decl_cleanup): Likewise.
5332 (genrtl_do_poplevel): Likewise.
5333 (genrtl_do_pushlevel): Likewise.
5334 (genrtl_clear_out_block): Likewise.
5335 (genrtl_goto_stmt): Likewise.
5336 (genrtl_expr_stmt): Likewise.
5337 (genrtl_decl_stmt): Likewise.
5338 (genrtl_if_stmt): Likewise.
5339 (genrtl_while_stmt): Likewise.
5340 (genrtl_do_stmt): Likewise.
5341 (genrtl_return_stmt): Likewise.
5342 (genrtl_for_stmt): Likewise.
5343 (genrtl_break_stmt): Likewise.
5344 (genrtl_continue_stmt): Likewise.
5345 (genrtl_scope_stmt): Likewise.
5346 (genrtl_switch_stmt): Likewise.
5347 (genrtl_case_label): Likewise.
5348 (genrtl_begin_compound_stmt): Likewise.
5349 (genrtl_finish_compound_stmt): Likewise.
5350 (genrtl_compound_stmt): Likewise.
5351 (genrtl_asm_stmt): Likewise.
5352 (genrtl_named_return_value): Likewise.
5353 (genrtl_begin_stmt_expr): Likewise.
5354 (genrtl_finish_stmt_expr): Likewise.
5355 (finish_for_stmt): Removed first argument.
5356 (finish_switch_stmt): Likewise.
5358 * semantics.c (genrtl_try_block): Define function.
5359 (genrtl_handler): Likewise.
5360 (genrtl_catch_block): Likewise.
5361 (genrtl_ctor_stmt): Likewise.
5362 (genrtl_subobject): Likewise.
5363 (genrtl_decl_cleanup): Likewise.
5364 (genrtl_do_poplevel): Likewise.
5365 (genrtl_do_pushlevel): Likewise.
5366 (genrtl_clear_out_block): Likewise.
5367 (genrtl_goto_stmt): Likewise.
5368 (genrtl_expr_stmt): Likewise.
5369 (genrtl_decl_stmt): Likewise.
5370 (genrtl_if_stmt): Likewise.
5371 (genrtl_while_stmt): Likewise.
5372 (genrtl_do_stmt): Likewise.
5373 (genrtl_return_stmt): Likewise.
5374 (genrtl_for_stmt): Likewise.
5375 (genrtl_break_stmt): Likewise.
5376 (genrtl_continue_stmt): Likewise.
5377 (genrtl_scope_stmt): Likewise.
5378 (genrtl_switch_stmt): Likewise.
5379 (genrtl_case_label): Likewise.
5380 (genrtl_begin_compound_stmt): Likewise.
5381 (genrtl_finish_compound_stmt): Likewise.
5382 (genrtl_compound_stmt): Likewise.
5383 (genrtl_asm_stmt): Likewise.
5384 (genrtl_named_return_value): Likewise.
5385 (genrtl_begin_stmt_expr): Likewise.
5386 (genrtl_finish_stmt_expr): Likewise.
5387 (finish_for_stmt): Removed first argument and generate rtl
5389 (finish_switch_stmt): Likewise.
5390 (do_poplevel): Removed generate rtl specific code.
5391 (do_pushlevel): Likewise.
5392 (add_tree): Likewise.
5393 (finish_goto_stmt): Likewise.
5394 (finish_expr_stmt): Likewise.
5395 (begin_if_stmt): Likewise.
5396 (finish_if_stmt_cond): Likewise.
5397 (finish_then_clause): Likewise.
5398 (begin_else_clause): Likewise.
5399 (finish_else_clause): Likewise.
5400 (finish_if_stmt): Likewise.
5401 (clear_out_block): Likewise.
5402 (begin_while_stmt): Likewise.
5403 (finish_while_stmt_cond): Likewise.
5404 (finish_while_stmt): Likewise.
5405 (begin_do_stmt): Likewise.
5406 (finish_do_body): Likewise.
5407 (finish_do_stmt): Likewise.
5408 (finish_return_stmt): Likewise.
5409 (begin_for_stmt): Likewise.
5410 (finish_for_init_stmt): Likewise.
5411 (finish_for_cond): Likewise.
5412 (finish_for_expr): Likewise.
5413 (finish_break_stmt): Likewise.
5414 (finish_continue_stmt): Likewise.
5415 (begin_switch_stmt): Likewise.
5416 (finish_switch_cond): Likewise.
5417 (finish_case_label): Likewise.
5418 (begin_try_block): Likewise.
5419 (begin_function_try_block): Likewise.
5420 (finish_try_block): Likewise.
5421 (finish_cleanup_try_block): Likewise.
5422 (finish_cleanup): Likewise.
5423 (finish_function_try_block): Likewise.
5424 (finish_handler_sequence): Likewise.
5425 (finish_function_handler_sequence): Likewise.
5426 (begin_handler): Likewise.
5427 (finish_handler_parms): Likewise.
5428 (begin_catch_block): Likewise.
5429 (finish_handler): Likewise.
5430 (begin_compound_stmt): Likewise.
5431 (finish_compound_stmt): Likewise.
5432 (finish_asm_stmt): Likewise.
5433 (finish_label_stmt): Likewise.
5434 (finish_label_decl): Likewise.
5435 (finish_subobject): Likewise.
5436 (finish_decl_cleanup): Likewise.
5437 (finish_named_return_value): Likewise.
5438 (begin_stmt_expr): Likewise.
5439 (finish_stmt_expr): Likewise.
5441 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
5442 to call genrtl_expr_stmt when appropriate.
5444 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
5445 begin_compound_expr to call genrtl_begin_stmt_expr and
5446 genrtl_begin_compound_expr when appropriate.
5447 (finish_init_stmts): Changed calls to finish_compound_expr and
5448 finish_stmt_expr to call genrtl_finish_compound_expr and
5449 genrtl_finish_stmt_expr when appropriate.
5450 (expand_default_init): Changed call to finish_expr_stmt to call
5451 genrtl_expr_stmt when appropriate.
5452 (build_vec_init): Likewise.
5454 * parse.y (simple_stmt): Removed first argument from call to
5455 finish_for_stmt. Removed first argument from call to
5458 * parse.c: Regenerated.
5460 * pt.c (tsubst_expr): Removed first argument from call to
5461 finish_for_stmt. Removed first argument from call to
5464 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
5466 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
5467 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
5469 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
5470 (cplus_tree_code_length[]): Likewise.
5471 (cplus_tree_code_name[]): Likewise.
5472 (init_parse): Added call to add_c_tree_codes. Changed
5473 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
5475 2000-06-16 Mark Mitchell <mark@codesourcery.com>
5477 * cp-tree.h (finish_mem_initializers): Declare.
5478 (count_trees): Likewise.
5479 * parse.y (base_init): Use finish_mem_initializers.
5480 * semantics.c (finish_mem_initializers): New function.
5482 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
5483 the number of trees.
5485 (count_trees): Don't use it.
5487 2000-06-15 Jason Merrill <jason@redhat.com>
5489 * tree.c (count_trees): New debugging function.
5491 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
5492 * init.c (build_member_call): Pull out the name of a DECL.
5494 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
5495 * semantics.c (expand_body): Push to TV_INTEGRATION here.
5496 * optimize.c (optimize_function): Not here.
5497 * pt.c (instantiate_decl): Push to TV_PARSE.
5499 2000-06-15 Mark Mitchell <mark@codesourcery.com>
5501 * cp-tree.h (struct language_function): Remove x_base_init_list
5502 and x_member_init_list.
5503 (current_base_init_list): Remove.
5504 (current_member_init_list): Likewise.
5505 (setup_vtbl_ptr): Change prototype.
5506 (emit_base_init): Likewise.
5507 (expand_member_init): Likewise.
5508 (reinit_parse_for_function): Remove.
5509 * decl.c (save_function_data): Don't clear x_base_init_list and
5511 (mark_language_function): Don't mark them.
5512 * init.c (perform_member_init): Tweak comment.
5513 (sort_member_init): Take the list of initializers as an argument.
5514 (sort_base_init): Likewise.
5515 (emit_base_init): Likewise.
5516 (expand_member_init): Return the initializer. Don't use global
5518 * lex.c (reinit_parse_for_function): Remove.
5519 * method.c (build_template_parm_names): Correct substitution.
5520 (do_build_copy_constructor): Don't use current_member_init_list
5521 and current_base_init_list.
5522 (synthesize_method): Likewise.
5523 * parse.y (base_init): Split mem-initializers into
5524 base-initializers and field-initializers.
5525 (member_init_list): Build up the list here.
5526 (member_init): Return the initializer.
5527 (fn.depfn): Don't use reinit_parse_for_function.
5528 * parse.c: Regenerated.
5529 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
5531 (tsubst_expr): Don't use current_member_init_list
5532 and current_base_init_list.
5533 (tsubst_expr_values): Rename to ...
5534 (tsubst_initializer_list): ... this. Use convert_from_reference.
5535 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
5536 and current_base_init_list.
5537 (begin_function_definition): Don't call reinit_parse_for_function.
5539 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
5541 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
5544 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
5546 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
5548 * cp-tree.h (IF_COND): Move to c-common.h.
5549 (THEN_CLAUSE): Likewise.
5550 (ELSE_CLAUSE): Likewise.
5551 (WHILE_COND): Likewise.
5552 (WHILE_BODY): Likewise.
5553 (DO_COND): Likewise.
5554 (DO_BODY): Likewise.
5555 (RETURN_EXPR): Likewise.
5556 (EXPR_STMT_EXPR): Likewise.
5557 (FOR_INIT_STMT): Likewise.
5558 (FOR_COND): Likewise.
5559 (FOR_EXPR): Likewise.
5560 (FOR_BODY): Likewise.
5561 (SWITCH_COND): Likewise.
5562 (SWITCH_BODY): Likewise.
5563 (CASE_LOW): Likewise.
5564 (CASE_HIGH): Likewise.
5565 (GOTO_DESTINATION): Likewise.
5566 (COMPOUND_BODY): Likewise.
5567 (ASM_CV_QUAL): Likewise.
5568 (ASM_STRING): Likewise.
5569 (ASM_OUTPUTS): Likewise.
5570 (ASM_INPUTS): Likewise.
5571 (ASM_CLOBBERS): Likewise.
5572 (DECL_STMT_DECL): Likewise.
5573 (STMT_EXPR_STMT): Likewise.
5574 (LABEL_STMT_LABEL): Likewise.
5575 (SCOPE_BEGIN_P): Likewise.
5576 (SCOPE_END_P): Likewise.
5577 (SCOPE_STMT_BLOCK): Likewise.
5578 (SCOPE_NULLIFIED_P): Likewise.
5579 (SCOPE_NO_CLEANUPS_P): Likewise.
5580 (SCOPE_PARTIAL_P): Likewise.
5581 (ASM_VOLATILE_P): Likewise.
5582 (STMT_LINENO): Likewise.
5583 (STMT_LINENO_FOR_FN_P): Likewise.
5585 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
5586 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
5587 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
5588 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
5589 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
5591 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
5593 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
5594 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
5596 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
5597 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
5598 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
5600 2000-06-14 Mark Mitchell <mark@codesourcery.com>
5602 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
5603 * class.c (dfs_find_final_overrider): Set it appropriately.
5604 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
5605 avoid unneeded secondary vptrs.
5607 2000-06-13 Jakub Jelinek <jakub@redhat.com>
5609 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
5610 (check_bitfield_decl, check_field_decl): Likewise.
5611 (build_vtbl_or_vbase_field, build_base_field): Likewise.
5612 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
5613 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
5614 (xfer_tag, finish_enum): Likewise.
5615 * decl2.c (finish_builtin_type): Likewise.
5616 * init.c (init_init_processing): Likewise.
5617 * pt.c (instantiate_class_template): Likewise.
5618 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
5619 * cp-tree.h (struct lang_type): Add user_align member.
5620 (CLASSTYPE_USER_ALIGN): Define.
5622 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5624 * Make-lang.in (c++.install-common): Install g++-cross in
5625 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
5626 $(target_alias)-g++ and $(target_alias)-c++.
5628 2000-06-12 Mark Mitchell <mark@codesourcery.com>
5630 * class.c (vcall_offset_data_s): Add last_init and fns.
5631 (overrides): Rename to same_signature_p.
5632 (dfs_find_final_overrider): Adjust accordingly.
5633 (mark_overriders): Likewise.
5634 (warn_hidden): Likewise.
5635 (build_vtbl_initializer): Reorganize machinery for building things
5636 at negative offsets.
5637 (build_vcall_and_vbase_vtbl_entries): Likewise.
5638 (build_vbase_offset_vtbl_entries): Likewise.
5639 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
5640 offset entries. Do not create two entries for functions with the
5642 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
5643 (build_rtti_vtbl_entries): Reorganize machinery for building things
5644 at negative offsets.
5646 * optimize.c (expand_call_inline): Don't recurse into the code
5647 used to initialize the parameters more than once.
5649 2000-06-11 Mark Mitchell <mark@codesourcery.com>
5651 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
5652 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
5653 (find_substitution): Only use the `Sa' substitution for
5654 std::allocator, not instantiations of it.
5655 (write_template_prefix): Move comment. Only use a TREE_LIST to
5656 represent substitutions for a member template.
5657 (write_array_type): Mangle array dimensions correctly.
5658 * optimize.c (maybe_clone_body): Copy more information from the
5660 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
5661 on the regenerated declaration.
5663 2000-06-11 Chip Salzenberg <chip@valinux.com>
5664 Mark Mitchell <mark@codesourcery.com>
5666 * class.c (build_vtable): Clarify comment.
5667 (build_ctor_vtbl_group): Pass the most derived type to
5670 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5672 * decl2.c (compare_options): Don't needlessly cast away const-ness.
5674 2000-06-10 Mark Mitchell <mark@codesourcery.com>
5676 * decl.c (add_binding): Handle duplicate declarations of external
5679 2000-06-09 Chip Salzenberg <chip@valinux.com>
5680 Mark Mitchell <mark@codesourcery.com>
5682 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
5684 (write_signed_number): New macro.
5685 (write_unsigned_number): Likewise.
5686 (write_source_name): Use them.
5687 (write_number): Handle signed and unsigned values.
5688 (write_integer_cst): Use tree_int_cst_sgn, and use
5689 write_unsigned_number or write_signed_number as appropriate.
5690 (write_discriminator): Use write_unsigned_number or
5691 write_signed_number as appropriate.
5692 (write_template_arg_literal): Likewise.
5693 (write_array_type): Use tree_low_cst.
5694 (write_template_parm): Use write_unsigned_number or
5695 write_signed_number as appropriate.
5696 (write_substitution): Adjust call to write_number.
5697 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
5698 (write_expression): Handle non-type template arguments of
5699 reference type correctly.
5700 (mangle_thunk): Use write_signed_number.
5702 2000-06-09 Chip Salzenberg <chip@valinux.com>
5704 * mangle.c (find_substition): Don't mangle objects with typename
5705 substitutions (e.g. "cin" as "Si").
5707 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
5709 * call.c (add_candidate): Use ggc_alloc_cleared.
5710 * decl.c (lookup_label): Likewise.
5711 * lex.c (retrofit_lang_decl): Likewise.
5713 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
5715 * semantics.c (expand_body): Push to TV_EXPAND.
5716 * optimize.c (optimize_function): Push to TV_INTEGRATION.
5717 * decl.c (start_function): Always call announce_function.
5719 * tinfo2.cc: Just declare abort.
5721 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
5723 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
5724 whenever @ is a symbolic name.
5726 2000-06-08 Jakub Jelinek <jakub@redhat.com>
5728 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
5730 2000-06-07 Mark Mitchell <mark@codesourcery.com>
5732 * decl.c (pushdecl): Look up functions by DECL_NAME, not
5733 DECL_ASSEMBLER_NAME.
5735 2000-06-06 Mark Mitchell <mark@codesourcery.com>
5737 * decl2.c (c_language): Define.
5739 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
5741 * lex.c (lang_init_options): Tweak.
5743 * decl2.c: Remove #inclusion of diagnostic.h
5744 (lang_decode_option): Move diagnostic formatting options to
5747 * lang-options.h: Remove documentation for diagnostic options.
5749 * Makefile.in (lex.o): Depends upon diagnostic.h
5751 2000-06-06 Mark Mitchell <mark@codesourcery.com>
5753 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
5754 the same DECL_RESULT, it's not a redefinition.
5755 * pt.c (tsubst_decl): Remove code to handle illegal
5758 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
5760 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
5762 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
5764 * search.c (maybe_suppress_debug_info): Don't check
5765 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
5767 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
5770 Remember instantiation context in deferred instantiations.
5771 * cp-tree.h (struct tinst_level): Remove.
5772 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
5773 * pt.c (current_tinst_level): Now a tree.
5774 (print_template_context, push_tinst_level, pop_tinst_level,
5775 tinst_for_decl): Adjust.
5776 (reopen_tinst_level): New fn.
5777 (init_pt): Register current_tinst_level as a root.
5778 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
5779 of the pending templates list.
5780 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
5781 * lex.c (extract_interface_info): Adjust.
5782 * decl2.c (warn_if_unknown_interface): Adjust.
5784 2000-06-05 Mark Mitchell <mark@codesourcery.com>
5786 * class.c (indirect_primary_base_p): New function.
5787 (determine_primary_base): Use it.
5789 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
5791 Update new-abi dynamic cast algorithm.
5792 * tinfo.cc (__class_type_info::__dyncast_result): Add
5793 whole_details. Adjust constructor.
5794 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
5795 Avoid unnecessary searching.
5796 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
5798 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5800 * decl.c (init_decl_processing): Don't call record_component_aliases.
5801 * tree.c (build_cplus_array_type_1): Likewise.
5803 2000-06-04 Mark Mitchell <mark@codesourcery.com>
5805 * ir.texi: Correct typo.
5806 * mangle.c (write_expression): Handle non-type template arguments
5807 with reference type.
5808 * method.c (build_overload_value): Likewise.
5809 * pt.c (convert_nontype_argument): Explicitly represent conversion
5810 to a reference with an ADDR_EXPR.
5811 (unify): Always unify arguments in left-to-right order.
5813 2000-06-03 Alex Samuel <samuel@codesourcery.com>
5814 Mark Mitchell <mark@codesourcery.com>
5816 * Make-lang.in (CXX_SRCS): Add mangle.c.
5817 * Makefile.in (CXX_OBJS): Add mangle.o.
5818 (mangle.o): New rule.
5820 * class.c (local_classes): New variable.
5821 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
5822 (get_vtt_name): Use mangle_vtt_name for new ABI.
5823 (init_class_processing): Initialize local_classes.
5824 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
5825 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
5826 (std_identifier): New macro.
5827 (DECL_VOLATILE_MEMFUNC_P): New macro.
5828 (DECL_NAMESPACE_STD_P): Likewise.
5829 (local_classes): Declare.
5830 (get_mostly_instantiated_function_type): Declare.
5831 (init_mangle): Declare.
5832 (mangle_decl): Likewise.
5833 (mangle_type_string): Likewise.
5834 (mangle_type): Likewise.
5835 (mangle_typeinfo_for_type): Likewise.
5836 (mangle_typeinfo_string_for_type): Likewise.
5837 (mangle_vtbl_for_type): Likewise.
5838 (mangle_vtt_for_type): Likewise.
5839 (mangle_ctor_vtbl_for_type): Likewise.
5840 (mangle_thunk): Likewise.
5841 (mangle_conv_op_name_for_type): Likewise.
5842 (mangle_guard_variable): Likewise.
5843 * decl.c (pushtag): Keep track of local classes.
5844 (initialize_predefined_identifiers): Initialize std_identifier.
5845 (init_decl_processing): Use std_identifier.
5846 (start_decl): Don't treat instantiations as specializations.
5847 (grokdeclarator): Likewise.
5848 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
5849 name for fully-instantiated templates.
5850 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
5851 destructors with the new ABI.
5852 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
5853 (grokfield): Use mangle_type for new ABI.
5854 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
5855 (get_sentry): Use mangle_guard_variable for new ABI.
5856 (start_static_initialization_or_destruction): Likewise.
5857 * expr.c (extract_aggr_init): Remove.
5858 (extract_scalar_init): Likewise.
5859 (extract_init): Remove #if 0'd code.
5860 * mangle.c: New function.
5861 * method.c (build_mangled_name): Assert not flag_new_abi.
5862 (build_static_name): Likewise.
5863 (build_decl_overload_real): Likewise.
5864 (build_typename_overload): Likewise.
5865 (build_overload_with_type): Likewise.
5866 (build_overload_name): Likewise.
5867 (get_ctor_vtbl_name): Likewise.
5868 (start_squangling): Likewise.
5869 (get_id_2): Likewise.
5870 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
5871 (init_method): Call init_mangle for new ABI.
5872 (make_thunk): Call mangle_thunk for new ABI.
5873 * operators.def: Correct new ABI manglings for the `%' operator.
5875 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
5876 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
5877 (lookup_template_class): Call mangle_decl for new ABI.
5878 (get_mostly_instantiated_function_type): New function.
5879 (set_mangled_name_for_template_decl): Use it.
5880 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
5881 the new ABI. Use mangle_conv_op_name_for_type for instantiated
5882 conversion op names.
5883 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
5884 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
5885 (tinfo_base_init): Likewise. Mangle typeinfo string name with
5886 mangle_typeinfo_string_for_type.
5888 2000-06-03 Mark Mitchell <mark@codesourcery.com>
5890 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
5891 (INNERMOST_TEMPLATE_ARGS): New macro.
5892 (innermost_args): Remove.
5893 (get_innermost_template_args): New function.
5894 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
5895 * error.c (dump_function_decl): Be caution when using
5896 most_general_template.
5897 * method.c (build_template_parm_names): Use
5898 INNERMOST_TEMPLATE_ARGS.
5899 * pt.c (add_to_template_args): Tidy comment
5900 (get_innermost_template_args): New function.
5901 (check_explicit_specialization): Clear DECL_INITIAL for a new
5903 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
5905 (push_template_decl): Always register specializations of the most
5907 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
5908 (coerce_template_parms): Likewise.
5909 (lookup_template_class): Likewise.
5910 (innermost_args): Remove.
5911 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
5912 (tsubst_decl): Handle tricky specializations. Use
5913 get_innermost_template_args.
5914 (instantiate_template): Simplify handling of partial
5916 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
5917 (most_general_template): Reimplement, in a more straightforward
5919 (regenerate_decl_from_template): Tweak formatting. Use
5920 TMPL_ARGS_DEPTH for clarity.
5921 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
5923 * dump.c (dequeue_and_dump): Dump information about thunks.
5925 2000-06-01 Richard Henderson <rth@cygnus.com>
5927 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
5929 2000-06-01 Richard Henderson <rth@cygnus.com>
5931 * decl2.c (unsupported_options): Fix typo, make const.
5932 (lang_decode_option): Fix bsearch argument order.
5934 2000-06-01 Mark Mitchell <mark@codesourcery.com>
5936 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
5939 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5941 * cp-tree.h (c_get_alias_set): Deleted.
5942 * Makefile.in (decl.o): Include ../expr.h.
5943 * decl.c (expr.h): Include.
5944 (init_decl_processing): Call record_component_aliases for arrays.
5945 (grokdeclarator): Likewise.
5946 Set TREE_ADDRESSABLE for fields that aren't bitfields.
5947 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
5949 2000-05-31 Mark Mitchell <mark@codesourcery.com>
5951 Remove guiding declaration support.
5952 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
5953 (flag_guiding_decls): Remove.
5954 * call.c (build_user_type_conversion_1): Remove support for
5956 (build_new_function_call): Likewise.
5957 (build_new_op): Likewise.
5958 (build_new_method_call): Likewise.
5959 * decl.c (start_function): Likewise.
5960 * friend.c (is_friend): Likewise.
5961 (do_friend): Likewise.
5962 * decl2.c ((flag_dump_translation_unit): Make it const.
5963 (flag_guiding_decls): Remove.
5964 (unsupported_options): New variable
5965 (compare_options): New function.
5966 (lang_decode_option): Use them.
5968 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
5970 * method.c (mangle_expression): Adjust test for legal expression
5973 * pt.c (instantiate_decl): Save and restore the local
5974 specializations list.
5976 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
5978 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
5980 2000-05-30 Mark Mitchell <mark@codesourcery.com>
5982 * call.c (add_template_candidate_real): Handle member template
5983 constructors for classes with virtual bases.
5984 (build_user_type_conversion_1): Use in_charge_arg_for_name.
5985 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
5987 * ir.texi: Update thunk documentation.
5989 * call.c (joust): Fix handling of overloaded builtin operators.
5991 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
5993 * cp-tree.h (DECL_ANTICIPATED): New macro.
5994 Document new use of DECL_LANG_FLAG_7.
5995 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
5996 in the user namespace.
5997 * lex.c (do_identifier): If the identifier's declaration has
5998 DECL_ANTICIPATED on, it has not yet been declared. But do not
5999 replace it with an ordinary implicit declaration.
6001 * tinfo2.cc: Include stdlib.h.
6003 2000-05-29 Mark Mitchell <mark@codesourcery.com>
6005 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
6006 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
6009 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
6011 * decl2.c (lang_decode_option): Use skip_leading_substring instead
6014 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
6016 * operators.def (<?): Duplicated, should have been...
6019 2000-05-27 Alex Samuel <samuel@codesourcery.com>
6020 Mark Mitchell <mark@codesourcery.com>
6022 * cp-tree.h (ansi_opname): Make it a macro.
6023 (ansi_assopname): Likewise.
6024 (struct lang_decl_flags): Add assignment_operator_p.
6025 (struct lang_decl): Add operator_code.
6026 (DECL_VTT_PARM): Adjust.
6027 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
6028 overloaded operator.
6029 (SET_OVERLOADED_OPERATOR_CODE): New macro.
6030 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
6031 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
6032 (opname_tab): Remove.
6033 (assignop_tab): Likewise.
6034 (operator_name_info_t): New type.
6035 (operator_name_info): New variable.
6036 (assignment_operator_name_info): Likewise.
6037 (build_cp_library_fn): Remove declaration.
6038 (push_cp_library_fn): Likewise.
6039 (operator_name_string): Likewise.
6040 (build_decl_overload): Likewise.
6041 * call.c (print_z_candidates): Simplify.
6042 (build_object_call): Adjust usage of ansi_opname. Use
6043 DECL_OVERLOADED_OPERATOR_P.
6044 (op_error): Adjust operator name lookup.
6045 (build_conditional_expr): Adjust usage of ansi_opname.
6046 (build_new_op): Likewise.
6047 (build_op_delete_call): Likewise.
6048 (build_over_call): Likewise.
6049 (joust): Use DECL_OVERLOADED_OPERATOR_P.
6050 * decl.c (duplicate_decls): Copy operator_code.
6051 (init_decl_processing): Adjust parameters to push_cp_library_fn.
6052 (builtin_function): Adjust parameters to build_library_fn_1.
6053 (build_library_fn_1): Accept an overloaded operator code.
6054 (build_library_fn): Pass ERROR_MARK.
6055 (build_cp_library_fn): Accept an overloaded operator code.
6056 (push_cp_library_fn): Likewise.
6057 (grokfndecl): Tweak.
6058 (grokdeclarator): Simplify code to compute names of overloaded
6059 operators. Adjust use of ansi_opname.
6060 (ambi_op_p): Work on tree_codes, not identifiers.
6061 (unary_op_p): Likewise.
6062 (grok_op_properties): Likewise.
6063 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
6064 (lang_mark_tree): Don't try to mark the operator_code.
6065 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
6066 * error.c (dump_decl): Remove special handling for operator
6068 (dump_function_name): Likewise.
6069 (dump_expr): Adjust name lookup of operators.
6070 (op_to_string): Simplify.
6071 (assop_to_string): Likewise.
6072 * init.c (build_new_1): Adjust use of ansi_opname.
6073 * lex.c (opname_tab): Remove.
6074 (assignop_tab): Likewise.
6075 (ansi_opname): Likewise.
6076 (ansi_assopname): Likewise.
6077 (operator_name_string): Likewise.
6078 (reinit_lang_specific): Likewise.
6079 (operator_name_info): New variable.
6080 (assignment_operator_name_info): Likewise.
6081 (init_operators): New function.
6082 (init_parse): Use it.
6083 (do_identifier): Adjust use of ansi_opname.
6084 * method.c (mangle_expression): Don't use ansi_opname for
6086 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
6087 (build_decl_overload): Remove.
6088 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
6089 (do_build_assign_ref): Adjust use of ansi_opname.
6090 (synthesize_method): Likewise.
6091 (implicitly_declare_fn): Likewise.
6092 * operators.def: New file.
6093 * parse.y (operator): Adjust use of ansi_opname.
6094 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
6095 (set_mangled_name_for_template_decl): Don't play games with
6097 (special_function_p): Adjust use of ansi_opname.
6098 * typeck.c (check_return_expr): Likewise.
6099 * Make-lang.in (cc1plus): Depend on operators.def.
6100 * Makefile.in (lex.o): Likewise.
6103 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
6105 * Make-lang.in (cplib2.ready): Eradicate.
6107 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6109 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
6110 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
6111 (built_min, cp_tree_equal): Likewise.
6113 2000-05-26 Mark Mitchell <mark@codesourcery.com>
6115 * class.c (layout_nonempty_base_or_field): Replace
6116 `record_layout_info' with `record_layout_info_s'.
6118 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
6121 * cp-tree.h (struct language_function): x_named_labels is now
6122 a struct named_label_list*.
6123 * decl.c (struct named_label_use_list): Renamed from...
6124 (struct named_label_list): ...this. New struct.
6125 (push_binding_level): Don't set eh_region.
6126 (note_level_for_eh): New fn.
6127 (pop_label): Take label and old value directly.
6128 (pop_labels): Adjust for new named_labels format.
6129 (lookup_label): Likewise.
6130 (poplevel): Note characteristics of a binding level containing a
6131 named label. Mess with named label lists earlier.
6132 (mark_named_label_lists): New fn.
6133 (mark_lang_function): Call it.
6134 (use_label): New fn, split out from...
6135 (make_label_decl): ...here. Don't call it.
6136 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
6137 check_previous_gotos): New fns, split out from...
6138 (define_label): ...here.
6139 (check_switch_goto): New fn.
6140 (define_case_label): Call it.
6141 (check_goto): New fn.
6142 * semantics.c (finish_goto_stmt): Call it and use_label.
6143 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
6144 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
6146 2000-05-26 Mark Mitchell <mark@codesourcery.com>
6148 * class.c (build_vtable_entry_ref): Correct usage of
6149 get_vtbl_decl_for_binfo.
6151 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
6152 * method.c (implicitly_declare_fn): Not here.
6154 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
6156 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
6157 (CPTI_PTMD_DESC_TYPE): ... here.
6158 (ptmd_desc_type_node): Rename to ...
6159 (ptm_desc_type_node): ... here.
6161 * rtti.c (ptmd_initializer): Rename to ...
6162 (ptm_initializer): ... here.
6163 (sythesize_tinfo_var): Adjust. Deal with pointer to member
6165 (create_tinfo_types): Adjust.
6167 2000-05-25 Mark Mitchell <mark@codesourcery.com>
6169 Finish implementation of VTTs.
6170 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
6171 CPTI_VTT_PARM_IDENTIFIER.
6172 (vtt_parm_identifier): New macro.
6173 (vtt_parm_type): Likewise.
6174 (BINFO_SUBVTT_INDEX): Likewise.
6175 (BINFO_VPTR_INDEX): Likewise.
6176 (struct lang_decl): Add vtt_parm.
6177 (DECL_VTT_PARM): New macro.
6178 (DECL_USE_VTT_PARM): Likewise.
6179 (DECL_NEEDS_VTT_PARM_P): Likewise.
6180 (get_vtt_name): Declare.
6181 (build_artifical_parm): Likewise.
6182 (fixup_all_virtual_upcast_offsets): Likewise.
6183 (expand_indirect_vtbls_init): Remove.
6184 * call.c (build_new_method_call): Pass the vtt to subobject
6185 constructors and destructors.
6186 * class.c (get_vtt_name): Give it external linkage.
6187 (build_clone): Handle the magic VTT parameters for clones.
6188 (clone_function_decl): Fix typo in comment.
6189 (build_vtt): Keep track of the indices in the VTTs where various
6190 entities are stored.
6191 (build_vtt_inits): Likewise.
6192 (dfs_build_vtt_inits): Likewise.
6193 (build_ctor_vtbl_group): Tweak type of construction vtables.
6194 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
6195 primary bases, when building construction vtables.
6196 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
6197 (initialize_predefined_identifiers): Add vtt_parm_identifier.
6198 (init_decl_processing): Initialize vtt_parm_type.
6199 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
6200 (lang_mark_tree): Make vtt_parm.
6201 * decl2.c (build_artificial_parm): New function.
6202 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
6203 (grokclassfn): Use build_artificial_parm.
6204 * init.c (initialize_vtbl_ptrs): Call
6205 fixup_all_virtual_upcast_offsets directly.
6206 (perform_member_init): Use the complete subobject destructor for
6208 (build_vtbl_address): New function.
6209 (expand_virtual_init): Handle VTTs.
6210 * optimize (maybe_clone_body): Likewise.
6211 * search.c (fixup_all_virtual_upcast_offsets): Give it external
6213 (expand_indirect_vtbls_init): Remove.
6214 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
6215 * tree.c (make_binfo): Make them bigger.
6217 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
6219 * inc/cxxabi.h (__pbase_type_info): Define, based on
6220 __pointer_type_info.
6221 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
6222 (__pointer_to_member_type_info): Likewise.
6223 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
6224 (__pointer_to_member_type_info::__is_pointer_p): Remove.
6225 (__pointer_type_info::__do_catch): Rename to ...
6226 (__pbase_type_info::__do_catch): ... here. Adjust.
6227 (__pbase_type_info::__pointer_catch): Implement.
6228 (__pointer_type_info::__pointer_catch): Adjust.
6229 (__pointer_to_member_type_info::__pointer_catch): Adjust.
6231 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
6233 * tinfo.h (__user_type_info::contained_virtual_p): New
6235 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
6237 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
6238 diamond shaped heirarchy. Add early out for mixed diamond and
6239 duplicate shaped heirarchy.
6241 2000-05-24 Mark Mitchell <mark@codesourcery.com>
6243 * cp-tree.h (build_delete): Change prototype.
6244 (build_vec_delete): Likewise.
6245 * call.c (build_scoped_method_call): Use special_function_kind
6246 values to indicate the kind of destruction to be done.
6247 (build_method_call): Likewise.
6248 * decl.c (finish_destructor_body): Likewise.
6249 (maybe_build_cleanup_1): Likewise. Rename to ...
6250 (maybe_build_cleanup): ... this.
6251 * decl2.c (delete_sanity): Use special_function_kind
6252 values to indicate the kind of destruction to be done.
6253 (build_cleanup): Likewise.
6254 * init.c (perform_member_init): Likewise.
6255 (build_vec_delete_1): Likewise.
6256 (build_dtor_call): Simplify.
6257 (build_delete): Use special_function_kind
6258 values to indicate the kind of destruction to be done.
6259 (build_vbase_delete): Likewise.
6260 (build_vec_delete): Likewise.
6262 * init.c (sort_member_init): Fix typo in error message generation
6265 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
6267 * semantics.c (begin_class_definition): make the packed
6268 attribute be sensitive to the "-fpack-struct" command line flag
6270 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
6272 Update new-abi upcast algorithm.
6273 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
6274 prototype and meaning of return value.
6275 (__si_class_type_info::__do_upcast): Likewise.
6276 (__vmi_class_type_info::__do_upcast): Likewise.
6277 * tinfo.cc (__class_type_info::__upcast_result): Replace
6278 whole2dst with part2dst. Adjust ctor.
6279 (__class_type_info::__do_upcast): Adjust call of worker function.
6280 (__class_type_info::__do_upcast): Adjust.
6281 (__si_class_type_info::__do_upcast): Adjust. Use parent's
6283 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
6284 virtual base in diamond heirarchy bug.
6286 2000-05-23 Mark Mitchell <mark@codesourcery.com>
6288 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
6289 and bitfield to tinfo_fn_p.
6290 (DECL_TINFO_FN_P): Adjust.
6291 (SET_DECL_TINFO_FN_P): Likewise.
6292 (DECL_MUTABLE_P): Likewise.
6293 (DECL_C_BIT_FIELD): Likewise.
6294 (SET_DECL_C_BIT_FIELD): Likewise.
6295 (CLEAR_DECL_C_BIT_FIELD): Likewise.
6296 (DECL_UNINLINABLE): Likewise.
6297 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
6298 (handle_using_decl): Remove assertion.
6299 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
6300 to build FIELD_DECLs.
6301 (build_base_field): Likewise.
6302 (layout_class_type): Likewise.
6303 * decl.c (init_decl_processing): Likewise.
6304 (build_ptrmemfunc_type): Likewise.
6305 (grokdeclarator): Likewise.
6306 * decl2.c (grok_x_components): Likewise.
6307 * except.c (call_eh_info): Likewise.
6308 * init.c (init_init_processing): Likewise.
6309 * rtti.c (expand_class_desc): Likewise.
6310 (create_pseudo_type_info): Likewise.
6311 (get_vmi_pseudo_type_info): Likewise.
6312 (create_tinfo_types): Likewise.
6313 * ptree.c (print_lang_decl): Adjust.
6314 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
6315 before checking DECL_MUTABLE_P.
6317 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
6318 parameters for template functions.
6319 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
6320 destructors as well as constructors.
6322 2000-05-22 Mark Mitchell <mark@codesourcery.com>
6324 * class.c (build_ctor_vtbl_group): Set inits.
6325 * optimize.c (maybe_clone_body): Set DECL_INLINE and
6326 DECL_THIS_INLINE appropriately for clones.
6328 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
6329 (DECL_CONV_FN_P): Simplify.
6330 (DECL_OPERATOR): Remove.
6331 (language_to_string): Declare.
6332 * decl.c (duplicate_decls): Fix typo in comment.
6333 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
6334 (grok_op_properties): Use DECL_CONV_FN_P instead of
6335 IDENTIFIER_TYPENAME_P.
6336 * dump.c (dequeue_and_dump): Dump the language linkage of
6338 * error.c (language_to_string): Give it external linkage.
6339 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
6340 (implicitly_declare_fn): Set DECL_LANGUAGE.
6341 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
6342 IDENTIFIER_TYPENAME_P.
6343 (tsubst_decl): Likewise.
6344 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
6345 * semantics.c (finish_member_declaration): Don't mark members of
6346 classes declared in an extern "C" region as extern "C".
6348 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6350 * decl2.c (qualified_lookup_using_namespace): Look through
6353 * decl.c (push_using_decl): Return the old decl on namespace level.
6355 2000-05-21 Mark Mitchell <mark@codesourcery.com>
6357 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
6358 (VTT_NAME_PREFIX): New macro.
6359 (CTOR_VTBL_NAME_PREFIX): Likewise.
6360 (get_ctor_vtbl_name): New function.
6361 * class.c (get_vtable_name): Simplify.
6362 (get_vtt_name): New function.
6363 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
6364 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
6365 when a virtual base becomes primary.
6366 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
6368 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
6369 additional parameters.
6370 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
6371 (initialize_array): New function.
6372 (build_vtt): Likewise.
6373 (build_vtt_inits): Likewise.
6374 (dfs_build_vtt_inits): Likewise.
6375 (dfs_fixup_binfo_vtbls): Likewise.
6376 (build_ctor_vtbl_group): Likewise.
6377 (initialize_vtable): Use initialize_array.
6378 (accumulate_vtbl_inits): Reimplement to handle construction
6380 (dfs_accumulate_vtbl_inits): Likewise.
6381 (bulid_vtbl_initializer): Adjust parameter name.
6382 * method.c (build_typename_overload): Remove #if 0'd code.
6383 (get_ctor_vtbl_name): New function.
6384 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
6385 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
6387 * cp-tree.h (struct lang_type): Remove search_slot.
6388 (CLASSTYPE_SEARCH_SLOT): Remove.
6389 (emit_base_init): Change prototype.
6390 (initialize_vtbl_ptrs): Likewise.
6391 (expand_indirect_vtbls_init): Likewise.
6392 (clear_search_slots): Remove.
6393 * decl.c (lang_mark_tree): Don't mark search_slot.
6394 * init.c (initialize_vtbl_ptrs): Simplify.
6395 (emit_base_init): Likewise.
6396 * search.c (struct vbase_info): Document decl_ptr.
6397 (convert_pointer_to_single_level): Remove.
6398 (dfs_find_vbases): Remove.
6399 (dfs_init_base_pointers): Simplify.
6400 (dfs_clear_vbase_slots): Remove.
6401 (dfs_vtable_path_unmark): New function.
6402 (init_vbase_pointers): Simplify.
6403 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
6404 (expand_indirect_vtbls_init): Simplify. Don't call
6405 mark_all_temps_used.
6406 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
6407 initialize_vtbl_ptrs.
6409 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
6411 * except.c: Add static prototypes.
6413 2000-05-20 H.J. Lu <hjl@gnu.org>
6415 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
6417 2000-05-19 Mark Mitchell <mark@codesourcery.com>
6419 Don't create a separate copy of virtual bases for the
6420 CLASSTYPE_VBASECLASSES list.
6421 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
6422 (BINFO_FOR_VBASE): Remove.
6423 (CANONICAL_BINFO): Adjust.
6424 (binfo_for_vbase): New function.
6425 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
6426 instead of BINFO_FOR_VBASE.
6427 (build_vbase_pointer): Likewise.
6428 (build_secondary_vtable): Likewise.
6429 (dfs_mark_primary_bases): Likewise.
6430 (mark_primary_bases): Likewise.
6431 (layout_nonempty_base_or_field): Likewise.
6432 (dfs_set_offset_for_shared_vbases): Likewise.
6433 (dfs_set_offset_for_unshared_vbases): Likewise.
6434 (layout_virtual_bases): Likewise. Adjust for changes to the
6435 CLASSTYPE_VBASECLASSES list.
6436 (dump_class_hierarchy_r): Use binfo_for_vbase
6437 instead of BINFO_FOR_VBASE.
6438 (dump_class_hierarchy): Likewise.
6439 (finish_vtbls): Likewise.
6440 (build_vtbl_initializer): Adjust for changes to the
6441 CLASSTYPE_VBASECLASSES list.
6442 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
6443 * decl.c (finish_destructor_body): Adjust for changes to the
6444 CLASSTYPE_VBASECLASSES list.
6445 * init.c (sort_base_init): Use binfo_for_vbase.
6446 (construct_virtual_bases): Adjust for changes to the
6447 CLASSTYPE_VBASECLASSES list.
6448 (expand_member_init): Use binfo_for_vbase.
6449 (build_vbase_delete): Adjust for changes to the
6450 CLASSTYPE_VBASECLASSES list.
6451 * method.c (do_build_copy_constructor): Likewise.
6452 * rtti.c (get_base_offset): Use binfo_for_vbase.
6453 (expand_class_desc): Remove #if 0'd code.
6454 * search.c (struct vbase_info): Remove vbase_types.
6455 (get_base_distance): Use binfo_for_vbase.
6456 (lookup_field_queue_p): Use CANONICAL_BINFO.
6457 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
6458 (get_pure_virtuals): Adjust for changes to the
6459 CLASSTYPE_VBASECLASSES list.
6460 (dfs_find_vbases): Use binfo_for_vbase.
6461 (dfs_init_vbase_pointers): Likewise.
6462 (init_vbase_pointers): Don't initialize vi.vbase_types.
6463 (virtual_context): Use binfo_for_vbase.
6464 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
6465 CLASSTYPE_VBASECLASSES list.
6466 (expand_indirect_vtbls_init): Simplify.
6467 (dfs_get_vbase_types): Don't replicate virtual bases.
6468 (find_vbase_instance): Use binfo_for_vbase.
6469 (binfo_for_vbase): New function.
6470 * typeck.c (get_delta_difference): Use binfo_for_vbase.
6472 2000-05-17 Mark Mitchell <mark@codesourcery.com>
6474 * decl2.c (finish_anon_union): Generalize error messages to handle
6475 anonymous structures.
6476 * init.c (perform_member_init): Remove `name' parameter.
6477 (build_field_list): New function.
6478 (sort_member_init): Handle anonymous union initialization order
6479 correctly. Check for multiple initializations of the same union.
6480 (emit_base_init): Don't look up fields by name here.
6481 (expand_member_init): Record the result of name lookup for future
6483 * typeck.c (build_component_ref): Fix formatting.
6485 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
6487 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
6488 * typeck.c (build_x_compound_expr): Replace warn_unused with
6491 * decl2.c (lang_decode_option): Update -Wall unused flags by
6492 calling set_Wunused.
6494 2000-05-16 Mark Mitchell <mark@codesourcery.com>
6496 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
6497 * init.c (dfs_vtable_path_unmark): Remove.
6498 * search.c (marked_new_vtable_p): Likewise.
6499 (unmarked_new_vtable_p): Likewise.
6500 (dfs_search_slot_nonempty_p): Likewise.
6501 (dfs_mark): Likewise.
6502 (dfs_vtable_path_unmark): Likewise.
6503 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
6504 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
6505 (dfs_init_vbase_pointers): Remove special-case new ABI code.
6506 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
6507 (init_vbase_pointers): Simplify.
6508 (expand_indirect_vtbls_init): Likewise.
6510 * class.c (copy_virtuals): New function.
6511 (build_primary_table): Use it.
6512 (build_secondary_vtable): Likewise.
6513 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
6514 indicate that no vcall offset is required.
6515 (add_virtual_function): Likewise.
6516 (modify_all_vtables): Likewise.
6517 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
6518 (dfs_accumulate_vtbl_inits): Likewise.
6519 (build_vtbl_initializer): Make changes to handle construction
6521 (dfs_build_vcall_offset_vtbl_entries): Likewise.
6522 (build_rtti_vtbl_entries): Likewise.
6523 (build_vtable_entries): Handle a NULL vcall_index.
6525 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
6527 * decl2.c (lang_decode_option): Fix thinko.
6529 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
6531 * except.c (check_handlers): New fn.
6532 * cp-tree.h: Declare it.
6533 * semantics.c (finish_handler_sequence): Call it.
6534 (finish_function_handler_sequence): Likewise.
6535 (finish_handler_parms): Set TREE_TYPE on the handler.
6536 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
6537 * search.c (get_base_distance_recursive): If protect>1, ignore
6539 (get_base_distance): Don't reduce watch_access.
6541 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
6543 * lex.c: #include diagnostic.h.
6544 (lang_init_options): Set default prefixing rules.
6546 * lang-options.h: Add -fdiagnostics-show-location=.
6548 * decl2.c: #include diagnostic.h.
6549 (lang_decode_option): Handle -fdiagnostics-show-location=.
6551 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
6553 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
6554 * vec.cc: Revert my 2000-05-07 change.
6556 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
6558 * class.c (check_field_decls): Complain about non-static data
6559 members with same name as class in class with constructor.
6561 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
6563 * decl.c (grokdeclarator): Allow non-static data members with
6566 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
6568 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
6569 and pending_inline.filename. Update prototypes.
6570 * decl.c (define_label): Constify filename parameter.
6571 * decl2.c (warn_if_unknown_interface): Constify local char *.
6572 * input.c Constify input_source.filename. Don't declare
6573 input_filename or lineno. Constify filename parameter to feed_input.
6574 * lex.c (init_parse): Constify parameter and return value.
6575 (cp_pragma_interface, cp_pragma_implementation): Constify
6577 (reinit_parse_for_method, reinit_parse_for_block,
6578 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
6579 Constify local char *.
6580 * pt.c: Don't declare lineno or input_filename.
6581 (print_template_context, tsubst_friend_function, tsubst_decl,
6582 tsubst, instantiate_decl): Constify local char *.
6583 * semantics.c (expand_body): Constify local char *.
6584 * tree.c (build_srcloc): Constify filename parameter.
6585 * typeck.c (c_expand_asm_operands): Constify filename
6588 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
6590 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
6593 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
6595 * inc/cxxabi.h: Fix typos in comment.
6596 (__base_class_info::__offset): Use a static_cast.
6598 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
6600 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
6601 of std::size_t and std::ptrdiff_t respectively.
6602 * tinfo.cc: Likewise.
6605 2000-05-06 Richard Henderson <rth@cygnus.com>
6607 * typeck.c (build_c_cast): Don't warn integer->pointer size
6608 mismatch for constants.
6610 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
6612 * rtti.c (ptmd_initializer): Set non-public, if class is
6615 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
6616 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6617 __cxa_vec_delete): Likewise.
6618 * tinfo.cc (__dynamic_cast): Likewise.
6619 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6620 __cxa_vec_delete): Likewise.
6622 2000-05-04 Mark Mitchell <mark@codesourcery.com>
6624 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
6625 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
6626 (lang_decl_flags): Add vcall_offset.
6627 (THUNK_VCALL_OFFSET): Use it.
6628 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
6629 * method.c (make_thunk): Create the lang_decl here, not in
6631 (emit_thunk): Make generic thunks into ordinary functions once
6632 they have been fed to expand_body.
6633 * semantics.c (expand_body): Set current_function_is_thunk here.
6635 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6637 * class.c (update_vtable_entry_for_fn): Prototype.
6639 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
6642 * search.c (dfs_build_inheritance_graph_order): Prototype.
6644 2000-05-04 Mark Mitchell <mark@codesourcery.com>
6646 * cp-tree.h (special_function_kind): Add various kinds of
6648 (special_function_p): New function.
6649 * class.c (overrides): Don't let one kind of destructor override
6651 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
6652 whether or not to instantiate a template.
6653 * tree.c (special_function_p): Define.
6655 2000-05-03 Mark Mitchell <mark@codesourcery.com>
6657 * cp-tree.def (THUNK_DECL): Remove.
6658 * cp-tree.h (DECL_THUNK_P): New macro.
6659 (DECL_NON_THUNK_FUNCTION_P): Likewise.
6660 (DECL_EXTERN_C_FUNCTION_P): Likewise.
6661 (SET_DECL_THUNK_P): Likewise.
6662 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
6663 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
6664 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
6665 * decl.c (decls_match): Use DECL_EXTERN_C_P.
6666 (duplicate_decls): Likewise.
6667 (pushdecl): Likewise. Adjust thunk handling.
6668 (grokfndecl): Use DECL_EXTERN_C_P.
6669 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
6670 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
6671 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
6672 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
6673 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
6674 DECL_NO_STATIC_CHAIN.
6675 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
6676 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
6677 * search.c (covariant_return_p): Remove THUNK_DECL handling.
6680 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
6682 * tree.c (walk_tree): Set lineno.
6684 2000-05-01 Mark Mitchell <mark@codesourcery.com>
6686 * exception.cc: Update license notice.
6688 * new1.cc: Likewise.
6689 * new2.cc: Likewise.
6690 * tinfo.cc: Likewise.
6691 * tinfo2.cc: Likewise.
6693 * inc/cxxabi.h: Likewise.
6694 * inc/exception: Likewise.
6695 * inc/new: Likewise.
6696 * inc/new.h: Likewise.
6697 * inc/typeinfo: Likewise.
6699 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
6701 * tree.c (build_target_expr_with_type): If we already have a
6702 TARGET_EXPR, just return it.
6704 * optimize.c (initialize_inlined_parameters): Don't generate an
6705 EXPR_STMT if we can just use DECL_INITIAL.
6706 * decl.c (emit_local_var): Only make the initialization a
6707 full-expression if stmts_are_full_exprs_p.
6709 2000-05-01 Mark Mitchell <mark@codesourcery.com>
6711 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
6713 * call.c (standard_conversion): Use it.
6714 (direct_reference_binding): Likewise.
6715 (build_over_call): Likewise.
6716 (is_properly_derived_from): Likewise.
6717 (compare_ics): Likewise.
6718 * class.c (resolves_to_fixed_type_p): Likewise.
6719 * optimize.c (declare_return_variable): Likewise.
6720 * pt.c (is_specialization_of): Likewise.
6722 * typeck.c (comp_target_parms): Likeiwse.
6723 (build_static_cast): Likewise.
6724 (build_reinterpret_cast): Likewise.
6725 (build_const_cast): Likewise.
6726 (comp_ptr_ttypes_real): Likewise.
6727 (comp_ptr_ttypes_const): Likewise.
6728 * typeck2.c (process_init_constructor): Likewise.
6730 2000-04-30 Scott Snyder <snyder@fnal.gov>
6732 * decl.c (finish_destructor_body): Use the base destructor when
6733 destroying virtual bases.
6735 2000-04-30 Mark Mitchell <mark@codesourcery.com>
6737 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
6739 * optimize.c (struct inline_data): Add target_exprs field.
6740 (declare_return_variable): When a function returns an aggregate,
6741 use the variable declared in the TARGET_EXPR as the remapped
6743 (expand_call_inline): Update the pending target_exprs stack.
6744 (optimize_function): Initialize the stack.
6746 * decl2.c (finish_file): Fix typo in comment.
6748 * method.c (emit_thunk): Don't try to return a `void' value.
6750 * optimize.c (initialize_inlined_parameters): If the parameter is
6751 addressable, we need to make a new VAR_DECL, even if the
6752 initializer is constant.
6754 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
6756 * decl.c (grok_op_properties): Add an extra check of argtypes.
6758 2000-04-27 Mark Mitchell <mark@codesourcery.com>
6760 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
6762 (initialize_inlined_parameters): Try to avoid creating new
6765 2000-04-27 Alex Samuel <samuel@codesourcery.com>
6767 * lex.c (my_get_run_time): Remove.
6768 (init_filename_times): Use get_run_time instead of my_get_run_time.
6769 (check_newline): Likewise.
6770 (dump_time_statistics): Likewise.
6771 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
6772 of computing elapsed time explicitly.
6774 2000-04-26 Mark Mitchell <mark@codesourcery.com>
6776 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
6777 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
6778 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
6779 before calling decl_constant_value.
6780 * class.c (check_bitfield_decl): Likewise.
6781 * cvt.c (ocp_convert): Likewise.
6782 (convert): Likewise.
6783 * decl.c (compute_array_index_type): Likewise.
6784 (build_enumerator): Likewise.
6785 * decl2.c (check_cp_case_value): Likewise.
6786 * pt.c (convert_nontype_argument): Likewise.
6788 * typeck.c (decay_conversion): Likewise.
6789 (build_compound_expr): Likewise.
6790 (build_reinterpret_cast): Likewise.
6791 (build_c_cast): Likewise.
6792 (convert_for_assignment): Likewise.
6794 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
6796 * decl.c (finish_function): Don't play games with DECL_INLINE.
6798 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
6800 * ir.texi: Correct typo.
6802 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6804 * decl.c (grokdeclarator): Reject VLAs as members.
6806 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
6808 * call.c (standard_conversion): Accept conversion between
6811 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
6813 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
6815 * decl2.c (finish_file): Remove double setup for accounting
6818 2000-04-24 Robert Lipe <robertlipe@usa.net>
6820 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
6822 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
6824 * new.cc (set_new_handler): Needs to be in std::.
6826 2000-04-23 Mark Mitchell <mark@codesourcery.com>
6828 * cp-tree.h (lang_decl): Remove pretty_function_p.
6829 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
6830 language-specific node.
6831 * decl.c (cp_make_fname_decl): Use build_decl, not
6832 build_lang_decl, to build the variables.
6833 (grokvardecl): Don't call build_lang_decl for local variables in
6835 (grokdeclarator): Don't call build_lang_decl for local type
6836 declarations in templates.
6837 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
6838 zero'd memory, rather than calling memset.
6839 * pt.c: Include hashtab.h.
6840 (local_specializations): New variable.
6841 (retrieve_local_specialization): Use it.
6842 (register_local_specialization): Likewise.
6843 (tsubst_decl): Don't assume local variables have
6845 (instantiate_decl): Set up local_specializations.
6846 * Makefile.in (HTAB_H): New variable.
6848 2000-04-23 Richard Henderson <rth@cygnus.com>
6850 * typeck.c (c_expand_asm_operands): Restore the original
6851 contents of the output list.
6853 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
6855 * ir.texi: Document complex number representation.
6857 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
6859 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
6860 (target_incomplete_p): New function.
6861 (tinfo_base_init): Create comdat NTBS name variable.
6862 (ptr_initializer): Add non_public parameter. Calculate it.
6863 (ptmd_initializer): Likewise.
6864 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
6865 (create_real_tinfo_var): Add non_public parameter. Use it.
6866 Push proxy into global namespace.
6867 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
6869 * inc/typeinfo (type_info::before, type_info::operator==):
6870 Compare __name addresses.
6872 * tinfo2.cc: Remove new-abi builtins comment.
6874 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
6876 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
6878 * call.c (joust): Exit early if we get the same function, too.
6880 * decl2.c (key_method): Return NULL_TREE for template classes.
6881 (import_export_class): Don't need to check for template classes.
6883 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
6885 * lex.c: Remove references to cccp.c.
6887 2000-04-18 Mark Mitchell <mark@codesourcery.com>
6889 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
6890 volatile_memfunc. Add destructor_attr. Adjust dummy.
6891 (DECL_DESTRUCTOR_P): Use destructor_attr.
6892 (DECL_CONST_MEMFUNC_P): Reimplement.
6893 (DECL_VOLATILE_MEMFUNC_P): Remove.
6894 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
6895 (overrides): Use DECL_DESTRUCTOR_P.
6896 (check_for_override): Likewise.
6897 * decl.c (start_function): Likewise.
6898 * decl2.c (grokfclassfn): Likewise.
6899 (check_classfn): Likewise.
6900 (grok_function_init): Likewise.
6902 2000-04-17 Mark Mitchell <mark@codesourcery.com>
6904 * decl2.c (grokfield): Issue error on illegal data member
6907 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
6909 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
6911 2000-04-16 Mark Mitchell <mark@codesourcery.com>
6913 * class.c (build_vtable_entry): Don't build thunks for type-info
6916 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
6918 * decl.c (decls_match): Allow a redeclaration of a builtin to
6919 specify args while the builtin did not.
6921 2000-04-15 Mark Mitchell <mark@codesourcery.com>
6923 * cp-tree.def (THUNK_DECL): Add to documentation.
6924 * cp-tree.h (flag_huge_objects): Declare.
6925 * class.c (modify_vtable_entry): Tidy.
6926 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
6927 Calculate delta appropriately for the new ABI.
6928 (dfs_modify_vtables): Use it.
6929 (modify_all_vtables): Fix thinko in code to add overriding copies
6930 of functions to primary vtables.
6931 (build_clone): Fix typo in comment.
6932 (clone_function_decl): Correct order of destructors in vtable.
6933 (build_vbase_offset_vtbl_entries): Adjust comment.
6934 (dfs_vcall_offset_queue_p): Remove.
6935 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
6936 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
6937 (build_vtable_entry): Correct check for pure virtual functions.
6938 Don't declare flag_huge_objects.
6939 * decl.c (flag_huge_objects): Remove declaration.
6940 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
6941 Use int_size_in_bytes.
6942 (emit_thunk): Handle vcall offset thunks.
6944 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6946 * decl2.c (parse_time, varconst_time): Delete declarations.
6947 (finish_file): Delete LINENO declaration.
6948 START_TIME and THIS_TIME now long.
6950 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
6952 * class.c (build_base_field): Reformat comment.
6954 * inc/cxxabi.h (stddef.h): Comment inclusion.
6955 (__base_class_info::__offset): Comment shift.
6957 2000-04-12 Mark Mitchell <mark@codesourcery.com>
6959 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
6960 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
6961 (cp_push_exception_identifier): New macro.
6962 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
6963 (DECL_BASE_DESTRUCTOR_P): Likewise.
6964 (DECL_DELETING_DESTRUCTOR_P): Likewise.
6965 (get_vtbl_decl_for_binfo): Fix formatting.
6966 (in_charge_arg_for_name): New macro.
6967 (maybe_build_cleanup_and_delete): Remove declaration.
6968 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
6969 (in_charge_arg_for_name): New function.
6970 (build_new_method_call): Use it. Handle cloned destructors.
6971 (build_clone): Don't make the base constructor virtual.
6972 Automatically defer generated functions.
6973 (clone_function_decl): Handle destructors, too.
6974 (clone_constructors_and_destructors): Likewise.
6975 (create_vtable_ptr): Don't create a vtable entry for a cloned
6977 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
6978 (initialize_predefined_identifiers): Update appropriately.
6979 (finish_destructor_body): Simplify.
6980 (maybe_build_cleanup_and_delete): Remove.
6981 * except.c (expand_throw): Handle new-ABI destructors.
6982 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
6983 (build_dtor_call): New function.
6984 (build_delete): Use it. Simplify.
6985 * optimize.c (maybe_clone_body): Handle destructors.
6986 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
6988 * exception.cc (cleanup_fn): New typedef.
6989 (CALL_CLEANUP): New macro.
6990 (cp_eh_info): Use them.
6991 (__cp_push_exception): Likewise.
6992 (__cp_pop_exception): Likewise.
6994 2000-04-11 Mark Mitchell <mark@codesourcery.com>
6996 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
6997 (complete_dtor_identifier): New macro.
6998 (CLASSTYPE_FIRST_CONVERSION): Remove.
6999 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
7000 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
7001 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
7002 (CLASSTYPE_CONSTRUCTORS): Likewise.
7003 (CLASSTYPE_DESTRUCTORS): Likewise.
7004 (lang_decl): Add cloned_function.
7005 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
7006 (DECL_BASE_CONSTRUCTOR_P): Likewise.
7007 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
7008 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
7009 (DECL_CLONED_FUNCTION_P): Likewise.
7010 (DECL_CLONED_FUNCTION): Likewise.
7011 (clone_function_decl): Declare.
7012 (maybe_clone_body): Likewise.
7013 * call.c (build_user_type_conversion_1): Call complete object
7014 constructors in the new ABI.
7015 (build_new_method_call): Don't add in-charge parameters under the
7017 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
7018 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
7019 CLASSTYPE_DESTRUCTOR_SLOT.
7020 (build_clone): New function.
7021 (clone_function_decl): Likewise.
7022 (clone_constructors_and_destructors): Likewise.
7023 (check_bases_and_members): Use it.
7024 * decl.c (iniitialize_predefined_identifiers): Initialize
7025 complete_dtor_identifier.
7026 (finish_function): Don't add extra code to a clone.
7027 (lang_mark_tree): Mark cloned_function.
7028 * decl2.c (mark_used): Don't bother trying to instantiate things
7030 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
7031 * method.c (set_mangled_name_for_decl): Don't treat clones as
7033 (synthesize_method): Sythesize cloned functions, not the clones.
7034 * optimize.c (inline_data): Update comment on ret_label.
7035 (remap_block): Don't assume DECL_INITIAL exists.
7036 (copy_body_r): Allow ret_label to be NULL.
7037 (maybe_clone_body): Define.
7038 * pt.c (tsubst_decl): Handle clones.
7039 (instantiate_clone): New function.
7040 (instantiate_template): Use it.
7041 (set_mangled_name_for_template_decl): Don't treat clones as
7043 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
7044 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
7045 * semantics.c (expand_body): Clone function bodies as necessary.
7047 * optimize.c (remap_decl): Avoid sharing structure for arrays
7048 whose size is only known at run-time.
7049 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
7051 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
7052 to has_in_charge_parm_p.
7053 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
7054 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
7055 (DECL_COPY_CONSTRUCTOR_P): New macro.
7056 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
7057 (build_user_type_conversion_1): Likewise.
7058 (convert_like_real): Likewise.
7059 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
7060 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
7061 (copy_args_p): Likewise.
7062 (grok_ctor_properties): Likewise.
7063 (start_function): Likewise.
7064 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
7065 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
7066 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
7067 * method.c (do_build_copy_constructor): Use
7068 DECL_HAS_IN_CHARGE_PARM_P.
7069 (synthesize_method): Likewise.
7070 * pt.c (instantiate_template): Remove goto.
7071 * tree.c (build_cplus_method_type): Remove mention of obstacks in
7074 * cp-tre.h (finish_function): Change prototype.
7075 * decl.c (end_cleanup_fn): Adjust caller.
7076 (finish_function): Take only one parameter.
7077 * decl2.c (finish_objects): Adjust caller.
7078 (finish_static_storage_duration_function): Likewise.
7079 * method.c (emit_thunk): Likewise.
7080 * parse.y: Likewise.
7081 * parse.c: Regenerated.
7082 * pt.c (instantiate_decl): Likewise.
7083 * rtti.c (synthesize_tinfo_fn): Likewise.
7084 * semantics.c (expand_body): Likewise.
7086 * cp-tree.h (copy_decl): New function.
7087 * class.c (finish_struct_1): Use it.
7088 * lex.c (copy_decl): Define it.
7089 * pt.c (tsubst_decl): Likewise.
7090 * tree.c (copy_template_template_parm): Likewise.
7092 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
7093 has_nonpublic_assign_ref.
7094 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
7095 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
7096 * class.c (finish_struct_methods): Don't set
7097 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
7098 (interface_only): Don't declare.
7099 (interface_unknown): Likewise.
7101 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7103 * tree.h (HAVE_TEMPLATES): Remove definition.
7104 * lang-options.h (-fthis-is-variable): Remove documentation.
7106 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
7108 * class.c (instantiate_type): Handle object-relative template-id.
7110 * semantics.c (finish_expr_stmt): Call convert_to_void here.
7111 * decl.c (cplus_expand_expr_stmt): Not here.
7113 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
7114 Initialize exprtype earlier.
7116 * parse.y (fn.def1): Check for defining types in return types.
7118 * decl.c (check_tag_decl): Notice extra fundamental types.
7119 Diagnose empty decls in classes, too.
7121 * decl.c (grokdeclarator): Don't override an anonymous name if no
7122 declarator was given.
7124 * cvt.c (convert_to_void): Call resolve_offset_ref.
7126 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
7128 * decl2.c (decl_namespace): Handle getting a type.
7130 * typeck.c (build_c_cast): Re-enable warning for cast between
7131 pointer and integer of different size.
7133 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
7135 * inc/cxxabi.h (__pointer_type_info): Add restrict and
7137 (__pointer_type_info::__pointer_catch): New virtual function.
7138 (__pointer_to_member_type_info): Derive from
7139 __pointer_type_info. Adjust.
7140 (__pointer_to_member_type_info::__do_catch): Remove.
7141 (__pointer_to_member_type_info::__is_pointer_p): Declare.
7142 (__pointer_to_member_type_info::__pointer_catch): Declare.
7143 * rtti.c (qualifier_flags): Add restrict flag.
7144 (ptmd_initializer): Reorder members.
7145 (create_tinfo_types): Expand comments. Reorder
7146 ptmd_desc_type_node members.
7147 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
7149 (__pointer_type_info::__do_catch): Move specific code into
7150 __pointer_catch. Call it.
7151 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
7152 specific catch checking. Fix void conversion check.
7153 (__pointer_to_member_type_info::__do_catch): Remove.
7154 (__pointer_to_member_type_info::__pointer_catch): Implement.
7156 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7158 * lex.c (init_parse): Remove traces of classof and headof.
7159 * decl2.c (flag_operator_names): Default to 1.
7160 (lang_decode_option): Do not set it for -ansi.
7162 2000-04-09 Mark Mitchell <mark@codesourcery.com>
7164 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
7165 (DECL_MAIN_VARIANT): Remove.
7166 * decl.c (duplicate_decls): Don't set it.
7167 (start_function): Likewise.
7168 (lang_mark_tree): Don't mark it.
7169 * decl2.c (defer_fn): Don't use it.
7170 * lex.c (retrofit_lang_decl): Don't set it.
7171 * pt.c (tsubst_decl): Likewise.
7172 * ptree.c (print_lang_decl): Don't print it.
7173 * typeck.c (mark_addressable): Don't use it.
7175 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
7177 * vec.cc: Include <new> and <exception>.
7178 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
7179 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
7181 (__cxa_vec_delete): Catch dtor exceptions.
7183 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
7185 Prepend __ to implementation defined names.
7186 * inc/typeinfo (type_info): Rename _name to __name.
7187 (type_info::type_info): Rename parameter.
7188 (type_info::operator==, type_info::operator!=,
7189 type_info::before): Likewise.
7190 (type_info::is_pointer_p, type_info::is_function_p,
7191 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
7194 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
7195 (__pointer_type_info::__pointer_type_info): Likewise.
7196 (__pointer_type_info::is_pointer_p,
7197 __pointer_type_info::do_catch): Prepend __. Rename parameters.
7198 (__array_type_info::__array_type_info): Rename parameters.
7199 (__function_type_info::__function_type_info): Likewise.
7200 (__function_type_info::is_function_p): Prepend __.
7201 (__enum_type_info::__enum_type_info): Rename parameters.
7202 (__pointer_to_member_type_info::__pointer_to_member_type_info):
7204 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
7206 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
7207 (__class_type_info::__class_type_info): Rename parameters.
7208 (__class_type_info::sub_kind): Prepend __. Adjust member names.
7209 (__class_type_info::upcast_result,
7210 __class_type_info::dyncast_result): Prepend __. Move definition
7212 (__class_type_info::do_upcast, __class_type_info::do_catch,
7213 __class_type_info::find_public_src,
7214 __class_type_info::do_dyncast,
7215 __class_type_info::do_find_public_src): Prepend __. Rename
7217 (__si_class_type_info::__si_class_type_info): Rename parameters.
7218 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
7219 __si_class_type_info::do_find_public_src): Prepent __. Rename
7221 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
7222 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
7223 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
7225 (__dynamic_cast): Rename parameters.
7226 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
7227 type_info::do_catch, type_info::do_upcast): Prepend __.
7228 (contained_p, public_p, virtual_p, contained_public_p,
7229 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
7230 (__class_type_info::do_catch,
7231 __class_type_info::do_upcast): Prepend __. Adjust.
7232 (__class_type_info::__upcast_result,
7233 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
7235 (__class_type_info::find_public_src): Prepend __. Adjust.
7236 (__class_type_info::do_find_public_src,
7237 __si_class_type_info::do_find_public_src,
7238 __vmi_class_type_info::do_find_public_src): Likewise.
7239 (__class_type_info::do_dyncast,
7240 __si_class_type_info::do_dyncast,
7241 __vmi_class_type_info::do_dyncast): Likewise.
7242 (__class_type_info::do_upcast,
7243 __si_class_type_info::do_upcast,
7244 __vmi_class_type_info::do_upcast): Likewise.
7245 (__dynamic_cast): Adjust.
7246 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
7247 (__function_type_info::is_function_p): Likewise.
7248 (__pointer_type_info::do_catch): Likewise. Adjust.
7249 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
7250 (__throw_type_match_rtti_2): Adjust.
7251 (__is_pointer): Adjust.
7253 2000-04-08 Mark Mitchell <mark@codesourcery.com>
7255 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
7256 (complete_ctor_identifier): New macro.
7257 (special_function_kind): Add sfk_copy_constructor and
7258 sfk_assignment_operator.
7259 (LOOKUP_HAS_IN_CHARGE): Remove.
7260 (cons_up_default_function): Rename to ...
7261 (implicitly_declare_fn): ... this.
7262 * call.c (build_new_method_call): Add in-charge parameters for
7264 * class.c (add_implicitly_declared_members): Change parameter name
7265 from cant_have_assignment to cant_have_const_assignment.
7266 Replace calls to cons_up_default_function to implicitly_declare_fn.
7267 * cvt.c (ocp_convert): Use complete_ctor_identifier.
7268 * decl.c (initialize_predefined_identifiers): Initialize it.
7269 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
7271 * init.c (expand_default_init): Don't calculate the in-charge
7273 (build_new_1): Likewise.
7274 * lex.c (cons_up_default_function): Move to method.c.
7275 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
7276 (implicitly_declare_fn): New function.
7277 * typeck.c (build_static_cast): Use complete_ctor_identifier.
7278 (build_modify_expr): Likewise.
7279 * typeck2.c (build_functional_cast): Likewise.
7281 Under the new ABI, constructors don't return `this'.
7282 * cp-tree.h (warn_reorder): Declare.
7283 (special_function_kind): New enum.
7284 (global_base_init_list): Remove declaration.
7285 (emit_base_init): Don't return a value.
7286 (check_base_init): Don't declare.
7287 (is_aggr_typedef): Likewise.
7288 * decl.c (check_special_function_return_type): New function.
7289 (return_types): Remove.
7290 (grokdeclarator): Use check_special_function_return_type.
7291 (start_function): Don't initialize ctor_label under the new ABI.
7292 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
7293 * init.c (begin_init_stmts): Move to top of file.
7294 (finish_init_stmts): Likewise.
7295 (warn_reorder): Don't declare.
7296 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
7298 (check_base_init): Remove.
7299 (is_aggr_typedef): Likewise.
7300 (build_new_1): Don't use the return value of a constructor.
7301 * semantics.c (setup_vtbl_ptr): Don't use the return value
7303 * typeck.c (check_return_expr): Don't magically convert return
7304 statements into `return this' in constructors under the new ABI.
7306 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
7307 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
7308 (base_ctor_identifier): New macro.
7309 (base_dtor_identifier): Likewise.
7310 (deleting_dtor_identifier): Likewise.
7311 * decl.c: Don't include obstack.h.
7312 (obstack_chunk_alloc): Don't define.
7313 (obstack_chunk_free): Likewise.
7314 (struct predefined_identifier): New type.
7315 (initialize_predefined_identifiers): New function.
7316 (init_decl_processing): Use it.
7317 (debug_temp_inits): Remove.
7318 (start_method): Don't call preserve_data.
7319 (hack_incomplete_structures): Update comment.
7320 * init.c (init_init_processing): Don't initialize
7322 (build_offset_rf): Remove dead code.
7323 (build_delete): Use CLASSTYPE_N_BASECLASSES.
7324 * search.c (init_search_processing): Don't initialize
7327 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7329 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
7330 some sign_compare warnings.
7332 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
7334 Rename abi::__vmi_class_type_info members.
7335 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
7336 base_list, detail_masks members to vmi_flags, vmi_base_count,
7337 vmi_bases and vmi_flags_masks respectively.
7338 (__vmi_class_type_info::vmi_flags_masks): Rename
7339 details_unknown_mask to flags_unknown_mask.
7340 * tinfo.cc (__class_type_info::do_upcast): Adjust.
7341 (__vmi_class_type_info::do_find_public_src): Adjust.
7342 (__vmi_class_type_info::do_dyncast): Adjust.
7343 (__vmi_class_type_info::do_upcast): Adjust.
7345 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
7347 * tinfo.cc (convert_to_base): New function.
7348 (get_vbase_offset): Remove. Move into convert_to_base.
7349 (__vmi_class_type_info::do_find_public_src): Adjust.
7350 (__vmi_class_type_info::do_dyncast): Adjust.
7351 (__vmi_class_type_info::do_upcast): Adjust.
7353 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
7355 * tinfo.cc (operator=): Use __builtin_strcmp.
7356 * tinfo2.cc (before): Likewise.
7358 2000-04-06 Mark Mitchell <mark@codesourcery.com>
7360 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
7361 (DECL_SAVED_INLINE): Rename to ...
7362 (DECL_DEFERRED_FN): ... this.
7363 (in_function_p): Remove declaration.
7364 (mark_inline_for_output): Rename to ...
7365 (defer_fn): ... this.
7366 * decl.c (finish_function): Adjust call to mark_inline_for_output.
7367 (in_function_p): Remove definition.
7368 * decl2.c (saved_inlines): Rename to ...
7369 (deferred_fns): ... this.
7370 (saved_inlines_used): Rename to ...
7371 (deferred_fns_used): ... this.
7372 (mark_inline_for_output): Rename to ...
7373 (defer_fn): ... this.
7374 (finish_file): Adjust accordingly.
7375 (init_decl2): Likewise.
7376 * lex.c (cons_up_default_function): Likewise.
7377 * pt.c (mark_decl_instantiated): Likewise.
7378 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
7380 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
7381 * semantics.c (expand_body): Defer more functions.
7383 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
7386 * Make-lang.in (CXX_LIB2FUNCS): Add it.
7388 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7389 __cxa_vec_delete): Declare.
7391 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
7393 * rtti.c (dfs_class_hint_mark): New static function.
7394 (dfs_class_hint_unmark): New static function.
7395 (class_hint_flags): Use them.
7397 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
7399 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
7401 2000-04-05 Mark Mitchell <mark@codesourcery.com>
7403 * cp-tree.h (instantiate_decl): Change prototype.
7404 * decl2.c (mark_used): Adjust call.
7405 * optimize.c (inlinable_function_p): Adjust handling of templates.
7406 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
7407 (do_type_instantiation): Likewise.
7408 (instantiate_decl): Defer more templates.
7409 (instantiate_pending_templates): Adjust logic to handle inline
7412 * Makefile.in (GGC_H): New variable. Use it throughout in place
7415 * call.c: Don't include obstack.h. Include ggc.h.
7416 (obstack_chunk_alloc): Don't define.
7417 (obstack_chunk_free): Likewise.
7418 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
7419 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
7420 (pop_switch): Free it.
7422 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
7424 * dump.c (dequeue_and_dump): Don't try to print the bit_position
7425 if we don't have a DECL_FIELD_OFFSET.
7427 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
7429 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
7432 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7434 * cfns.gperf (hash, libc_name_p): Prototype.
7436 * rtti.c (build_dynamic_cast_1): Constification.
7438 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
7440 * semantics.c (deferred_type_access_control): Prototype.
7442 2000-04-04 Mark Mitchell <mark@codesourcery.com>
7444 Correct many new ABI issues regarding vbase and vcall offset
7446 * cp-tree.h (BINFO_VTABLE): Document.
7447 (struct lang_type): Tweak formatting.
7448 (BINFO_PRIMARY_BINFO): Add to documentation.
7449 (CLASSTYPE_VSIZE): Fix typo in comment.
7450 (CLASSTYPE_VBASECLASSES): Update documentation.
7451 (BINFO_VBASE_MARKED): Remove.
7452 (SET_BINFO_VBASE_MARKED): Likewise.
7453 (CLEAR_BINFO_VBASE_MARKED): Likewise.
7454 (BINFO_FIELDS_MARKED): Remove.
7455 (SET_BINFO_FIELDS_MARKED): Likewise.
7456 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
7457 (enum access_kind): New enumeration.
7458 (num_extra_vtbl_entries): Remove declaration.
7459 (size_extra_vtbl_entries): Likewise.
7460 (get_vtbl_decl_for_binfo): New function.
7461 (dfs_vbase_unmark): Remove declaration.
7462 (mark_primary_bases): Likewise.
7463 * class.c (SAME_FN): Remove.
7464 (struct vcall_offset_data_s): Move definition.
7465 (build_vbase_pointer): Use `build', not `build_binary_op', to
7466 access the vbase pointer under the new ABI.
7467 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
7468 (build_primary_vtable): Likewise.
7469 (dfs_mark_primary_bases): Move here from search.c.
7470 (mark_primary_bases): Likewise.
7471 (determine_primary_bases): Under the new ABI, don't make a base
7472 class a primary base just because we don't yet have any virtual
7474 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
7475 (num_vfun_entries): Remove.
7476 (dfs_count_virtuals): Likewise.
7477 (num_extra_vtbl_entries): Likewise.
7478 (size_extra_vtbl_entries): Likewise.
7479 (layout_virtual_bases): Iterate in inheritance graph order under
7481 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
7482 indicate that a vfield is present.
7483 (init_class_processing): Initialize access_public_node, etc., from
7485 (get_vtbl_decl_for_binfo): New function.
7486 (dump_class_hierarchy_r): Likewise.
7487 (dump_class_hierarchy): Use it.
7488 (finish_vtbls): Build the vtbls in inheritance graph order.
7489 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
7490 (initialize_vtable): Use get_vtbl_decl_for_binfo.
7491 (accumulate_vtbl_inits): Add comments explaining why a pre-order
7493 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
7494 where the vptr points, even for primary vtables.
7495 (build_vtbl_initializer): Adjust handling of vbase and vcall
7497 (build_vcall_and_vbase_vtable_entries): New function.
7498 (dfs_build_vbase_offset_vtbl_entries): Remove.
7499 (build_vbase_offset_vtbl_entries): Reimplement.
7500 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
7501 were already handled in a primary base class vtable.
7502 (build_vcall_offset_vtbl_entries): Adjust.
7503 (build_rtti_vtbl_entries): Adjust.
7504 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
7505 * init.c (expand_virtual_init): Simplify.
7506 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
7507 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
7508 * search.c (BINFO_ACCESS): New macro.
7509 (SET_BINFO_ACCESS): Likewise.
7510 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
7511 (access_in_type): Likewise.
7512 (dfs_accessible_p): Likewise.
7513 (protected_accessible_p): Likewise.
7514 (lookup_fnfields_1): Adjust documentation.
7515 (dfs_mark_primary_bases): Move to class.c
7516 (mark_primary_bases): Likewise.
7517 (dfs_vbase_unmark): Remove.
7518 (virtual_context): Use BINFO_FOR_VBASE.
7519 (dfs_get_vbase_types): Simplify.
7520 (dfs_build_inheritance_graph_order): New function.
7521 (get_vbase_types): Use it.
7522 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
7524 * tinfo.cc (get_vbase_offset): New function.
7525 (__vmi_class_type_info::do_find_public_src): Use it.
7526 (__vmi_class_type_info::do_dyncast): Likewise.
7527 (__vmi_class_type_info::do_upcast): Likewise.
7529 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
7531 * lang-specs.h: Pass -fno-show-column to the preprocessor.
7533 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
7535 * rtti.c (class_hint_flags): Rename flags.
7536 (class_initializer): Remove flags.
7537 (synthesize_tinfo_var): Combine offset and flags. Add flags
7538 for __vmi_class_type_info.
7539 (create_tinfo_types): Remove flags from __class_type_info and
7540 __si_class_type_info. Merge flags and offset from
7541 base_class_type_info.
7542 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
7543 (__base_class_info::is_virtual_p): Adjust.
7544 (__base_class_info::is_public_p): Adjust.
7545 (__base_class_info::offset): New accessor.
7546 (__class_type_info::details): Remove member.
7547 (__class_type_info::__class_type_info): Lose details.
7548 (__class_type_info::detail_masks): Remove.
7549 (__si_class_type_info::__si_class_type_info): Lose details.
7550 (__vmi_class_type_info::details): New member.
7551 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
7552 (__vmi_class_type_info::detail_masks): New member.
7553 * tinfo.cc (__class_type_info::do_upcast): Initialize result
7554 with unknown_details_mask.
7555 (__vmi_class_type_info::do_find_public_src): Adjust
7556 (__vmi_class_type_info::do_dyncast): Adjust.
7557 (__vmi_class_type_info::do_upcast): Set result details, if
7559 (__dynamic_cast): Temporarily #if out optimization.
7561 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
7563 * rtti.c (get_tinfo_decl): Mark used.
7564 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
7565 mark as dealt with, if we output it.
7567 2000-03-28 Mark Mitchell <mark@codesourcery.com>
7569 * class.c: Reorganize to put virtual function table initialization
7570 machinery at the end of the file.
7572 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
7574 * class.c (finish_struct): Use bitsize_zero_node.
7575 * pt.c (instantiate_class_template): Likewise.
7577 2000-03-28 Mark Mitchell <mark@codesourcery.com>
7579 Put RTTI entries at negative offsets in new ABI.
7580 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
7581 vbase offset at index -3, not -1.
7582 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
7583 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
7584 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
7585 (build_rtti_vtbl_entries): New function.
7586 (set_rtti_entry): Remove.
7587 (build_primary_vtable): Don't use it.
7588 (build_secondary_vtable): Likewise.
7589 (start_vtable): Remove.
7590 (first_vfun_index): New function.
7591 (set_vindex): Likewise.
7592 (add_virtual_function): Don't call start_vtable. Do call
7594 (set_primary_base): Rename parameter.
7595 (determine_primary_base): Likewise.
7596 (num_vfun_entries): Don't use skip_rtti_stuff.
7597 (num_extra_vtbl_entries): Include RTTI information.
7598 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
7599 (skip_rtti_stuff): Remove.
7600 (dfs_modify_vtables): Don't use it.
7601 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
7602 (layout_nonempty_base_or_field): Update size handling.
7603 (create_vtable_ptr): Tweak.
7604 (layout_class_type): Adjust parameter names.
7605 (finish_struct_1): Simplify.
7606 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
7607 (skip_rtti_stuff): Remove.
7608 (first_vfun_index): New function.
7609 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
7610 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
7611 (marked_vtable_pathp): Declare.
7612 (unmarked_vtable_pathp): Likewise.
7613 * error.c (dump_expr): Use first_vfun_index to calculate vtable
7615 * rtti.c (build_headof): Look for RTTI at negative offsets.
7616 (get_tinfo_decl_dynamic): Likewise.
7617 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
7619 (create_pseudo_type_info): Do it here instead. Adjust so that
7620 vptr points at first virtual function.
7621 * search.c (marked_vtable_pathp): Make it global.
7622 (unmarked_vtable_pathp): Likewise.
7623 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
7624 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
7625 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
7626 (get_pure_virtuals): Likewise.
7627 (expand_upcast_fixups): Likewise.
7628 * tree.c (debug_binfo): Likewise.
7629 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
7632 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7634 * class.c (check_field_decl): Fix typo.
7635 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
7636 (check_methods): Likewise.
7637 (check_field_decls): Likewise.
7638 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
7639 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
7640 Use DECL_RESULT_FLD, not DECL_RESULT.
7641 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
7642 * lex.c (identifier_type): Likewise.
7643 * pt.c (determine_specialization, lookup_template_class): Likewise.
7644 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
7645 (resolve_overloaded_unification, more_specialized): Likewise.
7646 * semantics.c (finish_member_declaration): Likewise.
7647 * typeck.c (build_x_function_call): Likewise.
7649 2000-03-26 Mark Mitchell <mark@codesourcery.com>
7651 * class.c (layout_empty_base): Handle empty bases with non-byte
7653 (build_base_field): Likewise.
7654 (layout_virtual_bases): Likewise.
7656 * class.c (finish_struct_1): Fix typo in this change:
7658 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7660 2000-03-25 Mark Mitchell <mark@codesourcery.com>
7662 * decl.c (grokdeclarator): Count partial specializations when
7663 keeping track of how many template classes have been seen.
7665 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
7667 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7669 * class.c (build_vbase_pointer_fields): layout_field now place_field.
7670 (get_vfield_offset): Use byte_position.
7671 (set_rtti_entry): Set OFFSET to ssizetype zero.
7672 (get_binfo_offset_as_int): Deleted.
7673 (dfs_record_base_offsets): Use tree_low_cst.
7674 (dfs_search_base_offsets): Likewise.
7675 (layout_nonempty_base_or_field): Reflect changes in RLI format
7676 and call byte_position.
7677 (layout_empty_base): Convert offset to ssizetype.
7678 (build_base_field): use rli_size_unit_so_far.
7679 (dfs_propagate_binfo_offsets): Do computation in proper type.
7680 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
7681 (layout_class_type): Reflect changes in RLI names and fields.
7682 (finish_struct_1): Set DECL_FIELD_OFFSET.
7683 * dump.c (dequeue_and_dump): Call bit_position.
7684 * expr.c (cplus_expand_constant): Use byte_position.
7685 * rtti.c (expand_class_desc): Use bitsize_one_node.
7686 * typeck.c (build_component_addr): Use byte_position and don't
7687 special case for zero offset.
7689 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
7691 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
7693 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
7695 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
7698 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7700 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
7702 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
7703 make_typename_type, check_initializer, cp_finish_decl,
7704 xref_tag): Likewise.
7705 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
7706 decl_namespace, arg_assoc_template_arg, arg_assoc,
7707 validate_nonmember_using_decl, do_class_using_decl): Likewise.
7708 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
7709 args_to_string): Likewise.
7710 * friend.c (is_friend): Likewise.
7711 * lex.c (note_got_semicolon, note_list_got_semicolon,
7712 is_global): Likewise.
7713 * method.c (build_overload_nested_name, build_overload_value,
7714 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
7715 * parse.y (typename_sub, typename_sub1): Likewise.
7716 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
7717 process_partial_specialization, convert_template_argument,
7718 template_args_equal, add_pending_template, lookup_template_class,
7719 for_each_template_parm_r, maybe_fold_nontype_arg,
7720 tsubst, instantiate_template, type_unification_real, unify,
7721 instantiate_pending_templates, set_mangled_name_for_template_decl):
7723 * repo.c (repo_get_id, repo_template_used): Likewise.
7724 * search.c (lookup_field_1): Likewise.
7725 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
7726 * xref.c (classname): Likewise.
7728 2000-03-22 Mark Mitchell <mark@codesourcery.com>
7730 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
7731 (CANONICAL_BINFO): New macro.
7732 (BINFO_NEW_VTABLE_MARKED): Use it.
7733 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
7734 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
7735 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
7737 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7738 (build_secondary_vtable): Likewise.
7739 (dfs_finish_vtbls): Likewise.
7740 (dfs_accumulate_vtbl_inits): Likewise.
7741 (accumulate_vtbl_inits): New function.
7742 (finish_vtbls): Make sure that virtual bases come after
7743 non-virtual bases in the vtable group.
7744 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
7745 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7746 * search.c (struct vbase_info): Move definition.
7747 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7748 (unmarked_new_vtable_p): Likewise.
7749 (dfs_mark_vtable_path): Remove.
7750 (dfs_mark_new_vtable): Remove.
7751 (dfs_unmark_new_vtable): Likewise.
7752 (dfs_clear_search_slot): Likewise.
7753 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7754 (dfs_clear_vbase_slots): Likewise.
7755 (init_vbase_pointers): LIkewise.
7757 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
7759 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
7760 SIZETYPE to a non-SIZETYPE.
7762 2000-03-21 Mark Mitchell <mark@codesourcery.com>
7764 * class.c (layout_virtual_bases): Adjust names in conditionally
7767 * class.c (record_base_offsets): New function.
7768 (layout_conflict_p): Likewise.
7769 (layout_nonempty_base_or_field): Use it.
7770 (layout_empty_base): New function.
7771 (build_base_field): Use it.
7772 (build_base_fields): Update comment.
7773 (layout_virtual_bases): Fold in a little code form
7774 layout_basetypes. Use layout_empty_base.
7775 (layout_basetypes): Remove.
7776 (end_of_class): New function.
7777 (layout_class_type): Use it. Adjust.
7779 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
7781 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
7783 (dfs_skip_nonprimary_vbases_markedp): Likewise.
7784 * typeck.c (fntype_p): Remove.
7786 * cp-tree.h (TI_SPEC_INFO): Remove.
7787 (CLASSTYPE_TI_SPEC_INFO): Likewise.
7788 * pt.c (process_partial_specialization): Likewise.
7790 * class.c (build_base_field): Fix thinko in computation of binfo
7793 * tree.c (mark_local_for_remap_p): Mark variables declared in
7794 TARGET_EXPRs as well.
7796 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
7798 * typeck.c (require_complete_type, complete_type,
7799 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
7800 build_array_ref, convert_arguments, pointer_diff,
7801 build_x_unary_op, build_unary_op, build_c_cast,
7802 build_modify_expr): Use COMPLETE_TYPE_P etc.
7803 * call.c (is_complete, convert_like_real,
7804 build_new_method_call): Likewise.
7805 * class.c (build_vbase_pointer_fields, check_bases,
7806 build_base_field, finish_struct_1, pushclass): Likewise.
7807 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
7808 * decl.c (maybe_process_template_type_declaration, pushtag,
7809 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
7810 layout_var_decl, check_initializer, cp_finish_decl,
7811 grokdeclarator, require_complete_types_for_parms,
7812 grok_op_properties, xref_tag, xref_basetypes,
7813 check_function_type): Likewise.
7814 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
7815 * friend.c (do_friend): Likewise.
7816 * init.c (build_offset_ref): Likewise.
7817 * parse.y (structsp): Likewise.
7818 * pt.c (maybe_process_partial_specialization,
7819 tsubst_friend_function, instantiate_class_template, tsubst,
7820 do_type_instantiation, instantiate_pending_templates): Likewise.
7821 * repo.c (repo_get_id): Likewise.
7822 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
7823 synthesize_tinfo_var, emit_support_tinfos): Likewise.
7824 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
7825 * semantics.c (begin_class_definition): Likewise.
7826 * tree.c (build_cplus_method_type): Likewise.
7827 * typeck2.c (digest_init, build_functional_cast,
7828 add_exception_specifier): Likewise.
7829 * parse.h, parse.c: Regenerated.
7831 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
7833 * inc/cxxabi.h: New header file. Define new-abi entry points.
7834 (__pointer_type_info::target): Rename member to ...
7835 (__pointer_type_info::type): ... here.
7836 (__base_class_info::type): Rename member to ...
7837 (__base_class_info::base): ... here.
7838 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
7839 * cp-tree.h (CPTI_ABI): New global tree enumeration.
7840 (abi_node): New global tree node.
7841 * decl.c (abi_node): Document.
7842 (init_decl_processing): Initialize abi_node.
7843 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
7844 (get_vmi_pseudo_type_info): Likewise.
7845 (create_tinfo_types): Likewise.
7846 (emit_support_tinfos): Likewise.
7847 * tinfo.h (cxxabi.h): Include for new-abi.
7848 Move rtti class definitions to new header file.
7849 * tinfo.cc (abi): Use the namespace.
7850 (std): Move new abi rtti classes from here ...
7851 (__cxxabiv1): ... to here.
7852 * tinfo2.cc (cxxabi.h): Include for new-abi.
7853 Move rtti class definitions to new header file.
7854 (std): Move new abi rtti classes from here ...
7855 (__cxxabiv1): ... to here.
7856 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
7859 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
7860 Jason Merrill <jason@casey.cygnus.com>
7862 * method.c (build_overload_int): Use host_integerp.
7864 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7866 * init.c (build_offset_ref): Handle the case of a templated member
7869 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7871 * except.c (expand_exception_blocks): Clear catch_clauses_last.
7873 2000-03-18 Mark Mitchell <mark@codesourcery.com>
7875 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
7876 * class.c (check_bitfield_decl): Turn illegal bitfields into
7878 (dfs_propagate_binfo_offsets): Adjust for new size_binop
7880 (dfs_offset_for_unshared_vbases): Likewise.
7881 * cvt.c (cp_convert_to_pointer): Convert NULL to a
7882 pointer-to-member correctly under the new ABI.
7883 * expr.c (cplus_expand_constant): Don't use cp_convert when
7884 turning an offset into a pointer-to-member.
7885 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
7886 when dereferencing them under the new ABI.
7887 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
7888 of pointers-to-members under the new ABI.
7890 * class.c (check_bitfield_decl): Remove restriction on really long
7892 (layout_class_type): Implement new ABI handling of bitfields
7893 longer than their types.
7895 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7897 * parse.y (extdefs): Call ggc_collect.
7898 * parse.c: Regenerated.
7900 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
7902 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
7903 (note_name_declared_in_class): Use OVL_CURRENT to get at a
7906 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7908 * class.c (build_vbase_path): Use integer_zerop.
7909 (build_vtable_entry): Use tree_low_cst.
7910 (get_vfield_offset): Use bit_position.
7911 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
7913 (check_bitfield_decl): Set DECL_SIZE using convert.
7914 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
7915 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
7917 (finish_struct_1): Use bit_position.
7918 (dump_class_hierarchy): Use tree_low_cst.
7919 * cp-tree.h (min_precision): Add declaration.
7920 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
7921 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
7922 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
7923 * expr.c (cplus_expand_constant): Use bit_position.
7924 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
7925 * rtti.c (get_base_offset): Use bit_position.
7926 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
7927 host_integerp, and tree_low_cst.
7928 (pointer_int_sum): Use integer_zerop.
7929 (build_component_addr): Use bit_position.
7931 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
7933 * typeck.c (require_complete_type): Don't assume size_zero_node.
7934 (complete_type_or_else): Likewise.
7936 2000-03-16 Steven Grady <grady@digitaldeck.com>
7937 Jason Merrill <jason@casey.cygnus.com>
7939 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
7941 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
7943 * decl2.c (grokfield): Bail out if type is error_mark_node.
7945 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
7947 * tinfo2.cc (__ptr_to_member_data): Rename to ...
7948 (__pointer_to_member_data): ... here. Adjust.
7949 * rtti.c (create_tinfo_types): Adjust.
7951 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
7953 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
7954 * decl.c (ref_desc_type_node): Undocument.
7955 * rtti.c (ptr_ref_initializer): Rename to ...
7956 (ptr_initializer): ... here. Adjust comments.
7957 (ptmd_initializer): Fix comment thinko.
7958 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
7959 (create_tinfo_types): Remove ref_desc_type_node init.
7960 * tinfo2.cc (__reference_type_info): Remove.
7962 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
7964 * decl.c (cp_finish_decl): Remove obsolete comment.
7966 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
7968 2000-03-14 Mark Mitchell <mark@codesourcery.com>
7970 * cp-tree.h: Tweak documentation.
7971 * class.c (build_vbase_pointer_fields): Layout the fields, too.
7972 (avoid_overlap): Remove.
7973 (get_binfo_offset_as_int): New function.
7974 (dfs_serach_base_offsets): Likewise.
7975 (layout_nonempty_base_or_field): Likewise.
7976 (build_base_field): Layout fields here. Avoid placing two objects
7977 of the same type at the same address, under the new ABI.
7978 (build_base_fields): Adjust accordingly.
7979 (create_vtable_ptr): Return the new field, but don't attach it to
7981 (remove_base_field): Remove.
7982 (remove_base_fields): Remove.
7983 (layout_basetypes): Adjust accordingly.
7984 (layout_class_type): Call layout_field for each field, rather than
7985 just making a wholesale call to layout_type.
7987 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
7989 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
7991 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
7993 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
7995 * except.c (dtor_nothrow): New fn.
7996 (do_pop_exception): Use it. Take type parm.
7997 (push_eh_cleanup): Take type parm.
7998 (expand_start_catch_block): Pass it.
7999 (build_eh_type_type_ref): Accept null type.
8001 2000-03-12 Mark Mitchell <mark@codesourcery.com>
8003 * cp-tree.h (revert_static_member_fn): Change prototype.
8004 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
8005 (grok_op_properties): Likewise.
8006 (start_function): Likewise.
8007 (revert_static_member_fn): Simplify.
8008 * pt.c (check_explicit_specialization): Adjust call to
8009 revert_static_member_fn.
8011 2000-03-11 Mark Mitchell <mark@codesourcery.com>
8013 * cp-tree.h (scope_kind): New type.
8014 (tmpl_spec_kind): Likewise.
8015 (declare_pseudo_global_level): Remove.
8016 (pseudo_global_level_p): Rename to template_parm_scope_p.
8017 (pushlevel): Remove declaration.
8018 (begin_scope): New function.
8019 (finish_scope): Likewise.
8020 (current_tmpl_spec_kind): Likewise.
8021 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
8022 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
8023 Add template_spec_p.
8024 (toplevel_bindings_p): Adjust.
8025 (declare_pseudo_global_level): Remove.
8026 (pseudo_global_level_p): Rename to template_parm_scope_p.
8027 (current_tmpl_spec_kind): New function.
8028 (begin_scope): Likewise.
8029 (finish_scope): Likewise.
8030 (maybe_push_to_top_level): Adjust.
8031 (maybe_process_template_type_declaration): Likewise.
8032 (pushtag): Likewise.
8033 (pushdecl_nonclass_level): Likewise.
8034 (lookup_tag): Likewise.
8035 (grokfndecl): Handle member template specializations. Share
8036 constructor and non-constructor code.
8037 * decl2.c (check_classfn): Handle member template specializations.
8038 * pt.c (begin_template_parm_list): Use begin_scope.
8039 (begin_specialization): Likewise.
8040 (end_specialization): Likewise.
8041 (check_explicit_specialization): Use current_tmpl_spec_kind.
8042 Handle member template specializations.
8043 (end_template_decl): Use finish_scope. Remove call to
8045 (push_template_decl_real): Remove bogus error message.
8046 (tsubst_decl): Fix typo in code contained in comment.
8047 (instantiate_template): Handle member template specializations.
8048 (most_general_template): Likewise.
8050 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
8052 * lex.c (whitespace_cr): Compress consecutive calls to warning().
8053 (do_identifier): Ditto for error().
8055 * pt.c (convert_nontype_argument): Ditto for cp_error().
8056 (convert_template_argument): Ditto for cp_pedwarn().
8058 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
8060 * exception.cc (__check_null_eh_spec): New fn.
8061 * except.c (expand_end_eh_spec): Call it if the spec is throw().
8063 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
8065 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
8066 * except.c (expand_end_eh_spec): Add the return type.
8067 * rtti.c (throw_bad_cast): Add the parmtypes.
8068 (throw_bad_typeid): Likewise.
8070 * semantics.c (expand_stmt): Only leave out rtl for unused
8071 artificials, and set DECL_IGNORED_P on them as well.
8072 * decl.c (wrapup_globals_for_namespace): Likewise.
8074 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
8076 * decl.c (maybe_commonize_var): Skip all artificial decls.
8077 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
8079 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
8081 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
8082 * cp-tree.h: Declare flag_enforce_eh_specs.
8083 * decl.c (store_parm_decls, finish_function): Check it.
8085 C library functions don't throw.
8086 * Makefile.in (cfns.h): New target.
8087 (except.o): Depend on it.
8088 * Make-lang.in (cc1plus): Depend on cfns.gperf.
8089 * cfns.gperf: New file.
8090 * cfns.h: Generated.
8091 * except.c: Include it.
8092 (nothrow_libfn_p): New fn.
8093 * decl.c (grokfndecl): Use it.
8094 * cp-tree.h: Declare it.
8096 * decl.c (push_overloaded_decl_1, auto_function,
8097 define_function): Lose.
8098 (build_library_fn_1): New static fn.
8099 (builtin_function): Use it.
8100 (get_atexit_node): Use build_library_fn_ptr.
8101 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
8102 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
8103 push_void_library_fn, push_throw_library_fn): New fns.
8104 * cp-tree.h: Declare them.
8105 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
8106 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
8107 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
8108 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
8109 * rtti.c (build_runtime_decl): Lose.
8110 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
8111 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
8112 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
8114 * call.c (build_call): Remove result_type parm.
8115 Call mark_used on unused artificial fns.
8116 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
8118 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
8120 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
8122 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
8123 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
8124 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
8125 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
8126 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8127 expand_generic_desc): Likewise.
8129 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8131 * exception.cc (__cp_pop_exception): Cleanup the original object.
8133 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8135 * decl.c (grok_op_properties): Merge conversion to void warning
8136 with other silly op warnings.
8138 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
8140 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
8141 array CONSTRUCTOR elements. Don't use expr_tree_cons.
8143 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8145 * decl.c (cp_make_fname_decl): New function.
8146 (wrapup_globals_for_namespace): Don't emit unused static vars.
8147 (init_decl_processing): Remove comment about use of
8148 array_domain_type. Set make_fname_decl.
8149 (cp_finish_decl): Remove __FUNCTION__ nadgering.
8150 * semantics.c (begin_compound_stmt): Remove
8151 current_function_name_declared flagging.
8152 (expand_stmt): Don't emit unused local statics.
8153 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
8156 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8158 * typeck.c (convert_for_assignment): Don't look at array
8160 * call.c (convert_like_real): Likewise.
8162 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
8164 Add initial support for '\uNNNN' specifier.
8165 * lex.c (read_ucs): New fn.
8166 (readescape, skip_white_space): Call it.
8167 (is_extended_char, is_extended_char_1): New fns.
8168 (utf8_extend_token): New fn, #if 0'd out.
8169 (real_yylex): Treat extended chars like letters.
8171 * search.c (note_debug_info_needed): Walk the bases even if we
8172 weren't deferring the type itself.
8174 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8176 * decl2.c (finish_objects): Constify a char*.
8178 * method.c (emit_thunk): Likewise.
8180 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
8182 * typeck.c (dubious_conversion_warnings): Look through
8185 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8187 * class.c (dfs_modify_vtables): I is now unsigned.
8188 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
8189 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
8190 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
8191 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8192 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
8193 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
8194 Call integer_all_onesp.
8195 * typeck2.c (process_init_constructor): Use compare_tree_int.
8197 * lang-specs.h (as): Don't call if -syntax-only.
8199 2000-03-06 Mark Mitchell <mark@codesourcery.com>
8201 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
8202 RTL_EXPR_HAS_NO_SCOPE after all.
8204 2000-03-05 Mark Mitchell <mark@codesourcery.com>
8206 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
8207 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
8208 RTL_EXPR_HAS_NO_SCOPE.
8210 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
8213 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
8215 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
8217 * call.c (convert_like): Macrofy.
8218 (convert_like_with_context): New macro.
8219 (convert_like_real): Renamed from convert_like. Add calling
8220 context parameters, for diagnostics. Add recursive flag. Call
8221 dubious_conversion_warnings for outer conversion.
8222 (build_user_type_conversion): Use convert_like_with_context.
8223 (build_over_call): Likewise. Don't warn about dubious
8224 conversions here. Adjust convert_default_arg calls.
8225 (convert_default_arg): Add context parameters for diagnostics.
8226 Pass throught to convert_like_with_context.
8227 * cp-tree.h (convert_default_arg): Add context parameters.
8228 (dubious_conversion_warnings): Prototype new function.
8229 * typeck.c (convert_arguments): Adjust convert_default_arg call.
8230 (dubious_conversion_warnings): New function, broken
8231 out of convert_for_assignment.
8232 (convert_for_assignment): Adjust.
8234 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
8236 * decl2.c (key_method): Break out from...
8237 (import_export_vtable, import_export_class): ...here.
8239 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
8240 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
8242 * search.c (note_debug_info_needed, dfs_debug_mark,
8243 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
8244 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
8246 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
8248 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
8251 2000-03-02 Mark Mitchell <mark@codesourcery.com>
8253 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
8254 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
8255 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
8256 (lang_type): Split gets_new into has_new and has_array_new.
8257 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8258 (TYPE_GETS_NEW): Split into ...
8259 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
8260 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
8261 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
8262 (build_op_new_call): Don't declare.
8263 (build_new_1): Likewise.
8264 * call.c (build_op_new_call): Remove.
8265 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
8266 instead of TYPE_NEEDS_DESTRUCTOR.
8267 (finish_struct_bits): Likewise.
8268 (add_implicitly_declared_members): Likewise.
8269 (check_field_decl): Likewise.
8270 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
8271 correctly under the new ABI.
8272 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
8273 instead of TYPE_NEEDS_DESTRUCTOR.
8274 (initialize_local_var): Likewise.
8275 (destroy_local_var): Likewise.
8276 (cp_finish_decl): Likewise.
8277 (register_dtor_fn): Likewise.
8278 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
8279 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
8280 TYPE_VEC_DELETE_TAKES_SIZE here.
8281 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
8282 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
8283 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8284 (finish_destructor_body): Likewise.
8285 (maybe_build_cleanup_1): Likewise.
8286 * decl2.c (do_static_destruction): Likewise.
8287 * init.c (build_new_1): Make it static.
8288 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8289 (expand_cleanup_for_base): Likewise.
8290 (get_cookie_size): New function.
8291 (build_new_1): Handle array-new cookies correctly under the new
8293 (build_vec_delete_1): Likewise.
8294 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8295 (build_delete): Likewise.
8296 (build_vec_delete): Handle array-new cookies correctly under the new
8298 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8299 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
8300 TYPE_HAS_ARRAY_NEW_OPERATOR.
8301 * ptree.c (print_lang_type): Check them.
8302 * search.c (context_for_name_lookup): Fix typo in comment.
8303 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8304 * tree.c (break_out_cleanups): Likewise.
8305 (build_cplus_array_test_1): Likewise.
8306 (cp_build_qualified_type_real): Likewise.
8307 * typeck.c (complete_type): Likewise.
8309 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
8310 the command-line, not the end.
8312 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
8314 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
8316 2000-03-02 Tom Tromey <tromey@cygnus.com>
8318 * cp-tree.h (build_java_class_ref): Declare.
8319 * init.c (build_java_class_ref): No longer static.
8320 * except.c (expand_throw): Generate a Java-style `throw' if the
8321 thrown object is a "Java" object.
8322 (initialize_handler_parm): Generate a Java-style lookup of
8323 exception info if the caught object is a "Java" object.
8324 (catch_language, catch_language_init): New globals.
8325 (decl_is_java_type): New function.
8326 (expand_start_catch_block): Don't call push_eh_info() or
8327 push_eh_cleanup() when handling a Java-style "catch". Pass Java
8328 class reference to build_catch_block.
8330 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8332 * typeck.c (comptypes): Treat sizetype like its language equivalent.
8334 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
8336 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
8337 to merge reference/pointer code and fix incorrect warnings.
8339 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
8341 * search.c (protected_accessible_p): Use context_for_name_lookup.
8343 * init.c (construct_virtual_bases): Fix thinko.
8344 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
8346 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
8348 * decl.c (current_function_decl): Move to toplev.c.
8350 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
8352 * pt.c (fn_type_unification): Unify return type, whenever
8354 (get_bindings_real): Only pass return type when necessary.
8355 Remove explicit return type check.
8356 * class.c (resolve_address_of_overloaded_function): Pass desired
8357 return type to fn_type_unification.
8359 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8361 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
8363 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
8365 * rtti.c (expand_class_desc): Likewise.
8366 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
8367 (THUNK_VCALL_OFFSET): Likewise.
8368 (THUNK_DELTA): Reflect changes in ../tree.h.
8370 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
8372 * search.c (protected_accessible_p): Also allow the access if
8373 the member is public in DERIVED. Lose TYPE parm.
8374 (friend_accessible_p): Lose TYPE parm.
8375 (accessible_p): Adjust.
8377 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8379 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
8380 on things that are not sizes; ssize_binop deleted.
8381 Call size_diffop when appropriate.
8382 (dfs_build_vcall_offset_vtbl_entries): Likewise.
8383 (build_primary_vtable, build_secondary_vtable): Likewise.
8384 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
8385 Variable I is HOST_WIDE_INT.
8386 (get_vfield_offset): Pass proper types to size_binop.
8387 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
8388 (finish_struct_1): Likewise.
8389 (skip_rtti_stuff): Arg N is now pointer to signed.
8390 (layout_class_type): Use size_zero_node.
8391 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
8392 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
8393 * decl.c (complete_arry_type): Pass proper types to size_binop.
8394 (xref_basetypes): BINFO_OFFSET is sizetype.
8395 * error.c (dump_expr): Don't use size_binop non-sizes.
8396 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
8397 * init.c (construct_virtual_bases): Fix type error.
8398 (build_vec_delete_1): Pass proper type to size_binop and don't
8400 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
8401 * rtti.c (get_base_offset): Pass proper type to size_binop.
8402 * search.c (dfs_find_vbases): Fix type error.
8403 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
8404 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
8405 * tree.c (debug_binfo): Variable N is signed.
8406 Use HOST_WIDE_INT_PRINT_DEC.
8407 * typeck.c (comptypes): sizetype is same as equivalent integer type.
8408 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
8409 size_one_node and size_zero_node.
8410 (c_alignof): Use size_one_node.
8411 (build_component_addr): Pass proper types to size_binop.
8412 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
8414 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
8416 Implement class scope using-declarations for functions.
8417 * class.c (handle_using_decl): Call add_method for used functions.
8418 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
8419 (add_method): Used functions are hidden by local functions.
8420 (check_bases_and_members): Handle using-decls before finalizing
8421 CLASSTYPE_METHOD_VEC.
8422 * call.c (add_function_candidate): Add ctype parm; if non-zero,
8423 override the type of 'this' accordingly.
8424 (add_template_candidate, add_template_candidate_real): Add ctype parm.
8425 (convert_class_to_reference, build_user_type_conversion_1,
8426 build_new_function_call, build_object_call, build_new_op,
8427 build_new_method_call): Pass ctype parm.
8429 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
8431 * call.c (convert_class_to_reference, build_user_type_conversion_1,
8432 build_new_function_call, build_object_call, build_new_op,
8433 build_new_method_call, build_op_delete_call): Don't get basetype_path
8435 * typeck.c (build_component_ref): Likewise.
8436 * init.c (build_offset_ref): Likewise.
8437 (resolve_offset_ref): Don't call enforce_access.
8438 Call build_scoped_ref.
8439 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
8440 would cause an error or if -pedantic.
8441 * class.c (alter_access): Lose binfo parm.
8443 2000-02-26 Mark Mitchell <mark@codesourcery.com>
8445 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
8448 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
8450 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
8451 pseudo_type_info creation into the std namespace
8453 2000-02-26 Mark Mitchell <mark@codesourcery.com>
8455 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
8456 (import_export_class): Remove declaration.
8457 * decl2.c (import_export_class): Make it static.
8458 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
8459 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
8460 EXPR_WITH_FILE_LOCATION.
8461 * lex.c (check_newline): Tweak filename/lineno setting.
8462 * semantics.c (begin_while_stmt): Fix typo in comment.
8464 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8466 * lang-options.h (-fmessage-length=): Add missing option.
8468 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
8470 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
8472 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
8474 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
8476 * optimize.c (expand_call_inline): Emit the return label before
8477 evaluating the return value.
8479 2000-02-24 Mark Mitchell <mark@codesourcery.com>
8481 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
8482 than duplicating functionality here.
8483 * optimize.c: Include input.h.
8484 (expand_call_inline): Use push_srcloc and pop_srcloc.
8485 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
8486 * parse.c: Regenerated.
8487 * Makefile.in (lex.o): Depend on input.h.
8488 (optimize.o): Likewise.
8490 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
8492 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
8493 function type, rather than ICE.
8495 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
8497 * decl.c (grokdeclarator): Call decl_type_access_control.
8498 * parse.y (parse_end_decl): Don't call decl_type_access_control if
8501 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
8503 * decl.c (decls_match): Remove obsolete static member nadgering.
8505 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8507 * decl.c (grokdeclarator): Change ANSI to ISO.
8508 * lex.c (consume_string, readescape, do_identifier): Likewise.
8509 (parse_float, real_yylex): Likewise.
8510 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
8511 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
8512 new_type_id, maybe_label_decls, simple_stmt,
8513 for.init.statement): Likewise.
8514 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
8515 * semantics.c (finish_named_return_value): Likewise.
8516 * parse.c: Regenerate.
8518 2000-02-21 Mark Mitchell <mark@codesourcery.com>
8520 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
8521 (CPTI_CLASS_STAR_TYPE): Remove.
8522 (vtable_index_type): Likewise.
8523 (class_star_type_node): Remove.
8524 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
8525 (build_binary_op_nodefault): Remove.
8526 * call.c (build_new_op): Use build_binary_op instead of
8527 build_binary_op_nodefault.
8528 * decl.c (init_decl_processing): Remove class_star_type_node
8529 initialization. Make delta_type_node ptrdiff_type_node under the
8530 new ABI. Initialize vtable_index_type.
8531 (build_ptrmemfunc_type): Build different structures for the new
8533 (build_enumerator): Use build_binary_op instead of
8534 build_binary_op_nodefault.
8535 * method.c (build_overload_value): Mangle pointers-to-members
8536 appropriately under the new ABI.
8537 * typeck.c (build_array_ref): Use build_binary_op instead of
8538 build_binary_op_nodefault.
8539 (get_member_function_from_ptrfunc): Adjust for the new ABI.
8540 (build_binary_op_nodefault): Rename to ...
8541 (build_binary_op): ... this. Remove old version. Adjust for
8542 pointer-to-member comparisons under the new ABI.
8543 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
8544 (build_ptrmemfunc): Adjust for the new ABI.
8545 (expand_ptrmemfunc_cst): Likewise.
8546 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
8547 (pfn_from_ptrmemfunc): Adjust for the new ABI.
8549 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
8551 * call.c (build_object_call): Compress consecutive calls to
8553 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
8554 (build_op_delete_call): Adjust message formatting.
8556 * class.c (check_bases): Compress consecutive calls to
8558 (finish_struct_anon): Say 'ISO C++'.
8560 * decl.c (start_decl): Same here.
8561 (grok_reference_init): Likewise.
8562 (grokfndecl): Correct message formatting.
8563 (grokfndecl): Improve diagnostic.
8564 (check_static_variable_definition): Likewise. Say 'ISO C++'
8565 (compute_array_index_type): Say 'ISO C++'
8566 (create_array_type_for_decl): Compress consecutive calls to
8568 (grokdeclarator): Say 'ISO C++'
8569 (grok_op_properties): Likewise.
8571 * decl2.c (delete_sanity): Clairify diagnostic.
8572 (check_member_template): Same here.
8573 (grok_function_init): Use consistent terminology.
8575 * expr.c (do_case): Say 'ISO C++'
8577 * friend.c (do_friend): Compress consecutive calls to warning.
8579 2000-02-20 Mark Mitchell <mark@codesourcery.com>
8581 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
8582 * class.c (build_secondary_vtable): Reorganize. Don't create a
8583 new vtable under the new ABI.
8584 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
8586 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
8587 the initializing elements.
8588 (initialize_vtable): New function.
8589 (dfs_finish_vtbls): Use it.
8590 (dfs_accumulate_vtbl_inits): New function.
8591 (finish_vtbls): Merge primary and secondary vtables under the new
8593 (finish_struct_1): Remove redundant call to layout_vtable_decl.
8594 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
8597 * class.c (build_vtable): New function, split out from ...
8598 (get_vtable_decl): ... here, and ...
8599 (build_secondary_vtable): ... here.
8601 * pt.c (tsubst_decl): Fix formatting.
8603 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8605 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
8606 (avoid_overlap, build_base_field): Likewise.
8607 (build_base_field, build_base_fields, is_empty_class):
8608 Test DECL_SIZE with integer_zero.
8609 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
8610 * cp-tree.h (struct lang_type): New field size_unit.
8611 (CLASSTYPE_SIZE_UNIT): New macro.
8612 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
8613 (cp_finish_decl): Delete -Wlarger-than processing.
8614 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
8615 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
8616 * tree.c (make_binfo): binfo vector is one entry longer.
8617 (walk_tree): Walk DECL_SIZE_UNIT.
8619 2000-02-19 Mark Mitchell <mark@codesourcery.com>
8621 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
8623 (build_vtable_entry): Don't assume all vtable entries are
8625 (build_vtbl_initializer): Adjust accordingly.
8626 (get_vtable_decl): Fix formatting.
8628 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
8630 * semantics.c (deferred_type_access_control): Walk the entire
8632 (save_type_access_control): Rename from
8633 initial_deferred_type_access_control. Just remember the value.
8634 (decl_type_access_control): New fn.
8635 (begin_function_definition): Use deferred_type_access_control, after
8636 we've started the function. Set type_lookups to error_mark_node.
8637 * parse.y (frob_specs, fn.def1): Adjust.
8638 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
8639 (parse_end_decl, parse_bitfield0, parse_method): New fns.
8640 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
8641 (after_type_component_declarator0): Likewise.
8642 (after_type_component_declarator): Likewise.
8643 (notype_component_declarator): Likewise.
8644 * cp-tree.h: Adjust.
8646 * decl.c (redeclaration_error_message): Allow redeclaration of
8647 namespace-scope decls.
8649 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
8651 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
8653 2000-02-17 Mark Mitchell <mark@codesourcery.com>
8655 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
8656 * decl2.c (grokclassfn): Likewise.
8658 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
8660 * decl2.c (lang_decode_option): Don't set default message length
8662 * lex.c (lang_init_options): Set it here.
8664 2000-02-16 Mark Mitchell <mark@codesourcery.com>
8666 Make DECL_CONTEXT mean the class in which a member function was
8667 declared, even for a virtual function.
8668 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
8669 (DECL_FRIEND_CONTEXT): New macro.
8670 (DECL_REAL_CONTEXT): Remove.
8671 (SET_DECL_FRIEND_CONTEXT): Likewise.
8672 (DECL_VIRTUAL_CONTEXT): Adjust.
8673 (DECL_CLASS_SCOPE_P): Use TYPE_P.
8674 (add_friends): Remove.
8675 (hack_decl_function_context): Likewise.
8676 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
8678 (build_over_call): Fix indentation. Use DECL_CONTEXT
8679 instead of DECL_CLASS_CONTEXT.
8680 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
8681 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
8682 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8683 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
8684 (build_base_field): Likewise.
8685 (finish_struct_1): Likewise.
8686 (build_self_reference): Likewise.
8687 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
8689 (pushtag): Use decl_function_context, not
8690 hack_decl_function_context.
8691 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8692 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
8693 (pushdecl): Remove bogus code.
8694 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
8695 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8696 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8697 Use decl_function_context, nothack_decl_function_context.
8698 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
8699 (grokdeclarator): Likewise. Use decl_function_context, not
8700 hack_decl_function_context.
8701 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
8702 (start_function): Use DECL_FRIEND_CONTEXT, not
8703 DECL_CLASS_CONTEXT. Use decl_function_context, not
8704 hack_decl_function_context.
8705 (finish_function): Use decl_function_context, not
8706 hack_decl_function_context.
8707 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
8709 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
8710 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
8711 (grokfield): Likewise.
8712 (finish_builtin_type): Likewise.
8713 (finish_vtable_vardec): Use decl_function_context, not
8714 hack_decl_function_context.
8715 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8716 (start_static_initialization_or_destruction): Likewise.
8717 (finish_static_initialization_or_destruction): Likewise.
8718 (mark_used): Adjust logic for deciding when to synthesize methods.
8719 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
8721 * error.c (dump_function_decl): Use DECL_CONTEXT, not
8723 * friend.c (is_friend): Likewise.
8724 (add_friends): Remove.
8725 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
8726 * lex.c (begin_definition_of_inclass_inline): Use
8727 decl_function_context, not hack_decl_function_context.
8728 (process_next_inline): Likewise.
8729 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8730 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
8731 DECL_CLASSS_CONTEXT.
8732 (hack_identifier): Likewise.
8733 (synthesize_method): Use decl_function_context, not
8734 hack_decl_function_context.
8735 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
8737 (is_member_template): Use decl_function_context, not
8738 hack_decl_function_context. Use DECL_CONTEXT, not
8740 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
8742 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
8744 (push_template_decl_real): Likewise.
8745 (instantiate_class_template): Don't call add_friends.
8746 (tsubst_default_argument): Use DECL_CONTEXT, not
8748 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
8749 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8750 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
8752 * repo.c (repo_inline_used): Likewise.
8753 * search.c (current_scope): Adjust for new _CONTEXT macros.
8754 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
8756 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8757 (lookup_fnfields_here):Likewise.
8758 (check_final_overrider): Likewise.
8759 (init_vbase_pointers): Likewise.
8760 (virtual_context): Likewise.
8761 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
8762 (expand_body): Use decl_function_context, not
8763 hack_decl_function_context.
8764 * tree.c (hack_decl_function_context): Remove.
8765 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
8767 * typeck2.c (error_not_base_type): Likewise.
8769 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
8771 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
8773 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8775 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
8777 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
8779 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
8781 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
8783 * decl2.c (lang_decode_option): Enable automatic line wrapping.
8785 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
8787 * parse.y (frob_specs): Split out...
8788 (parse_decl): From here.
8789 (fn.def2): Call initial_deferred_type_access_control.
8790 (after_type_component_declarator0): Call frob_specs.
8791 (notype_component_declarator0): Likewise.
8792 * search.c (friend_accessible_p): Nested classes are friends of their
8795 2000-02-10 Mark Mitchell <mark@codesourcery.com>
8797 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
8798 used to create an implicit temporary.
8800 * class.c (dfs_modify_vtables): Tweak calculation of functions to
8803 2000-02-08 Nathan Sidwell <nathan@acm.org>
8805 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
8806 strip array element qualifiers too.
8808 2000-02-07 Mark Mitchell <mark@codesourcery.com>
8810 * decl.c (store_parm_decls): Don't build cleanups for parameters
8811 while processing_template_decl.
8813 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
8815 * cp-tree.h (struct saved_scope): Add incomplete field.
8816 (namespace_scope_incomplete): New macro.
8817 * decl.c (pushdecl): Use it.
8818 (hack_incomplete_structures): Use it. See through artificial
8820 (mark_saved_scope): Mark it.
8822 Implement access control for nested types.
8823 * search.c (type_access_control): New fn.
8824 (accessible_p): Now we do perform access control for types.
8825 * semantics.c (deferred_type_access_control): New fn.
8826 (initial_deferred_type_access_control): New fn.
8827 (begin_function_definition): Call it. Add lookups parm.
8828 * decl.c (struct binding_level): Add this_class field.
8829 (pushlevel_class): Set it.
8830 (mark_binding_level): Mark it.
8831 (lookup_name_real): Use it. Call type_access_control.
8832 (mark_saved_scope): Mark lookups field.
8833 * cp-tree.h (flagged_type_tree): Add lookups field.
8834 (struct saved_scope): Add lookups field.
8835 (type_lookups): New macro.
8836 * parse.y (declmods): Now <ftype>.
8837 (parse_decl): Add lookups parm. Call
8838 initial_deferred_type_access_control.
8839 (lang_extdef): Clear type_lookups.
8840 (typed_declspecs, declmods, typespec): Set lookups field.
8841 (initdcl): Call deferred_type_access_control.
8842 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
8843 component_decl_1, named_parm): Adjust.
8844 * friend.c (is_friend): Nested classes are friends of their
8847 * class.c (currently_open_derived_class): New fn.
8848 * method.c (hack_identifier): Use it.
8850 * lex.c (do_identifier): Remove obsolete code.
8852 * parse.y (typed_typespecs): Propagate new_type_flag properly.
8854 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
8856 * tinfo.h: Remove apostrophes from C++ comment (xgettext
8857 thinks this file is plain C).
8859 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8861 * Makefile.in (call.o): Depend on $(EXPR_H).
8863 * call.c: Include "expr.h".
8865 * class.c (dump_class_hierarchy): Add prototype.
8867 * search.c (dfs_get_pure_virtuals): Likewise.
8869 2000-02-1 Ulrich Drepper <drepper@redhat.com>
8871 * parse.y (simple_stmt): Allow :: token in asm parameter list.
8874 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
8876 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
8877 Store it in DECL_FCONTEXT.
8878 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
8880 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
8882 * tinfo.h (old abi): #include "tconfig.h".
8883 * tinfo.cc (convert_to_base): Move into old abi section.
8885 2000-01-31 Mark Mitchell <mark@codesourcery.com>
8887 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
8888 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
8889 (BINFO_PRIMARY_BINFO): New macro.
8890 (BF_DELTA): Rename to ...
8891 (BV_DELTA): ... this.
8892 (BF_VCALL_INDEX): Rename to ...
8893 (BV_VCALL_INDEX): ... this.
8894 (BF_FN): Rename to ...
8896 * class.c (build_vbase_path): Adjust for changes to reverse_path.
8897 (set_rtti_entry): Rename BF_ macros to BV_ variants.
8898 (modify_vtable_entry): Simplify.
8899 (add_virtual_function): Rename BF_ macros to BV_ variants.
8900 (build_vtable_initializer): Likewise.
8901 (get_class_offset_1): Remove.
8902 (dfs_get_class_offset): Likewise.
8903 (get_class_offset): Likewise.
8904 (dfs_find_final_overrider): New function.
8905 (find_final_overrider): Likewise.
8906 (modify_one_vtable): Remove.
8907 (dfs_find_base): New function.
8908 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
8909 find_final_overrider.
8910 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
8912 (dfs_fixup_vtable_deltas): Remove.
8913 (override_one_vtable): Remove.
8914 (merge_overrides): Likewise.
8915 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
8916 unreal chilren of virtual bases.
8917 (finish_struct_1): Don't use merge_overrides. Don't use
8918 dfs_fixup_vtable_deltas.
8919 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
8922 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
8923 Jason Merrill <jason@yorick.cygnus.com>
8925 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
8927 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
8929 * exception.cc (__throw_bad_typeid): Add missing std::.
8931 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8933 * cp-tree.h (make_thunk): PROTO -> PARAMS.
8935 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
8937 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
8939 Runtime support for new-abi rtti.
8940 * inc/typeinfo (type_info::operator!=): Define in class.
8941 (type_info::before, type_info::name, type_info::operator==,
8942 type_info::operator!=): Define new ABI implementations.
8943 (type_info::is_pointer_p, type_info::is_function_p): Declare
8944 new virtual functions.
8945 (type_info::do_catch, type_info::do_upcast): Likewise.
8947 * tinfo.h (__base_class_info): Define new class.
8948 (__class_type_info): Likewise.
8949 (__si_class_type_info): Likewise.
8950 (__vmi_class_type_info): Likewise.
8951 (__dynamic_cast): Prototype.
8953 * tinfo.cc: Conditionalize old and new rtti mechanisms.
8954 (type_info::is_pointer_p): Define new function.
8955 (type_info::is_function_p): Likewise.
8956 (type_info::do_catch): Likewise.
8957 (type_info::do_upcast): Likewise.
8958 (vtable_prefix): New structure for vtable access.
8959 (adjust_pointer): Define new template function.
8960 (contained_p, public_p, virtual_p, contained_public_p,
8961 contained_nonpublic_p, contained_nonvirtual_p): Define new
8963 (nonvirtual_base_type): New local variable.
8964 (__class_type_info::~__class_type_info): Define.
8965 (__si_class_type_info::~__si_class_type_info): Likewise.
8966 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
8967 (__class_type_info::do_catch): Define new function.
8968 (__class_type_info::do_upcast): Likewise.
8969 (__class_type_info::find_public_src): Likewise.
8970 (__class_type_info::do_find_public_src): Likewise.
8971 (__si_class_type_info::do_find_public_src): Likewise.
8972 (__vmi_class_type_info::do_find_public_src): Likewise.
8973 (__class_type_info::do_dyncast): Likewise.
8974 (__si_class_type_info::do_dyncast): Likewise.
8975 (__vmi_class_type_info::do_dyncast): Likewise.
8976 (__class_type_info::do_upcast): Likewise.
8977 (__si_class_type_info::do_upcast): Likewise.
8978 (__vmi_class_type_info::do_upcast): Likewise.
8979 (__dynamic_cast): Likewise.
8981 * tinfo2.cc (__fundamental_type_info): Define new class.
8982 (__pointer_type_info): Likewise.
8983 (__reference_type_info): Likewise.
8984 (__array_type_info): Likewise.
8985 (__function_type_info): Likewise.
8986 (__enum_type_info): Likewise.
8987 (__ptr_to_member_type_info): Likewise.
8988 (__fundamental_type_info::~__fundamental_type_info): Define.
8989 (__pointer_type_info::~__pointer_type_info): Likewise.
8990 (__reference_type_info::~__reference_type_info): Likewise.
8991 (__array_type_info::~__array_type_info): Likewise.
8992 (__function_type_info::~__function_type_info): Likewise.
8993 (__enum_type_info::~__enum_type_info): Likewise.
8994 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
8995 (__pointer_type_info::do_catch): Define new function.
8996 (__ptr_to_member_type_info::do_catch): Define new function.
8998 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
8999 (__is_pointer): Likewise.
9001 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
9003 2000-01-30 Mark Mitchell <mark@codesourcery.com>
9005 * cp/class.c (build_vtable): Rename to build_primary_vtable.
9006 (prepare_fresh_vtable): Rename to build_secondary_vtable.
9007 (make_new_vtable): New function.
9008 (modify_vtable_entry): Handle generation of new vtables correctly.
9009 (modify_one_vtable): Remove unused parameter.
9010 (dfs_fixup_vtable_deltas): Likewise.
9011 (override_one_vtable): Use build_secondary_vtable.
9012 (finish_struct_1): Use build_primary_vtable and
9013 build_secondary_vtable.
9015 2000-01-28 Ulrich Drepper <drepper@redhat.com>
9017 * cp/decl.c: Adjust variable names, comments, help strings.
9019 2000-01-29 Nathan Sidwell <nathan@acm.org>
9021 * new2.cc (operator delete[]): Use operator delete, don't assume
9024 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
9026 * class.c (build_vtbl_initializer): Add argument to
9027 build_vtable_entry call.
9029 2000-01-27 Mark Mitchell <mark@codesourcery.com>
9031 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
9032 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
9033 (BF_DELTA): New macro.
9034 (BF_VCALL_INDEX): Likewise.
9036 (THUNK_VCALL_OFFSET): Likewise.
9037 (make_thunk): Change prototype.
9038 * class.c (build_vtable_entry): Integrate
9039 build_vtable_entry_for_fn. Handle vcall indices.
9040 (build_vtable_entry_for_fn): Remove.
9041 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
9042 BF_VCALL_INDEX, BF_FN.
9043 (modify_vtable_entry): Integrate common code from
9044 modify_one_vtable and dfs_fixup_vtable_deltas.
9045 (add_virtual_function): Set BF_VCALL_INDEX.
9046 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
9048 (modify_one_vtable): Simplify.
9049 (dfs_fixup_vtable_deltas): Likewise.
9050 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
9051 * method.c (make_thunk): Handle vcall indices.
9053 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
9055 Compiler side new abi rtti (not enabled).
9056 * cp-tree.h (new_abi_rtti_p): New macro.
9057 (emit_support_tinfos): Prototype new function.
9058 (tinfo_decl_p): Likewise.
9059 (emit_tinfo_decl): Likwise.
9060 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
9062 (doing_runtime): New local static.
9063 (init_rtti_processing): Add new-abi initializer.
9064 (get_tinfo_decl): Add new-abi logic.
9065 (tinfo_from_decl): Likewise.
9066 (build_dynamic_cast_1): Likewise.
9067 (qualifier_flags): New static function.
9068 (tinfo_base_init): Likewise.
9069 (generic_initializer): Likewise.
9070 (ptr_ref_initializer): Likewise.
9071 (ptmd_initializer): Likewise.
9072 (class_hint_flags): Likewise.
9073 (class_initializer): Likewise.
9074 (synthesize_tinfo_var): Likewise.
9075 (create_real_tinfo_var): Likewise.
9076 (create_pseudo_type_info): Likewise.
9077 (get_vmi_pseudo_type_info): Likewise.
9078 (create_tinfo_types): Likewise.
9079 (emit_support_tinfos): New global function.
9080 (tinfo_decl_p): New global predicate.
9081 (emit_tinfo_decl): New global function.
9082 * class.c (set_rtti_entry): Generalize for old and new rtti.
9083 (build_vtbl_initializer): Likewise.
9084 * decl2.c (finish_file): Likewise.
9086 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
9088 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
9089 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
9091 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
9093 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
9096 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
9098 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
9100 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
9102 * optimize.c (calls_setjmp_r): Supply new argument
9103 to special_function_p.
9105 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9107 * call.c: PROTO -> PARAMS.
9108 * class.c: Likewise.
9109 * cp-tree.h: Likewise.
9113 * decl2.c: Likewise.
9115 * errfn.c: Likewise.
9116 * error.c: Likewise.
9117 * except.c: Likewise.
9120 * input.c: Likewise.
9123 * method.c: Likewise.
9124 * optimize.c: Likewise.
9125 * parse.y: Likewise.
9129 * search.c: Likewise.
9130 * semantics.c: Likewise.
9133 * typeck.c: Likewise.
9134 * typeck2.c: Likewise.
9137 2000-01-25 Richard Henderson <rth@cygnus.com>
9139 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
9141 2000-01-25 Mark Mitchell <mark@codesourcery.com>
9143 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
9144 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
9145 (struct vcall_offset_data_s): New type.
9146 (dfs_vcall_offset_queue_p): New function.
9147 (dfs_build_vcall_offset_vtbl_entries): Likewise.
9148 (build_vcall_offset_vtbl_entries): Likewise.
9149 (layout_vtable_decl): Likewise.
9150 (num_vfun_entries): Likewise.
9151 (num_extra_vtbl_entries): Add the entries for vcall offsets.
9152 (build_vtbl_initializer): Likewise.
9153 (dfs_finish_vtabls): Use layout_vtable_decl.
9154 (modify_one_vtables): Always duplicate vtables under the new ABI.
9155 (finish_struct_1): Use layout_vtable_decl.
9157 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9159 * decl.c (member_function_or_else): Change third arg from a format
9160 specifier to an `enum overload_flags'. Callers changed.
9162 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
9164 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
9165 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
9166 build_const_cast, get_delta_difference, check_return_expr): Avoid
9167 ANSI string concatenation usage.
9169 2000-01-24 Mark Mitchell <mark@codesourcery.com>
9171 * class.c (layout_class_type): Put the fields required to make a
9172 class non-empty at the end, not the beginning, of the TYPE_FIELDs
9175 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
9177 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
9180 * decl2.c (mark_used): Do instantiate inlines that have been
9181 explicitly instantiated.
9183 2000-01-24 Richard Henderson <rth@cygnus.com>
9185 * call.c (build_over_call): Use expand_tree_builtin.
9186 * typeck.c (build_function_call_real): Likewise.
9187 (build_binary_op_nodefault): Handle unordered compares.
9189 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9191 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
9192 cp_tree_index values.
9193 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
9194 New global node #defines for them.
9195 * rtti.c (call_void_fn): Replace with ...
9196 (build_runtime_decl): ... new static function.
9197 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
9198 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
9199 (build_dynamic_cast_1): Always produce correctly typed result.
9200 Explicitly produce type_info addresses. Use dynamic_cast_node.
9201 * exception.cc (__throw_bad_cast): Return `void *'.
9202 (__throw_bad_typeid): Return `const type_info &'.
9204 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9206 * cp-tree.h (get_vtable_decl): Prototype new function.
9207 * class.c (get_vtable_decl): New function. Broken out from ...
9208 (build_vtable): ... here. Use it.
9209 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
9212 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9214 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
9215 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
9216 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
9217 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
9218 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
9219 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
9220 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
9221 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
9222 (CPTI_TINFO_VAR_ID): New enumeration.
9223 (__tp_desc_type_node, __access_mode_type_node,
9224 __bltn_desc_type_node, __user_desc_type_node,
9225 __class_desc_type_node, __ptr_desc_type_node,
9226 __attr_desc_type_node, __func_desc_type_node,
9227 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
9228 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
9229 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
9230 enum_desc_type_node, class_desc_type_node,
9231 si_class_desc_type_node, vmi_class_desc_type_node,
9232 ptmd_desc_type_node, base_desc_type_node): New #defines.
9233 (tinfo_fn_id, tinfo_fn_type): Rename to ...
9234 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
9235 (tinfo_var_id): New enumeration.
9236 (DECL_TINFO_FN_P): Augment comment.
9237 * decl.c (cp_global_trees): Adjust documentation.
9238 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
9239 tinfo_decl_type and tinfo_var_id.
9240 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
9241 (build_typeid): Remove unused variable.
9242 (get_tinfo_var): Use tinfo_var_id.
9243 (tinfo_name): New static function.
9244 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
9245 (tinfo_from_decl): Likewise.
9246 (get_base_offset): New static function, broken out of
9248 (expand_si_desc): Use tinfo_name.
9249 (expand_class_desc): Likewise. Lose local static variable.
9250 Use base_desc_type_node. Use get_base_offset.
9251 (expand_ptr_desc): Use tinfo_name.
9252 (expand_attr_desc): Likewise.
9253 (expand_generic_desc): Likewise.
9255 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
9256 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
9258 2000-01-23 Mark Mitchell <mark@codesourcery.com>
9260 * cp-tree.h (__eprintf): Remove declaration.
9261 * tree.c (__eprintf): Remove definition.
9263 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
9264 Mark Mitchell <mark@codesourcery.com>
9266 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
9267 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
9269 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
9271 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
9273 2000-01-23 Mark Mitchell <mark@codesourcery.com>
9275 * cp-tree.h (register_dtor_fn): New function.
9276 * decl.c (destroy_local_static): Rename to ...
9277 (register_dtor_fn): ... this. Give it external linkage.
9278 (expand_static_init): Use it.
9279 * decl2.c (do_static_initialization): Likewise, if using
9281 (do_static_destruction): Check that __cxa_atexit is not in use.
9282 (finish_file): Don't call do_static_destruction if using
9285 * typeck.c (convert_arguments): Restore two-message error
9288 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
9290 Remap dynamic cast hint values to be consistent across ABIs.
9291 * search.c (dynamic_cast_base_recurse): Remap generated value.
9292 (get_dynamic_cast_base_type): Adjust documentation.
9293 * tinfo.h (__user_type_info::dyncast): Likewise.
9294 (__user_type_info::find_public_subobj): Remap BOFF meaning.
9295 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
9296 (__class_type_info::do_dyncast): Likewise.
9297 (__class_type_info::do_find_public_subobj): Likewise.
9298 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
9300 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
9302 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
9304 * typeck2.c (incomplete_type_error): Restore previous
9305 cp_error and cp_error_at call sequence.
9307 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
9309 * class.c (dump_class_hierarchy): Make format agree with argument;
9310 cast pointer to unsigned long and print with %lx.
9312 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
9314 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
9316 * typeck.c (composite_pointer_type, common_type,
9317 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
9318 build_function_call_real, convert_arguments,
9319 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
9320 build_unary_op, mark_addressable, build_compound_expr,
9321 build_static_cast, build_reinterpret_cast, build_const_cast,
9322 build_c_cast, build_modify_expr, get_delta_difference,
9323 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
9324 'ISO C++'. Fusion consecutive calls to diagnotic message routines
9326 * typeck2.c (readonly_error, abstract_virtuals_error,
9327 process_init_constructor, check_for_new_type): Likewise.
9329 2000-01-19 Mark Mitchell <mark@codesourcery.com>
9331 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
9334 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
9336 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
9337 (build_x_typeid): Likewise.
9338 (get_tinfo_fn): Likewise.
9339 (get_tinfo_fn_unused): Rename to ...
9340 (get_tinfo_decl): ... here.
9341 * rtti.c (build_headof): Replace logic error with assertion.
9342 (get_tinfo_fn_dynamic): Rename to ...
9343 (get_tinfo_decl_dynamic): ... here. Make static. Use
9344 complete_type_or_else.
9345 (build_x_typeid): Move into ...
9346 (build_typeid): ... here. Adjust call to
9347 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
9348 throw_bad_typeid expression.
9349 (get_tinfo_fn_unused): Rename to ...
9350 (get_tinfo_decl): ... here. Adjust comment.
9351 (get_tinfo_fn): Delete.
9352 (tinfo_from_decl): New static function.
9353 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
9354 (get_typeid): Use complete_type_or_else.
9355 (build_dynamic_cast_1): Adjust calls to
9356 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
9357 * parse.y (primary): Adjust call to build_typeid.
9358 * except.c (build_eh_type_type_ref): Adjust call to
9359 get_tinfo_decl. Mark as used.
9360 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
9361 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
9362 * parse.c: Regenerated.
9364 2000-01-17 Mark Mitchell <mark@codesourcery.com>
9366 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
9368 (resolves_to_fixed_type_p): Document calling convention.
9369 * rtti.c (build_x_typeid): Initialize NONNULL.
9371 * cp-tree.h (build_shared_int_cst): New function.
9372 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
9373 * class.c (modify_vtable_entry): Likewise.
9374 (add_virtual_function): Split out code to generated shared
9375 INTEGER_CSTs to build_share_int_cst.
9376 (modify_all_vtables): Handle all the overridden functions here.
9377 Add overridden functions from non-primary virtual bases to the
9379 (finish_struct_1): Adjust call to modify_all_vtables. Add
9380 overridden functions from non-primary bases to the vtable.
9381 * tree.c (build_shared_int_cst): New function.
9383 * cp-tree.h (scratchalloc): Remove.
9384 (build_scratch_list): Likewise.
9385 * call.c (convert_class_to_reference): Replace build_scratch_list
9386 and build_expr_list with build_tree_list.
9387 (add_candidate): Replace scratchalloc with expralloc. Note memory
9389 (build_user_type_conversion_1): Replace build_scratch_list
9390 and build_expr_list with build_tree_list.
9391 (build_new_op): Likewise.
9392 (build_op_delete_call): Likewise.
9393 (convert_like): Likewise.
9394 * cvt.c (ocp_convert): Likewise.
9395 * decl.c (start_decl): Likewise.
9396 (start_function): Likewise.
9397 (finish_destructor_body): Likewise.
9398 (maybe_build_cleanup_1): Likewise.
9399 * decl2.c (reparse_decl_as_expr): Likewise.
9400 * init.c (perform_member_init): Likewise.
9401 (expand_cleanup_for_base): Likewise.
9402 (build_builtin_delete_call): Likewise.
9403 (build_new_1): Likewise.
9404 (build_delete): Likewise.
9405 * method.c (do_build_assign_ref): Likewise.
9406 * parse.y (already_scoped_stmt): Likewise.
9407 (nontrivial_exprlist): Likewise.
9408 (net_initializer): Likewise.
9409 (initlist): Likewise.
9410 * parse.c: Regenerated.
9411 * rtti.c (build_x_typeid): Likewise.
9412 (build_dynamic_cast_1): Likewise.
9413 * typeck.c (build_x_compound_expr): Likewise.
9414 (build_static_cast): Likewise.
9415 (build_modify_expr): Likewise.
9417 * cp-tree.h (DECL_VINDEX): Add documentation.
9418 * class.c (build_vtable_entry): Likewise.
9419 (start_vtable): Add comment.
9420 (add_virtual_function): Replace pending_hard_virtuals with
9421 overridden_virtuals and pending_virtuals with new_virtuals.
9422 Replace redundant assignments with assertions.
9423 (check_for_override): Add comment.
9424 (check_bases_and_members): Replace pending_hard_virtuals with
9425 overridden_virtuals and pending_virtuals with new_virtuals.
9426 (create_vtbl_ptr): Likewise.
9427 (layout_class_type): Likewise.
9428 (finish_struct_1): Likewise. Add comments.
9430 2000-01-16 Mark Mitchell <mark@codesourcery.com>
9432 * class.c (finish_struct_1): Replace redundant code with
9435 * cp-tree.h (flag_new_abi): Move.
9436 (flag_use_cxa_atexit): Likewise.
9437 (flag_honor_std): Likewise.
9438 (flag_rtti): Likewise.
9439 (vbase_offsets_in_vtable_p): Define.
9440 (vptrs_present_everywhere_p): Likewise.
9441 (TYPE_CONTAINS_VPTR_P): Likewise.
9442 (dfs_walk_real): Declare.
9443 * class.c (build_vbase_pointer_fields): Check
9444 vbase_offsets_in_vtable_p.
9445 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
9447 (build_vbase_offset_vtbl_entries): Simplify.
9448 (build_vbase_offset_vtbl_entries): Adjust.
9449 (build_vbase_pointer): Add ability to look up vbase offsets in
9451 (start_vtable): New function.
9452 (add_virtual_function): Use it.
9453 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
9454 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
9455 (build_vtbl_initializer): Take the type of the complete object as
9456 input. Use it to correctly calculate vbase offsets.
9457 (dfs_finish_vtbls): Pass the complete type to
9458 build_vtbl_initializer.
9459 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
9460 (create_vtable_ptr): Create a vtable even if there are no
9461 new virtual functions, under the new ABI.
9462 (finish_struct_1): Likewise.
9463 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
9464 * decl.c (exapnd_static_init): Remove call to
9465 preserve_initializer.
9466 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
9468 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
9469 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
9470 (construct_virtual_bases): Don't initialize virtual base pointers
9472 (build_aggr_init): Clean up comment.
9473 (expand_aggr_init_1): Likewise.
9474 * rtti.c (expand_class_desc): Store the virtual function table
9475 index where the vbase offset lives in the offset field.
9476 * search.c (dfs_walk_real): Make it global.
9477 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
9478 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
9480 * tinfo.h (USItype): Make it signed under the new ABI.
9481 * tinfo.cc (convert_to_base): New function. Encapsulate base
9482 conversion logic here.
9483 (__class_type_info::do_upcast): Use it.
9484 (__class_type_info::do_dyncast): Likewise.
9485 (__class_type_info::do_find_public_subobj): Likewise.
9487 * init.c (construct_virtual_bases): Don't look up the addresses of
9488 virtual bases at run-time.
9490 * class.c (build_vbase_pointer): Relocate.
9491 (build_vbase_pointer_fields): Likewise.
9492 (dfs_build_vbase_offset_vtbl_entries): Likewise.
9493 (build_vbase_offset_vtbl_entries): Likewise.
9495 * decl.c (init_decl_processing): Complain if -fnew-abi
9496 -fno-vtable-thunks is used.
9498 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
9501 2000-01-15 Mark Mitchell <mark@codesourcery.com>
9503 * cp-tree.h (num_extra_vtbl_entries): New function.
9504 (size_extra_vtbl_entries): Likewise.
9505 (dfs_vtable_path_unmark): Likewise.
9506 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
9507 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
9508 * class.c (num_extra_vtbl_entries): New function.
9509 (size_extra_vtbl_entries): Likewise.
9510 (dfs_build_vbase_offset_vtbl_entries): New function.
9511 (build_vbase_offset_vtbl_entries): Likewise.
9512 (build_vtbl_initializer): Use it.
9513 (finish_struct_1): Adjust vtable sizes (using
9514 num_extra_vtbl_entries).
9515 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
9516 THUNK_DECL is non-NULL before expanding it.
9517 * init.c (expand_virtual_init): Adjust the vtable pointer by
9518 size_extra_vtbl_entries before storing it.
9519 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
9520 Handle TREE_LIST parameters here, not in the dfs_* functions.
9521 (dfs_unmarked_real_bases_queue_p): Adjust.
9522 (dfs_marked_real_bases_queue_p): Likewise.
9523 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
9524 (dfs_vtable_path_marked_real_bases_queue_p): New function.
9525 (dfs_vtable_path_unmark): Likewise.
9527 2000-01-14 Mark Mitchell <mark@codesourcery.com>
9529 * optimize.c (copy_body_r): Clear the operand three of a
9530 TARGET_EXPR when copying it.
9532 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9534 * method.c (build_decl_overload_real): Check whether we are in ::
9535 before returning __builtin_new/delete.
9537 2000-01-13 Mark Mitchell <mark@codesourcery.com>
9539 * pt.c (tsubst_friend_function): Improve comment.
9540 (instantiate_decl): Avoid crashing when a "nested" function is
9541 instantiated from the top level.
9543 * dump.c (dqeueue_and_dump): Dump
9544 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
9546 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9548 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
9550 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
9552 * g++spec.c (lang_specific_driver): Add -fnew-abi if
9553 ENABLE_NEW_GXX_ABI defined.
9554 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
9555 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
9556 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
9558 2000-01-12 Mark Mitchell <mark@codesourcery.com>
9560 * decl.c (start_cleanup_fn): Call pushdecl.
9562 * call.c (convert_class_to_reference): Fix typos.
9563 (build_conditional_expr): Handle errors gracefully.
9564 * class.c (push_nested_class): Likewise.
9565 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
9566 (DECL_THIS_EXTERN): Use it.
9567 (DECL_THIS_STATIC): Likewise.
9568 * cvt.c (convert_to_void): Handle errors gracefully.
9569 (build_expr_type_conversion): Likewise.
9570 * decl.c (maybe_push_decl): Likewise.
9571 (start_decl_1): Likewise.
9572 (require_complete_types_for_parms): Likewise.
9573 * parse.y (structsp): Likewise.
9574 (base_class): Likewise.
9575 * parse.c: Regenerated.
9576 * pt.c (finish_member_template_decl): Likewise.
9577 * typeck.c (decay_conversion): Likewise.
9579 * cp-tree.h (dfs_skip_vbases): New function.
9580 (find_vbase_instance): Likewise.
9581 * class.c (determine_primary_base): Allow a nearly empty base to
9582 serve as a primary base class under the new ABI.
9583 (get_class_offset_1): Rename to ...
9584 (dfs_get_class_offset): ... this. Simplify. Don't issue error
9586 (get_class_offset): Use it. Issue error messages here.
9587 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
9588 find the right copies of virtual bases.
9589 (fixup_vtable_deltas1): Rename to ...
9590 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
9591 bases as primary bases.
9592 (fixup_vtable_deltas): Remove.
9593 (override_one_vtable): Handle virtual bases as primary bases.
9594 (merge_overrides): Likewise.
9595 (finish_struct_1): Likewise.
9596 (dump_class_hierarchy): Dump primary-ness of bases as well.
9597 * search.c (mark_primary_bases): Use a pre-order traversal to
9598 handle primary virtual bases.
9599 (dfs_skip_vbases): New fiunction.
9600 (expand_upcast_fixups): Adjust to handle primary virtual bases.
9601 (fixup_virtual_upcast_offsets): Likewise.
9602 (fixup_all_virtual_upcast_offsets): Likewise.
9603 (dfs_find_vbase_instances): New function.
9604 (find_vbase_instance): Likewise.
9606 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
9608 * lex.c (DIR_SEPARATOR): Delete macro.
9610 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
9612 * decl2.c (lang_decode_option): Handle automatic line wrapping
9615 2000-01-11 Mark Mitchell <mark@codesourcery.com>
9617 * friend.c (do_friend): Don't resolve scopes when processing
9618 template declarations, even if the qualifying scope doesn't
9619 involve template parameters.
9621 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
9623 * class.c (dfs_modify_vtables_queue_p): Remove.
9624 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
9625 and dfs_marked_real_bases_queue_p instead of
9626 dfs_modify_vtables_queue_p.
9628 * class.c (build_vbase_path): Simplify.
9629 (dfs_propagate_binfo_offsets): New function.
9630 (propagate_binfo_offsets): Use it.
9631 (remove_base_field): Simplify.
9632 (dfs_set_offset_for_vbases): Remove.
9633 (dfs_set_offset_for_shared_vbases): New function.
9634 (dfs_set_offset_for_unshared_vbases): Likewise.
9635 (layout_virtual_bases): Use them.
9636 (layout_basetypes): Don't call propagate_binfo_offsets.
9637 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
9640 * class.c (build_base_field): New function, split out from ...
9641 (build_base_fields): ... here. Use it. Allocate primary bases
9642 first, under the new ABI.
9643 (get_vtable_entry): Remove.
9644 (remove_base_field): New function, split out from ...
9645 (remove_base_fields): ... here. Adjust since primary bases come
9646 first under the new ABI.
9648 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
9649 (initialize_vtbl_ptrs): New function.
9650 (expand_indirect_vtbls_init): Change prototype.
9651 (convert_pointer_to_vbase): Declare.
9652 * init.c (expand_direct_vtbls_init): Remove.
9653 (dfs_initialize_vtbl_ptrs): New function.
9654 (initialize_vtbl_ptrs): Likewise.
9655 (emit_base_init): Use initialize_vtbl_ptrs.
9656 * search.c (convert_pointer_to_vbase): Make it global.
9657 (expand_indirect_vtbls_init): Remove vtable initialization code.
9658 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
9660 * class.c (dfs_finish_vtbls): New function.
9661 (finish_vtbls): Use it.
9662 (dump_class_hierarchy): New function.
9664 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
9665 (BINFO_VBASE_PRIMARY_P): New macro.
9666 (BINFO_VIRTUALS): Add to documentation.
9667 (SET_BINFO_PRIMARY_MARKED_P): Remove.
9668 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9669 (dfs_mark_primary_bases_queue_p): Likewise.
9670 (dfs_unmarked_real_bases_queue_p): New function.
9671 (dfs_marked_real_bases_queue_p): Likewise.
9672 * search.c (dfs_mark_primary_bases): Adjust.
9673 (mark_primary_bases): Likewise.
9674 (get_shared_vbase_if_not_primary): New function.
9675 (dfs_unmarked_real_bases_queue_p): Likewise.
9676 (dfs_marked_real_bases_queue_p): Likewise.
9677 (dfs_get_pure_virtuals): Simplify.
9678 (get_pure_virtuals): Likewise.
9680 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9682 * lex.c: Include tm_p.h.
9684 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
9686 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
9688 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
9690 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
9691 * pt.c (instantiate_decl): Defer comdat templates that might not be
9694 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
9695 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
9696 (finish_file): Likewise.
9698 * decl2.c (import_export_class): Undo 12/14 change.
9700 * error.c (dump_decl): operator new, not operatornew.
9702 * class.c (field_decl_cmp): A nontype is "greater" than a type.
9703 * search.c (lookup_field_1): Look for the last field with the
9706 2000-01-05 Nathan Sidwell <nathan@acm.org>
9708 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
9711 2000-01-05 Nathan Sidwell <nathan@acm.org>
9713 * typeck.c (build_static_cast): Don't strip target qualifiers
9714 when casting from a class.
9716 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9718 * class.c (warn_hidden): Initialize variable `fndecl'.
9720 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
9722 * decl.c (flag_isoc9x): New variable to be able to use code in
9723 c-common.c. For now always zero.
9725 2000-01-03 Mark Mitchell <mark@codesourcery.com>
9727 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
9728 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
9729 or unshare_base_binfos for virtual bases here.
9730 * search.c (dfs_get_vbase_types): Do it here.
9731 (get_vbase_types): Adjust.
9733 2000-01-02 Mark Mitchell <mark@codesourcery.com>
9735 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
9736 (BINFO_PRIMARY_MARKED_P): Use flag 5.
9737 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
9738 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9739 (unmark_primary_bases): Remove declaration.
9740 (unmarkedp): Declare.
9741 (dfs_vbase_unmark): Likewise.
9742 * class.c (determine_primary_base): Return immediately if there
9743 are no base classes. Call mark_primary_bases here.
9744 (modify_all_direct_vtables): Remove.
9745 (modify_all_indirect_vtables): Remove.
9746 (dfs_modify_vtables_queue_p): New function.
9747 (dfs_modify_vtables): New function.
9748 (modify_all_vtables): Use them.
9749 (build_base_fields): Build FIELD_DECLs for primary virtual base
9751 (create_vtable_ptr): Don't call determine_primary_base here.
9752 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
9753 (dfs_set_offset_for_vbases): ... this.
9754 (layout_virtual_bases): Use it.
9755 (layout_class_type): Call determine_primary_base here.
9756 * search.c (unmarkedp): Make it global.
9757 (shared_marked_p): Simplify.
9758 (shared_unmarked_p): Likewise.
9759 (dfs_primary_bases_queue_p): Remove.
9760 (dfs_unmark_primary_bases): Likewise.
9761 (unmark_primary_bases): Likewise.
9762 (mark_primary_bases): Simplify.
9763 (get_pure_virtuals): Don't call mark_primary_bases here.
9764 (dfs_vbase_unmark): New function.
9765 (get_vbase_types): Simplify.
9767 * class.c (struct base_info): Remove.
9768 (determine_primary_base): Take has_virtual_p rather than a
9769 base_info as input. Don't calculate max_has_virtual.
9770 (finish_struct_bits): Remove max_has_virtual argument.
9771 (create_vtable_ptr): Remove max_has_virtual_p argument.
9772 (layout_virtual_bases): Remove max argument.
9773 (layout_basetypes): Likewise.
9774 (layout_class_type): Remove max_has_virtual_p argument.
9775 (finish_struct_1): Remove max_has_virtual.
9777 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
9778 (layout_basetypes): Remove.
9779 * class.c (propagate_binfo_offsets): Moved here from tree.c.
9780 Update to handle primary virtual bases.
9781 (remove_base_fields): New function, split out from
9783 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
9784 (layout_virtual_bases): New function, split out from
9785 layout_basetypes. Update to handle primary virtual bases.
9786 (layout_basetypes): Moved here from tree.c. Use
9787 remove_base_fields and layout_virtual_bases.
9788 * search.c (dfs_mark_primary_bases_queue_p): New function.
9789 (mark_primary_bases): Use it.
9790 * tree.c (CEIL): Remove.
9791 (propagate_binfo_offsets): Remove.
9792 (layout_basetypes): Remove.
9794 2000-01-01 Mark Mitchell <mark@codesourcery.com>
9796 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
9797 (BINFO_PRIMARY_MARKED_P): New macro.
9798 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
9799 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9800 (mark_primary_bases): New function.
9801 (unmark_primary_bases): Likewise.
9802 * search.c (get_abstract_virtuals_1): Remove.
9803 (dfs_mark_primary_bases): New function.
9804 (mark_primary_bases): Likewise.
9805 (dfs_unmark_primary_bases): Likewise.
9806 (unmark_primary_bases): Likewise.
9807 (dfs_get_pure_virtuals): Likewise.
9809 2000-01-01 Mark Mitchell <mark@codesourcery.com>
9811 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
9812 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
9813 (modify_one_vtable): Adjust.
9814 (fixup_vtable_deltas1): Likewise.
9815 (override_one_vtable): Likewise.
9816 * search.c (get_abstract_virtuals_1): Likewise.
9817 (get_pure_virtuals): Likewise.
9818 (expand_upcast_fixups): Likewise.
9819 * tree.c (debug_binfo): Likewise.
9821 * class.c (build_vtable): Don't return a value. Don't rebuild
9822 vtables for bases that have already been handled.
9823 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
9824 already been handled.
9825 (modify_one_vtable): Adjust accordingly.
9826 (fixup_vtable_deltas1): Likewise.
9827 (finish_struct_1): Likewise.
9829 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9831 * call.c (build_new_method_call): Also check destructors.