1 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
3 Support named return value optimization for inlines, too.
4 * decl.c (finish_function): Nullify returns here.
5 * semantics.c (genrtl_start_function): Not here.
6 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
7 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
8 Also nullify the CLEANUP_STMT for the nrv.
9 * cp-tree.h: Declare it.
10 * optimize.c (declare_return_variable): Replace the nrv with the
12 * typeck.c (check_return_expr): Be more flexible on alignment check.
13 Ignore cv-quals when checking for a matching type.
15 2001-08-09 Richard Henderson <rth@redhat.com>
17 * decl2.c (finish_objects): Use target hooks instead of
18 assemble_constructor and assemble_destructor.
20 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
22 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
24 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
27 Stop using TYPE_NONCOPIED_PARTS.
28 * call.c (build_over_call): Be careful when copy constructing
29 or assigning to an empty class.
30 * class.c (check_bases_and_members): It has a
31 COMPLEX_ASSIGN_REF if it has a vptr.
32 (layout_class_type): Don't add empty class padding to
34 (finish_struct_1): Don't add the VFIELD either.
35 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
38 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
40 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
42 2001-08-06 Richard Henderson <rth@redhat.com>
44 * decl2.c (finish_objects): Pass a symbol_ref and priority to
45 assemble_{constructor,destructor}. Remove priority handling.
47 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
49 Don't allow template-id in using-declaration.
50 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
51 (do_class_using_decl): Likewise.
53 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
55 * cp/spew.c (read_token): No need to pop buffers.
57 2001-08-02 Stan Shebs <shebs@apple.com>
59 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
60 (fnaddr_from_vtable_entry): Remove decl.
61 * method.c (use_thunk): Update comment.
63 2001-08-01 Andrew Cagney <ac131313@redhat.com>
65 * repo.c (get_base_filename): Change return value to const char
68 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
72 * cp-tree.h (flag_honor_std): Remove.
73 (CPTI_FAKE_STD): Remove.
74 (std_node): Remove comment about it being NULL.
75 (fake_std_node): Remove.
76 * decl.c (in_fake_std): Remove.
77 (walk_namespaces_r): Remove fake_std_node check.
78 (push_namespace): Remove in_fake_std code.
79 (pop_namespace): Likewise.
80 (lookup_name_real): Remove fake_std_node check.
81 (init_decl_processing): Always create std_node. Always add
83 (builtin_function): Always put non '_' fns in std.
84 * decl2.c (flag_honor_std): Remove.
85 (lang_f_options): Remove honor-std.
86 (unsupported_options): Add honor-std.
87 (set_decl_namespace): Remove fake_std_node check.
88 (validate_nonmember_using_decl): Likewise.
89 (do_using_directive): Likewise.
90 (handle_class_head): Likewise.
91 * dump.c (cp_dump_tree): Likewise.
92 * except.c (init_exception_processing): Adjust.
93 * init.c (build_member_call): Remove fake_std_node check.
94 (build_offset_ref): Likewise.
95 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
96 * rtti.c (init_rtti_processing): Adjust.
98 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
100 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
101 operand while calling cp_tree_equal.
103 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
105 The 3.0 ABI no longer has vbase pointer fields.
106 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
107 FORMAT_VBASE_NAME): Remove.
108 * method.c (do_build_copy_constructor): Adjust.
109 (do_build_assign_ref): Adjust.
110 * search.c (lookup_field_r): Adjust.
111 * typeck.c (build_component_ref): Adjust.
113 The 3.0 ABI always has a vtable pointer at the start of every
115 * rtti.c (build_headof_sub): Remove.
116 (build_headof): Adjust.
117 (get_tinfo_decl_dynamic): No need to check flag_rtti
119 (create_real_tinfo_var): Explain why we need a hidden name.
121 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
124 * class.c (update_vtable_entry_for_fn): The fixed adjustment
125 of a virtual thunk should be from declaring base.
127 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
129 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
130 the shared virtual base, so preserving inheritance graph order.
132 2001-07-30 Andreas Jaeger <aj@suse.de>
134 * decl2.c: Remove unused var global_temp_name_counter.
136 2001-07-28 Richard Henderson <rth@redhat.com>
138 * method.c (pending_inlines): Remove.
140 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
142 * class.c (mark_primary_virtual_base): Don't adjust base
144 (dfs_unshared_virtual_bases): Adjust them here.
145 (mark_primary_bases): Explain why we adjust at the end.
147 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
149 * class.c (finish_struct_1): When copying the primary base's
150 VFIELD, make sure we find it is at offset zero.
152 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
154 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
155 tsubst_expr for default template arguments.
157 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
160 * spew.c (yylex): Only copy the token's lineno, if it is
163 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
166 * call.c (resolve_args): Simplify, call
167 convert_from_reference.
168 (build_new_op): Resolve and convert from reference ARG1
169 earlier. Adjust ARG2 & ARG3 resolve and conversion.
171 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
173 * decl.c (last_function_parm_tags): Remove.
174 (current_function_parm_tags): Remove.
175 (init_decl_processing): Adjust.
176 (start_function): Adjust.
177 (store_parm_decls): Adjust.
180 * decl.c (grokdeclarator): Detect when a function typedef is
181 declaring a function, and create last_function_parms correctly.
183 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
185 * call.c (joust): Only prefer a non-builtin candidate to a builtin
186 one if they have the same signature.
188 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
189 it rather than toplevel_bindings_p. Give it a mangled name if static.
190 (convert_to_reference): Adjust.
191 * decl2.c (get_temp_name): Lose.
192 * mangle.c (mangle_ref_init_variable): New fn.
193 (mangle_guard_variable): Strip the ref-init header.
195 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
197 (grok_reference_init): Always use DECL_INITIAL.
199 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
202 * call.c (build_conditional_expr): Recheck args after
204 * cp-tree.h (build_conditional_expr): Move to correct file.
205 * typeck.c (decay_conversion): Diagnose any unknown types
207 (build_binary_op): Don't do initial decay or default
208 conversions on overloaded functions.
209 (build_static_cast): Don't do a decay conversion here.
211 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
214 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
215 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
217 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
219 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
220 (create_vtbl_ptr): ... here.
222 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
224 * class.c (build_vbase_offset_vbtl_entries): Look for
225 non-primary base of which we are a sub vtable.
227 2001-07-24 Phil Edwards <pme@sources.redhat.com>
229 * semantics.c (finish_this_expr): Remove unused code.
231 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
233 Simplify rtti, now we've only one ABI.
234 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
236 (tinfo_decl_id, tinfo_var_id): Remove.
237 (get_typeid_1): Remove.
239 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
240 (typeid_ok_p): New function.
241 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
242 (get_tinfo_decl): Remove old abi documentation.
243 (tinfo_from_decl): Remove.
244 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
245 (get_typeid_1): Remove.
246 (get_base_offset): Remove.
247 (synthesize_tinfo_var): Absorb get_base_offset.
248 (create_real_tinfo_var): Don't use tinfo_decl_id.
250 2001-07-23 Graham Stott <grahams@redhat.com>
252 * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
253 variable has_two_argument_delete_p.
255 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
257 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
258 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
259 (CPTI_INDEX_IDENTIFIER): Remove.
260 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
261 (delta2_identifier): Remove.
262 (index_identifier): Remove.
263 (pfn_or_delta2_identifier): Remove.
264 (flag_vtable_thunks): Remove.
265 (VTABLE_DELTA2_NAME): Remove.
266 (VTABLE_INDEX_NAME): Remove.
267 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
268 (vfunc_ptr_type_node): Adjust.
269 (VTABLE_NAME_PREFIX): Adjust.
270 (build_vfn_ref): Lose first parameter.
271 (fixup_all_virtual_upcast_offsets): Remove.
272 * decl.c (initialize_predefined_identifiers): Remove
273 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
274 (init_decl_processing): Remove no-vtable-thunk code.
275 * decl2.c (flag_vtable_thunks): Remove.
276 (mark_vtable_entries): Remove no-vtable-thunk code.
277 * error.c (dump_decl): Remove no-vtable-thunk code.
278 (dump_expr): Adjust ptr to member function code.
279 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
281 * rtti.c (build_headof): Remove no-vtable-thunk code.
282 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
283 * search.c (get_base_distance): Remove expand_upcast_fixups case.
284 (virtual_context) Remove.
285 (expand_upcast_fixups): Remove.
286 (fixup_virtual_upcast_offsets): Remove.
287 (fixup_all_virtual_upcast_offsets): Remove.
288 * typeck.c (get_member_function_from_ptrfunc): Remove
289 no-vtable-thunk code.
290 * call.c (build_over_call): Adjust call to build_vfn_ref.
291 * class.c (build_vfn_ref): Lose first parameter. Remove
292 no-vtable-thunk code.
293 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
294 (build_vtable_entry): Remove no-vtable-thunk code.
296 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
298 Remove old-abi remnants. Remove comments about old abi
299 behaviour. Remove refences to 'new-abi' in comments.
300 * cp-tree.h: Adjust comments.
301 (vbase_offsets_in_vtable_p): Delete.
302 (vcall_offsets_in_vtable_p): Delete.
303 (vptrs_present_everywhere_p): Delete.
304 (all_overridden_vfuns_in_vtables_p): Delete.
305 (merge_primary_and_secondary_vtables_p): Delete.
306 (TYPE_CONTAINS_VPTR_P): Adjust.
307 (VTT_NAME_PREFIX): Remove.
308 (CTOR_VTBL_NAME_PREFIX): Remove.
309 (init_vbase_pointers): Remove.
310 * class.c: Adjust coments.
311 (build_vbase_pointer_fields): Delete.
312 (build_vbase_pointer): Remove old-abi code.
313 (build_secondary_vtable): Likewise.
314 (modify_all_vtables): Likewise.
315 (create_vtable_ptr): Likewise.
316 (layout_class_type): Likewise.
317 (finish_struct_1): Likewise.
318 (finish_vtbls): Likewise.
319 (dfs_finish_vtbls): Delete.
320 (build_vbase_offset_vtbl_entries): Remove old-abi code.
321 * cvt.c: Adjust comments.
322 * decl.c: Adjust comments.
323 * decl2.c: Adjust comments.
324 * init.c: Adjust comments.
325 (construct_virtual_bases): Remove old-abi code.
326 * lang-specs.h: Remove -fno-new-abi.
327 * mangle.c: Adjust comments.
328 * rtti.c: Adjust comments.
329 (get_base_offset): Remove old-abi-code.
330 * search.c: Adjust comments.
331 (dfs_init_vbase_pointers): Remove.
332 (dfs_vtable_path_unmark): Remove.
333 (init_vbase_pointers): Remove.
334 * semantics.c: Adjust comments.
335 (emit_associated_thunks): Remove old-abi code.
336 * typeck.c: Adjust comments.
338 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
340 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
343 2001-07-19 Mark Mitchell <mark@codesourcery.com>
345 * class.c (finish_struct_anon): Forbid nested classes.
347 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
349 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
350 * optimize.c: Include debug.h.
351 (maybe_clone_body): Use debug hook.
352 * semantics.c: Include debug.h.
353 (expand_body): Use debug hook.
355 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
357 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
359 2001-07-18 Mark Mitchell <mark@codesourcery.com>
361 * class.c (type_requires_array_cookie): New function.
362 (check_methods): Don't try to figure out whether the type needs a
364 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
365 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
366 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
367 * pt.c (instantiate_class_template): Don't set
368 TYPE_VEC_DELETE_TAKES_SIZE.
369 * NEWS: Document ABI changes from GCC 3.0.
371 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
372 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
374 * NEWS (Changes in GCC 3.0): Fix typo.
376 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
378 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
379 which attributes are to be attached, and a flags argument. Update
380 call to decl_attributes.
381 (grokfield): Update call to decl_attributes.
382 * class.c (finish_struct): Update call to cplus_decl_attributes.
383 * cp-tree.h (cplus_decl_attributes): Update prototype.
384 * decl.c (start_decl, grokdeclarator, start_function): Update
385 calls to decl_attributes and cplus_decl_attributes.
386 * friend.c (do_friend): Update call to cplus_decl_attributes.
387 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
389 2001-07-12 Mark Mitchell <mark@codesourcery.com>
391 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
392 for `register' variables with an asm-specification.
394 2001-07-11 Mark Mitchell <mark@codesourcery.com>
396 * semantics.c (finish_asm_stmt): Mark the output operands
397 to an asm addressable, if necessary.
399 2001-07-11 Ben Elliston <bje@redhat.com>
401 * Revert this change -- there is a subtle bug.
404 * decl.c (finish_enum): New "attributes" argument; pass it to
405 cplus_decl_attributes. Use a narrower type if the enum is packed.
406 * cp-tree.h (finish_enum): Adjust prototype.
407 * parse.y (enum_head): New non-terminal.
408 (structsp): Use it. Enums now may be preceded or followed by
409 optional attributes -- pass their chained tree to finish_enum().
410 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
412 2001-07-10 Mark Mitchell <mark@codesourcery.com>
414 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
417 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
419 * semantics.c (cp_expand_stmt): Fix for null
420 current_function_return_value.
422 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
424 * call.c (build_op_delete_call): Initialize fn.
425 (convert_like_real): Delete conditional.
426 (joust): Initialize *w and *l.
427 * class.c: Add prototype for binfo_ctor_vtable.
428 (get_primary_binfo): Initialize result.
429 * init.c (build_java_class_ref): Initialize name.
431 2001-07-09 Erik Rozendaal <dlr@acm.org>
433 * typeck.c (unary_complex_lvalue): Do not duplicate the
434 argument to modify, pre-, or post-increment when used as an
435 lvalue and when the argument has side-effects.
437 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
439 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
440 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
441 cplus_decl_attributes even if attrs is NULL.
442 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
444 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
446 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
447 calls to decl_attributes.
449 2001-07-06 Ira Ruben <ira@apple.com>
451 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
452 be DECL_TEMPLATE_RESULT.
454 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
456 * cp-tree.h (copy_template_template_parm): Rename to ...
457 (bind_template_template_parm): ... here.
458 * tree.c (copy_template_template_parm): Rename to ...
459 (bind_template_template_parm): ... here. Remove the case when
460 NEWARGS is NULL_TREE.
461 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
462 BOUND_TEMPLATE_TEMPLATE_PARM.
463 * pt.c (lookup_template_class): Adjust.
465 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
467 * cvt.c (convert_lvalue): New fn.
468 * cp-tree.h: Declare it.
469 * method.c (do_build_assign_ref): Use it.
470 (do_build_copy_constructor): Convert parm to base types
471 before calling base constructors.
473 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
474 DECL_USER_ALIGN. Check flag_elide_constructors instead of
476 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
478 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
480 * optimize.c (optimize_inline_calls): New function, broken out
482 (optimize_function): ... here. Call it. Don't inline if it is
484 (dump_function): Print name of dump flag causing this dump.
485 * semantics.c (expand_body): Move thunk inline check to
488 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
490 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
491 (comptypes): Use target.comp_type_attributes.
493 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
495 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
497 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
499 * error.c (lang_print_error_function): Add a `diagnostic_context *'
502 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
504 * decl2.c (import_export_class): Update.
506 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
508 * error.c (init_error): Adjust settings.
510 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
512 * error.c (init_error): Adjust settings.
514 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
516 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
517 return pointers to data members by reference rather than by value.
519 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
521 Implement the Named Return Value optimization.
522 * cp-tree.h (struct cp_language_function): Add x_return_value.
523 (current_function_return_value): Now a macro.
524 * decl.c: Don't define it.
525 (define_label, finish_case_label): Don't clear it.
526 (init_decl_processing): Don't register it with GC.
527 * semantics.c (genrtl_finish_function): Don't check it for
528 no_return_label. Copy the RTL from the return value to
529 current_function_return_value and walk, calling...
530 (nullify_returns_r): ...this new fn.
531 * typeck.c (check_return_expr): Set current_function_return_value.
533 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
535 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
536 sharing a ctor vtable with. Merge code for cases 1 and 2.
537 (binfo_ctor_vtable): New fn.
538 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
540 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
542 * class.c (dfs_find_final_overrider): Fix logic.
544 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
545 virtual thunk instead of non-virtual.
546 (get_matching_virtual): Uncomment.
548 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
549 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
552 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
554 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
555 we've not emerged from the hierarchy of RTTI_BINFO on reaching
558 2001-06-13 Mark Mitchell <mark@codesourcery.com>
560 * NEWS: Update release number.
562 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
564 PR c++/3130, c++/3131, c++/3132
565 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
566 * class.c (force_canonical_binfo_r): Move
567 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
568 virtual bases unless they're primary and what they're primary
570 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
571 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
572 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
574 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
575 (layout_nonempty_base_or_field): Add most derived type
577 (layout_empty_base): Likewise.
578 (build_base_field): Likewise.
579 (build_base_fields): Likewise.
580 (propagate_binfo_offsets): Add most derived type
581 parameter. Skip non canonical virtual bases too.
582 (dfs_set_offset_for_unshared_vbases): Don't skip primary
583 bases. Do skip canonical bases.
584 (layout_virtual_bases): Adjust.
585 (layout_class_type): Adjust.
586 (dfs_get_primary_binfo): Build list of virtual primary base
588 (get_primary_binfo): Check that the shared virtual primary
589 base candidate was found first.
590 (accumulate_vtbl_inits): Don't do anything for non-vptr
591 containing binfos. For case 1 primary virtual bases, keep
592 checking that we've not emerged from the hierarchy of RTTI_BINFO.
594 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
597 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
598 hierarchy looking for primary bases for a ctor
599 vtable. Recursively call oneself, if we meet our primary via
600 this route and haven't met it yet via inheritance graph order.
602 2001-06-11 Mark Mitchell <mark@codesourcery.com>
604 * lang-options.h: Emit documentation for -fno-honor-std, not
607 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
609 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
611 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
613 2001-06-10 Mark Mitchell <mark@codesourcery.com>
614 Gabriel Dos Reis <gdr@codesourcery.com>
616 * Make-lang.in (cp/call.o): Depend on diagnostic.h
617 (cp/typeck.o): Depend on diagnostic.h
618 (cp/typeck2.o): Depend on diagnostic.h
619 (cp/repo.o): Depend on dignostic.h
620 * typeck.c: #include diagnostic.h
621 (convert_for_initialization): Remove extern declaration for
622 warningcount and errorcount.
624 * call.c: #include diagnostic.h
625 (convert_like_real): Remove extern declaration for warnincount and
628 * repo.c: #include diagnostic.h
629 * typeck2.c: #include diagnostic.h
631 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
633 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
636 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
639 * friend.c (do_friend): Use push_decl_namespace for classes at
642 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
643 Jason Merrill <jason_merrill@redhat.com>
646 * class.c (build_secondary_vtable): Use assert, rather than an error
648 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
649 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
650 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
651 Don't set BINFO_VTABLE for a primary virtual base.
653 2001-06-07 Mark Mitchell <mark@codesourcery.com>
655 * decl.c (duplicate_decls): Update source position information
656 when a template function is defined.
658 2001-06-07 Phil Edwards <pme@sources.redhat.com>
660 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
662 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
665 * decl.c (pushtag): Don't push into a complete type's scope.
667 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
669 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
670 (struct lang_decl_flags): Lose generate_with_vtable_p.
671 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
672 * class.c (copy_virtuals): Adjust.
673 * decl2.c (mark_vtable_entries): Adjust.
674 * method.c (make_thunk, build_vtable_entry): Adjust.
675 * class.c (update_vtable_entry_for_fn): Only look as far as the
676 first defining class.
677 (build_vtbl_initializer): Put nothing in the slot for a function only
678 defined in a lost primary virtual base.
679 (add_vcall_offset_vtbl_entries_1): Use the same code for
680 the lost primary case and the normal case.
681 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
682 (get_vfield_offset, get_derived_offset): Lose.
683 (dfs_find_final_overrider): Use look_for_overrides_here.
684 (get_matching_virtual): New fn.
685 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
687 * search.c (look_for_overrides_here): Split out from...
688 (look_for_overrides_r): Here.
690 * class.c (find_final_overrider): Return error_mark_node on error.
692 * decl2.c (key_method): #if 0 accidental change.
694 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
696 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
697 (build_over_call): Likewise.
698 * decl.c (grokparms): Likewise.
699 * pt.c (tsubst_decl): Likewise.
700 * typeck.c (convert_arguments): Likewise.
702 2001-06-05 Mark Mitchell <mark@codesourcery.com>
704 * semantics.c (begin_class_definition): Robustify.
706 * pt.c (instantiate_decl): Tell the repository code about the
707 clones, not the cloned functions.
708 * repo.c (repo_template_used): Explicitly instantiate the cloned
709 function, not the clones.
711 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
713 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
714 ICS_BAD_FLAG on created conversion.
715 (compare_ics): Break out rank.
717 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
719 * decl.c (xref_tag): Remove extraneous %s on dependent name
722 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
724 * class.c (layout_vtable_decl): Fix off by one error on
726 (build_vtt): Likewise.
727 (build_ctor_vtbl_group): Likewise.
729 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
731 * class.c (maybe_indent_hierarchy): New function.
732 (dump_class_hierarchy_r): Add flags. Dump extra binfo
733 information, if enabled. Use maybe_indent_hierarchy. Adjust
735 (dump_class_hierarchy): Adjust prototype. Adjust output format.
736 (dump_array, dump_vtable, dump_vtt): New functions.
737 (finish_struct_1): Adjust hierarchy dumping.
738 (initialize_vtable): Call dump_vtable.
739 (build_vtt): Call dump_vtt.
740 (build_ctor_vtbl_group): Call dump_vtable.
741 * decl2.c (flag_dump_class_layout): Remove.
742 (cxx_decode_option): Remove dump translation unit
743 and dump class hierarchy check. Call dump_switch_p.
744 (finish_file): Adjust dumping.
745 (dump.c): Only dump base classes if not TDF_SLIM.
746 Only dump namespace members if not TDF_SLIM.
747 * optimize.c (dump_function): New function.
748 (optimize_function): Call dump_function.
749 * semantics.c (expand_body): Use dump_enabled_p.
751 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
754 Part missed from first commit
755 * decl2.c (finish_anon_union): Copy context.
757 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
760 * optimize.c (remap_decl): Remap anonymous aggregate members too.
762 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
765 * semantics.c (expand_body): Don't optimize thunks.
767 2001-05-25 Sam TH <sam@uchicago.edu>
769 * cp-tree.h lex.h: Fix header include guards.
771 2001-05-25 Mark Mitchell <mark@codesourcery.com>
773 * decl.c (init_decl_processing): Tweak.
775 2001-05-24 Mark Mitchell <mark@codesourcery.com>
777 * decl.c (duplicate_decls): Tidy.
778 (init_decl_processing): Always set flag_no_builtin.
780 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
783 * decl2.c (do_local_using_decl): Push the decls, even in a
786 2001-05-22 Mark Mitchell <mark@codesourcery.com>
788 * optimize.c (initialize_inlined_parameters): Don't set
789 TREE_READONLY for a VAR_DECL taking the place of an inlined
792 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
794 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
795 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
798 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
800 * parse.y: Refer to compound literals as such, not as
801 constructor-expressions.
803 2001-05-21 Mark Mitchell <mark@codesourcery.com>
805 * call.c (build_op_delete_call): Ignore exception-specifications
806 when looking for matching delete operators.
807 * init.c (build_new_1): Compute whether or not the allocation
808 function used is a placement allocation function or not, and
809 communicate this information to build_op_delete_call.
811 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
813 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
814 (build_vtbl_ref): Adjust.
815 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
816 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
818 (unsupported_options): Correspondingly.
820 * decl2.c (maybe_make_one_only): Check flag_weak, not
823 * cp-tree.def (START_CATCH_STMT): Lose.
824 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
825 * tree.c (cp_statement_code_p): Don't case it.
826 * semantics.c (cp_expand_stmt): Likewise.
827 * cp-tree.h (START_CATCH_TYPE): Lose.
829 * except.c (expand_start_catch_block): Don't start any blocks.
831 (expand_end_catch_block): Don't end any blocks.
832 * parse.y (handler): Don't pass anything from finish_handler_parms
834 * pt.c (tsubst_expr): Likewise.
835 * semantics.c (begin_handler): Call note_level_for_catch here.
836 (finish_handler_parms): Don't return anything.
837 (genrtl_catch_block, begin_catch_block): Lose.
838 (genrtl_handler): Call expand_start_catch here.
840 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
842 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
843 (get_vtable_decl, build_vtt): Not here.
845 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
848 * optimize.c (update_cloned_parm): Copy addressability and other
851 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
853 * pt.c (determine_specialization): Ignore artificial functions.
855 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
857 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
858 (C_RID_CODE): Remove.
859 * lex.c (cxx_init_options): Call set_identifier_size. Update.
860 (init_parse): Don't do it here.
862 2001-05-18 Diego Novillo <dnovillo@redhat.com>
864 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
865 function declaration to avoid stripping the symbol's attributes.
867 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
869 * decl.c (pushdecl): Adjust error string.
870 (xref_tag): Adjust friend class injection warning. Remove the
871 inherited name from the class shadowed scope.
873 2001-05-17 Mark Mitchell <mark@codesourcery.com>
875 * except.c (cp_protect_cleanup_actions): New function.
876 (init_exception_processing): Don't set protect_cleanup_actions
877 here. Do set lang_protect_cleanup_actions.
879 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
881 * spew.c (read_token): Call yyerror on all unexpected tokens.
883 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
885 * init.c (member_init_ok_or_else): Take a tree rather than
887 (expand_member_init): Adjust.
889 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
891 * decl.c (duplicate_decls): Suppress warning about duplicate
892 decls if the first decl is a friend.
894 2001-05-12 Zack Weinberg <zackw@stanford.edu>
896 * except.c (choose_personality_routine): Export. Add
897 explanatory comment. Take an enum languages, not a boolean.
898 (initialize_handler_parm): Adjust to match.
899 * cp-tree.h: Prototype choose_personality_routine.
900 * lex.c (handle_pragma_java_exceptions): New function.
901 (init_cp_pragma): Register #pragma GCC java_exceptions.
903 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
905 * method.c (build_mangled_C99_name): Remove unused prototype.
907 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
909 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
910 * typeck.c (get_member_function_from_ptrfunc,
911 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
912 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
914 Reverted Geoff Keating's 2001-05-03's patch.
916 2001-05-11 Ira Ruben <ira@apple.com>
918 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
920 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
922 * cp-tree.h (finish_label_expr, lookup_label): Delete.
923 * parse.y: Update for '&&'; don't issue warning here.
924 * semantics.c (finish_label_expr): Delete.
926 2001-05-07 Mark Mitchell <mark@codesourcery.com>
928 * splay-tree.h (splay_tree_max): New function.
929 (splay_tree_min): Likewise.
931 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
933 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
934 (pfn_vflag_identifier): Define.
935 Update comment about layout of pointer functions.
936 (build_ptrmemfunc1): Update prototype.
937 (expand_ptrmemfunc_cst): Update prototype.
938 * decl.c (initialize_predefined_identifiers): Initialize
939 pfn_vflag_identifier.
940 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
941 an extra field to the type.
942 * expr.c (cplus_expand_constant): Pass 'flag' between
943 expand_ptrmemfunc_cst and build_ptrmemfunc1.
944 * typeck.c (get_member_function_from_ptrfunc): When
945 FUNCTION_BOUNDARY < 16, look at additional field to determine
946 if a pointer-to-member is a real pointer or a vtable offset.
947 (build_ptrmemfunc1): Add new parameter to contain extra field.
948 (build_ptrmemfunc): Pass the extra field around.
949 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
950 (pfn_from_ptrmemfunc): Ignore the extra field.
952 2001-05-03 Mark Mitchell <mark@codesourcery.com>
954 * cp-tree.h (flag_inline_trees): Update documentation.
955 * decl.c (init_decl_processing): Adjust handling of
956 flag_inline_functions and flag_inline_trees to support -O3.
957 (grokfndecl): Set DECL_INLINE on all functions if that's what
959 (save_function_data): Clear DECL_INLINE in
960 current_function_cannot_inline is non-NULL.
961 * decl2.c (flag_inline_trees): Update documentation.
963 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
965 * dump.c (cp_dump_tree, USING_STMT case): New case.
966 * tree.c (cp_statement_code_p): Add USING_STMT.
967 * decl2.c (do_using_directive): Add the using directive statement.
969 * tree.c (walk_tree): Reformat an if block.
971 2001-05-02 Mark Mitchell <mark@codesourcery.com>
973 * decl.c (compute_array_index_type): Don't try to do anything with
974 the indices when processing a template.
976 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
978 * call.c: NULL_PTR -> NULL.
983 * except.c: Likewise.
986 * search.c: Likewise.
988 * typeck.c: Likewise.
989 * typeck2.c: Likewise.
991 2001-05-02 Mark Mitchell <mark@codesourcery.com>
993 * decl2.c (do_using_directive): Revert previous patch.
995 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
997 * cp-tree.def (USING_STMT): New statement node.
998 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
999 * decl2.c (do_using_directive): Add USING_STMT to statement
1000 tree. Don't emit errors when processing template decl.
1001 * pt.c (tsubst_expr, USING_STMT case): New case.
1002 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
1004 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
1006 * call.c (build_new_op): Convert args from reference here.
1007 (build_conditional_expr): Don't convert here.
1009 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
1011 * spew.c (last_token_id): New static variable.
1012 (read_token): Set it here.
1013 (yyerror): Use it here.
1015 2001-04-30 Richard Henderson <rth@redhat.com>
1017 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
1020 2001-04-30 Mark Mitchell <mark@codesourcery.com>
1022 * gxxint.texi: Remove.
1023 * Make-lang.in: Remove all traces of gxxint.texi.
1025 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
1027 * decl2.c (start_static_initialization_or_destruction): Correct
1028 logic to handle the -fno-use-cxa-atexit case.
1030 2001-04-30 Mark Mitchell <mark@codesourcery.com>
1032 * optimize.c (update_cloned_parm): New function.
1033 (maybe_clone_body): Use it. Update the `this' parameter too.
1035 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
1037 * decl2.c (unsupported_options): Add new-abi.
1038 * lang-options.h: Remove no longer supported options.
1040 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
1042 * except.c (can_convert_eh): Don't check template parms,
1045 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
1047 * optimize.c (maybe_clone_body): Copy parameter names and locations.
1049 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
1051 * cp-tree.h (adjust_clone_args): Prototype new function.
1052 * class.c (adjust_clone_args): New function.
1053 * decl.c (start_function): Call it for in charge ctors.
1055 2001-04-26 Mark Mitchell <mark@codesourcery.com>
1057 * method.c (use_thunk): Make sure that thunks really are emitted
1060 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
1062 * mangle.c (write_chars): New macro.
1063 (hwint_to_ascii): New function
1064 (write_number): Use it.
1065 (write_integer_cst): Deal with really big numbers.
1067 2001-04-25 Mark Mitchell <mark@codesourcery.com>
1069 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
1072 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
1074 * decl.c (grokdeclarator): Set context of namespace scope
1077 2001-04-24 Zack Weinberg <zackw@stanford.edu>
1079 * cp/optimize.c: Include hashtab.h.
1080 (struct inline_data): Add tree_pruner.
1081 (expand_call_inline, expand_calls_inline): Use it when calling
1083 (optimize_function): Initialize and free tree_pruner.
1085 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
1087 Lazy __FUNCTION__ generation.
1088 * cp-tree.def (FUNCTION_NAME): Remove.
1089 * cp-tree.h (function_name_declared_p): Remove.
1090 (cp_fname_init): Prototype.
1091 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
1092 don't call declare_function_name. Call start_fname_decls.
1093 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
1094 clobber the line number.
1095 (cp_fname_init): New function.
1096 (start_function): Call start_fname_decls.
1097 (finish_function): Call finish_fname_decls.
1098 * lex.c (reswords): Add slots for __FUNCTION__ et al.
1099 (rid_to_yy): Add mappings for __FUNCTION__ et al.
1100 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
1101 * parse.y (VAR_FUNC_NAME): New token.
1102 (primary): Add VAR_FUNC_NAME.
1103 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
1105 (tsubst, FUNCTION_NAME case): Remove.
1106 (tsubst_copy, FUNCTION_NAME case): Remove.
1107 (tsubst_expr, DECL_STMT case): Be careful with a
1108 DECL_PRETTY_FUNCTION_P.
1109 (instantiate_decl): Remove function_name_declared_p.
1110 * semantics.c (begin_compound_statement): Don't call
1111 declare_function_name here.
1112 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
1113 (finish_translation_unit): Call finish_fname_decls.
1114 (expand_body): Remove function_name_declared_p.
1115 * typeck2.c (digest_init): Allow any ERROR_MARK.
1117 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
1119 * pt.c (tsubst_decl): Use VOID_TYPE_P.
1120 * semantics.c: Fix some typos.
1122 2001-04-23 Phil Edwards <pme@sources.redhat.com>
1124 * cp/decl2.c (flag_honor_std): Always initialize to 1.
1126 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1128 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
1130 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
1132 * except.c (build_throw): Wrap the initialization of the exception
1133 object in a MUST_NOT_THROW_EXPR.
1134 (do_free_exception): #if 0.
1136 2001-04-20 Mark Mitchell <mark@codesourcery.com>
1138 * cp-tree.h (finish_enum): Change prototype.
1139 * decl.c (finish_enum): Reorganize.
1140 * parse.y (structsp): Adjust calls to finish_enum.
1142 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
1144 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
1147 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
1149 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
1150 (layout_empty_base): Return at end flag.
1151 (build_base_field): Likewise.
1152 (build_base_fields): Likewise.
1153 (layout_virtual_bases): Don't add 1 to eoc value.
1154 (end_of_class): Use full size for empty bases.
1155 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
1156 empty bases. Don't add 1 to eoc value. Only add trailing padding
1157 if we're an empty class with no empty bases.
1158 (dump_class_hierarchy): Dump size and alignment.
1160 2001-04-20 Jakub Jelinek <jakub@redhat.com>
1162 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
1165 2001-04-20 Jakub Jelinek <jakub@redhat.com>
1167 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
1168 is found, look first if name does not match the structure name.
1170 2001-04-19 Mark Mitchell <mark@codesourcery.com>
1172 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
1174 (SET_DECL_LANGUAGE): New macro.
1175 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
1176 (pushdecl): Likewise.
1177 (build_library_fn_1): Likewise.
1178 (build_cp_library_fn): Likewise.
1179 (grokfndecl): Likewise.
1180 (grokvardecl): Mark `extern "C"' variables as having C linkage.
1181 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
1182 * lex.c (retrofit_lang_decl): Likewise.
1183 * mangle.c (mangle_decl_string): Don't mangle the names of
1184 variables declared with C language linkage.
1185 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
1187 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
1189 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
1190 flag_access_control from uninitialized storage.
1192 2001-04-15 Mark Mitchell <mark@codesourcery.com>
1194 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
1195 * mangle.c (write_pointer_to_member_type): Fix mangling of
1196 pointers to cv-qualified member function types.
1198 * init.c (build_delete): Create a SAVE_EXPR for the address if
1199 we're going to use it more than once.
1201 2001-04-13 Mark Mitchell <mark@codesourcery.com>
1203 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
1204 (expand_ptremfunc_cst): Change prototype.
1205 (delta2_from_ptrmemfunc): Remove.
1206 * expr.c (cplus_expand_constant): Adjust call to
1207 expand_ptrmemfunc_cst.
1208 * typeck.c (build_ptrmemfunc1): Simplify.
1209 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
1210 results in a constant.
1211 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
1212 (delta2_from_ptrmemfunc): Remove.
1213 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
1215 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
1217 * cp-tree.h (decl_namespace_list): New macro.
1218 (struct saved_scope): Add decl_ns_list.
1219 * decl.c (mark_saved_scope): Mark it.
1220 * decl2.c: Lose static decl_namespace_list.
1221 (init_decl2): Don't save it.
1223 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1225 * cp-tree.h (warn_return_type, yylex): Delete redundant
1228 * decl.c (current_class_depth, global_namespace): Likewise.
1230 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
1232 * repo.c (flag_use_repository): Likewise.
1234 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1236 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
1237 set_block, pushdecl, getdecls, gettags, init_decl_processing,
1238 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
1239 lvalue_or_else, print_lang_statistics, comp_target_types,
1240 unsigned_type, signed_type, signed_or_unsigned_type,
1241 build_function_call, mark_addressable, incomplete_type_error):
1242 Delete redundant declarations.
1244 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
1246 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
1247 (TYPE_ANONYMOUS_P): New macro.
1248 (TAGGED_TYPE_P): New macro.
1249 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
1250 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
1251 * tree.c (no_linkage_helper): Likewise.
1252 * semantics.c (begin_class_definition): Likewise.
1253 * pt.c (convert_template_argument): Likewise.
1254 * lex.c (check_for_missing_semicolon): Likewise.
1256 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
1258 * class.c (dfs_unshared_virtual_bases): New function.
1259 (mark_primary_bases): Call it.
1260 (check_bases): Ignore virtual bases when determining
1263 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
1265 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
1267 2001-04-11 Mark Mitchell <mark@codesourcery.com>
1269 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
1270 cloned function to the clone.
1272 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1274 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
1276 * semantics.c: Include expr.h.
1278 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
1280 * method.c (implicitly_declare_fn): Commonize code for copy ctor
1281 and assignment op. Set TREE_USED for parameter.
1283 2001-04-10 Mark Mitchell <mark@codesourcery.com>
1285 * class.c (find_final_overrider_data): Add `candidates'.
1286 (dfs_find_final_overrider): Don't issue error messages
1288 (find_final_overrider): Issue error messages here.
1289 (build_base_field): Don't warn about amgibuous direct bases here.
1290 (warn_about_ambiguous_direct_bases): New function.
1291 (layout_class_type): Use it.
1293 2001-04-10 Richard Henderson <rth@redhat.com>
1295 * typeck.c (build_array_ref): Push the array reference inside
1296 COMPOUND_EXPR and COND_EXPR.
1298 2001-04-05 Mark Mitchell <mark@codesourcery.com>
1300 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
1301 * decl.c (duplicate_decls): Adjust accordingly.
1302 (maybe_commonize_var): Likewise.
1303 (grokfndecl): Likewise.
1304 (start_function): Likewise.
1305 (start_method): Likewise.
1306 * decl2.c (key_method): Likewise.
1307 (import_export_decl): Likewise.
1308 * method.c (implicitly_declare_fn): Likewise.
1309 * optimize.c (maybe_clone_body): Likewise.
1311 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
1313 * lang-specs.h: Add __DEPRECATED.
1315 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
1317 * search.c (get_dynamic_cast_base_type): When building a new
1318 constant, set its type to ssizetype.
1320 2001-04-04 Jakub Jelinek <jakub@redhat.com>
1322 * optimize.c (expand_call_inline): Only add newly inlined statements
1325 2001-04-03 Mark Mitchell <mark@codesourcery.com>
1327 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
1328 (OPERATOR_FORMAT): Likewise.
1329 (OPERATOR_TYPENAME_FORMAT): Likewise.
1330 * operators.def: Remove old name-mangling information.
1331 * decl.c (grok_op_properties): Adjust accordingly.
1332 * lex.c (init_operators): Likewise.
1333 * rtti.c (get_tinfo_decl): Issue error messages about types that
1336 2001-04-03 Mark Mitchell <mark@codesourcery.com>
1338 * decl2.c (import_export_decl): Don't call import_export_class
1339 when processing an inline member function.
1340 * semantics.c (expand_body): Call import_export_decl before
1341 emitting inline functions.
1343 2001-03-28 Richard Henderson <rth@redhat.com>
1345 IA-64 ABI Exception Handling:
1346 * cp-tree.def (EH_SPEC_BLOCK): New.
1347 (MUST_NOT_THROW_EXPR): New.
1348 * cp-tree.h: Update changed function declarations.
1349 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
1350 (CPTI_CALL_UNEXPECTED): New.
1351 (struct cp_language_function): Rename x_eh_spec_try_block
1353 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
1354 * decl.c (current_binding_level): If no current function
1355 bindings, revert to scope_chain.
1356 (initialize_predefined_identifiers): Remove __cp_push_exception.
1357 (store_parm_decls): Use begin_eh_spec_block.
1358 (finish_function): Use finish_eh_spec_block.
1359 (mark_lang_function): Update for name changes.
1360 * decl2.c (finish_file): No mark_all_runtime_matches.
1361 * dump.c (cp_dump_tree): Handle new tree codes.
1362 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
1363 * except.c (catch_language_init, catch_language): Remove.
1364 (init_exception_processing): Don't set language code.
1365 Initialize call_unexpected_node, protect_cleanup_actions,
1366 eh_personality_libfunc, lang_eh_runtime_type.
1367 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
1368 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
1369 (prepare_eh_type): Split out type canonicalizations ...
1370 (build_eh_type_type): ... from here.
1371 (build_eh_type_type_ref): Remove.
1372 (mark_all_runtime_matches): Remove.
1373 (build_exc_ptr): New.
1374 (do_begin_catch, do_end_catch): New.
1375 (do_pop_exception): Remove.
1376 (build_terminate_handler): Remove.
1377 (choose_personality_routine): Split out language choice from ...
1378 (initialize_handler_parm): ... here.
1379 Use MUST_NOT_THROW_EXPR.
1380 (expand_start_catch_block): Use do_begin_catch. Simplify Java
1381 exception object handling.
1382 (expand_start_eh_spec, expand_end_eh_spec): Remove.
1383 (expand_exception_blocks, alloc_eh_object): Remove.
1384 (begin_eh_spec_block, finish_eh_spec_block): New.
1385 (do_allocate_exception, do_free_exception): New.
1386 (expand_throw): Merge into ...
1387 (build_throw): ... here. Update for abi.
1388 * expr.c (cplus_expand_expr): No expand_internal_throw.
1389 Handle MUST_NOT_THROW_EXPR.
1390 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
1391 * semantics.c (*) Update for except.h name changes.
1392 (genrtl_try_block): No protect_with_terminate.
1393 (genrtl_eh_spec_block): New.
1394 (genrtl_handler): Don't emit the goto here.
1395 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
1396 (genrtl_finish_function): Don't expand_exception_blocks.
1397 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
1399 2001-03-28 Richard Henderson <rth@redhat.com>
1401 * decl.c (struct named_label_list): Rename eh_region to
1402 in_try_scope, add in_catch_scope.
1403 (struct binding_level): Rename eh_region to is_try_scope,
1405 (note_level_for_try): Rename from note_level_for_eh.
1406 (note_level_for_catch): New.
1407 (poplevel): Copy both is_try_scope and is_catch_scope to
1408 the named_label_list struct.
1409 (check_previous_goto_1): Don't check for catch block via
1410 DECL_ARTIFICIAL; use in_try_scope instead.
1411 (check_goto): Likewise.
1412 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
1413 * except.c (expand_start_catch_block): Call note_level_for_catch.
1414 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
1416 2001-03-27 Richard Henderson <rth@redhat.com>
1418 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
1419 exceptions_via_longjmp.
1421 2001-03-27 Phil Edwards <pme@sources.redhat.com>
1423 * pt.c (check_default_tmpl_args): Make error messages clearer.
1425 2001-03-26 Phil Edwards <pme@sources.redhat.com>
1427 * error.c: Also undefine 'A' macro used for cp_printers definition.
1429 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1431 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
1433 2001-03-26 Mike Yang <yang@research.att.com>
1434 Mark Mitchell <mark@codesourcery.com>
1436 * dump.c (dump_access): New function.
1437 (cp_dump_tree): Use it. Dump basetype information for class
1440 2001-03-26 Mark Mitchell <mark@codesourcery.com>
1442 * Makefile.in (optimize.o): Depend on params.h.
1443 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
1444 (init_decl_processing): Set flag_no_inline when doing
1446 * optimize.c: Include params.h.
1447 (struct inline_data): Improve documentation of FNS. Add
1448 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
1449 (INSNS_PER_STMT): New macro.
1450 (remap_block): Use CLONING_P.
1451 (inlinable_function_p): Don't inline big functions.
1452 (expand_call_inline): Keep track of how much inlining we've done.
1453 (optimize_function): Set FIRST_INLINED_FN.
1454 (maybe_clone_body): Set CLONING_P.
1455 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
1457 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
1458 rest_of_compilation. Clear DECL_RTL for local variables
1460 (clear_decl_rtl): New function.
1462 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
1465 * cp-tree.h (skip_type_access_control,
1466 reset_type_access_control): Prototype.
1467 * decl.c (grokdeclarator): Access of friends is not checked.
1468 * parse.y (component_decl_list): Reset type access control.
1469 * semantics.c (decl_type_access_control): Clear
1470 current_type_lookups.
1471 (save_type_access_control): Don't save if not deferring.
1472 (skip_type_access_control, reset_type_access_control): New
1474 (begin_class_definition): Do type access control for basetypes.
1475 Start deferred access control.
1476 (finish_class_definition): Resume immediate access control if
1477 this is a local class.
1479 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1481 * class.c (add_method): Use memcpy/memmove, not bcopy.
1483 * decl.c (duplicate_decls): Likewise.
1485 2001-03-23 Jakub Jelinek <jakub@redhat.com>
1487 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
1490 2001-03-23 Jakub Jelinek <jakub@redhat.com>
1492 * decl.c (local_names): Define.
1493 (push_local_name): New.
1494 (grok_reference_init): Return init if initializing static reference
1495 variable with non-constant instead of emitting it.
1496 Move expand_static_init call to cp_finish_decl.
1497 (layout_var_decl): Call push_local_name.
1498 (maybe_commonize_var): Allow inlining functions even if they have
1499 static local variables, use comdat_linkage for them if flag_weak.
1500 (check_initializer): Call obscure_complex_init if
1501 grok_reference_init returned non-zero.
1502 (save_function_data): Clear x_local_names.
1503 (pop_cp_function_context): Free x_local_names.
1504 (mark_inlined_fns): Remove.
1505 (mark_lang_function): Mark x_local_names.
1506 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
1507 Mark inlined_fns as tree, remove call to mark_inlined_fns.
1508 * class.c (alter_access): Ensure DECL_ACCESS is never set if
1509 DECL_DISCRIMINATOR_P.
1510 * cp-tree.h (cp_language_function): Add x_local_names.
1511 (lang_decl_flags): Add discriminator into u2.
1512 (lang_decl_inlined_fns): Remove.
1513 (lang_decl): inlined_fns is now a TREE_VEC.
1514 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
1515 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
1516 TREE_VEC, not a custom structure.
1517 (optimize_function): Likewise.
1518 * mangle.c (discriminator_for_local_entity): Discriminate among
1519 VAR_DECL local entities.
1520 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
1523 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
1525 Add support for Java interface method calls.
1526 * cp-tree.h (struct lang_type): Add java_interface flag.
1527 (TYPE_JAVA_INTERFACE): New macro.
1528 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
1529 by setting TYPE_JAVA_INTERFACE.
1530 * call.c (java_iface_lookup_fn): New static.
1531 (build_over_call): If calling a method declared in a
1532 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
1533 expression which resolves the function address.
1534 (build_java_interface_fn_ref): New function.
1536 2001-03-22 Richard Henderson <rth@redhat.com>
1538 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
1539 * except.c: Don't include it.
1541 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
1542 based on an idea from Joe Buck <jbuck@synopsys.com>
1544 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
1546 (data_def, component_decl): Add reductions to bad_decl.
1548 2001-03-22 Jakub Jelinek <jakub@redhat.com>
1550 * method.c (do_build_assign_ref): Don't use build_modify_expr for
1551 anonymous aggregates, since they don't have assignment operator
1553 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
1554 assignment operators for anonymous structure fields.
1556 2001-03-21 Jason Merrill <jason@redhat.com>
1558 * pt.c (instantiate_decl): Abort if we see a member constant
1559 instantiation that doesn't already have its initializer.
1560 Downgrade explicit instantiation without definition to pedwarn.
1562 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
1563 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
1564 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
1566 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
1567 (pending_vtables): Remove.
1568 * decl2.c (pending_vtables): Remove.
1569 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
1570 CLASSTYPE_VTABLE_NEEDS_WRITING.
1571 (import_export_class): Likewise.
1572 (init_decl2): Don't mark pending_vtables.
1573 * lex.c (handle_pragma_vtable): Just sorry.
1574 * pt.c (instantiate_class_template): Don't mess with
1575 CLASSTYPE_VTABLE_NEEDS_WRITING.
1576 (mark_class_instantiated): Likewise.
1577 * ptree.c (print_lang_type): Don't print it.
1578 * semantics.c (begin_class_definition): Don't set it.
1580 * pt.c (template_tail): Replace with last_pending_template.
1581 (maybe_templates, maybe_template_tail): Remove.
1582 (add_pending_template): Adjust.
1583 (instantiate_pending_templates): Adjust.
1585 * cp-tree.h (struct saved_scope): Remove lang_stack field.
1586 (current_lang_stack): Remove.
1587 * decl.c (maybe_push_to_top_level): Don't initialize it.
1588 (duplicate_decls): Use current_lang_depth.
1589 (xref_basetypes): Likewise.
1590 * class.c (current_lang_depth): New fn.
1591 (push_lang_context): Use more varray functionality.
1592 (pop_lang_context): Likewise.
1594 * error.c (GLOBAL_THING): Always use '__'.
1596 2001-03-21 Mark Mitchell <mark@codesourcery.com>
1598 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
1600 * mangle.c (mangle_decl_string): Mangle the names of overloaded
1601 operators, even when they have `extern "C"' linkage.
1603 2001-03-19 Mark Mitchell <mark@codesourcery.com>
1605 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
1606 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1607 where it's not necessary.
1608 (add_method): Remove optimization involving comparison of
1609 DECL_ASSEMBLER_NAME.
1610 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
1611 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1612 where it's not necessary.
1613 (check_methods): Likewise.
1614 (build_clone): Likewise.
1615 (built_vtt): Likewise.
1616 * cp-tree.h (DECL_NEEDED_P): Likewise.
1617 * decl.c (pushtag): Likewise.
1618 (duplicate_decls): Likewise.
1619 (pushdecl): Likewise.
1620 (builtin_function): Likewise.
1621 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
1622 (build_cp_library_fn): Likewise.
1623 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
1624 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1625 where it's not necessary.
1626 (make_rtl_for_nonlocal_decl): Likewise.
1627 (cp_finish_decl): Likewise.
1628 (grokfndecl): Likewise.
1629 (grokvardecl): Likewise.
1630 (grokdeclarator): Likewise.
1631 (start_function): Likewise.
1632 (cp_missing_return_ok_p): Likewise.
1633 * decl2.c (grokclassfn): Likewise.
1634 (check_classfn): Likewise.
1635 (finish_static_data_member_decl): Likewise.
1636 (grokfield): Likewise.
1637 * error.c (GLOBAL_IORD_P): Remove.
1638 (dump_global_iord): Improve output.
1639 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
1640 * except.c (nothrow_libfn_p): Summarily reject any function not in
1642 * init.c (build_java_class_ref): Don't explicitly set
1643 DECL_ASSEMBLER_NAME after calling mangle_decl.
1644 * mangle.c (mangle_decl_string): Handle extern "C" functions.
1645 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
1646 * method.c (set_mangled_name_for_decl): Don't explicitly set
1647 DECL_ASSEMBLER_NAME after calling mangle_decl.
1648 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
1649 IDENTIFIER_GLOBAL_VALUE for the thunk.
1650 * pt.c (set_mangled_name_for_template_decl): Remove.
1651 (check_explicit_specialization): Don't use it.
1652 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
1653 (tsubst_friend_function): Likewise.
1654 (tsubst_decl): Likewise.
1655 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
1656 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
1657 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1658 where it's not necessary.
1659 (tinfo_base_init): Likewise.
1660 (create_real_tinfo_var): Likewise.
1661 * search.c (looup_field_1): Likewise.
1662 * semantics.c (finish_named_return_value): Likewise.
1663 * tree.c (init_tree): Set lang_set_decl_assembler_name.
1665 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
1667 Correct semantics restrictions checking in throw-expression.
1668 * except.c (is_admissible_throw_operand): New function.
1669 (build_throw): Use it.
1671 2001-03-14 Mark Mitchell <mark@codesourcery.com>
1673 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
1676 2001-03-14 Mark Mitchell <mark@codesourcery.com>
1678 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1679 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
1680 * decl.c (duplicate_decls): Likewise.
1681 (builtin_function): Likewise.
1682 (build_library_fn): Likewise.
1683 (build_cp_library_fn): Likewise.
1684 (check_initializer): Likewise.
1685 (cp_finish_decl): Likewise.
1686 * decl2.c (grokfield): Likewise.
1687 (grok_function_init): Remove #if 0'd code.
1688 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1689 * friend.c (do_friend): Likewise.
1690 * init.c (get_temp_regvar): Likewise.
1691 * method.c (make_thunk): Likewise.
1692 * pt.c (tsubst_friend_function): Likewise.
1693 (tsubst_decl): Likewise.
1694 (regenerate_decl_from_template): Likewise.
1695 * semantics.c (genrtl_named_return_value): Likewise.
1696 (expand_body): Likewise.
1697 (genrtl_finish_function): Likewise.
1698 * tree.c (cp_tree_equal): Likewise.
1700 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
1702 * call.c (convert_like_real): Add extra semantics to INNER
1703 parameter. Don't convert to temporary if a user conversion
1704 gives us an lvalue that we're about to bind to a reference.
1705 Set INNER to indicate pending reference binding on recursive
1708 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
1710 * cp/lex.c: Delete duplicate pending_lang_change.
1712 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
1714 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
1716 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
1717 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
1719 2001-03-09 Zack Weinberg <zackw@stanford.edu>
1721 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
1723 2001-03-08 Stan Shebs <shebs@apple.com>
1725 * cp-tree.h (set_identifier_local_value): Remove unused decl.
1727 2001-03-06 Zack Weinberg <zackw@stanford.edu>
1729 * spew.c: Remove references to CPP_OSTRING.
1731 2001-03-06 Andrew Haley <aph@redhat.com>
1733 * typeck.c (convert_arguments): Check that we have an fndecl.
1735 2001-03-05 Andrew Haley <aph@redhat.com>
1737 * typeck.c (convert_arguments): Don't do ellipsis conversion for
1738 __built_in_constant_p.
1740 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1742 * typeck.c (build_static_cast): Allow enum to enum conversions
1745 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1747 * class.c (check_field_decls): Pointers to member do not a
1748 non-pod struct make, as per DR 148.
1750 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1752 * call.c (joust): cp_pedwarn when using gnu extension concerning
1753 worst conversion sequences.
1755 2001-03-01 Zack Weinberg <zackw@stanford.edu>
1757 * decl.c: Replace all uses of 'boolean' with 'bool'.
1759 2001-03-01 Zack Weinberg <zackw@stanford.edu>
1761 * lang-specs.h: Add zero initializer for cpp_spec field to
1762 all array elements that need one. Don't put an #ifdef inside
1763 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
1766 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
1768 Implement using decls inside template functions.
1769 * decl2.c (validate_nonmember_using_decl): Don't special case
1770 fake_std_node in the global namespace. Don't reject early when
1771 processing a template.
1772 (do_local_using_decl): Add to statement tree. Don't do further
1773 processing when building a template.
1774 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
1776 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
1778 * decl2.c (do_nonmember_using_decl): Don't complain if we find
1779 same function. Do complain about ambiguating extern "C"
1782 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
1784 Remove floating point and complex type template constant parms.
1785 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
1786 COMPLEX_TYPE extensions.
1787 (invalid_nontype_parm_type_p): Likewise.
1789 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
1791 * except.c (call_eh_info): Revert "match_function"'s type.
1793 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
1795 Fix ctor vtable vcall offsets.
1796 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
1797 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
1798 (get_matching_base): Remove.
1799 (get_original_base): New function.
1800 (build_vtbl_initializer): Initialize vid.rtti_binfo.
1801 Use a virtual thunk for a ctor vtable with an index
1802 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
1803 primary base within a constructor vtable. Only set
1804 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
1805 when primary base has been lost.
1806 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
1808 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
1810 * call.c (joust): Ensure more_specialized()'s argument length
1811 parameter has correct value for constructors.
1813 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
1815 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
1817 * decl.c (mark_inlined_fns): Prototype.
1819 2001-02-22 Mark Mitchell <mark@codesourcery.com>
1821 * spew.c (yylex): Correct handling of friends.
1823 2001-02-22 Mark Mitchell <mark@codesourcery.com>
1825 * mangle.c (write_encoding): Pass write_function_type the
1826 FUNCTION_DECL for the function being encoded.
1827 (write_function_type): Pass it along to write_bare_function_type.
1828 (write_bare_function_type): Pass it along to write_method_parms.
1829 (write_method_parms): Don't mangle the compiler-generated
1830 parameters to a constructor or destructor.
1832 2001-02-22 Andreas Jaeger <aj@suse.de>
1834 * optimize.c: Include toplev.h for
1835 note_deferral_of_defined_inline_function prototype.
1837 2001-02-22 Jakub Jelinek <jakub@redhat.com>
1839 * cp-tree.h (struct lang_decl_inlined_fns): New.
1840 (struct lang_decls): Add inlined_fns.
1841 (DECL_INLINED_FNS): New macro.
1842 * optimize.c (struct inline_data): Add inlined_fns.
1843 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
1844 (inlinable_function_p): Likewise, fix typo in comment,
1845 function is not inlinable if it already inlined function currently
1847 (expand_call_inline): Add fn to inlined_fns if neccessary.
1848 (optimize_function): Initialize inlined_fns.
1849 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
1850 * decl.c (mark_inlined_fns): New function.
1851 (lang_mark_tree): Call it.
1853 2001-02-21 Jason Merrill <jason@redhat.com>
1855 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
1856 (DECL_UNINLINABLE): Move to middle-end.
1858 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
1859 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
1860 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
1861 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
1862 parms and outer BLOCK. note_deferral_of_defined_inline_function.
1864 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
1867 2001-02-19 Mark Mitchell <mark@codesourcery.com>
1869 * decl2.c (set_decl_namespace): Allow explicit instantiations in
1872 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1874 * optimize.c (expand_call_inline): Don't walk subtrees of type
1877 2001-02-18 Mark Mitchell <mark@codesourcery.com>
1879 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
1882 2001-02-18 Jason Merrill <jason@redhat.com>
1884 Do put the VTT parameter in DECL_ARGUMENTS.
1885 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
1886 (current_vtt_parm): New macro.
1887 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
1888 (DECL_HAS_VTT_PARM_P): New macro.
1889 (DECL_VTT_PARM): Remove.
1890 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
1891 * decl.c (duplicate_decls): Only copy the operator code if
1893 (start_function): Set current_vtt_parm.
1894 (lang_mark_tree): Don't mark vtt_parm.
1895 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
1896 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
1897 * class.c (build_clone): Maybe remove the VTT parm.
1898 * optimize.c (maybe_clone_body): Set up the VTT parm.
1899 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
1900 * call.c (build_over_call): Just allow the VTT arg.
1901 * method.c (make_thunk): Don't set DECL_VTT_PARM.
1902 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
1903 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
1904 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
1905 * error.c (dump_function_decl): Likewise.
1906 * call.c (build_user_type_conversion_1, convert_like_real): Abort
1907 if we try to call a constructor with in-charge or VTT parms.
1908 * method.c (skip_artificial_parms_for): New fn.
1909 * call.c (add_function_candidate, build_over_call): Call it.
1910 * call.c (build_new_method_call): Use current_vtt_parm.
1911 * init.c (expand_virtual_init): Likewise.
1912 * class.c (same_signature_p): No longer static.
1913 * cp-tree.h: Declare it.
1914 * search.c (look_for_overrides_r): Use it.
1916 2001-02-17 Mark Mitchell <mark@codesourcery.com>
1918 * cp-tree.h (new_abi_rtti_p): Remove.
1919 (name_mangling_version): Likewise.
1920 (flag_do_squangling): Likewise.
1921 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
1922 * decl.c (grokfndecl): Likewise.
1923 * decl2.c (name_mangling_version): Remove.
1924 (flag_do_squangling): Likewise.
1925 (lang_f_options): Remove `squangle'.
1926 (unsupported_options): Add `squangle'.
1927 (cxx_decode_option): Issue a warning about uses of
1928 -fname-mangling-version.
1929 (finish_file): Remove old ABI support.
1930 * pt.c (check_explicit_specialization): Likewise.
1931 (tsubst_decl): Likewise.
1932 * rtti.c (init_rtti_processing): Likewise.
1933 (build_headof): Likewise.
1934 (get_tinfo_decl_dynamic): Likewise.
1935 (tinfo_from_decl): Likewise.
1936 (build_dynamic_cast_1): Likewise.
1937 (synthesize_tinfo_var): Likewise.
1938 * init.c (build_new): Allow enumeration types for the array-bounds
1939 in a direct-new-declarator.
1941 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
1943 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
1944 TREE_PROTECTED from the template being specialized.
1946 2001-02-17 Jason Merrill <jason@redhat.com>
1948 * decl2.c (build_artificial_parm): Set TREE_READONLY.
1950 * decl.c (bad_specifiers): Allow throw specs on things with
1951 pointer-to-function or -member-function type.
1952 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
1955 2001-02-17 Mark Mitchell <mark@codesourcery.com>
1957 * call.c (check_dtor_name): Handle template names correctly.
1959 2001-02-16 Jason Merrill <jason@redhat.com>
1961 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
1962 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
1963 * optimize.c (maybe_clone_body): Don't substitute it.
1964 * call.c (build_new_method_call): Check in_chrg instead.
1965 * init.c (expand_virtual_init): Likewise.
1967 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
1969 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
1970 class-type introduces at least a type-name.
1972 2001-02-16 Jakub Jelinek <jakub@redhat.com>
1974 * call.c (convert_like_real): Create a temporary for non-lvalue.
1976 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
1978 * cp-tree.h: Fix typos in comments.
1980 2001-02-16 Jason Merrill <jason@redhat.com>
1982 * optimize.c (remap_block): If we're compiling a clone, pass the
1983 new block to insert_block.
1985 2001-02-16 Mark Mitchell <mark@codesourcery.com>
1987 * semantics.c (finish_asm_stmt): Robustify.
1989 2001-02-15 Mark Mitchell <mark@codesourcery.com>
1991 * pt.c (push_template_decl_real): Don't remangle the name of a
1994 2001-02-15 Jim Meyering <meyering@lucent.com>
1996 * Make-lang.in (c++.install-common): Depend on installdirs.
1997 (c++.install-info): Likewise.
1998 (c++.install-man): Likewise.
2000 2001-02-15 Mark Mitchell <mark@codesourcery.com>
2002 * typeck2.c (build_m_component_ref): Robustify.
2004 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
2006 * friend.c (do_friend): Don't take the nested [template] class
2007 into account when deciding whether to warn about the friend
2008 function not referring to a template function.
2010 2001-02-14 Jakub Jelinek <jakub@redhat.com>
2012 * typeck.c (build_unary_op): Clarify error message.
2014 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
2016 * parse.y (component_constructor_declarator): allow optional
2017 parentheses around constructor class name.
2019 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
2021 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
2023 * init.c (emit_base_init): Remove incorrect comment about
2025 * method.c (make_thunk): Fix comment alignment.
2027 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
2029 Kill remnants of this is variable.
2030 * cp-tree.h (flag_this_is_variable): Remove.
2031 * decl2.c (flag_this_is_variable): Remove.
2032 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
2033 (build_vbase_path): The path is non-static, even in a cdtor.
2034 (resolves_to_fixed_type_p): Add additional return value.
2035 * search.c (init_vbase_pointers): Adjust.
2036 * tree.c (lvalue_p_1): Adjust.
2037 * typeck.c (mark_addressable): Adjust.
2039 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
2041 * pt.c (unify): Don't check cv quals of array types.
2043 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
2045 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
2046 check whether we already have the type.
2048 2001-02-13 Mark Mitchell <mark@codesourcery.com>
2050 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
2051 * call.c (build_op_delete_call): Simplify to remove duplicate
2053 * class.c (clone_function_decl): Don't build the deleting variant
2054 of a non-virtual destructor.
2055 * decl.c (finish_destructor_body): Don't call delete if this is a
2056 non-virtual destructor.
2057 * init.c (build_delete): Explicitly call `operator delete' when
2058 deleting an object with a non-virtual destructor.
2060 2001-02-13 Jason Merrill <jason@redhat.com>
2062 * lang-specs.h: Add more __EXCEPTIONS.
2064 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
2066 * typeck2.c (process_init_constructor): Check
2067 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
2069 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
2071 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
2072 Remove spurious information in comment. Allow further
2073 adjustments of REFERENCE_TYPE args.
2075 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
2077 * errfn.c (cp_deprecated): Tweak diagnostic text.
2078 * parse.y (new_initializer): Deprecate initializer lists
2081 2001-02-12 Mark Mitchell <mark@codesourcery.com>
2083 Remove old ABI support.
2085 2001-02-11 Mark Mitchell <mark@codesourcery.com>
2087 * decl2.c (flag_vtable_thunks): Always set it to 1.
2088 (flag_new_abi): Likewise.
2089 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
2091 * Makefile.in (g++spec.o): Fix typo.
2093 2001-02-09 Jason Merrill <jason@redhat.com>
2095 * lang-specs.h: Restore definition of __EXCEPTIONS.
2097 2001-02-08 Jason Merrill <jason@redhat.com>
2099 * search.c (shared_member_p): New function.
2100 (lookup_field_r): Use it.
2101 * cp-tree.h (SHARED_MEMBER_P): Remove.
2103 * method.c (process_overload_item): Handle template-dependent array
2105 * pt.c (type_unification_real): If we end up with undeduced nontype
2108 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
2111 * typeck2.c (friendly_abort): Don't say anything if we have
2112 earlier errors or sorries.
2114 * decl.c (check_tag_decl): Notice attempts to redefine bool and
2115 wchar_t. Ignore if in_system_header.
2117 * decl.c (maybe_push_cleanup_level): New fn...
2118 (start_decl_1): ...split out from here.
2119 * cvt.c (build_up_reference): Use it.
2120 * cp-tree.h: Declare it.
2122 2001-02-07 Mark Mitchell <mark@codesourcery.com>
2124 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
2127 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
2129 * pt.c (lookup_template_class): Make sure it's a primary
2130 template or template_template_parm when called from the parser.
2131 (instantiate_template_class): Add assertion.
2133 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
2135 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
2136 from error_mark_node.
2138 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
2140 Fix specification and implementation bugs in V3 ABI
2141 construction vtables.
2142 * cp-tree.h (flag_dump_class_layout): New flag.
2143 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
2144 (BINFO_LOST_PRIMARY_P): New flag.
2145 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
2146 (BINFO_PRIMARY_MARKED_P): Rename to ...
2147 (BINFO_PRIMARY_P): ... here.
2148 (binfo_via_virtual): New prototype.
2149 * decl2.c (flag_dump_class_layout): New flag.
2150 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
2151 use `=' as a file name separator.
2152 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
2154 (build_vtbl_address): If this is a virtual primary base, then
2155 get the vtbl of what it is ultimately primary for.
2156 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
2157 for BINFO_PRIMARY_P.
2158 (dfs_skip_nonprimary_vbases_markedp): Likewise.
2159 (get_shared_vbase_if_not_primary): Likewise.
2160 (dfs_get_pure_virtuals): Likewise.
2161 (expand_upcast_fixups): Likewise.
2162 (fixup_virtual_upcast_offsets): Likewise.
2163 (dfs_find_vbase_instance): Likewise.
2164 (find_vbase_instance): Likewise.
2165 (binfo_from_vbase): Adjust comment to reflect reality.
2166 (binfo_via_virtual): New function.
2167 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
2168 for binfo walking during VTT construction.
2169 (dfs_mark_primary_bases): Remove.
2170 (force_canonical_binfo_r): New function.
2171 (force_canonical_binfo): New function.
2172 (mark_primary_virtual_base): New function.
2173 (mark_primary_bases): Walk in inheritance graph order, use
2174 mark_primary_virtual_base.
2175 (determine_primary_base): Use some more intermediate variables.
2176 (dfs_find_final_overrider): Don't check for overriding along a
2178 (dfs_modify_vtables): Walk into primary virtual bases too.
2179 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
2180 (build_base_fields): Likewise.
2181 (dfs_set_offset_for_unshared_vbases): Likewise.
2182 (layout_virtual_bases): Likewise.
2183 (end_of_class): Likewise.
2184 (finish_struct_1): Call dump_class_hierarchy, if requested.
2185 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
2186 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
2187 (dump_class_hierarchy): Add file parameter. Append to file, if
2189 (finish_vtbls): Adjust accumulate_vtbl_inits call.
2190 Use canonical base for virtual bases.
2191 (build_vtt): Add more comments. Adjust build_vtt_inits call.
2192 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
2193 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
2194 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
2196 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
2197 from DATA. We want virtual primary bases and all bases via virtual.
2198 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
2199 virtual base when not a construction vtable.
2200 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
2201 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
2202 Use canonical bases when processing virtual bases.
2203 (accumulate_vtbl_inits): We're interested in any base via a
2205 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
2206 within a construction vtable, determine what is being overridden.
2207 (build_vtbl_initializer): Add more comments
2208 (add_vcall_offset_vtbl_entries_1): Adjust comment.
2209 (build_rtti_vtbl_entries): Check if the base has lost its
2212 2001-02-05 Mark Mitchell <mark@codesourcery.com>
2214 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
2216 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2218 * decl.c (pushdecl): Call abort instead of fatal.
2219 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
2220 * init.c (build_new_1): Likewise.
2221 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
2222 * decl.c (build_typename_type): hash_table_init now returns void.
2223 decl.c (init_decl_processing): Make an error non-fatal.
2225 2001-02-04 Mark Mitchell <mark@codesourcery.com>
2227 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
2229 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2230 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2231 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2232 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2233 * decl.c (maybe_commonize_var): Use the new name-mangling where
2235 * decl2.c (comdat_linkage): Enhance comments. Make all
2236 compiler-generated things static, if COMDAT is not available.
2237 (get_tinfo_decl): Do not make typeinfo objects that belong in the
2239 (tinfo_base_init): Use the correct mangled name for typeinfo
2240 strings, and push them into the global scope.
2241 (typeinfo_in_lib_p): New function.
2242 (synthesize_tinfo_var): Use it.
2243 (create_real_tinfo_var): Likewise.
2245 2001-02-03 Jakub Jelinek <jakub@redhat.com>
2247 * decl.c (push_class_binding): Use context_for_name_lookup instead
2249 * search.c (context_for_name_lookup): Remove static. Check for NULL
2250 context in the loop.
2251 * cp-tree.h (context_for_name_lookup): Add prototype.
2253 2001-02-02 Jakub Jelinek <jakub@redhat.com>
2255 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
2256 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
2258 * call.c (convert_class_to_reference, build_user_type_conversion_1,
2259 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
2261 2001-02-02 Mark Mitchell <mark@codesourcery.com>
2263 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
2264 of macros used when compiling g++spec.c.
2265 * g++spec.c (lang_specific_driver): Link with the shared
2268 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
2270 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
2271 make_reference_declarator, make_call_declarator), method.c
2272 (implicitly_declare_fn), parse.y (namespace_using_decl,
2273 notype_unqualified_id, expr_or_declarator, new_type_id,
2274 after_type_declarator, direct_after_type_declarator,
2275 notype_declarator, complex_notype_declarator,
2276 complex_direct_notype_declarator, qualified_id,
2277 notype_qualified_id, overqualified_id, direct_new_declarator,
2278 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
2279 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
2280 instead of build_parse_node.
2282 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2284 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
2285 (minus_one_node): Moved to top level gcc directory. Renamed
2286 to integer_minus_one_node.
2288 * init.c (init_init_processing): Don't set minus_one_node.
2289 (build_vec_init): Use integer_minus_one_node.
2291 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2293 2001-01-28 Jakub Jelinek <jakub@redhat.com>
2295 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
2296 identical and they would be replaced with constant, remove
2297 MODIFY_EXPR from the tree.
2299 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2301 * Make-lang.in: Remove all dependencies on defaults.h.
2302 * call.c: Don't include defaults.h.
2304 * decl2.c: Likewise.
2305 * except.c: Likewise.
2309 * typeck.c: Likewise.
2311 2001-01-25 Jakub Jelinek <jakub@redhat.com>
2313 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
2314 operators even in "C" linkage.
2315 * method.c (set_mangled_name_for_decl): Likewise.
2316 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
2317 overloaded operators in "C" linkage.
2319 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
2321 * pt.c (tsubst_decl): Remove IN_DECL parameter.
2322 (tsubst_arg_types): Check parameter is not void.
2323 (tsubst): Adjust tsubst_decl call.
2325 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
2327 * call.c (add_builtin_candidate): Quote std properly, from
2330 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2332 * pt.c (check_explicit_specialization): Clone constructors and
2335 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
2337 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
2338 indicates anything special about template depth. Make sure we
2339 only count the user visible template classes.
2341 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
2343 * call.c (build_conv): Typo in comment.
2344 (add_builtin_candidate): Add more explanation.
2345 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
2346 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
2347 when we have enumeral types.
2348 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
2349 candidates for relops and eqops.
2350 (joust): Simplify control flow. Allow a non-template user
2351 function to hide a builtin.
2353 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
2355 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
2356 (more_specialized): Add deduction parameter.
2357 * call.c (joust): Adjust more_specialized call.
2358 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
2359 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
2360 (get_bindings_order): Remove.
2361 (get_bindings_real): Add DEDUCE parameter.
2362 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
2363 REFERENCE_TYPE jig for DEDUCE_ORDER.
2364 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
2365 maybe_adjust_types_for_deduction.
2366 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
2368 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
2369 (check_cv_quals_for_unify): Use new unify qualifier flags.
2370 (unify): Clear new unify qualifier flags.
2371 (get_bindings_real): Add DEDUCE parameter.
2372 (get_bindings): Adjust call to get_bindings_real.
2373 (get_bindings_overload): Likewise.
2374 (most_specialized_instantiation): Adjust call to
2377 2001-01-19 Jason Merrill <jason@redhat.com>
2379 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
2381 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
2384 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
2386 * decl2.c (arg_assoc_class): Fix double iteration logic.
2388 2001-01-19 Jason Merrill <jason@redhat.com>
2390 * init.c (build_delete): Always call convert_force to strip cv-quals.
2392 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
2393 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
2394 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
2396 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2398 * search.c (get_vbase_1): Count only virtual bases.
2400 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2402 * class.c (duplicate_tag_error): Robustify flag clearing.
2404 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2406 * cp-tree.h (lookup_template_class): Add complain parm.
2407 * decl.c (lookup_namespace_name): Adjust call to
2408 lookup_template_class.
2409 (make_typename_type): Likewise.
2410 * semantics.c (finish_template_type): Likewise.
2411 * pt.c (lookup_template_class): Add complain parm. Adjust.
2412 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
2415 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2417 * pt.c (copy_default_args_to_explicit_spec): Preserve
2418 object's CV quals. Reorganize.
2420 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2422 * typeck.c (build_modify_expr): Say `initialization' for
2424 * init.c (build_default_init): Convert to enumeral type, if
2427 2001-01-18 Jakub Jelinek <jakub@redhat.com>
2429 * parse.y (nomods_initdcl0): Properly set things up for
2432 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2434 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
2435 (type_unification_real): Set it.
2438 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2440 * decl.c (finish_destructor_body): Convert to vbase pointer here.
2442 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2444 * semantics.c (begin_class_definition): Check we're not inside a
2447 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2449 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
2452 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2454 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
2455 * call.c (build_over_call): Add comment.
2457 2001-01-16 Daniel Berlin <dberlin@redhat.com>
2459 * cvt.c (ocp_convert): Handle vector type conversion
2460 * typeck2.c (digest_init): Handle vector type initializations
2462 2001-01-16 Phil Edwards <pme@sources.redhat.com>
2464 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
2467 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
2469 * pt.c (check_nontype_parm): Rename to ...
2470 (invalid_nontype_parm_type_p): ... here.
2471 (process_template_parm): Adjust.
2472 (convert_template_argument): Adjust.
2474 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
2476 * pt.c (check_nontype_parm): New function.
2477 (process_template_parm): Use it.
2478 (convert_template_argument): Use it.
2479 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
2482 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
2484 * tree.c: Add defaults.h
2485 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
2486 * Make-lang.in (cp/tree.o): Add defaults.h.
2488 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2490 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
2492 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2494 * g++.1: Change to be ".so man1/gcc.1".
2496 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2498 * Make-lang.in (c++.info, c++.install-info): Build and install g++
2500 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
2501 ($(srcdir)/cp/g++int.info): New target.
2502 * gxxint.texi: Add info directory entry. Use @@ in email address.
2503 * .cvsignore: Update.
2505 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
2507 * typeck.c (build_c_cast): Do template processing earlier.
2508 Always pedwarn on array casts.
2510 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
2512 * friend.c (make_friend_class): Make sure a templated class is
2513 actually a template.
2515 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2517 * decl2.c (get_guard): Set linkage from guarded decl.
2519 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2521 * call.c (convert_default_arg): Check for unprocessed
2523 * cp-tree.h (replace_defarg): Move to spew.c.
2524 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
2525 spew.c, which is where they really are.
2526 (done_pending_defargs): Declare.
2527 (unprocessed_defarg_fn): Declare.
2528 * decl.c (replace_defarg): Move to spew.c
2529 * parse.y (structsp): Call done_pending_defargs.
2530 * spew.c (defarg_fns): Rearrange list structure.
2531 (defarg_fnsdone): New static variable.
2532 (defarg_depfns): New static variable.
2533 (init_spew): Adjust.
2534 (add_defarg_fn): Store the type in TREE_TYPE.
2535 (do_pending_defargs): Detect and deal with ordering constraints
2537 (done_pending_defargs): New function.
2538 (unprocessed_defarg_fn): New function.
2539 (replace_defarg): Moved from decl.c. Robustify. Don't save
2540 if circularity detected.
2542 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2544 * pt.c (unify): Check array has a domain, before checking
2545 whether it is variable sized.
2547 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2549 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
2550 parameters with pointers to arrays of unknown bound.
2552 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2554 * parse.y (template_parm_header, template_spec_header): New
2555 reductions. Split out from ...
2556 (template_header): ... here. Use them.
2557 (template_template_parm): Use template_parm_header.
2558 * semantics.c (finish_template_template_parm): Add assert.
2560 2001-01-10 Mark Mitchell <mark@codesourcery.com>
2562 * mangle.c (write_builtin_type): Fix thinko.
2564 * pt.c (copy_default_args_to_explicit_spec_1): New function.
2565 (copy_default_args_to_explicit_spec): Likewise.
2566 (check_explicit_specialization): Use it.
2568 * class.c (finish_struct_1): Remove last argument in call to
2569 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
2570 * decl.c (builtin_function): Likewise.
2571 (build_cp_library_fn): Likewise.
2572 (check_initializer): Likewise.
2573 (make_rtl_for_nonlocal_decl): Likewise.
2574 (cp_finish_decl): Likewise.
2575 (start_function): Likewise.
2576 * decl2.c (finish_anon_union): Likewise.
2577 * friend.c (do_friend): Likewise.
2578 * init.c (build_java_class_ref): Likewise.
2579 * method.c (make_thunk): Likewise.
2580 * pt.c (tsubst_friend_function): Likewise.
2581 * semantics.c (expand_body): Likewise.
2583 2001-01-10 Mark Mitchell <mark@codesourcery.com>
2585 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
2586 looking at DECL_CLONED_FUNCTION for non-functions.
2588 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2590 * error.c (dump_template_parameter): Use parm to determine how
2591 to print default value.
2593 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2595 * class.c (duplicate_tag_error): Clear more flags.
2597 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2599 * call.c (build_new_method_call): Use binfo_for_vbase.
2601 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
2603 * cp-tree.h (flag_cond_mismatch): Don't declare.
2604 * decl2.c (flag_cond_mismatch): Don't define.
2605 (lang_f_options): Remove cond-mismatch.
2606 (unsupported_options): Add cond-mismatch.
2608 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
2610 * class.c (handle_using_decl): Reject using of constructor name
2611 of sourcing class. Allow injecting of a method with same name as
2612 nested class. Fixup error messages.
2614 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
2616 * decl2.c (lang_decode_option): Handle -Wformat=2.
2618 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2620 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
2621 initialized_in_class.
2622 (DECL_DEFINED_IN_CLASS_P): Rename to ...
2623 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
2624 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
2625 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
2626 * pt.c (check_default_tmpl_args): Adjust for
2627 DECL_INITIALIZED_IN_CLASS_P.
2628 (instantiate_class_template): Likewise.
2629 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
2631 * class.c (finish_struct): Constify saved_filename.
2633 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2635 * class.c (duplicate_tag_error): Adjust diagnostic.
2636 (finish_struct): Locally set location to start of struct.
2637 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
2639 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2641 * decl.c (struct binding_level): Adjust class_shadowed comments
2643 (push_class_level_binding): Ajust comments to reflect reality.
2644 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
2645 Don't set TREE_VALUE on the class_shadowed list.
2647 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
2649 * decl2.c (acceptable_java_type): Allow references too.
2650 * init.c (build_java_class_ref): When using the new ABI, search
2651 `class$' and have it mangled with `mangle_decl.'
2652 * mangle.c (write_java_integer_type_codes): New function.
2653 (write_builtin_type): Detect and mangle Java integer and real
2656 2001-01-07 Mark Mitchell <mark@codesourcery.com>
2658 * decl2.c (grokfield): Don't accept `asm' specifiers for
2659 non-static data members.
2661 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2663 * expr.c (cplus_expand_expr): Don't reset `target'.
2665 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
2667 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
2669 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
2671 * parse.y (template_datadef): Check for error_mark_node.
2673 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
2675 * cp-tree.def (DEFAULT_ARG): Make `x' class.
2677 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
2679 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
2680 (record_builtin_type): Make non-static.
2681 (flag_short_double): Don't declare.
2682 (init_decl_processing): Remove the creation of many tree nodes now
2683 in c_common_nodes_and_builtins.
2684 (build_void_list_node): New function.
2685 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
2686 * cp-tree.h (flag_short_wchar): Don't declare.
2688 2001-01-04 Mark Mitchell <mark@codesourcery.com>
2690 * call.c (build_conv): Don't use build1 for USER_CONV.
2691 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
2693 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
2695 * lex.c (lang_init): Call c_common_lang_init.
2697 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
2699 * search.c (lookup_fnfields_here): Remove.
2700 (look_for_overrides_r): Use lookup_fnfields_1.
2701 Ignore functions from using declarations.
2703 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
2705 Implement exceptions specifiers for implicit member functions.
2706 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
2707 * method.c (synthesize_exception_spec): New function.
2708 (locate_dtor, locate_ctor, locate_copy): New functions.
2709 (implicitly_declare_fn): Generate the exception spec too.
2710 * search.c (check_final_overrider): Check artificial functions
2712 * typeck2.c (merge_exception_specifiers): New function.
2714 2001-01-03 Jason Merrill <jason@redhat.com>
2716 * init.c (build_default_init): New fn.
2717 (perform_member_init): Split out from here.
2718 (build_new_1): Use it. Simplify initialization logic.
2719 (build_vec_init): Take an array, rather than a pointer and maxindex.
2720 Speed up simple initializations. Don't clean up if we're assigning.
2721 * cp-tree.h: Adjust.
2722 * decl2.c (do_static_initialization): Remove TREE_VEC case.
2723 * parse.y (new_initializer): Return void_zero_node for ().
2724 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
2725 * typeck2.c (digest_init): Only complain about user-written
2728 2000-12-22 Mike Stump <mrs@wrs.com>
2730 * decl2.c: (max_tinst_depth): Increase to 50.
2732 2001-01-02 Mark Mitchell <mark@codesourcery.com>
2734 * class.c (invalidate_class_lookup_cache): Zero the
2735 previous_class_values.
2736 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
2738 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
2739 * decl.c (free_bindings): New variable.
2740 (push_binding): Don't create a new binding if we have one on the
2742 (pop_binding): Put old bindings on the free list.
2743 (init_decl_processing): Use size_int, not build_int_2.
2744 Register free_bindings as a GC root.
2745 (cp_make_fname_decl): Use size_int, not build_int_2.
2746 (push_inline_template_parms_recursive): Likewise.
2747 (end_template_parm_list): Likewise.
2748 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
2749 (tsubst_template_parms): Use size_int, not build_int_2.
2751 * rtti.c (get_vmi_pseudo_type_info): Likewise.
2753 2001-01-02 Richard Henderson <rth@redhat.com>
2755 * parse.y (asm): Set ASM_INPUT_P.
2757 2001-01-02 Jason Merrill <jason@redhat.com>
2759 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
2762 * typeck.c (cp_truthvalue_conversion): New fn.
2763 * cvt.c (ocp_convert): Use it.
2765 * cp-tree.h: Lose c-common.c decls.
2767 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
2768 * cvt.c (convert_to_void): Use type_unknown_p.
2770 * typeck.c (strip_all_pointer_quals): Also strip quals from
2771 pointer-to-member types.
2773 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
2776 * call.c (build_new_method_call): Do evaluate the object parameter
2777 when accessing a static member.
2778 * typeck.c (build_component_ref): Likewise.
2780 2001-01-02 Andreas Jaeger <aj@suse.de>
2782 * decl.c (cp_missing_noreturn_ok_p): New.
2783 (init_decl_processing): Set lang_missing_noreturn_ok_p.
2785 2000-12-29 Jakub Jelinek <jakub@redhat.com>
2787 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
2789 2000-12-29 Mark Mitchell <mark@codesourcery.com>
2791 * class.c (pushclass): Remove #if 0'd code.
2792 * cp-tree.h (overload_template_name): Remove.
2793 * decl.c (store_bindings): Simplify.
2794 (pop_from_top_level): Likewise.
2795 * pt.c (overload_template_name): Remove.
2796 (instantiate_decl): Don't call push_to_top_level if it's not
2799 2000-12-28 Mark Mitchell <mark@codesourcery.com>
2801 * pt.c (register_local_specialization): Don't return a value.
2802 (lookup_template_class): Use move-to-front heuristic when looking
2803 up template instantiations.
2804 (instantiate_decl): Only push_to_top_level when we're actually
2805 going to instantiate the template.
2807 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
2809 * search.c (binfo_for_vtable): Return least derived class, not
2810 most. Handle secondary vtables.
2812 2000-12-22 Jason Merrill <jason@redhat.com>
2814 * pt.c (more_specialized): Don't optimize len==0.
2815 (fn_type_unification): If we're adding the return type, increase len.
2817 * typeck.c (build_binary_op): Fix pmf comparison logic.
2819 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
2820 DECL_STATIC_FUNCTION_P.
2822 * semantics.c (genrtl_finish_function): Don't try to jump to
2823 return_label unless it exists.
2825 In partial ordering for a call, ignore parms for which we don't have
2827 * call.c (joust): Pass len to more_specialized.
2828 (add_template_candidate_real): Strip 'this', pass len.
2829 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
2830 (get_bindings_order): New fn. Pass len down.
2831 (get_bindings_real): Strip 'this', pass len.
2832 (fn_type_unification): Likewise.
2833 (type_unification_real): Succeed after checking 'len' args.
2834 (most_specialized_instantiation): Lose explicit_args parm.
2835 * class.c (resolve_address_of_overloaded_function): Strip 'this',
2838 2000-12-21 Jason Merrill <jason@redhat.com>
2840 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
2841 DECL_TEMPLATE_RESULT.
2843 * search.c (lookup_field_r): Call lookup_fnfields_1, not
2844 lookup_fnfields_here.
2846 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
2848 * call.c (build_object_call): Also allow conversions that return
2849 reference to pointer to function.
2850 (add_conv_candidate): Handle totype being ref to ptr to fn.
2851 (build_field_call): Also allow members of type reference to function.
2852 Lose support for calling pointer to METHOD_TYPE fields.
2854 * error.c (dump_expr): Handle *_CAST_EXPR.
2856 * typeck2.c (build_scoped_ref): Always convert to the naming class.
2858 * tree.c (break_out_cleanups): Lose.
2859 * cp-tree.h: Remove prototype.
2860 * typeck.c (build_component_ref): Don't break_out_cleanups.
2861 (build_compound_expr): Likewise.
2862 * semantics.c (finish_expr_stmt): Likewise.
2864 2000-12-20 Richard Henderson <rth@redhat.com>
2866 * cp-tree.h: Update declarations.
2867 * decl.c (finish_case_label): Return the new stmt node.
2868 * semantics.c (finish_goto_stmt): Likewise.
2869 (finish_expr_stmt, finish_return_stmt): Likewise.
2870 (finish_break_stmt, finish_continue_stmt): Likewise.
2871 (finish_asm_stmt): Likewise.
2872 * parse.y (already_scoped_stmt): Set STMT_LINENO.
2873 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
2874 (simple_if, simple_stmt): Return the new stmt node.
2877 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
2879 * cp-tree.h: Don't declare warn_long_long.
2881 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2883 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
2886 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2888 * pt.c (unify): Handle when both ARG and PARM are
2889 BOUND_TEMPLATE_TEMPLATE_PARM.
2891 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2893 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
2894 DECL_TEMPLATE_PARM_P.
2896 2000-12-15 Jason Merrill <jason@redhat.com>
2898 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
2900 * init.c (build_new_1): Don't strip quals from type.
2902 * decl.c (pushdecl): Don't check for linkage on a non-decl.
2904 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
2906 * call.c (build_new_function_call): Lose space before paren in
2908 (build_new_method_call): Likewise.
2910 * typeck2.c (build_m_component_ref): Propagate quals from datum.
2912 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2914 * pt.c (check_explicit_specialization): Propagate default
2915 function arguments to explicit specializations.
2917 2000-12-13 DJ Delorie <dj@redhat.com>
2919 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
2922 2000-12-08 Jason Merrill <jason@redhat.com>
2924 * error.c (dump_function_name): Don't let the user see __comp_ctor.
2926 Clean up copy-initialization in overloading code.
2927 * call.c (build_user_type_conversion_1): Die if we are asked to
2928 convert to the same or a base type.
2929 (implicit_conversion): Avoid doing so. Lose reference binding code.
2930 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
2931 direct-initialization. Also do direct-init part of copy-init.
2932 (build_user_type_conversion): Don't provide context to convert_like.
2933 * cvt.c (ocp_convert): build_user_type_conversion will now provide
2934 the constructor call for copy-init.
2936 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
2937 instantiation of a member template.
2938 (do_decl_instantiation): Not here.
2940 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
2942 * class.c (check_field_decls): Don't special case anonymous
2943 fields in error messages.
2944 (note_name_declared_in_class): Use %D on diagnostic.
2946 * tree.c (pod_type_p): Use strip_array_types.
2947 (cp_valid_lang_attribute): Likewise.
2948 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
2949 multiple evaluations.
2950 (cp_has_mutable_p): Use strip_array_types.
2952 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
2954 * cp-tree.h (sufficient_parms_p): Declare new function.
2955 * call.c (sufficient_parms_p): New function, broken out of ...
2956 (add_function_candidate): ... here. Use it.
2957 (add_conv_candidate): Use it.
2958 * decl.c (grok_ctor_properties): Use it.
2960 2000-12-07 Jakub Jelinek <jakub@redhat.com>
2962 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
2964 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
2966 * decl2.c (lang_decode_option): Handle -Wformat-security.
2968 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2970 * pt.c (verify_class_unification): New function.
2971 (get_class_bindings): Use it.
2972 (try_class_unification): Tidy.
2973 (unify): Handle when argument of a template-id is not
2974 template parameter dependent.
2975 (template_args_equal): Handle when TREE_CODE's do not match.
2977 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
2979 * lang-specs.h (c++): When invoking the stand-alone preprocessor
2980 for -save-temps, pass all relevant -Defines to it, and then don't
2981 pass them to cc1plus.
2983 2000-12-05 Will Cohen <wcohen@redhat.com>
2985 * decl.c (finish_case_label): Cleared
2986 more_cleanups_ok in surrounding function scopes.
2987 (define_label): Likewise.
2989 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
2991 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
2992 (get_matching_virtual): Remove.
2993 (look_for_overrides): Declare new function.
2994 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
2996 * class.c (check_for_override): Move base class iteration code
2997 to look_for_overrides.
2998 * search.c (next_baselink): Remove.
2999 (get_virtuals_named_this): Remove.
3000 (get_virtual_destructor): Remove.
3001 (tree_has_any_destructors_p): Remove.
3002 (struct gvnt_info): Remove.
3003 (check_final_overrider): Remove `virtual' from error messages.
3004 (get_matching_virtuals): Remove. Move functionality to ...
3005 (look_for_overrides): ... here, and ...
3006 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
3009 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
3011 * typeck.c (get_delta_difference): If via a virtual base,
3013 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
3016 2000-12-04 Richard Henderson <rth@redhat.com>
3018 * error.c (dump_tree): Use output_add_string not OB_PUTS.
3020 2000-12-04 Jason Merrill <jason@redhat.com>
3022 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
3023 (write_builtin_type): Pass intSI_type_node and the like through
3025 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
3026 Pass intSI_type_node and the like through type_for_mode.
3027 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
3028 * pt.c (tsubst, unify): Likewise.
3029 * tree.c (walk_tree): Likewise.
3030 * error.c (dump_type): Likewise.
3031 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
3033 * Make-lang.in: Tweak top comment for emacs.
3036 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
3038 * class.c (clone_function_decl): Robustify.
3040 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
3042 * decl.c (store_bindings): Only search in the non modified
3043 old_bindings for duplicates.
3045 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
3047 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
3050 * typeck.c (build_static_cast): Remove unused variable.
3052 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3054 * pt.c: Fix typo in comment.
3056 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
3058 * decl2.c (warn_format): Remove definition.
3059 (lang_decode_option): Handle -Wformat-nonliteral,
3060 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
3062 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
3064 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
3065 (init_decl_processing): Don't create string_type_node,
3066 const_string_type_node, wint_type_node, intmax_type_node,
3067 uintmax_type_node, default_function_type, ptrdiff_type_node and
3068 unsigned_ptrdiff_type_node. Adjust position of call to
3069 c_common_nodes_and_builtins.
3070 (identifier_global_value): New function.
3072 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
3074 * call.c (standard_conversion): Reject pointer to member
3075 conversions from ambiguous, inaccessible or virtual bases.
3076 * typeck.c (build_static_cast): Don't check pointers to members
3079 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3081 * method.c (do_build_copy_constructor): Preserve cv
3082 qualifications when accessing source object members.
3083 (do_build_assign_ref): Likewise. Remove separate diagnostics for
3086 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3088 * method.c (do_build_assign_ref): Construct appropriately
3089 CV-qualified base reference. Don't allow const casts in base
3092 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3094 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
3095 incomplete return type.
3097 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3099 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
3100 * semantics.c (finish_base_specifier): Accept a _TYPE not a
3103 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3105 * spew.c (yyerror): Cope if yylval.ttype is NULL.
3107 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3109 * decl.c (grokdeclarator): Diagnose undefined template contexts.
3111 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3113 * decl.c (grokdeclarator): Do type access control on friend
3116 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
3118 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
3119 bison parser ickiness.
3120 * pt.c (tsubst_friend_function): Enter namespace scope when
3121 tsubsting the function name.
3122 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
3124 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
3126 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
3127 * cvt.c (cp_convert_to_pointer): Add force parameter.
3128 Allow conversions via virtual base if forced.
3129 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
3130 (ocp_convert): Likewise.
3131 * search.c (binfo_from_vbase): Return the virtual base's binfo.
3132 * typeck.c (get_delta_difference): Adjust handling of virtual
3135 2000-11-26 Mark Mitchell <mark@codesourcery.com>
3137 * tree.c (struct list_hash): Remove.
3138 (list_hash_table): Make it be an htab.
3139 (struct list_proxy): New type.
3140 (list_hash_eq): New function.
3141 (list_hash_pieces): Renamed from ...
3142 (list_hash): ... this.
3143 (list_hash_lookup): Remove.
3144 (list_hash_add): Remove.
3145 (hash_tree_cons): Use the generic hashtable.
3146 (mark_list_hash): Remove.
3147 (init_tree): Create the hashtable.
3149 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
3151 * method.c (build_mangled_C9x_name): Rename to
3152 build_mangled_C99_name. Change C9X references in comments to
3155 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
3157 * parse.y (unary_expr): Move VA_ARG from here ...
3158 (primary): ... to here.
3160 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
3162 * semantics.c (finish_id_expr): If type is error_mark, return
3165 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
3167 * pt.c (lookup_template_class): Simplify loop exit constructs.
3168 Cope when there is no partial instantiation of a template
3171 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
3173 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
3175 2000-11-22 Mark Mitchell <mark@codesourcery.com>
3177 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
3180 * pt.c (do_decl_instantiate): Explicitly clone constructors and
3181 destructors that haven't already been cloned.
3183 2000-11-20 Richard Henderson <rth@redhat.com>
3185 * parse.y (yyparse_1): Rename the parser entry point.
3187 2000-11-20 Alex Samuel <samuel@codesourcery.com>
3189 * mangle.c (write_name): Use <unscoped-name> for names directly in
3191 (write_unscoped_name): Accept names directly in function scope.
3193 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
3195 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
3196 * parse.y (extdef): Add EXPORT reduction.
3197 * spew.c (yylex): Don't skip export here.
3199 2000-11-19 Mark Mitchell <mark@codesourcery.com>
3201 * decl.c (init_decl_processing): Correct name of pure virtual
3202 function under the new ABI.
3203 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
3204 (throw_bad_typeid): Likewise for bad typeid function.
3206 2000-11-18 Mark Mitchell <mark@codesourcery.com>
3208 * decl.c (grokparms): Don't even function types of `void' type,
3210 * mangle.c (write_type): Don't crash when confronted with the
3213 * decl.c (grokparms): Don't create parameters of `void' type.
3215 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
3217 * lex.c (mark_impl_file_chain): Delete.
3218 (init_parse): Remove call to ggc_add_string_root. No need to
3219 ggc_strdup a string constant. Do not add impl_file_chain to GC
3221 (handle_pragma_implementation): No need to ggc_strdup main_filename.
3223 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3225 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
3227 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3229 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
3230 * decl.c (grokdeclarator): Don't reject void parms here.
3231 (require_complete_types_for_parms): Simplify, use
3232 complete_type_or_else.
3233 (grokparms): Remove bitrot. Remove funcdef parm.
3234 Deal with ellipsis parm lists here.
3235 * semantics.c (finish_parmlist): Don't append void_list_node
3236 here. Set PARMLIST_ELLIPSIS_P.
3238 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3240 * typeck2.c (incomplete_type_error): Reorganise to avoid
3241 excessive diagnostics.
3243 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
3245 * lex.c (struct impl_files, internal_filename): Constify a char *.
3247 2000-11-16 Mark Mitchell <mark@codesourcery.com>
3249 * mangle.c (write_special_name_constructor): Don't generate
3250 assembler junk when confronted with an old-style constructor.
3251 (write_special_name_destructor): Likewise.
3252 (mangle_decl_string): Do it here instead.
3254 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
3256 * call.c (op_error): Make error messages clearer.
3258 2000-11-15 Mark Mitchell <mark@codesourcery.com>
3260 * decl.c (wrapup_globals_for_namespace): Don't mark things
3261 TREE_ASM_WRITTEN when they're not.
3263 2000-11-15 Jason Merrill <jason@redhat.com>
3265 * typeck2.c (friendly_abort): Uncount the error before handing
3268 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
3270 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
3272 2000-11-14 Mark Mitchell <mark@codesourcery.com>
3274 * class.c (build_vtbl_initializer): Fix typo in comment.
3275 * typeck.c (expr_sizeof): Don't crash on errors.
3277 2000-11-14 Jim Wilson <wilson@redhat.com>
3279 * lang-specs.h: Add %2 after %(cc1_options).
3281 2000-11-14 Richard Henderson <rth@redhat.com>
3283 * typeck.c (c_sizeof): Be strict about casting result value
3284 back to c_size_type_node.
3285 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
3287 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
3289 * typeck.c (build_unary_op): Use boolean_increment from
3290 c-common.c, moving the relevant code there.
3292 2000-11-11 Jason Merrill <jason@redhat.com>
3294 * typeck.c (mark_addressable): Don't call put_var_into_stack.
3296 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
3299 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3301 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
3302 * lex.c (copy_lang_decl): Likewise.
3304 2000-11-09 Mark Mitchell <mark@codesourcery.com>
3306 * dump.c (cp_dump_tree): Don't dump function bodies here.
3308 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3309 (dump.o): Update dependency list.
3310 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
3311 (flag_dump_translation_unit): Likewise.
3312 (CP_TYPE_QUALS): Adjust definition.
3313 (DECL_C_BIT_FIELD): Remove.
3314 (SET_DECL_C_BIT_FIELD): Likewise.
3315 (CLEAR_DECL_C_BIT_FIELD): Likewise.
3316 (add_maybe_template): Likewise.
3317 (strip_array_types): Likewise.
3318 (dump_node_to_file): Likewise.
3319 (cp_dump_tree): New function.
3320 * decl.c (init_decl_processing): Set lang_dump_tree.
3321 * decl2.c (flag_dump_translation_unit): Remove.
3322 * dump.c: Move most of it to ../c-dump.c.
3323 (cp_dump_tree): New function.
3324 * pt.c (add_maybe_template): Remove.
3325 * typeck.c (strip_array_types): Likewise.
3327 2000-11-07 Eric Christopher <echristo@redhat.com>
3329 * decl.c (init_decl_processing): Change definition of
3330 __wchar_t to wchar_t. Remove artificial declaration of
3332 * lex.c: Change instances of __wchar_t to wchar_t.
3334 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
3336 * lex.c (do_identifier): Don't lookup_name for operators.
3337 * parse.y (operator): Save looking_for_typename.
3338 (unoperator): Restore it.
3339 * spew.c (frob_opname): Use nth_token for lookahead.
3341 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
3343 * decl.c (grok_op_properties): Always use coerce_new_type and
3345 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
3346 exception specification. Tidy up.
3347 (coerce_delete_type): Preserve exception specification. Tidy up.
3349 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
3351 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
3352 (push_binding_level), error.c (cp_tree_printer), pt.c
3353 (process_partial_specialization, tsubst_template_arg_vector),
3354 search.c (lookup_member): Use memset () instead of bzero ().
3356 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
3358 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
3360 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
3362 * Make-lang.in (c++.distdir): Remove.
3364 2000-11-04 Mark Mitchell <mark@codesourcery.com>
3366 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
3367 declarations from different namespaces to be combined.
3369 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
3371 * decl.c: Include tm_p.h.
3373 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
3375 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
3377 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
3379 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
3380 (build_overload_value), repo.c (open_repo_file), xref.c
3381 (open_xref_file): Use strchr () and strrchr () instead of index ()
3384 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
3386 * call.c (build_over_call): Call fold on the CALL_EXPR.
3388 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
3390 * error.c (dump_template_decl): Separate template hearders with
3393 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
3395 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
3396 TS_* flags with corresponding TFF_*. Adjust prototypes of
3397 functions (which used to take a tree_string_flags) to take an int.
3399 * cp-tree.h (enum tree_string_flags): Remove
3400 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
3401 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
3402 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3403 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3404 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
3405 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
3406 (type_as_string, decl_as_string, expr_as_string,
3407 context_as_string): Adjust prototype.
3409 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
3410 instead of TS_PLAIN.
3412 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
3413 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
3416 2000-10-30 Mark Mitchell <mark@codesourcery.com>
3418 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
3419 (linkage_kind): New enumeration.
3420 (decl_linkage): New function.
3421 * decl2.c (comdat_linkage): Extend comment.
3422 * error.c (dump_function_decl): Print the arguments used to
3423 instantiate a template, even when not printing the type of the
3425 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
3426 not TREE_PUBLIC, to test for external linkage.
3427 * tree.c (decl_linkage): New function.
3429 2000-10-28 Mark Mitchell <mark@codesourcery.com>
3431 * pt.c (instantiate_decl): Always instantiate static data members
3432 initialized in-class.
3434 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
3436 * Make-lang.in: Move all build rules here from Makefile.in,
3437 adapt to new context. Wrap all rules that change the current
3438 directory in parentheses. Expunge all references to $(P).
3439 When one command depends on another and they're run all at
3440 once, use && to separate them, not ;. Add OUTPUT_OPTION to
3441 all object-file generation rules. Delete obsolete variables.
3443 * Makefile.in: Delete.
3444 * config-lang.in: Delete outputs= line.
3446 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
3448 * error.c (dump_function_decl): Print no space between
3449 `ptr-operator' the `type-specifier' of the return type.
3450 (dump_type_prefix): Make sure we put space at the appropriate
3453 2000-10-23 Jason Merrill <jason@redhat.com>
3455 * call.c (equal_functions): Also call decls_match for extern "C" fns.
3457 2000-10-22 Jason Merrill <jason@redhat.com>
3459 * call.c (build_conditional_expr): Use ocp_convert to force
3462 2000-10-22 Mark Mitchell <mark@codesourcery.com>
3464 * call.c (standard_conversion): Use RVALUE_CONVs for all
3465 expressions that satisfy lvalue_p, not just those that satisfy
3468 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
3470 * typeck.c (c_sizeof): Return an expression of `size_t' type,
3471 not one with TYPE_IS_SIZETYPE set.
3472 (dubious_conversion_warnings): Remove special-case code.
3474 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
3476 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
3477 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
3478 (dump_type_prefix): Print vector-of-int as 'int vector'.
3479 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
3480 * tree.c (walk_tree): Handle VECTOR_TYPE.
3482 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
3484 2000-10-21 Jason Merrill <jason@redhat.com>
3486 * parse.y (operator): Set got_object from got_scope.
3487 Set looking_for_typename.
3488 * decl.c (lookup_name_real): Clear val after setting from_obj.
3489 Reorganize diagnostic.
3491 2000-10-20 Jason Merrill <jason@redhat.com>
3493 * tree.c (walk_tree): Don't walk into default args.
3495 * error.c (dump_expr): Use host_integerp.
3497 2000-10-20 David Edelsohn <edelsohn@gnu.org>
3499 * typeck2.c (abstract_virtuals_error): Use "because" instead of
3500 "since" in error message.
3502 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3504 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
3506 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
3508 * decl.c (revert_static_member_fn): Fixed typo.
3510 2000-10-19 Mark Mitchell <mark@codesourcery.com>
3512 * class.c (subobject_offset_fn): New type.
3513 (dfs_record_base_offsets): Remove.
3514 (record_base_offsets): Likewise.
3515 (dfs_search_base_offsets): Likewise.
3516 (record_subobject_offset): New function.
3517 (check_subobject_offset): Likewise.
3518 (walk_subobject_offsets): Likewise.
3519 (record_subobject_offsets): Likewise.
3520 (layout_conflict_p): Reimplement.
3521 (layout_nonempty_base_or_field): Correct handling of type
3522 conflicts during layout.
3523 (layout_empty_base): Likewise.
3524 (build_base_field): Adjust to handle new representation of empty
3526 (build_base_fields): Likewise.
3527 (layout_virtual_bases): Likewise.
3528 (splay_tree_compare_integer_csts): New function.
3529 (layout_class_type): Use a splay_tree, rather than a varray, to
3530 represent the offsets of empty bases.
3532 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
3533 * decl.c (select_decl): Don't return declarations that are
3536 2000-10-18 Mark Mitchell <mark@codesourcery.com>
3538 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
3539 (fake_std_node): New macro.
3540 * decl.c (in_std): Rename to ...
3541 (in_fake_std): ... this.
3542 (flag_no_builtin): Remove.
3543 (flag_no_nonansi_builtin): Likewise.
3544 (walk_namespaces_r): Use fake_std_node.
3545 (push_namespace): Use std_identifier.
3546 (pop_namespace): Use in_fake_std.
3547 (lookup_name_real): Use fake_std_node.
3548 (init_decl_processing): When -fhonor-std, create the `std'
3549 namespace. Don't create a dummy fake_std_node in that case.
3550 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
3551 (builtin_function): Put builtins whose names don't begin
3552 with `_' in the std namespace.
3553 * decl2.c (flag_no_builtin): Remove.
3554 (flag_no_nonansi_builtin): Likewise.
3555 (set_decl_namespace): Use fake_std_node.
3556 (validate_nonmember_using_decl): Likewise.
3557 (do_using_directive): Likewise.
3558 (handle_class_head): Likewise.
3559 * dump.c (dequeue_and_dump): Likewise.
3560 * except.c (init_exception_processing): Use std_identifier.
3561 * init.c (build_member_call): Use fake_std_node.
3562 * rtti.c (init_rtti_processing): Use std_identifier.
3564 2000-10-17 Mark Mitchell <mark@codesourcery.com>
3566 * cp-tree.h (back_end_hook): Remove declaration.
3567 * decl2.c (back_end_hook): Remove definition.
3569 * dump.c (dequeue_and_dump): Dump TREE_USED.
3571 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
3573 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
3575 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
3577 * decl.c (WINT_TYPE): Define.
3578 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
3579 c_size_type_node, signed_size_type_node and wint_type_node.
3581 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
3583 * decl2.c (warn_missing_format_attribute): New variable.
3584 (lang_decode_option): Decode -Wmissing-format-attribute.
3586 2000-10-16 Mark Mitchell <mark@codesourcery.com>
3588 * typeck.c (qualify_type): Remove.
3589 (composite_pointer_type): Fix handling of conversions to `cv void*'.
3591 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3593 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
3595 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3597 * Makefile.in (parse.c, parse.h): Create atomically.
3599 2000-10-12 Mark Mitchell <mark@codesourcery.com>
3601 * class.c (current_obstack): Remove.
3602 * decl.c (ggc_p): Remove.
3603 (start_decl): Don't use decl_tree_cons.
3604 (grokdeclarator): Don't use build_decl_list.
3605 (start_function): Don't use decl_tree_cons.
3606 (finish_function): Don't mess with obstacks.
3607 * decl2.c (grok_x_components): Don't use build_decl_list.
3608 * lex.c (make_call_declarator): Don't call decl_tree_cons.
3609 (implicitly_declare_fn): Don't call build_decl_list.
3610 * parse.y (frob_specs): Don't call build_decl_list or
3612 (expr_or_declarator_intern): Don't call decl_tree_cons.
3613 (primary): Don't call build_decl_list.
3614 (fcast_or_absdcl): Likewise.
3615 (typed_declspecs): Don't call decl_tree_cons.
3616 (reserved_declspecs): Don't call build_decl_list.
3617 (declmods): Likewise.
3618 (reserved_typespecquals): Likewise.
3620 (new_type_id): Likewise.
3621 (cv_qualifiers): Likewise.
3622 (after_type_declarator_intern): Likewise.
3623 (notype_declarator_intern): Likewise.
3624 (absdcl_intern): Likewise.
3625 (named_parm): Likewise.
3626 * pt.c (most_specialized_class): Likewise.
3627 * repo.c (temporary_obstack): Make it a structure, not a pointer.
3628 (init_repo): Initialize it.
3629 * search.c (current_obstack): Remove.
3630 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
3632 2000-10-09 Richard Henderson <rth@cygnus.com>
3634 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
3635 (c++ language support bits for libgcc): Remove.
3636 (c++.clean): Remove cplib2.txt cleanup.
3637 * config-lang.in (headers, lib2funcs): Remove.
3639 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
3640 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
3641 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
3642 * inc/new.h, inc/typeinfo: Remove files.
3644 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
3646 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
3648 (init_decl_processing): Initialize intmax_type_node and
3651 2000-10-06 Richard Henderson <rth@cygnus.com>
3653 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
3654 (original_result_rtx): Remove.
3655 * decl.c (save_function_data): Don't clear x_result_rtx.
3656 (mark_lang_function): Don't mark it either.
3657 * expr.c (fixup_result_decl): Remove.
3658 * semantics.c (genrtl_named_return_value): Frob the return decl
3659 before calling emit_local_var.
3660 (genrtl_finish_function): Don't call fixup_result_decl.
3661 Always emit the jump to return_label.
3663 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
3665 * pt.c (lookup_template_class): Set current access for enum.
3666 (tsubst_enum): Set file & line for enum decl.
3668 * spew.c (yylex): Remove unused variable.
3670 2000-10-05 Richard Henderson <rth@cygnus.com>
3672 * semantics.c (genrtl_finish_function): Don't init or check
3673 can_reach_end; remove noreturn and return value checks.
3675 2000-10-05 Tom Tromey <tromey@cygnus.com>
3677 * init.c (build_java_class_ref): Use `build_static_name' with a
3678 suffix, not a prefix, to build the class object's name.
3680 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3682 * cp-tree.h (access_kind): Fix comment typo.
3683 * decl2.c (grokfield): Fix diagnostic typo.
3684 * semantics.c (finish_template_type): Fix comment typo.
3685 (finish_qualified_object_call_expr): Likewise.
3687 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3689 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
3692 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3694 * spew.c (frob_id): New static function.
3695 (frob_opname): Use it.
3698 2000-10-01 Mark Mitchell <mark@codesourcery.com>
3700 * decl.c (lang_mark_false_label_stack): Remove.
3701 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
3703 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
3705 * gxxint.texi: Use @email for formatting email addresses.
3707 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
3709 * error.c: Remove direct obstack manipulation. Replace with
3710 output_buffer-based formatting. Adjust calls to removed macros.
3711 (obstack_chunk_alloc, obstack_chunk_free): Remove.
3712 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
3713 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
3715 2000-09-24 Mark Mitchell <mark@codesourcery.com>
3717 * ir.texi: Move to ../c-tree.texi.
3719 2000-09-20 Jason Merrill <jason@redhat.com>
3721 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
3723 2000-09-21 Andreas Jaeger <aj@suse.de>
3725 * errfn.c: Move declaration of cp_printer and cp_printers to ...
3726 * cp-tree.h: ... here.
3728 * error.c: Remove declaration of cp_printer.
3730 2000-09-20 Mark Mitchell <mark@codesourcery.com>
3732 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
3734 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
3736 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
3739 2000-09-18 Mark Mitchell <mark@codesourcery.com>
3741 * decl.c (start_function): Robustify.
3743 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3745 * cp-tree.h (check_function_format): Accept a `status' parameter.
3747 * call.c, typeck.c: Updates calls to `check_function_format'.
3749 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
3751 * decl2.c (handle_class_head): Always push some scope even
3754 2000-09-16 Mark Mitchell <mark@codesourcery.com>
3756 * cp-tree.h (struct cp_language_function): Remove
3757 x_scope_stmt_stack and name_declared.
3758 (current_scope_stmt_stack): Remove.
3759 (function_name_declared_p): New macro.
3760 (struct lang_decl_flags): Use c_lang_decl as a base class.
3762 (struct lang_decl): Replace saved_tree with context.
3763 (DECL_FRIEND_CONTEXT): Adjust accordingly.
3764 (SET_DECL_FRIEND_CONTEXT): Likewise.
3765 (DECL_VIRTUAL_CONTEXT): Likewise.
3766 (DECL_SAVED_TREE): Remove.
3767 (C_DECLARED_LABEL_FLAG): Likewise.
3768 (cplus_expand_expr_stmt): Don't declare.
3769 (add_decl_stmt): Likewise.
3770 (add_scope_stmt): Likewise.
3771 * decl.c (mark_stmt_tree): Remove.
3772 (case_compare): Likewise.
3773 (finish_case_label): Use c_add_case_label.
3774 (init_decl_processing): Set more language-specific hooks.
3775 (build_enumerator): Fix typo in comment.
3776 (cplus_expand_expr_stmt): Remove.
3777 (mark_lang_function): Use mark_c_language_function.
3778 (lang_mark_tree): Use c_mark_lang_decl.
3779 * decl2.c: Change order of inclusion.
3780 * except.c: Likewise.
3781 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
3782 back on c_expand_expr.
3783 * friend.c: Include expr.h.
3784 * init.c: Change order of inclusion.
3785 * Makefile.in: Update dependencies.
3786 * lex.h (free_lang_decl_chain): Remove.
3787 * optimize.c (maybe_clone_body): Use function_name_declared_p.
3788 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
3790 (instantiate_decl): Use function_name_declared_p.
3791 * semantics.c (lang_expand_expr_stmt): Remove.
3792 (set_current_function_name_declared): Likewise.
3793 (current_function_name_declared): Likewise.
3794 (begin_compound_stmt): Use function_name_declared_p.
3795 (add_decl_stmt): Remove.
3796 (setup_vtbl_ptr): Use function_name_declared_p.
3797 (add_scope_stmt): Remove.
3798 (current_scope_stmt_stack): New function.
3799 (cp_expand_stmt): Don't handle SCOPE_STMTs.
3800 (expand_body): Use function_name_declared_p.
3801 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
3802 * typeck.c: Change order of includes.
3803 (convert_sequence): Remove.
3805 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
3807 * lex.c (reswords): Add _Complex.
3809 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3811 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
3813 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
3815 * init.c (begin_init_stmts): Don't use // comments.
3817 2000-09-12 Jason Merrill <jason@redhat.com>
3819 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
3820 all non-extern arrays.
3822 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
3823 typenames, too. Downgrade complaint to pedwarn.
3824 (xref_tag): Warn about surprising behavior of 'friend struct T'.
3825 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
3826 'class This::Inherited'.
3828 2000-09-12 Mark Mitchell <mark@codesourcery.com>
3830 * decl.c (finish_case_label): Given the LABEL_DECL a
3833 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
3835 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
3836 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
3837 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3838 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3839 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
3841 (sorry_for_unsupported_tree, print_scope_operator,
3842 print_left_paren, print_right_paren, print_left_bracket,
3843 print_right_bracket, print_whitespace): Likewise.
3844 (aggr_variety): Rename to class_key_or_enum.
3845 (print_type): Rename to print_type_id.
3846 (print_type_specifier_seq, print_simple_type_specifier,
3847 print_elaborated_type_specifier,
3848 print_rest_of_abstract_declarator,
3849 print_parameter_declaration_clause, print_exception_specification,
3850 print_nested_name_specifier, print_template_id,
3851 typedef_original_name, print_template_argument_list_start,
3852 print_template_argument_list_end): New functions.
3854 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
3856 * ir.texi: Add more documentation.
3858 2000-09-11 Mark Mitchell <mark@codesourcery.com>
3860 * cp-tree.h (struct saved_scope): Remove x_function_parms.
3861 (current_function_parms): Don't define.
3862 (struct cp_language_function): Remove parms_stored.
3863 (current_function_just_assigned_this): Don't define.
3864 (current_function_parms_stored): Likewise.
3865 (static_ctors): Declare.
3866 (static_dtors): Likewise.
3867 (SF_EXPAND): Don't define.
3868 (expand_start_early_try_stmts): Remove declaration.
3869 (store_parm_decls): Likewise.
3870 * decl.c (static_ctors): Don't declare.
3871 (static_dtors): Likewise.
3872 (struct binding_level): Remove this_block.
3873 (poplevel): Remove dead code.
3874 (set_block): Likewise.
3875 (mark_binding_level): Don't mark this_block.
3876 (mark_saved_scope): Don't mark x_function_parms.
3877 (init_decl_processing): Don't add current_function_parms as a GC
3879 (check_function_type): Change prototype.
3880 (start_function): Remove RTL-generation code.
3881 (expand_start_early_try_stmts): Remove.
3882 (store_parm_decls): Give it internal linkage. Remove
3883 RTL-generation code.
3884 (finish_function): Remove RTL-generation code.
3885 * decl2.c (static_ctors): Fix formatting.
3886 (static_dtors): Likewise.
3887 * method.c (use_thunk): Don't call store_parm_decls.
3888 (synthesize_method): Likewise.
3889 * optimize.c (maybe_clone_body): Likewise.
3890 * parse.y (fn.def2): Likewise.
3891 (.set_base_init): Likewise.
3892 (nodecls): Likewise.
3893 * pt.c (instantiate_decl): Likewise.
3894 * rtti.c (synthesize_tinfo_fn): Likewise.
3895 * semantics.c (genrtl_try_block): Simplify.
3896 (expand_body): Use genrtl_start_function and
3897 genrtl_finish_function.
3898 (genrtl_start_function): New function.
3899 (genrtl_finish_function): Likewise.
3901 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
3903 * error.c (cp_tree_printer, case 'P'): Append break.
3905 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
3907 * cp-tree.h (frob_opname): Declare.
3908 * parse.y (saved_scopes): New static variable.
3909 (cp_parse_init): Adjust.
3910 (do_id): If lastiddecl is NULL, do do_identifier.
3911 (operator): Save scope information.
3912 (unoperator): New reduction. Restore scope information.
3913 (operator_name): Append unoperator. Call frob_opname.
3914 * spew.c (frob_opname): Define.
3916 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
3918 * decl.c, rtti.c: Include defaults.h if not already included.
3919 Don't define the *_TYPE_SIZE macros.
3921 2000-09-09 Mark Mitchell <mark@codesourcery.com>
3923 * cp-tree.h (push_switch): Change prototype.
3924 (check_cp_case_value): Remove declaration.
3925 (decl_constant_value): Likewise.
3926 * decl.c (struct cp_switch): Add switch_stmt and cases.
3927 (case_compare): New function.
3928 (push_switch): Set switch_stmt. Initialize cases.
3929 (pop_switch): Clean up cases.
3930 (define_case_label): Rename to ...
3931 (finish_case_label): ... this. Do semantic analysis for case
3933 (start_function): Correct comment.
3934 * decl2.c (check_cp_case_value): Remove.
3935 * expr.c (do_case): Remove.
3936 * pt.c (tsubst_expr): Adjust call to finish_case_label.
3937 * semantics.c (genrtl_do_poplevel): Remove declaration.
3938 (RECHAIN_STMTS): Remove.
3939 (finish_break_stmt): Use build_break_stmt.
3940 (finish_continue_stmt): Use build_continue_stmt.
3941 (finish_switch_cond): Adjust condition here, rater than in
3942 c_expand_start_case.
3943 (finish_case_label): Remove.
3944 * typeck.c (c_expand_return): Remove.
3945 (c_expand_start_case): Likewise.
3947 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
3949 * ir.texi: Document type nodes.
3951 2000-09-06 Mark Mitchell <mark@codesourcery.com>
3953 * cp-tree.h (init_cp_semantics): Declare.
3954 (genrtl_try_block): Don't declare.
3955 (genrtl_handler): Likewise.
3956 (genrtl_catch_block): Likewise.
3957 (genrtl_ctor_stmt): Likewise.
3958 (genrtl_subobject): Likewise.
3959 (genrtl_do_poplevel): Likewise.
3960 (genrtl_named_return_value): Likewise.
3961 * lex.c (init_parse): Call init_cp_semantics.
3962 * semantics.c (genrtl_try_block): Give it internal linkage.
3963 (genrtl_handler): Likewise.
3964 (genrtl_catch_block): Likewise.
3965 (genrtl_ctor_stmt): Likewise.
3966 (genrtl_subobject): Likewise.
3967 (genrtl_do_poplevel): Likewise.
3968 (genrtl_named_return_value): Likewise.
3969 (lang_expand_stmt): Rename to ...
3970 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
3971 (init_cp_semantics): Define.
3973 * decl.c (initialize_local_var): Remove RTL-generating code.
3974 * semantics.c (genrtl_try_block): Fix formatting.
3976 Move statement-tree facilities from C++ to C front-end.
3977 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
3978 (void_zero_node): Remove.
3979 (stmt_tree): Likewise.
3980 (scope_chain): Adjust.
3981 (language_function): Rename to cp_language_function.
3982 (cp_function_chain): Adjust.
3983 (current_stmt_tree): Remove.
3984 (last_tree): Likewise.
3985 (last_expr_type): Likewise.
3986 (struct lang_decl): Adjust.
3987 (STMT_IS_FULL_EXPR_P): Remove.
3989 (begin_stmt_tree): Likewise.
3990 (finish_stmt_tree): Likewise.
3991 (walk_tree_fn): Likewise.
3992 (walk_stmt_tree): Likewise.
3993 * class.c (finish_struct): Replace use of add_tree with add_stmt.
3994 * decl.c (mark_stmt_tree): Adjust type.
3995 (init_decl_processing): Don't build void_zero_node.
3996 (initialize_local_var): Adjust usage of current_stmt_tree.
3997 (finish_enum): Use add_stmt, not add_tree.
3998 (save_function_data): Adjust use of language_function.
3999 (finish_constructor_body): Use add_stmt, not add_tree.
4000 (finish_destructor_body): Likewise.
4001 (push_cp_function_context): Adjust use of language_function.
4002 (pop_cp_function_context): Likewise.
4003 (mark_lang_function): Likewise.
4004 (mark_cp_function_context): Likewise.
4005 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
4006 (build_vec_init): Likewise.
4007 * semantics.c (SET_LAST_STMT): Remove.
4008 (RECHAIN_STMTS): Don't use it.
4009 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
4010 (current_stmt_tree): Define.
4012 (finish_goto_stmt): Use add_stmt, not add_tree.
4013 (finish_expr_stmt): Likewise.
4014 (begin_if_stmt): Likewise.
4015 (finish_then_clause): Likewise.
4016 (begin_while_stmt): Likewise.
4017 (begin_do_stmt): Likewise.
4018 (finish_return_stmt): Likewise.
4019 (begin_for_stmt): Likewise.
4020 (finish_break_stmt): Likewise.
4021 (finish_continue_stmt): Likewise.
4022 (begin_switch_stmt): Likewise.
4023 (finish_case_label): Likewise.
4024 (begin_try_block): Likewise.
4025 (begin_function_try_block): Likewise.
4026 (begin_handler): Likewise.
4027 (begin_catch_block): Likewise.
4028 (begin_compound_stmt): Likewise.
4029 (begin_asm_stmt): Likewise.
4030 (finish_asm_stmt): Likewise.
4031 (finish_label_stmt): Likewise.
4032 (add_decl_stmt): Likewise.
4033 (finish_subobject): Likewise.
4034 (finish_decl_cleanup): Likewise.
4035 (finish_named_return_value): Likewise.
4036 (setup_vtbl_ptr): Likewise.
4037 (add_scope_stmt): Likewise.
4038 (finish_stmt_expr): Likewise.
4039 (prune_unused_decls): Remove.
4040 (begin_stmt_tree): Likewise.
4041 (finish_stmt_tree): Likewise.
4042 (prep_stmt): Adjust use of current_stmt_tree.
4043 (lang_expand_stmt): Likewise.
4044 * tree.c (statement_code_p): Remove.
4045 (cp_statement_code_p): New function.
4046 (walk_stmt_tree): Remove.
4047 (init_tree): Set lang_statement_code_p.
4049 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
4051 Integrated preprocessor.
4053 * Make-lang.in, Makefile.in: Remove all references to input.c,
4054 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
4055 * gxx.gperf, hash.h, input.c: Delete.
4056 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
4057 initialized properly.
4059 * class.c (fixup_pending_inline): Take a tree, not a
4060 struct pending_inline *. All callers changed.
4061 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
4062 RID_PROTECTED entries in ridpointers[] array here.
4063 * decl.c (duplicate_decls): Do not refer to struct
4065 (record_builtin_type, init_decl_processing): Use RID_MAX not
4067 (grokdeclarator): Use C_IS_RESERVED_WORD.
4068 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
4070 (grok_x_components): Do not inspect pending_inlines chain.
4072 * cp-tree.h (struct lang_identifier): Add rid_code entry.
4073 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
4074 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
4075 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
4076 TIME_IDENTIFIER_FILEINFO): Kill.
4078 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
4080 * parse.y: Call do_pending_inlines unconditionally.
4081 reinit_parse_for_method is now snarf_method. fn.defpen is no
4082 longer necessary. Remove unnecessary <itype> annotation on
4083 SCOPE. Do not refer to end_of_file or struct pending_inline.
4084 * semantics.c (begin_inline_definitions): Call
4085 do_pending_inlines unconditionally.
4087 * lex.c: Remove all code now shared with C front end.
4088 Initialize cpplib properly if USE_CPPLIB. Put reserved words
4089 into the get_identifier table. Rewrite pragma handling to
4090 work with the registry. Move code to save tokens for later
4091 processing to spew.c.
4093 * spew.c: Rewrite everything in terms of token streams instead
4094 of text. Move routines here from lex.c / input.c as
4095 appropriate. GC-mark trees hanging off the pending inlines
4098 2000-09-06 Mark Mitchell <mark@codesourcery.com>
4100 * NEWS: Mention that the named return value extension has been
4102 * cp-tree.h (original_result_rtx): Define.
4103 (TREE_REFERENCE_EXPR): Remove.
4104 (DECL_VPARENT): Likewise.
4105 (pushdecl_nonclass_level): Likewise.
4106 (store_return_init): Likewise.
4107 (reinit_lang_specific): Likewise.
4108 (genrtl_named_return_value): Change prototype.
4109 * decl.c (original_result_rtx): Remove.
4110 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
4111 Do not generate RTL for local variables here.
4112 (store_return_init): Remove.
4113 * semantics.c (genrtl_named_return_value): Simplify. Fold in
4115 (finish_named_return_value): Adjust accordingly. Warn that this
4116 extension is deprecated.
4117 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
4119 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4121 * pt.c (type_unification_real): Replace switch with if.
4122 (unify): Tsubst non-type parms before comparing.
4124 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4126 * error.c (dump_typename): New function, broken out of ...
4127 (dump_type): ... here. Use it.
4128 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
4130 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4132 * init.c (build_offset_ref): Deal with namespace scoped
4135 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4137 * class.c (resolve_address_of_overloaded_function): Add
4138 explanation message.
4139 * decl.c (define_case_label): Reformat explanation.
4140 * decl2.c (finish_static_data_member_decl): Likewise.
4141 (grokfield): Likewise.
4142 * friend.c (do_friend): Likewise.
4144 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
4146 * tree.c (walk_tree): Expose tail recursion.
4147 (walk_stmt_tree): New function.
4148 * cp-tree.h: Prototype walk_stmt_tree.
4149 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
4150 the BLOCKs directly. If a BLOCK has no variables after
4151 pruning, discard it.
4152 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
4153 restore the line number.
4155 2000-09-05 Mark Mitchell <mark@codesourcery.com>
4157 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
4158 (pt.o): Remove dependency on HTAB_H.
4159 * cp-tree.h: Include hashtab.h.
4160 (walk_tree): Change prototype.
4161 (walk_tree_without_duplicates): New function.
4162 * decl.c (check_default_argument): Use it.
4163 * optimize.c (remap_decl): Adjust calls to walk_tree.
4164 (copy_body): Likewise.
4165 (expand_calls_inline): Likewise.
4166 (calls_setjmp_p): Use walk_tree_without_duplicates.
4167 * pt.c: Don't include hashtab.h.
4168 (for_each_template_parm): Use walk_tree_without_duplicates.
4169 * semantics.c (finish-stmt_tree): Likewise.
4170 (expand_body): Likewise.
4171 * tree.c (walk_tree): Add additional parameter.
4172 (walk_tree_without_duplicates): New function.
4173 (count_trees): Use it.
4174 (verify_stmt_tree): Adjust call to walk_tree.
4175 (find_tree): Use walk_tree_without_duplicates.
4176 (no_linkage_check): Likewise.
4177 (break_out_target_exprs): Adjust call to walk_tree.
4178 (cp_unsave): Likewise.
4180 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4182 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
4183 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
4184 * cp-tree.h (TYPE_BINFO): Adjust comment.
4185 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
4186 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
4187 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4188 (TYPE_TEMPLATE_INFO): Likewise.
4189 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
4190 * class.c (push_nested_class): Likewise.
4191 * decl.c (lookup_name_real): Likewise.
4192 (grokdeclarator): Likewise.
4193 (grok_op_properties): Likewise.
4194 (xref_tag): Likewise.
4195 (xref_basetypes): Likewise.
4196 * decl2.c (constructor_name_full): Likewise.
4197 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
4198 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4199 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
4200 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4201 (dump_type_suffix): Likewise.
4202 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
4204 (get_aggr_from_typedef): Likewise.
4205 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
4206 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4207 (write_template_parm): Likewise.
4208 (write_template_template_parm): Check tree code instead of
4209 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4210 * method.c (build_overload_nested_name): Add
4211 BOUND_TEMPLATE_TEMPLATE_PARM.
4212 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
4213 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4214 * pt.c (convert_template_argument): Check tree code instead of
4215 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4216 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
4217 (for_each_template_parm): Adjust comment.
4218 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
4219 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4220 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
4221 template_args_equal to compare template template parameter cases.
4222 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4223 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
4225 * tree.c (copy_template_template_parm): Decide whether to create
4226 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
4227 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4228 (copy_tree_r): Likewise.
4229 * typeck.c (comptypes): Likewise. Check tree code instead of
4230 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4232 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
4234 * decl.c (finish_function): Move the code for handling functions
4235 marked with the constructor and destructor attributes inside the
4238 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4240 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
4242 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4244 * pt.c (lookup_template_class): Remove abort.
4245 * tree.c (get_type_decl): Allow error_mark_node.
4247 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4249 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
4252 2000-09-03 Mark Mitchell <mark@codesourcery.com>
4254 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
4257 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
4259 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
4260 union tag mismatch error reporting.
4262 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
4264 * call.c (build_scoped_method_call): Check it is not a namespace.
4266 2000-08-30 Jason Merrill <jason@redhat.com>
4268 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
4270 * tree.c (bot_manip): Check TREE_CONSTANT rather than
4271 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
4272 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
4274 * decl.c (start_function): Always call make_function_rtl.
4276 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
4278 * semantics.c (prune_unused_decls): New function.
4279 (finish_stmt_tree): Call it via walk_tree.
4281 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
4283 * class.c (build_secondary_vtable): Constify a char *.
4284 * decl.c (init_decl_processing): Initialize function_id_node,
4285 pretty_function_id_node, and func_id_node.
4286 * input.c (struct input_source): Constify 'str'.
4287 (feed_input): Constify first argument.
4288 * mangle.c (write_identifier): Constify argument.
4289 * pt.c (mangle_class_name_for_template): Constify argument.
4291 2000-08-29 Mark Mitchell <mark@codesourcery.com>
4293 * typeck.c (mark_addressable): Remove code that pokes around in
4296 2000-08-28 Jason Merrill <jason@redhat.com>
4298 * lex.c (file_name_nondirectory): Move to toplev.c.
4300 * cp-tree.h (LOCAL_CLASS_P): New macro.
4301 * class.c (finish_struct_1): Use it.
4303 2000-08-27 Alex Samuel <samuel@codesourcery.com>
4305 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
4306 (write_encoding): Pass another argument to write_name.
4307 (write_name): Add ignore_local_scope parameter. Fix handling of
4309 (write_nested_name): Use write_unqualified_name.
4310 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
4311 (write_template_prefix): Use write_unqualified_name.
4312 (write_component): Remove.
4313 (write_local_name): Add parameter. Use direct local entity to
4314 discriminator calculation.
4315 (write_class_enum_type): Pass another argument to write_name.
4316 (write_template_template_arg): Likewise.
4317 (make_guard_variable): Likewise.
4319 2000-08-27 Jason Merrill <jason@redhat.com>
4321 * decl.c (pushdecl): Matching decls for local externs are found in
4322 the current level. Propagate linkage information from previous
4325 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
4327 * ir.texi (Expressions): Fix typo.
4329 2000-08-25 Greg McGary <greg@mcgary.org>
4331 * tree.c (init_tree): Use ARRAY_SIZE.
4333 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
4335 * error.c (cp_tree_printer): Rework.
4337 2000-08-25 Mark Mitchell <mark@codesourcery.com>
4339 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
4341 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
4342 (cp-demangle.o): Remove target.
4343 (dyn-string.o): Likewise.
4345 * decl.c (grokfndecl): Require that `main' return an `int'.
4346 * mangle.c (write_encoding): Don't mangle return types for
4347 conversion functions.
4349 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
4351 * error.c (tree_formatting_info): New data type.
4352 (tree_being_formatted): New macro.
4353 (tree_formatting_flags): Likewise.
4354 (put_whitespace): Likewise.
4355 (print_tree_identifier): Likewise.
4356 (print_identifier): Likewise.
4357 (cp_tree_printer, print_function_argument_list, print_declaration,
4358 print_expression, print_function_declaration,
4359 print_function_parameter, print_type, print_cv_qualifier): New
4361 (init_error): Initialize lang_printer.
4363 2000-08-24 Jason Merrill <jason@redhat.com>
4365 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
4366 adjustment necessary.
4368 2000-08-24 Greg McGary <greg@mcgary.org>
4370 * cp-tree.h (MAIN_NAME_P): Remove macro.
4372 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
4374 * error.c (print_instantiation_context): Don't forget to flush the
4377 2000-08-23 Jason Merrill <jason@redhat.com>
4379 * typeck.c (build_ptrmemfunc): Save the input pmf.
4381 * method.c (process_modifiers): Use same_type_p.
4383 2000-08-23 Mark Mitchell <mark@codesourcery.com>
4385 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
4386 * mangle.c (write_function_type): Change prototype.
4387 (write_encoding): Don't mangle return types for
4388 constructors or destructors.
4389 (write_type): Adjust call to write_function_type.
4390 * pt.c (instantiate_template): Instantiate alternate entry points
4391 when instantiating the main function.
4393 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
4395 * error.c (cp_print_error_function): Don't use embedded '\n' in
4398 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
4400 * decl.c (init_decl_processing): Remove bogus initialization.
4401 * error.c (lang_print_error_function): Restore here.
4402 (init_error): Initialize print_error_function.
4404 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4406 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
4408 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
4410 * Makefile.in (error.o): Depends on diagnostic.h
4412 * cp-tree.h (problematic_instantiation_changed,
4413 record_last_problematic_instantiation, current_instantiation,
4414 print_instantiation_context): Declare.
4415 (maybe_print_template_context): Remove.
4417 * decl.c (init_decl_processing): Set print_error_function to NULL.
4418 (lang_print_error_function): Remove, since we're using a new
4421 * error.c: #include diagnostic.h
4422 (function_category): New function.
4423 (cp_diagnostic_starter): Likewise.
4424 (cp_diagnostic_finalizer): Likewise.
4425 (cp_print_error_function): Likewise.
4426 (maybe_print_instantiation_context): Likewise.
4427 (print_instantiation_full_context): Likewise.
4428 (print_instantiation_partial_context): Likewise.
4429 (print_instantiation_context): Define.
4430 (init_error): Initialize diagnostic pager and finalizer.
4432 * pt.c (problematic_instantiation_changed): Define.
4433 (record_last_problematic_instantiation): Likewise.
4434 (current_instantiation): Likewise.
4435 (maybe_print_template_context): Remove.
4436 (print_template_context): Likewise.
4437 (current_tinst_level): Make static to reflect Brendan Kehoe's
4438 change of 1995-04-13.
4439 (push_tinst_level): Call print_instantiation_context.
4441 2000-08-21 Nix <nix@esperi.demon.co.uk>
4443 * lang-specs.h: Do not process -o or run the assembler if
4446 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
4448 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
4450 * decl2.c (lang_decode_option): Disable gettext attributes for
4453 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
4455 * lex.c (lang_init_options): Default diagnostic message maximum
4456 length to 80, when line-wrapping.
4458 2000-08-20 Mark Mitchell <mark@codesourcery.com>
4460 * class.c (build_vtbl_initializer): Clear the entire
4461 vtbl_init_data. Start keeping track of the functions for which we
4462 have created vcall offsets here.
4463 (dfs_build_vcall_offset_vtbl_entries): Remove.
4464 (build_vcall_offset_vtbl_entries): Reimplement.
4465 (add_vcall_offset_vtbl_entries_r): New function.
4466 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
4467 computing when vcall offsets are necessary.
4469 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4471 * decl.c (member_function_or_else): Use cp_error ... %T.
4472 (grokdeclarator): Likewise.
4473 (start_method): Likewise.
4474 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
4476 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4478 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
4481 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4483 * cp-tree.h (PTRMEM_OK_P): New macro.
4484 (itf_ptrmem_ok): New enumeration value.
4485 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
4486 argument. Diagnose implicit pointer to member.
4487 (instantiate_type): Don't diagnose implicit pointer to member
4488 here. Pass itf_ptrmem_ok if ok. Adjust calls to
4489 resolve_address_of_overloaded_function.
4490 * init.c (build_offset_ref): Set PTRMEM_OK_P.
4491 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
4492 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
4493 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
4494 (build_unary_op): Deal with single non-static member in
4497 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4499 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
4501 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4503 * cp-tree.h (enum_name_string): Remove prototype.
4504 (report_case_error): Remove prototype.
4505 * cp/typeck2.c (enum_name_string): Remove.
4506 (report_case_error): Remove.
4507 * error.c (dump_expr): Deal with enum values directly.
4508 Correctly negate integer constant.
4510 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4512 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
4513 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
4514 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
4515 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
4516 (__cxa_vec_new): Use __cxa_vec_new2.
4517 (__cxa_vec_delete): Use __cxa_vec_delete2.
4519 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4521 * vec.cc (__cxa_vec_new): Set "C" linkage.
4522 (__cxa_vec_ctor): Likewise.
4523 (__cxa_vec_cctor): Likewise.
4524 (__cxa_vec_dtor): Likewise.
4525 (__cxa_vec_delete): Likewise.
4526 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
4527 (__cxa_vec_ctor): Likewise.
4528 (__cxa_vec_cctor): Likewise.
4529 (__cxa_vec_dtor): Likewise.
4530 (__cxa_vec_delete): Likewise.
4532 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4534 * class.c (instantiate_type): Reinstate local variable
4535 deleted in previous change.
4537 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
4540 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4542 * cp-tree.h (instantiate_type_flags): New enumeration.
4543 (instantiate_type): Change parameter.
4544 * class.c (instantiate_type): Adjust prototype. Adjust.
4545 * call.c (standard_conversion): Adjust instantiate_type call.
4546 (reference_binding): Likewise.
4547 (build_op_delete_call): Likewise.
4548 (convert_like_real): Likewise.
4549 * cvt.c (cp_convert_to_pointer): Likewise.
4550 (convert_to_reference): Likewise.
4551 * pt.c (convert_nontype_argument): Likewise.
4552 * typeck.c (build_binary_op): Likewise.
4553 (build_ptrmemfunc): Likewise.
4554 (convert_for_assignment): Likewise.
4556 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4558 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
4559 (current_aggr): Define.
4560 * decl.c (grokdeclarator): Make sure a friend class is an
4561 elaborated type specifier.
4562 * parse.y (current_aggr): Remove static definition.
4563 (cp_parse_init): Adjust.
4564 (structsp): Clear and restore current_aggr.
4565 (component_decl_list): Clear current_aggr.
4567 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
4568 aggregate tag on the typename's context.
4570 * pt.c (tsubst_friend_class): Return error_mark_node, if
4572 (instantiate_class_template): Ignore error_mark_node friend types.
4574 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
4576 * cvt.c (warn_ref_binding): New static function, broken out of ...
4577 (convert_to_reference): ... here. Use it.
4579 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4581 * parse.y (template_arg): Add rule for template qualified with
4584 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4586 * decl2.c (add_function): Reorganize.
4587 (arg_assoc): Do not consider function template decls.
4589 2000-08-11 Jason Merrill <jason@redhat.com>
4591 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
4594 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4596 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
4597 (lookup_nested_tag): Likewise.
4599 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
4602 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4604 * parse.y (named_complex_class_head_sans_basetype): Remove
4607 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4609 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
4610 explicit TEMPLATE_ID_EXPR args.
4611 (build_expr_from_tree, case CALL_EXPR): Likewise.
4613 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4615 * decl.c (check_tag_decl): Diagnose typename's which don't
4618 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
4620 * init.c (build_aggr_init): Reject bogus array initializers
4623 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
4625 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
4627 * cp/tinfo.cc (__dynamic_cast): Likewise.
4628 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
4630 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
4632 * cvt.c (convert_to_pointer_force): Fix error message when
4633 attempting to cast from ambiguous base.
4635 2000-08-08 Jason Merrill <jason@redhat.com>
4637 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
4638 (tsubst_template_arg_vector): Likewise.
4640 * decl2.c (build_anon_union_vars): Choose the largest field; don't
4641 assume that one will be as large as the union.
4643 2000-08-07 Kazu Hirata <kazu@hxi.com>
4645 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
4646 * decl.c (pop_labels): Likewise.
4648 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
4650 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
4652 (__pointer_to_member_type_info): Likewise.
4653 (__base_class_info): Likewise.
4654 (__class_type_info): Likewise.
4655 (__si_class_type_info): Likewise.
4656 (__vmi_class_type_info): Likewise.
4657 * tinfo.cc (__si_class_type_info::__do_find_public_src):
4658 Changed member names to match specifications.
4659 (__vmi_class_type_info::__do_find_public_src): Likewise.
4660 (__si_class_type_info::__do_dyncast): Likewise.
4661 (__vmi_class_type_info::__do_dyncast): Likewise.
4662 (__si_class_type_info::__do_upcast): Likewise.
4663 (__vmi_class_type_info::__do_upcast): Likewise.
4664 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
4665 (__pbase_type_info::__pointer_catch): Likewise.
4666 (__pointer_type_info::__pointer_catch): Likewise.
4667 (__pointer_to_member_type_info::__pointer_catch): Likewise.
4669 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
4671 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
4672 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
4673 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
4675 2000-08-04 Mark Mitchell <mark@codesourcery.com>
4677 * cp-tree.h (add_method): Change prototype.
4678 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
4679 Don't double the size of the method vector in the error case.
4680 (handle_using_decl): Adjust call to add_method.
4681 (add_implicitly_declared_members): Likewise.
4682 (clone_function_decl): Likewise.
4683 * decl2.c (check_classfn): Likewise.
4684 * semantics.c (finish_member_declaration): Likewise.
4686 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
4688 * decl.c (flag_isoc94): New variable.
4690 2000-08-02 Jason Merrill <jason@redhat.com>
4692 * pt.c (do_type_instantiation): Add complain parm; don't complain
4693 if called recursively.
4694 * cp-tree.h, parse.y: Adjust.
4696 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
4698 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
4699 -Wno-strict-prototypes.
4701 * g++spec.c: Adjust type of second argument to
4702 lang_specific_driver, and update code as necessary.
4704 * cp-tree.h: Don't prototype min_precision here.
4705 (my_friendly_assert): Cast expression to void.
4706 * semantics.c (do_poplevel): Initialize scope_stmts.
4708 2000-08-02 Mark Mitchell <mark@codesourcery.com>
4710 * cp-tree.h (DECL_NEEDED_P): Tweak.
4712 2000-07-28 Jason Merrill <jason@redhat.com>
4714 * lang-specs.h: Use %i in rule for .ii files.
4716 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
4718 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
4720 2000-07-30 Mark Mitchell <mark@codesourcery.com>
4722 Allow indirect primary bases.
4723 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
4725 (CLASSTYPE_VFIELD_PARENT): Remove.
4726 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
4727 (BINFO_PRIMARY_BINFO): Remove.
4728 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
4729 (BINFO_VBASE_PRIMARY_P): Likewise.
4730 (BINFO_PRIMARY_BASE_OF): New macro.
4731 (BINFO_INDIRECT_PRIMARY_P): Likewise.
4732 (get_primary_binfo): New function.
4733 * decl.c (lang_mark_tree): Make lang_type::primary_base.
4734 * class.c (vcall_offset_data_s): Rename to ...
4735 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
4736 and add ctor_vtbl_p.
4737 (get_derived_offset): Use get_primary_binfo.
4738 (dfs_mark_primary_bases): Adjust handling of virtual primary
4740 (mark_primary_bases): Likewise.
4741 (set_primary_base): Take a binfo, not an integer, as a
4742 representation of the primary base.
4743 (indirect_primary_base_p): Remove.
4744 (determine_primary_base): Adjust for indirect primary bases.
4745 (dfs_find_final_overrider): Fix typo in coment.
4746 (update_vtable_entry_for_fn): Use get_primary_binfo.
4747 (layout_nonempty_base_or_field): Tweak.
4748 (build_base_fields): Adjust for new primary base semantics.
4749 (dfs_propagate_binfo_offsets): Remove.
4750 (propagate_binfo_offsets): Rewrite.
4751 (dfs_set_offset_for_shared_vbases): Remove.
4752 (layout_virtual_bases): Don't use it.
4753 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
4755 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
4756 CLASSTYPE_VFIELD_PARENT.
4757 (dfs_get_primary_binfo): New function.
4758 (get_primary_binfo): Likewise.
4759 (dump_class_hierarchy_r): Tweak printing of primary bases.
4760 (build_vtbl_initializer): Fix typo in comments. Use
4762 (build_vcall_and_vbase_vtbl_entries): Likewise.
4763 (build_vbaes_offset_vtbl_entries): Likewise.
4764 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
4765 BV_VCALL_INDEX to handle indirect primary bases.
4766 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
4767 (build_rtti_vtbl_entries): Likewise.
4768 * search.c (get_shared_vbase_if_not_primary): Tweak.
4769 (find_vbase_instance): Likewise.
4770 (binfo_for_vtable): Simplify.
4771 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
4772 (make_binfo): Make it have 11 entries.
4774 2000-07-30 Alex Samuel <samuel@codesourcery.com>
4776 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
4777 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
4778 ascertaining primaryness.
4779 (G): Remove template_args.
4780 (decl_is_template_id): New function.
4781 (write_encoding): Use decl_is_template_id.
4782 (write_name): Likewise. Handle type_decls. Get main variant of
4784 (write_nested_name): Likewise.
4785 (write_prefix): Likewise.
4786 (write_template_prefix): Likewise.
4787 (write_special_name_constructor): Remove defunct production from
4789 (write_bare_function_type): Remove comment about absent parameter.
4790 (write_template_template_arg): Add missing grammar production to
4793 2000-07-27 Jason Merrill <jason@redhat.com>
4795 * decl.c (duplicate_decls): If common_type produces a non-typedef
4796 type for a typedef, just use the old type.
4798 2000-07-27 Mark Mitchell <mark@codesourcery.com>
4800 * cp-tree.h (function_depth): Declare.
4801 (verify_stmt_tree): Likewise.
4802 (find_tree): Likewise.
4803 * decl.c (function_depth): Give it external linkage.
4804 * optimize.c (optimize_function): Increment and decrement it.
4805 * tree.c (verify_stmt_tree_r): New function.
4806 (verify_stmt_tree): Likewise.
4807 (find_tree_r): Likewise.
4808 (find_tree): Likewise.
4810 2000-07-27 Jason Merrill <jason@redhat.com>
4812 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
4814 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
4816 2000-07-26 Mark Mitchell <mark@codesourcery.com>
4818 * decl.c (start_cleanup_fn): Mark the function as `inline'.
4819 * decl2.c (get_guard): Call cp_finish_decl, not
4820 rest_of_decl_compilation, for local guards.
4821 * lex.c (do_identifier): Remove unused variable.
4823 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
4825 * parse.y: Add missing ';'.
4827 2000-07-26 Mark Mitchell <mark@codesourcery.com>
4829 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
4832 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
4834 Kill strict_prototype. Backwards compatibility only for
4835 non NO_IMPLICIT_EXTERN_C systems.
4836 * cp-tree.h (flag_strict_prototype): Remove.
4837 (strict_prototype): Remove.
4838 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
4839 * decl.c (maybe_push_to_top_level): Adjust.
4840 (pop_from_top_level): Adjust.
4841 (decls_match): Only allow sloppy parm matching for ancient
4843 (init_decl_processing): Adjust.
4844 (grokdeclarator): Adjust.
4845 * decl2.c (flag_strict_prototype): Remove.
4846 (strict_prototype): Remove.
4847 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
4848 (lang_f_options): Remove "strict-prototype".
4849 (unsupported-options): Add "strict-prototype".
4850 * lex.c (do_identifier): Adjust.
4851 (do_scoped_id): Adjust.
4852 * parse.y (empty_parms): Adjust.
4853 * class.c (push_lang_context): Adjust.
4854 (pop_lang_context): Adjust.
4855 * typeck.c (comp_target_parms): Adjust.
4857 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
4859 * decl.c (poplevel): Deal with anonymous variables at for scope.
4860 (maybe_inject_for_scope_var): Likewise.
4862 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
4864 * decl.c: Remove all signal handling code, now done in toplev.c.
4866 2000-07-23 Mark Mitchell <mark@codesourcery.com>
4868 * decl.c (make_rtl_for_nonlocal_decl): Rework.
4870 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
4873 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
4875 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
4876 Define my_friendly_assert and my_friendly_abort as macros
4877 which may call friendly_abort. Prototype friendly abort, not
4878 my_friendly_abort or my_friendly_assert.
4879 * decl.c (signal_catch): Report the signal caught in the error
4880 message. Call fatal directly.
4881 * typeck2.c (ack, my_friendly_assert): Delete.
4882 (my_friendly_abort): Rename to friendly_abort. Expect file,
4883 line, and function parameters. Report the abort code, then
4884 call fancy_abort. Do not mask an abort if errors have
4887 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
4889 * typeck.c (comp_target_parms): Remove obsolete parameter.
4890 (comp_target_types): Adjust.
4892 2000-07-17 Jason Merrill <jason@redhat.com>
4894 * typeck.c (mark_addressable): Never set TREE_USED.
4895 * call.c (build_call): Don't abort on calls to library functions
4896 that have been declared normally.
4898 * typeck.c (build_binary_op): Fix grammar in warning.
4900 * exception.cc (__eh_free): Fix prototype.
4902 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
4904 * decl.c (pushdecl): Handle seeing an OVERLOAD in
4905 IDENTIFIER_NAMESPACE_VALUE.
4907 2000-07-16 Mark Mitchell <mark@codesourcery.com>
4909 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
4910 * method.c (use_thunk): Correct handling of vcall offsets.
4912 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
4914 * .cvsignore: parse.h and parse.c have no cp- prefix.
4916 2000-07-13 Mark Mitchell <mark@codesourcery.com>
4918 * .cvsignore: New file.
4920 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
4922 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
4924 2000-07-12 Mark Mitchell <mark@codesourcery.com>
4926 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
4928 * parse.h: Likewise.
4930 2000-07-11 Mark Mitchell <mark@codesourcery.com>
4932 * class.c (layout_class_type): Add pointers to virtual bases after
4933 base classes under the old ABI.
4935 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
4937 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
4938 (finish_continue_stmt): Likewise.
4939 (begin_for_stmt): Remove call to note_level_for_for.
4940 (finish_goto_stmt): Change call from build_min_nt
4942 (finish_expr_stmt): Likewise.
4943 (begin_if_stmt): Likewise.
4944 (begin_while_stmt): Likewise.
4945 (finish_while_stmt): Likewise.
4946 (finish_return_stmt): Likewise.
4947 (begin_for_stmt): Likewise.
4948 (finish_for_stmt): Likewise.
4949 (finish_break_stmt): Likewise.
4950 (begin_switch_stmt): Likewise.
4951 (finish_case_label): Likewise.
4952 (genrtl_try_block): Likewise.
4953 (begin_try_block): Likewise.
4954 (begin_handler): Likewise.
4955 (begin_compound_stmt): Likewise.
4956 (finish_asm_stmt): Likewise.
4957 (finish_label_stmt): Likewise.
4958 (add_decl_stmt): Likewise.
4959 (finish_subobject): Likewise.
4960 (finish_decl_cleanup): Likewise.
4961 (finish_named_return_value): Likewise.
4962 (setup_vtbl_ptr): Likewise.
4963 (add_scope_stmt): Likewise.
4964 * decl.c (finish_constructor_body): Likewise.
4965 (finish_destructor_body): Likewise.
4966 * optimize.c (copy_body_r): Likewise.
4967 (initialize_inlined_parameters): Likewise.
4968 (declare_return_variable): Likewise.
4969 (expand_call_inline): Likewise.
4971 2000-07-10 Jakub Jelinek <jakub@redhat.com>
4973 * semantics.c (expand_body): Sync interface information
4974 at the end of function body expansion.
4976 2000-07-09 Jason Merrill <jason@redhat.com>
4978 * init.c (build_new_1): Bail early if the call to new fails.
4980 * decl.c (compute_array_index_type): Check specifically for
4981 an INTEGER_CST, not just TREE_CONSTANT.
4983 * decl.c (duplicate_decls): Don't call duplicate_decls on
4984 the DECL_TEMPLATE_RESULT.
4985 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
4988 * error.c (dump_template_bindings): Don't crash if we had an
4989 invalid argument list.
4991 * typeck.c (c_expand_start_case): Do narrowing here.
4992 * semantics.c (finish_switch_cond): Not here.
4994 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
4996 * parse.y (asm_clobbers): Do string concatenation.
4998 2000-07-09 Mark Mitchell <mark@codesourcery.com>
5000 * decl.c (pushtag): Don't put local classes in template functions
5001 on the local_classes list.
5003 2000-07-04 Scott Snyder <snyder@fnal.gov>
5005 * decl2.c (get_guard): Add missing return for old ABI local
5008 2000-07-09 Mark Mitchell <mark@codesourcery.com>
5010 * cp-tree.h (char_type_p): New function.
5011 * decl.c (init_decl_processing): Don't initialize
5012 signed_wchar_type_node or unsigned_wchar_type_node.
5013 (complete_array_type): Handle brace-enclosed string-constants.
5014 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
5015 * tree.c (char_type_p): New function.
5016 * typeck2.c (digest_init): Use char_type_p.
5018 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
5020 * pt.c (tsubst): Don't layout type, if it's error_mark.
5022 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
5024 * pt.c (instantiate_pending_templates): Reset template level.
5026 2000-07-05 Jason Merrill <jason@redhat.com>
5028 * call.c (joust): Don't complain about `operator char *()' beating
5029 `operator const char *() const'.
5031 2000-07-04 scott snyder <snyder@fnal.gov>
5032 Jason Merrill <jason@redhat.com>
5034 * repo.c (repo_get_id): Handle the case where a class with virtual
5035 bases has a null TYPE_BINFO_VTABLE.
5037 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
5038 Jason Merrill <jason@redhat.com>
5040 * parse.y (member_init): Just pass in the type.
5041 * init.c (expand_member_init): Handle getting a type.
5043 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5044 Jason Merrill <jason@redhat.com>
5046 * decl.c (finish_function): Warn if a function has no return
5048 Suggested by Andrew Koenig.
5049 * typeck.c (check_return_expr): Do set current_function_returns_value
5050 if we got an error_mark_node.
5052 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
5054 * decl2.c (push_decl_namespace): Push the original namespace.
5056 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
5058 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
5059 * semantics.c (begin_class_definition): Clear it.
5061 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
5063 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
5064 (genrtl_expr_stmt): Likewise.
5065 (genrtl_decl_stmt): Likewise.
5066 (genrtl_if_stmt): Likewise.
5067 (genrtl_while_stmt): Likewise.
5068 (genrtl_do_stmt): Likewise.
5069 (genrtl_return_stmt): Likewise.
5070 (genrtl_for_stmt): Likewise.
5071 (genrtl_break_stmt): Likewise.
5072 (genrtl_continue_stmt): Likewise.
5073 (genrtl_scope_stmt): Likewise.
5074 (genrtl_switch_stmt): Likewise.
5075 (genrtl_case_label): Likewise.
5076 (genrtl_begin_compound_stmt): Likewise.
5077 (genrtl_finish_compound_stmt): Likewise.
5078 (genrtl_compound_stmt): Likewise.
5079 (genrtl_asm_stmt): Likewise.
5081 * init.c (begin_init_stmts): Remove call to
5082 genrtl_begin_compound_stmt.
5083 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
5085 * semantics.c (lang_expand_stmt): Changed call to
5086 genrtl_compound_stmt to ignore return value.
5088 2000-07-02 Mark Mitchell <mark@codesourcery.com>
5090 * mangle.c (canonicalize_for_substitution): Return the canonical
5093 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
5095 * typeck.c (commonparms): Remove obstack manipulations.
5097 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
5099 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
5101 * Makefile.in (OBJS): Added ../c-semantics.o.
5102 (OBJDEPS): Likewise.
5104 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
5106 (struct stmt_tree): Added comment.
5107 (current_function_name_declared): Removed.
5108 (stmts_are_full_exprs_p): Likewise.
5109 (genrtl_do_pushlevel): Likewise.
5110 (genrtl_clear_out_block): Likewise.
5111 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
5112 (DECL_ANON_UNION_ELEMS): Likewise.
5113 (emit_local_var): Likewise.
5114 (make_rtl_for_local_static): Likewise.
5115 (do_case): Likewise.
5116 (expand_stmt): Likewise.
5117 (genrtl_decl_cleanup): Likewise.
5118 (c_expand_asm_operands): Likewise.
5119 (c_expand_return): Likewise.
5120 (c_expand_start_case): Likewise.
5122 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
5123 (emit_local_var): Likewise.
5124 (initialize_local_var): Change reference to
5125 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5126 Change reference to stmts_are_full_exprs_p to
5127 current_stmt_tree->stmts_are_full_exprs_p.
5128 (push_cp_function_context): Likewise.
5130 * expect.c (expand_throw): Change reference to
5131 stmts_are_full_exprs_p.
5133 * init.c (build_aggr_init): Change reference to
5134 stmts_are_full_exprs_p.
5135 (build_vec_init): Likewise.
5137 * optimize.c (maybe_clone_body): Change reference to
5138 current_function_name_declared to
5139 cp_function_chain->name_declared.
5141 * pt.c (instantiate_decl): Change reference to
5142 current_function_name_declared to
5143 cp_function_chain->name_declared.
5145 * semantics.c (expand_cond): Moved declaration to c-common.h.
5146 (genrtl_do_pushlevel): Moved to c-semantics.c.
5147 (genrtl_clear_out_block): Likewise.
5148 (genrtl_goto_stmt): Likewise.
5149 (genrtl_expr_stmt): Likewise.
5150 (genrtl_decl_stmt): Likewise.
5151 (gerntl_if_stmt): Likewise.
5152 (genrtl_while_stmt): Likewise.
5153 (genrtl_do_stmt): Likewise.
5154 (genrtl_return_stmt): Likewise.
5155 (genrtl_for_stmt): Likewise.
5156 (genrtl_break_stmt): Likewise.
5157 (genrtl_continue_stmt): Likewise.
5158 (genrtl_scope_stmt): Likewise.
5159 (genrtl_switch_stmt): Likewise.
5160 (genrtl_case_label): Likewise.
5161 (genrtl_begin_compound_stmt): Likewise.
5162 (genrtl_finish_compound_stmt): Likewise.
5163 (genrtl_compound_stmt): Likewise.
5164 (genrtl_asm_stmt): Likewise.
5165 (genrtl_decl_cleanup): Likewise.
5166 (expand_cond): Likewise.
5167 (expand_stmt): Renamed to ...
5168 (lang_expand_stmt): ... this.
5169 (lang_expand_expr_stmt): Initialize.
5170 (set_current_function_name_declared): Likewise.
5171 (stmts_are_full_exprs_p): Likewise.
5172 (current_function_name_declared): Likewise.
5173 (anon_aggr_type_p): Likewise.
5174 (do_poplevel): Change reference to
5175 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5176 Change reference to stmts_are_full_exprs_p to
5177 current_stmt_tree->stmts_are_full_exprs_p.
5178 (add_tree): Likewise.
5179 (finish_expr_stmt): Likewise.
5180 (prep_stmt): Likewise.
5181 (lang_expand_stmt): Likewise.
5182 (begin_compound_stmt): Change reference to
5183 current_function_name_declared to
5184 cp_function_chain->name_declared and call to
5185 current_function_name_declared().
5186 (setup_vtbl_ptr): Likewise.
5187 (genrtl_do_poplevel): Removed.
5189 2000-06-30 Jason Merrill <jason@redhat.com>
5191 * init.c (init_init_processing): Go back to aligning like
5192 double_type_node for old ABI.
5193 (get_cookie_size): Make cookie larger if we get a type that needs
5195 (build_vec_delete): Call it.
5197 * typeck.c (qualify_type_recursive): New fn.
5198 (composite_pointer_type): Use it.
5199 (build_binary_op): Use composite_pointer_type.
5201 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
5202 Jason Merrill <jason@redhat.com>
5204 * typeck.c (check_return_expr): Don't complain about returning
5205 NULL from operator new if -fcheck-new.
5206 * cp-tree.h: Declare flag_check_new here.
5209 2000-06-28 Alex Samuel <samuel@codesourcery.com>
5211 * mangle.c (find_substitution): Use same_type_p.
5212 (write_encoding): Don't check for substitutions.
5214 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
5216 * parse.y (expr_no_comma_rangle): New non-terminal.
5217 (template_parm): Use it for default parameter case.
5218 (template_arg): Use it.
5219 (expr_no_commas): Remove commented out undefined extensions.
5220 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5221 * parse.h, parse.c: Rebuilt.
5223 2000-06-30 Mark Mitchell <mark@codesourcery.com>
5225 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
5226 (finish_asm_stmt): Do it here, instead.
5228 * cp-tree.h (ridpointers): Don't declare.
5229 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
5230 (record_builtin_java_type): Likewise.
5231 (init_decl_processing): Likewise.
5232 * lex.c: Move inclusion of lex.h.
5233 (ridpointers): Don't define.
5234 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
5236 * lex.h (enum rid): Rename to ...
5237 (enum cp_rid): ... this.
5238 (ridpointers): Don't declare.
5239 * parse.y: Move inclusion of lex.h.
5240 * parse.c: Regenerated.
5241 * spew.c: Move inclusion of lex.h.
5243 * cp-tree.h (struct language_function): Remove temp_name_counter.
5244 (temp_name_counter): Remove.
5245 (get_temp_name): Change prototype.
5246 (get_guard): New function.
5247 (get_guard_cond): Likewise.
5248 (set_guard): Likewise.
5249 * cvt.c (build_up_reference): Adjust call to get_temp_name.
5250 * decl.c (expand_static_init): Use get_guard and friends to
5251 implement guard variables.
5252 * decl2.c (get_temp_name): Assume that the variables created are
5254 (get_sentry): Rename to ...
5255 (get_guard): ... this. Implement new ABI guard variables.
5256 (get_guard_bits): New function.
5257 (get_guard_cond): Likewise.
5258 (set_guard): Likewise.
5259 (start_static_initialization_or_destruction): Use them.
5260 (do_static_initialization): Replace sentry with guard throughout.
5261 (do_static_destruction): Likewise.
5262 * init.c (create_temporary_var): Add comment.
5264 2000-06-28 Alex Samuel <samuel@codesourcery.com>
5266 * mangle.c (find_substitution): Use same_type_p.
5267 (write_encoding): Don't check for substitutions.
5269 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
5271 * parse.y (expr_no_comma_rangle): New non-terminal.
5272 (template_parm): Use it for default parameter case.
5273 (template_arg): Use it.
5274 (expr_no_commas): Remove commented out undefined extensions.
5275 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5276 * parse.h, parse.c: Rebuilt.
5278 2000-06-29 Mark Mitchell <mark@codesourcery.com>
5280 * cp-tree.h (flag_const_strings): Remove.
5281 (warn_parentheses): Likewise.
5282 (warn_format): Likewise.
5283 (common_type): Likewise.
5284 (default_conversion): Likewise.
5285 (build_binary_op): Likewise.
5286 (cp_build_binary_op): New macro.
5287 * call.c (build_new_op): Use cp_build_binary_op instead of
5289 * class.c (build_vtable_entry_ref): Likewise.
5290 * decl.c (expand_static_init): Likewise.
5291 (compute_array_index_type): Likewise.
5292 (build_enumerator): Likewise.
5293 * decl2.c (delete_sanity): Likewise.
5294 (start_static_initialization_or_destruction): Likewise.
5295 * error.c (dump_type_suffix): Likewise.
5296 * init.c (resolve_offset_ref): Likewise.
5297 (build_new): Likewise.
5298 (build_new_1): Likewise.
5299 (build_vec_delete_1): Likewise.
5300 (build_vec_init): Likewise.
5301 (build_delete): Likewise.
5302 * rtti.c (synthesize_tinfo_fn): Likewise.
5303 (synthesize_tinfo_var): Likewise.
5304 * search.c (expand_upcast_fixups): Likewise.
5305 (fixup_all_virtual_upcast_offsets): Likewise.
5306 * typeck.c (build_array_ref): Likewise.
5307 (get_member_function_from_ptrfunc): Likewise.
5308 (build_binary_op): Add parameter.
5309 (pointer_int_sum): Use cp_build_binary_op.
5310 (pointer_diff): Likewise.
5311 (build_modify_expr): Likewise.
5312 (get_delta_difference): Likewise.
5313 (build_ptrmemfunc): Likewise.
5315 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
5317 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
5318 * decl.c (create_implicit_typedef): Adjust.
5319 * decl2.c (build_artificial_parm): Adjust.
5320 * method.c (implicitly_declare_fn): Adjust.
5321 * pt.c (push_inline_template_parms_recursive): Adjust.
5322 (process_template_parm): Adjust.
5323 (overloaded_template_name): Adjust.
5324 * semantics.c (finish_template_template_parm): Adjust.
5326 2000-06-28 Mark Mitchell <mark@codesourcery.com>
5328 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
5329 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
5330 where to emit thunks.
5331 (build_vtt): Adjust call to build_vtt_inits.
5332 (build_vtt_inits): Add parameter to indicate whether or not
5333 sub-VTTs for virtual bases should be included. Adjust handling of
5334 construction vtables.
5335 (get_matching_base): New function.
5336 (dfs_build_vtt_inits): Rename to ...
5337 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
5338 construction vtables.
5339 (dfs_fixup_binfo_vtbls): Likewise.
5340 (build_ctor_vtbl_groups): Build construction vtables for virtual
5342 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
5343 to build construction vtbls.
5344 (dfs_accumulate_vtbl_inits): Adjust handling of
5345 construction vtables.
5347 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
5350 2000-06-27 Mark Mitchell <mark@codesourcery.com>
5352 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
5354 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
5356 * search.c (hides): Remove.
5357 (is_subobject_of_p): Add most_derived parameter. Use
5359 (lookup_field_queue_p): Adjust.
5360 (lookup_field_r): Adjust.
5362 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
5364 * decl2.c (handle_class_head): Bash typedefs to the type's main
5367 2000-06-25 Mark Mitchell <mark@codesourcery.com>
5369 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
5370 (begin_global_stmt_expr): ... this.
5371 (genrtl_finish_stmt_expr): Rename to ...
5372 (finish_global_stmt_expr): ... this.
5373 * init.c (begin_init_stmts): Adjust calls.
5374 (finish_init_stmts): Likewise.
5375 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
5376 (begin_global_stmt_expr): ... this.
5377 (genrtl_finish_stmt_expr): Rename to ...
5378 (finish_global_stmt_expr): ... this.
5380 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5382 * search.c (lookup_member): Fix typo in comment.
5384 2000-06-24 Jason Merrill <jason@redhat.com>
5386 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
5387 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
5389 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5391 * parse.y (complex_direct_notype_declarator): Support global_scope.
5392 * Makefile.in: Adjust conflict count.
5394 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5396 * parse.y (template_arg): Convert TEMPLATE_DECL
5397 that is a template template paramter to
5398 TEMPLATE_TEMPLATE_PARM here.
5400 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
5401 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
5402 (copy_template_template_parm): Adjust prototype.
5403 * decl.c (grokdeclarator): Remove dead code.
5404 * pt.c (process_template_parm): Tidy.
5405 (lookup_template_class): Construct nodes in
5406 copy_template_template_parm.
5407 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
5408 lookup_template_class. Use TYPE_TI_TEMPLATE.
5409 * tree.c (copy_template_template_parm): Add NEWARGS
5411 (mapcar): Adjust call to copy_template_template_parm.
5412 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
5413 * method.c (build_template_template_parm_names): Change error
5414 code to avoid compilation warning.
5416 * gxxint.texi: Document template template parameter
5419 2000-06-21 Alex Samuel <samuel@codesourcery.com>
5421 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
5422 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
5423 (cp-demangle.o): New rule.
5424 (dyn-string.o): Likewise.
5425 * inc/cxxabi.h (__cxa_demangle): New declaration.
5427 2000-06-22 Mark Mitchell <mark@codesourcery.com>
5429 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
5430 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
5431 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
5433 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
5434 (make_thunk): Change prototype.
5435 (emit_thunk): Rename to use_thunk.
5436 (mangle_thunk): Change prototype.
5437 * class.c (get_derived_offset): Simplify.
5438 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
5439 BV_GENERATE_THUNK_WITH_VTABLE_P.
5440 (build_primary_vtable): Simplify.
5441 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
5442 (dfs_find_base): Remove.
5443 (update_vtable_entry_for_fn): Correct bug in finding the base
5444 where a virtual function was first declared. Figure out whether
5445 or not to emit a vcall-thunk with the vtables in which it appears.
5446 Correct logic for deciding whether to use an ordinary thunk, or a
5448 (finish_struct_1): Remove unnecssary code.
5449 (build_vtbl_initializer): Use ssize_int for the running counter of
5451 (build_vtbl_initializer): Only use vcall thunks where necessary.
5452 Mark thunks as needing to be emitted with their vtables, or not.
5453 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
5454 indices. Use size_binop.
5455 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
5456 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
5458 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
5459 (build_vtable_entry): Mark thunks as needing to be emitted with
5460 their vtables, or not.
5461 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
5462 * decl2.c (mark_vtable_entries): Use use_thunk instead of
5464 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
5466 * error.c (dump_expr): Use BV_FN.
5467 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
5469 * method.c (make_thunk): Likewise.
5470 (emit_thunk): Rename to use_thunk. Allow callers to decide
5471 whether or not to actually emit the thunk. Adjust for changes in
5472 representation of vcall offsets.
5473 * search.c (dfs_get_pure_virtuals): Use BV_FN.
5474 * semantics.c (emit_associated_thunks): New function.
5475 (expand_body): Use it.
5476 * ir.texi: Adjust decriptions of thunks.
5478 2000-06-22 Jason Merrill <jason@redhat.com>
5480 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
5481 (tsubst_friend_function): Copy it here.
5483 * decl.c (grok_op_properties): Fix typo.
5485 * decl2.c (delete_sanity): Clarify warning, avoid failure on
5488 * pt.c (check_explicit_specialization): Clarify error.
5490 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
5491 an old OVERLOAD when we're declaring a non-function.
5492 (pushdecl, destroy_local_var): Check for error_mark_node.
5493 (warn_extern_redeclared_static): Also bail early if
5495 (push_overloaded_decl): Ignore an old error_mark_node.
5497 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
5499 * call.c (build_x_va_arg): Check if in a template decl.
5500 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
5502 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
5504 * class.c (push_lang_context): TYPE_NAME gets you to the Java
5506 * decl.c (check_goto): Computed gotos assumed OK.
5508 2000-06-20 Jason Merrill <jason@redhat.com>
5510 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
5511 for which we don't need to look for instantiations.
5513 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
5515 * parse.y (program): Always call finish_translation_unit.
5516 * parse.c, parse.h: Rebuilt.
5518 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
5520 * method.c: Don't include hard-reg-set.h.
5522 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
5524 * rtti.c (get_base_offset): Cope when vbase field is in a base.
5526 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
5528 * call.c (build_conditional_expr): Use VOID_TYPE_P.
5529 * cvt.c (cp_convert_to_pointer): Likewise.
5530 (convert_to_void): Likewise.
5531 * error.c (dump_expr): Likewise.
5532 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
5533 * init.c (build_delete): Likewise.
5534 * method.c (emit_thunk): Likewise.
5535 * optmize.c (declare_return_variable): Likewise.
5536 * rtti.c (get_tinfo_decl_dynamic): Likewise.
5537 (get_typeid): Likewise.
5538 (build_dynamic_cast_1): Likewise.
5539 * typeck.c (composite_pointer_type): Likewise.
5540 (common_type): Likewise.
5541 (build_indirect_ref): Likewise.
5542 (build_binary_op): Likewise.
5543 (build_x_compound_expr): Likewise.
5544 (check_return_expr): Likewise.
5545 * typeck2.c (add_exception_specifier): Likewise.
5547 * mangle.c (write_method_parms): Use direct comparison for end
5550 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
5552 * cp-tree.h (genrtl_try_block): Declare function.
5553 (genrtl_handler): Likewise.
5554 (genrtl_catch_block): Likewise.
5555 (genrtl_ctor_stmt): Likewise.
5556 (genrtl_subobject): Likewise.
5557 (genrtl_decl_cleanup): Likewise.
5558 (genrtl_do_poplevel): Likewise.
5559 (genrtl_do_pushlevel): Likewise.
5560 (genrtl_clear_out_block): Likewise.
5561 (genrtl_goto_stmt): Likewise.
5562 (genrtl_expr_stmt): Likewise.
5563 (genrtl_decl_stmt): Likewise.
5564 (genrtl_if_stmt): Likewise.
5565 (genrtl_while_stmt): Likewise.
5566 (genrtl_do_stmt): Likewise.
5567 (genrtl_return_stmt): Likewise.
5568 (genrtl_for_stmt): Likewise.
5569 (genrtl_break_stmt): Likewise.
5570 (genrtl_continue_stmt): Likewise.
5571 (genrtl_scope_stmt): Likewise.
5572 (genrtl_switch_stmt): Likewise.
5573 (genrtl_case_label): Likewise.
5574 (genrtl_begin_compound_stmt): Likewise.
5575 (genrtl_finish_compound_stmt): Likewise.
5576 (genrtl_compound_stmt): Likewise.
5577 (genrtl_asm_stmt): Likewise.
5578 (genrtl_named_return_value): Likewise.
5579 (genrtl_begin_stmt_expr): Likewise.
5580 (genrtl_finish_stmt_expr): Likewise.
5581 (finish_for_stmt): Removed first argument.
5582 (finish_switch_stmt): Likewise.
5584 * semantics.c (genrtl_try_block): Define function.
5585 (genrtl_handler): Likewise.
5586 (genrtl_catch_block): Likewise.
5587 (genrtl_ctor_stmt): Likewise.
5588 (genrtl_subobject): Likewise.
5589 (genrtl_decl_cleanup): Likewise.
5590 (genrtl_do_poplevel): Likewise.
5591 (genrtl_do_pushlevel): Likewise.
5592 (genrtl_clear_out_block): Likewise.
5593 (genrtl_goto_stmt): Likewise.
5594 (genrtl_expr_stmt): Likewise.
5595 (genrtl_decl_stmt): Likewise.
5596 (genrtl_if_stmt): Likewise.
5597 (genrtl_while_stmt): Likewise.
5598 (genrtl_do_stmt): Likewise.
5599 (genrtl_return_stmt): Likewise.
5600 (genrtl_for_stmt): Likewise.
5601 (genrtl_break_stmt): Likewise.
5602 (genrtl_continue_stmt): Likewise.
5603 (genrtl_scope_stmt): Likewise.
5604 (genrtl_switch_stmt): Likewise.
5605 (genrtl_case_label): Likewise.
5606 (genrtl_begin_compound_stmt): Likewise.
5607 (genrtl_finish_compound_stmt): Likewise.
5608 (genrtl_compound_stmt): Likewise.
5609 (genrtl_asm_stmt): Likewise.
5610 (genrtl_named_return_value): Likewise.
5611 (genrtl_begin_stmt_expr): Likewise.
5612 (genrtl_finish_stmt_expr): Likewise.
5613 (finish_for_stmt): Removed first argument and generate rtl
5615 (finish_switch_stmt): Likewise.
5616 (do_poplevel): Removed generate rtl specific code.
5617 (do_pushlevel): Likewise.
5618 (add_tree): Likewise.
5619 (finish_goto_stmt): Likewise.
5620 (finish_expr_stmt): Likewise.
5621 (begin_if_stmt): Likewise.
5622 (finish_if_stmt_cond): Likewise.
5623 (finish_then_clause): Likewise.
5624 (begin_else_clause): Likewise.
5625 (finish_else_clause): Likewise.
5626 (finish_if_stmt): Likewise.
5627 (clear_out_block): Likewise.
5628 (begin_while_stmt): Likewise.
5629 (finish_while_stmt_cond): Likewise.
5630 (finish_while_stmt): Likewise.
5631 (begin_do_stmt): Likewise.
5632 (finish_do_body): Likewise.
5633 (finish_do_stmt): Likewise.
5634 (finish_return_stmt): Likewise.
5635 (begin_for_stmt): Likewise.
5636 (finish_for_init_stmt): Likewise.
5637 (finish_for_cond): Likewise.
5638 (finish_for_expr): Likewise.
5639 (finish_break_stmt): Likewise.
5640 (finish_continue_stmt): Likewise.
5641 (begin_switch_stmt): Likewise.
5642 (finish_switch_cond): Likewise.
5643 (finish_case_label): Likewise.
5644 (begin_try_block): Likewise.
5645 (begin_function_try_block): Likewise.
5646 (finish_try_block): Likewise.
5647 (finish_cleanup_try_block): Likewise.
5648 (finish_cleanup): Likewise.
5649 (finish_function_try_block): Likewise.
5650 (finish_handler_sequence): Likewise.
5651 (finish_function_handler_sequence): Likewise.
5652 (begin_handler): Likewise.
5653 (finish_handler_parms): Likewise.
5654 (begin_catch_block): Likewise.
5655 (finish_handler): Likewise.
5656 (begin_compound_stmt): Likewise.
5657 (finish_compound_stmt): Likewise.
5658 (finish_asm_stmt): Likewise.
5659 (finish_label_stmt): Likewise.
5660 (finish_label_decl): Likewise.
5661 (finish_subobject): Likewise.
5662 (finish_decl_cleanup): Likewise.
5663 (finish_named_return_value): Likewise.
5664 (begin_stmt_expr): Likewise.
5665 (finish_stmt_expr): Likewise.
5667 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
5668 to call genrtl_expr_stmt when appropriate.
5670 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
5671 begin_compound_expr to call genrtl_begin_stmt_expr and
5672 genrtl_begin_compound_expr when appropriate.
5673 (finish_init_stmts): Changed calls to finish_compound_expr and
5674 finish_stmt_expr to call genrtl_finish_compound_expr and
5675 genrtl_finish_stmt_expr when appropriate.
5676 (expand_default_init): Changed call to finish_expr_stmt to call
5677 genrtl_expr_stmt when appropriate.
5678 (build_vec_init): Likewise.
5680 * parse.y (simple_stmt): Removed first argument from call to
5681 finish_for_stmt. Removed first argument from call to
5684 * parse.c: Regenerated.
5686 * pt.c (tsubst_expr): Removed first argument from call to
5687 finish_for_stmt. Removed first argument from call to
5690 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
5692 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
5693 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
5695 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
5696 (cplus_tree_code_length[]): Likewise.
5697 (cplus_tree_code_name[]): Likewise.
5698 (init_parse): Added call to add_c_tree_codes. Changed
5699 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
5701 2000-06-16 Mark Mitchell <mark@codesourcery.com>
5703 * cp-tree.h (finish_mem_initializers): Declare.
5704 (count_trees): Likewise.
5705 * parse.y (base_init): Use finish_mem_initializers.
5706 * semantics.c (finish_mem_initializers): New function.
5708 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
5709 the number of trees.
5711 (count_trees): Don't use it.
5713 2000-06-15 Jason Merrill <jason@redhat.com>
5715 * tree.c (count_trees): New debugging function.
5717 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
5718 * init.c (build_member_call): Pull out the name of a DECL.
5720 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
5721 * semantics.c (expand_body): Push to TV_INTEGRATION here.
5722 * optimize.c (optimize_function): Not here.
5723 * pt.c (instantiate_decl): Push to TV_PARSE.
5725 2000-06-15 Mark Mitchell <mark@codesourcery.com>
5727 * cp-tree.h (struct language_function): Remove x_base_init_list
5728 and x_member_init_list.
5729 (current_base_init_list): Remove.
5730 (current_member_init_list): Likewise.
5731 (setup_vtbl_ptr): Change prototype.
5732 (emit_base_init): Likewise.
5733 (expand_member_init): Likewise.
5734 (reinit_parse_for_function): Remove.
5735 * decl.c (save_function_data): Don't clear x_base_init_list and
5737 (mark_language_function): Don't mark them.
5738 * init.c (perform_member_init): Tweak comment.
5739 (sort_member_init): Take the list of initializers as an argument.
5740 (sort_base_init): Likewise.
5741 (emit_base_init): Likewise.
5742 (expand_member_init): Return the initializer. Don't use global
5744 * lex.c (reinit_parse_for_function): Remove.
5745 * method.c (build_template_parm_names): Correct substitution.
5746 (do_build_copy_constructor): Don't use current_member_init_list
5747 and current_base_init_list.
5748 (synthesize_method): Likewise.
5749 * parse.y (base_init): Split mem-initializers into
5750 base-initializers and field-initializers.
5751 (member_init_list): Build up the list here.
5752 (member_init): Return the initializer.
5753 (fn.depfn): Don't use reinit_parse_for_function.
5754 * parse.c: Regenerated.
5755 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
5757 (tsubst_expr): Don't use current_member_init_list
5758 and current_base_init_list.
5759 (tsubst_expr_values): Rename to ...
5760 (tsubst_initializer_list): ... this. Use convert_from_reference.
5761 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
5762 and current_base_init_list.
5763 (begin_function_definition): Don't call reinit_parse_for_function.
5765 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
5767 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
5770 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
5772 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
5774 * cp-tree.h (IF_COND): Move to c-common.h.
5775 (THEN_CLAUSE): Likewise.
5776 (ELSE_CLAUSE): Likewise.
5777 (WHILE_COND): Likewise.
5778 (WHILE_BODY): Likewise.
5779 (DO_COND): Likewise.
5780 (DO_BODY): Likewise.
5781 (RETURN_EXPR): Likewise.
5782 (EXPR_STMT_EXPR): Likewise.
5783 (FOR_INIT_STMT): Likewise.
5784 (FOR_COND): Likewise.
5785 (FOR_EXPR): Likewise.
5786 (FOR_BODY): Likewise.
5787 (SWITCH_COND): Likewise.
5788 (SWITCH_BODY): Likewise.
5789 (CASE_LOW): Likewise.
5790 (CASE_HIGH): Likewise.
5791 (GOTO_DESTINATION): Likewise.
5792 (COMPOUND_BODY): Likewise.
5793 (ASM_CV_QUAL): Likewise.
5794 (ASM_STRING): Likewise.
5795 (ASM_OUTPUTS): Likewise.
5796 (ASM_INPUTS): Likewise.
5797 (ASM_CLOBBERS): Likewise.
5798 (DECL_STMT_DECL): Likewise.
5799 (STMT_EXPR_STMT): Likewise.
5800 (LABEL_STMT_LABEL): Likewise.
5801 (SCOPE_BEGIN_P): Likewise.
5802 (SCOPE_END_P): Likewise.
5803 (SCOPE_STMT_BLOCK): Likewise.
5804 (SCOPE_NULLIFIED_P): Likewise.
5805 (SCOPE_NO_CLEANUPS_P): Likewise.
5806 (SCOPE_PARTIAL_P): Likewise.
5807 (ASM_VOLATILE_P): Likewise.
5808 (STMT_LINENO): Likewise.
5809 (STMT_LINENO_FOR_FN_P): Likewise.
5811 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
5812 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
5813 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
5814 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
5815 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
5817 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
5819 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
5820 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
5822 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
5823 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
5824 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
5826 2000-06-14 Mark Mitchell <mark@codesourcery.com>
5828 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
5829 * class.c (dfs_find_final_overrider): Set it appropriately.
5830 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
5831 avoid unneeded secondary vptrs.
5833 2000-06-13 Jakub Jelinek <jakub@redhat.com>
5835 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
5836 (check_bitfield_decl, check_field_decl): Likewise.
5837 (build_vtbl_or_vbase_field, build_base_field): Likewise.
5838 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
5839 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
5840 (xfer_tag, finish_enum): Likewise.
5841 * decl2.c (finish_builtin_type): Likewise.
5842 * init.c (init_init_processing): Likewise.
5843 * pt.c (instantiate_class_template): Likewise.
5844 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
5845 * cp-tree.h (struct lang_type): Add user_align member.
5846 (CLASSTYPE_USER_ALIGN): Define.
5848 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5850 * Make-lang.in (c++.install-common): Install g++-cross in
5851 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
5852 $(target_alias)-g++ and $(target_alias)-c++.
5854 2000-06-12 Mark Mitchell <mark@codesourcery.com>
5856 * class.c (vcall_offset_data_s): Add last_init and fns.
5857 (overrides): Rename to same_signature_p.
5858 (dfs_find_final_overrider): Adjust accordingly.
5859 (mark_overriders): Likewise.
5860 (warn_hidden): Likewise.
5861 (build_vtbl_initializer): Reorganize machinery for building things
5862 at negative offsets.
5863 (build_vcall_and_vbase_vtbl_entries): Likewise.
5864 (build_vbase_offset_vtbl_entries): Likewise.
5865 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
5866 offset entries. Do not create two entries for functions with the
5868 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
5869 (build_rtti_vtbl_entries): Reorganize machinery for building things
5870 at negative offsets.
5872 * optimize.c (expand_call_inline): Don't recurse into the code
5873 used to initialize the parameters more than once.
5875 2000-06-11 Mark Mitchell <mark@codesourcery.com>
5877 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
5878 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
5879 (find_substitution): Only use the `Sa' substitution for
5880 std::allocator, not instantiations of it.
5881 (write_template_prefix): Move comment. Only use a TREE_LIST to
5882 represent substitutions for a member template.
5883 (write_array_type): Mangle array dimensions correctly.
5884 * optimize.c (maybe_clone_body): Copy more information from the
5886 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
5887 on the regenerated declaration.
5889 2000-06-11 Chip Salzenberg <chip@valinux.com>
5890 Mark Mitchell <mark@codesourcery.com>
5892 * class.c (build_vtable): Clarify comment.
5893 (build_ctor_vtbl_group): Pass the most derived type to
5896 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5898 * decl2.c (compare_options): Don't needlessly cast away const-ness.
5900 2000-06-10 Mark Mitchell <mark@codesourcery.com>
5902 * decl.c (add_binding): Handle duplicate declarations of external
5905 2000-06-09 Chip Salzenberg <chip@valinux.com>
5906 Mark Mitchell <mark@codesourcery.com>
5908 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
5910 (write_signed_number): New macro.
5911 (write_unsigned_number): Likewise.
5912 (write_source_name): Use them.
5913 (write_number): Handle signed and unsigned values.
5914 (write_integer_cst): Use tree_int_cst_sgn, and use
5915 write_unsigned_number or write_signed_number as appropriate.
5916 (write_discriminator): Use write_unsigned_number or
5917 write_signed_number as appropriate.
5918 (write_template_arg_literal): Likewise.
5919 (write_array_type): Use tree_low_cst.
5920 (write_template_parm): Use write_unsigned_number or
5921 write_signed_number as appropriate.
5922 (write_substitution): Adjust call to write_number.
5923 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
5924 (write_expression): Handle non-type template arguments of
5925 reference type correctly.
5926 (mangle_thunk): Use write_signed_number.
5928 2000-06-09 Chip Salzenberg <chip@valinux.com>
5930 * mangle.c (find_substition): Don't mangle objects with typename
5931 substitutions (e.g. "cin" as "Si").
5933 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
5935 * call.c (add_candidate): Use ggc_alloc_cleared.
5936 * decl.c (lookup_label): Likewise.
5937 * lex.c (retrofit_lang_decl): Likewise.
5939 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
5941 * semantics.c (expand_body): Push to TV_EXPAND.
5942 * optimize.c (optimize_function): Push to TV_INTEGRATION.
5943 * decl.c (start_function): Always call announce_function.
5945 * tinfo2.cc: Just declare abort.
5947 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
5949 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
5950 whenever @ is a symbolic name.
5952 2000-06-08 Jakub Jelinek <jakub@redhat.com>
5954 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
5956 2000-06-07 Mark Mitchell <mark@codesourcery.com>
5958 * decl.c (pushdecl): Look up functions by DECL_NAME, not
5959 DECL_ASSEMBLER_NAME.
5961 2000-06-06 Mark Mitchell <mark@codesourcery.com>
5963 * decl2.c (c_language): Define.
5965 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
5967 * lex.c (lang_init_options): Tweak.
5969 * decl2.c: Remove #inclusion of diagnostic.h
5970 (lang_decode_option): Move diagnostic formatting options to
5973 * lang-options.h: Remove documentation for diagnostic options.
5975 * Makefile.in (lex.o): Depends upon diagnostic.h
5977 2000-06-06 Mark Mitchell <mark@codesourcery.com>
5979 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
5980 the same DECL_RESULT, it's not a redefinition.
5981 * pt.c (tsubst_decl): Remove code to handle illegal
5984 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
5986 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
5988 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
5990 * search.c (maybe_suppress_debug_info): Don't check
5991 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
5993 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
5996 Remember instantiation context in deferred instantiations.
5997 * cp-tree.h (struct tinst_level): Remove.
5998 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
5999 * pt.c (current_tinst_level): Now a tree.
6000 (print_template_context, push_tinst_level, pop_tinst_level,
6001 tinst_for_decl): Adjust.
6002 (reopen_tinst_level): New fn.
6003 (init_pt): Register current_tinst_level as a root.
6004 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
6005 of the pending templates list.
6006 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
6007 * lex.c (extract_interface_info): Adjust.
6008 * decl2.c (warn_if_unknown_interface): Adjust.
6010 2000-06-05 Mark Mitchell <mark@codesourcery.com>
6012 * class.c (indirect_primary_base_p): New function.
6013 (determine_primary_base): Use it.
6015 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
6017 Update new-abi dynamic cast algorithm.
6018 * tinfo.cc (__class_type_info::__dyncast_result): Add
6019 whole_details. Adjust constructor.
6020 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
6021 Avoid unnecessary searching.
6022 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
6024 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6026 * decl.c (init_decl_processing): Don't call record_component_aliases.
6027 * tree.c (build_cplus_array_type_1): Likewise.
6029 2000-06-04 Mark Mitchell <mark@codesourcery.com>
6031 * ir.texi: Correct typo.
6032 * mangle.c (write_expression): Handle non-type template arguments
6033 with reference type.
6034 * method.c (build_overload_value): Likewise.
6035 * pt.c (convert_nontype_argument): Explicitly represent conversion
6036 to a reference with an ADDR_EXPR.
6037 (unify): Always unify arguments in left-to-right order.
6039 2000-06-03 Alex Samuel <samuel@codesourcery.com>
6040 Mark Mitchell <mark@codesourcery.com>
6042 * Make-lang.in (CXX_SRCS): Add mangle.c.
6043 * Makefile.in (CXX_OBJS): Add mangle.o.
6044 (mangle.o): New rule.
6046 * class.c (local_classes): New variable.
6047 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
6048 (get_vtt_name): Use mangle_vtt_name for new ABI.
6049 (init_class_processing): Initialize local_classes.
6050 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
6051 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
6052 (std_identifier): New macro.
6053 (DECL_VOLATILE_MEMFUNC_P): New macro.
6054 (DECL_NAMESPACE_STD_P): Likewise.
6055 (local_classes): Declare.
6056 (get_mostly_instantiated_function_type): Declare.
6057 (init_mangle): Declare.
6058 (mangle_decl): Likewise.
6059 (mangle_type_string): Likewise.
6060 (mangle_type): Likewise.
6061 (mangle_typeinfo_for_type): Likewise.
6062 (mangle_typeinfo_string_for_type): Likewise.
6063 (mangle_vtbl_for_type): Likewise.
6064 (mangle_vtt_for_type): Likewise.
6065 (mangle_ctor_vtbl_for_type): Likewise.
6066 (mangle_thunk): Likewise.
6067 (mangle_conv_op_name_for_type): Likewise.
6068 (mangle_guard_variable): Likewise.
6069 * decl.c (pushtag): Keep track of local classes.
6070 (initialize_predefined_identifiers): Initialize std_identifier.
6071 (init_decl_processing): Use std_identifier.
6072 (start_decl): Don't treat instantiations as specializations.
6073 (grokdeclarator): Likewise.
6074 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
6075 name for fully-instantiated templates.
6076 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
6077 destructors with the new ABI.
6078 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
6079 (grokfield): Use mangle_type for new ABI.
6080 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
6081 (get_sentry): Use mangle_guard_variable for new ABI.
6082 (start_static_initialization_or_destruction): Likewise.
6083 * expr.c (extract_aggr_init): Remove.
6084 (extract_scalar_init): Likewise.
6085 (extract_init): Remove #if 0'd code.
6086 * mangle.c: New function.
6087 * method.c (build_mangled_name): Assert not flag_new_abi.
6088 (build_static_name): Likewise.
6089 (build_decl_overload_real): Likewise.
6090 (build_typename_overload): Likewise.
6091 (build_overload_with_type): Likewise.
6092 (build_overload_name): Likewise.
6093 (get_ctor_vtbl_name): Likewise.
6094 (start_squangling): Likewise.
6095 (get_id_2): Likewise.
6096 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
6097 (init_method): Call init_mangle for new ABI.
6098 (make_thunk): Call mangle_thunk for new ABI.
6099 * operators.def: Correct new ABI manglings for the `%' operator.
6101 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
6102 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
6103 (lookup_template_class): Call mangle_decl for new ABI.
6104 (get_mostly_instantiated_function_type): New function.
6105 (set_mangled_name_for_template_decl): Use it.
6106 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
6107 the new ABI. Use mangle_conv_op_name_for_type for instantiated
6108 conversion op names.
6109 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
6110 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
6111 (tinfo_base_init): Likewise. Mangle typeinfo string name with
6112 mangle_typeinfo_string_for_type.
6114 2000-06-03 Mark Mitchell <mark@codesourcery.com>
6116 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
6117 (INNERMOST_TEMPLATE_ARGS): New macro.
6118 (innermost_args): Remove.
6119 (get_innermost_template_args): New function.
6120 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
6121 * error.c (dump_function_decl): Be caution when using
6122 most_general_template.
6123 * method.c (build_template_parm_names): Use
6124 INNERMOST_TEMPLATE_ARGS.
6125 * pt.c (add_to_template_args): Tidy comment
6126 (get_innermost_template_args): New function.
6127 (check_explicit_specialization): Clear DECL_INITIAL for a new
6129 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
6131 (push_template_decl): Always register specializations of the most
6133 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
6134 (coerce_template_parms): Likewise.
6135 (lookup_template_class): Likewise.
6136 (innermost_args): Remove.
6137 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
6138 (tsubst_decl): Handle tricky specializations. Use
6139 get_innermost_template_args.
6140 (instantiate_template): Simplify handling of partial
6142 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
6143 (most_general_template): Reimplement, in a more straightforward
6145 (regenerate_decl_from_template): Tweak formatting. Use
6146 TMPL_ARGS_DEPTH for clarity.
6147 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
6149 * dump.c (dequeue_and_dump): Dump information about thunks.
6151 2000-06-01 Richard Henderson <rth@cygnus.com>
6153 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
6155 2000-06-01 Richard Henderson <rth@cygnus.com>
6157 * decl2.c (unsupported_options): Fix typo, make const.
6158 (lang_decode_option): Fix bsearch argument order.
6160 2000-06-01 Mark Mitchell <mark@codesourcery.com>
6162 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
6165 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6167 * cp-tree.h (c_get_alias_set): Deleted.
6168 * Makefile.in (decl.o): Include ../expr.h.
6169 * decl.c (expr.h): Include.
6170 (init_decl_processing): Call record_component_aliases for arrays.
6171 (grokdeclarator): Likewise.
6172 Set TREE_ADDRESSABLE for fields that aren't bitfields.
6173 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
6175 2000-05-31 Mark Mitchell <mark@codesourcery.com>
6177 Remove guiding declaration support.
6178 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
6179 (flag_guiding_decls): Remove.
6180 * call.c (build_user_type_conversion_1): Remove support for
6182 (build_new_function_call): Likewise.
6183 (build_new_op): Likewise.
6184 (build_new_method_call): Likewise.
6185 * decl.c (start_function): Likewise.
6186 * friend.c (is_friend): Likewise.
6187 (do_friend): Likewise.
6188 * decl2.c ((flag_dump_translation_unit): Make it const.
6189 (flag_guiding_decls): Remove.
6190 (unsupported_options): New variable
6191 (compare_options): New function.
6192 (lang_decode_option): Use them.
6194 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
6196 * method.c (mangle_expression): Adjust test for legal expression
6199 * pt.c (instantiate_decl): Save and restore the local
6200 specializations list.
6202 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
6204 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
6206 2000-05-30 Mark Mitchell <mark@codesourcery.com>
6208 * call.c (add_template_candidate_real): Handle member template
6209 constructors for classes with virtual bases.
6210 (build_user_type_conversion_1): Use in_charge_arg_for_name.
6211 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
6213 * ir.texi: Update thunk documentation.
6215 * call.c (joust): Fix handling of overloaded builtin operators.
6217 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
6219 * cp-tree.h (DECL_ANTICIPATED): New macro.
6220 Document new use of DECL_LANG_FLAG_7.
6221 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
6222 in the user namespace.
6223 * lex.c (do_identifier): If the identifier's declaration has
6224 DECL_ANTICIPATED on, it has not yet been declared. But do not
6225 replace it with an ordinary implicit declaration.
6227 * tinfo2.cc: Include stdlib.h.
6229 2000-05-29 Mark Mitchell <mark@codesourcery.com>
6231 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
6232 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
6235 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
6237 * decl2.c (lang_decode_option): Use skip_leading_substring instead
6240 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
6242 * operators.def (<?): Duplicated, should have been...
6245 2000-05-27 Alex Samuel <samuel@codesourcery.com>
6246 Mark Mitchell <mark@codesourcery.com>
6248 * cp-tree.h (ansi_opname): Make it a macro.
6249 (ansi_assopname): Likewise.
6250 (struct lang_decl_flags): Add assignment_operator_p.
6251 (struct lang_decl): Add operator_code.
6252 (DECL_VTT_PARM): Adjust.
6253 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
6254 overloaded operator.
6255 (SET_OVERLOADED_OPERATOR_CODE): New macro.
6256 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
6257 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
6258 (opname_tab): Remove.
6259 (assignop_tab): Likewise.
6260 (operator_name_info_t): New type.
6261 (operator_name_info): New variable.
6262 (assignment_operator_name_info): Likewise.
6263 (build_cp_library_fn): Remove declaration.
6264 (push_cp_library_fn): Likewise.
6265 (operator_name_string): Likewise.
6266 (build_decl_overload): Likewise.
6267 * call.c (print_z_candidates): Simplify.
6268 (build_object_call): Adjust usage of ansi_opname. Use
6269 DECL_OVERLOADED_OPERATOR_P.
6270 (op_error): Adjust operator name lookup.
6271 (build_conditional_expr): Adjust usage of ansi_opname.
6272 (build_new_op): Likewise.
6273 (build_op_delete_call): Likewise.
6274 (build_over_call): Likewise.
6275 (joust): Use DECL_OVERLOADED_OPERATOR_P.
6276 * decl.c (duplicate_decls): Copy operator_code.
6277 (init_decl_processing): Adjust parameters to push_cp_library_fn.
6278 (builtin_function): Adjust parameters to build_library_fn_1.
6279 (build_library_fn_1): Accept an overloaded operator code.
6280 (build_library_fn): Pass ERROR_MARK.
6281 (build_cp_library_fn): Accept an overloaded operator code.
6282 (push_cp_library_fn): Likewise.
6283 (grokfndecl): Tweak.
6284 (grokdeclarator): Simplify code to compute names of overloaded
6285 operators. Adjust use of ansi_opname.
6286 (ambi_op_p): Work on tree_codes, not identifiers.
6287 (unary_op_p): Likewise.
6288 (grok_op_properties): Likewise.
6289 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
6290 (lang_mark_tree): Don't try to mark the operator_code.
6291 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
6292 * error.c (dump_decl): Remove special handling for operator
6294 (dump_function_name): Likewise.
6295 (dump_expr): Adjust name lookup of operators.
6296 (op_to_string): Simplify.
6297 (assop_to_string): Likewise.
6298 * init.c (build_new_1): Adjust use of ansi_opname.
6299 * lex.c (opname_tab): Remove.
6300 (assignop_tab): Likewise.
6301 (ansi_opname): Likewise.
6302 (ansi_assopname): Likewise.
6303 (operator_name_string): Likewise.
6304 (reinit_lang_specific): Likewise.
6305 (operator_name_info): New variable.
6306 (assignment_operator_name_info): Likewise.
6307 (init_operators): New function.
6308 (init_parse): Use it.
6309 (do_identifier): Adjust use of ansi_opname.
6310 * method.c (mangle_expression): Don't use ansi_opname for
6312 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
6313 (build_decl_overload): Remove.
6314 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
6315 (do_build_assign_ref): Adjust use of ansi_opname.
6316 (synthesize_method): Likewise.
6317 (implicitly_declare_fn): Likewise.
6318 * operators.def: New file.
6319 * parse.y (operator): Adjust use of ansi_opname.
6320 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
6321 (set_mangled_name_for_template_decl): Don't play games with
6323 (special_function_p): Adjust use of ansi_opname.
6324 * typeck.c (check_return_expr): Likewise.
6325 * Make-lang.in (cc1plus): Depend on operators.def.
6326 * Makefile.in (lex.o): Likewise.
6329 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
6331 * Make-lang.in (cplib2.ready): Eradicate.
6333 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6335 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
6336 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
6337 (built_min, cp_tree_equal): Likewise.
6339 2000-05-26 Mark Mitchell <mark@codesourcery.com>
6341 * class.c (layout_nonempty_base_or_field): Replace
6342 `record_layout_info' with `record_layout_info_s'.
6344 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
6347 * cp-tree.h (struct language_function): x_named_labels is now
6348 a struct named_label_list*.
6349 * decl.c (struct named_label_use_list): Renamed from...
6350 (struct named_label_list): ...this. New struct.
6351 (push_binding_level): Don't set eh_region.
6352 (note_level_for_eh): New fn.
6353 (pop_label): Take label and old value directly.
6354 (pop_labels): Adjust for new named_labels format.
6355 (lookup_label): Likewise.
6356 (poplevel): Note characteristics of a binding level containing a
6357 named label. Mess with named label lists earlier.
6358 (mark_named_label_lists): New fn.
6359 (mark_lang_function): Call it.
6360 (use_label): New fn, split out from...
6361 (make_label_decl): ...here. Don't call it.
6362 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
6363 check_previous_gotos): New fns, split out from...
6364 (define_label): ...here.
6365 (check_switch_goto): New fn.
6366 (define_case_label): Call it.
6367 (check_goto): New fn.
6368 * semantics.c (finish_goto_stmt): Call it and use_label.
6369 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
6370 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
6372 2000-05-26 Mark Mitchell <mark@codesourcery.com>
6374 * class.c (build_vtable_entry_ref): Correct usage of
6375 get_vtbl_decl_for_binfo.
6377 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
6378 * method.c (implicitly_declare_fn): Not here.
6380 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
6382 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
6383 (CPTI_PTMD_DESC_TYPE): ... here.
6384 (ptmd_desc_type_node): Rename to ...
6385 (ptm_desc_type_node): ... here.
6387 * rtti.c (ptmd_initializer): Rename to ...
6388 (ptm_initializer): ... here.
6389 (sythesize_tinfo_var): Adjust. Deal with pointer to member
6391 (create_tinfo_types): Adjust.
6393 2000-05-25 Mark Mitchell <mark@codesourcery.com>
6395 Finish implementation of VTTs.
6396 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
6397 CPTI_VTT_PARM_IDENTIFIER.
6398 (vtt_parm_identifier): New macro.
6399 (vtt_parm_type): Likewise.
6400 (BINFO_SUBVTT_INDEX): Likewise.
6401 (BINFO_VPTR_INDEX): Likewise.
6402 (struct lang_decl): Add vtt_parm.
6403 (DECL_VTT_PARM): New macro.
6404 (DECL_USE_VTT_PARM): Likewise.
6405 (DECL_NEEDS_VTT_PARM_P): Likewise.
6406 (get_vtt_name): Declare.
6407 (build_artifical_parm): Likewise.
6408 (fixup_all_virtual_upcast_offsets): Likewise.
6409 (expand_indirect_vtbls_init): Remove.
6410 * call.c (build_new_method_call): Pass the vtt to subobject
6411 constructors and destructors.
6412 * class.c (get_vtt_name): Give it external linkage.
6413 (build_clone): Handle the magic VTT parameters for clones.
6414 (clone_function_decl): Fix typo in comment.
6415 (build_vtt): Keep track of the indices in the VTTs where various
6416 entities are stored.
6417 (build_vtt_inits): Likewise.
6418 (dfs_build_vtt_inits): Likewise.
6419 (build_ctor_vtbl_group): Tweak type of construction vtables.
6420 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
6421 primary bases, when building construction vtables.
6422 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
6423 (initialize_predefined_identifiers): Add vtt_parm_identifier.
6424 (init_decl_processing): Initialize vtt_parm_type.
6425 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
6426 (lang_mark_tree): Make vtt_parm.
6427 * decl2.c (build_artificial_parm): New function.
6428 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
6429 (grokclassfn): Use build_artificial_parm.
6430 * init.c (initialize_vtbl_ptrs): Call
6431 fixup_all_virtual_upcast_offsets directly.
6432 (perform_member_init): Use the complete subobject destructor for
6434 (build_vtbl_address): New function.
6435 (expand_virtual_init): Handle VTTs.
6436 * optimize (maybe_clone_body): Likewise.
6437 * search.c (fixup_all_virtual_upcast_offsets): Give it external
6439 (expand_indirect_vtbls_init): Remove.
6440 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
6441 * tree.c (make_binfo): Make them bigger.
6443 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
6445 * inc/cxxabi.h (__pbase_type_info): Define, based on
6446 __pointer_type_info.
6447 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
6448 (__pointer_to_member_type_info): Likewise.
6449 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
6450 (__pointer_to_member_type_info::__is_pointer_p): Remove.
6451 (__pointer_type_info::__do_catch): Rename to ...
6452 (__pbase_type_info::__do_catch): ... here. Adjust.
6453 (__pbase_type_info::__pointer_catch): Implement.
6454 (__pointer_type_info::__pointer_catch): Adjust.
6455 (__pointer_to_member_type_info::__pointer_catch): Adjust.
6457 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
6459 * tinfo.h (__user_type_info::contained_virtual_p): New
6461 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
6463 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
6464 diamond shaped heirarchy. Add early out for mixed diamond and
6465 duplicate shaped heirarchy.
6467 2000-05-24 Mark Mitchell <mark@codesourcery.com>
6469 * cp-tree.h (build_delete): Change prototype.
6470 (build_vec_delete): Likewise.
6471 * call.c (build_scoped_method_call): Use special_function_kind
6472 values to indicate the kind of destruction to be done.
6473 (build_method_call): Likewise.
6474 * decl.c (finish_destructor_body): Likewise.
6475 (maybe_build_cleanup_1): Likewise. Rename to ...
6476 (maybe_build_cleanup): ... this.
6477 * decl2.c (delete_sanity): Use special_function_kind
6478 values to indicate the kind of destruction to be done.
6479 (build_cleanup): Likewise.
6480 * init.c (perform_member_init): Likewise.
6481 (build_vec_delete_1): Likewise.
6482 (build_dtor_call): Simplify.
6483 (build_delete): Use special_function_kind
6484 values to indicate the kind of destruction to be done.
6485 (build_vbase_delete): Likewise.
6486 (build_vec_delete): Likewise.
6488 * init.c (sort_member_init): Fix typo in error message generation
6491 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
6493 * semantics.c (begin_class_definition): make the packed
6494 attribute be sensitive to the "-fpack-struct" command line flag
6496 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
6498 Update new-abi upcast algorithm.
6499 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
6500 prototype and meaning of return value.
6501 (__si_class_type_info::__do_upcast): Likewise.
6502 (__vmi_class_type_info::__do_upcast): Likewise.
6503 * tinfo.cc (__class_type_info::__upcast_result): Replace
6504 whole2dst with part2dst. Adjust ctor.
6505 (__class_type_info::__do_upcast): Adjust call of worker function.
6506 (__class_type_info::__do_upcast): Adjust.
6507 (__si_class_type_info::__do_upcast): Adjust. Use parent's
6509 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
6510 virtual base in diamond heirarchy bug.
6512 2000-05-23 Mark Mitchell <mark@codesourcery.com>
6514 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
6515 and bitfield to tinfo_fn_p.
6516 (DECL_TINFO_FN_P): Adjust.
6517 (SET_DECL_TINFO_FN_P): Likewise.
6518 (DECL_MUTABLE_P): Likewise.
6519 (DECL_C_BIT_FIELD): Likewise.
6520 (SET_DECL_C_BIT_FIELD): Likewise.
6521 (CLEAR_DECL_C_BIT_FIELD): Likewise.
6522 (DECL_UNINLINABLE): Likewise.
6523 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
6524 (handle_using_decl): Remove assertion.
6525 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
6526 to build FIELD_DECLs.
6527 (build_base_field): Likewise.
6528 (layout_class_type): Likewise.
6529 * decl.c (init_decl_processing): Likewise.
6530 (build_ptrmemfunc_type): Likewise.
6531 (grokdeclarator): Likewise.
6532 * decl2.c (grok_x_components): Likewise.
6533 * except.c (call_eh_info): Likewise.
6534 * init.c (init_init_processing): Likewise.
6535 * rtti.c (expand_class_desc): Likewise.
6536 (create_pseudo_type_info): Likewise.
6537 (get_vmi_pseudo_type_info): Likewise.
6538 (create_tinfo_types): Likewise.
6539 * ptree.c (print_lang_decl): Adjust.
6540 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
6541 before checking DECL_MUTABLE_P.
6543 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
6544 parameters for template functions.
6545 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
6546 destructors as well as constructors.
6548 2000-05-22 Mark Mitchell <mark@codesourcery.com>
6550 * class.c (build_ctor_vtbl_group): Set inits.
6551 * optimize.c (maybe_clone_body): Set DECL_INLINE and
6552 DECL_THIS_INLINE appropriately for clones.
6554 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
6555 (DECL_CONV_FN_P): Simplify.
6556 (DECL_OPERATOR): Remove.
6557 (language_to_string): Declare.
6558 * decl.c (duplicate_decls): Fix typo in comment.
6559 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
6560 (grok_op_properties): Use DECL_CONV_FN_P instead of
6561 IDENTIFIER_TYPENAME_P.
6562 * dump.c (dequeue_and_dump): Dump the language linkage of
6564 * error.c (language_to_string): Give it external linkage.
6565 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
6566 (implicitly_declare_fn): Set DECL_LANGUAGE.
6567 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
6568 IDENTIFIER_TYPENAME_P.
6569 (tsubst_decl): Likewise.
6570 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
6571 * semantics.c (finish_member_declaration): Don't mark members of
6572 classes declared in an extern "C" region as extern "C".
6574 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6576 * decl2.c (qualified_lookup_using_namespace): Look through
6579 * decl.c (push_using_decl): Return the old decl on namespace level.
6581 2000-05-21 Mark Mitchell <mark@codesourcery.com>
6583 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
6584 (VTT_NAME_PREFIX): New macro.
6585 (CTOR_VTBL_NAME_PREFIX): Likewise.
6586 (get_ctor_vtbl_name): New function.
6587 * class.c (get_vtable_name): Simplify.
6588 (get_vtt_name): New function.
6589 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
6590 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
6591 when a virtual base becomes primary.
6592 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
6594 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
6595 additional parameters.
6596 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
6597 (initialize_array): New function.
6598 (build_vtt): Likewise.
6599 (build_vtt_inits): Likewise.
6600 (dfs_build_vtt_inits): Likewise.
6601 (dfs_fixup_binfo_vtbls): Likewise.
6602 (build_ctor_vtbl_group): Likewise.
6603 (initialize_vtable): Use initialize_array.
6604 (accumulate_vtbl_inits): Reimplement to handle construction
6606 (dfs_accumulate_vtbl_inits): Likewise.
6607 (bulid_vtbl_initializer): Adjust parameter name.
6608 * method.c (build_typename_overload): Remove #if 0'd code.
6609 (get_ctor_vtbl_name): New function.
6610 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
6611 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
6613 * cp-tree.h (struct lang_type): Remove search_slot.
6614 (CLASSTYPE_SEARCH_SLOT): Remove.
6615 (emit_base_init): Change prototype.
6616 (initialize_vtbl_ptrs): Likewise.
6617 (expand_indirect_vtbls_init): Likewise.
6618 (clear_search_slots): Remove.
6619 * decl.c (lang_mark_tree): Don't mark search_slot.
6620 * init.c (initialize_vtbl_ptrs): Simplify.
6621 (emit_base_init): Likewise.
6622 * search.c (struct vbase_info): Document decl_ptr.
6623 (convert_pointer_to_single_level): Remove.
6624 (dfs_find_vbases): Remove.
6625 (dfs_init_base_pointers): Simplify.
6626 (dfs_clear_vbase_slots): Remove.
6627 (dfs_vtable_path_unmark): New function.
6628 (init_vbase_pointers): Simplify.
6629 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
6630 (expand_indirect_vtbls_init): Simplify. Don't call
6631 mark_all_temps_used.
6632 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
6633 initialize_vtbl_ptrs.
6635 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
6637 * except.c: Add static prototypes.
6639 2000-05-20 H.J. Lu <hjl@gnu.org>
6641 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
6643 2000-05-19 Mark Mitchell <mark@codesourcery.com>
6645 Don't create a separate copy of virtual bases for the
6646 CLASSTYPE_VBASECLASSES list.
6647 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
6648 (BINFO_FOR_VBASE): Remove.
6649 (CANONICAL_BINFO): Adjust.
6650 (binfo_for_vbase): New function.
6651 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
6652 instead of BINFO_FOR_VBASE.
6653 (build_vbase_pointer): Likewise.
6654 (build_secondary_vtable): Likewise.
6655 (dfs_mark_primary_bases): Likewise.
6656 (mark_primary_bases): Likewise.
6657 (layout_nonempty_base_or_field): Likewise.
6658 (dfs_set_offset_for_shared_vbases): Likewise.
6659 (dfs_set_offset_for_unshared_vbases): Likewise.
6660 (layout_virtual_bases): Likewise. Adjust for changes to the
6661 CLASSTYPE_VBASECLASSES list.
6662 (dump_class_hierarchy_r): Use binfo_for_vbase
6663 instead of BINFO_FOR_VBASE.
6664 (dump_class_hierarchy): Likewise.
6665 (finish_vtbls): Likewise.
6666 (build_vtbl_initializer): Adjust for changes to the
6667 CLASSTYPE_VBASECLASSES list.
6668 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
6669 * decl.c (finish_destructor_body): Adjust for changes to the
6670 CLASSTYPE_VBASECLASSES list.
6671 * init.c (sort_base_init): Use binfo_for_vbase.
6672 (construct_virtual_bases): Adjust for changes to the
6673 CLASSTYPE_VBASECLASSES list.
6674 (expand_member_init): Use binfo_for_vbase.
6675 (build_vbase_delete): Adjust for changes to the
6676 CLASSTYPE_VBASECLASSES list.
6677 * method.c (do_build_copy_constructor): Likewise.
6678 * rtti.c (get_base_offset): Use binfo_for_vbase.
6679 (expand_class_desc): Remove #if 0'd code.
6680 * search.c (struct vbase_info): Remove vbase_types.
6681 (get_base_distance): Use binfo_for_vbase.
6682 (lookup_field_queue_p): Use CANONICAL_BINFO.
6683 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
6684 (get_pure_virtuals): Adjust for changes to the
6685 CLASSTYPE_VBASECLASSES list.
6686 (dfs_find_vbases): Use binfo_for_vbase.
6687 (dfs_init_vbase_pointers): Likewise.
6688 (init_vbase_pointers): Don't initialize vi.vbase_types.
6689 (virtual_context): Use binfo_for_vbase.
6690 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
6691 CLASSTYPE_VBASECLASSES list.
6692 (expand_indirect_vtbls_init): Simplify.
6693 (dfs_get_vbase_types): Don't replicate virtual bases.
6694 (find_vbase_instance): Use binfo_for_vbase.
6695 (binfo_for_vbase): New function.
6696 * typeck.c (get_delta_difference): Use binfo_for_vbase.
6698 2000-05-17 Mark Mitchell <mark@codesourcery.com>
6700 * decl2.c (finish_anon_union): Generalize error messages to handle
6701 anonymous structures.
6702 * init.c (perform_member_init): Remove `name' parameter.
6703 (build_field_list): New function.
6704 (sort_member_init): Handle anonymous union initialization order
6705 correctly. Check for multiple initializations of the same union.
6706 (emit_base_init): Don't look up fields by name here.
6707 (expand_member_init): Record the result of name lookup for future
6709 * typeck.c (build_component_ref): Fix formatting.
6711 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
6713 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
6714 * typeck.c (build_x_compound_expr): Replace warn_unused with
6717 * decl2.c (lang_decode_option): Update -Wall unused flags by
6718 calling set_Wunused.
6720 2000-05-16 Mark Mitchell <mark@codesourcery.com>
6722 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
6723 * init.c (dfs_vtable_path_unmark): Remove.
6724 * search.c (marked_new_vtable_p): Likewise.
6725 (unmarked_new_vtable_p): Likewise.
6726 (dfs_search_slot_nonempty_p): Likewise.
6727 (dfs_mark): Likewise.
6728 (dfs_vtable_path_unmark): Likewise.
6729 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
6730 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
6731 (dfs_init_vbase_pointers): Remove special-case new ABI code.
6732 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
6733 (init_vbase_pointers): Simplify.
6734 (expand_indirect_vtbls_init): Likewise.
6736 * class.c (copy_virtuals): New function.
6737 (build_primary_table): Use it.
6738 (build_secondary_vtable): Likewise.
6739 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
6740 indicate that no vcall offset is required.
6741 (add_virtual_function): Likewise.
6742 (modify_all_vtables): Likewise.
6743 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
6744 (dfs_accumulate_vtbl_inits): Likewise.
6745 (build_vtbl_initializer): Make changes to handle construction
6747 (dfs_build_vcall_offset_vtbl_entries): Likewise.
6748 (build_rtti_vtbl_entries): Likewise.
6749 (build_vtable_entries): Handle a NULL vcall_index.
6751 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
6753 * decl2.c (lang_decode_option): Fix thinko.
6755 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
6757 * except.c (check_handlers): New fn.
6758 * cp-tree.h: Declare it.
6759 * semantics.c (finish_handler_sequence): Call it.
6760 (finish_function_handler_sequence): Likewise.
6761 (finish_handler_parms): Set TREE_TYPE on the handler.
6762 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
6763 * search.c (get_base_distance_recursive): If protect>1, ignore
6765 (get_base_distance): Don't reduce watch_access.
6767 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
6769 * lex.c: #include diagnostic.h.
6770 (lang_init_options): Set default prefixing rules.
6772 * lang-options.h: Add -fdiagnostics-show-location=.
6774 * decl2.c: #include diagnostic.h.
6775 (lang_decode_option): Handle -fdiagnostics-show-location=.
6777 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
6779 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
6780 * vec.cc: Revert my 2000-05-07 change.
6782 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
6784 * class.c (check_field_decls): Complain about non-static data
6785 members with same name as class in class with constructor.
6787 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
6789 * decl.c (grokdeclarator): Allow non-static data members with
6792 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
6794 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
6795 and pending_inline.filename. Update prototypes.
6796 * decl.c (define_label): Constify filename parameter.
6797 * decl2.c (warn_if_unknown_interface): Constify local char *.
6798 * input.c Constify input_source.filename. Don't declare
6799 input_filename or lineno. Constify filename parameter to feed_input.
6800 * lex.c (init_parse): Constify parameter and return value.
6801 (cp_pragma_interface, cp_pragma_implementation): Constify
6803 (reinit_parse_for_method, reinit_parse_for_block,
6804 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
6805 Constify local char *.
6806 * pt.c: Don't declare lineno or input_filename.
6807 (print_template_context, tsubst_friend_function, tsubst_decl,
6808 tsubst, instantiate_decl): Constify local char *.
6809 * semantics.c (expand_body): Constify local char *.
6810 * tree.c (build_srcloc): Constify filename parameter.
6811 * typeck.c (c_expand_asm_operands): Constify filename
6814 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
6816 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
6819 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
6821 * inc/cxxabi.h: Fix typos in comment.
6822 (__base_class_info::__offset): Use a static_cast.
6824 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
6826 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
6827 of std::size_t and std::ptrdiff_t respectively.
6828 * tinfo.cc: Likewise.
6831 2000-05-06 Richard Henderson <rth@cygnus.com>
6833 * typeck.c (build_c_cast): Don't warn integer->pointer size
6834 mismatch for constants.
6836 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
6838 * rtti.c (ptmd_initializer): Set non-public, if class is
6841 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
6842 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6843 __cxa_vec_delete): Likewise.
6844 * tinfo.cc (__dynamic_cast): Likewise.
6845 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6846 __cxa_vec_delete): Likewise.
6848 2000-05-04 Mark Mitchell <mark@codesourcery.com>
6850 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
6851 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
6852 (lang_decl_flags): Add vcall_offset.
6853 (THUNK_VCALL_OFFSET): Use it.
6854 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
6855 * method.c (make_thunk): Create the lang_decl here, not in
6857 (emit_thunk): Make generic thunks into ordinary functions once
6858 they have been fed to expand_body.
6859 * semantics.c (expand_body): Set current_function_is_thunk here.
6861 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6863 * class.c (update_vtable_entry_for_fn): Prototype.
6865 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
6868 * search.c (dfs_build_inheritance_graph_order): Prototype.
6870 2000-05-04 Mark Mitchell <mark@codesourcery.com>
6872 * cp-tree.h (special_function_kind): Add various kinds of
6874 (special_function_p): New function.
6875 * class.c (overrides): Don't let one kind of destructor override
6877 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
6878 whether or not to instantiate a template.
6879 * tree.c (special_function_p): Define.
6881 2000-05-03 Mark Mitchell <mark@codesourcery.com>
6883 * cp-tree.def (THUNK_DECL): Remove.
6884 * cp-tree.h (DECL_THUNK_P): New macro.
6885 (DECL_NON_THUNK_FUNCTION_P): Likewise.
6886 (DECL_EXTERN_C_FUNCTION_P): Likewise.
6887 (SET_DECL_THUNK_P): Likewise.
6888 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
6889 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
6890 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
6891 * decl.c (decls_match): Use DECL_EXTERN_C_P.
6892 (duplicate_decls): Likewise.
6893 (pushdecl): Likewise. Adjust thunk handling.
6894 (grokfndecl): Use DECL_EXTERN_C_P.
6895 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
6896 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
6897 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
6898 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
6899 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
6900 DECL_NO_STATIC_CHAIN.
6901 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
6902 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
6903 * search.c (covariant_return_p): Remove THUNK_DECL handling.
6906 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
6908 * tree.c (walk_tree): Set lineno.
6910 2000-05-01 Mark Mitchell <mark@codesourcery.com>
6912 * exception.cc: Update license notice.
6914 * new1.cc: Likewise.
6915 * new2.cc: Likewise.
6916 * tinfo.cc: Likewise.
6917 * tinfo2.cc: Likewise.
6919 * inc/cxxabi.h: Likewise.
6920 * inc/exception: Likewise.
6921 * inc/new: Likewise.
6922 * inc/new.h: Likewise.
6923 * inc/typeinfo: Likewise.
6925 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
6927 * tree.c (build_target_expr_with_type): If we already have a
6928 TARGET_EXPR, just return it.
6930 * optimize.c (initialize_inlined_parameters): Don't generate an
6931 EXPR_STMT if we can just use DECL_INITIAL.
6932 * decl.c (emit_local_var): Only make the initialization a
6933 full-expression if stmts_are_full_exprs_p.
6935 2000-05-01 Mark Mitchell <mark@codesourcery.com>
6937 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
6939 * call.c (standard_conversion): Use it.
6940 (direct_reference_binding): Likewise.
6941 (build_over_call): Likewise.
6942 (is_properly_derived_from): Likewise.
6943 (compare_ics): Likewise.
6944 * class.c (resolves_to_fixed_type_p): Likewise.
6945 * optimize.c (declare_return_variable): Likewise.
6946 * pt.c (is_specialization_of): Likewise.
6948 * typeck.c (comp_target_parms): Likeiwse.
6949 (build_static_cast): Likewise.
6950 (build_reinterpret_cast): Likewise.
6951 (build_const_cast): Likewise.
6952 (comp_ptr_ttypes_real): Likewise.
6953 (comp_ptr_ttypes_const): Likewise.
6954 * typeck2.c (process_init_constructor): Likewise.
6956 2000-04-30 Scott Snyder <snyder@fnal.gov>
6958 * decl.c (finish_destructor_body): Use the base destructor when
6959 destroying virtual bases.
6961 2000-04-30 Mark Mitchell <mark@codesourcery.com>
6963 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
6965 * optimize.c (struct inline_data): Add target_exprs field.
6966 (declare_return_variable): When a function returns an aggregate,
6967 use the variable declared in the TARGET_EXPR as the remapped
6969 (expand_call_inline): Update the pending target_exprs stack.
6970 (optimize_function): Initialize the stack.
6972 * decl2.c (finish_file): Fix typo in comment.
6974 * method.c (emit_thunk): Don't try to return a `void' value.
6976 * optimize.c (initialize_inlined_parameters): If the parameter is
6977 addressable, we need to make a new VAR_DECL, even if the
6978 initializer is constant.
6980 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
6982 * decl.c (grok_op_properties): Add an extra check of argtypes.
6984 2000-04-27 Mark Mitchell <mark@codesourcery.com>
6986 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
6988 (initialize_inlined_parameters): Try to avoid creating new
6991 2000-04-27 Alex Samuel <samuel@codesourcery.com>
6993 * lex.c (my_get_run_time): Remove.
6994 (init_filename_times): Use get_run_time instead of my_get_run_time.
6995 (check_newline): Likewise.
6996 (dump_time_statistics): Likewise.
6997 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
6998 of computing elapsed time explicitly.
7000 2000-04-26 Mark Mitchell <mark@codesourcery.com>
7002 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
7003 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
7004 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
7005 before calling decl_constant_value.
7006 * class.c (check_bitfield_decl): Likewise.
7007 * cvt.c (ocp_convert): Likewise.
7008 (convert): Likewise.
7009 * decl.c (compute_array_index_type): Likewise.
7010 (build_enumerator): Likewise.
7011 * decl2.c (check_cp_case_value): Likewise.
7012 * pt.c (convert_nontype_argument): Likewise.
7014 * typeck.c (decay_conversion): Likewise.
7015 (build_compound_expr): Likewise.
7016 (build_reinterpret_cast): Likewise.
7017 (build_c_cast): Likewise.
7018 (convert_for_assignment): Likewise.
7020 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
7022 * decl.c (finish_function): Don't play games with DECL_INLINE.
7024 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
7026 * ir.texi: Correct typo.
7028 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7030 * decl.c (grokdeclarator): Reject VLAs as members.
7032 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
7034 * call.c (standard_conversion): Accept conversion between
7037 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
7039 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
7041 * decl2.c (finish_file): Remove double setup for accounting
7044 2000-04-24 Robert Lipe <robertlipe@usa.net>
7046 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
7048 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
7050 * new.cc (set_new_handler): Needs to be in std::.
7052 2000-04-23 Mark Mitchell <mark@codesourcery.com>
7054 * cp-tree.h (lang_decl): Remove pretty_function_p.
7055 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
7056 language-specific node.
7057 * decl.c (cp_make_fname_decl): Use build_decl, not
7058 build_lang_decl, to build the variables.
7059 (grokvardecl): Don't call build_lang_decl for local variables in
7061 (grokdeclarator): Don't call build_lang_decl for local type
7062 declarations in templates.
7063 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
7064 zero'd memory, rather than calling memset.
7065 * pt.c: Include hashtab.h.
7066 (local_specializations): New variable.
7067 (retrieve_local_specialization): Use it.
7068 (register_local_specialization): Likewise.
7069 (tsubst_decl): Don't assume local variables have
7071 (instantiate_decl): Set up local_specializations.
7072 * Makefile.in (HTAB_H): New variable.
7074 2000-04-23 Richard Henderson <rth@cygnus.com>
7076 * typeck.c (c_expand_asm_operands): Restore the original
7077 contents of the output list.
7079 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
7081 * ir.texi: Document complex number representation.
7083 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
7085 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
7086 (target_incomplete_p): New function.
7087 (tinfo_base_init): Create comdat NTBS name variable.
7088 (ptr_initializer): Add non_public parameter. Calculate it.
7089 (ptmd_initializer): Likewise.
7090 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
7091 (create_real_tinfo_var): Add non_public parameter. Use it.
7092 Push proxy into global namespace.
7093 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
7095 * inc/typeinfo (type_info::before, type_info::operator==):
7096 Compare __name addresses.
7098 * tinfo2.cc: Remove new-abi builtins comment.
7100 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
7102 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
7104 * call.c (joust): Exit early if we get the same function, too.
7106 * decl2.c (key_method): Return NULL_TREE for template classes.
7107 (import_export_class): Don't need to check for template classes.
7109 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
7111 * lex.c: Remove references to cccp.c.
7113 2000-04-18 Mark Mitchell <mark@codesourcery.com>
7115 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
7116 volatile_memfunc. Add destructor_attr. Adjust dummy.
7117 (DECL_DESTRUCTOR_P): Use destructor_attr.
7118 (DECL_CONST_MEMFUNC_P): Reimplement.
7119 (DECL_VOLATILE_MEMFUNC_P): Remove.
7120 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
7121 (overrides): Use DECL_DESTRUCTOR_P.
7122 (check_for_override): Likewise.
7123 * decl.c (start_function): Likewise.
7124 * decl2.c (grokfclassfn): Likewise.
7125 (check_classfn): Likewise.
7126 (grok_function_init): Likewise.
7128 2000-04-17 Mark Mitchell <mark@codesourcery.com>
7130 * decl2.c (grokfield): Issue error on illegal data member
7133 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
7135 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
7137 2000-04-16 Mark Mitchell <mark@codesourcery.com>
7139 * class.c (build_vtable_entry): Don't build thunks for type-info
7142 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
7144 * decl.c (decls_match): Allow a redeclaration of a builtin to
7145 specify args while the builtin did not.
7147 2000-04-15 Mark Mitchell <mark@codesourcery.com>
7149 * cp-tree.def (THUNK_DECL): Add to documentation.
7150 * cp-tree.h (flag_huge_objects): Declare.
7151 * class.c (modify_vtable_entry): Tidy.
7152 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
7153 Calculate delta appropriately for the new ABI.
7154 (dfs_modify_vtables): Use it.
7155 (modify_all_vtables): Fix thinko in code to add overriding copies
7156 of functions to primary vtables.
7157 (build_clone): Fix typo in comment.
7158 (clone_function_decl): Correct order of destructors in vtable.
7159 (build_vbase_offset_vtbl_entries): Adjust comment.
7160 (dfs_vcall_offset_queue_p): Remove.
7161 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
7162 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
7163 (build_vtable_entry): Correct check for pure virtual functions.
7164 Don't declare flag_huge_objects.
7165 * decl.c (flag_huge_objects): Remove declaration.
7166 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
7167 Use int_size_in_bytes.
7168 (emit_thunk): Handle vcall offset thunks.
7170 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7172 * decl2.c (parse_time, varconst_time): Delete declarations.
7173 (finish_file): Delete LINENO declaration.
7174 START_TIME and THIS_TIME now long.
7176 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
7178 * class.c (build_base_field): Reformat comment.
7180 * inc/cxxabi.h (stddef.h): Comment inclusion.
7181 (__base_class_info::__offset): Comment shift.
7183 2000-04-12 Mark Mitchell <mark@codesourcery.com>
7185 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
7186 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
7187 (cp_push_exception_identifier): New macro.
7188 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
7189 (DECL_BASE_DESTRUCTOR_P): Likewise.
7190 (DECL_DELETING_DESTRUCTOR_P): Likewise.
7191 (get_vtbl_decl_for_binfo): Fix formatting.
7192 (in_charge_arg_for_name): New macro.
7193 (maybe_build_cleanup_and_delete): Remove declaration.
7194 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
7195 (in_charge_arg_for_name): New function.
7196 (build_new_method_call): Use it. Handle cloned destructors.
7197 (build_clone): Don't make the base constructor virtual.
7198 Automatically defer generated functions.
7199 (clone_function_decl): Handle destructors, too.
7200 (clone_constructors_and_destructors): Likewise.
7201 (create_vtable_ptr): Don't create a vtable entry for a cloned
7203 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
7204 (initialize_predefined_identifiers): Update appropriately.
7205 (finish_destructor_body): Simplify.
7206 (maybe_build_cleanup_and_delete): Remove.
7207 * except.c (expand_throw): Handle new-ABI destructors.
7208 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
7209 (build_dtor_call): New function.
7210 (build_delete): Use it. Simplify.
7211 * optimize.c (maybe_clone_body): Handle destructors.
7212 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
7214 * exception.cc (cleanup_fn): New typedef.
7215 (CALL_CLEANUP): New macro.
7216 (cp_eh_info): Use them.
7217 (__cp_push_exception): Likewise.
7218 (__cp_pop_exception): Likewise.
7220 2000-04-11 Mark Mitchell <mark@codesourcery.com>
7222 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
7223 (complete_dtor_identifier): New macro.
7224 (CLASSTYPE_FIRST_CONVERSION): Remove.
7225 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
7226 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
7227 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
7228 (CLASSTYPE_CONSTRUCTORS): Likewise.
7229 (CLASSTYPE_DESTRUCTORS): Likewise.
7230 (lang_decl): Add cloned_function.
7231 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
7232 (DECL_BASE_CONSTRUCTOR_P): Likewise.
7233 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
7234 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
7235 (DECL_CLONED_FUNCTION_P): Likewise.
7236 (DECL_CLONED_FUNCTION): Likewise.
7237 (clone_function_decl): Declare.
7238 (maybe_clone_body): Likewise.
7239 * call.c (build_user_type_conversion_1): Call complete object
7240 constructors in the new ABI.
7241 (build_new_method_call): Don't add in-charge parameters under the
7243 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
7244 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
7245 CLASSTYPE_DESTRUCTOR_SLOT.
7246 (build_clone): New function.
7247 (clone_function_decl): Likewise.
7248 (clone_constructors_and_destructors): Likewise.
7249 (check_bases_and_members): Use it.
7250 * decl.c (iniitialize_predefined_identifiers): Initialize
7251 complete_dtor_identifier.
7252 (finish_function): Don't add extra code to a clone.
7253 (lang_mark_tree): Mark cloned_function.
7254 * decl2.c (mark_used): Don't bother trying to instantiate things
7256 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
7257 * method.c (set_mangled_name_for_decl): Don't treat clones as
7259 (synthesize_method): Sythesize cloned functions, not the clones.
7260 * optimize.c (inline_data): Update comment on ret_label.
7261 (remap_block): Don't assume DECL_INITIAL exists.
7262 (copy_body_r): Allow ret_label to be NULL.
7263 (maybe_clone_body): Define.
7264 * pt.c (tsubst_decl): Handle clones.
7265 (instantiate_clone): New function.
7266 (instantiate_template): Use it.
7267 (set_mangled_name_for_template_decl): Don't treat clones as
7269 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
7270 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
7271 * semantics.c (expand_body): Clone function bodies as necessary.
7273 * optimize.c (remap_decl): Avoid sharing structure for arrays
7274 whose size is only known at run-time.
7275 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
7277 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
7278 to has_in_charge_parm_p.
7279 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
7280 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
7281 (DECL_COPY_CONSTRUCTOR_P): New macro.
7282 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
7283 (build_user_type_conversion_1): Likewise.
7284 (convert_like_real): Likewise.
7285 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
7286 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
7287 (copy_args_p): Likewise.
7288 (grok_ctor_properties): Likewise.
7289 (start_function): Likewise.
7290 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
7291 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
7292 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
7293 * method.c (do_build_copy_constructor): Use
7294 DECL_HAS_IN_CHARGE_PARM_P.
7295 (synthesize_method): Likewise.
7296 * pt.c (instantiate_template): Remove goto.
7297 * tree.c (build_cplus_method_type): Remove mention of obstacks in
7300 * cp-tre.h (finish_function): Change prototype.
7301 * decl.c (end_cleanup_fn): Adjust caller.
7302 (finish_function): Take only one parameter.
7303 * decl2.c (finish_objects): Adjust caller.
7304 (finish_static_storage_duration_function): Likewise.
7305 * method.c (emit_thunk): Likewise.
7306 * parse.y: Likewise.
7307 * parse.c: Regenerated.
7308 * pt.c (instantiate_decl): Likewise.
7309 * rtti.c (synthesize_tinfo_fn): Likewise.
7310 * semantics.c (expand_body): Likewise.
7312 * cp-tree.h (copy_decl): New function.
7313 * class.c (finish_struct_1): Use it.
7314 * lex.c (copy_decl): Define it.
7315 * pt.c (tsubst_decl): Likewise.
7316 * tree.c (copy_template_template_parm): Likewise.
7318 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
7319 has_nonpublic_assign_ref.
7320 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
7321 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
7322 * class.c (finish_struct_methods): Don't set
7323 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
7324 (interface_only): Don't declare.
7325 (interface_unknown): Likewise.
7327 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7329 * tree.h (HAVE_TEMPLATES): Remove definition.
7330 * lang-options.h (-fthis-is-variable): Remove documentation.
7332 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
7334 * class.c (instantiate_type): Handle object-relative template-id.
7336 * semantics.c (finish_expr_stmt): Call convert_to_void here.
7337 * decl.c (cplus_expand_expr_stmt): Not here.
7339 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
7340 Initialize exprtype earlier.
7342 * parse.y (fn.def1): Check for defining types in return types.
7344 * decl.c (check_tag_decl): Notice extra fundamental types.
7345 Diagnose empty decls in classes, too.
7347 * decl.c (grokdeclarator): Don't override an anonymous name if no
7348 declarator was given.
7350 * cvt.c (convert_to_void): Call resolve_offset_ref.
7352 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
7354 * decl2.c (decl_namespace): Handle getting a type.
7356 * typeck.c (build_c_cast): Re-enable warning for cast between
7357 pointer and integer of different size.
7359 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
7361 * inc/cxxabi.h (__pointer_type_info): Add restrict and
7363 (__pointer_type_info::__pointer_catch): New virtual function.
7364 (__pointer_to_member_type_info): Derive from
7365 __pointer_type_info. Adjust.
7366 (__pointer_to_member_type_info::__do_catch): Remove.
7367 (__pointer_to_member_type_info::__is_pointer_p): Declare.
7368 (__pointer_to_member_type_info::__pointer_catch): Declare.
7369 * rtti.c (qualifier_flags): Add restrict flag.
7370 (ptmd_initializer): Reorder members.
7371 (create_tinfo_types): Expand comments. Reorder
7372 ptmd_desc_type_node members.
7373 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
7375 (__pointer_type_info::__do_catch): Move specific code into
7376 __pointer_catch. Call it.
7377 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
7378 specific catch checking. Fix void conversion check.
7379 (__pointer_to_member_type_info::__do_catch): Remove.
7380 (__pointer_to_member_type_info::__pointer_catch): Implement.
7382 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7384 * lex.c (init_parse): Remove traces of classof and headof.
7385 * decl2.c (flag_operator_names): Default to 1.
7386 (lang_decode_option): Do not set it for -ansi.
7388 2000-04-09 Mark Mitchell <mark@codesourcery.com>
7390 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
7391 (DECL_MAIN_VARIANT): Remove.
7392 * decl.c (duplicate_decls): Don't set it.
7393 (start_function): Likewise.
7394 (lang_mark_tree): Don't mark it.
7395 * decl2.c (defer_fn): Don't use it.
7396 * lex.c (retrofit_lang_decl): Don't set it.
7397 * pt.c (tsubst_decl): Likewise.
7398 * ptree.c (print_lang_decl): Don't print it.
7399 * typeck.c (mark_addressable): Don't use it.
7401 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
7403 * vec.cc: Include <new> and <exception>.
7404 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
7405 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
7407 (__cxa_vec_delete): Catch dtor exceptions.
7409 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
7411 Prepend __ to implementation defined names.
7412 * inc/typeinfo (type_info): Rename _name to __name.
7413 (type_info::type_info): Rename parameter.
7414 (type_info::operator==, type_info::operator!=,
7415 type_info::before): Likewise.
7416 (type_info::is_pointer_p, type_info::is_function_p,
7417 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
7420 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
7421 (__pointer_type_info::__pointer_type_info): Likewise.
7422 (__pointer_type_info::is_pointer_p,
7423 __pointer_type_info::do_catch): Prepend __. Rename parameters.
7424 (__array_type_info::__array_type_info): Rename parameters.
7425 (__function_type_info::__function_type_info): Likewise.
7426 (__function_type_info::is_function_p): Prepend __.
7427 (__enum_type_info::__enum_type_info): Rename parameters.
7428 (__pointer_to_member_type_info::__pointer_to_member_type_info):
7430 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
7432 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
7433 (__class_type_info::__class_type_info): Rename parameters.
7434 (__class_type_info::sub_kind): Prepend __. Adjust member names.
7435 (__class_type_info::upcast_result,
7436 __class_type_info::dyncast_result): Prepend __. Move definition
7438 (__class_type_info::do_upcast, __class_type_info::do_catch,
7439 __class_type_info::find_public_src,
7440 __class_type_info::do_dyncast,
7441 __class_type_info::do_find_public_src): Prepend __. Rename
7443 (__si_class_type_info::__si_class_type_info): Rename parameters.
7444 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
7445 __si_class_type_info::do_find_public_src): Prepent __. Rename
7447 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
7448 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
7449 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
7451 (__dynamic_cast): Rename parameters.
7452 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
7453 type_info::do_catch, type_info::do_upcast): Prepend __.
7454 (contained_p, public_p, virtual_p, contained_public_p,
7455 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
7456 (__class_type_info::do_catch,
7457 __class_type_info::do_upcast): Prepend __. Adjust.
7458 (__class_type_info::__upcast_result,
7459 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
7461 (__class_type_info::find_public_src): Prepend __. Adjust.
7462 (__class_type_info::do_find_public_src,
7463 __si_class_type_info::do_find_public_src,
7464 __vmi_class_type_info::do_find_public_src): Likewise.
7465 (__class_type_info::do_dyncast,
7466 __si_class_type_info::do_dyncast,
7467 __vmi_class_type_info::do_dyncast): Likewise.
7468 (__class_type_info::do_upcast,
7469 __si_class_type_info::do_upcast,
7470 __vmi_class_type_info::do_upcast): Likewise.
7471 (__dynamic_cast): Adjust.
7472 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
7473 (__function_type_info::is_function_p): Likewise.
7474 (__pointer_type_info::do_catch): Likewise. Adjust.
7475 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
7476 (__throw_type_match_rtti_2): Adjust.
7477 (__is_pointer): Adjust.
7479 2000-04-08 Mark Mitchell <mark@codesourcery.com>
7481 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
7482 (complete_ctor_identifier): New macro.
7483 (special_function_kind): Add sfk_copy_constructor and
7484 sfk_assignment_operator.
7485 (LOOKUP_HAS_IN_CHARGE): Remove.
7486 (cons_up_default_function): Rename to ...
7487 (implicitly_declare_fn): ... this.
7488 * call.c (build_new_method_call): Add in-charge parameters for
7490 * class.c (add_implicitly_declared_members): Change parameter name
7491 from cant_have_assignment to cant_have_const_assignment.
7492 Replace calls to cons_up_default_function to implicitly_declare_fn.
7493 * cvt.c (ocp_convert): Use complete_ctor_identifier.
7494 * decl.c (initialize_predefined_identifiers): Initialize it.
7495 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
7497 * init.c (expand_default_init): Don't calculate the in-charge
7499 (build_new_1): Likewise.
7500 * lex.c (cons_up_default_function): Move to method.c.
7501 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
7502 (implicitly_declare_fn): New function.
7503 * typeck.c (build_static_cast): Use complete_ctor_identifier.
7504 (build_modify_expr): Likewise.
7505 * typeck2.c (build_functional_cast): Likewise.
7507 Under the new ABI, constructors don't return `this'.
7508 * cp-tree.h (warn_reorder): Declare.
7509 (special_function_kind): New enum.
7510 (global_base_init_list): Remove declaration.
7511 (emit_base_init): Don't return a value.
7512 (check_base_init): Don't declare.
7513 (is_aggr_typedef): Likewise.
7514 * decl.c (check_special_function_return_type): New function.
7515 (return_types): Remove.
7516 (grokdeclarator): Use check_special_function_return_type.
7517 (start_function): Don't initialize ctor_label under the new ABI.
7518 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
7519 * init.c (begin_init_stmts): Move to top of file.
7520 (finish_init_stmts): Likewise.
7521 (warn_reorder): Don't declare.
7522 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
7524 (check_base_init): Remove.
7525 (is_aggr_typedef): Likewise.
7526 (build_new_1): Don't use the return value of a constructor.
7527 * semantics.c (setup_vtbl_ptr): Don't use the return value
7529 * typeck.c (check_return_expr): Don't magically convert return
7530 statements into `return this' in constructors under the new ABI.
7532 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
7533 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
7534 (base_ctor_identifier): New macro.
7535 (base_dtor_identifier): Likewise.
7536 (deleting_dtor_identifier): Likewise.
7537 * decl.c: Don't include obstack.h.
7538 (obstack_chunk_alloc): Don't define.
7539 (obstack_chunk_free): Likewise.
7540 (struct predefined_identifier): New type.
7541 (initialize_predefined_identifiers): New function.
7542 (init_decl_processing): Use it.
7543 (debug_temp_inits): Remove.
7544 (start_method): Don't call preserve_data.
7545 (hack_incomplete_structures): Update comment.
7546 * init.c (init_init_processing): Don't initialize
7548 (build_offset_rf): Remove dead code.
7549 (build_delete): Use CLASSTYPE_N_BASECLASSES.
7550 * search.c (init_search_processing): Don't initialize
7553 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7555 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
7556 some sign_compare warnings.
7558 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
7560 Rename abi::__vmi_class_type_info members.
7561 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
7562 base_list, detail_masks members to vmi_flags, vmi_base_count,
7563 vmi_bases and vmi_flags_masks respectively.
7564 (__vmi_class_type_info::vmi_flags_masks): Rename
7565 details_unknown_mask to flags_unknown_mask.
7566 * tinfo.cc (__class_type_info::do_upcast): Adjust.
7567 (__vmi_class_type_info::do_find_public_src): Adjust.
7568 (__vmi_class_type_info::do_dyncast): Adjust.
7569 (__vmi_class_type_info::do_upcast): Adjust.
7571 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
7573 * tinfo.cc (convert_to_base): New function.
7574 (get_vbase_offset): Remove. Move into convert_to_base.
7575 (__vmi_class_type_info::do_find_public_src): Adjust.
7576 (__vmi_class_type_info::do_dyncast): Adjust.
7577 (__vmi_class_type_info::do_upcast): Adjust.
7579 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
7581 * tinfo.cc (operator=): Use __builtin_strcmp.
7582 * tinfo2.cc (before): Likewise.
7584 2000-04-06 Mark Mitchell <mark@codesourcery.com>
7586 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
7587 (DECL_SAVED_INLINE): Rename to ...
7588 (DECL_DEFERRED_FN): ... this.
7589 (in_function_p): Remove declaration.
7590 (mark_inline_for_output): Rename to ...
7591 (defer_fn): ... this.
7592 * decl.c (finish_function): Adjust call to mark_inline_for_output.
7593 (in_function_p): Remove definition.
7594 * decl2.c (saved_inlines): Rename to ...
7595 (deferred_fns): ... this.
7596 (saved_inlines_used): Rename to ...
7597 (deferred_fns_used): ... this.
7598 (mark_inline_for_output): Rename to ...
7599 (defer_fn): ... this.
7600 (finish_file): Adjust accordingly.
7601 (init_decl2): Likewise.
7602 * lex.c (cons_up_default_function): Likewise.
7603 * pt.c (mark_decl_instantiated): Likewise.
7604 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
7606 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
7607 * semantics.c (expand_body): Defer more functions.
7609 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
7612 * Make-lang.in (CXX_LIB2FUNCS): Add it.
7614 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7615 __cxa_vec_delete): Declare.
7617 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
7619 * rtti.c (dfs_class_hint_mark): New static function.
7620 (dfs_class_hint_unmark): New static function.
7621 (class_hint_flags): Use them.
7623 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
7625 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
7627 2000-04-05 Mark Mitchell <mark@codesourcery.com>
7629 * cp-tree.h (instantiate_decl): Change prototype.
7630 * decl2.c (mark_used): Adjust call.
7631 * optimize.c (inlinable_function_p): Adjust handling of templates.
7632 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
7633 (do_type_instantiation): Likewise.
7634 (instantiate_decl): Defer more templates.
7635 (instantiate_pending_templates): Adjust logic to handle inline
7638 * Makefile.in (GGC_H): New variable. Use it throughout in place
7641 * call.c: Don't include obstack.h. Include ggc.h.
7642 (obstack_chunk_alloc): Don't define.
7643 (obstack_chunk_free): Likewise.
7644 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
7645 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
7646 (pop_switch): Free it.
7648 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
7650 * dump.c (dequeue_and_dump): Don't try to print the bit_position
7651 if we don't have a DECL_FIELD_OFFSET.
7653 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
7655 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
7658 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7660 * cfns.gperf (hash, libc_name_p): Prototype.
7662 * rtti.c (build_dynamic_cast_1): Constification.
7664 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
7666 * semantics.c (deferred_type_access_control): Prototype.
7668 2000-04-04 Mark Mitchell <mark@codesourcery.com>
7670 Correct many new ABI issues regarding vbase and vcall offset
7672 * cp-tree.h (BINFO_VTABLE): Document.
7673 (struct lang_type): Tweak formatting.
7674 (BINFO_PRIMARY_BINFO): Add to documentation.
7675 (CLASSTYPE_VSIZE): Fix typo in comment.
7676 (CLASSTYPE_VBASECLASSES): Update documentation.
7677 (BINFO_VBASE_MARKED): Remove.
7678 (SET_BINFO_VBASE_MARKED): Likewise.
7679 (CLEAR_BINFO_VBASE_MARKED): Likewise.
7680 (BINFO_FIELDS_MARKED): Remove.
7681 (SET_BINFO_FIELDS_MARKED): Likewise.
7682 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
7683 (enum access_kind): New enumeration.
7684 (num_extra_vtbl_entries): Remove declaration.
7685 (size_extra_vtbl_entries): Likewise.
7686 (get_vtbl_decl_for_binfo): New function.
7687 (dfs_vbase_unmark): Remove declaration.
7688 (mark_primary_bases): Likewise.
7689 * class.c (SAME_FN): Remove.
7690 (struct vcall_offset_data_s): Move definition.
7691 (build_vbase_pointer): Use `build', not `build_binary_op', to
7692 access the vbase pointer under the new ABI.
7693 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
7694 (build_primary_vtable): Likewise.
7695 (dfs_mark_primary_bases): Move here from search.c.
7696 (mark_primary_bases): Likewise.
7697 (determine_primary_bases): Under the new ABI, don't make a base
7698 class a primary base just because we don't yet have any virtual
7700 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
7701 (num_vfun_entries): Remove.
7702 (dfs_count_virtuals): Likewise.
7703 (num_extra_vtbl_entries): Likewise.
7704 (size_extra_vtbl_entries): Likewise.
7705 (layout_virtual_bases): Iterate in inheritance graph order under
7707 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
7708 indicate that a vfield is present.
7709 (init_class_processing): Initialize access_public_node, etc., from
7711 (get_vtbl_decl_for_binfo): New function.
7712 (dump_class_hierarchy_r): Likewise.
7713 (dump_class_hierarchy): Use it.
7714 (finish_vtbls): Build the vtbls in inheritance graph order.
7715 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
7716 (initialize_vtable): Use get_vtbl_decl_for_binfo.
7717 (accumulate_vtbl_inits): Add comments explaining why a pre-order
7719 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
7720 where the vptr points, even for primary vtables.
7721 (build_vtbl_initializer): Adjust handling of vbase and vcall
7723 (build_vcall_and_vbase_vtable_entries): New function.
7724 (dfs_build_vbase_offset_vtbl_entries): Remove.
7725 (build_vbase_offset_vtbl_entries): Reimplement.
7726 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
7727 were already handled in a primary base class vtable.
7728 (build_vcall_offset_vtbl_entries): Adjust.
7729 (build_rtti_vtbl_entries): Adjust.
7730 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
7731 * init.c (expand_virtual_init): Simplify.
7732 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
7733 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
7734 * search.c (BINFO_ACCESS): New macro.
7735 (SET_BINFO_ACCESS): Likewise.
7736 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
7737 (access_in_type): Likewise.
7738 (dfs_accessible_p): Likewise.
7739 (protected_accessible_p): Likewise.
7740 (lookup_fnfields_1): Adjust documentation.
7741 (dfs_mark_primary_bases): Move to class.c
7742 (mark_primary_bases): Likewise.
7743 (dfs_vbase_unmark): Remove.
7744 (virtual_context): Use BINFO_FOR_VBASE.
7745 (dfs_get_vbase_types): Simplify.
7746 (dfs_build_inheritance_graph_order): New function.
7747 (get_vbase_types): Use it.
7748 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
7750 * tinfo.cc (get_vbase_offset): New function.
7751 (__vmi_class_type_info::do_find_public_src): Use it.
7752 (__vmi_class_type_info::do_dyncast): Likewise.
7753 (__vmi_class_type_info::do_upcast): Likewise.
7755 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
7757 * lang-specs.h: Pass -fno-show-column to the preprocessor.
7759 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
7761 * rtti.c (class_hint_flags): Rename flags.
7762 (class_initializer): Remove flags.
7763 (synthesize_tinfo_var): Combine offset and flags. Add flags
7764 for __vmi_class_type_info.
7765 (create_tinfo_types): Remove flags from __class_type_info and
7766 __si_class_type_info. Merge flags and offset from
7767 base_class_type_info.
7768 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
7769 (__base_class_info::is_virtual_p): Adjust.
7770 (__base_class_info::is_public_p): Adjust.
7771 (__base_class_info::offset): New accessor.
7772 (__class_type_info::details): Remove member.
7773 (__class_type_info::__class_type_info): Lose details.
7774 (__class_type_info::detail_masks): Remove.
7775 (__si_class_type_info::__si_class_type_info): Lose details.
7776 (__vmi_class_type_info::details): New member.
7777 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
7778 (__vmi_class_type_info::detail_masks): New member.
7779 * tinfo.cc (__class_type_info::do_upcast): Initialize result
7780 with unknown_details_mask.
7781 (__vmi_class_type_info::do_find_public_src): Adjust
7782 (__vmi_class_type_info::do_dyncast): Adjust.
7783 (__vmi_class_type_info::do_upcast): Set result details, if
7785 (__dynamic_cast): Temporarily #if out optimization.
7787 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
7789 * rtti.c (get_tinfo_decl): Mark used.
7790 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
7791 mark as dealt with, if we output it.
7793 2000-03-28 Mark Mitchell <mark@codesourcery.com>
7795 * class.c: Reorganize to put virtual function table initialization
7796 machinery at the end of the file.
7798 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
7800 * class.c (finish_struct): Use bitsize_zero_node.
7801 * pt.c (instantiate_class_template): Likewise.
7803 2000-03-28 Mark Mitchell <mark@codesourcery.com>
7805 Put RTTI entries at negative offsets in new ABI.
7806 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
7807 vbase offset at index -3, not -1.
7808 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
7809 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
7810 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
7811 (build_rtti_vtbl_entries): New function.
7812 (set_rtti_entry): Remove.
7813 (build_primary_vtable): Don't use it.
7814 (build_secondary_vtable): Likewise.
7815 (start_vtable): Remove.
7816 (first_vfun_index): New function.
7817 (set_vindex): Likewise.
7818 (add_virtual_function): Don't call start_vtable. Do call
7820 (set_primary_base): Rename parameter.
7821 (determine_primary_base): Likewise.
7822 (num_vfun_entries): Don't use skip_rtti_stuff.
7823 (num_extra_vtbl_entries): Include RTTI information.
7824 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
7825 (skip_rtti_stuff): Remove.
7826 (dfs_modify_vtables): Don't use it.
7827 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
7828 (layout_nonempty_base_or_field): Update size handling.
7829 (create_vtable_ptr): Tweak.
7830 (layout_class_type): Adjust parameter names.
7831 (finish_struct_1): Simplify.
7832 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
7833 (skip_rtti_stuff): Remove.
7834 (first_vfun_index): New function.
7835 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
7836 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
7837 (marked_vtable_pathp): Declare.
7838 (unmarked_vtable_pathp): Likewise.
7839 * error.c (dump_expr): Use first_vfun_index to calculate vtable
7841 * rtti.c (build_headof): Look for RTTI at negative offsets.
7842 (get_tinfo_decl_dynamic): Likewise.
7843 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
7845 (create_pseudo_type_info): Do it here instead. Adjust so that
7846 vptr points at first virtual function.
7847 * search.c (marked_vtable_pathp): Make it global.
7848 (unmarked_vtable_pathp): Likewise.
7849 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
7850 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
7851 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
7852 (get_pure_virtuals): Likewise.
7853 (expand_upcast_fixups): Likewise.
7854 * tree.c (debug_binfo): Likewise.
7855 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
7858 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7860 * class.c (check_field_decl): Fix typo.
7861 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
7862 (check_methods): Likewise.
7863 (check_field_decls): Likewise.
7864 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
7865 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
7866 Use DECL_RESULT_FLD, not DECL_RESULT.
7867 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
7868 * lex.c (identifier_type): Likewise.
7869 * pt.c (determine_specialization, lookup_template_class): Likewise.
7870 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
7871 (resolve_overloaded_unification, more_specialized): Likewise.
7872 * semantics.c (finish_member_declaration): Likewise.
7873 * typeck.c (build_x_function_call): Likewise.
7875 2000-03-26 Mark Mitchell <mark@codesourcery.com>
7877 * class.c (layout_empty_base): Handle empty bases with non-byte
7879 (build_base_field): Likewise.
7880 (layout_virtual_bases): Likewise.
7882 * class.c (finish_struct_1): Fix typo in this change:
7884 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7886 2000-03-25 Mark Mitchell <mark@codesourcery.com>
7888 * decl.c (grokdeclarator): Count partial specializations when
7889 keeping track of how many template classes have been seen.
7891 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
7893 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7895 * class.c (build_vbase_pointer_fields): layout_field now place_field.
7896 (get_vfield_offset): Use byte_position.
7897 (set_rtti_entry): Set OFFSET to ssizetype zero.
7898 (get_binfo_offset_as_int): Deleted.
7899 (dfs_record_base_offsets): Use tree_low_cst.
7900 (dfs_search_base_offsets): Likewise.
7901 (layout_nonempty_base_or_field): Reflect changes in RLI format
7902 and call byte_position.
7903 (layout_empty_base): Convert offset to ssizetype.
7904 (build_base_field): use rli_size_unit_so_far.
7905 (dfs_propagate_binfo_offsets): Do computation in proper type.
7906 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
7907 (layout_class_type): Reflect changes in RLI names and fields.
7908 (finish_struct_1): Set DECL_FIELD_OFFSET.
7909 * dump.c (dequeue_and_dump): Call bit_position.
7910 * expr.c (cplus_expand_constant): Use byte_position.
7911 * rtti.c (expand_class_desc): Use bitsize_one_node.
7912 * typeck.c (build_component_addr): Use byte_position and don't
7913 special case for zero offset.
7915 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
7917 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
7919 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
7921 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
7924 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7926 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
7928 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
7929 make_typename_type, check_initializer, cp_finish_decl,
7930 xref_tag): Likewise.
7931 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
7932 decl_namespace, arg_assoc_template_arg, arg_assoc,
7933 validate_nonmember_using_decl, do_class_using_decl): Likewise.
7934 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
7935 args_to_string): Likewise.
7936 * friend.c (is_friend): Likewise.
7937 * lex.c (note_got_semicolon, note_list_got_semicolon,
7938 is_global): Likewise.
7939 * method.c (build_overload_nested_name, build_overload_value,
7940 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
7941 * parse.y (typename_sub, typename_sub1): Likewise.
7942 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
7943 process_partial_specialization, convert_template_argument,
7944 template_args_equal, add_pending_template, lookup_template_class,
7945 for_each_template_parm_r, maybe_fold_nontype_arg,
7946 tsubst, instantiate_template, type_unification_real, unify,
7947 instantiate_pending_templates, set_mangled_name_for_template_decl):
7949 * repo.c (repo_get_id, repo_template_used): Likewise.
7950 * search.c (lookup_field_1): Likewise.
7951 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
7952 * xref.c (classname): Likewise.
7954 2000-03-22 Mark Mitchell <mark@codesourcery.com>
7956 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
7957 (CANONICAL_BINFO): New macro.
7958 (BINFO_NEW_VTABLE_MARKED): Use it.
7959 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
7960 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
7961 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
7963 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7964 (build_secondary_vtable): Likewise.
7965 (dfs_finish_vtbls): Likewise.
7966 (dfs_accumulate_vtbl_inits): Likewise.
7967 (accumulate_vtbl_inits): New function.
7968 (finish_vtbls): Make sure that virtual bases come after
7969 non-virtual bases in the vtable group.
7970 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
7971 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7972 * search.c (struct vbase_info): Move definition.
7973 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7974 (unmarked_new_vtable_p): Likewise.
7975 (dfs_mark_vtable_path): Remove.
7976 (dfs_mark_new_vtable): Remove.
7977 (dfs_unmark_new_vtable): Likewise.
7978 (dfs_clear_search_slot): Likewise.
7979 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7980 (dfs_clear_vbase_slots): Likewise.
7981 (init_vbase_pointers): LIkewise.
7983 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
7985 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
7986 SIZETYPE to a non-SIZETYPE.
7988 2000-03-21 Mark Mitchell <mark@codesourcery.com>
7990 * class.c (layout_virtual_bases): Adjust names in conditionally
7993 * class.c (record_base_offsets): New function.
7994 (layout_conflict_p): Likewise.
7995 (layout_nonempty_base_or_field): Use it.
7996 (layout_empty_base): New function.
7997 (build_base_field): Use it.
7998 (build_base_fields): Update comment.
7999 (layout_virtual_bases): Fold in a little code form
8000 layout_basetypes. Use layout_empty_base.
8001 (layout_basetypes): Remove.
8002 (end_of_class): New function.
8003 (layout_class_type): Use it. Adjust.
8005 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
8007 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
8009 (dfs_skip_nonprimary_vbases_markedp): Likewise.
8010 * typeck.c (fntype_p): Remove.
8012 * cp-tree.h (TI_SPEC_INFO): Remove.
8013 (CLASSTYPE_TI_SPEC_INFO): Likewise.
8014 * pt.c (process_partial_specialization): Likewise.
8016 * class.c (build_base_field): Fix thinko in computation of binfo
8019 * tree.c (mark_local_for_remap_p): Mark variables declared in
8020 TARGET_EXPRs as well.
8022 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
8024 * typeck.c (require_complete_type, complete_type,
8025 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
8026 build_array_ref, convert_arguments, pointer_diff,
8027 build_x_unary_op, build_unary_op, build_c_cast,
8028 build_modify_expr): Use COMPLETE_TYPE_P etc.
8029 * call.c (is_complete, convert_like_real,
8030 build_new_method_call): Likewise.
8031 * class.c (build_vbase_pointer_fields, check_bases,
8032 build_base_field, finish_struct_1, pushclass): Likewise.
8033 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
8034 * decl.c (maybe_process_template_type_declaration, pushtag,
8035 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
8036 layout_var_decl, check_initializer, cp_finish_decl,
8037 grokdeclarator, require_complete_types_for_parms,
8038 grok_op_properties, xref_tag, xref_basetypes,
8039 check_function_type): Likewise.
8040 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
8041 * friend.c (do_friend): Likewise.
8042 * init.c (build_offset_ref): Likewise.
8043 * parse.y (structsp): Likewise.
8044 * pt.c (maybe_process_partial_specialization,
8045 tsubst_friend_function, instantiate_class_template, tsubst,
8046 do_type_instantiation, instantiate_pending_templates): Likewise.
8047 * repo.c (repo_get_id): Likewise.
8048 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
8049 synthesize_tinfo_var, emit_support_tinfos): Likewise.
8050 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
8051 * semantics.c (begin_class_definition): Likewise.
8052 * tree.c (build_cplus_method_type): Likewise.
8053 * typeck2.c (digest_init, build_functional_cast,
8054 add_exception_specifier): Likewise.
8055 * parse.h, parse.c: Regenerated.
8057 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
8059 * inc/cxxabi.h: New header file. Define new-abi entry points.
8060 (__pointer_type_info::target): Rename member to ...
8061 (__pointer_type_info::type): ... here.
8062 (__base_class_info::type): Rename member to ...
8063 (__base_class_info::base): ... here.
8064 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
8065 * cp-tree.h (CPTI_ABI): New global tree enumeration.
8066 (abi_node): New global tree node.
8067 * decl.c (abi_node): Document.
8068 (init_decl_processing): Initialize abi_node.
8069 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
8070 (get_vmi_pseudo_type_info): Likewise.
8071 (create_tinfo_types): Likewise.
8072 (emit_support_tinfos): Likewise.
8073 * tinfo.h (cxxabi.h): Include for new-abi.
8074 Move rtti class definitions to new header file.
8075 * tinfo.cc (abi): Use the namespace.
8076 (std): Move new abi rtti classes from here ...
8077 (__cxxabiv1): ... to here.
8078 * tinfo2.cc (cxxabi.h): Include for new-abi.
8079 Move rtti class definitions to new header file.
8080 (std): Move new abi rtti classes from here ...
8081 (__cxxabiv1): ... to here.
8082 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
8085 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
8086 Jason Merrill <jason@casey.cygnus.com>
8088 * method.c (build_overload_int): Use host_integerp.
8090 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8092 * init.c (build_offset_ref): Handle the case of a templated member
8095 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8097 * except.c (expand_exception_blocks): Clear catch_clauses_last.
8099 2000-03-18 Mark Mitchell <mark@codesourcery.com>
8101 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
8102 * class.c (check_bitfield_decl): Turn illegal bitfields into
8104 (dfs_propagate_binfo_offsets): Adjust for new size_binop
8106 (dfs_offset_for_unshared_vbases): Likewise.
8107 * cvt.c (cp_convert_to_pointer): Convert NULL to a
8108 pointer-to-member correctly under the new ABI.
8109 * expr.c (cplus_expand_constant): Don't use cp_convert when
8110 turning an offset into a pointer-to-member.
8111 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
8112 when dereferencing them under the new ABI.
8113 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
8114 of pointers-to-members under the new ABI.
8116 * class.c (check_bitfield_decl): Remove restriction on really long
8118 (layout_class_type): Implement new ABI handling of bitfields
8119 longer than their types.
8121 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8123 * parse.y (extdefs): Call ggc_collect.
8124 * parse.c: Regenerated.
8126 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
8128 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
8129 (note_name_declared_in_class): Use OVL_CURRENT to get at a
8132 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8134 * class.c (build_vbase_path): Use integer_zerop.
8135 (build_vtable_entry): Use tree_low_cst.
8136 (get_vfield_offset): Use bit_position.
8137 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
8139 (check_bitfield_decl): Set DECL_SIZE using convert.
8140 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
8141 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
8143 (finish_struct_1): Use bit_position.
8144 (dump_class_hierarchy): Use tree_low_cst.
8145 * cp-tree.h (min_precision): Add declaration.
8146 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
8147 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
8148 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
8149 * expr.c (cplus_expand_constant): Use bit_position.
8150 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
8151 * rtti.c (get_base_offset): Use bit_position.
8152 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
8153 host_integerp, and tree_low_cst.
8154 (pointer_int_sum): Use integer_zerop.
8155 (build_component_addr): Use bit_position.
8157 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
8159 * typeck.c (require_complete_type): Don't assume size_zero_node.
8160 (complete_type_or_else): Likewise.
8162 2000-03-16 Steven Grady <grady@digitaldeck.com>
8163 Jason Merrill <jason@casey.cygnus.com>
8165 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
8167 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
8169 * decl2.c (grokfield): Bail out if type is error_mark_node.
8171 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
8173 * tinfo2.cc (__ptr_to_member_data): Rename to ...
8174 (__pointer_to_member_data): ... here. Adjust.
8175 * rtti.c (create_tinfo_types): Adjust.
8177 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
8179 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
8180 * decl.c (ref_desc_type_node): Undocument.
8181 * rtti.c (ptr_ref_initializer): Rename to ...
8182 (ptr_initializer): ... here. Adjust comments.
8183 (ptmd_initializer): Fix comment thinko.
8184 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
8185 (create_tinfo_types): Remove ref_desc_type_node init.
8186 * tinfo2.cc (__reference_type_info): Remove.
8188 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
8190 * decl.c (cp_finish_decl): Remove obsolete comment.
8192 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
8194 2000-03-14 Mark Mitchell <mark@codesourcery.com>
8196 * cp-tree.h: Tweak documentation.
8197 * class.c (build_vbase_pointer_fields): Layout the fields, too.
8198 (avoid_overlap): Remove.
8199 (get_binfo_offset_as_int): New function.
8200 (dfs_serach_base_offsets): Likewise.
8201 (layout_nonempty_base_or_field): Likewise.
8202 (build_base_field): Layout fields here. Avoid placing two objects
8203 of the same type at the same address, under the new ABI.
8204 (build_base_fields): Adjust accordingly.
8205 (create_vtable_ptr): Return the new field, but don't attach it to
8207 (remove_base_field): Remove.
8208 (remove_base_fields): Remove.
8209 (layout_basetypes): Adjust accordingly.
8210 (layout_class_type): Call layout_field for each field, rather than
8211 just making a wholesale call to layout_type.
8213 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
8215 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
8217 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
8219 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
8221 * except.c (dtor_nothrow): New fn.
8222 (do_pop_exception): Use it. Take type parm.
8223 (push_eh_cleanup): Take type parm.
8224 (expand_start_catch_block): Pass it.
8225 (build_eh_type_type_ref): Accept null type.
8227 2000-03-12 Mark Mitchell <mark@codesourcery.com>
8229 * cp-tree.h (revert_static_member_fn): Change prototype.
8230 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
8231 (grok_op_properties): Likewise.
8232 (start_function): Likewise.
8233 (revert_static_member_fn): Simplify.
8234 * pt.c (check_explicit_specialization): Adjust call to
8235 revert_static_member_fn.
8237 2000-03-11 Mark Mitchell <mark@codesourcery.com>
8239 * cp-tree.h (scope_kind): New type.
8240 (tmpl_spec_kind): Likewise.
8241 (declare_pseudo_global_level): Remove.
8242 (pseudo_global_level_p): Rename to template_parm_scope_p.
8243 (pushlevel): Remove declaration.
8244 (begin_scope): New function.
8245 (finish_scope): Likewise.
8246 (current_tmpl_spec_kind): Likewise.
8247 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
8248 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
8249 Add template_spec_p.
8250 (toplevel_bindings_p): Adjust.
8251 (declare_pseudo_global_level): Remove.
8252 (pseudo_global_level_p): Rename to template_parm_scope_p.
8253 (current_tmpl_spec_kind): New function.
8254 (begin_scope): Likewise.
8255 (finish_scope): Likewise.
8256 (maybe_push_to_top_level): Adjust.
8257 (maybe_process_template_type_declaration): Likewise.
8258 (pushtag): Likewise.
8259 (pushdecl_nonclass_level): Likewise.
8260 (lookup_tag): Likewise.
8261 (grokfndecl): Handle member template specializations. Share
8262 constructor and non-constructor code.
8263 * decl2.c (check_classfn): Handle member template specializations.
8264 * pt.c (begin_template_parm_list): Use begin_scope.
8265 (begin_specialization): Likewise.
8266 (end_specialization): Likewise.
8267 (check_explicit_specialization): Use current_tmpl_spec_kind.
8268 Handle member template specializations.
8269 (end_template_decl): Use finish_scope. Remove call to
8271 (push_template_decl_real): Remove bogus error message.
8272 (tsubst_decl): Fix typo in code contained in comment.
8273 (instantiate_template): Handle member template specializations.
8274 (most_general_template): Likewise.
8276 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
8278 * lex.c (whitespace_cr): Compress consecutive calls to warning().
8279 (do_identifier): Ditto for error().
8281 * pt.c (convert_nontype_argument): Ditto for cp_error().
8282 (convert_template_argument): Ditto for cp_pedwarn().
8284 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
8286 * exception.cc (__check_null_eh_spec): New fn.
8287 * except.c (expand_end_eh_spec): Call it if the spec is throw().
8289 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
8291 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
8292 * except.c (expand_end_eh_spec): Add the return type.
8293 * rtti.c (throw_bad_cast): Add the parmtypes.
8294 (throw_bad_typeid): Likewise.
8296 * semantics.c (expand_stmt): Only leave out rtl for unused
8297 artificials, and set DECL_IGNORED_P on them as well.
8298 * decl.c (wrapup_globals_for_namespace): Likewise.
8300 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
8302 * decl.c (maybe_commonize_var): Skip all artificial decls.
8303 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
8305 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
8307 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
8308 * cp-tree.h: Declare flag_enforce_eh_specs.
8309 * decl.c (store_parm_decls, finish_function): Check it.
8311 C library functions don't throw.
8312 * Makefile.in (cfns.h): New target.
8313 (except.o): Depend on it.
8314 * Make-lang.in (cc1plus): Depend on cfns.gperf.
8315 * cfns.gperf: New file.
8316 * cfns.h: Generated.
8317 * except.c: Include it.
8318 (nothrow_libfn_p): New fn.
8319 * decl.c (grokfndecl): Use it.
8320 * cp-tree.h: Declare it.
8322 * decl.c (push_overloaded_decl_1, auto_function,
8323 define_function): Lose.
8324 (build_library_fn_1): New static fn.
8325 (builtin_function): Use it.
8326 (get_atexit_node): Use build_library_fn_ptr.
8327 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
8328 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
8329 push_void_library_fn, push_throw_library_fn): New fns.
8330 * cp-tree.h: Declare them.
8331 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
8332 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
8333 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
8334 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
8335 * rtti.c (build_runtime_decl): Lose.
8336 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
8337 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
8338 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
8340 * call.c (build_call): Remove result_type parm.
8341 Call mark_used on unused artificial fns.
8342 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
8344 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
8346 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
8348 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
8349 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
8350 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
8351 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
8352 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8353 expand_generic_desc): Likewise.
8355 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8357 * exception.cc (__cp_pop_exception): Cleanup the original object.
8359 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8361 * decl.c (grok_op_properties): Merge conversion to void warning
8362 with other silly op warnings.
8364 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
8366 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
8367 array CONSTRUCTOR elements. Don't use expr_tree_cons.
8369 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8371 * decl.c (cp_make_fname_decl): New function.
8372 (wrapup_globals_for_namespace): Don't emit unused static vars.
8373 (init_decl_processing): Remove comment about use of
8374 array_domain_type. Set make_fname_decl.
8375 (cp_finish_decl): Remove __FUNCTION__ nadgering.
8376 * semantics.c (begin_compound_stmt): Remove
8377 current_function_name_declared flagging.
8378 (expand_stmt): Don't emit unused local statics.
8379 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
8382 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8384 * typeck.c (convert_for_assignment): Don't look at array
8386 * call.c (convert_like_real): Likewise.
8388 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
8390 Add initial support for '\uNNNN' specifier.
8391 * lex.c (read_ucs): New fn.
8392 (readescape, skip_white_space): Call it.
8393 (is_extended_char, is_extended_char_1): New fns.
8394 (utf8_extend_token): New fn, #if 0'd out.
8395 (real_yylex): Treat extended chars like letters.
8397 * search.c (note_debug_info_needed): Walk the bases even if we
8398 weren't deferring the type itself.
8400 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8402 * decl2.c (finish_objects): Constify a char*.
8404 * method.c (emit_thunk): Likewise.
8406 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
8408 * typeck.c (dubious_conversion_warnings): Look through
8411 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8413 * class.c (dfs_modify_vtables): I is now unsigned.
8414 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
8415 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
8416 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
8417 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8418 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
8419 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
8420 Call integer_all_onesp.
8421 * typeck2.c (process_init_constructor): Use compare_tree_int.
8423 * lang-specs.h (as): Don't call if -syntax-only.
8425 2000-03-06 Mark Mitchell <mark@codesourcery.com>
8427 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
8428 RTL_EXPR_HAS_NO_SCOPE after all.
8430 2000-03-05 Mark Mitchell <mark@codesourcery.com>
8432 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
8433 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
8434 RTL_EXPR_HAS_NO_SCOPE.
8436 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
8439 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
8441 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
8443 * call.c (convert_like): Macrofy.
8444 (convert_like_with_context): New macro.
8445 (convert_like_real): Renamed from convert_like. Add calling
8446 context parameters, for diagnostics. Add recursive flag. Call
8447 dubious_conversion_warnings for outer conversion.
8448 (build_user_type_conversion): Use convert_like_with_context.
8449 (build_over_call): Likewise. Don't warn about dubious
8450 conversions here. Adjust convert_default_arg calls.
8451 (convert_default_arg): Add context parameters for diagnostics.
8452 Pass throught to convert_like_with_context.
8453 * cp-tree.h (convert_default_arg): Add context parameters.
8454 (dubious_conversion_warnings): Prototype new function.
8455 * typeck.c (convert_arguments): Adjust convert_default_arg call.
8456 (dubious_conversion_warnings): New function, broken
8457 out of convert_for_assignment.
8458 (convert_for_assignment): Adjust.
8460 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
8462 * decl2.c (key_method): Break out from...
8463 (import_export_vtable, import_export_class): ...here.
8465 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
8466 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
8468 * search.c (note_debug_info_needed, dfs_debug_mark,
8469 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
8470 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
8472 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
8474 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
8477 2000-03-02 Mark Mitchell <mark@codesourcery.com>
8479 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
8480 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
8481 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
8482 (lang_type): Split gets_new into has_new and has_array_new.
8483 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8484 (TYPE_GETS_NEW): Split into ...
8485 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
8486 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
8487 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
8488 (build_op_new_call): Don't declare.
8489 (build_new_1): Likewise.
8490 * call.c (build_op_new_call): Remove.
8491 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
8492 instead of TYPE_NEEDS_DESTRUCTOR.
8493 (finish_struct_bits): Likewise.
8494 (add_implicitly_declared_members): Likewise.
8495 (check_field_decl): Likewise.
8496 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
8497 correctly under the new ABI.
8498 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
8499 instead of TYPE_NEEDS_DESTRUCTOR.
8500 (initialize_local_var): Likewise.
8501 (destroy_local_var): Likewise.
8502 (cp_finish_decl): Likewise.
8503 (register_dtor_fn): Likewise.
8504 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
8505 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
8506 TYPE_VEC_DELETE_TAKES_SIZE here.
8507 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
8508 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
8509 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8510 (finish_destructor_body): Likewise.
8511 (maybe_build_cleanup_1): Likewise.
8512 * decl2.c (do_static_destruction): Likewise.
8513 * init.c (build_new_1): Make it static.
8514 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8515 (expand_cleanup_for_base): Likewise.
8516 (get_cookie_size): New function.
8517 (build_new_1): Handle array-new cookies correctly under the new
8519 (build_vec_delete_1): Likewise.
8520 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8521 (build_delete): Likewise.
8522 (build_vec_delete): Handle array-new cookies correctly under the new
8524 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8525 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
8526 TYPE_HAS_ARRAY_NEW_OPERATOR.
8527 * ptree.c (print_lang_type): Check them.
8528 * search.c (context_for_name_lookup): Fix typo in comment.
8529 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8530 * tree.c (break_out_cleanups): Likewise.
8531 (build_cplus_array_test_1): Likewise.
8532 (cp_build_qualified_type_real): Likewise.
8533 * typeck.c (complete_type): Likewise.
8535 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
8536 the command-line, not the end.
8538 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
8540 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
8542 2000-03-02 Tom Tromey <tromey@cygnus.com>
8544 * cp-tree.h (build_java_class_ref): Declare.
8545 * init.c (build_java_class_ref): No longer static.
8546 * except.c (expand_throw): Generate a Java-style `throw' if the
8547 thrown object is a "Java" object.
8548 (initialize_handler_parm): Generate a Java-style lookup of
8549 exception info if the caught object is a "Java" object.
8550 (catch_language, catch_language_init): New globals.
8551 (decl_is_java_type): New function.
8552 (expand_start_catch_block): Don't call push_eh_info() or
8553 push_eh_cleanup() when handling a Java-style "catch". Pass Java
8554 class reference to build_catch_block.
8556 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8558 * typeck.c (comptypes): Treat sizetype like its language equivalent.
8560 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
8562 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
8563 to merge reference/pointer code and fix incorrect warnings.
8565 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
8567 * search.c (protected_accessible_p): Use context_for_name_lookup.
8569 * init.c (construct_virtual_bases): Fix thinko.
8570 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
8572 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
8574 * decl.c (current_function_decl): Move to toplev.c.
8576 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
8578 * pt.c (fn_type_unification): Unify return type, whenever
8580 (get_bindings_real): Only pass return type when necessary.
8581 Remove explicit return type check.
8582 * class.c (resolve_address_of_overloaded_function): Pass desired
8583 return type to fn_type_unification.
8585 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8587 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
8589 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
8591 * rtti.c (expand_class_desc): Likewise.
8592 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
8593 (THUNK_VCALL_OFFSET): Likewise.
8594 (THUNK_DELTA): Reflect changes in ../tree.h.
8596 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
8598 * search.c (protected_accessible_p): Also allow the access if
8599 the member is public in DERIVED. Lose TYPE parm.
8600 (friend_accessible_p): Lose TYPE parm.
8601 (accessible_p): Adjust.
8603 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8605 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
8606 on things that are not sizes; ssize_binop deleted.
8607 Call size_diffop when appropriate.
8608 (dfs_build_vcall_offset_vtbl_entries): Likewise.
8609 (build_primary_vtable, build_secondary_vtable): Likewise.
8610 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
8611 Variable I is HOST_WIDE_INT.
8612 (get_vfield_offset): Pass proper types to size_binop.
8613 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
8614 (finish_struct_1): Likewise.
8615 (skip_rtti_stuff): Arg N is now pointer to signed.
8616 (layout_class_type): Use size_zero_node.
8617 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
8618 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
8619 * decl.c (complete_arry_type): Pass proper types to size_binop.
8620 (xref_basetypes): BINFO_OFFSET is sizetype.
8621 * error.c (dump_expr): Don't use size_binop non-sizes.
8622 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
8623 * init.c (construct_virtual_bases): Fix type error.
8624 (build_vec_delete_1): Pass proper type to size_binop and don't
8626 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
8627 * rtti.c (get_base_offset): Pass proper type to size_binop.
8628 * search.c (dfs_find_vbases): Fix type error.
8629 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
8630 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
8631 * tree.c (debug_binfo): Variable N is signed.
8632 Use HOST_WIDE_INT_PRINT_DEC.
8633 * typeck.c (comptypes): sizetype is same as equivalent integer type.
8634 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
8635 size_one_node and size_zero_node.
8636 (c_alignof): Use size_one_node.
8637 (build_component_addr): Pass proper types to size_binop.
8638 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
8640 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
8642 Implement class scope using-declarations for functions.
8643 * class.c (handle_using_decl): Call add_method for used functions.
8644 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
8645 (add_method): Used functions are hidden by local functions.
8646 (check_bases_and_members): Handle using-decls before finalizing
8647 CLASSTYPE_METHOD_VEC.
8648 * call.c (add_function_candidate): Add ctype parm; if non-zero,
8649 override the type of 'this' accordingly.
8650 (add_template_candidate, add_template_candidate_real): Add ctype parm.
8651 (convert_class_to_reference, build_user_type_conversion_1,
8652 build_new_function_call, build_object_call, build_new_op,
8653 build_new_method_call): Pass ctype parm.
8655 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
8657 * call.c (convert_class_to_reference, build_user_type_conversion_1,
8658 build_new_function_call, build_object_call, build_new_op,
8659 build_new_method_call, build_op_delete_call): Don't get basetype_path
8661 * typeck.c (build_component_ref): Likewise.
8662 * init.c (build_offset_ref): Likewise.
8663 (resolve_offset_ref): Don't call enforce_access.
8664 Call build_scoped_ref.
8665 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
8666 would cause an error or if -pedantic.
8667 * class.c (alter_access): Lose binfo parm.
8669 2000-02-26 Mark Mitchell <mark@codesourcery.com>
8671 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
8674 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
8676 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
8677 pseudo_type_info creation into the std namespace
8679 2000-02-26 Mark Mitchell <mark@codesourcery.com>
8681 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
8682 (import_export_class): Remove declaration.
8683 * decl2.c (import_export_class): Make it static.
8684 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
8685 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
8686 EXPR_WITH_FILE_LOCATION.
8687 * lex.c (check_newline): Tweak filename/lineno setting.
8688 * semantics.c (begin_while_stmt): Fix typo in comment.
8690 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8692 * lang-options.h (-fmessage-length=): Add missing option.
8694 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
8696 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
8698 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
8700 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
8702 * optimize.c (expand_call_inline): Emit the return label before
8703 evaluating the return value.
8705 2000-02-24 Mark Mitchell <mark@codesourcery.com>
8707 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
8708 than duplicating functionality here.
8709 * optimize.c: Include input.h.
8710 (expand_call_inline): Use push_srcloc and pop_srcloc.
8711 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
8712 * parse.c: Regenerated.
8713 * Makefile.in (lex.o): Depend on input.h.
8714 (optimize.o): Likewise.
8716 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
8718 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
8719 function type, rather than ICE.
8721 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
8723 * decl.c (grokdeclarator): Call decl_type_access_control.
8724 * parse.y (parse_end_decl): Don't call decl_type_access_control if
8727 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
8729 * decl.c (decls_match): Remove obsolete static member nadgering.
8731 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8733 * decl.c (grokdeclarator): Change ANSI to ISO.
8734 * lex.c (consume_string, readescape, do_identifier): Likewise.
8735 (parse_float, real_yylex): Likewise.
8736 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
8737 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
8738 new_type_id, maybe_label_decls, simple_stmt,
8739 for.init.statement): Likewise.
8740 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
8741 * semantics.c (finish_named_return_value): Likewise.
8742 * parse.c: Regenerate.
8744 2000-02-21 Mark Mitchell <mark@codesourcery.com>
8746 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
8747 (CPTI_CLASS_STAR_TYPE): Remove.
8748 (vtable_index_type): Likewise.
8749 (class_star_type_node): Remove.
8750 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
8751 (build_binary_op_nodefault): Remove.
8752 * call.c (build_new_op): Use build_binary_op instead of
8753 build_binary_op_nodefault.
8754 * decl.c (init_decl_processing): Remove class_star_type_node
8755 initialization. Make delta_type_node ptrdiff_type_node under the
8756 new ABI. Initialize vtable_index_type.
8757 (build_ptrmemfunc_type): Build different structures for the new
8759 (build_enumerator): Use build_binary_op instead of
8760 build_binary_op_nodefault.
8761 * method.c (build_overload_value): Mangle pointers-to-members
8762 appropriately under the new ABI.
8763 * typeck.c (build_array_ref): Use build_binary_op instead of
8764 build_binary_op_nodefault.
8765 (get_member_function_from_ptrfunc): Adjust for the new ABI.
8766 (build_binary_op_nodefault): Rename to ...
8767 (build_binary_op): ... this. Remove old version. Adjust for
8768 pointer-to-member comparisons under the new ABI.
8769 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
8770 (build_ptrmemfunc): Adjust for the new ABI.
8771 (expand_ptrmemfunc_cst): Likewise.
8772 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
8773 (pfn_from_ptrmemfunc): Adjust for the new ABI.
8775 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
8777 * call.c (build_object_call): Compress consecutive calls to
8779 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
8780 (build_op_delete_call): Adjust message formatting.
8782 * class.c (check_bases): Compress consecutive calls to
8784 (finish_struct_anon): Say 'ISO C++'.
8786 * decl.c (start_decl): Same here.
8787 (grok_reference_init): Likewise.
8788 (grokfndecl): Correct message formatting.
8789 (grokfndecl): Improve diagnostic.
8790 (check_static_variable_definition): Likewise. Say 'ISO C++'
8791 (compute_array_index_type): Say 'ISO C++'
8792 (create_array_type_for_decl): Compress consecutive calls to
8794 (grokdeclarator): Say 'ISO C++'
8795 (grok_op_properties): Likewise.
8797 * decl2.c (delete_sanity): Clairify diagnostic.
8798 (check_member_template): Same here.
8799 (grok_function_init): Use consistent terminology.
8801 * expr.c (do_case): Say 'ISO C++'
8803 * friend.c (do_friend): Compress consecutive calls to warning.
8805 2000-02-20 Mark Mitchell <mark@codesourcery.com>
8807 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
8808 * class.c (build_secondary_vtable): Reorganize. Don't create a
8809 new vtable under the new ABI.
8810 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
8812 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
8813 the initializing elements.
8814 (initialize_vtable): New function.
8815 (dfs_finish_vtbls): Use it.
8816 (dfs_accumulate_vtbl_inits): New function.
8817 (finish_vtbls): Merge primary and secondary vtables under the new
8819 (finish_struct_1): Remove redundant call to layout_vtable_decl.
8820 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
8823 * class.c (build_vtable): New function, split out from ...
8824 (get_vtable_decl): ... here, and ...
8825 (build_secondary_vtable): ... here.
8827 * pt.c (tsubst_decl): Fix formatting.
8829 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8831 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
8832 (avoid_overlap, build_base_field): Likewise.
8833 (build_base_field, build_base_fields, is_empty_class):
8834 Test DECL_SIZE with integer_zero.
8835 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
8836 * cp-tree.h (struct lang_type): New field size_unit.
8837 (CLASSTYPE_SIZE_UNIT): New macro.
8838 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
8839 (cp_finish_decl): Delete -Wlarger-than processing.
8840 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
8841 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
8842 * tree.c (make_binfo): binfo vector is one entry longer.
8843 (walk_tree): Walk DECL_SIZE_UNIT.
8845 2000-02-19 Mark Mitchell <mark@codesourcery.com>
8847 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
8849 (build_vtable_entry): Don't assume all vtable entries are
8851 (build_vtbl_initializer): Adjust accordingly.
8852 (get_vtable_decl): Fix formatting.
8854 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
8856 * semantics.c (deferred_type_access_control): Walk the entire
8858 (save_type_access_control): Rename from
8859 initial_deferred_type_access_control. Just remember the value.
8860 (decl_type_access_control): New fn.
8861 (begin_function_definition): Use deferred_type_access_control, after
8862 we've started the function. Set type_lookups to error_mark_node.
8863 * parse.y (frob_specs, fn.def1): Adjust.
8864 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
8865 (parse_end_decl, parse_bitfield0, parse_method): New fns.
8866 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
8867 (after_type_component_declarator0): Likewise.
8868 (after_type_component_declarator): Likewise.
8869 (notype_component_declarator): Likewise.
8870 * cp-tree.h: Adjust.
8872 * decl.c (redeclaration_error_message): Allow redeclaration of
8873 namespace-scope decls.
8875 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
8877 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
8879 2000-02-17 Mark Mitchell <mark@codesourcery.com>
8881 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
8882 * decl2.c (grokclassfn): Likewise.
8884 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
8886 * decl2.c (lang_decode_option): Don't set default message length
8888 * lex.c (lang_init_options): Set it here.
8890 2000-02-16 Mark Mitchell <mark@codesourcery.com>
8892 Make DECL_CONTEXT mean the class in which a member function was
8893 declared, even for a virtual function.
8894 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
8895 (DECL_FRIEND_CONTEXT): New macro.
8896 (DECL_REAL_CONTEXT): Remove.
8897 (SET_DECL_FRIEND_CONTEXT): Likewise.
8898 (DECL_VIRTUAL_CONTEXT): Adjust.
8899 (DECL_CLASS_SCOPE_P): Use TYPE_P.
8900 (add_friends): Remove.
8901 (hack_decl_function_context): Likewise.
8902 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
8904 (build_over_call): Fix indentation. Use DECL_CONTEXT
8905 instead of DECL_CLASS_CONTEXT.
8906 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
8907 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
8908 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8909 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
8910 (build_base_field): Likewise.
8911 (finish_struct_1): Likewise.
8912 (build_self_reference): Likewise.
8913 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
8915 (pushtag): Use decl_function_context, not
8916 hack_decl_function_context.
8917 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8918 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
8919 (pushdecl): Remove bogus code.
8920 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
8921 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8922 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8923 Use decl_function_context, nothack_decl_function_context.
8924 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
8925 (grokdeclarator): Likewise. Use decl_function_context, not
8926 hack_decl_function_context.
8927 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
8928 (start_function): Use DECL_FRIEND_CONTEXT, not
8929 DECL_CLASS_CONTEXT. Use decl_function_context, not
8930 hack_decl_function_context.
8931 (finish_function): Use decl_function_context, not
8932 hack_decl_function_context.
8933 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
8935 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
8936 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
8937 (grokfield): Likewise.
8938 (finish_builtin_type): Likewise.
8939 (finish_vtable_vardec): Use decl_function_context, not
8940 hack_decl_function_context.
8941 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8942 (start_static_initialization_or_destruction): Likewise.
8943 (finish_static_initialization_or_destruction): Likewise.
8944 (mark_used): Adjust logic for deciding when to synthesize methods.
8945 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
8947 * error.c (dump_function_decl): Use DECL_CONTEXT, not
8949 * friend.c (is_friend): Likewise.
8950 (add_friends): Remove.
8951 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
8952 * lex.c (begin_definition_of_inclass_inline): Use
8953 decl_function_context, not hack_decl_function_context.
8954 (process_next_inline): Likewise.
8955 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8956 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
8957 DECL_CLASSS_CONTEXT.
8958 (hack_identifier): Likewise.
8959 (synthesize_method): Use decl_function_context, not
8960 hack_decl_function_context.
8961 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
8963 (is_member_template): Use decl_function_context, not
8964 hack_decl_function_context. Use DECL_CONTEXT, not
8966 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
8968 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
8970 (push_template_decl_real): Likewise.
8971 (instantiate_class_template): Don't call add_friends.
8972 (tsubst_default_argument): Use DECL_CONTEXT, not
8974 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
8975 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8976 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
8978 * repo.c (repo_inline_used): Likewise.
8979 * search.c (current_scope): Adjust for new _CONTEXT macros.
8980 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
8982 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8983 (lookup_fnfields_here):Likewise.
8984 (check_final_overrider): Likewise.
8985 (init_vbase_pointers): Likewise.
8986 (virtual_context): Likewise.
8987 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
8988 (expand_body): Use decl_function_context, not
8989 hack_decl_function_context.
8990 * tree.c (hack_decl_function_context): Remove.
8991 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
8993 * typeck2.c (error_not_base_type): Likewise.
8995 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
8997 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
8999 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9001 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
9003 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
9005 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
9007 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
9009 * decl2.c (lang_decode_option): Enable automatic line wrapping.
9011 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
9013 * parse.y (frob_specs): Split out...
9014 (parse_decl): From here.
9015 (fn.def2): Call initial_deferred_type_access_control.
9016 (after_type_component_declarator0): Call frob_specs.
9017 (notype_component_declarator0): Likewise.
9018 * search.c (friend_accessible_p): Nested classes are friends of their
9021 2000-02-10 Mark Mitchell <mark@codesourcery.com>
9023 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
9024 used to create an implicit temporary.
9026 * class.c (dfs_modify_vtables): Tweak calculation of functions to
9029 2000-02-08 Nathan Sidwell <nathan@acm.org>
9031 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
9032 strip array element qualifiers too.
9034 2000-02-07 Mark Mitchell <mark@codesourcery.com>
9036 * decl.c (store_parm_decls): Don't build cleanups for parameters
9037 while processing_template_decl.
9039 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
9041 * cp-tree.h (struct saved_scope): Add incomplete field.
9042 (namespace_scope_incomplete): New macro.
9043 * decl.c (pushdecl): Use it.
9044 (hack_incomplete_structures): Use it. See through artificial
9046 (mark_saved_scope): Mark it.
9048 Implement access control for nested types.
9049 * search.c (type_access_control): New fn.
9050 (accessible_p): Now we do perform access control for types.
9051 * semantics.c (deferred_type_access_control): New fn.
9052 (initial_deferred_type_access_control): New fn.
9053 (begin_function_definition): Call it. Add lookups parm.
9054 * decl.c (struct binding_level): Add this_class field.
9055 (pushlevel_class): Set it.
9056 (mark_binding_level): Mark it.
9057 (lookup_name_real): Use it. Call type_access_control.
9058 (mark_saved_scope): Mark lookups field.
9059 * cp-tree.h (flagged_type_tree): Add lookups field.
9060 (struct saved_scope): Add lookups field.
9061 (type_lookups): New macro.
9062 * parse.y (declmods): Now <ftype>.
9063 (parse_decl): Add lookups parm. Call
9064 initial_deferred_type_access_control.
9065 (lang_extdef): Clear type_lookups.
9066 (typed_declspecs, declmods, typespec): Set lookups field.
9067 (initdcl): Call deferred_type_access_control.
9068 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
9069 component_decl_1, named_parm): Adjust.
9070 * friend.c (is_friend): Nested classes are friends of their
9073 * class.c (currently_open_derived_class): New fn.
9074 * method.c (hack_identifier): Use it.
9076 * lex.c (do_identifier): Remove obsolete code.
9078 * parse.y (typed_typespecs): Propagate new_type_flag properly.
9080 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
9082 * tinfo.h: Remove apostrophes from C++ comment (xgettext
9083 thinks this file is plain C).
9085 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9087 * Makefile.in (call.o): Depend on $(EXPR_H).
9089 * call.c: Include "expr.h".
9091 * class.c (dump_class_hierarchy): Add prototype.
9093 * search.c (dfs_get_pure_virtuals): Likewise.
9095 2000-02-1 Ulrich Drepper <drepper@redhat.com>
9097 * parse.y (simple_stmt): Allow :: token in asm parameter list.
9100 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
9102 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
9103 Store it in DECL_FCONTEXT.
9104 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
9106 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
9108 * tinfo.h (old abi): #include "tconfig.h".
9109 * tinfo.cc (convert_to_base): Move into old abi section.
9111 2000-01-31 Mark Mitchell <mark@codesourcery.com>
9113 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
9114 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
9115 (BINFO_PRIMARY_BINFO): New macro.
9116 (BF_DELTA): Rename to ...
9117 (BV_DELTA): ... this.
9118 (BF_VCALL_INDEX): Rename to ...
9119 (BV_VCALL_INDEX): ... this.
9120 (BF_FN): Rename to ...
9122 * class.c (build_vbase_path): Adjust for changes to reverse_path.
9123 (set_rtti_entry): Rename BF_ macros to BV_ variants.
9124 (modify_vtable_entry): Simplify.
9125 (add_virtual_function): Rename BF_ macros to BV_ variants.
9126 (build_vtable_initializer): Likewise.
9127 (get_class_offset_1): Remove.
9128 (dfs_get_class_offset): Likewise.
9129 (get_class_offset): Likewise.
9130 (dfs_find_final_overrider): New function.
9131 (find_final_overrider): Likewise.
9132 (modify_one_vtable): Remove.
9133 (dfs_find_base): New function.
9134 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
9135 find_final_overrider.
9136 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
9138 (dfs_fixup_vtable_deltas): Remove.
9139 (override_one_vtable): Remove.
9140 (merge_overrides): Likewise.
9141 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
9142 unreal chilren of virtual bases.
9143 (finish_struct_1): Don't use merge_overrides. Don't use
9144 dfs_fixup_vtable_deltas.
9145 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
9148 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
9149 Jason Merrill <jason@yorick.cygnus.com>
9151 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
9153 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
9155 * exception.cc (__throw_bad_typeid): Add missing std::.
9157 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9159 * cp-tree.h (make_thunk): PROTO -> PARAMS.
9161 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
9163 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
9165 Runtime support for new-abi rtti.
9166 * inc/typeinfo (type_info::operator!=): Define in class.
9167 (type_info::before, type_info::name, type_info::operator==,
9168 type_info::operator!=): Define new ABI implementations.
9169 (type_info::is_pointer_p, type_info::is_function_p): Declare
9170 new virtual functions.
9171 (type_info::do_catch, type_info::do_upcast): Likewise.
9173 * tinfo.h (__base_class_info): Define new class.
9174 (__class_type_info): Likewise.
9175 (__si_class_type_info): Likewise.
9176 (__vmi_class_type_info): Likewise.
9177 (__dynamic_cast): Prototype.
9179 * tinfo.cc: Conditionalize old and new rtti mechanisms.
9180 (type_info::is_pointer_p): Define new function.
9181 (type_info::is_function_p): Likewise.
9182 (type_info::do_catch): Likewise.
9183 (type_info::do_upcast): Likewise.
9184 (vtable_prefix): New structure for vtable access.
9185 (adjust_pointer): Define new template function.
9186 (contained_p, public_p, virtual_p, contained_public_p,
9187 contained_nonpublic_p, contained_nonvirtual_p): Define new
9189 (nonvirtual_base_type): New local variable.
9190 (__class_type_info::~__class_type_info): Define.
9191 (__si_class_type_info::~__si_class_type_info): Likewise.
9192 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
9193 (__class_type_info::do_catch): Define new function.
9194 (__class_type_info::do_upcast): Likewise.
9195 (__class_type_info::find_public_src): Likewise.
9196 (__class_type_info::do_find_public_src): Likewise.
9197 (__si_class_type_info::do_find_public_src): Likewise.
9198 (__vmi_class_type_info::do_find_public_src): Likewise.
9199 (__class_type_info::do_dyncast): Likewise.
9200 (__si_class_type_info::do_dyncast): Likewise.
9201 (__vmi_class_type_info::do_dyncast): Likewise.
9202 (__class_type_info::do_upcast): Likewise.
9203 (__si_class_type_info::do_upcast): Likewise.
9204 (__vmi_class_type_info::do_upcast): Likewise.
9205 (__dynamic_cast): Likewise.
9207 * tinfo2.cc (__fundamental_type_info): Define new class.
9208 (__pointer_type_info): Likewise.
9209 (__reference_type_info): Likewise.
9210 (__array_type_info): Likewise.
9211 (__function_type_info): Likewise.
9212 (__enum_type_info): Likewise.
9213 (__ptr_to_member_type_info): Likewise.
9214 (__fundamental_type_info::~__fundamental_type_info): Define.
9215 (__pointer_type_info::~__pointer_type_info): Likewise.
9216 (__reference_type_info::~__reference_type_info): Likewise.
9217 (__array_type_info::~__array_type_info): Likewise.
9218 (__function_type_info::~__function_type_info): Likewise.
9219 (__enum_type_info::~__enum_type_info): Likewise.
9220 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
9221 (__pointer_type_info::do_catch): Define new function.
9222 (__ptr_to_member_type_info::do_catch): Define new function.
9224 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
9225 (__is_pointer): Likewise.
9227 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
9229 2000-01-30 Mark Mitchell <mark@codesourcery.com>
9231 * cp/class.c (build_vtable): Rename to build_primary_vtable.
9232 (prepare_fresh_vtable): Rename to build_secondary_vtable.
9233 (make_new_vtable): New function.
9234 (modify_vtable_entry): Handle generation of new vtables correctly.
9235 (modify_one_vtable): Remove unused parameter.
9236 (dfs_fixup_vtable_deltas): Likewise.
9237 (override_one_vtable): Use build_secondary_vtable.
9238 (finish_struct_1): Use build_primary_vtable and
9239 build_secondary_vtable.
9241 2000-01-28 Ulrich Drepper <drepper@redhat.com>
9243 * cp/decl.c: Adjust variable names, comments, help strings.
9245 2000-01-29 Nathan Sidwell <nathan@acm.org>
9247 * new2.cc (operator delete[]): Use operator delete, don't assume
9250 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
9252 * class.c (build_vtbl_initializer): Add argument to
9253 build_vtable_entry call.
9255 2000-01-27 Mark Mitchell <mark@codesourcery.com>
9257 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
9258 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
9259 (BF_DELTA): New macro.
9260 (BF_VCALL_INDEX): Likewise.
9262 (THUNK_VCALL_OFFSET): Likewise.
9263 (make_thunk): Change prototype.
9264 * class.c (build_vtable_entry): Integrate
9265 build_vtable_entry_for_fn. Handle vcall indices.
9266 (build_vtable_entry_for_fn): Remove.
9267 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
9268 BF_VCALL_INDEX, BF_FN.
9269 (modify_vtable_entry): Integrate common code from
9270 modify_one_vtable and dfs_fixup_vtable_deltas.
9271 (add_virtual_function): Set BF_VCALL_INDEX.
9272 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
9274 (modify_one_vtable): Simplify.
9275 (dfs_fixup_vtable_deltas): Likewise.
9276 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
9277 * method.c (make_thunk): Handle vcall indices.
9279 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
9281 Compiler side new abi rtti (not enabled).
9282 * cp-tree.h (new_abi_rtti_p): New macro.
9283 (emit_support_tinfos): Prototype new function.
9284 (tinfo_decl_p): Likewise.
9285 (emit_tinfo_decl): Likwise.
9286 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
9288 (doing_runtime): New local static.
9289 (init_rtti_processing): Add new-abi initializer.
9290 (get_tinfo_decl): Add new-abi logic.
9291 (tinfo_from_decl): Likewise.
9292 (build_dynamic_cast_1): Likewise.
9293 (qualifier_flags): New static function.
9294 (tinfo_base_init): Likewise.
9295 (generic_initializer): Likewise.
9296 (ptr_ref_initializer): Likewise.
9297 (ptmd_initializer): Likewise.
9298 (class_hint_flags): Likewise.
9299 (class_initializer): Likewise.
9300 (synthesize_tinfo_var): Likewise.
9301 (create_real_tinfo_var): Likewise.
9302 (create_pseudo_type_info): Likewise.
9303 (get_vmi_pseudo_type_info): Likewise.
9304 (create_tinfo_types): Likewise.
9305 (emit_support_tinfos): New global function.
9306 (tinfo_decl_p): New global predicate.
9307 (emit_tinfo_decl): New global function.
9308 * class.c (set_rtti_entry): Generalize for old and new rtti.
9309 (build_vtbl_initializer): Likewise.
9310 * decl2.c (finish_file): Likewise.
9312 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
9314 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
9315 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
9317 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
9319 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
9322 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
9324 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
9326 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
9328 * optimize.c (calls_setjmp_r): Supply new argument
9329 to special_function_p.
9331 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9333 * call.c: PROTO -> PARAMS.
9334 * class.c: Likewise.
9335 * cp-tree.h: Likewise.
9339 * decl2.c: Likewise.
9341 * errfn.c: Likewise.
9342 * error.c: Likewise.
9343 * except.c: Likewise.
9346 * input.c: Likewise.
9349 * method.c: Likewise.
9350 * optimize.c: Likewise.
9351 * parse.y: Likewise.
9355 * search.c: Likewise.
9356 * semantics.c: Likewise.
9359 * typeck.c: Likewise.
9360 * typeck2.c: Likewise.
9363 2000-01-25 Richard Henderson <rth@cygnus.com>
9365 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
9367 2000-01-25 Mark Mitchell <mark@codesourcery.com>
9369 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
9370 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
9371 (struct vcall_offset_data_s): New type.
9372 (dfs_vcall_offset_queue_p): New function.
9373 (dfs_build_vcall_offset_vtbl_entries): Likewise.
9374 (build_vcall_offset_vtbl_entries): Likewise.
9375 (layout_vtable_decl): Likewise.
9376 (num_vfun_entries): Likewise.
9377 (num_extra_vtbl_entries): Add the entries for vcall offsets.
9378 (build_vtbl_initializer): Likewise.
9379 (dfs_finish_vtabls): Use layout_vtable_decl.
9380 (modify_one_vtables): Always duplicate vtables under the new ABI.
9381 (finish_struct_1): Use layout_vtable_decl.
9383 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9385 * decl.c (member_function_or_else): Change third arg from a format
9386 specifier to an `enum overload_flags'. Callers changed.
9388 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
9390 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
9391 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
9392 build_const_cast, get_delta_difference, check_return_expr): Avoid
9393 ANSI string concatenation usage.
9395 2000-01-24 Mark Mitchell <mark@codesourcery.com>
9397 * class.c (layout_class_type): Put the fields required to make a
9398 class non-empty at the end, not the beginning, of the TYPE_FIELDs
9401 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
9403 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
9406 * decl2.c (mark_used): Do instantiate inlines that have been
9407 explicitly instantiated.
9409 2000-01-24 Richard Henderson <rth@cygnus.com>
9411 * call.c (build_over_call): Use expand_tree_builtin.
9412 * typeck.c (build_function_call_real): Likewise.
9413 (build_binary_op_nodefault): Handle unordered compares.
9415 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9417 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
9418 cp_tree_index values.
9419 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
9420 New global node #defines for them.
9421 * rtti.c (call_void_fn): Replace with ...
9422 (build_runtime_decl): ... new static function.
9423 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
9424 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
9425 (build_dynamic_cast_1): Always produce correctly typed result.
9426 Explicitly produce type_info addresses. Use dynamic_cast_node.
9427 * exception.cc (__throw_bad_cast): Return `void *'.
9428 (__throw_bad_typeid): Return `const type_info &'.
9430 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9432 * cp-tree.h (get_vtable_decl): Prototype new function.
9433 * class.c (get_vtable_decl): New function. Broken out from ...
9434 (build_vtable): ... here. Use it.
9435 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
9438 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9440 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
9441 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
9442 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
9443 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
9444 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
9445 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
9446 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
9447 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
9448 (CPTI_TINFO_VAR_ID): New enumeration.
9449 (__tp_desc_type_node, __access_mode_type_node,
9450 __bltn_desc_type_node, __user_desc_type_node,
9451 __class_desc_type_node, __ptr_desc_type_node,
9452 __attr_desc_type_node, __func_desc_type_node,
9453 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
9454 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
9455 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
9456 enum_desc_type_node, class_desc_type_node,
9457 si_class_desc_type_node, vmi_class_desc_type_node,
9458 ptmd_desc_type_node, base_desc_type_node): New #defines.
9459 (tinfo_fn_id, tinfo_fn_type): Rename to ...
9460 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
9461 (tinfo_var_id): New enumeration.
9462 (DECL_TINFO_FN_P): Augment comment.
9463 * decl.c (cp_global_trees): Adjust documentation.
9464 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
9465 tinfo_decl_type and tinfo_var_id.
9466 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
9467 (build_typeid): Remove unused variable.
9468 (get_tinfo_var): Use tinfo_var_id.
9469 (tinfo_name): New static function.
9470 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
9471 (tinfo_from_decl): Likewise.
9472 (get_base_offset): New static function, broken out of
9474 (expand_si_desc): Use tinfo_name.
9475 (expand_class_desc): Likewise. Lose local static variable.
9476 Use base_desc_type_node. Use get_base_offset.
9477 (expand_ptr_desc): Use tinfo_name.
9478 (expand_attr_desc): Likewise.
9479 (expand_generic_desc): Likewise.
9481 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
9482 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
9484 2000-01-23 Mark Mitchell <mark@codesourcery.com>
9486 * cp-tree.h (__eprintf): Remove declaration.
9487 * tree.c (__eprintf): Remove definition.
9489 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
9490 Mark Mitchell <mark@codesourcery.com>
9492 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
9493 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
9495 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
9497 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
9499 2000-01-23 Mark Mitchell <mark@codesourcery.com>
9501 * cp-tree.h (register_dtor_fn): New function.
9502 * decl.c (destroy_local_static): Rename to ...
9503 (register_dtor_fn): ... this. Give it external linkage.
9504 (expand_static_init): Use it.
9505 * decl2.c (do_static_initialization): Likewise, if using
9507 (do_static_destruction): Check that __cxa_atexit is not in use.
9508 (finish_file): Don't call do_static_destruction if using
9511 * typeck.c (convert_arguments): Restore two-message error
9514 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
9516 Remap dynamic cast hint values to be consistent across ABIs.
9517 * search.c (dynamic_cast_base_recurse): Remap generated value.
9518 (get_dynamic_cast_base_type): Adjust documentation.
9519 * tinfo.h (__user_type_info::dyncast): Likewise.
9520 (__user_type_info::find_public_subobj): Remap BOFF meaning.
9521 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
9522 (__class_type_info::do_dyncast): Likewise.
9523 (__class_type_info::do_find_public_subobj): Likewise.
9524 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
9526 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
9528 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
9530 * typeck2.c (incomplete_type_error): Restore previous
9531 cp_error and cp_error_at call sequence.
9533 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
9535 * class.c (dump_class_hierarchy): Make format agree with argument;
9536 cast pointer to unsigned long and print with %lx.
9538 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
9540 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
9542 * typeck.c (composite_pointer_type, common_type,
9543 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
9544 build_function_call_real, convert_arguments,
9545 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
9546 build_unary_op, mark_addressable, build_compound_expr,
9547 build_static_cast, build_reinterpret_cast, build_const_cast,
9548 build_c_cast, build_modify_expr, get_delta_difference,
9549 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
9550 'ISO C++'. Fusion consecutive calls to diagnotic message routines
9552 * typeck2.c (readonly_error, abstract_virtuals_error,
9553 process_init_constructor, check_for_new_type): Likewise.
9555 2000-01-19 Mark Mitchell <mark@codesourcery.com>
9557 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
9560 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
9562 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
9563 (build_x_typeid): Likewise.
9564 (get_tinfo_fn): Likewise.
9565 (get_tinfo_fn_unused): Rename to ...
9566 (get_tinfo_decl): ... here.
9567 * rtti.c (build_headof): Replace logic error with assertion.
9568 (get_tinfo_fn_dynamic): Rename to ...
9569 (get_tinfo_decl_dynamic): ... here. Make static. Use
9570 complete_type_or_else.
9571 (build_x_typeid): Move into ...
9572 (build_typeid): ... here. Adjust call to
9573 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
9574 throw_bad_typeid expression.
9575 (get_tinfo_fn_unused): Rename to ...
9576 (get_tinfo_decl): ... here. Adjust comment.
9577 (get_tinfo_fn): Delete.
9578 (tinfo_from_decl): New static function.
9579 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
9580 (get_typeid): Use complete_type_or_else.
9581 (build_dynamic_cast_1): Adjust calls to
9582 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
9583 * parse.y (primary): Adjust call to build_typeid.
9584 * except.c (build_eh_type_type_ref): Adjust call to
9585 get_tinfo_decl. Mark as used.
9586 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
9587 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
9588 * parse.c: Regenerated.
9590 2000-01-17 Mark Mitchell <mark@codesourcery.com>
9592 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
9594 (resolves_to_fixed_type_p): Document calling convention.
9595 * rtti.c (build_x_typeid): Initialize NONNULL.
9597 * cp-tree.h (build_shared_int_cst): New function.
9598 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
9599 * class.c (modify_vtable_entry): Likewise.
9600 (add_virtual_function): Split out code to generated shared
9601 INTEGER_CSTs to build_share_int_cst.
9602 (modify_all_vtables): Handle all the overridden functions here.
9603 Add overridden functions from non-primary virtual bases to the
9605 (finish_struct_1): Adjust call to modify_all_vtables. Add
9606 overridden functions from non-primary bases to the vtable.
9607 * tree.c (build_shared_int_cst): New function.
9609 * cp-tree.h (scratchalloc): Remove.
9610 (build_scratch_list): Likewise.
9611 * call.c (convert_class_to_reference): Replace build_scratch_list
9612 and build_expr_list with build_tree_list.
9613 (add_candidate): Replace scratchalloc with expralloc. Note memory
9615 (build_user_type_conversion_1): Replace build_scratch_list
9616 and build_expr_list with build_tree_list.
9617 (build_new_op): Likewise.
9618 (build_op_delete_call): Likewise.
9619 (convert_like): Likewise.
9620 * cvt.c (ocp_convert): Likewise.
9621 * decl.c (start_decl): Likewise.
9622 (start_function): Likewise.
9623 (finish_destructor_body): Likewise.
9624 (maybe_build_cleanup_1): Likewise.
9625 * decl2.c (reparse_decl_as_expr): Likewise.
9626 * init.c (perform_member_init): Likewise.
9627 (expand_cleanup_for_base): Likewise.
9628 (build_builtin_delete_call): Likewise.
9629 (build_new_1): Likewise.
9630 (build_delete): Likewise.
9631 * method.c (do_build_assign_ref): Likewise.
9632 * parse.y (already_scoped_stmt): Likewise.
9633 (nontrivial_exprlist): Likewise.
9634 (net_initializer): Likewise.
9635 (initlist): Likewise.
9636 * parse.c: Regenerated.
9637 * rtti.c (build_x_typeid): Likewise.
9638 (build_dynamic_cast_1): Likewise.
9639 * typeck.c (build_x_compound_expr): Likewise.
9640 (build_static_cast): Likewise.
9641 (build_modify_expr): Likewise.
9643 * cp-tree.h (DECL_VINDEX): Add documentation.
9644 * class.c (build_vtable_entry): Likewise.
9645 (start_vtable): Add comment.
9646 (add_virtual_function): Replace pending_hard_virtuals with
9647 overridden_virtuals and pending_virtuals with new_virtuals.
9648 Replace redundant assignments with assertions.
9649 (check_for_override): Add comment.
9650 (check_bases_and_members): Replace pending_hard_virtuals with
9651 overridden_virtuals and pending_virtuals with new_virtuals.
9652 (create_vtbl_ptr): Likewise.
9653 (layout_class_type): Likewise.
9654 (finish_struct_1): Likewise. Add comments.
9656 2000-01-16 Mark Mitchell <mark@codesourcery.com>
9658 * class.c (finish_struct_1): Replace redundant code with
9661 * cp-tree.h (flag_new_abi): Move.
9662 (flag_use_cxa_atexit): Likewise.
9663 (flag_honor_std): Likewise.
9664 (flag_rtti): Likewise.
9665 (vbase_offsets_in_vtable_p): Define.
9666 (vptrs_present_everywhere_p): Likewise.
9667 (TYPE_CONTAINS_VPTR_P): Likewise.
9668 (dfs_walk_real): Declare.
9669 * class.c (build_vbase_pointer_fields): Check
9670 vbase_offsets_in_vtable_p.
9671 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
9673 (build_vbase_offset_vtbl_entries): Simplify.
9674 (build_vbase_offset_vtbl_entries): Adjust.
9675 (build_vbase_pointer): Add ability to look up vbase offsets in
9677 (start_vtable): New function.
9678 (add_virtual_function): Use it.
9679 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
9680 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
9681 (build_vtbl_initializer): Take the type of the complete object as
9682 input. Use it to correctly calculate vbase offsets.
9683 (dfs_finish_vtbls): Pass the complete type to
9684 build_vtbl_initializer.
9685 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
9686 (create_vtable_ptr): Create a vtable even if there are no
9687 new virtual functions, under the new ABI.
9688 (finish_struct_1): Likewise.
9689 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
9690 * decl.c (exapnd_static_init): Remove call to
9691 preserve_initializer.
9692 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
9694 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
9695 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
9696 (construct_virtual_bases): Don't initialize virtual base pointers
9698 (build_aggr_init): Clean up comment.
9699 (expand_aggr_init_1): Likewise.
9700 * rtti.c (expand_class_desc): Store the virtual function table
9701 index where the vbase offset lives in the offset field.
9702 * search.c (dfs_walk_real): Make it global.
9703 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
9704 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
9706 * tinfo.h (USItype): Make it signed under the new ABI.
9707 * tinfo.cc (convert_to_base): New function. Encapsulate base
9708 conversion logic here.
9709 (__class_type_info::do_upcast): Use it.
9710 (__class_type_info::do_dyncast): Likewise.
9711 (__class_type_info::do_find_public_subobj): Likewise.
9713 * init.c (construct_virtual_bases): Don't look up the addresses of
9714 virtual bases at run-time.
9716 * class.c (build_vbase_pointer): Relocate.
9717 (build_vbase_pointer_fields): Likewise.
9718 (dfs_build_vbase_offset_vtbl_entries): Likewise.
9719 (build_vbase_offset_vtbl_entries): Likewise.
9721 * decl.c (init_decl_processing): Complain if -fnew-abi
9722 -fno-vtable-thunks is used.
9724 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
9727 2000-01-15 Mark Mitchell <mark@codesourcery.com>
9729 * cp-tree.h (num_extra_vtbl_entries): New function.
9730 (size_extra_vtbl_entries): Likewise.
9731 (dfs_vtable_path_unmark): Likewise.
9732 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
9733 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
9734 * class.c (num_extra_vtbl_entries): New function.
9735 (size_extra_vtbl_entries): Likewise.
9736 (dfs_build_vbase_offset_vtbl_entries): New function.
9737 (build_vbase_offset_vtbl_entries): Likewise.
9738 (build_vtbl_initializer): Use it.
9739 (finish_struct_1): Adjust vtable sizes (using
9740 num_extra_vtbl_entries).
9741 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
9742 THUNK_DECL is non-NULL before expanding it.
9743 * init.c (expand_virtual_init): Adjust the vtable pointer by
9744 size_extra_vtbl_entries before storing it.
9745 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
9746 Handle TREE_LIST parameters here, not in the dfs_* functions.
9747 (dfs_unmarked_real_bases_queue_p): Adjust.
9748 (dfs_marked_real_bases_queue_p): Likewise.
9749 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
9750 (dfs_vtable_path_marked_real_bases_queue_p): New function.
9751 (dfs_vtable_path_unmark): Likewise.
9753 2000-01-14 Mark Mitchell <mark@codesourcery.com>
9755 * optimize.c (copy_body_r): Clear the operand three of a
9756 TARGET_EXPR when copying it.
9758 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9760 * method.c (build_decl_overload_real): Check whether we are in ::
9761 before returning __builtin_new/delete.
9763 2000-01-13 Mark Mitchell <mark@codesourcery.com>
9765 * pt.c (tsubst_friend_function): Improve comment.
9766 (instantiate_decl): Avoid crashing when a "nested" function is
9767 instantiated from the top level.
9769 * dump.c (dqeueue_and_dump): Dump
9770 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
9772 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9774 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
9776 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
9778 * g++spec.c (lang_specific_driver): Add -fnew-abi if
9779 ENABLE_NEW_GXX_ABI defined.
9780 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
9781 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
9782 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
9784 2000-01-12 Mark Mitchell <mark@codesourcery.com>
9786 * decl.c (start_cleanup_fn): Call pushdecl.
9788 * call.c (convert_class_to_reference): Fix typos.
9789 (build_conditional_expr): Handle errors gracefully.
9790 * class.c (push_nested_class): Likewise.
9791 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
9792 (DECL_THIS_EXTERN): Use it.
9793 (DECL_THIS_STATIC): Likewise.
9794 * cvt.c (convert_to_void): Handle errors gracefully.
9795 (build_expr_type_conversion): Likewise.
9796 * decl.c (maybe_push_decl): Likewise.
9797 (start_decl_1): Likewise.
9798 (require_complete_types_for_parms): Likewise.
9799 * parse.y (structsp): Likewise.
9800 (base_class): Likewise.
9801 * parse.c: Regenerated.
9802 * pt.c (finish_member_template_decl): Likewise.
9803 * typeck.c (decay_conversion): Likewise.
9805 * cp-tree.h (dfs_skip_vbases): New function.
9806 (find_vbase_instance): Likewise.
9807 * class.c (determine_primary_base): Allow a nearly empty base to
9808 serve as a primary base class under the new ABI.
9809 (get_class_offset_1): Rename to ...
9810 (dfs_get_class_offset): ... this. Simplify. Don't issue error
9812 (get_class_offset): Use it. Issue error messages here.
9813 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
9814 find the right copies of virtual bases.
9815 (fixup_vtable_deltas1): Rename to ...
9816 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
9817 bases as primary bases.
9818 (fixup_vtable_deltas): Remove.
9819 (override_one_vtable): Handle virtual bases as primary bases.
9820 (merge_overrides): Likewise.
9821 (finish_struct_1): Likewise.
9822 (dump_class_hierarchy): Dump primary-ness of bases as well.
9823 * search.c (mark_primary_bases): Use a pre-order traversal to
9824 handle primary virtual bases.
9825 (dfs_skip_vbases): New fiunction.
9826 (expand_upcast_fixups): Adjust to handle primary virtual bases.
9827 (fixup_virtual_upcast_offsets): Likewise.
9828 (fixup_all_virtual_upcast_offsets): Likewise.
9829 (dfs_find_vbase_instances): New function.
9830 (find_vbase_instance): Likewise.
9832 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
9834 * lex.c (DIR_SEPARATOR): Delete macro.
9836 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
9838 * decl2.c (lang_decode_option): Handle automatic line wrapping
9841 2000-01-11 Mark Mitchell <mark@codesourcery.com>
9843 * friend.c (do_friend): Don't resolve scopes when processing
9844 template declarations, even if the qualifying scope doesn't
9845 involve template parameters.
9847 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
9849 * class.c (dfs_modify_vtables_queue_p): Remove.
9850 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
9851 and dfs_marked_real_bases_queue_p instead of
9852 dfs_modify_vtables_queue_p.
9854 * class.c (build_vbase_path): Simplify.
9855 (dfs_propagate_binfo_offsets): New function.
9856 (propagate_binfo_offsets): Use it.
9857 (remove_base_field): Simplify.
9858 (dfs_set_offset_for_vbases): Remove.
9859 (dfs_set_offset_for_shared_vbases): New function.
9860 (dfs_set_offset_for_unshared_vbases): Likewise.
9861 (layout_virtual_bases): Use them.
9862 (layout_basetypes): Don't call propagate_binfo_offsets.
9863 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
9866 * class.c (build_base_field): New function, split out from ...
9867 (build_base_fields): ... here. Use it. Allocate primary bases
9868 first, under the new ABI.
9869 (get_vtable_entry): Remove.
9870 (remove_base_field): New function, split out from ...
9871 (remove_base_fields): ... here. Adjust since primary bases come
9872 first under the new ABI.
9874 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
9875 (initialize_vtbl_ptrs): New function.
9876 (expand_indirect_vtbls_init): Change prototype.
9877 (convert_pointer_to_vbase): Declare.
9878 * init.c (expand_direct_vtbls_init): Remove.
9879 (dfs_initialize_vtbl_ptrs): New function.
9880 (initialize_vtbl_ptrs): Likewise.
9881 (emit_base_init): Use initialize_vtbl_ptrs.
9882 * search.c (convert_pointer_to_vbase): Make it global.
9883 (expand_indirect_vtbls_init): Remove vtable initialization code.
9884 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
9886 * class.c (dfs_finish_vtbls): New function.
9887 (finish_vtbls): Use it.
9888 (dump_class_hierarchy): New function.
9890 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
9891 (BINFO_VBASE_PRIMARY_P): New macro.
9892 (BINFO_VIRTUALS): Add to documentation.
9893 (SET_BINFO_PRIMARY_MARKED_P): Remove.
9894 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9895 (dfs_mark_primary_bases_queue_p): Likewise.
9896 (dfs_unmarked_real_bases_queue_p): New function.
9897 (dfs_marked_real_bases_queue_p): Likewise.
9898 * search.c (dfs_mark_primary_bases): Adjust.
9899 (mark_primary_bases): Likewise.
9900 (get_shared_vbase_if_not_primary): New function.
9901 (dfs_unmarked_real_bases_queue_p): Likewise.
9902 (dfs_marked_real_bases_queue_p): Likewise.
9903 (dfs_get_pure_virtuals): Simplify.
9904 (get_pure_virtuals): Likewise.
9906 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9908 * lex.c: Include tm_p.h.
9910 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
9912 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
9914 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
9916 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
9917 * pt.c (instantiate_decl): Defer comdat templates that might not be
9920 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
9921 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
9922 (finish_file): Likewise.
9924 * decl2.c (import_export_class): Undo 12/14 change.
9926 * error.c (dump_decl): operator new, not operatornew.
9928 * class.c (field_decl_cmp): A nontype is "greater" than a type.
9929 * search.c (lookup_field_1): Look for the last field with the
9932 2000-01-05 Nathan Sidwell <nathan@acm.org>
9934 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
9937 2000-01-05 Nathan Sidwell <nathan@acm.org>
9939 * typeck.c (build_static_cast): Don't strip target qualifiers
9940 when casting from a class.
9942 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9944 * class.c (warn_hidden): Initialize variable `fndecl'.
9946 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
9948 * decl.c (flag_isoc9x): New variable to be able to use code in
9949 c-common.c. For now always zero.
9951 2000-01-03 Mark Mitchell <mark@codesourcery.com>
9953 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
9954 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
9955 or unshare_base_binfos for virtual bases here.
9956 * search.c (dfs_get_vbase_types): Do it here.
9957 (get_vbase_types): Adjust.
9959 2000-01-02 Mark Mitchell <mark@codesourcery.com>
9961 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
9962 (BINFO_PRIMARY_MARKED_P): Use flag 5.
9963 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
9964 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9965 (unmark_primary_bases): Remove declaration.
9966 (unmarkedp): Declare.
9967 (dfs_vbase_unmark): Likewise.
9968 * class.c (determine_primary_base): Return immediately if there
9969 are no base classes. Call mark_primary_bases here.
9970 (modify_all_direct_vtables): Remove.
9971 (modify_all_indirect_vtables): Remove.
9972 (dfs_modify_vtables_queue_p): New function.
9973 (dfs_modify_vtables): New function.
9974 (modify_all_vtables): Use them.
9975 (build_base_fields): Build FIELD_DECLs for primary virtual base
9977 (create_vtable_ptr): Don't call determine_primary_base here.
9978 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
9979 (dfs_set_offset_for_vbases): ... this.
9980 (layout_virtual_bases): Use it.
9981 (layout_class_type): Call determine_primary_base here.
9982 * search.c (unmarkedp): Make it global.
9983 (shared_marked_p): Simplify.
9984 (shared_unmarked_p): Likewise.
9985 (dfs_primary_bases_queue_p): Remove.
9986 (dfs_unmark_primary_bases): Likewise.
9987 (unmark_primary_bases): Likewise.
9988 (mark_primary_bases): Simplify.
9989 (get_pure_virtuals): Don't call mark_primary_bases here.
9990 (dfs_vbase_unmark): New function.
9991 (get_vbase_types): Simplify.
9993 * class.c (struct base_info): Remove.
9994 (determine_primary_base): Take has_virtual_p rather than a
9995 base_info as input. Don't calculate max_has_virtual.
9996 (finish_struct_bits): Remove max_has_virtual argument.
9997 (create_vtable_ptr): Remove max_has_virtual_p argument.
9998 (layout_virtual_bases): Remove max argument.
9999 (layout_basetypes): Likewise.
10000 (layout_class_type): Remove max_has_virtual_p argument.
10001 (finish_struct_1): Remove max_has_virtual.
10003 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
10004 (layout_basetypes): Remove.
10005 * class.c (propagate_binfo_offsets): Moved here from tree.c.
10006 Update to handle primary virtual bases.
10007 (remove_base_fields): New function, split out from
10009 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
10010 (layout_virtual_bases): New function, split out from
10011 layout_basetypes. Update to handle primary virtual bases.
10012 (layout_basetypes): Moved here from tree.c. Use
10013 remove_base_fields and layout_virtual_bases.
10014 * search.c (dfs_mark_primary_bases_queue_p): New function.
10015 (mark_primary_bases): Use it.
10016 * tree.c (CEIL): Remove.
10017 (propagate_binfo_offsets): Remove.
10018 (layout_basetypes): Remove.
10020 2000-01-01 Mark Mitchell <mark@codesourcery.com>
10022 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
10023 (BINFO_PRIMARY_MARKED_P): New macro.
10024 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
10025 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
10026 (mark_primary_bases): New function.
10027 (unmark_primary_bases): Likewise.
10028 * search.c (get_abstract_virtuals_1): Remove.
10029 (dfs_mark_primary_bases): New function.
10030 (mark_primary_bases): Likewise.
10031 (dfs_unmark_primary_bases): Likewise.
10032 (unmark_primary_bases): Likewise.
10033 (dfs_get_pure_virtuals): Likewise.
10035 2000-01-01 Mark Mitchell <mark@codesourcery.com>
10037 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
10038 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
10039 (modify_one_vtable): Adjust.
10040 (fixup_vtable_deltas1): Likewise.
10041 (override_one_vtable): Likewise.
10042 * search.c (get_abstract_virtuals_1): Likewise.
10043 (get_pure_virtuals): Likewise.
10044 (expand_upcast_fixups): Likewise.
10045 * tree.c (debug_binfo): Likewise.
10047 * class.c (build_vtable): Don't return a value. Don't rebuild
10048 vtables for bases that have already been handled.
10049 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
10050 already been handled.
10051 (modify_one_vtable): Adjust accordingly.
10052 (fixup_vtable_deltas1): Likewise.
10053 (finish_struct_1): Likewise.
10055 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10057 * call.c (build_new_method_call): Also check destructors.