1 2001-08-01 Andrew Cagney <ac131313@redhat.com>
3 * repo.c (get_base_filename): Change return value to const char
6 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
10 * cp-tree.h (flag_honor_std): Remove.
11 (CPTI_FAKE_STD): Remove.
12 (std_node): Remove comment about it being NULL.
13 (fake_std_node): Remove.
14 * decl.c (in_fake_std): Remove.
15 (walk_namespaces_r): Remove fake_std_node check.
16 (push_namespace): Remove in_fake_std code.
17 (pop_namespace): Likewise.
18 (lookup_name_real): Remove fake_std_node check.
19 (init_decl_processing): Always create std_node. Always add
21 (builtin_function): Always put non '_' fns in std.
22 * decl2.c (flag_honor_std): Remove.
23 (lang_f_options): Remove honor-std.
24 (unsupported_options): Add honor-std.
25 (set_decl_namespace): Remove fake_std_node check.
26 (validate_nonmember_using_decl): Likewise.
27 (do_using_directive): Likewise.
28 (handle_class_head): Likewise.
29 * dump.c (cp_dump_tree): Likewise.
30 * except.c (init_exception_processing): Adjust.
31 * init.c (build_member_call): Remove fake_std_node check.
32 (build_offset_ref): Likewise.
33 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
34 * rtti.c (init_rtti_processing): Adjust.
36 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
38 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
39 operand while calling cp_tree_equal.
41 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
43 The 3.0 ABI no longer has vbase pointer fields.
44 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
45 FORMAT_VBASE_NAME): Remove.
46 * method.c (do_build_copy_constructor): Adjust.
47 (do_build_assign_ref): Adjust.
48 * search.c (lookup_field_r): Adjust.
49 * typeck.c (build_component_ref): Adjust.
51 The 3.0 ABI always has a vtable pointer at the start of every
53 * rtti.c (build_headof_sub): Remove.
54 (build_headof): Adjust.
55 (get_tinfo_decl_dynamic): No need to check flag_rtti
57 (create_real_tinfo_var): Explain why we need a hidden name.
59 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
62 * class.c (update_vtable_entry_for_fn): The fixed adjustment
63 of a virtual thunk should be from declaring base.
65 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
67 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
68 the shared virtual base, so preserving inheritance graph order.
70 2001-07-30 Andreas Jaeger <aj@suse.de>
72 * decl2.c: Remove unused var global_temp_name_counter.
74 2001-07-28 Richard Henderson <rth@redhat.com>
76 * method.c (pending_inlines): Remove.
78 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
80 * class.c (mark_primary_virtual_base): Don't adjust base
82 (dfs_unshared_virtual_bases): Adjust them here.
83 (mark_primary_bases): Explain why we adjust at the end.
85 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
87 * class.c (finish_struct_1): When copying the primary base's
88 VFIELD, make sure we find it is at offset zero.
90 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
92 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
93 tsubst_expr for default template arguments.
95 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
98 * spew.c (yylex): Only copy the token's lineno, if it is
101 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
104 * call.c (resolve_args): Simplify, call
105 convert_from_reference.
106 (build_new_op): Resolve and convert from reference ARG1
107 earlier. Adjust ARG2 & ARG3 resolve and conversion.
109 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
111 * decl.c (last_function_parm_tags): Remove.
112 (current_function_parm_tags): Remove.
113 (init_decl_processing): Adjust.
114 (start_function): Adjust.
115 (store_parm_decls): Adjust.
118 * decl.c (grokdeclarator): Detect when a function typedef is
119 declaring a function, and create last_function_parms correctly.
121 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
123 * call.c (joust): Only prefer a non-builtin candidate to a builtin
124 one if they have the same signature.
126 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
127 it rather than toplevel_bindings_p. Give it a mangled name if static.
128 (convert_to_reference): Adjust.
129 * decl2.c (get_temp_name): Lose.
130 * mangle.c (mangle_ref_init_variable): New fn.
131 (mangle_guard_variable): Strip the ref-init header.
133 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
135 (grok_reference_init): Always use DECL_INITIAL.
137 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
140 * call.c (build_conditional_expr): Recheck args after
142 * cp-tree.h (build_conditional_expr): Move to correct file.
143 * typeck.c (decay_conversion): Diagnose any unknown types
145 (build_binary_op): Don't do initial decay or default
146 conversions on overloaded functions.
147 (build_static_cast): Don't do a decay conversion here.
149 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
152 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
153 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
155 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
157 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
158 (create_vtbl_ptr): ... here.
160 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
162 * class.c (build_vbase_offset_vbtl_entries): Look for
163 non-primary base of which we are a sub vtable.
165 2001-07-24 Phil Edwards <pme@sources.redhat.com>
167 * semantics.c (finish_this_expr): Remove unused code.
169 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
171 Simplify rtti, now we've only one ABI.
172 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
174 (tinfo_decl_id, tinfo_var_id): Remove.
175 (get_typeid_1): Remove.
177 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
178 (typeid_ok_p): New function.
179 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
180 (get_tinfo_decl): Remove old abi documentation.
181 (tinfo_from_decl): Remove.
182 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
183 (get_typeid_1): Remove.
184 (get_base_offset): Remove.
185 (synthesize_tinfo_var): Absorb get_base_offset.
186 (create_real_tinfo_var): Don't use tinfo_decl_id.
188 2001-07-23 Graham Stott <grahams@redhat.com>
190 * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
191 variable has_two_argument_delete_p.
193 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
195 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
196 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
197 (CPTI_INDEX_IDENTIFIER): Remove.
198 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
199 (delta2_identifier): Remove.
200 (index_identifier): Remove.
201 (pfn_or_delta2_identifier): Remove.
202 (flag_vtable_thunks): Remove.
203 (VTABLE_DELTA2_NAME): Remove.
204 (VTABLE_INDEX_NAME): Remove.
205 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
206 (vfunc_ptr_type_node): Adjust.
207 (VTABLE_NAME_PREFIX): Adjust.
208 (build_vfn_ref): Lose first parameter.
209 (fixup_all_virtual_upcast_offsets): Remove.
210 * decl.c (initialize_predefined_identifiers): Remove
211 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
212 (init_decl_processing): Remove no-vtable-thunk code.
213 * decl2.c (flag_vtable_thunks): Remove.
214 (mark_vtable_entries): Remove no-vtable-thunk code.
215 * error.c (dump_decl): Remove no-vtable-thunk code.
216 (dump_expr): Adjust ptr to member function code.
217 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
219 * rtti.c (build_headof): Remove no-vtable-thunk code.
220 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
221 * search.c (get_base_distance): Remove expand_upcast_fixups case.
222 (virtual_context) Remove.
223 (expand_upcast_fixups): Remove.
224 (fixup_virtual_upcast_offsets): Remove.
225 (fixup_all_virtual_upcast_offsets): Remove.
226 * typeck.c (get_member_function_from_ptrfunc): Remove
227 no-vtable-thunk code.
228 * call.c (build_over_call): Adjust call to build_vfn_ref.
229 * class.c (build_vfn_ref): Lose first parameter. Remove
230 no-vtable-thunk code.
231 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
232 (build_vtable_entry): Remove no-vtable-thunk code.
234 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
236 Remove old-abi remnants. Remove comments about old abi
237 behaviour. Remove refences to 'new-abi' in comments.
238 * cp-tree.h: Adjust comments.
239 (vbase_offsets_in_vtable_p): Delete.
240 (vcall_offsets_in_vtable_p): Delete.
241 (vptrs_present_everywhere_p): Delete.
242 (all_overridden_vfuns_in_vtables_p): Delete.
243 (merge_primary_and_secondary_vtables_p): Delete.
244 (TYPE_CONTAINS_VPTR_P): Adjust.
245 (VTT_NAME_PREFIX): Remove.
246 (CTOR_VTBL_NAME_PREFIX): Remove.
247 (init_vbase_pointers): Remove.
248 * class.c: Adjust coments.
249 (build_vbase_pointer_fields): Delete.
250 (build_vbase_pointer): Remove old-abi code.
251 (build_secondary_vtable): Likewise.
252 (modify_all_vtables): Likewise.
253 (create_vtable_ptr): Likewise.
254 (layout_class_type): Likewise.
255 (finish_struct_1): Likewise.
256 (finish_vtbls): Likewise.
257 (dfs_finish_vtbls): Delete.
258 (build_vbase_offset_vtbl_entries): Remove old-abi code.
259 * cvt.c: Adjust comments.
260 * decl.c: Adjust comments.
261 * decl2.c: Adjust comments.
262 * init.c: Adjust comments.
263 (construct_virtual_bases): Remove old-abi code.
264 * lang-specs.h: Remove -fno-new-abi.
265 * mangle.c: Adjust comments.
266 * rtti.c: Adjust comments.
267 (get_base_offset): Remove old-abi-code.
268 * search.c: Adjust comments.
269 (dfs_init_vbase_pointers): Remove.
270 (dfs_vtable_path_unmark): Remove.
271 (init_vbase_pointers): Remove.
272 * semantics.c: Adjust comments.
273 (emit_associated_thunks): Remove old-abi code.
274 * typeck.c: Adjust comments.
276 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
278 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
281 2001-07-19 Mark Mitchell <mark@codesourcery.com>
283 * class.c (finish_struct_anon): Forbid nested classes.
285 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
287 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
288 * optimize.c: Include debug.h.
289 (maybe_clone_body): Use debug hook.
290 * semantics.c: Include debug.h.
291 (expand_body): Use debug hook.
293 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
295 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
297 2001-07-18 Mark Mitchell <mark@codesourcery.com>
299 * class.c (type_requires_array_cookie): New function.
300 (check_methods): Don't try to figure out whether the type needs a
302 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
303 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
304 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
305 * pt.c (instantiate_class_template): Don't set
306 TYPE_VEC_DELETE_TAKES_SIZE.
307 * NEWS: Document ABI changes from GCC 3.0.
309 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
310 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
312 * NEWS (Changes in GCC 3.0): Fix typo.
314 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
316 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
317 which attributes are to be attached, and a flags argument. Update
318 call to decl_attributes.
319 (grokfield): Update call to decl_attributes.
320 * class.c (finish_struct): Update call to cplus_decl_attributes.
321 * cp-tree.h (cplus_decl_attributes): Update prototype.
322 * decl.c (start_decl, grokdeclarator, start_function): Update
323 calls to decl_attributes and cplus_decl_attributes.
324 * friend.c (do_friend): Update call to cplus_decl_attributes.
325 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
327 2001-07-12 Mark Mitchell <mark@codesourcery.com>
329 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
330 for `register' variables with an asm-specification.
332 2001-07-11 Mark Mitchell <mark@codesourcery.com>
334 * semantics.c (finish_asm_stmt): Mark the output operands
335 to an asm addressable, if necessary.
337 2001-07-11 Ben Elliston <bje@redhat.com>
339 * Revert this change -- there is a subtle bug.
342 * decl.c (finish_enum): New "attributes" argument; pass it to
343 cplus_decl_attributes. Use a narrower type if the enum is packed.
344 * cp-tree.h (finish_enum): Adjust prototype.
345 * parse.y (enum_head): New non-terminal.
346 (structsp): Use it. Enums now may be preceded or followed by
347 optional attributes -- pass their chained tree to finish_enum().
348 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
350 2001-07-10 Mark Mitchell <mark@codesourcery.com>
352 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
355 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
357 * semantics.c (cp_expand_stmt): Fix for null
358 current_function_return_value.
360 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
362 * call.c (build_op_delete_call): Initialize fn.
363 (convert_like_real): Delete conditional.
364 (joust): Initialize *w and *l.
365 * class.c: Add prototype for binfo_ctor_vtable.
366 (get_primary_binfo): Initialize result.
367 * init.c (build_java_class_ref): Initialize name.
369 2001-07-09 Erik Rozendaal <dlr@acm.org>
371 * typeck.c (unary_complex_lvalue): Do not duplicate the
372 argument to modify, pre-, or post-increment when used as an
373 lvalue and when the argument has side-effects.
375 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
377 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
378 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
379 cplus_decl_attributes even if attrs is NULL.
380 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
382 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
384 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
385 calls to decl_attributes.
387 2001-07-06 Ira Ruben <ira@apple.com>
389 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
390 be DECL_TEMPLATE_RESULT.
392 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
394 * cp-tree.h (copy_template_template_parm): Rename to ...
395 (bind_template_template_parm): ... here.
396 * tree.c (copy_template_template_parm): Rename to ...
397 (bind_template_template_parm): ... here. Remove the case when
398 NEWARGS is NULL_TREE.
399 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
400 BOUND_TEMPLATE_TEMPLATE_PARM.
401 * pt.c (lookup_template_class): Adjust.
403 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
405 * cvt.c (convert_lvalue): New fn.
406 * cp-tree.h: Declare it.
407 * method.c (do_build_assign_ref): Use it.
408 (do_build_copy_constructor): Convert parm to base types
409 before calling base constructors.
411 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
412 DECL_USER_ALIGN. Check flag_elide_constructors instead of
414 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
416 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
418 * optimize.c (optimize_inline_calls): New function, broken out
420 (optimize_function): ... here. Call it. Don't inline if it is
422 (dump_function): Print name of dump flag causing this dump.
423 * semantics.c (expand_body): Move thunk inline check to
426 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
428 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
429 (comptypes): Use target.comp_type_attributes.
431 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
433 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
435 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
437 * error.c (lang_print_error_function): Add a `diagnostic_context *'
440 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
442 * decl2.c (import_export_class): Update.
444 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
446 * error.c (init_error): Adjust settings.
448 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
450 * error.c (init_error): Adjust settings.
452 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
454 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
455 return pointers to data members by reference rather than by value.
457 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
459 Implement the Named Return Value optimization.
460 * cp-tree.h (struct cp_language_function): Add x_return_value.
461 (current_function_return_value): Now a macro.
462 * decl.c: Don't define it.
463 (define_label, finish_case_label): Don't clear it.
464 (init_decl_processing): Don't register it with GC.
465 * semantics.c (genrtl_finish_function): Don't check it for
466 no_return_label. Copy the RTL from the return value to
467 current_function_return_value and walk, calling...
468 (nullify_returns_r): ...this new fn.
469 * typeck.c (check_return_expr): Set current_function_return_value.
471 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
473 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
474 sharing a ctor vtable with. Merge code for cases 1 and 2.
475 (binfo_ctor_vtable): New fn.
476 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
478 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
480 * class.c (dfs_find_final_overrider): Fix logic.
482 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
483 virtual thunk instead of non-virtual.
484 (get_matching_virtual): Uncomment.
486 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
487 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
490 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
492 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
493 we've not emerged from the hierarchy of RTTI_BINFO on reaching
496 2001-06-13 Mark Mitchell <mark@codesourcery.com>
498 * NEWS: Update release number.
500 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
502 PR c++/3130, c++/3131, c++/3132
503 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
504 * class.c (force_canonical_binfo_r): Move
505 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
506 virtual bases unless they're primary and what they're primary
508 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
509 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
510 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
512 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
513 (layout_nonempty_base_or_field): Add most derived type
515 (layout_empty_base): Likewise.
516 (build_base_field): Likewise.
517 (build_base_fields): Likewise.
518 (propagate_binfo_offsets): Add most derived type
519 parameter. Skip non canonical virtual bases too.
520 (dfs_set_offset_for_unshared_vbases): Don't skip primary
521 bases. Do skip canonical bases.
522 (layout_virtual_bases): Adjust.
523 (layout_class_type): Adjust.
524 (dfs_get_primary_binfo): Build list of virtual primary base
526 (get_primary_binfo): Check that the shared virtual primary
527 base candidate was found first.
528 (accumulate_vtbl_inits): Don't do anything for non-vptr
529 containing binfos. For case 1 primary virtual bases, keep
530 checking that we've not emerged from the hierarchy of RTTI_BINFO.
532 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
535 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
536 hierarchy looking for primary bases for a ctor
537 vtable. Recursively call oneself, if we meet our primary via
538 this route and haven't met it yet via inheritance graph order.
540 2001-06-11 Mark Mitchell <mark@codesourcery.com>
542 * lang-options.h: Emit documentation for -fno-honor-std, not
545 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
547 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
549 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
551 2001-06-10 Mark Mitchell <mark@codesourcery.com>
552 Gabriel Dos Reis <gdr@codesourcery.com>
554 * Make-lang.in (cp/call.o): Depend on diagnostic.h
555 (cp/typeck.o): Depend on diagnostic.h
556 (cp/typeck2.o): Depend on diagnostic.h
557 (cp/repo.o): Depend on dignostic.h
558 * typeck.c: #include diagnostic.h
559 (convert_for_initialization): Remove extern declaration for
560 warningcount and errorcount.
562 * call.c: #include diagnostic.h
563 (convert_like_real): Remove extern declaration for warnincount and
566 * repo.c: #include diagnostic.h
567 * typeck2.c: #include diagnostic.h
569 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
571 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
574 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
577 * friend.c (do_friend): Use push_decl_namespace for classes at
580 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
581 Jason Merrill <jason_merrill@redhat.com>
584 * class.c (build_secondary_vtable): Use assert, rather than an error
586 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
587 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
588 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
589 Don't set BINFO_VTABLE for a primary virtual base.
591 2001-06-07 Mark Mitchell <mark@codesourcery.com>
593 * decl.c (duplicate_decls): Update source position information
594 when a template function is defined.
596 2001-06-07 Phil Edwards <pme@sources.redhat.com>
598 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
600 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
603 * decl.c (pushtag): Don't push into a complete type's scope.
605 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
607 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
608 (struct lang_decl_flags): Lose generate_with_vtable_p.
609 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
610 * class.c (copy_virtuals): Adjust.
611 * decl2.c (mark_vtable_entries): Adjust.
612 * method.c (make_thunk, build_vtable_entry): Adjust.
613 * class.c (update_vtable_entry_for_fn): Only look as far as the
614 first defining class.
615 (build_vtbl_initializer): Put nothing in the slot for a function only
616 defined in a lost primary virtual base.
617 (add_vcall_offset_vtbl_entries_1): Use the same code for
618 the lost primary case and the normal case.
619 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
620 (get_vfield_offset, get_derived_offset): Lose.
621 (dfs_find_final_overrider): Use look_for_overrides_here.
622 (get_matching_virtual): New fn.
623 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
625 * search.c (look_for_overrides_here): Split out from...
626 (look_for_overrides_r): Here.
628 * class.c (find_final_overrider): Return error_mark_node on error.
630 * decl2.c (key_method): #if 0 accidental change.
632 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
634 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
635 (build_over_call): Likewise.
636 * decl.c (grokparms): Likewise.
637 * pt.c (tsubst_decl): Likewise.
638 * typeck.c (convert_arguments): Likewise.
640 2001-06-05 Mark Mitchell <mark@codesourcery.com>
642 * semantics.c (begin_class_definition): Robustify.
644 * pt.c (instantiate_decl): Tell the repository code about the
645 clones, not the cloned functions.
646 * repo.c (repo_template_used): Explicitly instantiate the cloned
647 function, not the clones.
649 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
651 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
652 ICS_BAD_FLAG on created conversion.
653 (compare_ics): Break out rank.
655 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
657 * decl.c (xref_tag): Remove extraneous %s on dependent name
660 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
662 * class.c (layout_vtable_decl): Fix off by one error on
664 (build_vtt): Likewise.
665 (build_ctor_vtbl_group): Likewise.
667 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
669 * class.c (maybe_indent_hierarchy): New function.
670 (dump_class_hierarchy_r): Add flags. Dump extra binfo
671 information, if enabled. Use maybe_indent_hierarchy. Adjust
673 (dump_class_hierarchy): Adjust prototype. Adjust output format.
674 (dump_array, dump_vtable, dump_vtt): New functions.
675 (finish_struct_1): Adjust hierarchy dumping.
676 (initialize_vtable): Call dump_vtable.
677 (build_vtt): Call dump_vtt.
678 (build_ctor_vtbl_group): Call dump_vtable.
679 * decl2.c (flag_dump_class_layout): Remove.
680 (cxx_decode_option): Remove dump translation unit
681 and dump class hierarchy check. Call dump_switch_p.
682 (finish_file): Adjust dumping.
683 (dump.c): Only dump base classes if not TDF_SLIM.
684 Only dump namespace members if not TDF_SLIM.
685 * optimize.c (dump_function): New function.
686 (optimize_function): Call dump_function.
687 * semantics.c (expand_body): Use dump_enabled_p.
689 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
692 Part missed from first commit
693 * decl2.c (finish_anon_union): Copy context.
695 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
698 * optimize.c (remap_decl): Remap anonymous aggregate members too.
700 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
703 * semantics.c (expand_body): Don't optimize thunks.
705 2001-05-25 Sam TH <sam@uchicago.edu>
707 * cp-tree.h lex.h: Fix header include guards.
709 2001-05-25 Mark Mitchell <mark@codesourcery.com>
711 * decl.c (init_decl_processing): Tweak.
713 2001-05-24 Mark Mitchell <mark@codesourcery.com>
715 * decl.c (duplicate_decls): Tidy.
716 (init_decl_processing): Always set flag_no_builtin.
718 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
721 * decl2.c (do_local_using_decl): Push the decls, even in a
724 2001-05-22 Mark Mitchell <mark@codesourcery.com>
726 * optimize.c (initialize_inlined_parameters): Don't set
727 TREE_READONLY for a VAR_DECL taking the place of an inlined
730 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
732 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
733 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
736 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
738 * parse.y: Refer to compound literals as such, not as
739 constructor-expressions.
741 2001-05-21 Mark Mitchell <mark@codesourcery.com>
743 * call.c (build_op_delete_call): Ignore exception-specifications
744 when looking for matching delete operators.
745 * init.c (build_new_1): Compute whether or not the allocation
746 function used is a placement allocation function or not, and
747 communicate this information to build_op_delete_call.
749 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
751 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
752 (build_vtbl_ref): Adjust.
753 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
754 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
756 (unsupported_options): Correspondingly.
758 * decl2.c (maybe_make_one_only): Check flag_weak, not
761 * cp-tree.def (START_CATCH_STMT): Lose.
762 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
763 * tree.c (cp_statement_code_p): Don't case it.
764 * semantics.c (cp_expand_stmt): Likewise.
765 * cp-tree.h (START_CATCH_TYPE): Lose.
767 * except.c (expand_start_catch_block): Don't start any blocks.
769 (expand_end_catch_block): Don't end any blocks.
770 * parse.y (handler): Don't pass anything from finish_handler_parms
772 * pt.c (tsubst_expr): Likewise.
773 * semantics.c (begin_handler): Call note_level_for_catch here.
774 (finish_handler_parms): Don't return anything.
775 (genrtl_catch_block, begin_catch_block): Lose.
776 (genrtl_handler): Call expand_start_catch here.
778 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
780 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
781 (get_vtable_decl, build_vtt): Not here.
783 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
786 * optimize.c (update_cloned_parm): Copy addressability and other
789 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
791 * pt.c (determine_specialization): Ignore artificial functions.
793 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
795 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
796 (C_RID_CODE): Remove.
797 * lex.c (cxx_init_options): Call set_identifier_size. Update.
798 (init_parse): Don't do it here.
800 2001-05-18 Diego Novillo <dnovillo@redhat.com>
802 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
803 function declaration to avoid stripping the symbol's attributes.
805 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
807 * decl.c (pushdecl): Adjust error string.
808 (xref_tag): Adjust friend class injection warning. Remove the
809 inherited name from the class shadowed scope.
811 2001-05-17 Mark Mitchell <mark@codesourcery.com>
813 * except.c (cp_protect_cleanup_actions): New function.
814 (init_exception_processing): Don't set protect_cleanup_actions
815 here. Do set lang_protect_cleanup_actions.
817 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
819 * spew.c (read_token): Call yyerror on all unexpected tokens.
821 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
823 * init.c (member_init_ok_or_else): Take a tree rather than
825 (expand_member_init): Adjust.
827 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
829 * decl.c (duplicate_decls): Suppress warning about duplicate
830 decls if the first decl is a friend.
832 2001-05-12 Zack Weinberg <zackw@stanford.edu>
834 * except.c (choose_personality_routine): Export. Add
835 explanatory comment. Take an enum languages, not a boolean.
836 (initialize_handler_parm): Adjust to match.
837 * cp-tree.h: Prototype choose_personality_routine.
838 * lex.c (handle_pragma_java_exceptions): New function.
839 (init_cp_pragma): Register #pragma GCC java_exceptions.
841 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
843 * method.c (build_mangled_C99_name): Remove unused prototype.
845 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
847 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
848 * typeck.c (get_member_function_from_ptrfunc,
849 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
850 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
852 Reverted Geoff Keating's 2001-05-03's patch.
854 2001-05-11 Ira Ruben <ira@apple.com>
856 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
858 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
860 * cp-tree.h (finish_label_expr, lookup_label): Delete.
861 * parse.y: Update for '&&'; don't issue warning here.
862 * semantics.c (finish_label_expr): Delete.
864 2001-05-07 Mark Mitchell <mark@codesourcery.com>
866 * splay-tree.h (splay_tree_max): New function.
867 (splay_tree_min): Likewise.
869 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
871 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
872 (pfn_vflag_identifier): Define.
873 Update comment about layout of pointer functions.
874 (build_ptrmemfunc1): Update prototype.
875 (expand_ptrmemfunc_cst): Update prototype.
876 * decl.c (initialize_predefined_identifiers): Initialize
877 pfn_vflag_identifier.
878 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
879 an extra field to the type.
880 * expr.c (cplus_expand_constant): Pass 'flag' between
881 expand_ptrmemfunc_cst and build_ptrmemfunc1.
882 * typeck.c (get_member_function_from_ptrfunc): When
883 FUNCTION_BOUNDARY < 16, look at additional field to determine
884 if a pointer-to-member is a real pointer or a vtable offset.
885 (build_ptrmemfunc1): Add new parameter to contain extra field.
886 (build_ptrmemfunc): Pass the extra field around.
887 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
888 (pfn_from_ptrmemfunc): Ignore the extra field.
890 2001-05-03 Mark Mitchell <mark@codesourcery.com>
892 * cp-tree.h (flag_inline_trees): Update documentation.
893 * decl.c (init_decl_processing): Adjust handling of
894 flag_inline_functions and flag_inline_trees to support -O3.
895 (grokfndecl): Set DECL_INLINE on all functions if that's what
897 (save_function_data): Clear DECL_INLINE in
898 current_function_cannot_inline is non-NULL.
899 * decl2.c (flag_inline_trees): Update documentation.
901 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
903 * dump.c (cp_dump_tree, USING_STMT case): New case.
904 * tree.c (cp_statement_code_p): Add USING_STMT.
905 * decl2.c (do_using_directive): Add the using directive statement.
907 * tree.c (walk_tree): Reformat an if block.
909 2001-05-02 Mark Mitchell <mark@codesourcery.com>
911 * decl.c (compute_array_index_type): Don't try to do anything with
912 the indices when processing a template.
914 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
916 * call.c: NULL_PTR -> NULL.
921 * except.c: Likewise.
924 * search.c: Likewise.
926 * typeck.c: Likewise.
927 * typeck2.c: Likewise.
929 2001-05-02 Mark Mitchell <mark@codesourcery.com>
931 * decl2.c (do_using_directive): Revert previous patch.
933 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
935 * cp-tree.def (USING_STMT): New statement node.
936 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
937 * decl2.c (do_using_directive): Add USING_STMT to statement
938 tree. Don't emit errors when processing template decl.
939 * pt.c (tsubst_expr, USING_STMT case): New case.
940 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
942 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
944 * call.c (build_new_op): Convert args from reference here.
945 (build_conditional_expr): Don't convert here.
947 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
949 * spew.c (last_token_id): New static variable.
950 (read_token): Set it here.
951 (yyerror): Use it here.
953 2001-04-30 Richard Henderson <rth@redhat.com>
955 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
958 2001-04-30 Mark Mitchell <mark@codesourcery.com>
960 * gxxint.texi: Remove.
961 * Make-lang.in: Remove all traces of gxxint.texi.
963 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
965 * decl2.c (start_static_initialization_or_destruction): Correct
966 logic to handle the -fno-use-cxa-atexit case.
968 2001-04-30 Mark Mitchell <mark@codesourcery.com>
970 * optimize.c (update_cloned_parm): New function.
971 (maybe_clone_body): Use it. Update the `this' parameter too.
973 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
975 * decl2.c (unsupported_options): Add new-abi.
976 * lang-options.h: Remove no longer supported options.
978 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
980 * except.c (can_convert_eh): Don't check template parms,
983 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
985 * optimize.c (maybe_clone_body): Copy parameter names and locations.
987 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
989 * cp-tree.h (adjust_clone_args): Prototype new function.
990 * class.c (adjust_clone_args): New function.
991 * decl.c (start_function): Call it for in charge ctors.
993 2001-04-26 Mark Mitchell <mark@codesourcery.com>
995 * method.c (use_thunk): Make sure that thunks really are emitted
998 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
1000 * mangle.c (write_chars): New macro.
1001 (hwint_to_ascii): New function
1002 (write_number): Use it.
1003 (write_integer_cst): Deal with really big numbers.
1005 2001-04-25 Mark Mitchell <mark@codesourcery.com>
1007 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
1010 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
1012 * decl.c (grokdeclarator): Set context of namespace scope
1015 2001-04-24 Zack Weinberg <zackw@stanford.edu>
1017 * cp/optimize.c: Include hashtab.h.
1018 (struct inline_data): Add tree_pruner.
1019 (expand_call_inline, expand_calls_inline): Use it when calling
1021 (optimize_function): Initialize and free tree_pruner.
1023 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
1025 Lazy __FUNCTION__ generation.
1026 * cp-tree.def (FUNCTION_NAME): Remove.
1027 * cp-tree.h (function_name_declared_p): Remove.
1028 (cp_fname_init): Prototype.
1029 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
1030 don't call declare_function_name. Call start_fname_decls.
1031 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
1032 clobber the line number.
1033 (cp_fname_init): New function.
1034 (start_function): Call start_fname_decls.
1035 (finish_function): Call finish_fname_decls.
1036 * lex.c (reswords): Add slots for __FUNCTION__ et al.
1037 (rid_to_yy): Add mappings for __FUNCTION__ et al.
1038 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
1039 * parse.y (VAR_FUNC_NAME): New token.
1040 (primary): Add VAR_FUNC_NAME.
1041 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
1043 (tsubst, FUNCTION_NAME case): Remove.
1044 (tsubst_copy, FUNCTION_NAME case): Remove.
1045 (tsubst_expr, DECL_STMT case): Be careful with a
1046 DECL_PRETTY_FUNCTION_P.
1047 (instantiate_decl): Remove function_name_declared_p.
1048 * semantics.c (begin_compound_statement): Don't call
1049 declare_function_name here.
1050 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
1051 (finish_translation_unit): Call finish_fname_decls.
1052 (expand_body): Remove function_name_declared_p.
1053 * typeck2.c (digest_init): Allow any ERROR_MARK.
1055 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
1057 * pt.c (tsubst_decl): Use VOID_TYPE_P.
1058 * semantics.c: Fix some typos.
1060 2001-04-23 Phil Edwards <pme@sources.redhat.com>
1062 * cp/decl2.c (flag_honor_std): Always initialize to 1.
1064 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1066 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
1068 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
1070 * except.c (build_throw): Wrap the initialization of the exception
1071 object in a MUST_NOT_THROW_EXPR.
1072 (do_free_exception): #if 0.
1074 2001-04-20 Mark Mitchell <mark@codesourcery.com>
1076 * cp-tree.h (finish_enum): Change prototype.
1077 * decl.c (finish_enum): Reorganize.
1078 * parse.y (structsp): Adjust calls to finish_enum.
1080 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
1082 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
1085 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
1087 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
1088 (layout_empty_base): Return at end flag.
1089 (build_base_field): Likewise.
1090 (build_base_fields): Likewise.
1091 (layout_virtual_bases): Don't add 1 to eoc value.
1092 (end_of_class): Use full size for empty bases.
1093 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
1094 empty bases. Don't add 1 to eoc value. Only add trailing padding
1095 if we're an empty class with no empty bases.
1096 (dump_class_hierarchy): Dump size and alignment.
1098 2001-04-20 Jakub Jelinek <jakub@redhat.com>
1100 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
1103 2001-04-20 Jakub Jelinek <jakub@redhat.com>
1105 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
1106 is found, look first if name does not match the structure name.
1108 2001-04-19 Mark Mitchell <mark@codesourcery.com>
1110 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
1112 (SET_DECL_LANGUAGE): New macro.
1113 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
1114 (pushdecl): Likewise.
1115 (build_library_fn_1): Likewise.
1116 (build_cp_library_fn): Likewise.
1117 (grokfndecl): Likewise.
1118 (grokvardecl): Mark `extern "C"' variables as having C linkage.
1119 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
1120 * lex.c (retrofit_lang_decl): Likewise.
1121 * mangle.c (mangle_decl_string): Don't mangle the names of
1122 variables declared with C language linkage.
1123 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
1125 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
1127 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
1128 flag_access_control from uninitialized storage.
1130 2001-04-15 Mark Mitchell <mark@codesourcery.com>
1132 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
1133 * mangle.c (write_pointer_to_member_type): Fix mangling of
1134 pointers to cv-qualified member function types.
1136 * init.c (build_delete): Create a SAVE_EXPR for the address if
1137 we're going to use it more than once.
1139 2001-04-13 Mark Mitchell <mark@codesourcery.com>
1141 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
1142 (expand_ptremfunc_cst): Change prototype.
1143 (delta2_from_ptrmemfunc): Remove.
1144 * expr.c (cplus_expand_constant): Adjust call to
1145 expand_ptrmemfunc_cst.
1146 * typeck.c (build_ptrmemfunc1): Simplify.
1147 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
1148 results in a constant.
1149 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
1150 (delta2_from_ptrmemfunc): Remove.
1151 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
1153 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
1155 * cp-tree.h (decl_namespace_list): New macro.
1156 (struct saved_scope): Add decl_ns_list.
1157 * decl.c (mark_saved_scope): Mark it.
1158 * decl2.c: Lose static decl_namespace_list.
1159 (init_decl2): Don't save it.
1161 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1163 * cp-tree.h (warn_return_type, yylex): Delete redundant
1166 * decl.c (current_class_depth, global_namespace): Likewise.
1168 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
1170 * repo.c (flag_use_repository): Likewise.
1172 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1174 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
1175 set_block, pushdecl, getdecls, gettags, init_decl_processing,
1176 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
1177 lvalue_or_else, print_lang_statistics, comp_target_types,
1178 unsigned_type, signed_type, signed_or_unsigned_type,
1179 build_function_call, mark_addressable, incomplete_type_error):
1180 Delete redundant declarations.
1182 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
1184 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
1185 (TYPE_ANONYMOUS_P): New macro.
1186 (TAGGED_TYPE_P): New macro.
1187 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
1188 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
1189 * tree.c (no_linkage_helper): Likewise.
1190 * semantics.c (begin_class_definition): Likewise.
1191 * pt.c (convert_template_argument): Likewise.
1192 * lex.c (check_for_missing_semicolon): Likewise.
1194 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
1196 * class.c (dfs_unshared_virtual_bases): New function.
1197 (mark_primary_bases): Call it.
1198 (check_bases): Ignore virtual bases when determining
1201 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
1203 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
1205 2001-04-11 Mark Mitchell <mark@codesourcery.com>
1207 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
1208 cloned function to the clone.
1210 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1212 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
1214 * semantics.c: Include expr.h.
1216 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
1218 * method.c (implicitly_declare_fn): Commonize code for copy ctor
1219 and assignment op. Set TREE_USED for parameter.
1221 2001-04-10 Mark Mitchell <mark@codesourcery.com>
1223 * class.c (find_final_overrider_data): Add `candidates'.
1224 (dfs_find_final_overrider): Don't issue error messages
1226 (find_final_overrider): Issue error messages here.
1227 (build_base_field): Don't warn about amgibuous direct bases here.
1228 (warn_about_ambiguous_direct_bases): New function.
1229 (layout_class_type): Use it.
1231 2001-04-10 Richard Henderson <rth@redhat.com>
1233 * typeck.c (build_array_ref): Push the array reference inside
1234 COMPOUND_EXPR and COND_EXPR.
1236 2001-04-05 Mark Mitchell <mark@codesourcery.com>
1238 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
1239 * decl.c (duplicate_decls): Adjust accordingly.
1240 (maybe_commonize_var): Likewise.
1241 (grokfndecl): Likewise.
1242 (start_function): Likewise.
1243 (start_method): Likewise.
1244 * decl2.c (key_method): Likewise.
1245 (import_export_decl): Likewise.
1246 * method.c (implicitly_declare_fn): Likewise.
1247 * optimize.c (maybe_clone_body): Likewise.
1249 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
1251 * lang-specs.h: Add __DEPRECATED.
1253 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
1255 * search.c (get_dynamic_cast_base_type): When building a new
1256 constant, set its type to ssizetype.
1258 2001-04-04 Jakub Jelinek <jakub@redhat.com>
1260 * optimize.c (expand_call_inline): Only add newly inlined statements
1263 2001-04-03 Mark Mitchell <mark@codesourcery.com>
1265 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
1266 (OPERATOR_FORMAT): Likewise.
1267 (OPERATOR_TYPENAME_FORMAT): Likewise.
1268 * operators.def: Remove old name-mangling information.
1269 * decl.c (grok_op_properties): Adjust accordingly.
1270 * lex.c (init_operators): Likewise.
1271 * rtti.c (get_tinfo_decl): Issue error messages about types that
1274 2001-04-03 Mark Mitchell <mark@codesourcery.com>
1276 * decl2.c (import_export_decl): Don't call import_export_class
1277 when processing an inline member function.
1278 * semantics.c (expand_body): Call import_export_decl before
1279 emitting inline functions.
1281 2001-03-28 Richard Henderson <rth@redhat.com>
1283 IA-64 ABI Exception Handling:
1284 * cp-tree.def (EH_SPEC_BLOCK): New.
1285 (MUST_NOT_THROW_EXPR): New.
1286 * cp-tree.h: Update changed function declarations.
1287 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
1288 (CPTI_CALL_UNEXPECTED): New.
1289 (struct cp_language_function): Rename x_eh_spec_try_block
1291 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
1292 * decl.c (current_binding_level): If no current function
1293 bindings, revert to scope_chain.
1294 (initialize_predefined_identifiers): Remove __cp_push_exception.
1295 (store_parm_decls): Use begin_eh_spec_block.
1296 (finish_function): Use finish_eh_spec_block.
1297 (mark_lang_function): Update for name changes.
1298 * decl2.c (finish_file): No mark_all_runtime_matches.
1299 * dump.c (cp_dump_tree): Handle new tree codes.
1300 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
1301 * except.c (catch_language_init, catch_language): Remove.
1302 (init_exception_processing): Don't set language code.
1303 Initialize call_unexpected_node, protect_cleanup_actions,
1304 eh_personality_libfunc, lang_eh_runtime_type.
1305 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
1306 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
1307 (prepare_eh_type): Split out type canonicalizations ...
1308 (build_eh_type_type): ... from here.
1309 (build_eh_type_type_ref): Remove.
1310 (mark_all_runtime_matches): Remove.
1311 (build_exc_ptr): New.
1312 (do_begin_catch, do_end_catch): New.
1313 (do_pop_exception): Remove.
1314 (build_terminate_handler): Remove.
1315 (choose_personality_routine): Split out language choice from ...
1316 (initialize_handler_parm): ... here.
1317 Use MUST_NOT_THROW_EXPR.
1318 (expand_start_catch_block): Use do_begin_catch. Simplify Java
1319 exception object handling.
1320 (expand_start_eh_spec, expand_end_eh_spec): Remove.
1321 (expand_exception_blocks, alloc_eh_object): Remove.
1322 (begin_eh_spec_block, finish_eh_spec_block): New.
1323 (do_allocate_exception, do_free_exception): New.
1324 (expand_throw): Merge into ...
1325 (build_throw): ... here. Update for abi.
1326 * expr.c (cplus_expand_expr): No expand_internal_throw.
1327 Handle MUST_NOT_THROW_EXPR.
1328 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
1329 * semantics.c (*) Update for except.h name changes.
1330 (genrtl_try_block): No protect_with_terminate.
1331 (genrtl_eh_spec_block): New.
1332 (genrtl_handler): Don't emit the goto here.
1333 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
1334 (genrtl_finish_function): Don't expand_exception_blocks.
1335 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
1337 2001-03-28 Richard Henderson <rth@redhat.com>
1339 * decl.c (struct named_label_list): Rename eh_region to
1340 in_try_scope, add in_catch_scope.
1341 (struct binding_level): Rename eh_region to is_try_scope,
1343 (note_level_for_try): Rename from note_level_for_eh.
1344 (note_level_for_catch): New.
1345 (poplevel): Copy both is_try_scope and is_catch_scope to
1346 the named_label_list struct.
1347 (check_previous_goto_1): Don't check for catch block via
1348 DECL_ARTIFICIAL; use in_try_scope instead.
1349 (check_goto): Likewise.
1350 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
1351 * except.c (expand_start_catch_block): Call note_level_for_catch.
1352 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
1354 2001-03-27 Richard Henderson <rth@redhat.com>
1356 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
1357 exceptions_via_longjmp.
1359 2001-03-27 Phil Edwards <pme@sources.redhat.com>
1361 * pt.c (check_default_tmpl_args): Make error messages clearer.
1363 2001-03-26 Phil Edwards <pme@sources.redhat.com>
1365 * error.c: Also undefine 'A' macro used for cp_printers definition.
1367 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1369 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
1371 2001-03-26 Mike Yang <yang@research.att.com>
1372 Mark Mitchell <mark@codesourcery.com>
1374 * dump.c (dump_access): New function.
1375 (cp_dump_tree): Use it. Dump basetype information for class
1378 2001-03-26 Mark Mitchell <mark@codesourcery.com>
1380 * Makefile.in (optimize.o): Depend on params.h.
1381 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
1382 (init_decl_processing): Set flag_no_inline when doing
1384 * optimize.c: Include params.h.
1385 (struct inline_data): Improve documentation of FNS. Add
1386 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
1387 (INSNS_PER_STMT): New macro.
1388 (remap_block): Use CLONING_P.
1389 (inlinable_function_p): Don't inline big functions.
1390 (expand_call_inline): Keep track of how much inlining we've done.
1391 (optimize_function): Set FIRST_INLINED_FN.
1392 (maybe_clone_body): Set CLONING_P.
1393 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
1395 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
1396 rest_of_compilation. Clear DECL_RTL for local variables
1398 (clear_decl_rtl): New function.
1400 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
1403 * cp-tree.h (skip_type_access_control,
1404 reset_type_access_control): Prototype.
1405 * decl.c (grokdeclarator): Access of friends is not checked.
1406 * parse.y (component_decl_list): Reset type access control.
1407 * semantics.c (decl_type_access_control): Clear
1408 current_type_lookups.
1409 (save_type_access_control): Don't save if not deferring.
1410 (skip_type_access_control, reset_type_access_control): New
1412 (begin_class_definition): Do type access control for basetypes.
1413 Start deferred access control.
1414 (finish_class_definition): Resume immediate access control if
1415 this is a local class.
1417 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1419 * class.c (add_method): Use memcpy/memmove, not bcopy.
1421 * decl.c (duplicate_decls): Likewise.
1423 2001-03-23 Jakub Jelinek <jakub@redhat.com>
1425 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
1428 2001-03-23 Jakub Jelinek <jakub@redhat.com>
1430 * decl.c (local_names): Define.
1431 (push_local_name): New.
1432 (grok_reference_init): Return init if initializing static reference
1433 variable with non-constant instead of emitting it.
1434 Move expand_static_init call to cp_finish_decl.
1435 (layout_var_decl): Call push_local_name.
1436 (maybe_commonize_var): Allow inlining functions even if they have
1437 static local variables, use comdat_linkage for them if flag_weak.
1438 (check_initializer): Call obscure_complex_init if
1439 grok_reference_init returned non-zero.
1440 (save_function_data): Clear x_local_names.
1441 (pop_cp_function_context): Free x_local_names.
1442 (mark_inlined_fns): Remove.
1443 (mark_lang_function): Mark x_local_names.
1444 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
1445 Mark inlined_fns as tree, remove call to mark_inlined_fns.
1446 * class.c (alter_access): Ensure DECL_ACCESS is never set if
1447 DECL_DISCRIMINATOR_P.
1448 * cp-tree.h (cp_language_function): Add x_local_names.
1449 (lang_decl_flags): Add discriminator into u2.
1450 (lang_decl_inlined_fns): Remove.
1451 (lang_decl): inlined_fns is now a TREE_VEC.
1452 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
1453 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
1454 TREE_VEC, not a custom structure.
1455 (optimize_function): Likewise.
1456 * mangle.c (discriminator_for_local_entity): Discriminate among
1457 VAR_DECL local entities.
1458 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
1461 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
1463 Add support for Java interface method calls.
1464 * cp-tree.h (struct lang_type): Add java_interface flag.
1465 (TYPE_JAVA_INTERFACE): New macro.
1466 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
1467 by setting TYPE_JAVA_INTERFACE.
1468 * call.c (java_iface_lookup_fn): New static.
1469 (build_over_call): If calling a method declared in a
1470 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
1471 expression which resolves the function address.
1472 (build_java_interface_fn_ref): New function.
1474 2001-03-22 Richard Henderson <rth@redhat.com>
1476 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
1477 * except.c: Don't include it.
1479 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
1480 based on an idea from Joe Buck <jbuck@synopsys.com>
1482 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
1484 (data_def, component_decl): Add reductions to bad_decl.
1486 2001-03-22 Jakub Jelinek <jakub@redhat.com>
1488 * method.c (do_build_assign_ref): Don't use build_modify_expr for
1489 anonymous aggregates, since they don't have assignment operator
1491 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
1492 assignment operators for anonymous structure fields.
1494 2001-03-21 Jason Merrill <jason@redhat.com>
1496 * pt.c (instantiate_decl): Abort if we see a member constant
1497 instantiation that doesn't already have its initializer.
1498 Downgrade explicit instantiation without definition to pedwarn.
1500 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
1501 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
1502 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
1504 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
1505 (pending_vtables): Remove.
1506 * decl2.c (pending_vtables): Remove.
1507 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
1508 CLASSTYPE_VTABLE_NEEDS_WRITING.
1509 (import_export_class): Likewise.
1510 (init_decl2): Don't mark pending_vtables.
1511 * lex.c (handle_pragma_vtable): Just sorry.
1512 * pt.c (instantiate_class_template): Don't mess with
1513 CLASSTYPE_VTABLE_NEEDS_WRITING.
1514 (mark_class_instantiated): Likewise.
1515 * ptree.c (print_lang_type): Don't print it.
1516 * semantics.c (begin_class_definition): Don't set it.
1518 * pt.c (template_tail): Replace with last_pending_template.
1519 (maybe_templates, maybe_template_tail): Remove.
1520 (add_pending_template): Adjust.
1521 (instantiate_pending_templates): Adjust.
1523 * cp-tree.h (struct saved_scope): Remove lang_stack field.
1524 (current_lang_stack): Remove.
1525 * decl.c (maybe_push_to_top_level): Don't initialize it.
1526 (duplicate_decls): Use current_lang_depth.
1527 (xref_basetypes): Likewise.
1528 * class.c (current_lang_depth): New fn.
1529 (push_lang_context): Use more varray functionality.
1530 (pop_lang_context): Likewise.
1532 * error.c (GLOBAL_THING): Always use '__'.
1534 2001-03-21 Mark Mitchell <mark@codesourcery.com>
1536 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
1538 * mangle.c (mangle_decl_string): Mangle the names of overloaded
1539 operators, even when they have `extern "C"' linkage.
1541 2001-03-19 Mark Mitchell <mark@codesourcery.com>
1543 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
1544 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1545 where it's not necessary.
1546 (add_method): Remove optimization involving comparison of
1547 DECL_ASSEMBLER_NAME.
1548 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
1549 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1550 where it's not necessary.
1551 (check_methods): Likewise.
1552 (build_clone): Likewise.
1553 (built_vtt): Likewise.
1554 * cp-tree.h (DECL_NEEDED_P): Likewise.
1555 * decl.c (pushtag): Likewise.
1556 (duplicate_decls): Likewise.
1557 (pushdecl): Likewise.
1558 (builtin_function): Likewise.
1559 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
1560 (build_cp_library_fn): Likewise.
1561 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
1562 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1563 where it's not necessary.
1564 (make_rtl_for_nonlocal_decl): Likewise.
1565 (cp_finish_decl): Likewise.
1566 (grokfndecl): Likewise.
1567 (grokvardecl): Likewise.
1568 (grokdeclarator): Likewise.
1569 (start_function): Likewise.
1570 (cp_missing_return_ok_p): Likewise.
1571 * decl2.c (grokclassfn): Likewise.
1572 (check_classfn): Likewise.
1573 (finish_static_data_member_decl): Likewise.
1574 (grokfield): Likewise.
1575 * error.c (GLOBAL_IORD_P): Remove.
1576 (dump_global_iord): Improve output.
1577 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
1578 * except.c (nothrow_libfn_p): Summarily reject any function not in
1580 * init.c (build_java_class_ref): Don't explicitly set
1581 DECL_ASSEMBLER_NAME after calling mangle_decl.
1582 * mangle.c (mangle_decl_string): Handle extern "C" functions.
1583 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
1584 * method.c (set_mangled_name_for_decl): Don't explicitly set
1585 DECL_ASSEMBLER_NAME after calling mangle_decl.
1586 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
1587 IDENTIFIER_GLOBAL_VALUE for the thunk.
1588 * pt.c (set_mangled_name_for_template_decl): Remove.
1589 (check_explicit_specialization): Don't use it.
1590 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
1591 (tsubst_friend_function): Likewise.
1592 (tsubst_decl): Likewise.
1593 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
1594 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
1595 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1596 where it's not necessary.
1597 (tinfo_base_init): Likewise.
1598 (create_real_tinfo_var): Likewise.
1599 * search.c (looup_field_1): Likewise.
1600 * semantics.c (finish_named_return_value): Likewise.
1601 * tree.c (init_tree): Set lang_set_decl_assembler_name.
1603 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
1605 Correct semantics restrictions checking in throw-expression.
1606 * except.c (is_admissible_throw_operand): New function.
1607 (build_throw): Use it.
1609 2001-03-14 Mark Mitchell <mark@codesourcery.com>
1611 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
1614 2001-03-14 Mark Mitchell <mark@codesourcery.com>
1616 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1617 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
1618 * decl.c (duplicate_decls): Likewise.
1619 (builtin_function): Likewise.
1620 (build_library_fn): Likewise.
1621 (build_cp_library_fn): Likewise.
1622 (check_initializer): Likewise.
1623 (cp_finish_decl): Likewise.
1624 * decl2.c (grokfield): Likewise.
1625 (grok_function_init): Remove #if 0'd code.
1626 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1627 * friend.c (do_friend): Likewise.
1628 * init.c (get_temp_regvar): Likewise.
1629 * method.c (make_thunk): Likewise.
1630 * pt.c (tsubst_friend_function): Likewise.
1631 (tsubst_decl): Likewise.
1632 (regenerate_decl_from_template): Likewise.
1633 * semantics.c (genrtl_named_return_value): Likewise.
1634 (expand_body): Likewise.
1635 (genrtl_finish_function): Likewise.
1636 * tree.c (cp_tree_equal): Likewise.
1638 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
1640 * call.c (convert_like_real): Add extra semantics to INNER
1641 parameter. Don't convert to temporary if a user conversion
1642 gives us an lvalue that we're about to bind to a reference.
1643 Set INNER to indicate pending reference binding on recursive
1646 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
1648 * cp/lex.c: Delete duplicate pending_lang_change.
1650 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
1652 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
1654 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
1655 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
1657 2001-03-09 Zack Weinberg <zackw@stanford.edu>
1659 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
1661 2001-03-08 Stan Shebs <shebs@apple.com>
1663 * cp-tree.h (set_identifier_local_value): Remove unused decl.
1665 2001-03-06 Zack Weinberg <zackw@stanford.edu>
1667 * spew.c: Remove references to CPP_OSTRING.
1669 2001-03-06 Andrew Haley <aph@redhat.com>
1671 * typeck.c (convert_arguments): Check that we have an fndecl.
1673 2001-03-05 Andrew Haley <aph@redhat.com>
1675 * typeck.c (convert_arguments): Don't do ellipsis conversion for
1676 __built_in_constant_p.
1678 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1680 * typeck.c (build_static_cast): Allow enum to enum conversions
1683 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1685 * class.c (check_field_decls): Pointers to member do not a
1686 non-pod struct make, as per DR 148.
1688 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1690 * call.c (joust): cp_pedwarn when using gnu extension concerning
1691 worst conversion sequences.
1693 2001-03-01 Zack Weinberg <zackw@stanford.edu>
1695 * decl.c: Replace all uses of 'boolean' with 'bool'.
1697 2001-03-01 Zack Weinberg <zackw@stanford.edu>
1699 * lang-specs.h: Add zero initializer for cpp_spec field to
1700 all array elements that need one. Don't put an #ifdef inside
1701 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
1704 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
1706 Implement using decls inside template functions.
1707 * decl2.c (validate_nonmember_using_decl): Don't special case
1708 fake_std_node in the global namespace. Don't reject early when
1709 processing a template.
1710 (do_local_using_decl): Add to statement tree. Don't do further
1711 processing when building a template.
1712 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
1714 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
1716 * decl2.c (do_nonmember_using_decl): Don't complain if we find
1717 same function. Do complain about ambiguating extern "C"
1720 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
1722 Remove floating point and complex type template constant parms.
1723 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
1724 COMPLEX_TYPE extensions.
1725 (invalid_nontype_parm_type_p): Likewise.
1727 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
1729 * except.c (call_eh_info): Revert "match_function"'s type.
1731 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
1733 Fix ctor vtable vcall offsets.
1734 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
1735 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
1736 (get_matching_base): Remove.
1737 (get_original_base): New function.
1738 (build_vtbl_initializer): Initialize vid.rtti_binfo.
1739 Use a virtual thunk for a ctor vtable with an index
1740 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
1741 primary base within a constructor vtable. Only set
1742 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
1743 when primary base has been lost.
1744 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
1746 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
1748 * call.c (joust): Ensure more_specialized()'s argument length
1749 parameter has correct value for constructors.
1751 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
1753 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
1755 * decl.c (mark_inlined_fns): Prototype.
1757 2001-02-22 Mark Mitchell <mark@codesourcery.com>
1759 * spew.c (yylex): Correct handling of friends.
1761 2001-02-22 Mark Mitchell <mark@codesourcery.com>
1763 * mangle.c (write_encoding): Pass write_function_type the
1764 FUNCTION_DECL for the function being encoded.
1765 (write_function_type): Pass it along to write_bare_function_type.
1766 (write_bare_function_type): Pass it along to write_method_parms.
1767 (write_method_parms): Don't mangle the compiler-generated
1768 parameters to a constructor or destructor.
1770 2001-02-22 Andreas Jaeger <aj@suse.de>
1772 * optimize.c: Include toplev.h for
1773 note_deferral_of_defined_inline_function prototype.
1775 2001-02-22 Jakub Jelinek <jakub@redhat.com>
1777 * cp-tree.h (struct lang_decl_inlined_fns): New.
1778 (struct lang_decls): Add inlined_fns.
1779 (DECL_INLINED_FNS): New macro.
1780 * optimize.c (struct inline_data): Add inlined_fns.
1781 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
1782 (inlinable_function_p): Likewise, fix typo in comment,
1783 function is not inlinable if it already inlined function currently
1785 (expand_call_inline): Add fn to inlined_fns if neccessary.
1786 (optimize_function): Initialize inlined_fns.
1787 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
1788 * decl.c (mark_inlined_fns): New function.
1789 (lang_mark_tree): Call it.
1791 2001-02-21 Jason Merrill <jason@redhat.com>
1793 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
1794 (DECL_UNINLINABLE): Move to middle-end.
1796 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
1797 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
1798 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
1799 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
1800 parms and outer BLOCK. note_deferral_of_defined_inline_function.
1802 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
1805 2001-02-19 Mark Mitchell <mark@codesourcery.com>
1807 * decl2.c (set_decl_namespace): Allow explicit instantiations in
1810 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1812 * optimize.c (expand_call_inline): Don't walk subtrees of type
1815 2001-02-18 Mark Mitchell <mark@codesourcery.com>
1817 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
1820 2001-02-18 Jason Merrill <jason@redhat.com>
1822 Do put the VTT parameter in DECL_ARGUMENTS.
1823 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
1824 (current_vtt_parm): New macro.
1825 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
1826 (DECL_HAS_VTT_PARM_P): New macro.
1827 (DECL_VTT_PARM): Remove.
1828 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
1829 * decl.c (duplicate_decls): Only copy the operator code if
1831 (start_function): Set current_vtt_parm.
1832 (lang_mark_tree): Don't mark vtt_parm.
1833 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
1834 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
1835 * class.c (build_clone): Maybe remove the VTT parm.
1836 * optimize.c (maybe_clone_body): Set up the VTT parm.
1837 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
1838 * call.c (build_over_call): Just allow the VTT arg.
1839 * method.c (make_thunk): Don't set DECL_VTT_PARM.
1840 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
1841 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
1842 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
1843 * error.c (dump_function_decl): Likewise.
1844 * call.c (build_user_type_conversion_1, convert_like_real): Abort
1845 if we try to call a constructor with in-charge or VTT parms.
1846 * method.c (skip_artificial_parms_for): New fn.
1847 * call.c (add_function_candidate, build_over_call): Call it.
1848 * call.c (build_new_method_call): Use current_vtt_parm.
1849 * init.c (expand_virtual_init): Likewise.
1850 * class.c (same_signature_p): No longer static.
1851 * cp-tree.h: Declare it.
1852 * search.c (look_for_overrides_r): Use it.
1854 2001-02-17 Mark Mitchell <mark@codesourcery.com>
1856 * cp-tree.h (new_abi_rtti_p): Remove.
1857 (name_mangling_version): Likewise.
1858 (flag_do_squangling): Likewise.
1859 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
1860 * decl.c (grokfndecl): Likewise.
1861 * decl2.c (name_mangling_version): Remove.
1862 (flag_do_squangling): Likewise.
1863 (lang_f_options): Remove `squangle'.
1864 (unsupported_options): Add `squangle'.
1865 (cxx_decode_option): Issue a warning about uses of
1866 -fname-mangling-version.
1867 (finish_file): Remove old ABI support.
1868 * pt.c (check_explicit_specialization): Likewise.
1869 (tsubst_decl): Likewise.
1870 * rtti.c (init_rtti_processing): Likewise.
1871 (build_headof): Likewise.
1872 (get_tinfo_decl_dynamic): Likewise.
1873 (tinfo_from_decl): Likewise.
1874 (build_dynamic_cast_1): Likewise.
1875 (synthesize_tinfo_var): Likewise.
1876 * init.c (build_new): Allow enumeration types for the array-bounds
1877 in a direct-new-declarator.
1879 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
1881 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
1882 TREE_PROTECTED from the template being specialized.
1884 2001-02-17 Jason Merrill <jason@redhat.com>
1886 * decl2.c (build_artificial_parm): Set TREE_READONLY.
1888 * decl.c (bad_specifiers): Allow throw specs on things with
1889 pointer-to-function or -member-function type.
1890 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
1893 2001-02-17 Mark Mitchell <mark@codesourcery.com>
1895 * call.c (check_dtor_name): Handle template names correctly.
1897 2001-02-16 Jason Merrill <jason@redhat.com>
1899 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
1900 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
1901 * optimize.c (maybe_clone_body): Don't substitute it.
1902 * call.c (build_new_method_call): Check in_chrg instead.
1903 * init.c (expand_virtual_init): Likewise.
1905 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
1907 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
1908 class-type introduces at least a type-name.
1910 2001-02-16 Jakub Jelinek <jakub@redhat.com>
1912 * call.c (convert_like_real): Create a temporary for non-lvalue.
1914 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
1916 * cp-tree.h: Fix typos in comments.
1918 2001-02-16 Jason Merrill <jason@redhat.com>
1920 * optimize.c (remap_block): If we're compiling a clone, pass the
1921 new block to insert_block.
1923 2001-02-16 Mark Mitchell <mark@codesourcery.com>
1925 * semantics.c (finish_asm_stmt): Robustify.
1927 2001-02-15 Mark Mitchell <mark@codesourcery.com>
1929 * pt.c (push_template_decl_real): Don't remangle the name of a
1932 2001-02-15 Jim Meyering <meyering@lucent.com>
1934 * Make-lang.in (c++.install-common): Depend on installdirs.
1935 (c++.install-info): Likewise.
1936 (c++.install-man): Likewise.
1938 2001-02-15 Mark Mitchell <mark@codesourcery.com>
1940 * typeck2.c (build_m_component_ref): Robustify.
1942 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
1944 * friend.c (do_friend): Don't take the nested [template] class
1945 into account when deciding whether to warn about the friend
1946 function not referring to a template function.
1948 2001-02-14 Jakub Jelinek <jakub@redhat.com>
1950 * typeck.c (build_unary_op): Clarify error message.
1952 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
1954 * parse.y (component_constructor_declarator): allow optional
1955 parentheses around constructor class name.
1957 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1959 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
1961 * init.c (emit_base_init): Remove incorrect comment about
1963 * method.c (make_thunk): Fix comment alignment.
1965 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1967 Kill remnants of this is variable.
1968 * cp-tree.h (flag_this_is_variable): Remove.
1969 * decl2.c (flag_this_is_variable): Remove.
1970 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
1971 (build_vbase_path): The path is non-static, even in a cdtor.
1972 (resolves_to_fixed_type_p): Add additional return value.
1973 * search.c (init_vbase_pointers): Adjust.
1974 * tree.c (lvalue_p_1): Adjust.
1975 * typeck.c (mark_addressable): Adjust.
1977 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1979 * pt.c (unify): Don't check cv quals of array types.
1981 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1983 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
1984 check whether we already have the type.
1986 2001-02-13 Mark Mitchell <mark@codesourcery.com>
1988 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
1989 * call.c (build_op_delete_call): Simplify to remove duplicate
1991 * class.c (clone_function_decl): Don't build the deleting variant
1992 of a non-virtual destructor.
1993 * decl.c (finish_destructor_body): Don't call delete if this is a
1994 non-virtual destructor.
1995 * init.c (build_delete): Explicitly call `operator delete' when
1996 deleting an object with a non-virtual destructor.
1998 2001-02-13 Jason Merrill <jason@redhat.com>
2000 * lang-specs.h: Add more __EXCEPTIONS.
2002 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
2004 * typeck2.c (process_init_constructor): Check
2005 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
2007 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
2009 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
2010 Remove spurious information in comment. Allow further
2011 adjustments of REFERENCE_TYPE args.
2013 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
2015 * errfn.c (cp_deprecated): Tweak diagnostic text.
2016 * parse.y (new_initializer): Deprecate initializer lists
2019 2001-02-12 Mark Mitchell <mark@codesourcery.com>
2021 Remove old ABI support.
2023 2001-02-11 Mark Mitchell <mark@codesourcery.com>
2025 * decl2.c (flag_vtable_thunks): Always set it to 1.
2026 (flag_new_abi): Likewise.
2027 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
2029 * Makefile.in (g++spec.o): Fix typo.
2031 2001-02-09 Jason Merrill <jason@redhat.com>
2033 * lang-specs.h: Restore definition of __EXCEPTIONS.
2035 2001-02-08 Jason Merrill <jason@redhat.com>
2037 * search.c (shared_member_p): New function.
2038 (lookup_field_r): Use it.
2039 * cp-tree.h (SHARED_MEMBER_P): Remove.
2041 * method.c (process_overload_item): Handle template-dependent array
2043 * pt.c (type_unification_real): If we end up with undeduced nontype
2046 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
2049 * typeck2.c (friendly_abort): Don't say anything if we have
2050 earlier errors or sorries.
2052 * decl.c (check_tag_decl): Notice attempts to redefine bool and
2053 wchar_t. Ignore if in_system_header.
2055 * decl.c (maybe_push_cleanup_level): New fn...
2056 (start_decl_1): ...split out from here.
2057 * cvt.c (build_up_reference): Use it.
2058 * cp-tree.h: Declare it.
2060 2001-02-07 Mark Mitchell <mark@codesourcery.com>
2062 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
2065 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
2067 * pt.c (lookup_template_class): Make sure it's a primary
2068 template or template_template_parm when called from the parser.
2069 (instantiate_template_class): Add assertion.
2071 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
2073 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
2074 from error_mark_node.
2076 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
2078 Fix specification and implementation bugs in V3 ABI
2079 construction vtables.
2080 * cp-tree.h (flag_dump_class_layout): New flag.
2081 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
2082 (BINFO_LOST_PRIMARY_P): New flag.
2083 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
2084 (BINFO_PRIMARY_MARKED_P): Rename to ...
2085 (BINFO_PRIMARY_P): ... here.
2086 (binfo_via_virtual): New prototype.
2087 * decl2.c (flag_dump_class_layout): New flag.
2088 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
2089 use `=' as a file name separator.
2090 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
2092 (build_vtbl_address): If this is a virtual primary base, then
2093 get the vtbl of what it is ultimately primary for.
2094 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
2095 for BINFO_PRIMARY_P.
2096 (dfs_skip_nonprimary_vbases_markedp): Likewise.
2097 (get_shared_vbase_if_not_primary): Likewise.
2098 (dfs_get_pure_virtuals): Likewise.
2099 (expand_upcast_fixups): Likewise.
2100 (fixup_virtual_upcast_offsets): Likewise.
2101 (dfs_find_vbase_instance): Likewise.
2102 (find_vbase_instance): Likewise.
2103 (binfo_from_vbase): Adjust comment to reflect reality.
2104 (binfo_via_virtual): New function.
2105 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
2106 for binfo walking during VTT construction.
2107 (dfs_mark_primary_bases): Remove.
2108 (force_canonical_binfo_r): New function.
2109 (force_canonical_binfo): New function.
2110 (mark_primary_virtual_base): New function.
2111 (mark_primary_bases): Walk in inheritance graph order, use
2112 mark_primary_virtual_base.
2113 (determine_primary_base): Use some more intermediate variables.
2114 (dfs_find_final_overrider): Don't check for overriding along a
2116 (dfs_modify_vtables): Walk into primary virtual bases too.
2117 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
2118 (build_base_fields): Likewise.
2119 (dfs_set_offset_for_unshared_vbases): Likewise.
2120 (layout_virtual_bases): Likewise.
2121 (end_of_class): Likewise.
2122 (finish_struct_1): Call dump_class_hierarchy, if requested.
2123 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
2124 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
2125 (dump_class_hierarchy): Add file parameter. Append to file, if
2127 (finish_vtbls): Adjust accumulate_vtbl_inits call.
2128 Use canonical base for virtual bases.
2129 (build_vtt): Add more comments. Adjust build_vtt_inits call.
2130 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
2131 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
2132 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
2134 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
2135 from DATA. We want virtual primary bases and all bases via virtual.
2136 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
2137 virtual base when not a construction vtable.
2138 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
2139 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
2140 Use canonical bases when processing virtual bases.
2141 (accumulate_vtbl_inits): We're interested in any base via a
2143 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
2144 within a construction vtable, determine what is being overridden.
2145 (build_vtbl_initializer): Add more comments
2146 (add_vcall_offset_vtbl_entries_1): Adjust comment.
2147 (build_rtti_vtbl_entries): Check if the base has lost its
2150 2001-02-05 Mark Mitchell <mark@codesourcery.com>
2152 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
2154 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2156 * decl.c (pushdecl): Call abort instead of fatal.
2157 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
2158 * init.c (build_new_1): Likewise.
2159 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
2160 * decl.c (build_typename_type): hash_table_init now returns void.
2161 decl.c (init_decl_processing): Make an error non-fatal.
2163 2001-02-04 Mark Mitchell <mark@codesourcery.com>
2165 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
2167 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2168 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2169 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2170 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2171 * decl.c (maybe_commonize_var): Use the new name-mangling where
2173 * decl2.c (comdat_linkage): Enhance comments. Make all
2174 compiler-generated things static, if COMDAT is not available.
2175 (get_tinfo_decl): Do not make typeinfo objects that belong in the
2177 (tinfo_base_init): Use the correct mangled name for typeinfo
2178 strings, and push them into the global scope.
2179 (typeinfo_in_lib_p): New function.
2180 (synthesize_tinfo_var): Use it.
2181 (create_real_tinfo_var): Likewise.
2183 2001-02-03 Jakub Jelinek <jakub@redhat.com>
2185 * decl.c (push_class_binding): Use context_for_name_lookup instead
2187 * search.c (context_for_name_lookup): Remove static. Check for NULL
2188 context in the loop.
2189 * cp-tree.h (context_for_name_lookup): Add prototype.
2191 2001-02-02 Jakub Jelinek <jakub@redhat.com>
2193 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
2194 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
2196 * call.c (convert_class_to_reference, build_user_type_conversion_1,
2197 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
2199 2001-02-02 Mark Mitchell <mark@codesourcery.com>
2201 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
2202 of macros used when compiling g++spec.c.
2203 * g++spec.c (lang_specific_driver): Link with the shared
2206 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
2208 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
2209 make_reference_declarator, make_call_declarator), method.c
2210 (implicitly_declare_fn), parse.y (namespace_using_decl,
2211 notype_unqualified_id, expr_or_declarator, new_type_id,
2212 after_type_declarator, direct_after_type_declarator,
2213 notype_declarator, complex_notype_declarator,
2214 complex_direct_notype_declarator, qualified_id,
2215 notype_qualified_id, overqualified_id, direct_new_declarator,
2216 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
2217 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
2218 instead of build_parse_node.
2220 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2222 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
2223 (minus_one_node): Moved to top level gcc directory. Renamed
2224 to integer_minus_one_node.
2226 * init.c (init_init_processing): Don't set minus_one_node.
2227 (build_vec_init): Use integer_minus_one_node.
2229 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2231 2001-01-28 Jakub Jelinek <jakub@redhat.com>
2233 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
2234 identical and they would be replaced with constant, remove
2235 MODIFY_EXPR from the tree.
2237 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2239 * Make-lang.in: Remove all dependencies on defaults.h.
2240 * call.c: Don't include defaults.h.
2242 * decl2.c: Likewise.
2243 * except.c: Likewise.
2247 * typeck.c: Likewise.
2249 2001-01-25 Jakub Jelinek <jakub@redhat.com>
2251 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
2252 operators even in "C" linkage.
2253 * method.c (set_mangled_name_for_decl): Likewise.
2254 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
2255 overloaded operators in "C" linkage.
2257 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
2259 * pt.c (tsubst_decl): Remove IN_DECL parameter.
2260 (tsubst_arg_types): Check parameter is not void.
2261 (tsubst): Adjust tsubst_decl call.
2263 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
2265 * call.c (add_builtin_candidate): Quote std properly, from
2268 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2270 * pt.c (check_explicit_specialization): Clone constructors and
2273 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
2275 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
2276 indicates anything special about template depth. Make sure we
2277 only count the user visible template classes.
2279 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
2281 * call.c (build_conv): Typo in comment.
2282 (add_builtin_candidate): Add more explanation.
2283 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
2284 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
2285 when we have enumeral types.
2286 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
2287 candidates for relops and eqops.
2288 (joust): Simplify control flow. Allow a non-template user
2289 function to hide a builtin.
2291 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
2293 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
2294 (more_specialized): Add deduction parameter.
2295 * call.c (joust): Adjust more_specialized call.
2296 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
2297 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
2298 (get_bindings_order): Remove.
2299 (get_bindings_real): Add DEDUCE parameter.
2300 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
2301 REFERENCE_TYPE jig for DEDUCE_ORDER.
2302 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
2303 maybe_adjust_types_for_deduction.
2304 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
2306 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
2307 (check_cv_quals_for_unify): Use new unify qualifier flags.
2308 (unify): Clear new unify qualifier flags.
2309 (get_bindings_real): Add DEDUCE parameter.
2310 (get_bindings): Adjust call to get_bindings_real.
2311 (get_bindings_overload): Likewise.
2312 (most_specialized_instantiation): Adjust call to
2315 2001-01-19 Jason Merrill <jason@redhat.com>
2317 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
2319 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
2322 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
2324 * decl2.c (arg_assoc_class): Fix double iteration logic.
2326 2001-01-19 Jason Merrill <jason@redhat.com>
2328 * init.c (build_delete): Always call convert_force to strip cv-quals.
2330 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
2331 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
2332 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
2334 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2336 * search.c (get_vbase_1): Count only virtual bases.
2338 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2340 * class.c (duplicate_tag_error): Robustify flag clearing.
2342 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2344 * cp-tree.h (lookup_template_class): Add complain parm.
2345 * decl.c (lookup_namespace_name): Adjust call to
2346 lookup_template_class.
2347 (make_typename_type): Likewise.
2348 * semantics.c (finish_template_type): Likewise.
2349 * pt.c (lookup_template_class): Add complain parm. Adjust.
2350 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
2353 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2355 * pt.c (copy_default_args_to_explicit_spec): Preserve
2356 object's CV quals. Reorganize.
2358 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2360 * typeck.c (build_modify_expr): Say `initialization' for
2362 * init.c (build_default_init): Convert to enumeral type, if
2365 2001-01-18 Jakub Jelinek <jakub@redhat.com>
2367 * parse.y (nomods_initdcl0): Properly set things up for
2370 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2372 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
2373 (type_unification_real): Set it.
2376 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2378 * decl.c (finish_destructor_body): Convert to vbase pointer here.
2380 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2382 * semantics.c (begin_class_definition): Check we're not inside a
2385 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2387 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
2390 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2392 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
2393 * call.c (build_over_call): Add comment.
2395 2001-01-16 Daniel Berlin <dberlin@redhat.com>
2397 * cvt.c (ocp_convert): Handle vector type conversion
2398 * typeck2.c (digest_init): Handle vector type initializations
2400 2001-01-16 Phil Edwards <pme@sources.redhat.com>
2402 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
2405 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
2407 * pt.c (check_nontype_parm): Rename to ...
2408 (invalid_nontype_parm_type_p): ... here.
2409 (process_template_parm): Adjust.
2410 (convert_template_argument): Adjust.
2412 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
2414 * pt.c (check_nontype_parm): New function.
2415 (process_template_parm): Use it.
2416 (convert_template_argument): Use it.
2417 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
2420 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
2422 * tree.c: Add defaults.h
2423 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
2424 * Make-lang.in (cp/tree.o): Add defaults.h.
2426 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2428 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
2430 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2432 * g++.1: Change to be ".so man1/gcc.1".
2434 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2436 * Make-lang.in (c++.info, c++.install-info): Build and install g++
2438 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
2439 ($(srcdir)/cp/g++int.info): New target.
2440 * gxxint.texi: Add info directory entry. Use @@ in email address.
2441 * .cvsignore: Update.
2443 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
2445 * typeck.c (build_c_cast): Do template processing earlier.
2446 Always pedwarn on array casts.
2448 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
2450 * friend.c (make_friend_class): Make sure a templated class is
2451 actually a template.
2453 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2455 * decl2.c (get_guard): Set linkage from guarded decl.
2457 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2459 * call.c (convert_default_arg): Check for unprocessed
2461 * cp-tree.h (replace_defarg): Move to spew.c.
2462 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
2463 spew.c, which is where they really are.
2464 (done_pending_defargs): Declare.
2465 (unprocessed_defarg_fn): Declare.
2466 * decl.c (replace_defarg): Move to spew.c
2467 * parse.y (structsp): Call done_pending_defargs.
2468 * spew.c (defarg_fns): Rearrange list structure.
2469 (defarg_fnsdone): New static variable.
2470 (defarg_depfns): New static variable.
2471 (init_spew): Adjust.
2472 (add_defarg_fn): Store the type in TREE_TYPE.
2473 (do_pending_defargs): Detect and deal with ordering constraints
2475 (done_pending_defargs): New function.
2476 (unprocessed_defarg_fn): New function.
2477 (replace_defarg): Moved from decl.c. Robustify. Don't save
2478 if circularity detected.
2480 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2482 * pt.c (unify): Check array has a domain, before checking
2483 whether it is variable sized.
2485 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2487 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
2488 parameters with pointers to arrays of unknown bound.
2490 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2492 * parse.y (template_parm_header, template_spec_header): New
2493 reductions. Split out from ...
2494 (template_header): ... here. Use them.
2495 (template_template_parm): Use template_parm_header.
2496 * semantics.c (finish_template_template_parm): Add assert.
2498 2001-01-10 Mark Mitchell <mark@codesourcery.com>
2500 * mangle.c (write_builtin_type): Fix thinko.
2502 * pt.c (copy_default_args_to_explicit_spec_1): New function.
2503 (copy_default_args_to_explicit_spec): Likewise.
2504 (check_explicit_specialization): Use it.
2506 * class.c (finish_struct_1): Remove last argument in call to
2507 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
2508 * decl.c (builtin_function): Likewise.
2509 (build_cp_library_fn): Likewise.
2510 (check_initializer): Likewise.
2511 (make_rtl_for_nonlocal_decl): Likewise.
2512 (cp_finish_decl): Likewise.
2513 (start_function): Likewise.
2514 * decl2.c (finish_anon_union): Likewise.
2515 * friend.c (do_friend): Likewise.
2516 * init.c (build_java_class_ref): Likewise.
2517 * method.c (make_thunk): Likewise.
2518 * pt.c (tsubst_friend_function): Likewise.
2519 * semantics.c (expand_body): Likewise.
2521 2001-01-10 Mark Mitchell <mark@codesourcery.com>
2523 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
2524 looking at DECL_CLONED_FUNCTION for non-functions.
2526 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2528 * error.c (dump_template_parameter): Use parm to determine how
2529 to print default value.
2531 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2533 * class.c (duplicate_tag_error): Clear more flags.
2535 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2537 * call.c (build_new_method_call): Use binfo_for_vbase.
2539 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
2541 * cp-tree.h (flag_cond_mismatch): Don't declare.
2542 * decl2.c (flag_cond_mismatch): Don't define.
2543 (lang_f_options): Remove cond-mismatch.
2544 (unsupported_options): Add cond-mismatch.
2546 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
2548 * class.c (handle_using_decl): Reject using of constructor name
2549 of sourcing class. Allow injecting of a method with same name as
2550 nested class. Fixup error messages.
2552 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
2554 * decl2.c (lang_decode_option): Handle -Wformat=2.
2556 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2558 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
2559 initialized_in_class.
2560 (DECL_DEFINED_IN_CLASS_P): Rename to ...
2561 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
2562 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
2563 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
2564 * pt.c (check_default_tmpl_args): Adjust for
2565 DECL_INITIALIZED_IN_CLASS_P.
2566 (instantiate_class_template): Likewise.
2567 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
2569 * class.c (finish_struct): Constify saved_filename.
2571 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2573 * class.c (duplicate_tag_error): Adjust diagnostic.
2574 (finish_struct): Locally set location to start of struct.
2575 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
2577 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2579 * decl.c (struct binding_level): Adjust class_shadowed comments
2581 (push_class_level_binding): Ajust comments to reflect reality.
2582 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
2583 Don't set TREE_VALUE on the class_shadowed list.
2585 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
2587 * decl2.c (acceptable_java_type): Allow references too.
2588 * init.c (build_java_class_ref): When using the new ABI, search
2589 `class$' and have it mangled with `mangle_decl.'
2590 * mangle.c (write_java_integer_type_codes): New function.
2591 (write_builtin_type): Detect and mangle Java integer and real
2594 2001-01-07 Mark Mitchell <mark@codesourcery.com>
2596 * decl2.c (grokfield): Don't accept `asm' specifiers for
2597 non-static data members.
2599 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2601 * expr.c (cplus_expand_expr): Don't reset `target'.
2603 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
2605 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
2607 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
2609 * parse.y (template_datadef): Check for error_mark_node.
2611 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
2613 * cp-tree.def (DEFAULT_ARG): Make `x' class.
2615 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
2617 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
2618 (record_builtin_type): Make non-static.
2619 (flag_short_double): Don't declare.
2620 (init_decl_processing): Remove the creation of many tree nodes now
2621 in c_common_nodes_and_builtins.
2622 (build_void_list_node): New function.
2623 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
2624 * cp-tree.h (flag_short_wchar): Don't declare.
2626 2001-01-04 Mark Mitchell <mark@codesourcery.com>
2628 * call.c (build_conv): Don't use build1 for USER_CONV.
2629 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
2631 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
2633 * lex.c (lang_init): Call c_common_lang_init.
2635 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
2637 * search.c (lookup_fnfields_here): Remove.
2638 (look_for_overrides_r): Use lookup_fnfields_1.
2639 Ignore functions from using declarations.
2641 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
2643 Implement exceptions specifiers for implicit member functions.
2644 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
2645 * method.c (synthesize_exception_spec): New function.
2646 (locate_dtor, locate_ctor, locate_copy): New functions.
2647 (implicitly_declare_fn): Generate the exception spec too.
2648 * search.c (check_final_overrider): Check artificial functions
2650 * typeck2.c (merge_exception_specifiers): New function.
2652 2001-01-03 Jason Merrill <jason@redhat.com>
2654 * init.c (build_default_init): New fn.
2655 (perform_member_init): Split out from here.
2656 (build_new_1): Use it. Simplify initialization logic.
2657 (build_vec_init): Take an array, rather than a pointer and maxindex.
2658 Speed up simple initializations. Don't clean up if we're assigning.
2659 * cp-tree.h: Adjust.
2660 * decl2.c (do_static_initialization): Remove TREE_VEC case.
2661 * parse.y (new_initializer): Return void_zero_node for ().
2662 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
2663 * typeck2.c (digest_init): Only complain about user-written
2666 2000-12-22 Mike Stump <mrs@wrs.com>
2668 * decl2.c: (max_tinst_depth): Increase to 50.
2670 2001-01-02 Mark Mitchell <mark@codesourcery.com>
2672 * class.c (invalidate_class_lookup_cache): Zero the
2673 previous_class_values.
2674 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
2676 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
2677 * decl.c (free_bindings): New variable.
2678 (push_binding): Don't create a new binding if we have one on the
2680 (pop_binding): Put old bindings on the free list.
2681 (init_decl_processing): Use size_int, not build_int_2.
2682 Register free_bindings as a GC root.
2683 (cp_make_fname_decl): Use size_int, not build_int_2.
2684 (push_inline_template_parms_recursive): Likewise.
2685 (end_template_parm_list): Likewise.
2686 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
2687 (tsubst_template_parms): Use size_int, not build_int_2.
2689 * rtti.c (get_vmi_pseudo_type_info): Likewise.
2691 2001-01-02 Richard Henderson <rth@redhat.com>
2693 * parse.y (asm): Set ASM_INPUT_P.
2695 2001-01-02 Jason Merrill <jason@redhat.com>
2697 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
2700 * typeck.c (cp_truthvalue_conversion): New fn.
2701 * cvt.c (ocp_convert): Use it.
2703 * cp-tree.h: Lose c-common.c decls.
2705 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
2706 * cvt.c (convert_to_void): Use type_unknown_p.
2708 * typeck.c (strip_all_pointer_quals): Also strip quals from
2709 pointer-to-member types.
2711 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
2714 * call.c (build_new_method_call): Do evaluate the object parameter
2715 when accessing a static member.
2716 * typeck.c (build_component_ref): Likewise.
2718 2001-01-02 Andreas Jaeger <aj@suse.de>
2720 * decl.c (cp_missing_noreturn_ok_p): New.
2721 (init_decl_processing): Set lang_missing_noreturn_ok_p.
2723 2000-12-29 Jakub Jelinek <jakub@redhat.com>
2725 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
2727 2000-12-29 Mark Mitchell <mark@codesourcery.com>
2729 * class.c (pushclass): Remove #if 0'd code.
2730 * cp-tree.h (overload_template_name): Remove.
2731 * decl.c (store_bindings): Simplify.
2732 (pop_from_top_level): Likewise.
2733 * pt.c (overload_template_name): Remove.
2734 (instantiate_decl): Don't call push_to_top_level if it's not
2737 2000-12-28 Mark Mitchell <mark@codesourcery.com>
2739 * pt.c (register_local_specialization): Don't return a value.
2740 (lookup_template_class): Use move-to-front heuristic when looking
2741 up template instantiations.
2742 (instantiate_decl): Only push_to_top_level when we're actually
2743 going to instantiate the template.
2745 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
2747 * search.c (binfo_for_vtable): Return least derived class, not
2748 most. Handle secondary vtables.
2750 2000-12-22 Jason Merrill <jason@redhat.com>
2752 * pt.c (more_specialized): Don't optimize len==0.
2753 (fn_type_unification): If we're adding the return type, increase len.
2755 * typeck.c (build_binary_op): Fix pmf comparison logic.
2757 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
2758 DECL_STATIC_FUNCTION_P.
2760 * semantics.c (genrtl_finish_function): Don't try to jump to
2761 return_label unless it exists.
2763 In partial ordering for a call, ignore parms for which we don't have
2765 * call.c (joust): Pass len to more_specialized.
2766 (add_template_candidate_real): Strip 'this', pass len.
2767 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
2768 (get_bindings_order): New fn. Pass len down.
2769 (get_bindings_real): Strip 'this', pass len.
2770 (fn_type_unification): Likewise.
2771 (type_unification_real): Succeed after checking 'len' args.
2772 (most_specialized_instantiation): Lose explicit_args parm.
2773 * class.c (resolve_address_of_overloaded_function): Strip 'this',
2776 2000-12-21 Jason Merrill <jason@redhat.com>
2778 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
2779 DECL_TEMPLATE_RESULT.
2781 * search.c (lookup_field_r): Call lookup_fnfields_1, not
2782 lookup_fnfields_here.
2784 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
2786 * call.c (build_object_call): Also allow conversions that return
2787 reference to pointer to function.
2788 (add_conv_candidate): Handle totype being ref to ptr to fn.
2789 (build_field_call): Also allow members of type reference to function.
2790 Lose support for calling pointer to METHOD_TYPE fields.
2792 * error.c (dump_expr): Handle *_CAST_EXPR.
2794 * typeck2.c (build_scoped_ref): Always convert to the naming class.
2796 * tree.c (break_out_cleanups): Lose.
2797 * cp-tree.h: Remove prototype.
2798 * typeck.c (build_component_ref): Don't break_out_cleanups.
2799 (build_compound_expr): Likewise.
2800 * semantics.c (finish_expr_stmt): Likewise.
2802 2000-12-20 Richard Henderson <rth@redhat.com>
2804 * cp-tree.h: Update declarations.
2805 * decl.c (finish_case_label): Return the new stmt node.
2806 * semantics.c (finish_goto_stmt): Likewise.
2807 (finish_expr_stmt, finish_return_stmt): Likewise.
2808 (finish_break_stmt, finish_continue_stmt): Likewise.
2809 (finish_asm_stmt): Likewise.
2810 * parse.y (already_scoped_stmt): Set STMT_LINENO.
2811 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
2812 (simple_if, simple_stmt): Return the new stmt node.
2815 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
2817 * cp-tree.h: Don't declare warn_long_long.
2819 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2821 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
2824 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2826 * pt.c (unify): Handle when both ARG and PARM are
2827 BOUND_TEMPLATE_TEMPLATE_PARM.
2829 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2831 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
2832 DECL_TEMPLATE_PARM_P.
2834 2000-12-15 Jason Merrill <jason@redhat.com>
2836 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
2838 * init.c (build_new_1): Don't strip quals from type.
2840 * decl.c (pushdecl): Don't check for linkage on a non-decl.
2842 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
2844 * call.c (build_new_function_call): Lose space before paren in
2846 (build_new_method_call): Likewise.
2848 * typeck2.c (build_m_component_ref): Propagate quals from datum.
2850 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2852 * pt.c (check_explicit_specialization): Propagate default
2853 function arguments to explicit specializations.
2855 2000-12-13 DJ Delorie <dj@redhat.com>
2857 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
2860 2000-12-08 Jason Merrill <jason@redhat.com>
2862 * error.c (dump_function_name): Don't let the user see __comp_ctor.
2864 Clean up copy-initialization in overloading code.
2865 * call.c (build_user_type_conversion_1): Die if we are asked to
2866 convert to the same or a base type.
2867 (implicit_conversion): Avoid doing so. Lose reference binding code.
2868 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
2869 direct-initialization. Also do direct-init part of copy-init.
2870 (build_user_type_conversion): Don't provide context to convert_like.
2871 * cvt.c (ocp_convert): build_user_type_conversion will now provide
2872 the constructor call for copy-init.
2874 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
2875 instantiation of a member template.
2876 (do_decl_instantiation): Not here.
2878 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
2880 * class.c (check_field_decls): Don't special case anonymous
2881 fields in error messages.
2882 (note_name_declared_in_class): Use %D on diagnostic.
2884 * tree.c (pod_type_p): Use strip_array_types.
2885 (cp_valid_lang_attribute): Likewise.
2886 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
2887 multiple evaluations.
2888 (cp_has_mutable_p): Use strip_array_types.
2890 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
2892 * cp-tree.h (sufficient_parms_p): Declare new function.
2893 * call.c (sufficient_parms_p): New function, broken out of ...
2894 (add_function_candidate): ... here. Use it.
2895 (add_conv_candidate): Use it.
2896 * decl.c (grok_ctor_properties): Use it.
2898 2000-12-07 Jakub Jelinek <jakub@redhat.com>
2900 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
2902 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
2904 * decl2.c (lang_decode_option): Handle -Wformat-security.
2906 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2908 * pt.c (verify_class_unification): New function.
2909 (get_class_bindings): Use it.
2910 (try_class_unification): Tidy.
2911 (unify): Handle when argument of a template-id is not
2912 template parameter dependent.
2913 (template_args_equal): Handle when TREE_CODE's do not match.
2915 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
2917 * lang-specs.h (c++): When invoking the stand-alone preprocessor
2918 for -save-temps, pass all relevant -Defines to it, and then don't
2919 pass them to cc1plus.
2921 2000-12-05 Will Cohen <wcohen@redhat.com>
2923 * decl.c (finish_case_label): Cleared
2924 more_cleanups_ok in surrounding function scopes.
2925 (define_label): Likewise.
2927 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
2929 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
2930 (get_matching_virtual): Remove.
2931 (look_for_overrides): Declare new function.
2932 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
2934 * class.c (check_for_override): Move base class iteration code
2935 to look_for_overrides.
2936 * search.c (next_baselink): Remove.
2937 (get_virtuals_named_this): Remove.
2938 (get_virtual_destructor): Remove.
2939 (tree_has_any_destructors_p): Remove.
2940 (struct gvnt_info): Remove.
2941 (check_final_overrider): Remove `virtual' from error messages.
2942 (get_matching_virtuals): Remove. Move functionality to ...
2943 (look_for_overrides): ... here, and ...
2944 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
2947 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
2949 * typeck.c (get_delta_difference): If via a virtual base,
2951 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
2954 2000-12-04 Richard Henderson <rth@redhat.com>
2956 * error.c (dump_tree): Use output_add_string not OB_PUTS.
2958 2000-12-04 Jason Merrill <jason@redhat.com>
2960 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
2961 (write_builtin_type): Pass intSI_type_node and the like through
2963 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
2964 Pass intSI_type_node and the like through type_for_mode.
2965 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
2966 * pt.c (tsubst, unify): Likewise.
2967 * tree.c (walk_tree): Likewise.
2968 * error.c (dump_type): Likewise.
2969 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
2971 * Make-lang.in: Tweak top comment for emacs.
2974 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
2976 * class.c (clone_function_decl): Robustify.
2978 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
2980 * decl.c (store_bindings): Only search in the non modified
2981 old_bindings for duplicates.
2983 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
2985 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
2988 * typeck.c (build_static_cast): Remove unused variable.
2990 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2992 * pt.c: Fix typo in comment.
2994 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
2996 * decl2.c (warn_format): Remove definition.
2997 (lang_decode_option): Handle -Wformat-nonliteral,
2998 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
3000 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
3002 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
3003 (init_decl_processing): Don't create string_type_node,
3004 const_string_type_node, wint_type_node, intmax_type_node,
3005 uintmax_type_node, default_function_type, ptrdiff_type_node and
3006 unsigned_ptrdiff_type_node. Adjust position of call to
3007 c_common_nodes_and_builtins.
3008 (identifier_global_value): New function.
3010 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
3012 * call.c (standard_conversion): Reject pointer to member
3013 conversions from ambiguous, inaccessible or virtual bases.
3014 * typeck.c (build_static_cast): Don't check pointers to members
3017 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3019 * method.c (do_build_copy_constructor): Preserve cv
3020 qualifications when accessing source object members.
3021 (do_build_assign_ref): Likewise. Remove separate diagnostics for
3024 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3026 * method.c (do_build_assign_ref): Construct appropriately
3027 CV-qualified base reference. Don't allow const casts in base
3030 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3032 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
3033 incomplete return type.
3035 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3037 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
3038 * semantics.c (finish_base_specifier): Accept a _TYPE not a
3041 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3043 * spew.c (yyerror): Cope if yylval.ttype is NULL.
3045 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3047 * decl.c (grokdeclarator): Diagnose undefined template contexts.
3049 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
3051 * decl.c (grokdeclarator): Do type access control on friend
3054 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
3056 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
3057 bison parser ickiness.
3058 * pt.c (tsubst_friend_function): Enter namespace scope when
3059 tsubsting the function name.
3060 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
3062 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
3064 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
3065 * cvt.c (cp_convert_to_pointer): Add force parameter.
3066 Allow conversions via virtual base if forced.
3067 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
3068 (ocp_convert): Likewise.
3069 * search.c (binfo_from_vbase): Return the virtual base's binfo.
3070 * typeck.c (get_delta_difference): Adjust handling of virtual
3073 2000-11-26 Mark Mitchell <mark@codesourcery.com>
3075 * tree.c (struct list_hash): Remove.
3076 (list_hash_table): Make it be an htab.
3077 (struct list_proxy): New type.
3078 (list_hash_eq): New function.
3079 (list_hash_pieces): Renamed from ...
3080 (list_hash): ... this.
3081 (list_hash_lookup): Remove.
3082 (list_hash_add): Remove.
3083 (hash_tree_cons): Use the generic hashtable.
3084 (mark_list_hash): Remove.
3085 (init_tree): Create the hashtable.
3087 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
3089 * method.c (build_mangled_C9x_name): Rename to
3090 build_mangled_C99_name. Change C9X references in comments to
3093 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
3095 * parse.y (unary_expr): Move VA_ARG from here ...
3096 (primary): ... to here.
3098 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
3100 * semantics.c (finish_id_expr): If type is error_mark, return
3103 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
3105 * pt.c (lookup_template_class): Simplify loop exit constructs.
3106 Cope when there is no partial instantiation of a template
3109 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
3111 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
3113 2000-11-22 Mark Mitchell <mark@codesourcery.com>
3115 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
3118 * pt.c (do_decl_instantiate): Explicitly clone constructors and
3119 destructors that haven't already been cloned.
3121 2000-11-20 Richard Henderson <rth@redhat.com>
3123 * parse.y (yyparse_1): Rename the parser entry point.
3125 2000-11-20 Alex Samuel <samuel@codesourcery.com>
3127 * mangle.c (write_name): Use <unscoped-name> for names directly in
3129 (write_unscoped_name): Accept names directly in function scope.
3131 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
3133 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
3134 * parse.y (extdef): Add EXPORT reduction.
3135 * spew.c (yylex): Don't skip export here.
3137 2000-11-19 Mark Mitchell <mark@codesourcery.com>
3139 * decl.c (init_decl_processing): Correct name of pure virtual
3140 function under the new ABI.
3141 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
3142 (throw_bad_typeid): Likewise for bad typeid function.
3144 2000-11-18 Mark Mitchell <mark@codesourcery.com>
3146 * decl.c (grokparms): Don't even function types of `void' type,
3148 * mangle.c (write_type): Don't crash when confronted with the
3151 * decl.c (grokparms): Don't create parameters of `void' type.
3153 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
3155 * lex.c (mark_impl_file_chain): Delete.
3156 (init_parse): Remove call to ggc_add_string_root. No need to
3157 ggc_strdup a string constant. Do not add impl_file_chain to GC
3159 (handle_pragma_implementation): No need to ggc_strdup main_filename.
3161 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3163 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
3165 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3167 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
3168 * decl.c (grokdeclarator): Don't reject void parms here.
3169 (require_complete_types_for_parms): Simplify, use
3170 complete_type_or_else.
3171 (grokparms): Remove bitrot. Remove funcdef parm.
3172 Deal with ellipsis parm lists here.
3173 * semantics.c (finish_parmlist): Don't append void_list_node
3174 here. Set PARMLIST_ELLIPSIS_P.
3176 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3178 * typeck2.c (incomplete_type_error): Reorganise to avoid
3179 excessive diagnostics.
3181 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
3183 * lex.c (struct impl_files, internal_filename): Constify a char *.
3185 2000-11-16 Mark Mitchell <mark@codesourcery.com>
3187 * mangle.c (write_special_name_constructor): Don't generate
3188 assembler junk when confronted with an old-style constructor.
3189 (write_special_name_destructor): Likewise.
3190 (mangle_decl_string): Do it here instead.
3192 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
3194 * call.c (op_error): Make error messages clearer.
3196 2000-11-15 Mark Mitchell <mark@codesourcery.com>
3198 * decl.c (wrapup_globals_for_namespace): Don't mark things
3199 TREE_ASM_WRITTEN when they're not.
3201 2000-11-15 Jason Merrill <jason@redhat.com>
3203 * typeck2.c (friendly_abort): Uncount the error before handing
3206 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
3208 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
3210 2000-11-14 Mark Mitchell <mark@codesourcery.com>
3212 * class.c (build_vtbl_initializer): Fix typo in comment.
3213 * typeck.c (expr_sizeof): Don't crash on errors.
3215 2000-11-14 Jim Wilson <wilson@redhat.com>
3217 * lang-specs.h: Add %2 after %(cc1_options).
3219 2000-11-14 Richard Henderson <rth@redhat.com>
3221 * typeck.c (c_sizeof): Be strict about casting result value
3222 back to c_size_type_node.
3223 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
3225 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
3227 * typeck.c (build_unary_op): Use boolean_increment from
3228 c-common.c, moving the relevant code there.
3230 2000-11-11 Jason Merrill <jason@redhat.com>
3232 * typeck.c (mark_addressable): Don't call put_var_into_stack.
3234 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
3237 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3239 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
3240 * lex.c (copy_lang_decl): Likewise.
3242 2000-11-09 Mark Mitchell <mark@codesourcery.com>
3244 * dump.c (cp_dump_tree): Don't dump function bodies here.
3246 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3247 (dump.o): Update dependency list.
3248 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
3249 (flag_dump_translation_unit): Likewise.
3250 (CP_TYPE_QUALS): Adjust definition.
3251 (DECL_C_BIT_FIELD): Remove.
3252 (SET_DECL_C_BIT_FIELD): Likewise.
3253 (CLEAR_DECL_C_BIT_FIELD): Likewise.
3254 (add_maybe_template): Likewise.
3255 (strip_array_types): Likewise.
3256 (dump_node_to_file): Likewise.
3257 (cp_dump_tree): New function.
3258 * decl.c (init_decl_processing): Set lang_dump_tree.
3259 * decl2.c (flag_dump_translation_unit): Remove.
3260 * dump.c: Move most of it to ../c-dump.c.
3261 (cp_dump_tree): New function.
3262 * pt.c (add_maybe_template): Remove.
3263 * typeck.c (strip_array_types): Likewise.
3265 2000-11-07 Eric Christopher <echristo@redhat.com>
3267 * decl.c (init_decl_processing): Change definition of
3268 __wchar_t to wchar_t. Remove artificial declaration of
3270 * lex.c: Change instances of __wchar_t to wchar_t.
3272 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
3274 * lex.c (do_identifier): Don't lookup_name for operators.
3275 * parse.y (operator): Save looking_for_typename.
3276 (unoperator): Restore it.
3277 * spew.c (frob_opname): Use nth_token for lookahead.
3279 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
3281 * decl.c (grok_op_properties): Always use coerce_new_type and
3283 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
3284 exception specification. Tidy up.
3285 (coerce_delete_type): Preserve exception specification. Tidy up.
3287 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
3289 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
3290 (push_binding_level), error.c (cp_tree_printer), pt.c
3291 (process_partial_specialization, tsubst_template_arg_vector),
3292 search.c (lookup_member): Use memset () instead of bzero ().
3294 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
3296 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
3298 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
3300 * Make-lang.in (c++.distdir): Remove.
3302 2000-11-04 Mark Mitchell <mark@codesourcery.com>
3304 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
3305 declarations from different namespaces to be combined.
3307 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
3309 * decl.c: Include tm_p.h.
3311 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
3313 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
3315 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
3317 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
3318 (build_overload_value), repo.c (open_repo_file), xref.c
3319 (open_xref_file): Use strchr () and strrchr () instead of index ()
3322 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
3324 * call.c (build_over_call): Call fold on the CALL_EXPR.
3326 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
3328 * error.c (dump_template_decl): Separate template hearders with
3331 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
3333 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
3334 TS_* flags with corresponding TFF_*. Adjust prototypes of
3335 functions (which used to take a tree_string_flags) to take an int.
3337 * cp-tree.h (enum tree_string_flags): Remove
3338 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
3339 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
3340 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3341 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3342 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
3343 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
3344 (type_as_string, decl_as_string, expr_as_string,
3345 context_as_string): Adjust prototype.
3347 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
3348 instead of TS_PLAIN.
3350 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
3351 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
3354 2000-10-30 Mark Mitchell <mark@codesourcery.com>
3356 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
3357 (linkage_kind): New enumeration.
3358 (decl_linkage): New function.
3359 * decl2.c (comdat_linkage): Extend comment.
3360 * error.c (dump_function_decl): Print the arguments used to
3361 instantiate a template, even when not printing the type of the
3363 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
3364 not TREE_PUBLIC, to test for external linkage.
3365 * tree.c (decl_linkage): New function.
3367 2000-10-28 Mark Mitchell <mark@codesourcery.com>
3369 * pt.c (instantiate_decl): Always instantiate static data members
3370 initialized in-class.
3372 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
3374 * Make-lang.in: Move all build rules here from Makefile.in,
3375 adapt to new context. Wrap all rules that change the current
3376 directory in parentheses. Expunge all references to $(P).
3377 When one command depends on another and they're run all at
3378 once, use && to separate them, not ;. Add OUTPUT_OPTION to
3379 all object-file generation rules. Delete obsolete variables.
3381 * Makefile.in: Delete.
3382 * config-lang.in: Delete outputs= line.
3384 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
3386 * error.c (dump_function_decl): Print no space between
3387 `ptr-operator' the `type-specifier' of the return type.
3388 (dump_type_prefix): Make sure we put space at the appropriate
3391 2000-10-23 Jason Merrill <jason@redhat.com>
3393 * call.c (equal_functions): Also call decls_match for extern "C" fns.
3395 2000-10-22 Jason Merrill <jason@redhat.com>
3397 * call.c (build_conditional_expr): Use ocp_convert to force
3400 2000-10-22 Mark Mitchell <mark@codesourcery.com>
3402 * call.c (standard_conversion): Use RVALUE_CONVs for all
3403 expressions that satisfy lvalue_p, not just those that satisfy
3406 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
3408 * typeck.c (c_sizeof): Return an expression of `size_t' type,
3409 not one with TYPE_IS_SIZETYPE set.
3410 (dubious_conversion_warnings): Remove special-case code.
3412 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
3414 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
3415 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
3416 (dump_type_prefix): Print vector-of-int as 'int vector'.
3417 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
3418 * tree.c (walk_tree): Handle VECTOR_TYPE.
3420 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
3422 2000-10-21 Jason Merrill <jason@redhat.com>
3424 * parse.y (operator): Set got_object from got_scope.
3425 Set looking_for_typename.
3426 * decl.c (lookup_name_real): Clear val after setting from_obj.
3427 Reorganize diagnostic.
3429 2000-10-20 Jason Merrill <jason@redhat.com>
3431 * tree.c (walk_tree): Don't walk into default args.
3433 * error.c (dump_expr): Use host_integerp.
3435 2000-10-20 David Edelsohn <edelsohn@gnu.org>
3437 * typeck2.c (abstract_virtuals_error): Use "because" instead of
3438 "since" in error message.
3440 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3442 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
3444 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
3446 * decl.c (revert_static_member_fn): Fixed typo.
3448 2000-10-19 Mark Mitchell <mark@codesourcery.com>
3450 * class.c (subobject_offset_fn): New type.
3451 (dfs_record_base_offsets): Remove.
3452 (record_base_offsets): Likewise.
3453 (dfs_search_base_offsets): Likewise.
3454 (record_subobject_offset): New function.
3455 (check_subobject_offset): Likewise.
3456 (walk_subobject_offsets): Likewise.
3457 (record_subobject_offsets): Likewise.
3458 (layout_conflict_p): Reimplement.
3459 (layout_nonempty_base_or_field): Correct handling of type
3460 conflicts during layout.
3461 (layout_empty_base): Likewise.
3462 (build_base_field): Adjust to handle new representation of empty
3464 (build_base_fields): Likewise.
3465 (layout_virtual_bases): Likewise.
3466 (splay_tree_compare_integer_csts): New function.
3467 (layout_class_type): Use a splay_tree, rather than a varray, to
3468 represent the offsets of empty bases.
3470 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
3471 * decl.c (select_decl): Don't return declarations that are
3474 2000-10-18 Mark Mitchell <mark@codesourcery.com>
3476 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
3477 (fake_std_node): New macro.
3478 * decl.c (in_std): Rename to ...
3479 (in_fake_std): ... this.
3480 (flag_no_builtin): Remove.
3481 (flag_no_nonansi_builtin): Likewise.
3482 (walk_namespaces_r): Use fake_std_node.
3483 (push_namespace): Use std_identifier.
3484 (pop_namespace): Use in_fake_std.
3485 (lookup_name_real): Use fake_std_node.
3486 (init_decl_processing): When -fhonor-std, create the `std'
3487 namespace. Don't create a dummy fake_std_node in that case.
3488 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
3489 (builtin_function): Put builtins whose names don't begin
3490 with `_' in the std namespace.
3491 * decl2.c (flag_no_builtin): Remove.
3492 (flag_no_nonansi_builtin): Likewise.
3493 (set_decl_namespace): Use fake_std_node.
3494 (validate_nonmember_using_decl): Likewise.
3495 (do_using_directive): Likewise.
3496 (handle_class_head): Likewise.
3497 * dump.c (dequeue_and_dump): Likewise.
3498 * except.c (init_exception_processing): Use std_identifier.
3499 * init.c (build_member_call): Use fake_std_node.
3500 * rtti.c (init_rtti_processing): Use std_identifier.
3502 2000-10-17 Mark Mitchell <mark@codesourcery.com>
3504 * cp-tree.h (back_end_hook): Remove declaration.
3505 * decl2.c (back_end_hook): Remove definition.
3507 * dump.c (dequeue_and_dump): Dump TREE_USED.
3509 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
3511 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
3513 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
3515 * decl.c (WINT_TYPE): Define.
3516 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
3517 c_size_type_node, signed_size_type_node and wint_type_node.
3519 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
3521 * decl2.c (warn_missing_format_attribute): New variable.
3522 (lang_decode_option): Decode -Wmissing-format-attribute.
3524 2000-10-16 Mark Mitchell <mark@codesourcery.com>
3526 * typeck.c (qualify_type): Remove.
3527 (composite_pointer_type): Fix handling of conversions to `cv void*'.
3529 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3531 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
3533 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3535 * Makefile.in (parse.c, parse.h): Create atomically.
3537 2000-10-12 Mark Mitchell <mark@codesourcery.com>
3539 * class.c (current_obstack): Remove.
3540 * decl.c (ggc_p): Remove.
3541 (start_decl): Don't use decl_tree_cons.
3542 (grokdeclarator): Don't use build_decl_list.
3543 (start_function): Don't use decl_tree_cons.
3544 (finish_function): Don't mess with obstacks.
3545 * decl2.c (grok_x_components): Don't use build_decl_list.
3546 * lex.c (make_call_declarator): Don't call decl_tree_cons.
3547 (implicitly_declare_fn): Don't call build_decl_list.
3548 * parse.y (frob_specs): Don't call build_decl_list or
3550 (expr_or_declarator_intern): Don't call decl_tree_cons.
3551 (primary): Don't call build_decl_list.
3552 (fcast_or_absdcl): Likewise.
3553 (typed_declspecs): Don't call decl_tree_cons.
3554 (reserved_declspecs): Don't call build_decl_list.
3555 (declmods): Likewise.
3556 (reserved_typespecquals): Likewise.
3558 (new_type_id): Likewise.
3559 (cv_qualifiers): Likewise.
3560 (after_type_declarator_intern): Likewise.
3561 (notype_declarator_intern): Likewise.
3562 (absdcl_intern): Likewise.
3563 (named_parm): Likewise.
3564 * pt.c (most_specialized_class): Likewise.
3565 * repo.c (temporary_obstack): Make it a structure, not a pointer.
3566 (init_repo): Initialize it.
3567 * search.c (current_obstack): Remove.
3568 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
3570 2000-10-09 Richard Henderson <rth@cygnus.com>
3572 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
3573 (c++ language support bits for libgcc): Remove.
3574 (c++.clean): Remove cplib2.txt cleanup.
3575 * config-lang.in (headers, lib2funcs): Remove.
3577 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
3578 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
3579 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
3580 * inc/new.h, inc/typeinfo: Remove files.
3582 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
3584 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
3586 (init_decl_processing): Initialize intmax_type_node and
3589 2000-10-06 Richard Henderson <rth@cygnus.com>
3591 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
3592 (original_result_rtx): Remove.
3593 * decl.c (save_function_data): Don't clear x_result_rtx.
3594 (mark_lang_function): Don't mark it either.
3595 * expr.c (fixup_result_decl): Remove.
3596 * semantics.c (genrtl_named_return_value): Frob the return decl
3597 before calling emit_local_var.
3598 (genrtl_finish_function): Don't call fixup_result_decl.
3599 Always emit the jump to return_label.
3601 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
3603 * pt.c (lookup_template_class): Set current access for enum.
3604 (tsubst_enum): Set file & line for enum decl.
3606 * spew.c (yylex): Remove unused variable.
3608 2000-10-05 Richard Henderson <rth@cygnus.com>
3610 * semantics.c (genrtl_finish_function): Don't init or check
3611 can_reach_end; remove noreturn and return value checks.
3613 2000-10-05 Tom Tromey <tromey@cygnus.com>
3615 * init.c (build_java_class_ref): Use `build_static_name' with a
3616 suffix, not a prefix, to build the class object's name.
3618 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3620 * cp-tree.h (access_kind): Fix comment typo.
3621 * decl2.c (grokfield): Fix diagnostic typo.
3622 * semantics.c (finish_template_type): Fix comment typo.
3623 (finish_qualified_object_call_expr): Likewise.
3625 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3627 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
3630 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3632 * spew.c (frob_id): New static function.
3633 (frob_opname): Use it.
3636 2000-10-01 Mark Mitchell <mark@codesourcery.com>
3638 * decl.c (lang_mark_false_label_stack): Remove.
3639 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
3641 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
3643 * gxxint.texi: Use @email for formatting email addresses.
3645 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
3647 * error.c: Remove direct obstack manipulation. Replace with
3648 output_buffer-based formatting. Adjust calls to removed macros.
3649 (obstack_chunk_alloc, obstack_chunk_free): Remove.
3650 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
3651 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
3653 2000-09-24 Mark Mitchell <mark@codesourcery.com>
3655 * ir.texi: Move to ../c-tree.texi.
3657 2000-09-20 Jason Merrill <jason@redhat.com>
3659 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
3661 2000-09-21 Andreas Jaeger <aj@suse.de>
3663 * errfn.c: Move declaration of cp_printer and cp_printers to ...
3664 * cp-tree.h: ... here.
3666 * error.c: Remove declaration of cp_printer.
3668 2000-09-20 Mark Mitchell <mark@codesourcery.com>
3670 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
3672 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
3674 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
3677 2000-09-18 Mark Mitchell <mark@codesourcery.com>
3679 * decl.c (start_function): Robustify.
3681 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3683 * cp-tree.h (check_function_format): Accept a `status' parameter.
3685 * call.c, typeck.c: Updates calls to `check_function_format'.
3687 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
3689 * decl2.c (handle_class_head): Always push some scope even
3692 2000-09-16 Mark Mitchell <mark@codesourcery.com>
3694 * cp-tree.h (struct cp_language_function): Remove
3695 x_scope_stmt_stack and name_declared.
3696 (current_scope_stmt_stack): Remove.
3697 (function_name_declared_p): New macro.
3698 (struct lang_decl_flags): Use c_lang_decl as a base class.
3700 (struct lang_decl): Replace saved_tree with context.
3701 (DECL_FRIEND_CONTEXT): Adjust accordingly.
3702 (SET_DECL_FRIEND_CONTEXT): Likewise.
3703 (DECL_VIRTUAL_CONTEXT): Likewise.
3704 (DECL_SAVED_TREE): Remove.
3705 (C_DECLARED_LABEL_FLAG): Likewise.
3706 (cplus_expand_expr_stmt): Don't declare.
3707 (add_decl_stmt): Likewise.
3708 (add_scope_stmt): Likewise.
3709 * decl.c (mark_stmt_tree): Remove.
3710 (case_compare): Likewise.
3711 (finish_case_label): Use c_add_case_label.
3712 (init_decl_processing): Set more language-specific hooks.
3713 (build_enumerator): Fix typo in comment.
3714 (cplus_expand_expr_stmt): Remove.
3715 (mark_lang_function): Use mark_c_language_function.
3716 (lang_mark_tree): Use c_mark_lang_decl.
3717 * decl2.c: Change order of inclusion.
3718 * except.c: Likewise.
3719 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
3720 back on c_expand_expr.
3721 * friend.c: Include expr.h.
3722 * init.c: Change order of inclusion.
3723 * Makefile.in: Update dependencies.
3724 * lex.h (free_lang_decl_chain): Remove.
3725 * optimize.c (maybe_clone_body): Use function_name_declared_p.
3726 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
3728 (instantiate_decl): Use function_name_declared_p.
3729 * semantics.c (lang_expand_expr_stmt): Remove.
3730 (set_current_function_name_declared): Likewise.
3731 (current_function_name_declared): Likewise.
3732 (begin_compound_stmt): Use function_name_declared_p.
3733 (add_decl_stmt): Remove.
3734 (setup_vtbl_ptr): Use function_name_declared_p.
3735 (add_scope_stmt): Remove.
3736 (current_scope_stmt_stack): New function.
3737 (cp_expand_stmt): Don't handle SCOPE_STMTs.
3738 (expand_body): Use function_name_declared_p.
3739 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
3740 * typeck.c: Change order of includes.
3741 (convert_sequence): Remove.
3743 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
3745 * lex.c (reswords): Add _Complex.
3747 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3749 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
3751 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
3753 * init.c (begin_init_stmts): Don't use // comments.
3755 2000-09-12 Jason Merrill <jason@redhat.com>
3757 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
3758 all non-extern arrays.
3760 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
3761 typenames, too. Downgrade complaint to pedwarn.
3762 (xref_tag): Warn about surprising behavior of 'friend struct T'.
3763 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
3764 'class This::Inherited'.
3766 2000-09-12 Mark Mitchell <mark@codesourcery.com>
3768 * decl.c (finish_case_label): Given the LABEL_DECL a
3771 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
3773 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
3774 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
3775 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3776 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3777 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
3779 (sorry_for_unsupported_tree, print_scope_operator,
3780 print_left_paren, print_right_paren, print_left_bracket,
3781 print_right_bracket, print_whitespace): Likewise.
3782 (aggr_variety): Rename to class_key_or_enum.
3783 (print_type): Rename to print_type_id.
3784 (print_type_specifier_seq, print_simple_type_specifier,
3785 print_elaborated_type_specifier,
3786 print_rest_of_abstract_declarator,
3787 print_parameter_declaration_clause, print_exception_specification,
3788 print_nested_name_specifier, print_template_id,
3789 typedef_original_name, print_template_argument_list_start,
3790 print_template_argument_list_end): New functions.
3792 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
3794 * ir.texi: Add more documentation.
3796 2000-09-11 Mark Mitchell <mark@codesourcery.com>
3798 * cp-tree.h (struct saved_scope): Remove x_function_parms.
3799 (current_function_parms): Don't define.
3800 (struct cp_language_function): Remove parms_stored.
3801 (current_function_just_assigned_this): Don't define.
3802 (current_function_parms_stored): Likewise.
3803 (static_ctors): Declare.
3804 (static_dtors): Likewise.
3805 (SF_EXPAND): Don't define.
3806 (expand_start_early_try_stmts): Remove declaration.
3807 (store_parm_decls): Likewise.
3808 * decl.c (static_ctors): Don't declare.
3809 (static_dtors): Likewise.
3810 (struct binding_level): Remove this_block.
3811 (poplevel): Remove dead code.
3812 (set_block): Likewise.
3813 (mark_binding_level): Don't mark this_block.
3814 (mark_saved_scope): Don't mark x_function_parms.
3815 (init_decl_processing): Don't add current_function_parms as a GC
3817 (check_function_type): Change prototype.
3818 (start_function): Remove RTL-generation code.
3819 (expand_start_early_try_stmts): Remove.
3820 (store_parm_decls): Give it internal linkage. Remove
3821 RTL-generation code.
3822 (finish_function): Remove RTL-generation code.
3823 * decl2.c (static_ctors): Fix formatting.
3824 (static_dtors): Likewise.
3825 * method.c (use_thunk): Don't call store_parm_decls.
3826 (synthesize_method): Likewise.
3827 * optimize.c (maybe_clone_body): Likewise.
3828 * parse.y (fn.def2): Likewise.
3829 (.set_base_init): Likewise.
3830 (nodecls): Likewise.
3831 * pt.c (instantiate_decl): Likewise.
3832 * rtti.c (synthesize_tinfo_fn): Likewise.
3833 * semantics.c (genrtl_try_block): Simplify.
3834 (expand_body): Use genrtl_start_function and
3835 genrtl_finish_function.
3836 (genrtl_start_function): New function.
3837 (genrtl_finish_function): Likewise.
3839 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
3841 * error.c (cp_tree_printer, case 'P'): Append break.
3843 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
3845 * cp-tree.h (frob_opname): Declare.
3846 * parse.y (saved_scopes): New static variable.
3847 (cp_parse_init): Adjust.
3848 (do_id): If lastiddecl is NULL, do do_identifier.
3849 (operator): Save scope information.
3850 (unoperator): New reduction. Restore scope information.
3851 (operator_name): Append unoperator. Call frob_opname.
3852 * spew.c (frob_opname): Define.
3854 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
3856 * decl.c, rtti.c: Include defaults.h if not already included.
3857 Don't define the *_TYPE_SIZE macros.
3859 2000-09-09 Mark Mitchell <mark@codesourcery.com>
3861 * cp-tree.h (push_switch): Change prototype.
3862 (check_cp_case_value): Remove declaration.
3863 (decl_constant_value): Likewise.
3864 * decl.c (struct cp_switch): Add switch_stmt and cases.
3865 (case_compare): New function.
3866 (push_switch): Set switch_stmt. Initialize cases.
3867 (pop_switch): Clean up cases.
3868 (define_case_label): Rename to ...
3869 (finish_case_label): ... this. Do semantic analysis for case
3871 (start_function): Correct comment.
3872 * decl2.c (check_cp_case_value): Remove.
3873 * expr.c (do_case): Remove.
3874 * pt.c (tsubst_expr): Adjust call to finish_case_label.
3875 * semantics.c (genrtl_do_poplevel): Remove declaration.
3876 (RECHAIN_STMTS): Remove.
3877 (finish_break_stmt): Use build_break_stmt.
3878 (finish_continue_stmt): Use build_continue_stmt.
3879 (finish_switch_cond): Adjust condition here, rater than in
3880 c_expand_start_case.
3881 (finish_case_label): Remove.
3882 * typeck.c (c_expand_return): Remove.
3883 (c_expand_start_case): Likewise.
3885 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
3887 * ir.texi: Document type nodes.
3889 2000-09-06 Mark Mitchell <mark@codesourcery.com>
3891 * cp-tree.h (init_cp_semantics): Declare.
3892 (genrtl_try_block): Don't declare.
3893 (genrtl_handler): Likewise.
3894 (genrtl_catch_block): Likewise.
3895 (genrtl_ctor_stmt): Likewise.
3896 (genrtl_subobject): Likewise.
3897 (genrtl_do_poplevel): Likewise.
3898 (genrtl_named_return_value): Likewise.
3899 * lex.c (init_parse): Call init_cp_semantics.
3900 * semantics.c (genrtl_try_block): Give it internal linkage.
3901 (genrtl_handler): Likewise.
3902 (genrtl_catch_block): Likewise.
3903 (genrtl_ctor_stmt): Likewise.
3904 (genrtl_subobject): Likewise.
3905 (genrtl_do_poplevel): Likewise.
3906 (genrtl_named_return_value): Likewise.
3907 (lang_expand_stmt): Rename to ...
3908 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
3909 (init_cp_semantics): Define.
3911 * decl.c (initialize_local_var): Remove RTL-generating code.
3912 * semantics.c (genrtl_try_block): Fix formatting.
3914 Move statement-tree facilities from C++ to C front-end.
3915 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
3916 (void_zero_node): Remove.
3917 (stmt_tree): Likewise.
3918 (scope_chain): Adjust.
3919 (language_function): Rename to cp_language_function.
3920 (cp_function_chain): Adjust.
3921 (current_stmt_tree): Remove.
3922 (last_tree): Likewise.
3923 (last_expr_type): Likewise.
3924 (struct lang_decl): Adjust.
3925 (STMT_IS_FULL_EXPR_P): Remove.
3927 (begin_stmt_tree): Likewise.
3928 (finish_stmt_tree): Likewise.
3929 (walk_tree_fn): Likewise.
3930 (walk_stmt_tree): Likewise.
3931 * class.c (finish_struct): Replace use of add_tree with add_stmt.
3932 * decl.c (mark_stmt_tree): Adjust type.
3933 (init_decl_processing): Don't build void_zero_node.
3934 (initialize_local_var): Adjust usage of current_stmt_tree.
3935 (finish_enum): Use add_stmt, not add_tree.
3936 (save_function_data): Adjust use of language_function.
3937 (finish_constructor_body): Use add_stmt, not add_tree.
3938 (finish_destructor_body): Likewise.
3939 (push_cp_function_context): Adjust use of language_function.
3940 (pop_cp_function_context): Likewise.
3941 (mark_lang_function): Likewise.
3942 (mark_cp_function_context): Likewise.
3943 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
3944 (build_vec_init): Likewise.
3945 * semantics.c (SET_LAST_STMT): Remove.
3946 (RECHAIN_STMTS): Don't use it.
3947 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
3948 (current_stmt_tree): Define.
3950 (finish_goto_stmt): Use add_stmt, not add_tree.
3951 (finish_expr_stmt): Likewise.
3952 (begin_if_stmt): Likewise.
3953 (finish_then_clause): Likewise.
3954 (begin_while_stmt): Likewise.
3955 (begin_do_stmt): Likewise.
3956 (finish_return_stmt): Likewise.
3957 (begin_for_stmt): Likewise.
3958 (finish_break_stmt): Likewise.
3959 (finish_continue_stmt): Likewise.
3960 (begin_switch_stmt): Likewise.
3961 (finish_case_label): Likewise.
3962 (begin_try_block): Likewise.
3963 (begin_function_try_block): Likewise.
3964 (begin_handler): Likewise.
3965 (begin_catch_block): Likewise.
3966 (begin_compound_stmt): Likewise.
3967 (begin_asm_stmt): Likewise.
3968 (finish_asm_stmt): Likewise.
3969 (finish_label_stmt): Likewise.
3970 (add_decl_stmt): Likewise.
3971 (finish_subobject): Likewise.
3972 (finish_decl_cleanup): Likewise.
3973 (finish_named_return_value): Likewise.
3974 (setup_vtbl_ptr): Likewise.
3975 (add_scope_stmt): Likewise.
3976 (finish_stmt_expr): Likewise.
3977 (prune_unused_decls): Remove.
3978 (begin_stmt_tree): Likewise.
3979 (finish_stmt_tree): Likewise.
3980 (prep_stmt): Adjust use of current_stmt_tree.
3981 (lang_expand_stmt): Likewise.
3982 * tree.c (statement_code_p): Remove.
3983 (cp_statement_code_p): New function.
3984 (walk_stmt_tree): Remove.
3985 (init_tree): Set lang_statement_code_p.
3987 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
3989 Integrated preprocessor.
3991 * Make-lang.in, Makefile.in: Remove all references to input.c,
3992 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
3993 * gxx.gperf, hash.h, input.c: Delete.
3994 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
3995 initialized properly.
3997 * class.c (fixup_pending_inline): Take a tree, not a
3998 struct pending_inline *. All callers changed.
3999 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
4000 RID_PROTECTED entries in ridpointers[] array here.
4001 * decl.c (duplicate_decls): Do not refer to struct
4003 (record_builtin_type, init_decl_processing): Use RID_MAX not
4005 (grokdeclarator): Use C_IS_RESERVED_WORD.
4006 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
4008 (grok_x_components): Do not inspect pending_inlines chain.
4010 * cp-tree.h (struct lang_identifier): Add rid_code entry.
4011 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
4012 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
4013 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
4014 TIME_IDENTIFIER_FILEINFO): Kill.
4016 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
4018 * parse.y: Call do_pending_inlines unconditionally.
4019 reinit_parse_for_method is now snarf_method. fn.defpen is no
4020 longer necessary. Remove unnecessary <itype> annotation on
4021 SCOPE. Do not refer to end_of_file or struct pending_inline.
4022 * semantics.c (begin_inline_definitions): Call
4023 do_pending_inlines unconditionally.
4025 * lex.c: Remove all code now shared with C front end.
4026 Initialize cpplib properly if USE_CPPLIB. Put reserved words
4027 into the get_identifier table. Rewrite pragma handling to
4028 work with the registry. Move code to save tokens for later
4029 processing to spew.c.
4031 * spew.c: Rewrite everything in terms of token streams instead
4032 of text. Move routines here from lex.c / input.c as
4033 appropriate. GC-mark trees hanging off the pending inlines
4036 2000-09-06 Mark Mitchell <mark@codesourcery.com>
4038 * NEWS: Mention that the named return value extension has been
4040 * cp-tree.h (original_result_rtx): Define.
4041 (TREE_REFERENCE_EXPR): Remove.
4042 (DECL_VPARENT): Likewise.
4043 (pushdecl_nonclass_level): Likewise.
4044 (store_return_init): Likewise.
4045 (reinit_lang_specific): Likewise.
4046 (genrtl_named_return_value): Change prototype.
4047 * decl.c (original_result_rtx): Remove.
4048 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
4049 Do not generate RTL for local variables here.
4050 (store_return_init): Remove.
4051 * semantics.c (genrtl_named_return_value): Simplify. Fold in
4053 (finish_named_return_value): Adjust accordingly. Warn that this
4054 extension is deprecated.
4055 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
4057 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4059 * pt.c (type_unification_real): Replace switch with if.
4060 (unify): Tsubst non-type parms before comparing.
4062 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4064 * error.c (dump_typename): New function, broken out of ...
4065 (dump_type): ... here. Use it.
4066 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
4068 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4070 * init.c (build_offset_ref): Deal with namespace scoped
4073 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4075 * class.c (resolve_address_of_overloaded_function): Add
4076 explanation message.
4077 * decl.c (define_case_label): Reformat explanation.
4078 * decl2.c (finish_static_data_member_decl): Likewise.
4079 (grokfield): Likewise.
4080 * friend.c (do_friend): Likewise.
4082 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
4084 * tree.c (walk_tree): Expose tail recursion.
4085 (walk_stmt_tree): New function.
4086 * cp-tree.h: Prototype walk_stmt_tree.
4087 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
4088 the BLOCKs directly. If a BLOCK has no variables after
4089 pruning, discard it.
4090 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
4091 restore the line number.
4093 2000-09-05 Mark Mitchell <mark@codesourcery.com>
4095 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
4096 (pt.o): Remove dependency on HTAB_H.
4097 * cp-tree.h: Include hashtab.h.
4098 (walk_tree): Change prototype.
4099 (walk_tree_without_duplicates): New function.
4100 * decl.c (check_default_argument): Use it.
4101 * optimize.c (remap_decl): Adjust calls to walk_tree.
4102 (copy_body): Likewise.
4103 (expand_calls_inline): Likewise.
4104 (calls_setjmp_p): Use walk_tree_without_duplicates.
4105 * pt.c: Don't include hashtab.h.
4106 (for_each_template_parm): Use walk_tree_without_duplicates.
4107 * semantics.c (finish-stmt_tree): Likewise.
4108 (expand_body): Likewise.
4109 * tree.c (walk_tree): Add additional parameter.
4110 (walk_tree_without_duplicates): New function.
4111 (count_trees): Use it.
4112 (verify_stmt_tree): Adjust call to walk_tree.
4113 (find_tree): Use walk_tree_without_duplicates.
4114 (no_linkage_check): Likewise.
4115 (break_out_target_exprs): Adjust call to walk_tree.
4116 (cp_unsave): Likewise.
4118 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4120 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
4121 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
4122 * cp-tree.h (TYPE_BINFO): Adjust comment.
4123 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
4124 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
4125 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4126 (TYPE_TEMPLATE_INFO): Likewise.
4127 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
4128 * class.c (push_nested_class): Likewise.
4129 * decl.c (lookup_name_real): Likewise.
4130 (grokdeclarator): Likewise.
4131 (grok_op_properties): Likewise.
4132 (xref_tag): Likewise.
4133 (xref_basetypes): Likewise.
4134 * decl2.c (constructor_name_full): Likewise.
4135 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
4136 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4137 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
4138 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4139 (dump_type_suffix): Likewise.
4140 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
4142 (get_aggr_from_typedef): Likewise.
4143 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
4144 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4145 (write_template_parm): Likewise.
4146 (write_template_template_parm): Check tree code instead of
4147 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4148 * method.c (build_overload_nested_name): Add
4149 BOUND_TEMPLATE_TEMPLATE_PARM.
4150 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
4151 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4152 * pt.c (convert_template_argument): Check tree code instead of
4153 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4154 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
4155 (for_each_template_parm): Adjust comment.
4156 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
4157 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4158 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
4159 template_args_equal to compare template template parameter cases.
4160 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4161 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
4163 * tree.c (copy_template_template_parm): Decide whether to create
4164 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
4165 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4166 (copy_tree_r): Likewise.
4167 * typeck.c (comptypes): Likewise. Check tree code instead of
4168 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4170 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
4172 * decl.c (finish_function): Move the code for handling functions
4173 marked with the constructor and destructor attributes inside the
4176 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4178 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
4180 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4182 * pt.c (lookup_template_class): Remove abort.
4183 * tree.c (get_type_decl): Allow error_mark_node.
4185 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4187 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
4190 2000-09-03 Mark Mitchell <mark@codesourcery.com>
4192 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
4195 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
4197 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
4198 union tag mismatch error reporting.
4200 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
4202 * call.c (build_scoped_method_call): Check it is not a namespace.
4204 2000-08-30 Jason Merrill <jason@redhat.com>
4206 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
4208 * tree.c (bot_manip): Check TREE_CONSTANT rather than
4209 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
4210 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
4212 * decl.c (start_function): Always call make_function_rtl.
4214 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
4216 * semantics.c (prune_unused_decls): New function.
4217 (finish_stmt_tree): Call it via walk_tree.
4219 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
4221 * class.c (build_secondary_vtable): Constify a char *.
4222 * decl.c (init_decl_processing): Initialize function_id_node,
4223 pretty_function_id_node, and func_id_node.
4224 * input.c (struct input_source): Constify 'str'.
4225 (feed_input): Constify first argument.
4226 * mangle.c (write_identifier): Constify argument.
4227 * pt.c (mangle_class_name_for_template): Constify argument.
4229 2000-08-29 Mark Mitchell <mark@codesourcery.com>
4231 * typeck.c (mark_addressable): Remove code that pokes around in
4234 2000-08-28 Jason Merrill <jason@redhat.com>
4236 * lex.c (file_name_nondirectory): Move to toplev.c.
4238 * cp-tree.h (LOCAL_CLASS_P): New macro.
4239 * class.c (finish_struct_1): Use it.
4241 2000-08-27 Alex Samuel <samuel@codesourcery.com>
4243 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
4244 (write_encoding): Pass another argument to write_name.
4245 (write_name): Add ignore_local_scope parameter. Fix handling of
4247 (write_nested_name): Use write_unqualified_name.
4248 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
4249 (write_template_prefix): Use write_unqualified_name.
4250 (write_component): Remove.
4251 (write_local_name): Add parameter. Use direct local entity to
4252 discriminator calculation.
4253 (write_class_enum_type): Pass another argument to write_name.
4254 (write_template_template_arg): Likewise.
4255 (make_guard_variable): Likewise.
4257 2000-08-27 Jason Merrill <jason@redhat.com>
4259 * decl.c (pushdecl): Matching decls for local externs are found in
4260 the current level. Propagate linkage information from previous
4263 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
4265 * ir.texi (Expressions): Fix typo.
4267 2000-08-25 Greg McGary <greg@mcgary.org>
4269 * tree.c (init_tree): Use ARRAY_SIZE.
4271 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
4273 * error.c (cp_tree_printer): Rework.
4275 2000-08-25 Mark Mitchell <mark@codesourcery.com>
4277 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
4279 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
4280 (cp-demangle.o): Remove target.
4281 (dyn-string.o): Likewise.
4283 * decl.c (grokfndecl): Require that `main' return an `int'.
4284 * mangle.c (write_encoding): Don't mangle return types for
4285 conversion functions.
4287 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
4289 * error.c (tree_formatting_info): New data type.
4290 (tree_being_formatted): New macro.
4291 (tree_formatting_flags): Likewise.
4292 (put_whitespace): Likewise.
4293 (print_tree_identifier): Likewise.
4294 (print_identifier): Likewise.
4295 (cp_tree_printer, print_function_argument_list, print_declaration,
4296 print_expression, print_function_declaration,
4297 print_function_parameter, print_type, print_cv_qualifier): New
4299 (init_error): Initialize lang_printer.
4301 2000-08-24 Jason Merrill <jason@redhat.com>
4303 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
4304 adjustment necessary.
4306 2000-08-24 Greg McGary <greg@mcgary.org>
4308 * cp-tree.h (MAIN_NAME_P): Remove macro.
4310 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
4312 * error.c (print_instantiation_context): Don't forget to flush the
4315 2000-08-23 Jason Merrill <jason@redhat.com>
4317 * typeck.c (build_ptrmemfunc): Save the input pmf.
4319 * method.c (process_modifiers): Use same_type_p.
4321 2000-08-23 Mark Mitchell <mark@codesourcery.com>
4323 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
4324 * mangle.c (write_function_type): Change prototype.
4325 (write_encoding): Don't mangle return types for
4326 constructors or destructors.
4327 (write_type): Adjust call to write_function_type.
4328 * pt.c (instantiate_template): Instantiate alternate entry points
4329 when instantiating the main function.
4331 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
4333 * error.c (cp_print_error_function): Don't use embedded '\n' in
4336 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
4338 * decl.c (init_decl_processing): Remove bogus initialization.
4339 * error.c (lang_print_error_function): Restore here.
4340 (init_error): Initialize print_error_function.
4342 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4344 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
4346 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
4348 * Makefile.in (error.o): Depends on diagnostic.h
4350 * cp-tree.h (problematic_instantiation_changed,
4351 record_last_problematic_instantiation, current_instantiation,
4352 print_instantiation_context): Declare.
4353 (maybe_print_template_context): Remove.
4355 * decl.c (init_decl_processing): Set print_error_function to NULL.
4356 (lang_print_error_function): Remove, since we're using a new
4359 * error.c: #include diagnostic.h
4360 (function_category): New function.
4361 (cp_diagnostic_starter): Likewise.
4362 (cp_diagnostic_finalizer): Likewise.
4363 (cp_print_error_function): Likewise.
4364 (maybe_print_instantiation_context): Likewise.
4365 (print_instantiation_full_context): Likewise.
4366 (print_instantiation_partial_context): Likewise.
4367 (print_instantiation_context): Define.
4368 (init_error): Initialize diagnostic pager and finalizer.
4370 * pt.c (problematic_instantiation_changed): Define.
4371 (record_last_problematic_instantiation): Likewise.
4372 (current_instantiation): Likewise.
4373 (maybe_print_template_context): Remove.
4374 (print_template_context): Likewise.
4375 (current_tinst_level): Make static to reflect Brendan Kehoe's
4376 change of 1995-04-13.
4377 (push_tinst_level): Call print_instantiation_context.
4379 2000-08-21 Nix <nix@esperi.demon.co.uk>
4381 * lang-specs.h: Do not process -o or run the assembler if
4384 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
4386 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
4388 * decl2.c (lang_decode_option): Disable gettext attributes for
4391 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
4393 * lex.c (lang_init_options): Default diagnostic message maximum
4394 length to 80, when line-wrapping.
4396 2000-08-20 Mark Mitchell <mark@codesourcery.com>
4398 * class.c (build_vtbl_initializer): Clear the entire
4399 vtbl_init_data. Start keeping track of the functions for which we
4400 have created vcall offsets here.
4401 (dfs_build_vcall_offset_vtbl_entries): Remove.
4402 (build_vcall_offset_vtbl_entries): Reimplement.
4403 (add_vcall_offset_vtbl_entries_r): New function.
4404 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
4405 computing when vcall offsets are necessary.
4407 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4409 * decl.c (member_function_or_else): Use cp_error ... %T.
4410 (grokdeclarator): Likewise.
4411 (start_method): Likewise.
4412 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
4414 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4416 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
4419 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4421 * cp-tree.h (PTRMEM_OK_P): New macro.
4422 (itf_ptrmem_ok): New enumeration value.
4423 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
4424 argument. Diagnose implicit pointer to member.
4425 (instantiate_type): Don't diagnose implicit pointer to member
4426 here. Pass itf_ptrmem_ok if ok. Adjust calls to
4427 resolve_address_of_overloaded_function.
4428 * init.c (build_offset_ref): Set PTRMEM_OK_P.
4429 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
4430 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
4431 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
4432 (build_unary_op): Deal with single non-static member in
4435 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4437 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
4439 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4441 * cp-tree.h (enum_name_string): Remove prototype.
4442 (report_case_error): Remove prototype.
4443 * cp/typeck2.c (enum_name_string): Remove.
4444 (report_case_error): Remove.
4445 * error.c (dump_expr): Deal with enum values directly.
4446 Correctly negate integer constant.
4448 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4450 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
4451 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
4452 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
4453 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
4454 (__cxa_vec_new): Use __cxa_vec_new2.
4455 (__cxa_vec_delete): Use __cxa_vec_delete2.
4457 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4459 * vec.cc (__cxa_vec_new): Set "C" linkage.
4460 (__cxa_vec_ctor): Likewise.
4461 (__cxa_vec_cctor): Likewise.
4462 (__cxa_vec_dtor): Likewise.
4463 (__cxa_vec_delete): Likewise.
4464 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
4465 (__cxa_vec_ctor): Likewise.
4466 (__cxa_vec_cctor): Likewise.
4467 (__cxa_vec_dtor): Likewise.
4468 (__cxa_vec_delete): Likewise.
4470 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4472 * class.c (instantiate_type): Reinstate local variable
4473 deleted in previous change.
4475 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
4478 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4480 * cp-tree.h (instantiate_type_flags): New enumeration.
4481 (instantiate_type): Change parameter.
4482 * class.c (instantiate_type): Adjust prototype. Adjust.
4483 * call.c (standard_conversion): Adjust instantiate_type call.
4484 (reference_binding): Likewise.
4485 (build_op_delete_call): Likewise.
4486 (convert_like_real): Likewise.
4487 * cvt.c (cp_convert_to_pointer): Likewise.
4488 (convert_to_reference): Likewise.
4489 * pt.c (convert_nontype_argument): Likewise.
4490 * typeck.c (build_binary_op): Likewise.
4491 (build_ptrmemfunc): Likewise.
4492 (convert_for_assignment): Likewise.
4494 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4496 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
4497 (current_aggr): Define.
4498 * decl.c (grokdeclarator): Make sure a friend class is an
4499 elaborated type specifier.
4500 * parse.y (current_aggr): Remove static definition.
4501 (cp_parse_init): Adjust.
4502 (structsp): Clear and restore current_aggr.
4503 (component_decl_list): Clear current_aggr.
4505 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
4506 aggregate tag on the typename's context.
4508 * pt.c (tsubst_friend_class): Return error_mark_node, if
4510 (instantiate_class_template): Ignore error_mark_node friend types.
4512 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
4514 * cvt.c (warn_ref_binding): New static function, broken out of ...
4515 (convert_to_reference): ... here. Use it.
4517 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4519 * parse.y (template_arg): Add rule for template qualified with
4522 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4524 * decl2.c (add_function): Reorganize.
4525 (arg_assoc): Do not consider function template decls.
4527 2000-08-11 Jason Merrill <jason@redhat.com>
4529 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
4532 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4534 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
4535 (lookup_nested_tag): Likewise.
4537 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
4540 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4542 * parse.y (named_complex_class_head_sans_basetype): Remove
4545 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4547 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
4548 explicit TEMPLATE_ID_EXPR args.
4549 (build_expr_from_tree, case CALL_EXPR): Likewise.
4551 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4553 * decl.c (check_tag_decl): Diagnose typename's which don't
4556 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
4558 * init.c (build_aggr_init): Reject bogus array initializers
4561 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
4563 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
4565 * cp/tinfo.cc (__dynamic_cast): Likewise.
4566 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
4568 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
4570 * cvt.c (convert_to_pointer_force): Fix error message when
4571 attempting to cast from ambiguous base.
4573 2000-08-08 Jason Merrill <jason@redhat.com>
4575 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
4576 (tsubst_template_arg_vector): Likewise.
4578 * decl2.c (build_anon_union_vars): Choose the largest field; don't
4579 assume that one will be as large as the union.
4581 2000-08-07 Kazu Hirata <kazu@hxi.com>
4583 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
4584 * decl.c (pop_labels): Likewise.
4586 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
4588 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
4590 (__pointer_to_member_type_info): Likewise.
4591 (__base_class_info): Likewise.
4592 (__class_type_info): Likewise.
4593 (__si_class_type_info): Likewise.
4594 (__vmi_class_type_info): Likewise.
4595 * tinfo.cc (__si_class_type_info::__do_find_public_src):
4596 Changed member names to match specifications.
4597 (__vmi_class_type_info::__do_find_public_src): Likewise.
4598 (__si_class_type_info::__do_dyncast): Likewise.
4599 (__vmi_class_type_info::__do_dyncast): Likewise.
4600 (__si_class_type_info::__do_upcast): Likewise.
4601 (__vmi_class_type_info::__do_upcast): Likewise.
4602 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
4603 (__pbase_type_info::__pointer_catch): Likewise.
4604 (__pointer_type_info::__pointer_catch): Likewise.
4605 (__pointer_to_member_type_info::__pointer_catch): Likewise.
4607 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
4609 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
4610 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
4611 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
4613 2000-08-04 Mark Mitchell <mark@codesourcery.com>
4615 * cp-tree.h (add_method): Change prototype.
4616 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
4617 Don't double the size of the method vector in the error case.
4618 (handle_using_decl): Adjust call to add_method.
4619 (add_implicitly_declared_members): Likewise.
4620 (clone_function_decl): Likewise.
4621 * decl2.c (check_classfn): Likewise.
4622 * semantics.c (finish_member_declaration): Likewise.
4624 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
4626 * decl.c (flag_isoc94): New variable.
4628 2000-08-02 Jason Merrill <jason@redhat.com>
4630 * pt.c (do_type_instantiation): Add complain parm; don't complain
4631 if called recursively.
4632 * cp-tree.h, parse.y: Adjust.
4634 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
4636 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
4637 -Wno-strict-prototypes.
4639 * g++spec.c: Adjust type of second argument to
4640 lang_specific_driver, and update code as necessary.
4642 * cp-tree.h: Don't prototype min_precision here.
4643 (my_friendly_assert): Cast expression to void.
4644 * semantics.c (do_poplevel): Initialize scope_stmts.
4646 2000-08-02 Mark Mitchell <mark@codesourcery.com>
4648 * cp-tree.h (DECL_NEEDED_P): Tweak.
4650 2000-07-28 Jason Merrill <jason@redhat.com>
4652 * lang-specs.h: Use %i in rule for .ii files.
4654 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
4656 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
4658 2000-07-30 Mark Mitchell <mark@codesourcery.com>
4660 Allow indirect primary bases.
4661 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
4663 (CLASSTYPE_VFIELD_PARENT): Remove.
4664 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
4665 (BINFO_PRIMARY_BINFO): Remove.
4666 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
4667 (BINFO_VBASE_PRIMARY_P): Likewise.
4668 (BINFO_PRIMARY_BASE_OF): New macro.
4669 (BINFO_INDIRECT_PRIMARY_P): Likewise.
4670 (get_primary_binfo): New function.
4671 * decl.c (lang_mark_tree): Make lang_type::primary_base.
4672 * class.c (vcall_offset_data_s): Rename to ...
4673 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
4674 and add ctor_vtbl_p.
4675 (get_derived_offset): Use get_primary_binfo.
4676 (dfs_mark_primary_bases): Adjust handling of virtual primary
4678 (mark_primary_bases): Likewise.
4679 (set_primary_base): Take a binfo, not an integer, as a
4680 representation of the primary base.
4681 (indirect_primary_base_p): Remove.
4682 (determine_primary_base): Adjust for indirect primary bases.
4683 (dfs_find_final_overrider): Fix typo in coment.
4684 (update_vtable_entry_for_fn): Use get_primary_binfo.
4685 (layout_nonempty_base_or_field): Tweak.
4686 (build_base_fields): Adjust for new primary base semantics.
4687 (dfs_propagate_binfo_offsets): Remove.
4688 (propagate_binfo_offsets): Rewrite.
4689 (dfs_set_offset_for_shared_vbases): Remove.
4690 (layout_virtual_bases): Don't use it.
4691 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
4693 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
4694 CLASSTYPE_VFIELD_PARENT.
4695 (dfs_get_primary_binfo): New function.
4696 (get_primary_binfo): Likewise.
4697 (dump_class_hierarchy_r): Tweak printing of primary bases.
4698 (build_vtbl_initializer): Fix typo in comments. Use
4700 (build_vcall_and_vbase_vtbl_entries): Likewise.
4701 (build_vbaes_offset_vtbl_entries): Likewise.
4702 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
4703 BV_VCALL_INDEX to handle indirect primary bases.
4704 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
4705 (build_rtti_vtbl_entries): Likewise.
4706 * search.c (get_shared_vbase_if_not_primary): Tweak.
4707 (find_vbase_instance): Likewise.
4708 (binfo_for_vtable): Simplify.
4709 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
4710 (make_binfo): Make it have 11 entries.
4712 2000-07-30 Alex Samuel <samuel@codesourcery.com>
4714 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
4715 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
4716 ascertaining primaryness.
4717 (G): Remove template_args.
4718 (decl_is_template_id): New function.
4719 (write_encoding): Use decl_is_template_id.
4720 (write_name): Likewise. Handle type_decls. Get main variant of
4722 (write_nested_name): Likewise.
4723 (write_prefix): Likewise.
4724 (write_template_prefix): Likewise.
4725 (write_special_name_constructor): Remove defunct production from
4727 (write_bare_function_type): Remove comment about absent parameter.
4728 (write_template_template_arg): Add missing grammar production to
4731 2000-07-27 Jason Merrill <jason@redhat.com>
4733 * decl.c (duplicate_decls): If common_type produces a non-typedef
4734 type for a typedef, just use the old type.
4736 2000-07-27 Mark Mitchell <mark@codesourcery.com>
4738 * cp-tree.h (function_depth): Declare.
4739 (verify_stmt_tree): Likewise.
4740 (find_tree): Likewise.
4741 * decl.c (function_depth): Give it external linkage.
4742 * optimize.c (optimize_function): Increment and decrement it.
4743 * tree.c (verify_stmt_tree_r): New function.
4744 (verify_stmt_tree): Likewise.
4745 (find_tree_r): Likewise.
4746 (find_tree): Likewise.
4748 2000-07-27 Jason Merrill <jason@redhat.com>
4750 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
4752 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
4754 2000-07-26 Mark Mitchell <mark@codesourcery.com>
4756 * decl.c (start_cleanup_fn): Mark the function as `inline'.
4757 * decl2.c (get_guard): Call cp_finish_decl, not
4758 rest_of_decl_compilation, for local guards.
4759 * lex.c (do_identifier): Remove unused variable.
4761 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
4763 * parse.y: Add missing ';'.
4765 2000-07-26 Mark Mitchell <mark@codesourcery.com>
4767 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
4770 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
4772 Kill strict_prototype. Backwards compatibility only for
4773 non NO_IMPLICIT_EXTERN_C systems.
4774 * cp-tree.h (flag_strict_prototype): Remove.
4775 (strict_prototype): Remove.
4776 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
4777 * decl.c (maybe_push_to_top_level): Adjust.
4778 (pop_from_top_level): Adjust.
4779 (decls_match): Only allow sloppy parm matching for ancient
4781 (init_decl_processing): Adjust.
4782 (grokdeclarator): Adjust.
4783 * decl2.c (flag_strict_prototype): Remove.
4784 (strict_prototype): Remove.
4785 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
4786 (lang_f_options): Remove "strict-prototype".
4787 (unsupported-options): Add "strict-prototype".
4788 * lex.c (do_identifier): Adjust.
4789 (do_scoped_id): Adjust.
4790 * parse.y (empty_parms): Adjust.
4791 * class.c (push_lang_context): Adjust.
4792 (pop_lang_context): Adjust.
4793 * typeck.c (comp_target_parms): Adjust.
4795 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
4797 * decl.c (poplevel): Deal with anonymous variables at for scope.
4798 (maybe_inject_for_scope_var): Likewise.
4800 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
4802 * decl.c: Remove all signal handling code, now done in toplev.c.
4804 2000-07-23 Mark Mitchell <mark@codesourcery.com>
4806 * decl.c (make_rtl_for_nonlocal_decl): Rework.
4808 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
4811 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
4813 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
4814 Define my_friendly_assert and my_friendly_abort as macros
4815 which may call friendly_abort. Prototype friendly abort, not
4816 my_friendly_abort or my_friendly_assert.
4817 * decl.c (signal_catch): Report the signal caught in the error
4818 message. Call fatal directly.
4819 * typeck2.c (ack, my_friendly_assert): Delete.
4820 (my_friendly_abort): Rename to friendly_abort. Expect file,
4821 line, and function parameters. Report the abort code, then
4822 call fancy_abort. Do not mask an abort if errors have
4825 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
4827 * typeck.c (comp_target_parms): Remove obsolete parameter.
4828 (comp_target_types): Adjust.
4830 2000-07-17 Jason Merrill <jason@redhat.com>
4832 * typeck.c (mark_addressable): Never set TREE_USED.
4833 * call.c (build_call): Don't abort on calls to library functions
4834 that have been declared normally.
4836 * typeck.c (build_binary_op): Fix grammar in warning.
4838 * exception.cc (__eh_free): Fix prototype.
4840 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
4842 * decl.c (pushdecl): Handle seeing an OVERLOAD in
4843 IDENTIFIER_NAMESPACE_VALUE.
4845 2000-07-16 Mark Mitchell <mark@codesourcery.com>
4847 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
4848 * method.c (use_thunk): Correct handling of vcall offsets.
4850 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
4852 * .cvsignore: parse.h and parse.c have no cp- prefix.
4854 2000-07-13 Mark Mitchell <mark@codesourcery.com>
4856 * .cvsignore: New file.
4858 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
4860 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
4862 2000-07-12 Mark Mitchell <mark@codesourcery.com>
4864 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
4866 * parse.h: Likewise.
4868 2000-07-11 Mark Mitchell <mark@codesourcery.com>
4870 * class.c (layout_class_type): Add pointers to virtual bases after
4871 base classes under the old ABI.
4873 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
4875 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
4876 (finish_continue_stmt): Likewise.
4877 (begin_for_stmt): Remove call to note_level_for_for.
4878 (finish_goto_stmt): Change call from build_min_nt
4880 (finish_expr_stmt): Likewise.
4881 (begin_if_stmt): Likewise.
4882 (begin_while_stmt): Likewise.
4883 (finish_while_stmt): Likewise.
4884 (finish_return_stmt): Likewise.
4885 (begin_for_stmt): Likewise.
4886 (finish_for_stmt): Likewise.
4887 (finish_break_stmt): Likewise.
4888 (begin_switch_stmt): Likewise.
4889 (finish_case_label): Likewise.
4890 (genrtl_try_block): Likewise.
4891 (begin_try_block): Likewise.
4892 (begin_handler): Likewise.
4893 (begin_compound_stmt): Likewise.
4894 (finish_asm_stmt): Likewise.
4895 (finish_label_stmt): Likewise.
4896 (add_decl_stmt): Likewise.
4897 (finish_subobject): Likewise.
4898 (finish_decl_cleanup): Likewise.
4899 (finish_named_return_value): Likewise.
4900 (setup_vtbl_ptr): Likewise.
4901 (add_scope_stmt): Likewise.
4902 * decl.c (finish_constructor_body): Likewise.
4903 (finish_destructor_body): Likewise.
4904 * optimize.c (copy_body_r): Likewise.
4905 (initialize_inlined_parameters): Likewise.
4906 (declare_return_variable): Likewise.
4907 (expand_call_inline): Likewise.
4909 2000-07-10 Jakub Jelinek <jakub@redhat.com>
4911 * semantics.c (expand_body): Sync interface information
4912 at the end of function body expansion.
4914 2000-07-09 Jason Merrill <jason@redhat.com>
4916 * init.c (build_new_1): Bail early if the call to new fails.
4918 * decl.c (compute_array_index_type): Check specifically for
4919 an INTEGER_CST, not just TREE_CONSTANT.
4921 * decl.c (duplicate_decls): Don't call duplicate_decls on
4922 the DECL_TEMPLATE_RESULT.
4923 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
4926 * error.c (dump_template_bindings): Don't crash if we had an
4927 invalid argument list.
4929 * typeck.c (c_expand_start_case): Do narrowing here.
4930 * semantics.c (finish_switch_cond): Not here.
4932 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
4934 * parse.y (asm_clobbers): Do string concatenation.
4936 2000-07-09 Mark Mitchell <mark@codesourcery.com>
4938 * decl.c (pushtag): Don't put local classes in template functions
4939 on the local_classes list.
4941 2000-07-04 Scott Snyder <snyder@fnal.gov>
4943 * decl2.c (get_guard): Add missing return for old ABI local
4946 2000-07-09 Mark Mitchell <mark@codesourcery.com>
4948 * cp-tree.h (char_type_p): New function.
4949 * decl.c (init_decl_processing): Don't initialize
4950 signed_wchar_type_node or unsigned_wchar_type_node.
4951 (complete_array_type): Handle brace-enclosed string-constants.
4952 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
4953 * tree.c (char_type_p): New function.
4954 * typeck2.c (digest_init): Use char_type_p.
4956 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
4958 * pt.c (tsubst): Don't layout type, if it's error_mark.
4960 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
4962 * pt.c (instantiate_pending_templates): Reset template level.
4964 2000-07-05 Jason Merrill <jason@redhat.com>
4966 * call.c (joust): Don't complain about `operator char *()' beating
4967 `operator const char *() const'.
4969 2000-07-04 scott snyder <snyder@fnal.gov>
4970 Jason Merrill <jason@redhat.com>
4972 * repo.c (repo_get_id): Handle the case where a class with virtual
4973 bases has a null TYPE_BINFO_VTABLE.
4975 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
4976 Jason Merrill <jason@redhat.com>
4978 * parse.y (member_init): Just pass in the type.
4979 * init.c (expand_member_init): Handle getting a type.
4981 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4982 Jason Merrill <jason@redhat.com>
4984 * decl.c (finish_function): Warn if a function has no return
4986 Suggested by Andrew Koenig.
4987 * typeck.c (check_return_expr): Do set current_function_returns_value
4988 if we got an error_mark_node.
4990 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
4992 * decl2.c (push_decl_namespace): Push the original namespace.
4994 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
4996 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
4997 * semantics.c (begin_class_definition): Clear it.
4999 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
5001 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
5002 (genrtl_expr_stmt): Likewise.
5003 (genrtl_decl_stmt): Likewise.
5004 (genrtl_if_stmt): Likewise.
5005 (genrtl_while_stmt): Likewise.
5006 (genrtl_do_stmt): Likewise.
5007 (genrtl_return_stmt): Likewise.
5008 (genrtl_for_stmt): Likewise.
5009 (genrtl_break_stmt): Likewise.
5010 (genrtl_continue_stmt): Likewise.
5011 (genrtl_scope_stmt): Likewise.
5012 (genrtl_switch_stmt): Likewise.
5013 (genrtl_case_label): Likewise.
5014 (genrtl_begin_compound_stmt): Likewise.
5015 (genrtl_finish_compound_stmt): Likewise.
5016 (genrtl_compound_stmt): Likewise.
5017 (genrtl_asm_stmt): Likewise.
5019 * init.c (begin_init_stmts): Remove call to
5020 genrtl_begin_compound_stmt.
5021 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
5023 * semantics.c (lang_expand_stmt): Changed call to
5024 genrtl_compound_stmt to ignore return value.
5026 2000-07-02 Mark Mitchell <mark@codesourcery.com>
5028 * mangle.c (canonicalize_for_substitution): Return the canonical
5031 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
5033 * typeck.c (commonparms): Remove obstack manipulations.
5035 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
5037 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
5039 * Makefile.in (OBJS): Added ../c-semantics.o.
5040 (OBJDEPS): Likewise.
5042 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
5044 (struct stmt_tree): Added comment.
5045 (current_function_name_declared): Removed.
5046 (stmts_are_full_exprs_p): Likewise.
5047 (genrtl_do_pushlevel): Likewise.
5048 (genrtl_clear_out_block): Likewise.
5049 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
5050 (DECL_ANON_UNION_ELEMS): Likewise.
5051 (emit_local_var): Likewise.
5052 (make_rtl_for_local_static): Likewise.
5053 (do_case): Likewise.
5054 (expand_stmt): Likewise.
5055 (genrtl_decl_cleanup): Likewise.
5056 (c_expand_asm_operands): Likewise.
5057 (c_expand_return): Likewise.
5058 (c_expand_start_case): Likewise.
5060 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
5061 (emit_local_var): Likewise.
5062 (initialize_local_var): Change reference to
5063 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5064 Change reference to stmts_are_full_exprs_p to
5065 current_stmt_tree->stmts_are_full_exprs_p.
5066 (push_cp_function_context): Likewise.
5068 * expect.c (expand_throw): Change reference to
5069 stmts_are_full_exprs_p.
5071 * init.c (build_aggr_init): Change reference to
5072 stmts_are_full_exprs_p.
5073 (build_vec_init): Likewise.
5075 * optimize.c (maybe_clone_body): Change reference to
5076 current_function_name_declared to
5077 cp_function_chain->name_declared.
5079 * pt.c (instantiate_decl): Change reference to
5080 current_function_name_declared to
5081 cp_function_chain->name_declared.
5083 * semantics.c (expand_cond): Moved declaration to c-common.h.
5084 (genrtl_do_pushlevel): Moved to c-semantics.c.
5085 (genrtl_clear_out_block): Likewise.
5086 (genrtl_goto_stmt): Likewise.
5087 (genrtl_expr_stmt): Likewise.
5088 (genrtl_decl_stmt): Likewise.
5089 (gerntl_if_stmt): Likewise.
5090 (genrtl_while_stmt): Likewise.
5091 (genrtl_do_stmt): Likewise.
5092 (genrtl_return_stmt): Likewise.
5093 (genrtl_for_stmt): Likewise.
5094 (genrtl_break_stmt): Likewise.
5095 (genrtl_continue_stmt): Likewise.
5096 (genrtl_scope_stmt): Likewise.
5097 (genrtl_switch_stmt): Likewise.
5098 (genrtl_case_label): Likewise.
5099 (genrtl_begin_compound_stmt): Likewise.
5100 (genrtl_finish_compound_stmt): Likewise.
5101 (genrtl_compound_stmt): Likewise.
5102 (genrtl_asm_stmt): Likewise.
5103 (genrtl_decl_cleanup): Likewise.
5104 (expand_cond): Likewise.
5105 (expand_stmt): Renamed to ...
5106 (lang_expand_stmt): ... this.
5107 (lang_expand_expr_stmt): Initialize.
5108 (set_current_function_name_declared): Likewise.
5109 (stmts_are_full_exprs_p): Likewise.
5110 (current_function_name_declared): Likewise.
5111 (anon_aggr_type_p): Likewise.
5112 (do_poplevel): Change reference to
5113 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5114 Change reference to stmts_are_full_exprs_p to
5115 current_stmt_tree->stmts_are_full_exprs_p.
5116 (add_tree): Likewise.
5117 (finish_expr_stmt): Likewise.
5118 (prep_stmt): Likewise.
5119 (lang_expand_stmt): Likewise.
5120 (begin_compound_stmt): Change reference to
5121 current_function_name_declared to
5122 cp_function_chain->name_declared and call to
5123 current_function_name_declared().
5124 (setup_vtbl_ptr): Likewise.
5125 (genrtl_do_poplevel): Removed.
5127 2000-06-30 Jason Merrill <jason@redhat.com>
5129 * init.c (init_init_processing): Go back to aligning like
5130 double_type_node for old ABI.
5131 (get_cookie_size): Make cookie larger if we get a type that needs
5133 (build_vec_delete): Call it.
5135 * typeck.c (qualify_type_recursive): New fn.
5136 (composite_pointer_type): Use it.
5137 (build_binary_op): Use composite_pointer_type.
5139 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
5140 Jason Merrill <jason@redhat.com>
5142 * typeck.c (check_return_expr): Don't complain about returning
5143 NULL from operator new if -fcheck-new.
5144 * cp-tree.h: Declare flag_check_new here.
5147 2000-06-28 Alex Samuel <samuel@codesourcery.com>
5149 * mangle.c (find_substitution): Use same_type_p.
5150 (write_encoding): Don't check for substitutions.
5152 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
5154 * parse.y (expr_no_comma_rangle): New non-terminal.
5155 (template_parm): Use it for default parameter case.
5156 (template_arg): Use it.
5157 (expr_no_commas): Remove commented out undefined extensions.
5158 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5159 * parse.h, parse.c: Rebuilt.
5161 2000-06-30 Mark Mitchell <mark@codesourcery.com>
5163 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
5164 (finish_asm_stmt): Do it here, instead.
5166 * cp-tree.h (ridpointers): Don't declare.
5167 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
5168 (record_builtin_java_type): Likewise.
5169 (init_decl_processing): Likewise.
5170 * lex.c: Move inclusion of lex.h.
5171 (ridpointers): Don't define.
5172 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
5174 * lex.h (enum rid): Rename to ...
5175 (enum cp_rid): ... this.
5176 (ridpointers): Don't declare.
5177 * parse.y: Move inclusion of lex.h.
5178 * parse.c: Regenerated.
5179 * spew.c: Move inclusion of lex.h.
5181 * cp-tree.h (struct language_function): Remove temp_name_counter.
5182 (temp_name_counter): Remove.
5183 (get_temp_name): Change prototype.
5184 (get_guard): New function.
5185 (get_guard_cond): Likewise.
5186 (set_guard): Likewise.
5187 * cvt.c (build_up_reference): Adjust call to get_temp_name.
5188 * decl.c (expand_static_init): Use get_guard and friends to
5189 implement guard variables.
5190 * decl2.c (get_temp_name): Assume that the variables created are
5192 (get_sentry): Rename to ...
5193 (get_guard): ... this. Implement new ABI guard variables.
5194 (get_guard_bits): New function.
5195 (get_guard_cond): Likewise.
5196 (set_guard): Likewise.
5197 (start_static_initialization_or_destruction): Use them.
5198 (do_static_initialization): Replace sentry with guard throughout.
5199 (do_static_destruction): Likewise.
5200 * init.c (create_temporary_var): Add comment.
5202 2000-06-28 Alex Samuel <samuel@codesourcery.com>
5204 * mangle.c (find_substitution): Use same_type_p.
5205 (write_encoding): Don't check for substitutions.
5207 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
5209 * parse.y (expr_no_comma_rangle): New non-terminal.
5210 (template_parm): Use it for default parameter case.
5211 (template_arg): Use it.
5212 (expr_no_commas): Remove commented out undefined extensions.
5213 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5214 * parse.h, parse.c: Rebuilt.
5216 2000-06-29 Mark Mitchell <mark@codesourcery.com>
5218 * cp-tree.h (flag_const_strings): Remove.
5219 (warn_parentheses): Likewise.
5220 (warn_format): Likewise.
5221 (common_type): Likewise.
5222 (default_conversion): Likewise.
5223 (build_binary_op): Likewise.
5224 (cp_build_binary_op): New macro.
5225 * call.c (build_new_op): Use cp_build_binary_op instead of
5227 * class.c (build_vtable_entry_ref): Likewise.
5228 * decl.c (expand_static_init): Likewise.
5229 (compute_array_index_type): Likewise.
5230 (build_enumerator): Likewise.
5231 * decl2.c (delete_sanity): Likewise.
5232 (start_static_initialization_or_destruction): Likewise.
5233 * error.c (dump_type_suffix): Likewise.
5234 * init.c (resolve_offset_ref): Likewise.
5235 (build_new): Likewise.
5236 (build_new_1): Likewise.
5237 (build_vec_delete_1): Likewise.
5238 (build_vec_init): Likewise.
5239 (build_delete): Likewise.
5240 * rtti.c (synthesize_tinfo_fn): Likewise.
5241 (synthesize_tinfo_var): Likewise.
5242 * search.c (expand_upcast_fixups): Likewise.
5243 (fixup_all_virtual_upcast_offsets): Likewise.
5244 * typeck.c (build_array_ref): Likewise.
5245 (get_member_function_from_ptrfunc): Likewise.
5246 (build_binary_op): Add parameter.
5247 (pointer_int_sum): Use cp_build_binary_op.
5248 (pointer_diff): Likewise.
5249 (build_modify_expr): Likewise.
5250 (get_delta_difference): Likewise.
5251 (build_ptrmemfunc): Likewise.
5253 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
5255 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
5256 * decl.c (create_implicit_typedef): Adjust.
5257 * decl2.c (build_artificial_parm): Adjust.
5258 * method.c (implicitly_declare_fn): Adjust.
5259 * pt.c (push_inline_template_parms_recursive): Adjust.
5260 (process_template_parm): Adjust.
5261 (overloaded_template_name): Adjust.
5262 * semantics.c (finish_template_template_parm): Adjust.
5264 2000-06-28 Mark Mitchell <mark@codesourcery.com>
5266 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
5267 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
5268 where to emit thunks.
5269 (build_vtt): Adjust call to build_vtt_inits.
5270 (build_vtt_inits): Add parameter to indicate whether or not
5271 sub-VTTs for virtual bases should be included. Adjust handling of
5272 construction vtables.
5273 (get_matching_base): New function.
5274 (dfs_build_vtt_inits): Rename to ...
5275 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
5276 construction vtables.
5277 (dfs_fixup_binfo_vtbls): Likewise.
5278 (build_ctor_vtbl_groups): Build construction vtables for virtual
5280 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
5281 to build construction vtbls.
5282 (dfs_accumulate_vtbl_inits): Adjust handling of
5283 construction vtables.
5285 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
5288 2000-06-27 Mark Mitchell <mark@codesourcery.com>
5290 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
5292 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
5294 * search.c (hides): Remove.
5295 (is_subobject_of_p): Add most_derived parameter. Use
5297 (lookup_field_queue_p): Adjust.
5298 (lookup_field_r): Adjust.
5300 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
5302 * decl2.c (handle_class_head): Bash typedefs to the type's main
5305 2000-06-25 Mark Mitchell <mark@codesourcery.com>
5307 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
5308 (begin_global_stmt_expr): ... this.
5309 (genrtl_finish_stmt_expr): Rename to ...
5310 (finish_global_stmt_expr): ... this.
5311 * init.c (begin_init_stmts): Adjust calls.
5312 (finish_init_stmts): Likewise.
5313 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
5314 (begin_global_stmt_expr): ... this.
5315 (genrtl_finish_stmt_expr): Rename to ...
5316 (finish_global_stmt_expr): ... this.
5318 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5320 * search.c (lookup_member): Fix typo in comment.
5322 2000-06-24 Jason Merrill <jason@redhat.com>
5324 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
5325 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
5327 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5329 * parse.y (complex_direct_notype_declarator): Support global_scope.
5330 * Makefile.in: Adjust conflict count.
5332 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5334 * parse.y (template_arg): Convert TEMPLATE_DECL
5335 that is a template template paramter to
5336 TEMPLATE_TEMPLATE_PARM here.
5338 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
5339 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
5340 (copy_template_template_parm): Adjust prototype.
5341 * decl.c (grokdeclarator): Remove dead code.
5342 * pt.c (process_template_parm): Tidy.
5343 (lookup_template_class): Construct nodes in
5344 copy_template_template_parm.
5345 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
5346 lookup_template_class. Use TYPE_TI_TEMPLATE.
5347 * tree.c (copy_template_template_parm): Add NEWARGS
5349 (mapcar): Adjust call to copy_template_template_parm.
5350 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
5351 * method.c (build_template_template_parm_names): Change error
5352 code to avoid compilation warning.
5354 * gxxint.texi: Document template template parameter
5357 2000-06-21 Alex Samuel <samuel@codesourcery.com>
5359 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
5360 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
5361 (cp-demangle.o): New rule.
5362 (dyn-string.o): Likewise.
5363 * inc/cxxabi.h (__cxa_demangle): New declaration.
5365 2000-06-22 Mark Mitchell <mark@codesourcery.com>
5367 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
5368 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
5369 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
5371 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
5372 (make_thunk): Change prototype.
5373 (emit_thunk): Rename to use_thunk.
5374 (mangle_thunk): Change prototype.
5375 * class.c (get_derived_offset): Simplify.
5376 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
5377 BV_GENERATE_THUNK_WITH_VTABLE_P.
5378 (build_primary_vtable): Simplify.
5379 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
5380 (dfs_find_base): Remove.
5381 (update_vtable_entry_for_fn): Correct bug in finding the base
5382 where a virtual function was first declared. Figure out whether
5383 or not to emit a vcall-thunk with the vtables in which it appears.
5384 Correct logic for deciding whether to use an ordinary thunk, or a
5386 (finish_struct_1): Remove unnecssary code.
5387 (build_vtbl_initializer): Use ssize_int for the running counter of
5389 (build_vtbl_initializer): Only use vcall thunks where necessary.
5390 Mark thunks as needing to be emitted with their vtables, or not.
5391 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
5392 indices. Use size_binop.
5393 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
5394 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
5396 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
5397 (build_vtable_entry): Mark thunks as needing to be emitted with
5398 their vtables, or not.
5399 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
5400 * decl2.c (mark_vtable_entries): Use use_thunk instead of
5402 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
5404 * error.c (dump_expr): Use BV_FN.
5405 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
5407 * method.c (make_thunk): Likewise.
5408 (emit_thunk): Rename to use_thunk. Allow callers to decide
5409 whether or not to actually emit the thunk. Adjust for changes in
5410 representation of vcall offsets.
5411 * search.c (dfs_get_pure_virtuals): Use BV_FN.
5412 * semantics.c (emit_associated_thunks): New function.
5413 (expand_body): Use it.
5414 * ir.texi: Adjust decriptions of thunks.
5416 2000-06-22 Jason Merrill <jason@redhat.com>
5418 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
5419 (tsubst_friend_function): Copy it here.
5421 * decl.c (grok_op_properties): Fix typo.
5423 * decl2.c (delete_sanity): Clarify warning, avoid failure on
5426 * pt.c (check_explicit_specialization): Clarify error.
5428 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
5429 an old OVERLOAD when we're declaring a non-function.
5430 (pushdecl, destroy_local_var): Check for error_mark_node.
5431 (warn_extern_redeclared_static): Also bail early if
5433 (push_overloaded_decl): Ignore an old error_mark_node.
5435 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
5437 * call.c (build_x_va_arg): Check if in a template decl.
5438 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
5440 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
5442 * class.c (push_lang_context): TYPE_NAME gets you to the Java
5444 * decl.c (check_goto): Computed gotos assumed OK.
5446 2000-06-20 Jason Merrill <jason@redhat.com>
5448 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
5449 for which we don't need to look for instantiations.
5451 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
5453 * parse.y (program): Always call finish_translation_unit.
5454 * parse.c, parse.h: Rebuilt.
5456 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
5458 * method.c: Don't include hard-reg-set.h.
5460 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
5462 * rtti.c (get_base_offset): Cope when vbase field is in a base.
5464 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
5466 * call.c (build_conditional_expr): Use VOID_TYPE_P.
5467 * cvt.c (cp_convert_to_pointer): Likewise.
5468 (convert_to_void): Likewise.
5469 * error.c (dump_expr): Likewise.
5470 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
5471 * init.c (build_delete): Likewise.
5472 * method.c (emit_thunk): Likewise.
5473 * optmize.c (declare_return_variable): Likewise.
5474 * rtti.c (get_tinfo_decl_dynamic): Likewise.
5475 (get_typeid): Likewise.
5476 (build_dynamic_cast_1): Likewise.
5477 * typeck.c (composite_pointer_type): Likewise.
5478 (common_type): Likewise.
5479 (build_indirect_ref): Likewise.
5480 (build_binary_op): Likewise.
5481 (build_x_compound_expr): Likewise.
5482 (check_return_expr): Likewise.
5483 * typeck2.c (add_exception_specifier): Likewise.
5485 * mangle.c (write_method_parms): Use direct comparison for end
5488 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
5490 * cp-tree.h (genrtl_try_block): Declare function.
5491 (genrtl_handler): Likewise.
5492 (genrtl_catch_block): Likewise.
5493 (genrtl_ctor_stmt): Likewise.
5494 (genrtl_subobject): Likewise.
5495 (genrtl_decl_cleanup): Likewise.
5496 (genrtl_do_poplevel): Likewise.
5497 (genrtl_do_pushlevel): Likewise.
5498 (genrtl_clear_out_block): Likewise.
5499 (genrtl_goto_stmt): Likewise.
5500 (genrtl_expr_stmt): Likewise.
5501 (genrtl_decl_stmt): Likewise.
5502 (genrtl_if_stmt): Likewise.
5503 (genrtl_while_stmt): Likewise.
5504 (genrtl_do_stmt): Likewise.
5505 (genrtl_return_stmt): Likewise.
5506 (genrtl_for_stmt): Likewise.
5507 (genrtl_break_stmt): Likewise.
5508 (genrtl_continue_stmt): Likewise.
5509 (genrtl_scope_stmt): Likewise.
5510 (genrtl_switch_stmt): Likewise.
5511 (genrtl_case_label): Likewise.
5512 (genrtl_begin_compound_stmt): Likewise.
5513 (genrtl_finish_compound_stmt): Likewise.
5514 (genrtl_compound_stmt): Likewise.
5515 (genrtl_asm_stmt): Likewise.
5516 (genrtl_named_return_value): Likewise.
5517 (genrtl_begin_stmt_expr): Likewise.
5518 (genrtl_finish_stmt_expr): Likewise.
5519 (finish_for_stmt): Removed first argument.
5520 (finish_switch_stmt): Likewise.
5522 * semantics.c (genrtl_try_block): Define function.
5523 (genrtl_handler): Likewise.
5524 (genrtl_catch_block): Likewise.
5525 (genrtl_ctor_stmt): Likewise.
5526 (genrtl_subobject): Likewise.
5527 (genrtl_decl_cleanup): Likewise.
5528 (genrtl_do_poplevel): Likewise.
5529 (genrtl_do_pushlevel): Likewise.
5530 (genrtl_clear_out_block): Likewise.
5531 (genrtl_goto_stmt): Likewise.
5532 (genrtl_expr_stmt): Likewise.
5533 (genrtl_decl_stmt): Likewise.
5534 (genrtl_if_stmt): Likewise.
5535 (genrtl_while_stmt): Likewise.
5536 (genrtl_do_stmt): Likewise.
5537 (genrtl_return_stmt): Likewise.
5538 (genrtl_for_stmt): Likewise.
5539 (genrtl_break_stmt): Likewise.
5540 (genrtl_continue_stmt): Likewise.
5541 (genrtl_scope_stmt): Likewise.
5542 (genrtl_switch_stmt): Likewise.
5543 (genrtl_case_label): Likewise.
5544 (genrtl_begin_compound_stmt): Likewise.
5545 (genrtl_finish_compound_stmt): Likewise.
5546 (genrtl_compound_stmt): Likewise.
5547 (genrtl_asm_stmt): Likewise.
5548 (genrtl_named_return_value): Likewise.
5549 (genrtl_begin_stmt_expr): Likewise.
5550 (genrtl_finish_stmt_expr): Likewise.
5551 (finish_for_stmt): Removed first argument and generate rtl
5553 (finish_switch_stmt): Likewise.
5554 (do_poplevel): Removed generate rtl specific code.
5555 (do_pushlevel): Likewise.
5556 (add_tree): Likewise.
5557 (finish_goto_stmt): Likewise.
5558 (finish_expr_stmt): Likewise.
5559 (begin_if_stmt): Likewise.
5560 (finish_if_stmt_cond): Likewise.
5561 (finish_then_clause): Likewise.
5562 (begin_else_clause): Likewise.
5563 (finish_else_clause): Likewise.
5564 (finish_if_stmt): Likewise.
5565 (clear_out_block): Likewise.
5566 (begin_while_stmt): Likewise.
5567 (finish_while_stmt_cond): Likewise.
5568 (finish_while_stmt): Likewise.
5569 (begin_do_stmt): Likewise.
5570 (finish_do_body): Likewise.
5571 (finish_do_stmt): Likewise.
5572 (finish_return_stmt): Likewise.
5573 (begin_for_stmt): Likewise.
5574 (finish_for_init_stmt): Likewise.
5575 (finish_for_cond): Likewise.
5576 (finish_for_expr): Likewise.
5577 (finish_break_stmt): Likewise.
5578 (finish_continue_stmt): Likewise.
5579 (begin_switch_stmt): Likewise.
5580 (finish_switch_cond): Likewise.
5581 (finish_case_label): Likewise.
5582 (begin_try_block): Likewise.
5583 (begin_function_try_block): Likewise.
5584 (finish_try_block): Likewise.
5585 (finish_cleanup_try_block): Likewise.
5586 (finish_cleanup): Likewise.
5587 (finish_function_try_block): Likewise.
5588 (finish_handler_sequence): Likewise.
5589 (finish_function_handler_sequence): Likewise.
5590 (begin_handler): Likewise.
5591 (finish_handler_parms): Likewise.
5592 (begin_catch_block): Likewise.
5593 (finish_handler): Likewise.
5594 (begin_compound_stmt): Likewise.
5595 (finish_compound_stmt): Likewise.
5596 (finish_asm_stmt): Likewise.
5597 (finish_label_stmt): Likewise.
5598 (finish_label_decl): Likewise.
5599 (finish_subobject): Likewise.
5600 (finish_decl_cleanup): Likewise.
5601 (finish_named_return_value): Likewise.
5602 (begin_stmt_expr): Likewise.
5603 (finish_stmt_expr): Likewise.
5605 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
5606 to call genrtl_expr_stmt when appropriate.
5608 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
5609 begin_compound_expr to call genrtl_begin_stmt_expr and
5610 genrtl_begin_compound_expr when appropriate.
5611 (finish_init_stmts): Changed calls to finish_compound_expr and
5612 finish_stmt_expr to call genrtl_finish_compound_expr and
5613 genrtl_finish_stmt_expr when appropriate.
5614 (expand_default_init): Changed call to finish_expr_stmt to call
5615 genrtl_expr_stmt when appropriate.
5616 (build_vec_init): Likewise.
5618 * parse.y (simple_stmt): Removed first argument from call to
5619 finish_for_stmt. Removed first argument from call to
5622 * parse.c: Regenerated.
5624 * pt.c (tsubst_expr): Removed first argument from call to
5625 finish_for_stmt. Removed first argument from call to
5628 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
5630 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
5631 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
5633 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
5634 (cplus_tree_code_length[]): Likewise.
5635 (cplus_tree_code_name[]): Likewise.
5636 (init_parse): Added call to add_c_tree_codes. Changed
5637 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
5639 2000-06-16 Mark Mitchell <mark@codesourcery.com>
5641 * cp-tree.h (finish_mem_initializers): Declare.
5642 (count_trees): Likewise.
5643 * parse.y (base_init): Use finish_mem_initializers.
5644 * semantics.c (finish_mem_initializers): New function.
5646 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
5647 the number of trees.
5649 (count_trees): Don't use it.
5651 2000-06-15 Jason Merrill <jason@redhat.com>
5653 * tree.c (count_trees): New debugging function.
5655 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
5656 * init.c (build_member_call): Pull out the name of a DECL.
5658 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
5659 * semantics.c (expand_body): Push to TV_INTEGRATION here.
5660 * optimize.c (optimize_function): Not here.
5661 * pt.c (instantiate_decl): Push to TV_PARSE.
5663 2000-06-15 Mark Mitchell <mark@codesourcery.com>
5665 * cp-tree.h (struct language_function): Remove x_base_init_list
5666 and x_member_init_list.
5667 (current_base_init_list): Remove.
5668 (current_member_init_list): Likewise.
5669 (setup_vtbl_ptr): Change prototype.
5670 (emit_base_init): Likewise.
5671 (expand_member_init): Likewise.
5672 (reinit_parse_for_function): Remove.
5673 * decl.c (save_function_data): Don't clear x_base_init_list and
5675 (mark_language_function): Don't mark them.
5676 * init.c (perform_member_init): Tweak comment.
5677 (sort_member_init): Take the list of initializers as an argument.
5678 (sort_base_init): Likewise.
5679 (emit_base_init): Likewise.
5680 (expand_member_init): Return the initializer. Don't use global
5682 * lex.c (reinit_parse_for_function): Remove.
5683 * method.c (build_template_parm_names): Correct substitution.
5684 (do_build_copy_constructor): Don't use current_member_init_list
5685 and current_base_init_list.
5686 (synthesize_method): Likewise.
5687 * parse.y (base_init): Split mem-initializers into
5688 base-initializers and field-initializers.
5689 (member_init_list): Build up the list here.
5690 (member_init): Return the initializer.
5691 (fn.depfn): Don't use reinit_parse_for_function.
5692 * parse.c: Regenerated.
5693 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
5695 (tsubst_expr): Don't use current_member_init_list
5696 and current_base_init_list.
5697 (tsubst_expr_values): Rename to ...
5698 (tsubst_initializer_list): ... this. Use convert_from_reference.
5699 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
5700 and current_base_init_list.
5701 (begin_function_definition): Don't call reinit_parse_for_function.
5703 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
5705 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
5708 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
5710 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
5712 * cp-tree.h (IF_COND): Move to c-common.h.
5713 (THEN_CLAUSE): Likewise.
5714 (ELSE_CLAUSE): Likewise.
5715 (WHILE_COND): Likewise.
5716 (WHILE_BODY): Likewise.
5717 (DO_COND): Likewise.
5718 (DO_BODY): Likewise.
5719 (RETURN_EXPR): Likewise.
5720 (EXPR_STMT_EXPR): Likewise.
5721 (FOR_INIT_STMT): Likewise.
5722 (FOR_COND): Likewise.
5723 (FOR_EXPR): Likewise.
5724 (FOR_BODY): Likewise.
5725 (SWITCH_COND): Likewise.
5726 (SWITCH_BODY): Likewise.
5727 (CASE_LOW): Likewise.
5728 (CASE_HIGH): Likewise.
5729 (GOTO_DESTINATION): Likewise.
5730 (COMPOUND_BODY): Likewise.
5731 (ASM_CV_QUAL): Likewise.
5732 (ASM_STRING): Likewise.
5733 (ASM_OUTPUTS): Likewise.
5734 (ASM_INPUTS): Likewise.
5735 (ASM_CLOBBERS): Likewise.
5736 (DECL_STMT_DECL): Likewise.
5737 (STMT_EXPR_STMT): Likewise.
5738 (LABEL_STMT_LABEL): Likewise.
5739 (SCOPE_BEGIN_P): Likewise.
5740 (SCOPE_END_P): Likewise.
5741 (SCOPE_STMT_BLOCK): Likewise.
5742 (SCOPE_NULLIFIED_P): Likewise.
5743 (SCOPE_NO_CLEANUPS_P): Likewise.
5744 (SCOPE_PARTIAL_P): Likewise.
5745 (ASM_VOLATILE_P): Likewise.
5746 (STMT_LINENO): Likewise.
5747 (STMT_LINENO_FOR_FN_P): Likewise.
5749 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
5750 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
5751 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
5752 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
5753 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
5755 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
5757 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
5758 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
5760 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
5761 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
5762 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
5764 2000-06-14 Mark Mitchell <mark@codesourcery.com>
5766 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
5767 * class.c (dfs_find_final_overrider): Set it appropriately.
5768 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
5769 avoid unneeded secondary vptrs.
5771 2000-06-13 Jakub Jelinek <jakub@redhat.com>
5773 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
5774 (check_bitfield_decl, check_field_decl): Likewise.
5775 (build_vtbl_or_vbase_field, build_base_field): Likewise.
5776 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
5777 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
5778 (xfer_tag, finish_enum): Likewise.
5779 * decl2.c (finish_builtin_type): Likewise.
5780 * init.c (init_init_processing): Likewise.
5781 * pt.c (instantiate_class_template): Likewise.
5782 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
5783 * cp-tree.h (struct lang_type): Add user_align member.
5784 (CLASSTYPE_USER_ALIGN): Define.
5786 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5788 * Make-lang.in (c++.install-common): Install g++-cross in
5789 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
5790 $(target_alias)-g++ and $(target_alias)-c++.
5792 2000-06-12 Mark Mitchell <mark@codesourcery.com>
5794 * class.c (vcall_offset_data_s): Add last_init and fns.
5795 (overrides): Rename to same_signature_p.
5796 (dfs_find_final_overrider): Adjust accordingly.
5797 (mark_overriders): Likewise.
5798 (warn_hidden): Likewise.
5799 (build_vtbl_initializer): Reorganize machinery for building things
5800 at negative offsets.
5801 (build_vcall_and_vbase_vtbl_entries): Likewise.
5802 (build_vbase_offset_vtbl_entries): Likewise.
5803 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
5804 offset entries. Do not create two entries for functions with the
5806 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
5807 (build_rtti_vtbl_entries): Reorganize machinery for building things
5808 at negative offsets.
5810 * optimize.c (expand_call_inline): Don't recurse into the code
5811 used to initialize the parameters more than once.
5813 2000-06-11 Mark Mitchell <mark@codesourcery.com>
5815 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
5816 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
5817 (find_substitution): Only use the `Sa' substitution for
5818 std::allocator, not instantiations of it.
5819 (write_template_prefix): Move comment. Only use a TREE_LIST to
5820 represent substitutions for a member template.
5821 (write_array_type): Mangle array dimensions correctly.
5822 * optimize.c (maybe_clone_body): Copy more information from the
5824 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
5825 on the regenerated declaration.
5827 2000-06-11 Chip Salzenberg <chip@valinux.com>
5828 Mark Mitchell <mark@codesourcery.com>
5830 * class.c (build_vtable): Clarify comment.
5831 (build_ctor_vtbl_group): Pass the most derived type to
5834 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5836 * decl2.c (compare_options): Don't needlessly cast away const-ness.
5838 2000-06-10 Mark Mitchell <mark@codesourcery.com>
5840 * decl.c (add_binding): Handle duplicate declarations of external
5843 2000-06-09 Chip Salzenberg <chip@valinux.com>
5844 Mark Mitchell <mark@codesourcery.com>
5846 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
5848 (write_signed_number): New macro.
5849 (write_unsigned_number): Likewise.
5850 (write_source_name): Use them.
5851 (write_number): Handle signed and unsigned values.
5852 (write_integer_cst): Use tree_int_cst_sgn, and use
5853 write_unsigned_number or write_signed_number as appropriate.
5854 (write_discriminator): Use write_unsigned_number or
5855 write_signed_number as appropriate.
5856 (write_template_arg_literal): Likewise.
5857 (write_array_type): Use tree_low_cst.
5858 (write_template_parm): Use write_unsigned_number or
5859 write_signed_number as appropriate.
5860 (write_substitution): Adjust call to write_number.
5861 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
5862 (write_expression): Handle non-type template arguments of
5863 reference type correctly.
5864 (mangle_thunk): Use write_signed_number.
5866 2000-06-09 Chip Salzenberg <chip@valinux.com>
5868 * mangle.c (find_substition): Don't mangle objects with typename
5869 substitutions (e.g. "cin" as "Si").
5871 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
5873 * call.c (add_candidate): Use ggc_alloc_cleared.
5874 * decl.c (lookup_label): Likewise.
5875 * lex.c (retrofit_lang_decl): Likewise.
5877 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
5879 * semantics.c (expand_body): Push to TV_EXPAND.
5880 * optimize.c (optimize_function): Push to TV_INTEGRATION.
5881 * decl.c (start_function): Always call announce_function.
5883 * tinfo2.cc: Just declare abort.
5885 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
5887 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
5888 whenever @ is a symbolic name.
5890 2000-06-08 Jakub Jelinek <jakub@redhat.com>
5892 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
5894 2000-06-07 Mark Mitchell <mark@codesourcery.com>
5896 * decl.c (pushdecl): Look up functions by DECL_NAME, not
5897 DECL_ASSEMBLER_NAME.
5899 2000-06-06 Mark Mitchell <mark@codesourcery.com>
5901 * decl2.c (c_language): Define.
5903 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
5905 * lex.c (lang_init_options): Tweak.
5907 * decl2.c: Remove #inclusion of diagnostic.h
5908 (lang_decode_option): Move diagnostic formatting options to
5911 * lang-options.h: Remove documentation for diagnostic options.
5913 * Makefile.in (lex.o): Depends upon diagnostic.h
5915 2000-06-06 Mark Mitchell <mark@codesourcery.com>
5917 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
5918 the same DECL_RESULT, it's not a redefinition.
5919 * pt.c (tsubst_decl): Remove code to handle illegal
5922 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
5924 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
5926 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
5928 * search.c (maybe_suppress_debug_info): Don't check
5929 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
5931 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
5934 Remember instantiation context in deferred instantiations.
5935 * cp-tree.h (struct tinst_level): Remove.
5936 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
5937 * pt.c (current_tinst_level): Now a tree.
5938 (print_template_context, push_tinst_level, pop_tinst_level,
5939 tinst_for_decl): Adjust.
5940 (reopen_tinst_level): New fn.
5941 (init_pt): Register current_tinst_level as a root.
5942 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
5943 of the pending templates list.
5944 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
5945 * lex.c (extract_interface_info): Adjust.
5946 * decl2.c (warn_if_unknown_interface): Adjust.
5948 2000-06-05 Mark Mitchell <mark@codesourcery.com>
5950 * class.c (indirect_primary_base_p): New function.
5951 (determine_primary_base): Use it.
5953 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
5955 Update new-abi dynamic cast algorithm.
5956 * tinfo.cc (__class_type_info::__dyncast_result): Add
5957 whole_details. Adjust constructor.
5958 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
5959 Avoid unnecessary searching.
5960 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
5962 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5964 * decl.c (init_decl_processing): Don't call record_component_aliases.
5965 * tree.c (build_cplus_array_type_1): Likewise.
5967 2000-06-04 Mark Mitchell <mark@codesourcery.com>
5969 * ir.texi: Correct typo.
5970 * mangle.c (write_expression): Handle non-type template arguments
5971 with reference type.
5972 * method.c (build_overload_value): Likewise.
5973 * pt.c (convert_nontype_argument): Explicitly represent conversion
5974 to a reference with an ADDR_EXPR.
5975 (unify): Always unify arguments in left-to-right order.
5977 2000-06-03 Alex Samuel <samuel@codesourcery.com>
5978 Mark Mitchell <mark@codesourcery.com>
5980 * Make-lang.in (CXX_SRCS): Add mangle.c.
5981 * Makefile.in (CXX_OBJS): Add mangle.o.
5982 (mangle.o): New rule.
5984 * class.c (local_classes): New variable.
5985 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
5986 (get_vtt_name): Use mangle_vtt_name for new ABI.
5987 (init_class_processing): Initialize local_classes.
5988 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
5989 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
5990 (std_identifier): New macro.
5991 (DECL_VOLATILE_MEMFUNC_P): New macro.
5992 (DECL_NAMESPACE_STD_P): Likewise.
5993 (local_classes): Declare.
5994 (get_mostly_instantiated_function_type): Declare.
5995 (init_mangle): Declare.
5996 (mangle_decl): Likewise.
5997 (mangle_type_string): Likewise.
5998 (mangle_type): Likewise.
5999 (mangle_typeinfo_for_type): Likewise.
6000 (mangle_typeinfo_string_for_type): Likewise.
6001 (mangle_vtbl_for_type): Likewise.
6002 (mangle_vtt_for_type): Likewise.
6003 (mangle_ctor_vtbl_for_type): Likewise.
6004 (mangle_thunk): Likewise.
6005 (mangle_conv_op_name_for_type): Likewise.
6006 (mangle_guard_variable): Likewise.
6007 * decl.c (pushtag): Keep track of local classes.
6008 (initialize_predefined_identifiers): Initialize std_identifier.
6009 (init_decl_processing): Use std_identifier.
6010 (start_decl): Don't treat instantiations as specializations.
6011 (grokdeclarator): Likewise.
6012 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
6013 name for fully-instantiated templates.
6014 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
6015 destructors with the new ABI.
6016 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
6017 (grokfield): Use mangle_type for new ABI.
6018 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
6019 (get_sentry): Use mangle_guard_variable for new ABI.
6020 (start_static_initialization_or_destruction): Likewise.
6021 * expr.c (extract_aggr_init): Remove.
6022 (extract_scalar_init): Likewise.
6023 (extract_init): Remove #if 0'd code.
6024 * mangle.c: New function.
6025 * method.c (build_mangled_name): Assert not flag_new_abi.
6026 (build_static_name): Likewise.
6027 (build_decl_overload_real): Likewise.
6028 (build_typename_overload): Likewise.
6029 (build_overload_with_type): Likewise.
6030 (build_overload_name): Likewise.
6031 (get_ctor_vtbl_name): Likewise.
6032 (start_squangling): Likewise.
6033 (get_id_2): Likewise.
6034 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
6035 (init_method): Call init_mangle for new ABI.
6036 (make_thunk): Call mangle_thunk for new ABI.
6037 * operators.def: Correct new ABI manglings for the `%' operator.
6039 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
6040 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
6041 (lookup_template_class): Call mangle_decl for new ABI.
6042 (get_mostly_instantiated_function_type): New function.
6043 (set_mangled_name_for_template_decl): Use it.
6044 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
6045 the new ABI. Use mangle_conv_op_name_for_type for instantiated
6046 conversion op names.
6047 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
6048 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
6049 (tinfo_base_init): Likewise. Mangle typeinfo string name with
6050 mangle_typeinfo_string_for_type.
6052 2000-06-03 Mark Mitchell <mark@codesourcery.com>
6054 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
6055 (INNERMOST_TEMPLATE_ARGS): New macro.
6056 (innermost_args): Remove.
6057 (get_innermost_template_args): New function.
6058 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
6059 * error.c (dump_function_decl): Be caution when using
6060 most_general_template.
6061 * method.c (build_template_parm_names): Use
6062 INNERMOST_TEMPLATE_ARGS.
6063 * pt.c (add_to_template_args): Tidy comment
6064 (get_innermost_template_args): New function.
6065 (check_explicit_specialization): Clear DECL_INITIAL for a new
6067 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
6069 (push_template_decl): Always register specializations of the most
6071 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
6072 (coerce_template_parms): Likewise.
6073 (lookup_template_class): Likewise.
6074 (innermost_args): Remove.
6075 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
6076 (tsubst_decl): Handle tricky specializations. Use
6077 get_innermost_template_args.
6078 (instantiate_template): Simplify handling of partial
6080 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
6081 (most_general_template): Reimplement, in a more straightforward
6083 (regenerate_decl_from_template): Tweak formatting. Use
6084 TMPL_ARGS_DEPTH for clarity.
6085 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
6087 * dump.c (dequeue_and_dump): Dump information about thunks.
6089 2000-06-01 Richard Henderson <rth@cygnus.com>
6091 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
6093 2000-06-01 Richard Henderson <rth@cygnus.com>
6095 * decl2.c (unsupported_options): Fix typo, make const.
6096 (lang_decode_option): Fix bsearch argument order.
6098 2000-06-01 Mark Mitchell <mark@codesourcery.com>
6100 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
6103 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6105 * cp-tree.h (c_get_alias_set): Deleted.
6106 * Makefile.in (decl.o): Include ../expr.h.
6107 * decl.c (expr.h): Include.
6108 (init_decl_processing): Call record_component_aliases for arrays.
6109 (grokdeclarator): Likewise.
6110 Set TREE_ADDRESSABLE for fields that aren't bitfields.
6111 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
6113 2000-05-31 Mark Mitchell <mark@codesourcery.com>
6115 Remove guiding declaration support.
6116 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
6117 (flag_guiding_decls): Remove.
6118 * call.c (build_user_type_conversion_1): Remove support for
6120 (build_new_function_call): Likewise.
6121 (build_new_op): Likewise.
6122 (build_new_method_call): Likewise.
6123 * decl.c (start_function): Likewise.
6124 * friend.c (is_friend): Likewise.
6125 (do_friend): Likewise.
6126 * decl2.c ((flag_dump_translation_unit): Make it const.
6127 (flag_guiding_decls): Remove.
6128 (unsupported_options): New variable
6129 (compare_options): New function.
6130 (lang_decode_option): Use them.
6132 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
6134 * method.c (mangle_expression): Adjust test for legal expression
6137 * pt.c (instantiate_decl): Save and restore the local
6138 specializations list.
6140 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
6142 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
6144 2000-05-30 Mark Mitchell <mark@codesourcery.com>
6146 * call.c (add_template_candidate_real): Handle member template
6147 constructors for classes with virtual bases.
6148 (build_user_type_conversion_1): Use in_charge_arg_for_name.
6149 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
6151 * ir.texi: Update thunk documentation.
6153 * call.c (joust): Fix handling of overloaded builtin operators.
6155 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
6157 * cp-tree.h (DECL_ANTICIPATED): New macro.
6158 Document new use of DECL_LANG_FLAG_7.
6159 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
6160 in the user namespace.
6161 * lex.c (do_identifier): If the identifier's declaration has
6162 DECL_ANTICIPATED on, it has not yet been declared. But do not
6163 replace it with an ordinary implicit declaration.
6165 * tinfo2.cc: Include stdlib.h.
6167 2000-05-29 Mark Mitchell <mark@codesourcery.com>
6169 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
6170 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
6173 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
6175 * decl2.c (lang_decode_option): Use skip_leading_substring instead
6178 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
6180 * operators.def (<?): Duplicated, should have been...
6183 2000-05-27 Alex Samuel <samuel@codesourcery.com>
6184 Mark Mitchell <mark@codesourcery.com>
6186 * cp-tree.h (ansi_opname): Make it a macro.
6187 (ansi_assopname): Likewise.
6188 (struct lang_decl_flags): Add assignment_operator_p.
6189 (struct lang_decl): Add operator_code.
6190 (DECL_VTT_PARM): Adjust.
6191 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
6192 overloaded operator.
6193 (SET_OVERLOADED_OPERATOR_CODE): New macro.
6194 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
6195 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
6196 (opname_tab): Remove.
6197 (assignop_tab): Likewise.
6198 (operator_name_info_t): New type.
6199 (operator_name_info): New variable.
6200 (assignment_operator_name_info): Likewise.
6201 (build_cp_library_fn): Remove declaration.
6202 (push_cp_library_fn): Likewise.
6203 (operator_name_string): Likewise.
6204 (build_decl_overload): Likewise.
6205 * call.c (print_z_candidates): Simplify.
6206 (build_object_call): Adjust usage of ansi_opname. Use
6207 DECL_OVERLOADED_OPERATOR_P.
6208 (op_error): Adjust operator name lookup.
6209 (build_conditional_expr): Adjust usage of ansi_opname.
6210 (build_new_op): Likewise.
6211 (build_op_delete_call): Likewise.
6212 (build_over_call): Likewise.
6213 (joust): Use DECL_OVERLOADED_OPERATOR_P.
6214 * decl.c (duplicate_decls): Copy operator_code.
6215 (init_decl_processing): Adjust parameters to push_cp_library_fn.
6216 (builtin_function): Adjust parameters to build_library_fn_1.
6217 (build_library_fn_1): Accept an overloaded operator code.
6218 (build_library_fn): Pass ERROR_MARK.
6219 (build_cp_library_fn): Accept an overloaded operator code.
6220 (push_cp_library_fn): Likewise.
6221 (grokfndecl): Tweak.
6222 (grokdeclarator): Simplify code to compute names of overloaded
6223 operators. Adjust use of ansi_opname.
6224 (ambi_op_p): Work on tree_codes, not identifiers.
6225 (unary_op_p): Likewise.
6226 (grok_op_properties): Likewise.
6227 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
6228 (lang_mark_tree): Don't try to mark the operator_code.
6229 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
6230 * error.c (dump_decl): Remove special handling for operator
6232 (dump_function_name): Likewise.
6233 (dump_expr): Adjust name lookup of operators.
6234 (op_to_string): Simplify.
6235 (assop_to_string): Likewise.
6236 * init.c (build_new_1): Adjust use of ansi_opname.
6237 * lex.c (opname_tab): Remove.
6238 (assignop_tab): Likewise.
6239 (ansi_opname): Likewise.
6240 (ansi_assopname): Likewise.
6241 (operator_name_string): Likewise.
6242 (reinit_lang_specific): Likewise.
6243 (operator_name_info): New variable.
6244 (assignment_operator_name_info): Likewise.
6245 (init_operators): New function.
6246 (init_parse): Use it.
6247 (do_identifier): Adjust use of ansi_opname.
6248 * method.c (mangle_expression): Don't use ansi_opname for
6250 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
6251 (build_decl_overload): Remove.
6252 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
6253 (do_build_assign_ref): Adjust use of ansi_opname.
6254 (synthesize_method): Likewise.
6255 (implicitly_declare_fn): Likewise.
6256 * operators.def: New file.
6257 * parse.y (operator): Adjust use of ansi_opname.
6258 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
6259 (set_mangled_name_for_template_decl): Don't play games with
6261 (special_function_p): Adjust use of ansi_opname.
6262 * typeck.c (check_return_expr): Likewise.
6263 * Make-lang.in (cc1plus): Depend on operators.def.
6264 * Makefile.in (lex.o): Likewise.
6267 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
6269 * Make-lang.in (cplib2.ready): Eradicate.
6271 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6273 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
6274 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
6275 (built_min, cp_tree_equal): Likewise.
6277 2000-05-26 Mark Mitchell <mark@codesourcery.com>
6279 * class.c (layout_nonempty_base_or_field): Replace
6280 `record_layout_info' with `record_layout_info_s'.
6282 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
6285 * cp-tree.h (struct language_function): x_named_labels is now
6286 a struct named_label_list*.
6287 * decl.c (struct named_label_use_list): Renamed from...
6288 (struct named_label_list): ...this. New struct.
6289 (push_binding_level): Don't set eh_region.
6290 (note_level_for_eh): New fn.
6291 (pop_label): Take label and old value directly.
6292 (pop_labels): Adjust for new named_labels format.
6293 (lookup_label): Likewise.
6294 (poplevel): Note characteristics of a binding level containing a
6295 named label. Mess with named label lists earlier.
6296 (mark_named_label_lists): New fn.
6297 (mark_lang_function): Call it.
6298 (use_label): New fn, split out from...
6299 (make_label_decl): ...here. Don't call it.
6300 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
6301 check_previous_gotos): New fns, split out from...
6302 (define_label): ...here.
6303 (check_switch_goto): New fn.
6304 (define_case_label): Call it.
6305 (check_goto): New fn.
6306 * semantics.c (finish_goto_stmt): Call it and use_label.
6307 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
6308 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
6310 2000-05-26 Mark Mitchell <mark@codesourcery.com>
6312 * class.c (build_vtable_entry_ref): Correct usage of
6313 get_vtbl_decl_for_binfo.
6315 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
6316 * method.c (implicitly_declare_fn): Not here.
6318 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
6320 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
6321 (CPTI_PTMD_DESC_TYPE): ... here.
6322 (ptmd_desc_type_node): Rename to ...
6323 (ptm_desc_type_node): ... here.
6325 * rtti.c (ptmd_initializer): Rename to ...
6326 (ptm_initializer): ... here.
6327 (sythesize_tinfo_var): Adjust. Deal with pointer to member
6329 (create_tinfo_types): Adjust.
6331 2000-05-25 Mark Mitchell <mark@codesourcery.com>
6333 Finish implementation of VTTs.
6334 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
6335 CPTI_VTT_PARM_IDENTIFIER.
6336 (vtt_parm_identifier): New macro.
6337 (vtt_parm_type): Likewise.
6338 (BINFO_SUBVTT_INDEX): Likewise.
6339 (BINFO_VPTR_INDEX): Likewise.
6340 (struct lang_decl): Add vtt_parm.
6341 (DECL_VTT_PARM): New macro.
6342 (DECL_USE_VTT_PARM): Likewise.
6343 (DECL_NEEDS_VTT_PARM_P): Likewise.
6344 (get_vtt_name): Declare.
6345 (build_artifical_parm): Likewise.
6346 (fixup_all_virtual_upcast_offsets): Likewise.
6347 (expand_indirect_vtbls_init): Remove.
6348 * call.c (build_new_method_call): Pass the vtt to subobject
6349 constructors and destructors.
6350 * class.c (get_vtt_name): Give it external linkage.
6351 (build_clone): Handle the magic VTT parameters for clones.
6352 (clone_function_decl): Fix typo in comment.
6353 (build_vtt): Keep track of the indices in the VTTs where various
6354 entities are stored.
6355 (build_vtt_inits): Likewise.
6356 (dfs_build_vtt_inits): Likewise.
6357 (build_ctor_vtbl_group): Tweak type of construction vtables.
6358 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
6359 primary bases, when building construction vtables.
6360 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
6361 (initialize_predefined_identifiers): Add vtt_parm_identifier.
6362 (init_decl_processing): Initialize vtt_parm_type.
6363 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
6364 (lang_mark_tree): Make vtt_parm.
6365 * decl2.c (build_artificial_parm): New function.
6366 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
6367 (grokclassfn): Use build_artificial_parm.
6368 * init.c (initialize_vtbl_ptrs): Call
6369 fixup_all_virtual_upcast_offsets directly.
6370 (perform_member_init): Use the complete subobject destructor for
6372 (build_vtbl_address): New function.
6373 (expand_virtual_init): Handle VTTs.
6374 * optimize (maybe_clone_body): Likewise.
6375 * search.c (fixup_all_virtual_upcast_offsets): Give it external
6377 (expand_indirect_vtbls_init): Remove.
6378 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
6379 * tree.c (make_binfo): Make them bigger.
6381 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
6383 * inc/cxxabi.h (__pbase_type_info): Define, based on
6384 __pointer_type_info.
6385 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
6386 (__pointer_to_member_type_info): Likewise.
6387 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
6388 (__pointer_to_member_type_info::__is_pointer_p): Remove.
6389 (__pointer_type_info::__do_catch): Rename to ...
6390 (__pbase_type_info::__do_catch): ... here. Adjust.
6391 (__pbase_type_info::__pointer_catch): Implement.
6392 (__pointer_type_info::__pointer_catch): Adjust.
6393 (__pointer_to_member_type_info::__pointer_catch): Adjust.
6395 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
6397 * tinfo.h (__user_type_info::contained_virtual_p): New
6399 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
6401 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
6402 diamond shaped heirarchy. Add early out for mixed diamond and
6403 duplicate shaped heirarchy.
6405 2000-05-24 Mark Mitchell <mark@codesourcery.com>
6407 * cp-tree.h (build_delete): Change prototype.
6408 (build_vec_delete): Likewise.
6409 * call.c (build_scoped_method_call): Use special_function_kind
6410 values to indicate the kind of destruction to be done.
6411 (build_method_call): Likewise.
6412 * decl.c (finish_destructor_body): Likewise.
6413 (maybe_build_cleanup_1): Likewise. Rename to ...
6414 (maybe_build_cleanup): ... this.
6415 * decl2.c (delete_sanity): Use special_function_kind
6416 values to indicate the kind of destruction to be done.
6417 (build_cleanup): Likewise.
6418 * init.c (perform_member_init): Likewise.
6419 (build_vec_delete_1): Likewise.
6420 (build_dtor_call): Simplify.
6421 (build_delete): Use special_function_kind
6422 values to indicate the kind of destruction to be done.
6423 (build_vbase_delete): Likewise.
6424 (build_vec_delete): Likewise.
6426 * init.c (sort_member_init): Fix typo in error message generation
6429 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
6431 * semantics.c (begin_class_definition): make the packed
6432 attribute be sensitive to the "-fpack-struct" command line flag
6434 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
6436 Update new-abi upcast algorithm.
6437 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
6438 prototype and meaning of return value.
6439 (__si_class_type_info::__do_upcast): Likewise.
6440 (__vmi_class_type_info::__do_upcast): Likewise.
6441 * tinfo.cc (__class_type_info::__upcast_result): Replace
6442 whole2dst with part2dst. Adjust ctor.
6443 (__class_type_info::__do_upcast): Adjust call of worker function.
6444 (__class_type_info::__do_upcast): Adjust.
6445 (__si_class_type_info::__do_upcast): Adjust. Use parent's
6447 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
6448 virtual base in diamond heirarchy bug.
6450 2000-05-23 Mark Mitchell <mark@codesourcery.com>
6452 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
6453 and bitfield to tinfo_fn_p.
6454 (DECL_TINFO_FN_P): Adjust.
6455 (SET_DECL_TINFO_FN_P): Likewise.
6456 (DECL_MUTABLE_P): Likewise.
6457 (DECL_C_BIT_FIELD): Likewise.
6458 (SET_DECL_C_BIT_FIELD): Likewise.
6459 (CLEAR_DECL_C_BIT_FIELD): Likewise.
6460 (DECL_UNINLINABLE): Likewise.
6461 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
6462 (handle_using_decl): Remove assertion.
6463 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
6464 to build FIELD_DECLs.
6465 (build_base_field): Likewise.
6466 (layout_class_type): Likewise.
6467 * decl.c (init_decl_processing): Likewise.
6468 (build_ptrmemfunc_type): Likewise.
6469 (grokdeclarator): Likewise.
6470 * decl2.c (grok_x_components): Likewise.
6471 * except.c (call_eh_info): Likewise.
6472 * init.c (init_init_processing): Likewise.
6473 * rtti.c (expand_class_desc): Likewise.
6474 (create_pseudo_type_info): Likewise.
6475 (get_vmi_pseudo_type_info): Likewise.
6476 (create_tinfo_types): Likewise.
6477 * ptree.c (print_lang_decl): Adjust.
6478 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
6479 before checking DECL_MUTABLE_P.
6481 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
6482 parameters for template functions.
6483 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
6484 destructors as well as constructors.
6486 2000-05-22 Mark Mitchell <mark@codesourcery.com>
6488 * class.c (build_ctor_vtbl_group): Set inits.
6489 * optimize.c (maybe_clone_body): Set DECL_INLINE and
6490 DECL_THIS_INLINE appropriately for clones.
6492 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
6493 (DECL_CONV_FN_P): Simplify.
6494 (DECL_OPERATOR): Remove.
6495 (language_to_string): Declare.
6496 * decl.c (duplicate_decls): Fix typo in comment.
6497 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
6498 (grok_op_properties): Use DECL_CONV_FN_P instead of
6499 IDENTIFIER_TYPENAME_P.
6500 * dump.c (dequeue_and_dump): Dump the language linkage of
6502 * error.c (language_to_string): Give it external linkage.
6503 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
6504 (implicitly_declare_fn): Set DECL_LANGUAGE.
6505 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
6506 IDENTIFIER_TYPENAME_P.
6507 (tsubst_decl): Likewise.
6508 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
6509 * semantics.c (finish_member_declaration): Don't mark members of
6510 classes declared in an extern "C" region as extern "C".
6512 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6514 * decl2.c (qualified_lookup_using_namespace): Look through
6517 * decl.c (push_using_decl): Return the old decl on namespace level.
6519 2000-05-21 Mark Mitchell <mark@codesourcery.com>
6521 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
6522 (VTT_NAME_PREFIX): New macro.
6523 (CTOR_VTBL_NAME_PREFIX): Likewise.
6524 (get_ctor_vtbl_name): New function.
6525 * class.c (get_vtable_name): Simplify.
6526 (get_vtt_name): New function.
6527 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
6528 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
6529 when a virtual base becomes primary.
6530 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
6532 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
6533 additional parameters.
6534 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
6535 (initialize_array): New function.
6536 (build_vtt): Likewise.
6537 (build_vtt_inits): Likewise.
6538 (dfs_build_vtt_inits): Likewise.
6539 (dfs_fixup_binfo_vtbls): Likewise.
6540 (build_ctor_vtbl_group): Likewise.
6541 (initialize_vtable): Use initialize_array.
6542 (accumulate_vtbl_inits): Reimplement to handle construction
6544 (dfs_accumulate_vtbl_inits): Likewise.
6545 (bulid_vtbl_initializer): Adjust parameter name.
6546 * method.c (build_typename_overload): Remove #if 0'd code.
6547 (get_ctor_vtbl_name): New function.
6548 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
6549 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
6551 * cp-tree.h (struct lang_type): Remove search_slot.
6552 (CLASSTYPE_SEARCH_SLOT): Remove.
6553 (emit_base_init): Change prototype.
6554 (initialize_vtbl_ptrs): Likewise.
6555 (expand_indirect_vtbls_init): Likewise.
6556 (clear_search_slots): Remove.
6557 * decl.c (lang_mark_tree): Don't mark search_slot.
6558 * init.c (initialize_vtbl_ptrs): Simplify.
6559 (emit_base_init): Likewise.
6560 * search.c (struct vbase_info): Document decl_ptr.
6561 (convert_pointer_to_single_level): Remove.
6562 (dfs_find_vbases): Remove.
6563 (dfs_init_base_pointers): Simplify.
6564 (dfs_clear_vbase_slots): Remove.
6565 (dfs_vtable_path_unmark): New function.
6566 (init_vbase_pointers): Simplify.
6567 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
6568 (expand_indirect_vtbls_init): Simplify. Don't call
6569 mark_all_temps_used.
6570 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
6571 initialize_vtbl_ptrs.
6573 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
6575 * except.c: Add static prototypes.
6577 2000-05-20 H.J. Lu <hjl@gnu.org>
6579 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
6581 2000-05-19 Mark Mitchell <mark@codesourcery.com>
6583 Don't create a separate copy of virtual bases for the
6584 CLASSTYPE_VBASECLASSES list.
6585 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
6586 (BINFO_FOR_VBASE): Remove.
6587 (CANONICAL_BINFO): Adjust.
6588 (binfo_for_vbase): New function.
6589 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
6590 instead of BINFO_FOR_VBASE.
6591 (build_vbase_pointer): Likewise.
6592 (build_secondary_vtable): Likewise.
6593 (dfs_mark_primary_bases): Likewise.
6594 (mark_primary_bases): Likewise.
6595 (layout_nonempty_base_or_field): Likewise.
6596 (dfs_set_offset_for_shared_vbases): Likewise.
6597 (dfs_set_offset_for_unshared_vbases): Likewise.
6598 (layout_virtual_bases): Likewise. Adjust for changes to the
6599 CLASSTYPE_VBASECLASSES list.
6600 (dump_class_hierarchy_r): Use binfo_for_vbase
6601 instead of BINFO_FOR_VBASE.
6602 (dump_class_hierarchy): Likewise.
6603 (finish_vtbls): Likewise.
6604 (build_vtbl_initializer): Adjust for changes to the
6605 CLASSTYPE_VBASECLASSES list.
6606 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
6607 * decl.c (finish_destructor_body): Adjust for changes to the
6608 CLASSTYPE_VBASECLASSES list.
6609 * init.c (sort_base_init): Use binfo_for_vbase.
6610 (construct_virtual_bases): Adjust for changes to the
6611 CLASSTYPE_VBASECLASSES list.
6612 (expand_member_init): Use binfo_for_vbase.
6613 (build_vbase_delete): Adjust for changes to the
6614 CLASSTYPE_VBASECLASSES list.
6615 * method.c (do_build_copy_constructor): Likewise.
6616 * rtti.c (get_base_offset): Use binfo_for_vbase.
6617 (expand_class_desc): Remove #if 0'd code.
6618 * search.c (struct vbase_info): Remove vbase_types.
6619 (get_base_distance): Use binfo_for_vbase.
6620 (lookup_field_queue_p): Use CANONICAL_BINFO.
6621 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
6622 (get_pure_virtuals): Adjust for changes to the
6623 CLASSTYPE_VBASECLASSES list.
6624 (dfs_find_vbases): Use binfo_for_vbase.
6625 (dfs_init_vbase_pointers): Likewise.
6626 (init_vbase_pointers): Don't initialize vi.vbase_types.
6627 (virtual_context): Use binfo_for_vbase.
6628 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
6629 CLASSTYPE_VBASECLASSES list.
6630 (expand_indirect_vtbls_init): Simplify.
6631 (dfs_get_vbase_types): Don't replicate virtual bases.
6632 (find_vbase_instance): Use binfo_for_vbase.
6633 (binfo_for_vbase): New function.
6634 * typeck.c (get_delta_difference): Use binfo_for_vbase.
6636 2000-05-17 Mark Mitchell <mark@codesourcery.com>
6638 * decl2.c (finish_anon_union): Generalize error messages to handle
6639 anonymous structures.
6640 * init.c (perform_member_init): Remove `name' parameter.
6641 (build_field_list): New function.
6642 (sort_member_init): Handle anonymous union initialization order
6643 correctly. Check for multiple initializations of the same union.
6644 (emit_base_init): Don't look up fields by name here.
6645 (expand_member_init): Record the result of name lookup for future
6647 * typeck.c (build_component_ref): Fix formatting.
6649 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
6651 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
6652 * typeck.c (build_x_compound_expr): Replace warn_unused with
6655 * decl2.c (lang_decode_option): Update -Wall unused flags by
6656 calling set_Wunused.
6658 2000-05-16 Mark Mitchell <mark@codesourcery.com>
6660 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
6661 * init.c (dfs_vtable_path_unmark): Remove.
6662 * search.c (marked_new_vtable_p): Likewise.
6663 (unmarked_new_vtable_p): Likewise.
6664 (dfs_search_slot_nonempty_p): Likewise.
6665 (dfs_mark): Likewise.
6666 (dfs_vtable_path_unmark): Likewise.
6667 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
6668 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
6669 (dfs_init_vbase_pointers): Remove special-case new ABI code.
6670 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
6671 (init_vbase_pointers): Simplify.
6672 (expand_indirect_vtbls_init): Likewise.
6674 * class.c (copy_virtuals): New function.
6675 (build_primary_table): Use it.
6676 (build_secondary_vtable): Likewise.
6677 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
6678 indicate that no vcall offset is required.
6679 (add_virtual_function): Likewise.
6680 (modify_all_vtables): Likewise.
6681 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
6682 (dfs_accumulate_vtbl_inits): Likewise.
6683 (build_vtbl_initializer): Make changes to handle construction
6685 (dfs_build_vcall_offset_vtbl_entries): Likewise.
6686 (build_rtti_vtbl_entries): Likewise.
6687 (build_vtable_entries): Handle a NULL vcall_index.
6689 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
6691 * decl2.c (lang_decode_option): Fix thinko.
6693 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
6695 * except.c (check_handlers): New fn.
6696 * cp-tree.h: Declare it.
6697 * semantics.c (finish_handler_sequence): Call it.
6698 (finish_function_handler_sequence): Likewise.
6699 (finish_handler_parms): Set TREE_TYPE on the handler.
6700 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
6701 * search.c (get_base_distance_recursive): If protect>1, ignore
6703 (get_base_distance): Don't reduce watch_access.
6705 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
6707 * lex.c: #include diagnostic.h.
6708 (lang_init_options): Set default prefixing rules.
6710 * lang-options.h: Add -fdiagnostics-show-location=.
6712 * decl2.c: #include diagnostic.h.
6713 (lang_decode_option): Handle -fdiagnostics-show-location=.
6715 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
6717 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
6718 * vec.cc: Revert my 2000-05-07 change.
6720 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
6722 * class.c (check_field_decls): Complain about non-static data
6723 members with same name as class in class with constructor.
6725 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
6727 * decl.c (grokdeclarator): Allow non-static data members with
6730 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
6732 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
6733 and pending_inline.filename. Update prototypes.
6734 * decl.c (define_label): Constify filename parameter.
6735 * decl2.c (warn_if_unknown_interface): Constify local char *.
6736 * input.c Constify input_source.filename. Don't declare
6737 input_filename or lineno. Constify filename parameter to feed_input.
6738 * lex.c (init_parse): Constify parameter and return value.
6739 (cp_pragma_interface, cp_pragma_implementation): Constify
6741 (reinit_parse_for_method, reinit_parse_for_block,
6742 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
6743 Constify local char *.
6744 * pt.c: Don't declare lineno or input_filename.
6745 (print_template_context, tsubst_friend_function, tsubst_decl,
6746 tsubst, instantiate_decl): Constify local char *.
6747 * semantics.c (expand_body): Constify local char *.
6748 * tree.c (build_srcloc): Constify filename parameter.
6749 * typeck.c (c_expand_asm_operands): Constify filename
6752 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
6754 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
6757 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
6759 * inc/cxxabi.h: Fix typos in comment.
6760 (__base_class_info::__offset): Use a static_cast.
6762 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
6764 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
6765 of std::size_t and std::ptrdiff_t respectively.
6766 * tinfo.cc: Likewise.
6769 2000-05-06 Richard Henderson <rth@cygnus.com>
6771 * typeck.c (build_c_cast): Don't warn integer->pointer size
6772 mismatch for constants.
6774 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
6776 * rtti.c (ptmd_initializer): Set non-public, if class is
6779 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
6780 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6781 __cxa_vec_delete): Likewise.
6782 * tinfo.cc (__dynamic_cast): Likewise.
6783 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6784 __cxa_vec_delete): Likewise.
6786 2000-05-04 Mark Mitchell <mark@codesourcery.com>
6788 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
6789 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
6790 (lang_decl_flags): Add vcall_offset.
6791 (THUNK_VCALL_OFFSET): Use it.
6792 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
6793 * method.c (make_thunk): Create the lang_decl here, not in
6795 (emit_thunk): Make generic thunks into ordinary functions once
6796 they have been fed to expand_body.
6797 * semantics.c (expand_body): Set current_function_is_thunk here.
6799 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6801 * class.c (update_vtable_entry_for_fn): Prototype.
6803 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
6806 * search.c (dfs_build_inheritance_graph_order): Prototype.
6808 2000-05-04 Mark Mitchell <mark@codesourcery.com>
6810 * cp-tree.h (special_function_kind): Add various kinds of
6812 (special_function_p): New function.
6813 * class.c (overrides): Don't let one kind of destructor override
6815 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
6816 whether or not to instantiate a template.
6817 * tree.c (special_function_p): Define.
6819 2000-05-03 Mark Mitchell <mark@codesourcery.com>
6821 * cp-tree.def (THUNK_DECL): Remove.
6822 * cp-tree.h (DECL_THUNK_P): New macro.
6823 (DECL_NON_THUNK_FUNCTION_P): Likewise.
6824 (DECL_EXTERN_C_FUNCTION_P): Likewise.
6825 (SET_DECL_THUNK_P): Likewise.
6826 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
6827 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
6828 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
6829 * decl.c (decls_match): Use DECL_EXTERN_C_P.
6830 (duplicate_decls): Likewise.
6831 (pushdecl): Likewise. Adjust thunk handling.
6832 (grokfndecl): Use DECL_EXTERN_C_P.
6833 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
6834 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
6835 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
6836 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
6837 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
6838 DECL_NO_STATIC_CHAIN.
6839 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
6840 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
6841 * search.c (covariant_return_p): Remove THUNK_DECL handling.
6844 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
6846 * tree.c (walk_tree): Set lineno.
6848 2000-05-01 Mark Mitchell <mark@codesourcery.com>
6850 * exception.cc: Update license notice.
6852 * new1.cc: Likewise.
6853 * new2.cc: Likewise.
6854 * tinfo.cc: Likewise.
6855 * tinfo2.cc: Likewise.
6857 * inc/cxxabi.h: Likewise.
6858 * inc/exception: Likewise.
6859 * inc/new: Likewise.
6860 * inc/new.h: Likewise.
6861 * inc/typeinfo: Likewise.
6863 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
6865 * tree.c (build_target_expr_with_type): If we already have a
6866 TARGET_EXPR, just return it.
6868 * optimize.c (initialize_inlined_parameters): Don't generate an
6869 EXPR_STMT if we can just use DECL_INITIAL.
6870 * decl.c (emit_local_var): Only make the initialization a
6871 full-expression if stmts_are_full_exprs_p.
6873 2000-05-01 Mark Mitchell <mark@codesourcery.com>
6875 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
6877 * call.c (standard_conversion): Use it.
6878 (direct_reference_binding): Likewise.
6879 (build_over_call): Likewise.
6880 (is_properly_derived_from): Likewise.
6881 (compare_ics): Likewise.
6882 * class.c (resolves_to_fixed_type_p): Likewise.
6883 * optimize.c (declare_return_variable): Likewise.
6884 * pt.c (is_specialization_of): Likewise.
6886 * typeck.c (comp_target_parms): Likeiwse.
6887 (build_static_cast): Likewise.
6888 (build_reinterpret_cast): Likewise.
6889 (build_const_cast): Likewise.
6890 (comp_ptr_ttypes_real): Likewise.
6891 (comp_ptr_ttypes_const): Likewise.
6892 * typeck2.c (process_init_constructor): Likewise.
6894 2000-04-30 Scott Snyder <snyder@fnal.gov>
6896 * decl.c (finish_destructor_body): Use the base destructor when
6897 destroying virtual bases.
6899 2000-04-30 Mark Mitchell <mark@codesourcery.com>
6901 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
6903 * optimize.c (struct inline_data): Add target_exprs field.
6904 (declare_return_variable): When a function returns an aggregate,
6905 use the variable declared in the TARGET_EXPR as the remapped
6907 (expand_call_inline): Update the pending target_exprs stack.
6908 (optimize_function): Initialize the stack.
6910 * decl2.c (finish_file): Fix typo in comment.
6912 * method.c (emit_thunk): Don't try to return a `void' value.
6914 * optimize.c (initialize_inlined_parameters): If the parameter is
6915 addressable, we need to make a new VAR_DECL, even if the
6916 initializer is constant.
6918 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
6920 * decl.c (grok_op_properties): Add an extra check of argtypes.
6922 2000-04-27 Mark Mitchell <mark@codesourcery.com>
6924 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
6926 (initialize_inlined_parameters): Try to avoid creating new
6929 2000-04-27 Alex Samuel <samuel@codesourcery.com>
6931 * lex.c (my_get_run_time): Remove.
6932 (init_filename_times): Use get_run_time instead of my_get_run_time.
6933 (check_newline): Likewise.
6934 (dump_time_statistics): Likewise.
6935 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
6936 of computing elapsed time explicitly.
6938 2000-04-26 Mark Mitchell <mark@codesourcery.com>
6940 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
6941 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
6942 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
6943 before calling decl_constant_value.
6944 * class.c (check_bitfield_decl): Likewise.
6945 * cvt.c (ocp_convert): Likewise.
6946 (convert): Likewise.
6947 * decl.c (compute_array_index_type): Likewise.
6948 (build_enumerator): Likewise.
6949 * decl2.c (check_cp_case_value): Likewise.
6950 * pt.c (convert_nontype_argument): Likewise.
6952 * typeck.c (decay_conversion): Likewise.
6953 (build_compound_expr): Likewise.
6954 (build_reinterpret_cast): Likewise.
6955 (build_c_cast): Likewise.
6956 (convert_for_assignment): Likewise.
6958 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
6960 * decl.c (finish_function): Don't play games with DECL_INLINE.
6962 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
6964 * ir.texi: Correct typo.
6966 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6968 * decl.c (grokdeclarator): Reject VLAs as members.
6970 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
6972 * call.c (standard_conversion): Accept conversion between
6975 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
6977 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
6979 * decl2.c (finish_file): Remove double setup for accounting
6982 2000-04-24 Robert Lipe <robertlipe@usa.net>
6984 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
6986 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
6988 * new.cc (set_new_handler): Needs to be in std::.
6990 2000-04-23 Mark Mitchell <mark@codesourcery.com>
6992 * cp-tree.h (lang_decl): Remove pretty_function_p.
6993 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
6994 language-specific node.
6995 * decl.c (cp_make_fname_decl): Use build_decl, not
6996 build_lang_decl, to build the variables.
6997 (grokvardecl): Don't call build_lang_decl for local variables in
6999 (grokdeclarator): Don't call build_lang_decl for local type
7000 declarations in templates.
7001 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
7002 zero'd memory, rather than calling memset.
7003 * pt.c: Include hashtab.h.
7004 (local_specializations): New variable.
7005 (retrieve_local_specialization): Use it.
7006 (register_local_specialization): Likewise.
7007 (tsubst_decl): Don't assume local variables have
7009 (instantiate_decl): Set up local_specializations.
7010 * Makefile.in (HTAB_H): New variable.
7012 2000-04-23 Richard Henderson <rth@cygnus.com>
7014 * typeck.c (c_expand_asm_operands): Restore the original
7015 contents of the output list.
7017 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
7019 * ir.texi: Document complex number representation.
7021 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
7023 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
7024 (target_incomplete_p): New function.
7025 (tinfo_base_init): Create comdat NTBS name variable.
7026 (ptr_initializer): Add non_public parameter. Calculate it.
7027 (ptmd_initializer): Likewise.
7028 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
7029 (create_real_tinfo_var): Add non_public parameter. Use it.
7030 Push proxy into global namespace.
7031 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
7033 * inc/typeinfo (type_info::before, type_info::operator==):
7034 Compare __name addresses.
7036 * tinfo2.cc: Remove new-abi builtins comment.
7038 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
7040 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
7042 * call.c (joust): Exit early if we get the same function, too.
7044 * decl2.c (key_method): Return NULL_TREE for template classes.
7045 (import_export_class): Don't need to check for template classes.
7047 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
7049 * lex.c: Remove references to cccp.c.
7051 2000-04-18 Mark Mitchell <mark@codesourcery.com>
7053 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
7054 volatile_memfunc. Add destructor_attr. Adjust dummy.
7055 (DECL_DESTRUCTOR_P): Use destructor_attr.
7056 (DECL_CONST_MEMFUNC_P): Reimplement.
7057 (DECL_VOLATILE_MEMFUNC_P): Remove.
7058 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
7059 (overrides): Use DECL_DESTRUCTOR_P.
7060 (check_for_override): Likewise.
7061 * decl.c (start_function): Likewise.
7062 * decl2.c (grokfclassfn): Likewise.
7063 (check_classfn): Likewise.
7064 (grok_function_init): Likewise.
7066 2000-04-17 Mark Mitchell <mark@codesourcery.com>
7068 * decl2.c (grokfield): Issue error on illegal data member
7071 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
7073 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
7075 2000-04-16 Mark Mitchell <mark@codesourcery.com>
7077 * class.c (build_vtable_entry): Don't build thunks for type-info
7080 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
7082 * decl.c (decls_match): Allow a redeclaration of a builtin to
7083 specify args while the builtin did not.
7085 2000-04-15 Mark Mitchell <mark@codesourcery.com>
7087 * cp-tree.def (THUNK_DECL): Add to documentation.
7088 * cp-tree.h (flag_huge_objects): Declare.
7089 * class.c (modify_vtable_entry): Tidy.
7090 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
7091 Calculate delta appropriately for the new ABI.
7092 (dfs_modify_vtables): Use it.
7093 (modify_all_vtables): Fix thinko in code to add overriding copies
7094 of functions to primary vtables.
7095 (build_clone): Fix typo in comment.
7096 (clone_function_decl): Correct order of destructors in vtable.
7097 (build_vbase_offset_vtbl_entries): Adjust comment.
7098 (dfs_vcall_offset_queue_p): Remove.
7099 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
7100 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
7101 (build_vtable_entry): Correct check for pure virtual functions.
7102 Don't declare flag_huge_objects.
7103 * decl.c (flag_huge_objects): Remove declaration.
7104 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
7105 Use int_size_in_bytes.
7106 (emit_thunk): Handle vcall offset thunks.
7108 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7110 * decl2.c (parse_time, varconst_time): Delete declarations.
7111 (finish_file): Delete LINENO declaration.
7112 START_TIME and THIS_TIME now long.
7114 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
7116 * class.c (build_base_field): Reformat comment.
7118 * inc/cxxabi.h (stddef.h): Comment inclusion.
7119 (__base_class_info::__offset): Comment shift.
7121 2000-04-12 Mark Mitchell <mark@codesourcery.com>
7123 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
7124 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
7125 (cp_push_exception_identifier): New macro.
7126 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
7127 (DECL_BASE_DESTRUCTOR_P): Likewise.
7128 (DECL_DELETING_DESTRUCTOR_P): Likewise.
7129 (get_vtbl_decl_for_binfo): Fix formatting.
7130 (in_charge_arg_for_name): New macro.
7131 (maybe_build_cleanup_and_delete): Remove declaration.
7132 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
7133 (in_charge_arg_for_name): New function.
7134 (build_new_method_call): Use it. Handle cloned destructors.
7135 (build_clone): Don't make the base constructor virtual.
7136 Automatically defer generated functions.
7137 (clone_function_decl): Handle destructors, too.
7138 (clone_constructors_and_destructors): Likewise.
7139 (create_vtable_ptr): Don't create a vtable entry for a cloned
7141 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
7142 (initialize_predefined_identifiers): Update appropriately.
7143 (finish_destructor_body): Simplify.
7144 (maybe_build_cleanup_and_delete): Remove.
7145 * except.c (expand_throw): Handle new-ABI destructors.
7146 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
7147 (build_dtor_call): New function.
7148 (build_delete): Use it. Simplify.
7149 * optimize.c (maybe_clone_body): Handle destructors.
7150 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
7152 * exception.cc (cleanup_fn): New typedef.
7153 (CALL_CLEANUP): New macro.
7154 (cp_eh_info): Use them.
7155 (__cp_push_exception): Likewise.
7156 (__cp_pop_exception): Likewise.
7158 2000-04-11 Mark Mitchell <mark@codesourcery.com>
7160 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
7161 (complete_dtor_identifier): New macro.
7162 (CLASSTYPE_FIRST_CONVERSION): Remove.
7163 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
7164 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
7165 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
7166 (CLASSTYPE_CONSTRUCTORS): Likewise.
7167 (CLASSTYPE_DESTRUCTORS): Likewise.
7168 (lang_decl): Add cloned_function.
7169 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
7170 (DECL_BASE_CONSTRUCTOR_P): Likewise.
7171 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
7172 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
7173 (DECL_CLONED_FUNCTION_P): Likewise.
7174 (DECL_CLONED_FUNCTION): Likewise.
7175 (clone_function_decl): Declare.
7176 (maybe_clone_body): Likewise.
7177 * call.c (build_user_type_conversion_1): Call complete object
7178 constructors in the new ABI.
7179 (build_new_method_call): Don't add in-charge parameters under the
7181 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
7182 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
7183 CLASSTYPE_DESTRUCTOR_SLOT.
7184 (build_clone): New function.
7185 (clone_function_decl): Likewise.
7186 (clone_constructors_and_destructors): Likewise.
7187 (check_bases_and_members): Use it.
7188 * decl.c (iniitialize_predefined_identifiers): Initialize
7189 complete_dtor_identifier.
7190 (finish_function): Don't add extra code to a clone.
7191 (lang_mark_tree): Mark cloned_function.
7192 * decl2.c (mark_used): Don't bother trying to instantiate things
7194 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
7195 * method.c (set_mangled_name_for_decl): Don't treat clones as
7197 (synthesize_method): Sythesize cloned functions, not the clones.
7198 * optimize.c (inline_data): Update comment on ret_label.
7199 (remap_block): Don't assume DECL_INITIAL exists.
7200 (copy_body_r): Allow ret_label to be NULL.
7201 (maybe_clone_body): Define.
7202 * pt.c (tsubst_decl): Handle clones.
7203 (instantiate_clone): New function.
7204 (instantiate_template): Use it.
7205 (set_mangled_name_for_template_decl): Don't treat clones as
7207 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
7208 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
7209 * semantics.c (expand_body): Clone function bodies as necessary.
7211 * optimize.c (remap_decl): Avoid sharing structure for arrays
7212 whose size is only known at run-time.
7213 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
7215 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
7216 to has_in_charge_parm_p.
7217 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
7218 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
7219 (DECL_COPY_CONSTRUCTOR_P): New macro.
7220 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
7221 (build_user_type_conversion_1): Likewise.
7222 (convert_like_real): Likewise.
7223 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
7224 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
7225 (copy_args_p): Likewise.
7226 (grok_ctor_properties): Likewise.
7227 (start_function): Likewise.
7228 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
7229 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
7230 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
7231 * method.c (do_build_copy_constructor): Use
7232 DECL_HAS_IN_CHARGE_PARM_P.
7233 (synthesize_method): Likewise.
7234 * pt.c (instantiate_template): Remove goto.
7235 * tree.c (build_cplus_method_type): Remove mention of obstacks in
7238 * cp-tre.h (finish_function): Change prototype.
7239 * decl.c (end_cleanup_fn): Adjust caller.
7240 (finish_function): Take only one parameter.
7241 * decl2.c (finish_objects): Adjust caller.
7242 (finish_static_storage_duration_function): Likewise.
7243 * method.c (emit_thunk): Likewise.
7244 * parse.y: Likewise.
7245 * parse.c: Regenerated.
7246 * pt.c (instantiate_decl): Likewise.
7247 * rtti.c (synthesize_tinfo_fn): Likewise.
7248 * semantics.c (expand_body): Likewise.
7250 * cp-tree.h (copy_decl): New function.
7251 * class.c (finish_struct_1): Use it.
7252 * lex.c (copy_decl): Define it.
7253 * pt.c (tsubst_decl): Likewise.
7254 * tree.c (copy_template_template_parm): Likewise.
7256 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
7257 has_nonpublic_assign_ref.
7258 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
7259 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
7260 * class.c (finish_struct_methods): Don't set
7261 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
7262 (interface_only): Don't declare.
7263 (interface_unknown): Likewise.
7265 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7267 * tree.h (HAVE_TEMPLATES): Remove definition.
7268 * lang-options.h (-fthis-is-variable): Remove documentation.
7270 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
7272 * class.c (instantiate_type): Handle object-relative template-id.
7274 * semantics.c (finish_expr_stmt): Call convert_to_void here.
7275 * decl.c (cplus_expand_expr_stmt): Not here.
7277 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
7278 Initialize exprtype earlier.
7280 * parse.y (fn.def1): Check for defining types in return types.
7282 * decl.c (check_tag_decl): Notice extra fundamental types.
7283 Diagnose empty decls in classes, too.
7285 * decl.c (grokdeclarator): Don't override an anonymous name if no
7286 declarator was given.
7288 * cvt.c (convert_to_void): Call resolve_offset_ref.
7290 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
7292 * decl2.c (decl_namespace): Handle getting a type.
7294 * typeck.c (build_c_cast): Re-enable warning for cast between
7295 pointer and integer of different size.
7297 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
7299 * inc/cxxabi.h (__pointer_type_info): Add restrict and
7301 (__pointer_type_info::__pointer_catch): New virtual function.
7302 (__pointer_to_member_type_info): Derive from
7303 __pointer_type_info. Adjust.
7304 (__pointer_to_member_type_info::__do_catch): Remove.
7305 (__pointer_to_member_type_info::__is_pointer_p): Declare.
7306 (__pointer_to_member_type_info::__pointer_catch): Declare.
7307 * rtti.c (qualifier_flags): Add restrict flag.
7308 (ptmd_initializer): Reorder members.
7309 (create_tinfo_types): Expand comments. Reorder
7310 ptmd_desc_type_node members.
7311 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
7313 (__pointer_type_info::__do_catch): Move specific code into
7314 __pointer_catch. Call it.
7315 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
7316 specific catch checking. Fix void conversion check.
7317 (__pointer_to_member_type_info::__do_catch): Remove.
7318 (__pointer_to_member_type_info::__pointer_catch): Implement.
7320 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7322 * lex.c (init_parse): Remove traces of classof and headof.
7323 * decl2.c (flag_operator_names): Default to 1.
7324 (lang_decode_option): Do not set it for -ansi.
7326 2000-04-09 Mark Mitchell <mark@codesourcery.com>
7328 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
7329 (DECL_MAIN_VARIANT): Remove.
7330 * decl.c (duplicate_decls): Don't set it.
7331 (start_function): Likewise.
7332 (lang_mark_tree): Don't mark it.
7333 * decl2.c (defer_fn): Don't use it.
7334 * lex.c (retrofit_lang_decl): Don't set it.
7335 * pt.c (tsubst_decl): Likewise.
7336 * ptree.c (print_lang_decl): Don't print it.
7337 * typeck.c (mark_addressable): Don't use it.
7339 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
7341 * vec.cc: Include <new> and <exception>.
7342 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
7343 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
7345 (__cxa_vec_delete): Catch dtor exceptions.
7347 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
7349 Prepend __ to implementation defined names.
7350 * inc/typeinfo (type_info): Rename _name to __name.
7351 (type_info::type_info): Rename parameter.
7352 (type_info::operator==, type_info::operator!=,
7353 type_info::before): Likewise.
7354 (type_info::is_pointer_p, type_info::is_function_p,
7355 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
7358 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
7359 (__pointer_type_info::__pointer_type_info): Likewise.
7360 (__pointer_type_info::is_pointer_p,
7361 __pointer_type_info::do_catch): Prepend __. Rename parameters.
7362 (__array_type_info::__array_type_info): Rename parameters.
7363 (__function_type_info::__function_type_info): Likewise.
7364 (__function_type_info::is_function_p): Prepend __.
7365 (__enum_type_info::__enum_type_info): Rename parameters.
7366 (__pointer_to_member_type_info::__pointer_to_member_type_info):
7368 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
7370 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
7371 (__class_type_info::__class_type_info): Rename parameters.
7372 (__class_type_info::sub_kind): Prepend __. Adjust member names.
7373 (__class_type_info::upcast_result,
7374 __class_type_info::dyncast_result): Prepend __. Move definition
7376 (__class_type_info::do_upcast, __class_type_info::do_catch,
7377 __class_type_info::find_public_src,
7378 __class_type_info::do_dyncast,
7379 __class_type_info::do_find_public_src): Prepend __. Rename
7381 (__si_class_type_info::__si_class_type_info): Rename parameters.
7382 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
7383 __si_class_type_info::do_find_public_src): Prepent __. Rename
7385 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
7386 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
7387 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
7389 (__dynamic_cast): Rename parameters.
7390 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
7391 type_info::do_catch, type_info::do_upcast): Prepend __.
7392 (contained_p, public_p, virtual_p, contained_public_p,
7393 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
7394 (__class_type_info::do_catch,
7395 __class_type_info::do_upcast): Prepend __. Adjust.
7396 (__class_type_info::__upcast_result,
7397 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
7399 (__class_type_info::find_public_src): Prepend __. Adjust.
7400 (__class_type_info::do_find_public_src,
7401 __si_class_type_info::do_find_public_src,
7402 __vmi_class_type_info::do_find_public_src): Likewise.
7403 (__class_type_info::do_dyncast,
7404 __si_class_type_info::do_dyncast,
7405 __vmi_class_type_info::do_dyncast): Likewise.
7406 (__class_type_info::do_upcast,
7407 __si_class_type_info::do_upcast,
7408 __vmi_class_type_info::do_upcast): Likewise.
7409 (__dynamic_cast): Adjust.
7410 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
7411 (__function_type_info::is_function_p): Likewise.
7412 (__pointer_type_info::do_catch): Likewise. Adjust.
7413 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
7414 (__throw_type_match_rtti_2): Adjust.
7415 (__is_pointer): Adjust.
7417 2000-04-08 Mark Mitchell <mark@codesourcery.com>
7419 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
7420 (complete_ctor_identifier): New macro.
7421 (special_function_kind): Add sfk_copy_constructor and
7422 sfk_assignment_operator.
7423 (LOOKUP_HAS_IN_CHARGE): Remove.
7424 (cons_up_default_function): Rename to ...
7425 (implicitly_declare_fn): ... this.
7426 * call.c (build_new_method_call): Add in-charge parameters for
7428 * class.c (add_implicitly_declared_members): Change parameter name
7429 from cant_have_assignment to cant_have_const_assignment.
7430 Replace calls to cons_up_default_function to implicitly_declare_fn.
7431 * cvt.c (ocp_convert): Use complete_ctor_identifier.
7432 * decl.c (initialize_predefined_identifiers): Initialize it.
7433 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
7435 * init.c (expand_default_init): Don't calculate the in-charge
7437 (build_new_1): Likewise.
7438 * lex.c (cons_up_default_function): Move to method.c.
7439 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
7440 (implicitly_declare_fn): New function.
7441 * typeck.c (build_static_cast): Use complete_ctor_identifier.
7442 (build_modify_expr): Likewise.
7443 * typeck2.c (build_functional_cast): Likewise.
7445 Under the new ABI, constructors don't return `this'.
7446 * cp-tree.h (warn_reorder): Declare.
7447 (special_function_kind): New enum.
7448 (global_base_init_list): Remove declaration.
7449 (emit_base_init): Don't return a value.
7450 (check_base_init): Don't declare.
7451 (is_aggr_typedef): Likewise.
7452 * decl.c (check_special_function_return_type): New function.
7453 (return_types): Remove.
7454 (grokdeclarator): Use check_special_function_return_type.
7455 (start_function): Don't initialize ctor_label under the new ABI.
7456 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
7457 * init.c (begin_init_stmts): Move to top of file.
7458 (finish_init_stmts): Likewise.
7459 (warn_reorder): Don't declare.
7460 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
7462 (check_base_init): Remove.
7463 (is_aggr_typedef): Likewise.
7464 (build_new_1): Don't use the return value of a constructor.
7465 * semantics.c (setup_vtbl_ptr): Don't use the return value
7467 * typeck.c (check_return_expr): Don't magically convert return
7468 statements into `return this' in constructors under the new ABI.
7470 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
7471 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
7472 (base_ctor_identifier): New macro.
7473 (base_dtor_identifier): Likewise.
7474 (deleting_dtor_identifier): Likewise.
7475 * decl.c: Don't include obstack.h.
7476 (obstack_chunk_alloc): Don't define.
7477 (obstack_chunk_free): Likewise.
7478 (struct predefined_identifier): New type.
7479 (initialize_predefined_identifiers): New function.
7480 (init_decl_processing): Use it.
7481 (debug_temp_inits): Remove.
7482 (start_method): Don't call preserve_data.
7483 (hack_incomplete_structures): Update comment.
7484 * init.c (init_init_processing): Don't initialize
7486 (build_offset_rf): Remove dead code.
7487 (build_delete): Use CLASSTYPE_N_BASECLASSES.
7488 * search.c (init_search_processing): Don't initialize
7491 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7493 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
7494 some sign_compare warnings.
7496 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
7498 Rename abi::__vmi_class_type_info members.
7499 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
7500 base_list, detail_masks members to vmi_flags, vmi_base_count,
7501 vmi_bases and vmi_flags_masks respectively.
7502 (__vmi_class_type_info::vmi_flags_masks): Rename
7503 details_unknown_mask to flags_unknown_mask.
7504 * tinfo.cc (__class_type_info::do_upcast): Adjust.
7505 (__vmi_class_type_info::do_find_public_src): Adjust.
7506 (__vmi_class_type_info::do_dyncast): Adjust.
7507 (__vmi_class_type_info::do_upcast): Adjust.
7509 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
7511 * tinfo.cc (convert_to_base): New function.
7512 (get_vbase_offset): Remove. Move into convert_to_base.
7513 (__vmi_class_type_info::do_find_public_src): Adjust.
7514 (__vmi_class_type_info::do_dyncast): Adjust.
7515 (__vmi_class_type_info::do_upcast): Adjust.
7517 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
7519 * tinfo.cc (operator=): Use __builtin_strcmp.
7520 * tinfo2.cc (before): Likewise.
7522 2000-04-06 Mark Mitchell <mark@codesourcery.com>
7524 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
7525 (DECL_SAVED_INLINE): Rename to ...
7526 (DECL_DEFERRED_FN): ... this.
7527 (in_function_p): Remove declaration.
7528 (mark_inline_for_output): Rename to ...
7529 (defer_fn): ... this.
7530 * decl.c (finish_function): Adjust call to mark_inline_for_output.
7531 (in_function_p): Remove definition.
7532 * decl2.c (saved_inlines): Rename to ...
7533 (deferred_fns): ... this.
7534 (saved_inlines_used): Rename to ...
7535 (deferred_fns_used): ... this.
7536 (mark_inline_for_output): Rename to ...
7537 (defer_fn): ... this.
7538 (finish_file): Adjust accordingly.
7539 (init_decl2): Likewise.
7540 * lex.c (cons_up_default_function): Likewise.
7541 * pt.c (mark_decl_instantiated): Likewise.
7542 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
7544 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
7545 * semantics.c (expand_body): Defer more functions.
7547 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
7550 * Make-lang.in (CXX_LIB2FUNCS): Add it.
7552 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7553 __cxa_vec_delete): Declare.
7555 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
7557 * rtti.c (dfs_class_hint_mark): New static function.
7558 (dfs_class_hint_unmark): New static function.
7559 (class_hint_flags): Use them.
7561 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
7563 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
7565 2000-04-05 Mark Mitchell <mark@codesourcery.com>
7567 * cp-tree.h (instantiate_decl): Change prototype.
7568 * decl2.c (mark_used): Adjust call.
7569 * optimize.c (inlinable_function_p): Adjust handling of templates.
7570 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
7571 (do_type_instantiation): Likewise.
7572 (instantiate_decl): Defer more templates.
7573 (instantiate_pending_templates): Adjust logic to handle inline
7576 * Makefile.in (GGC_H): New variable. Use it throughout in place
7579 * call.c: Don't include obstack.h. Include ggc.h.
7580 (obstack_chunk_alloc): Don't define.
7581 (obstack_chunk_free): Likewise.
7582 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
7583 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
7584 (pop_switch): Free it.
7586 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
7588 * dump.c (dequeue_and_dump): Don't try to print the bit_position
7589 if we don't have a DECL_FIELD_OFFSET.
7591 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
7593 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
7596 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7598 * cfns.gperf (hash, libc_name_p): Prototype.
7600 * rtti.c (build_dynamic_cast_1): Constification.
7602 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
7604 * semantics.c (deferred_type_access_control): Prototype.
7606 2000-04-04 Mark Mitchell <mark@codesourcery.com>
7608 Correct many new ABI issues regarding vbase and vcall offset
7610 * cp-tree.h (BINFO_VTABLE): Document.
7611 (struct lang_type): Tweak formatting.
7612 (BINFO_PRIMARY_BINFO): Add to documentation.
7613 (CLASSTYPE_VSIZE): Fix typo in comment.
7614 (CLASSTYPE_VBASECLASSES): Update documentation.
7615 (BINFO_VBASE_MARKED): Remove.
7616 (SET_BINFO_VBASE_MARKED): Likewise.
7617 (CLEAR_BINFO_VBASE_MARKED): Likewise.
7618 (BINFO_FIELDS_MARKED): Remove.
7619 (SET_BINFO_FIELDS_MARKED): Likewise.
7620 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
7621 (enum access_kind): New enumeration.
7622 (num_extra_vtbl_entries): Remove declaration.
7623 (size_extra_vtbl_entries): Likewise.
7624 (get_vtbl_decl_for_binfo): New function.
7625 (dfs_vbase_unmark): Remove declaration.
7626 (mark_primary_bases): Likewise.
7627 * class.c (SAME_FN): Remove.
7628 (struct vcall_offset_data_s): Move definition.
7629 (build_vbase_pointer): Use `build', not `build_binary_op', to
7630 access the vbase pointer under the new ABI.
7631 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
7632 (build_primary_vtable): Likewise.
7633 (dfs_mark_primary_bases): Move here from search.c.
7634 (mark_primary_bases): Likewise.
7635 (determine_primary_bases): Under the new ABI, don't make a base
7636 class a primary base just because we don't yet have any virtual
7638 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
7639 (num_vfun_entries): Remove.
7640 (dfs_count_virtuals): Likewise.
7641 (num_extra_vtbl_entries): Likewise.
7642 (size_extra_vtbl_entries): Likewise.
7643 (layout_virtual_bases): Iterate in inheritance graph order under
7645 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
7646 indicate that a vfield is present.
7647 (init_class_processing): Initialize access_public_node, etc., from
7649 (get_vtbl_decl_for_binfo): New function.
7650 (dump_class_hierarchy_r): Likewise.
7651 (dump_class_hierarchy): Use it.
7652 (finish_vtbls): Build the vtbls in inheritance graph order.
7653 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
7654 (initialize_vtable): Use get_vtbl_decl_for_binfo.
7655 (accumulate_vtbl_inits): Add comments explaining why a pre-order
7657 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
7658 where the vptr points, even for primary vtables.
7659 (build_vtbl_initializer): Adjust handling of vbase and vcall
7661 (build_vcall_and_vbase_vtable_entries): New function.
7662 (dfs_build_vbase_offset_vtbl_entries): Remove.
7663 (build_vbase_offset_vtbl_entries): Reimplement.
7664 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
7665 were already handled in a primary base class vtable.
7666 (build_vcall_offset_vtbl_entries): Adjust.
7667 (build_rtti_vtbl_entries): Adjust.
7668 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
7669 * init.c (expand_virtual_init): Simplify.
7670 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
7671 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
7672 * search.c (BINFO_ACCESS): New macro.
7673 (SET_BINFO_ACCESS): Likewise.
7674 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
7675 (access_in_type): Likewise.
7676 (dfs_accessible_p): Likewise.
7677 (protected_accessible_p): Likewise.
7678 (lookup_fnfields_1): Adjust documentation.
7679 (dfs_mark_primary_bases): Move to class.c
7680 (mark_primary_bases): Likewise.
7681 (dfs_vbase_unmark): Remove.
7682 (virtual_context): Use BINFO_FOR_VBASE.
7683 (dfs_get_vbase_types): Simplify.
7684 (dfs_build_inheritance_graph_order): New function.
7685 (get_vbase_types): Use it.
7686 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
7688 * tinfo.cc (get_vbase_offset): New function.
7689 (__vmi_class_type_info::do_find_public_src): Use it.
7690 (__vmi_class_type_info::do_dyncast): Likewise.
7691 (__vmi_class_type_info::do_upcast): Likewise.
7693 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
7695 * lang-specs.h: Pass -fno-show-column to the preprocessor.
7697 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
7699 * rtti.c (class_hint_flags): Rename flags.
7700 (class_initializer): Remove flags.
7701 (synthesize_tinfo_var): Combine offset and flags. Add flags
7702 for __vmi_class_type_info.
7703 (create_tinfo_types): Remove flags from __class_type_info and
7704 __si_class_type_info. Merge flags and offset from
7705 base_class_type_info.
7706 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
7707 (__base_class_info::is_virtual_p): Adjust.
7708 (__base_class_info::is_public_p): Adjust.
7709 (__base_class_info::offset): New accessor.
7710 (__class_type_info::details): Remove member.
7711 (__class_type_info::__class_type_info): Lose details.
7712 (__class_type_info::detail_masks): Remove.
7713 (__si_class_type_info::__si_class_type_info): Lose details.
7714 (__vmi_class_type_info::details): New member.
7715 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
7716 (__vmi_class_type_info::detail_masks): New member.
7717 * tinfo.cc (__class_type_info::do_upcast): Initialize result
7718 with unknown_details_mask.
7719 (__vmi_class_type_info::do_find_public_src): Adjust
7720 (__vmi_class_type_info::do_dyncast): Adjust.
7721 (__vmi_class_type_info::do_upcast): Set result details, if
7723 (__dynamic_cast): Temporarily #if out optimization.
7725 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
7727 * rtti.c (get_tinfo_decl): Mark used.
7728 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
7729 mark as dealt with, if we output it.
7731 2000-03-28 Mark Mitchell <mark@codesourcery.com>
7733 * class.c: Reorganize to put virtual function table initialization
7734 machinery at the end of the file.
7736 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
7738 * class.c (finish_struct): Use bitsize_zero_node.
7739 * pt.c (instantiate_class_template): Likewise.
7741 2000-03-28 Mark Mitchell <mark@codesourcery.com>
7743 Put RTTI entries at negative offsets in new ABI.
7744 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
7745 vbase offset at index -3, not -1.
7746 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
7747 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
7748 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
7749 (build_rtti_vtbl_entries): New function.
7750 (set_rtti_entry): Remove.
7751 (build_primary_vtable): Don't use it.
7752 (build_secondary_vtable): Likewise.
7753 (start_vtable): Remove.
7754 (first_vfun_index): New function.
7755 (set_vindex): Likewise.
7756 (add_virtual_function): Don't call start_vtable. Do call
7758 (set_primary_base): Rename parameter.
7759 (determine_primary_base): Likewise.
7760 (num_vfun_entries): Don't use skip_rtti_stuff.
7761 (num_extra_vtbl_entries): Include RTTI information.
7762 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
7763 (skip_rtti_stuff): Remove.
7764 (dfs_modify_vtables): Don't use it.
7765 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
7766 (layout_nonempty_base_or_field): Update size handling.
7767 (create_vtable_ptr): Tweak.
7768 (layout_class_type): Adjust parameter names.
7769 (finish_struct_1): Simplify.
7770 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
7771 (skip_rtti_stuff): Remove.
7772 (first_vfun_index): New function.
7773 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
7774 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
7775 (marked_vtable_pathp): Declare.
7776 (unmarked_vtable_pathp): Likewise.
7777 * error.c (dump_expr): Use first_vfun_index to calculate vtable
7779 * rtti.c (build_headof): Look for RTTI at negative offsets.
7780 (get_tinfo_decl_dynamic): Likewise.
7781 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
7783 (create_pseudo_type_info): Do it here instead. Adjust so that
7784 vptr points at first virtual function.
7785 * search.c (marked_vtable_pathp): Make it global.
7786 (unmarked_vtable_pathp): Likewise.
7787 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
7788 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
7789 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
7790 (get_pure_virtuals): Likewise.
7791 (expand_upcast_fixups): Likewise.
7792 * tree.c (debug_binfo): Likewise.
7793 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
7796 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7798 * class.c (check_field_decl): Fix typo.
7799 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
7800 (check_methods): Likewise.
7801 (check_field_decls): Likewise.
7802 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
7803 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
7804 Use DECL_RESULT_FLD, not DECL_RESULT.
7805 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
7806 * lex.c (identifier_type): Likewise.
7807 * pt.c (determine_specialization, lookup_template_class): Likewise.
7808 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
7809 (resolve_overloaded_unification, more_specialized): Likewise.
7810 * semantics.c (finish_member_declaration): Likewise.
7811 * typeck.c (build_x_function_call): Likewise.
7813 2000-03-26 Mark Mitchell <mark@codesourcery.com>
7815 * class.c (layout_empty_base): Handle empty bases with non-byte
7817 (build_base_field): Likewise.
7818 (layout_virtual_bases): Likewise.
7820 * class.c (finish_struct_1): Fix typo in this change:
7822 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7824 2000-03-25 Mark Mitchell <mark@codesourcery.com>
7826 * decl.c (grokdeclarator): Count partial specializations when
7827 keeping track of how many template classes have been seen.
7829 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
7831 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7833 * class.c (build_vbase_pointer_fields): layout_field now place_field.
7834 (get_vfield_offset): Use byte_position.
7835 (set_rtti_entry): Set OFFSET to ssizetype zero.
7836 (get_binfo_offset_as_int): Deleted.
7837 (dfs_record_base_offsets): Use tree_low_cst.
7838 (dfs_search_base_offsets): Likewise.
7839 (layout_nonempty_base_or_field): Reflect changes in RLI format
7840 and call byte_position.
7841 (layout_empty_base): Convert offset to ssizetype.
7842 (build_base_field): use rli_size_unit_so_far.
7843 (dfs_propagate_binfo_offsets): Do computation in proper type.
7844 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
7845 (layout_class_type): Reflect changes in RLI names and fields.
7846 (finish_struct_1): Set DECL_FIELD_OFFSET.
7847 * dump.c (dequeue_and_dump): Call bit_position.
7848 * expr.c (cplus_expand_constant): Use byte_position.
7849 * rtti.c (expand_class_desc): Use bitsize_one_node.
7850 * typeck.c (build_component_addr): Use byte_position and don't
7851 special case for zero offset.
7853 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
7855 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
7857 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
7859 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
7862 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7864 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
7866 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
7867 make_typename_type, check_initializer, cp_finish_decl,
7868 xref_tag): Likewise.
7869 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
7870 decl_namespace, arg_assoc_template_arg, arg_assoc,
7871 validate_nonmember_using_decl, do_class_using_decl): Likewise.
7872 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
7873 args_to_string): Likewise.
7874 * friend.c (is_friend): Likewise.
7875 * lex.c (note_got_semicolon, note_list_got_semicolon,
7876 is_global): Likewise.
7877 * method.c (build_overload_nested_name, build_overload_value,
7878 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
7879 * parse.y (typename_sub, typename_sub1): Likewise.
7880 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
7881 process_partial_specialization, convert_template_argument,
7882 template_args_equal, add_pending_template, lookup_template_class,
7883 for_each_template_parm_r, maybe_fold_nontype_arg,
7884 tsubst, instantiate_template, type_unification_real, unify,
7885 instantiate_pending_templates, set_mangled_name_for_template_decl):
7887 * repo.c (repo_get_id, repo_template_used): Likewise.
7888 * search.c (lookup_field_1): Likewise.
7889 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
7890 * xref.c (classname): Likewise.
7892 2000-03-22 Mark Mitchell <mark@codesourcery.com>
7894 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
7895 (CANONICAL_BINFO): New macro.
7896 (BINFO_NEW_VTABLE_MARKED): Use it.
7897 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
7898 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
7899 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
7901 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7902 (build_secondary_vtable): Likewise.
7903 (dfs_finish_vtbls): Likewise.
7904 (dfs_accumulate_vtbl_inits): Likewise.
7905 (accumulate_vtbl_inits): New function.
7906 (finish_vtbls): Make sure that virtual bases come after
7907 non-virtual bases in the vtable group.
7908 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
7909 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7910 * search.c (struct vbase_info): Move definition.
7911 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7912 (unmarked_new_vtable_p): Likewise.
7913 (dfs_mark_vtable_path): Remove.
7914 (dfs_mark_new_vtable): Remove.
7915 (dfs_unmark_new_vtable): Likewise.
7916 (dfs_clear_search_slot): Likewise.
7917 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7918 (dfs_clear_vbase_slots): Likewise.
7919 (init_vbase_pointers): LIkewise.
7921 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
7923 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
7924 SIZETYPE to a non-SIZETYPE.
7926 2000-03-21 Mark Mitchell <mark@codesourcery.com>
7928 * class.c (layout_virtual_bases): Adjust names in conditionally
7931 * class.c (record_base_offsets): New function.
7932 (layout_conflict_p): Likewise.
7933 (layout_nonempty_base_or_field): Use it.
7934 (layout_empty_base): New function.
7935 (build_base_field): Use it.
7936 (build_base_fields): Update comment.
7937 (layout_virtual_bases): Fold in a little code form
7938 layout_basetypes. Use layout_empty_base.
7939 (layout_basetypes): Remove.
7940 (end_of_class): New function.
7941 (layout_class_type): Use it. Adjust.
7943 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
7945 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
7947 (dfs_skip_nonprimary_vbases_markedp): Likewise.
7948 * typeck.c (fntype_p): Remove.
7950 * cp-tree.h (TI_SPEC_INFO): Remove.
7951 (CLASSTYPE_TI_SPEC_INFO): Likewise.
7952 * pt.c (process_partial_specialization): Likewise.
7954 * class.c (build_base_field): Fix thinko in computation of binfo
7957 * tree.c (mark_local_for_remap_p): Mark variables declared in
7958 TARGET_EXPRs as well.
7960 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
7962 * typeck.c (require_complete_type, complete_type,
7963 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
7964 build_array_ref, convert_arguments, pointer_diff,
7965 build_x_unary_op, build_unary_op, build_c_cast,
7966 build_modify_expr): Use COMPLETE_TYPE_P etc.
7967 * call.c (is_complete, convert_like_real,
7968 build_new_method_call): Likewise.
7969 * class.c (build_vbase_pointer_fields, check_bases,
7970 build_base_field, finish_struct_1, pushclass): Likewise.
7971 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
7972 * decl.c (maybe_process_template_type_declaration, pushtag,
7973 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
7974 layout_var_decl, check_initializer, cp_finish_decl,
7975 grokdeclarator, require_complete_types_for_parms,
7976 grok_op_properties, xref_tag, xref_basetypes,
7977 check_function_type): Likewise.
7978 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
7979 * friend.c (do_friend): Likewise.
7980 * init.c (build_offset_ref): Likewise.
7981 * parse.y (structsp): Likewise.
7982 * pt.c (maybe_process_partial_specialization,
7983 tsubst_friend_function, instantiate_class_template, tsubst,
7984 do_type_instantiation, instantiate_pending_templates): Likewise.
7985 * repo.c (repo_get_id): Likewise.
7986 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
7987 synthesize_tinfo_var, emit_support_tinfos): Likewise.
7988 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
7989 * semantics.c (begin_class_definition): Likewise.
7990 * tree.c (build_cplus_method_type): Likewise.
7991 * typeck2.c (digest_init, build_functional_cast,
7992 add_exception_specifier): Likewise.
7993 * parse.h, parse.c: Regenerated.
7995 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
7997 * inc/cxxabi.h: New header file. Define new-abi entry points.
7998 (__pointer_type_info::target): Rename member to ...
7999 (__pointer_type_info::type): ... here.
8000 (__base_class_info::type): Rename member to ...
8001 (__base_class_info::base): ... here.
8002 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
8003 * cp-tree.h (CPTI_ABI): New global tree enumeration.
8004 (abi_node): New global tree node.
8005 * decl.c (abi_node): Document.
8006 (init_decl_processing): Initialize abi_node.
8007 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
8008 (get_vmi_pseudo_type_info): Likewise.
8009 (create_tinfo_types): Likewise.
8010 (emit_support_tinfos): Likewise.
8011 * tinfo.h (cxxabi.h): Include for new-abi.
8012 Move rtti class definitions to new header file.
8013 * tinfo.cc (abi): Use the namespace.
8014 (std): Move new abi rtti classes from here ...
8015 (__cxxabiv1): ... to here.
8016 * tinfo2.cc (cxxabi.h): Include for new-abi.
8017 Move rtti class definitions to new header file.
8018 (std): Move new abi rtti classes from here ...
8019 (__cxxabiv1): ... to here.
8020 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
8023 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
8024 Jason Merrill <jason@casey.cygnus.com>
8026 * method.c (build_overload_int): Use host_integerp.
8028 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
8030 * init.c (build_offset_ref): Handle the case of a templated member
8033 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8035 * except.c (expand_exception_blocks): Clear catch_clauses_last.
8037 2000-03-18 Mark Mitchell <mark@codesourcery.com>
8039 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
8040 * class.c (check_bitfield_decl): Turn illegal bitfields into
8042 (dfs_propagate_binfo_offsets): Adjust for new size_binop
8044 (dfs_offset_for_unshared_vbases): Likewise.
8045 * cvt.c (cp_convert_to_pointer): Convert NULL to a
8046 pointer-to-member correctly under the new ABI.
8047 * expr.c (cplus_expand_constant): Don't use cp_convert when
8048 turning an offset into a pointer-to-member.
8049 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
8050 when dereferencing them under the new ABI.
8051 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
8052 of pointers-to-members under the new ABI.
8054 * class.c (check_bitfield_decl): Remove restriction on really long
8056 (layout_class_type): Implement new ABI handling of bitfields
8057 longer than their types.
8059 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8061 * parse.y (extdefs): Call ggc_collect.
8062 * parse.c: Regenerated.
8064 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
8066 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
8067 (note_name_declared_in_class): Use OVL_CURRENT to get at a
8070 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8072 * class.c (build_vbase_path): Use integer_zerop.
8073 (build_vtable_entry): Use tree_low_cst.
8074 (get_vfield_offset): Use bit_position.
8075 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
8077 (check_bitfield_decl): Set DECL_SIZE using convert.
8078 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
8079 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
8081 (finish_struct_1): Use bit_position.
8082 (dump_class_hierarchy): Use tree_low_cst.
8083 * cp-tree.h (min_precision): Add declaration.
8084 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
8085 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
8086 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
8087 * expr.c (cplus_expand_constant): Use bit_position.
8088 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
8089 * rtti.c (get_base_offset): Use bit_position.
8090 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
8091 host_integerp, and tree_low_cst.
8092 (pointer_int_sum): Use integer_zerop.
8093 (build_component_addr): Use bit_position.
8095 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
8097 * typeck.c (require_complete_type): Don't assume size_zero_node.
8098 (complete_type_or_else): Likewise.
8100 2000-03-16 Steven Grady <grady@digitaldeck.com>
8101 Jason Merrill <jason@casey.cygnus.com>
8103 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
8105 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
8107 * decl2.c (grokfield): Bail out if type is error_mark_node.
8109 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
8111 * tinfo2.cc (__ptr_to_member_data): Rename to ...
8112 (__pointer_to_member_data): ... here. Adjust.
8113 * rtti.c (create_tinfo_types): Adjust.
8115 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
8117 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
8118 * decl.c (ref_desc_type_node): Undocument.
8119 * rtti.c (ptr_ref_initializer): Rename to ...
8120 (ptr_initializer): ... here. Adjust comments.
8121 (ptmd_initializer): Fix comment thinko.
8122 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
8123 (create_tinfo_types): Remove ref_desc_type_node init.
8124 * tinfo2.cc (__reference_type_info): Remove.
8126 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
8128 * decl.c (cp_finish_decl): Remove obsolete comment.
8130 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
8132 2000-03-14 Mark Mitchell <mark@codesourcery.com>
8134 * cp-tree.h: Tweak documentation.
8135 * class.c (build_vbase_pointer_fields): Layout the fields, too.
8136 (avoid_overlap): Remove.
8137 (get_binfo_offset_as_int): New function.
8138 (dfs_serach_base_offsets): Likewise.
8139 (layout_nonempty_base_or_field): Likewise.
8140 (build_base_field): Layout fields here. Avoid placing two objects
8141 of the same type at the same address, under the new ABI.
8142 (build_base_fields): Adjust accordingly.
8143 (create_vtable_ptr): Return the new field, but don't attach it to
8145 (remove_base_field): Remove.
8146 (remove_base_fields): Remove.
8147 (layout_basetypes): Adjust accordingly.
8148 (layout_class_type): Call layout_field for each field, rather than
8149 just making a wholesale call to layout_type.
8151 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
8153 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
8155 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
8157 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
8159 * except.c (dtor_nothrow): New fn.
8160 (do_pop_exception): Use it. Take type parm.
8161 (push_eh_cleanup): Take type parm.
8162 (expand_start_catch_block): Pass it.
8163 (build_eh_type_type_ref): Accept null type.
8165 2000-03-12 Mark Mitchell <mark@codesourcery.com>
8167 * cp-tree.h (revert_static_member_fn): Change prototype.
8168 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
8169 (grok_op_properties): Likewise.
8170 (start_function): Likewise.
8171 (revert_static_member_fn): Simplify.
8172 * pt.c (check_explicit_specialization): Adjust call to
8173 revert_static_member_fn.
8175 2000-03-11 Mark Mitchell <mark@codesourcery.com>
8177 * cp-tree.h (scope_kind): New type.
8178 (tmpl_spec_kind): Likewise.
8179 (declare_pseudo_global_level): Remove.
8180 (pseudo_global_level_p): Rename to template_parm_scope_p.
8181 (pushlevel): Remove declaration.
8182 (begin_scope): New function.
8183 (finish_scope): Likewise.
8184 (current_tmpl_spec_kind): Likewise.
8185 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
8186 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
8187 Add template_spec_p.
8188 (toplevel_bindings_p): Adjust.
8189 (declare_pseudo_global_level): Remove.
8190 (pseudo_global_level_p): Rename to template_parm_scope_p.
8191 (current_tmpl_spec_kind): New function.
8192 (begin_scope): Likewise.
8193 (finish_scope): Likewise.
8194 (maybe_push_to_top_level): Adjust.
8195 (maybe_process_template_type_declaration): Likewise.
8196 (pushtag): Likewise.
8197 (pushdecl_nonclass_level): Likewise.
8198 (lookup_tag): Likewise.
8199 (grokfndecl): Handle member template specializations. Share
8200 constructor and non-constructor code.
8201 * decl2.c (check_classfn): Handle member template specializations.
8202 * pt.c (begin_template_parm_list): Use begin_scope.
8203 (begin_specialization): Likewise.
8204 (end_specialization): Likewise.
8205 (check_explicit_specialization): Use current_tmpl_spec_kind.
8206 Handle member template specializations.
8207 (end_template_decl): Use finish_scope. Remove call to
8209 (push_template_decl_real): Remove bogus error message.
8210 (tsubst_decl): Fix typo in code contained in comment.
8211 (instantiate_template): Handle member template specializations.
8212 (most_general_template): Likewise.
8214 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
8216 * lex.c (whitespace_cr): Compress consecutive calls to warning().
8217 (do_identifier): Ditto for error().
8219 * pt.c (convert_nontype_argument): Ditto for cp_error().
8220 (convert_template_argument): Ditto for cp_pedwarn().
8222 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
8224 * exception.cc (__check_null_eh_spec): New fn.
8225 * except.c (expand_end_eh_spec): Call it if the spec is throw().
8227 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
8229 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
8230 * except.c (expand_end_eh_spec): Add the return type.
8231 * rtti.c (throw_bad_cast): Add the parmtypes.
8232 (throw_bad_typeid): Likewise.
8234 * semantics.c (expand_stmt): Only leave out rtl for unused
8235 artificials, and set DECL_IGNORED_P on them as well.
8236 * decl.c (wrapup_globals_for_namespace): Likewise.
8238 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
8240 * decl.c (maybe_commonize_var): Skip all artificial decls.
8241 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
8243 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
8245 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
8246 * cp-tree.h: Declare flag_enforce_eh_specs.
8247 * decl.c (store_parm_decls, finish_function): Check it.
8249 C library functions don't throw.
8250 * Makefile.in (cfns.h): New target.
8251 (except.o): Depend on it.
8252 * Make-lang.in (cc1plus): Depend on cfns.gperf.
8253 * cfns.gperf: New file.
8254 * cfns.h: Generated.
8255 * except.c: Include it.
8256 (nothrow_libfn_p): New fn.
8257 * decl.c (grokfndecl): Use it.
8258 * cp-tree.h: Declare it.
8260 * decl.c (push_overloaded_decl_1, auto_function,
8261 define_function): Lose.
8262 (build_library_fn_1): New static fn.
8263 (builtin_function): Use it.
8264 (get_atexit_node): Use build_library_fn_ptr.
8265 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
8266 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
8267 push_void_library_fn, push_throw_library_fn): New fns.
8268 * cp-tree.h: Declare them.
8269 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
8270 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
8271 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
8272 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
8273 * rtti.c (build_runtime_decl): Lose.
8274 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
8275 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
8276 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
8278 * call.c (build_call): Remove result_type parm.
8279 Call mark_used on unused artificial fns.
8280 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
8282 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
8284 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
8286 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
8287 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
8288 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
8289 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
8290 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8291 expand_generic_desc): Likewise.
8293 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8295 * exception.cc (__cp_pop_exception): Cleanup the original object.
8297 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8299 * decl.c (grok_op_properties): Merge conversion to void warning
8300 with other silly op warnings.
8302 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
8304 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
8305 array CONSTRUCTOR elements. Don't use expr_tree_cons.
8307 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8309 * decl.c (cp_make_fname_decl): New function.
8310 (wrapup_globals_for_namespace): Don't emit unused static vars.
8311 (init_decl_processing): Remove comment about use of
8312 array_domain_type. Set make_fname_decl.
8313 (cp_finish_decl): Remove __FUNCTION__ nadgering.
8314 * semantics.c (begin_compound_stmt): Remove
8315 current_function_name_declared flagging.
8316 (expand_stmt): Don't emit unused local statics.
8317 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
8320 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8322 * typeck.c (convert_for_assignment): Don't look at array
8324 * call.c (convert_like_real): Likewise.
8326 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
8328 Add initial support for '\uNNNN' specifier.
8329 * lex.c (read_ucs): New fn.
8330 (readescape, skip_white_space): Call it.
8331 (is_extended_char, is_extended_char_1): New fns.
8332 (utf8_extend_token): New fn, #if 0'd out.
8333 (real_yylex): Treat extended chars like letters.
8335 * search.c (note_debug_info_needed): Walk the bases even if we
8336 weren't deferring the type itself.
8338 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8340 * decl2.c (finish_objects): Constify a char*.
8342 * method.c (emit_thunk): Likewise.
8344 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
8346 * typeck.c (dubious_conversion_warnings): Look through
8349 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8351 * class.c (dfs_modify_vtables): I is now unsigned.
8352 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
8353 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
8354 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
8355 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8356 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
8357 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
8358 Call integer_all_onesp.
8359 * typeck2.c (process_init_constructor): Use compare_tree_int.
8361 * lang-specs.h (as): Don't call if -syntax-only.
8363 2000-03-06 Mark Mitchell <mark@codesourcery.com>
8365 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
8366 RTL_EXPR_HAS_NO_SCOPE after all.
8368 2000-03-05 Mark Mitchell <mark@codesourcery.com>
8370 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
8371 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
8372 RTL_EXPR_HAS_NO_SCOPE.
8374 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
8377 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
8379 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
8381 * call.c (convert_like): Macrofy.
8382 (convert_like_with_context): New macro.
8383 (convert_like_real): Renamed from convert_like. Add calling
8384 context parameters, for diagnostics. Add recursive flag. Call
8385 dubious_conversion_warnings for outer conversion.
8386 (build_user_type_conversion): Use convert_like_with_context.
8387 (build_over_call): Likewise. Don't warn about dubious
8388 conversions here. Adjust convert_default_arg calls.
8389 (convert_default_arg): Add context parameters for diagnostics.
8390 Pass throught to convert_like_with_context.
8391 * cp-tree.h (convert_default_arg): Add context parameters.
8392 (dubious_conversion_warnings): Prototype new function.
8393 * typeck.c (convert_arguments): Adjust convert_default_arg call.
8394 (dubious_conversion_warnings): New function, broken
8395 out of convert_for_assignment.
8396 (convert_for_assignment): Adjust.
8398 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
8400 * decl2.c (key_method): Break out from...
8401 (import_export_vtable, import_export_class): ...here.
8403 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
8404 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
8406 * search.c (note_debug_info_needed, dfs_debug_mark,
8407 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
8408 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
8410 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
8412 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
8415 2000-03-02 Mark Mitchell <mark@codesourcery.com>
8417 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
8418 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
8419 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
8420 (lang_type): Split gets_new into has_new and has_array_new.
8421 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8422 (TYPE_GETS_NEW): Split into ...
8423 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
8424 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
8425 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
8426 (build_op_new_call): Don't declare.
8427 (build_new_1): Likewise.
8428 * call.c (build_op_new_call): Remove.
8429 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
8430 instead of TYPE_NEEDS_DESTRUCTOR.
8431 (finish_struct_bits): Likewise.
8432 (add_implicitly_declared_members): Likewise.
8433 (check_field_decl): Likewise.
8434 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
8435 correctly under the new ABI.
8436 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
8437 instead of TYPE_NEEDS_DESTRUCTOR.
8438 (initialize_local_var): Likewise.
8439 (destroy_local_var): Likewise.
8440 (cp_finish_decl): Likewise.
8441 (register_dtor_fn): Likewise.
8442 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
8443 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
8444 TYPE_VEC_DELETE_TAKES_SIZE here.
8445 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
8446 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
8447 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8448 (finish_destructor_body): Likewise.
8449 (maybe_build_cleanup_1): Likewise.
8450 * decl2.c (do_static_destruction): Likewise.
8451 * init.c (build_new_1): Make it static.
8452 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8453 (expand_cleanup_for_base): Likewise.
8454 (get_cookie_size): New function.
8455 (build_new_1): Handle array-new cookies correctly under the new
8457 (build_vec_delete_1): Likewise.
8458 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8459 (build_delete): Likewise.
8460 (build_vec_delete): Handle array-new cookies correctly under the new
8462 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8463 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
8464 TYPE_HAS_ARRAY_NEW_OPERATOR.
8465 * ptree.c (print_lang_type): Check them.
8466 * search.c (context_for_name_lookup): Fix typo in comment.
8467 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8468 * tree.c (break_out_cleanups): Likewise.
8469 (build_cplus_array_test_1): Likewise.
8470 (cp_build_qualified_type_real): Likewise.
8471 * typeck.c (complete_type): Likewise.
8473 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
8474 the command-line, not the end.
8476 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
8478 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
8480 2000-03-02 Tom Tromey <tromey@cygnus.com>
8482 * cp-tree.h (build_java_class_ref): Declare.
8483 * init.c (build_java_class_ref): No longer static.
8484 * except.c (expand_throw): Generate a Java-style `throw' if the
8485 thrown object is a "Java" object.
8486 (initialize_handler_parm): Generate a Java-style lookup of
8487 exception info if the caught object is a "Java" object.
8488 (catch_language, catch_language_init): New globals.
8489 (decl_is_java_type): New function.
8490 (expand_start_catch_block): Don't call push_eh_info() or
8491 push_eh_cleanup() when handling a Java-style "catch". Pass Java
8492 class reference to build_catch_block.
8494 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8496 * typeck.c (comptypes): Treat sizetype like its language equivalent.
8498 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
8500 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
8501 to merge reference/pointer code and fix incorrect warnings.
8503 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
8505 * search.c (protected_accessible_p): Use context_for_name_lookup.
8507 * init.c (construct_virtual_bases): Fix thinko.
8508 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
8510 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
8512 * decl.c (current_function_decl): Move to toplev.c.
8514 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
8516 * pt.c (fn_type_unification): Unify return type, whenever
8518 (get_bindings_real): Only pass return type when necessary.
8519 Remove explicit return type check.
8520 * class.c (resolve_address_of_overloaded_function): Pass desired
8521 return type to fn_type_unification.
8523 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8525 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
8527 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
8529 * rtti.c (expand_class_desc): Likewise.
8530 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
8531 (THUNK_VCALL_OFFSET): Likewise.
8532 (THUNK_DELTA): Reflect changes in ../tree.h.
8534 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
8536 * search.c (protected_accessible_p): Also allow the access if
8537 the member is public in DERIVED. Lose TYPE parm.
8538 (friend_accessible_p): Lose TYPE parm.
8539 (accessible_p): Adjust.
8541 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8543 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
8544 on things that are not sizes; ssize_binop deleted.
8545 Call size_diffop when appropriate.
8546 (dfs_build_vcall_offset_vtbl_entries): Likewise.
8547 (build_primary_vtable, build_secondary_vtable): Likewise.
8548 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
8549 Variable I is HOST_WIDE_INT.
8550 (get_vfield_offset): Pass proper types to size_binop.
8551 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
8552 (finish_struct_1): Likewise.
8553 (skip_rtti_stuff): Arg N is now pointer to signed.
8554 (layout_class_type): Use size_zero_node.
8555 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
8556 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
8557 * decl.c (complete_arry_type): Pass proper types to size_binop.
8558 (xref_basetypes): BINFO_OFFSET is sizetype.
8559 * error.c (dump_expr): Don't use size_binop non-sizes.
8560 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
8561 * init.c (construct_virtual_bases): Fix type error.
8562 (build_vec_delete_1): Pass proper type to size_binop and don't
8564 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
8565 * rtti.c (get_base_offset): Pass proper type to size_binop.
8566 * search.c (dfs_find_vbases): Fix type error.
8567 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
8568 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
8569 * tree.c (debug_binfo): Variable N is signed.
8570 Use HOST_WIDE_INT_PRINT_DEC.
8571 * typeck.c (comptypes): sizetype is same as equivalent integer type.
8572 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
8573 size_one_node and size_zero_node.
8574 (c_alignof): Use size_one_node.
8575 (build_component_addr): Pass proper types to size_binop.
8576 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
8578 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
8580 Implement class scope using-declarations for functions.
8581 * class.c (handle_using_decl): Call add_method for used functions.
8582 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
8583 (add_method): Used functions are hidden by local functions.
8584 (check_bases_and_members): Handle using-decls before finalizing
8585 CLASSTYPE_METHOD_VEC.
8586 * call.c (add_function_candidate): Add ctype parm; if non-zero,
8587 override the type of 'this' accordingly.
8588 (add_template_candidate, add_template_candidate_real): Add ctype parm.
8589 (convert_class_to_reference, build_user_type_conversion_1,
8590 build_new_function_call, build_object_call, build_new_op,
8591 build_new_method_call): Pass ctype parm.
8593 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
8595 * call.c (convert_class_to_reference, build_user_type_conversion_1,
8596 build_new_function_call, build_object_call, build_new_op,
8597 build_new_method_call, build_op_delete_call): Don't get basetype_path
8599 * typeck.c (build_component_ref): Likewise.
8600 * init.c (build_offset_ref): Likewise.
8601 (resolve_offset_ref): Don't call enforce_access.
8602 Call build_scoped_ref.
8603 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
8604 would cause an error or if -pedantic.
8605 * class.c (alter_access): Lose binfo parm.
8607 2000-02-26 Mark Mitchell <mark@codesourcery.com>
8609 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
8612 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
8614 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
8615 pseudo_type_info creation into the std namespace
8617 2000-02-26 Mark Mitchell <mark@codesourcery.com>
8619 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
8620 (import_export_class): Remove declaration.
8621 * decl2.c (import_export_class): Make it static.
8622 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
8623 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
8624 EXPR_WITH_FILE_LOCATION.
8625 * lex.c (check_newline): Tweak filename/lineno setting.
8626 * semantics.c (begin_while_stmt): Fix typo in comment.
8628 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8630 * lang-options.h (-fmessage-length=): Add missing option.
8632 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
8634 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
8636 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
8638 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
8640 * optimize.c (expand_call_inline): Emit the return label before
8641 evaluating the return value.
8643 2000-02-24 Mark Mitchell <mark@codesourcery.com>
8645 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
8646 than duplicating functionality here.
8647 * optimize.c: Include input.h.
8648 (expand_call_inline): Use push_srcloc and pop_srcloc.
8649 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
8650 * parse.c: Regenerated.
8651 * Makefile.in (lex.o): Depend on input.h.
8652 (optimize.o): Likewise.
8654 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
8656 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
8657 function type, rather than ICE.
8659 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
8661 * decl.c (grokdeclarator): Call decl_type_access_control.
8662 * parse.y (parse_end_decl): Don't call decl_type_access_control if
8665 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
8667 * decl.c (decls_match): Remove obsolete static member nadgering.
8669 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8671 * decl.c (grokdeclarator): Change ANSI to ISO.
8672 * lex.c (consume_string, readescape, do_identifier): Likewise.
8673 (parse_float, real_yylex): Likewise.
8674 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
8675 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
8676 new_type_id, maybe_label_decls, simple_stmt,
8677 for.init.statement): Likewise.
8678 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
8679 * semantics.c (finish_named_return_value): Likewise.
8680 * parse.c: Regenerate.
8682 2000-02-21 Mark Mitchell <mark@codesourcery.com>
8684 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
8685 (CPTI_CLASS_STAR_TYPE): Remove.
8686 (vtable_index_type): Likewise.
8687 (class_star_type_node): Remove.
8688 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
8689 (build_binary_op_nodefault): Remove.
8690 * call.c (build_new_op): Use build_binary_op instead of
8691 build_binary_op_nodefault.
8692 * decl.c (init_decl_processing): Remove class_star_type_node
8693 initialization. Make delta_type_node ptrdiff_type_node under the
8694 new ABI. Initialize vtable_index_type.
8695 (build_ptrmemfunc_type): Build different structures for the new
8697 (build_enumerator): Use build_binary_op instead of
8698 build_binary_op_nodefault.
8699 * method.c (build_overload_value): Mangle pointers-to-members
8700 appropriately under the new ABI.
8701 * typeck.c (build_array_ref): Use build_binary_op instead of
8702 build_binary_op_nodefault.
8703 (get_member_function_from_ptrfunc): Adjust for the new ABI.
8704 (build_binary_op_nodefault): Rename to ...
8705 (build_binary_op): ... this. Remove old version. Adjust for
8706 pointer-to-member comparisons under the new ABI.
8707 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
8708 (build_ptrmemfunc): Adjust for the new ABI.
8709 (expand_ptrmemfunc_cst): Likewise.
8710 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
8711 (pfn_from_ptrmemfunc): Adjust for the new ABI.
8713 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
8715 * call.c (build_object_call): Compress consecutive calls to
8717 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
8718 (build_op_delete_call): Adjust message formatting.
8720 * class.c (check_bases): Compress consecutive calls to
8722 (finish_struct_anon): Say 'ISO C++'.
8724 * decl.c (start_decl): Same here.
8725 (grok_reference_init): Likewise.
8726 (grokfndecl): Correct message formatting.
8727 (grokfndecl): Improve diagnostic.
8728 (check_static_variable_definition): Likewise. Say 'ISO C++'
8729 (compute_array_index_type): Say 'ISO C++'
8730 (create_array_type_for_decl): Compress consecutive calls to
8732 (grokdeclarator): Say 'ISO C++'
8733 (grok_op_properties): Likewise.
8735 * decl2.c (delete_sanity): Clairify diagnostic.
8736 (check_member_template): Same here.
8737 (grok_function_init): Use consistent terminology.
8739 * expr.c (do_case): Say 'ISO C++'
8741 * friend.c (do_friend): Compress consecutive calls to warning.
8743 2000-02-20 Mark Mitchell <mark@codesourcery.com>
8745 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
8746 * class.c (build_secondary_vtable): Reorganize. Don't create a
8747 new vtable under the new ABI.
8748 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
8750 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
8751 the initializing elements.
8752 (initialize_vtable): New function.
8753 (dfs_finish_vtbls): Use it.
8754 (dfs_accumulate_vtbl_inits): New function.
8755 (finish_vtbls): Merge primary and secondary vtables under the new
8757 (finish_struct_1): Remove redundant call to layout_vtable_decl.
8758 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
8761 * class.c (build_vtable): New function, split out from ...
8762 (get_vtable_decl): ... here, and ...
8763 (build_secondary_vtable): ... here.
8765 * pt.c (tsubst_decl): Fix formatting.
8767 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8769 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
8770 (avoid_overlap, build_base_field): Likewise.
8771 (build_base_field, build_base_fields, is_empty_class):
8772 Test DECL_SIZE with integer_zero.
8773 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
8774 * cp-tree.h (struct lang_type): New field size_unit.
8775 (CLASSTYPE_SIZE_UNIT): New macro.
8776 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
8777 (cp_finish_decl): Delete -Wlarger-than processing.
8778 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
8779 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
8780 * tree.c (make_binfo): binfo vector is one entry longer.
8781 (walk_tree): Walk DECL_SIZE_UNIT.
8783 2000-02-19 Mark Mitchell <mark@codesourcery.com>
8785 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
8787 (build_vtable_entry): Don't assume all vtable entries are
8789 (build_vtbl_initializer): Adjust accordingly.
8790 (get_vtable_decl): Fix formatting.
8792 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
8794 * semantics.c (deferred_type_access_control): Walk the entire
8796 (save_type_access_control): Rename from
8797 initial_deferred_type_access_control. Just remember the value.
8798 (decl_type_access_control): New fn.
8799 (begin_function_definition): Use deferred_type_access_control, after
8800 we've started the function. Set type_lookups to error_mark_node.
8801 * parse.y (frob_specs, fn.def1): Adjust.
8802 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
8803 (parse_end_decl, parse_bitfield0, parse_method): New fns.
8804 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
8805 (after_type_component_declarator0): Likewise.
8806 (after_type_component_declarator): Likewise.
8807 (notype_component_declarator): Likewise.
8808 * cp-tree.h: Adjust.
8810 * decl.c (redeclaration_error_message): Allow redeclaration of
8811 namespace-scope decls.
8813 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
8815 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
8817 2000-02-17 Mark Mitchell <mark@codesourcery.com>
8819 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
8820 * decl2.c (grokclassfn): Likewise.
8822 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
8824 * decl2.c (lang_decode_option): Don't set default message length
8826 * lex.c (lang_init_options): Set it here.
8828 2000-02-16 Mark Mitchell <mark@codesourcery.com>
8830 Make DECL_CONTEXT mean the class in which a member function was
8831 declared, even for a virtual function.
8832 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
8833 (DECL_FRIEND_CONTEXT): New macro.
8834 (DECL_REAL_CONTEXT): Remove.
8835 (SET_DECL_FRIEND_CONTEXT): Likewise.
8836 (DECL_VIRTUAL_CONTEXT): Adjust.
8837 (DECL_CLASS_SCOPE_P): Use TYPE_P.
8838 (add_friends): Remove.
8839 (hack_decl_function_context): Likewise.
8840 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
8842 (build_over_call): Fix indentation. Use DECL_CONTEXT
8843 instead of DECL_CLASS_CONTEXT.
8844 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
8845 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
8846 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8847 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
8848 (build_base_field): Likewise.
8849 (finish_struct_1): Likewise.
8850 (build_self_reference): Likewise.
8851 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
8853 (pushtag): Use decl_function_context, not
8854 hack_decl_function_context.
8855 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8856 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
8857 (pushdecl): Remove bogus code.
8858 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
8859 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8860 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8861 Use decl_function_context, nothack_decl_function_context.
8862 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
8863 (grokdeclarator): Likewise. Use decl_function_context, not
8864 hack_decl_function_context.
8865 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
8866 (start_function): Use DECL_FRIEND_CONTEXT, not
8867 DECL_CLASS_CONTEXT. Use decl_function_context, not
8868 hack_decl_function_context.
8869 (finish_function): Use decl_function_context, not
8870 hack_decl_function_context.
8871 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
8873 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
8874 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
8875 (grokfield): Likewise.
8876 (finish_builtin_type): Likewise.
8877 (finish_vtable_vardec): Use decl_function_context, not
8878 hack_decl_function_context.
8879 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8880 (start_static_initialization_or_destruction): Likewise.
8881 (finish_static_initialization_or_destruction): Likewise.
8882 (mark_used): Adjust logic for deciding when to synthesize methods.
8883 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
8885 * error.c (dump_function_decl): Use DECL_CONTEXT, not
8887 * friend.c (is_friend): Likewise.
8888 (add_friends): Remove.
8889 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
8890 * lex.c (begin_definition_of_inclass_inline): Use
8891 decl_function_context, not hack_decl_function_context.
8892 (process_next_inline): Likewise.
8893 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8894 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
8895 DECL_CLASSS_CONTEXT.
8896 (hack_identifier): Likewise.
8897 (synthesize_method): Use decl_function_context, not
8898 hack_decl_function_context.
8899 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
8901 (is_member_template): Use decl_function_context, not
8902 hack_decl_function_context. Use DECL_CONTEXT, not
8904 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
8906 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
8908 (push_template_decl_real): Likewise.
8909 (instantiate_class_template): Don't call add_friends.
8910 (tsubst_default_argument): Use DECL_CONTEXT, not
8912 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
8913 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8914 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
8916 * repo.c (repo_inline_used): Likewise.
8917 * search.c (current_scope): Adjust for new _CONTEXT macros.
8918 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
8920 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8921 (lookup_fnfields_here):Likewise.
8922 (check_final_overrider): Likewise.
8923 (init_vbase_pointers): Likewise.
8924 (virtual_context): Likewise.
8925 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
8926 (expand_body): Use decl_function_context, not
8927 hack_decl_function_context.
8928 * tree.c (hack_decl_function_context): Remove.
8929 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
8931 * typeck2.c (error_not_base_type): Likewise.
8933 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
8935 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
8937 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8939 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
8941 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
8943 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
8945 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
8947 * decl2.c (lang_decode_option): Enable automatic line wrapping.
8949 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
8951 * parse.y (frob_specs): Split out...
8952 (parse_decl): From here.
8953 (fn.def2): Call initial_deferred_type_access_control.
8954 (after_type_component_declarator0): Call frob_specs.
8955 (notype_component_declarator0): Likewise.
8956 * search.c (friend_accessible_p): Nested classes are friends of their
8959 2000-02-10 Mark Mitchell <mark@codesourcery.com>
8961 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
8962 used to create an implicit temporary.
8964 * class.c (dfs_modify_vtables): Tweak calculation of functions to
8967 2000-02-08 Nathan Sidwell <nathan@acm.org>
8969 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
8970 strip array element qualifiers too.
8972 2000-02-07 Mark Mitchell <mark@codesourcery.com>
8974 * decl.c (store_parm_decls): Don't build cleanups for parameters
8975 while processing_template_decl.
8977 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
8979 * cp-tree.h (struct saved_scope): Add incomplete field.
8980 (namespace_scope_incomplete): New macro.
8981 * decl.c (pushdecl): Use it.
8982 (hack_incomplete_structures): Use it. See through artificial
8984 (mark_saved_scope): Mark it.
8986 Implement access control for nested types.
8987 * search.c (type_access_control): New fn.
8988 (accessible_p): Now we do perform access control for types.
8989 * semantics.c (deferred_type_access_control): New fn.
8990 (initial_deferred_type_access_control): New fn.
8991 (begin_function_definition): Call it. Add lookups parm.
8992 * decl.c (struct binding_level): Add this_class field.
8993 (pushlevel_class): Set it.
8994 (mark_binding_level): Mark it.
8995 (lookup_name_real): Use it. Call type_access_control.
8996 (mark_saved_scope): Mark lookups field.
8997 * cp-tree.h (flagged_type_tree): Add lookups field.
8998 (struct saved_scope): Add lookups field.
8999 (type_lookups): New macro.
9000 * parse.y (declmods): Now <ftype>.
9001 (parse_decl): Add lookups parm. Call
9002 initial_deferred_type_access_control.
9003 (lang_extdef): Clear type_lookups.
9004 (typed_declspecs, declmods, typespec): Set lookups field.
9005 (initdcl): Call deferred_type_access_control.
9006 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
9007 component_decl_1, named_parm): Adjust.
9008 * friend.c (is_friend): Nested classes are friends of their
9011 * class.c (currently_open_derived_class): New fn.
9012 * method.c (hack_identifier): Use it.
9014 * lex.c (do_identifier): Remove obsolete code.
9016 * parse.y (typed_typespecs): Propagate new_type_flag properly.
9018 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
9020 * tinfo.h: Remove apostrophes from C++ comment (xgettext
9021 thinks this file is plain C).
9023 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9025 * Makefile.in (call.o): Depend on $(EXPR_H).
9027 * call.c: Include "expr.h".
9029 * class.c (dump_class_hierarchy): Add prototype.
9031 * search.c (dfs_get_pure_virtuals): Likewise.
9033 2000-02-1 Ulrich Drepper <drepper@redhat.com>
9035 * parse.y (simple_stmt): Allow :: token in asm parameter list.
9038 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
9040 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
9041 Store it in DECL_FCONTEXT.
9042 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
9044 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
9046 * tinfo.h (old abi): #include "tconfig.h".
9047 * tinfo.cc (convert_to_base): Move into old abi section.
9049 2000-01-31 Mark Mitchell <mark@codesourcery.com>
9051 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
9052 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
9053 (BINFO_PRIMARY_BINFO): New macro.
9054 (BF_DELTA): Rename to ...
9055 (BV_DELTA): ... this.
9056 (BF_VCALL_INDEX): Rename to ...
9057 (BV_VCALL_INDEX): ... this.
9058 (BF_FN): Rename to ...
9060 * class.c (build_vbase_path): Adjust for changes to reverse_path.
9061 (set_rtti_entry): Rename BF_ macros to BV_ variants.
9062 (modify_vtable_entry): Simplify.
9063 (add_virtual_function): Rename BF_ macros to BV_ variants.
9064 (build_vtable_initializer): Likewise.
9065 (get_class_offset_1): Remove.
9066 (dfs_get_class_offset): Likewise.
9067 (get_class_offset): Likewise.
9068 (dfs_find_final_overrider): New function.
9069 (find_final_overrider): Likewise.
9070 (modify_one_vtable): Remove.
9071 (dfs_find_base): New function.
9072 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
9073 find_final_overrider.
9074 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
9076 (dfs_fixup_vtable_deltas): Remove.
9077 (override_one_vtable): Remove.
9078 (merge_overrides): Likewise.
9079 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
9080 unreal chilren of virtual bases.
9081 (finish_struct_1): Don't use merge_overrides. Don't use
9082 dfs_fixup_vtable_deltas.
9083 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
9086 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
9087 Jason Merrill <jason@yorick.cygnus.com>
9089 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
9091 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
9093 * exception.cc (__throw_bad_typeid): Add missing std::.
9095 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9097 * cp-tree.h (make_thunk): PROTO -> PARAMS.
9099 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
9101 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
9103 Runtime support for new-abi rtti.
9104 * inc/typeinfo (type_info::operator!=): Define in class.
9105 (type_info::before, type_info::name, type_info::operator==,
9106 type_info::operator!=): Define new ABI implementations.
9107 (type_info::is_pointer_p, type_info::is_function_p): Declare
9108 new virtual functions.
9109 (type_info::do_catch, type_info::do_upcast): Likewise.
9111 * tinfo.h (__base_class_info): Define new class.
9112 (__class_type_info): Likewise.
9113 (__si_class_type_info): Likewise.
9114 (__vmi_class_type_info): Likewise.
9115 (__dynamic_cast): Prototype.
9117 * tinfo.cc: Conditionalize old and new rtti mechanisms.
9118 (type_info::is_pointer_p): Define new function.
9119 (type_info::is_function_p): Likewise.
9120 (type_info::do_catch): Likewise.
9121 (type_info::do_upcast): Likewise.
9122 (vtable_prefix): New structure for vtable access.
9123 (adjust_pointer): Define new template function.
9124 (contained_p, public_p, virtual_p, contained_public_p,
9125 contained_nonpublic_p, contained_nonvirtual_p): Define new
9127 (nonvirtual_base_type): New local variable.
9128 (__class_type_info::~__class_type_info): Define.
9129 (__si_class_type_info::~__si_class_type_info): Likewise.
9130 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
9131 (__class_type_info::do_catch): Define new function.
9132 (__class_type_info::do_upcast): Likewise.
9133 (__class_type_info::find_public_src): Likewise.
9134 (__class_type_info::do_find_public_src): Likewise.
9135 (__si_class_type_info::do_find_public_src): Likewise.
9136 (__vmi_class_type_info::do_find_public_src): Likewise.
9137 (__class_type_info::do_dyncast): Likewise.
9138 (__si_class_type_info::do_dyncast): Likewise.
9139 (__vmi_class_type_info::do_dyncast): Likewise.
9140 (__class_type_info::do_upcast): Likewise.
9141 (__si_class_type_info::do_upcast): Likewise.
9142 (__vmi_class_type_info::do_upcast): Likewise.
9143 (__dynamic_cast): Likewise.
9145 * tinfo2.cc (__fundamental_type_info): Define new class.
9146 (__pointer_type_info): Likewise.
9147 (__reference_type_info): Likewise.
9148 (__array_type_info): Likewise.
9149 (__function_type_info): Likewise.
9150 (__enum_type_info): Likewise.
9151 (__ptr_to_member_type_info): Likewise.
9152 (__fundamental_type_info::~__fundamental_type_info): Define.
9153 (__pointer_type_info::~__pointer_type_info): Likewise.
9154 (__reference_type_info::~__reference_type_info): Likewise.
9155 (__array_type_info::~__array_type_info): Likewise.
9156 (__function_type_info::~__function_type_info): Likewise.
9157 (__enum_type_info::~__enum_type_info): Likewise.
9158 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
9159 (__pointer_type_info::do_catch): Define new function.
9160 (__ptr_to_member_type_info::do_catch): Define new function.
9162 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
9163 (__is_pointer): Likewise.
9165 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
9167 2000-01-30 Mark Mitchell <mark@codesourcery.com>
9169 * cp/class.c (build_vtable): Rename to build_primary_vtable.
9170 (prepare_fresh_vtable): Rename to build_secondary_vtable.
9171 (make_new_vtable): New function.
9172 (modify_vtable_entry): Handle generation of new vtables correctly.
9173 (modify_one_vtable): Remove unused parameter.
9174 (dfs_fixup_vtable_deltas): Likewise.
9175 (override_one_vtable): Use build_secondary_vtable.
9176 (finish_struct_1): Use build_primary_vtable and
9177 build_secondary_vtable.
9179 2000-01-28 Ulrich Drepper <drepper@redhat.com>
9181 * cp/decl.c: Adjust variable names, comments, help strings.
9183 2000-01-29 Nathan Sidwell <nathan@acm.org>
9185 * new2.cc (operator delete[]): Use operator delete, don't assume
9188 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
9190 * class.c (build_vtbl_initializer): Add argument to
9191 build_vtable_entry call.
9193 2000-01-27 Mark Mitchell <mark@codesourcery.com>
9195 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
9196 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
9197 (BF_DELTA): New macro.
9198 (BF_VCALL_INDEX): Likewise.
9200 (THUNK_VCALL_OFFSET): Likewise.
9201 (make_thunk): Change prototype.
9202 * class.c (build_vtable_entry): Integrate
9203 build_vtable_entry_for_fn. Handle vcall indices.
9204 (build_vtable_entry_for_fn): Remove.
9205 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
9206 BF_VCALL_INDEX, BF_FN.
9207 (modify_vtable_entry): Integrate common code from
9208 modify_one_vtable and dfs_fixup_vtable_deltas.
9209 (add_virtual_function): Set BF_VCALL_INDEX.
9210 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
9212 (modify_one_vtable): Simplify.
9213 (dfs_fixup_vtable_deltas): Likewise.
9214 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
9215 * method.c (make_thunk): Handle vcall indices.
9217 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
9219 Compiler side new abi rtti (not enabled).
9220 * cp-tree.h (new_abi_rtti_p): New macro.
9221 (emit_support_tinfos): Prototype new function.
9222 (tinfo_decl_p): Likewise.
9223 (emit_tinfo_decl): Likwise.
9224 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
9226 (doing_runtime): New local static.
9227 (init_rtti_processing): Add new-abi initializer.
9228 (get_tinfo_decl): Add new-abi logic.
9229 (tinfo_from_decl): Likewise.
9230 (build_dynamic_cast_1): Likewise.
9231 (qualifier_flags): New static function.
9232 (tinfo_base_init): Likewise.
9233 (generic_initializer): Likewise.
9234 (ptr_ref_initializer): Likewise.
9235 (ptmd_initializer): Likewise.
9236 (class_hint_flags): Likewise.
9237 (class_initializer): Likewise.
9238 (synthesize_tinfo_var): Likewise.
9239 (create_real_tinfo_var): Likewise.
9240 (create_pseudo_type_info): Likewise.
9241 (get_vmi_pseudo_type_info): Likewise.
9242 (create_tinfo_types): Likewise.
9243 (emit_support_tinfos): New global function.
9244 (tinfo_decl_p): New global predicate.
9245 (emit_tinfo_decl): New global function.
9246 * class.c (set_rtti_entry): Generalize for old and new rtti.
9247 (build_vtbl_initializer): Likewise.
9248 * decl2.c (finish_file): Likewise.
9250 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
9252 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
9253 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
9255 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
9257 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
9260 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
9262 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
9264 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
9266 * optimize.c (calls_setjmp_r): Supply new argument
9267 to special_function_p.
9269 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9271 * call.c: PROTO -> PARAMS.
9272 * class.c: Likewise.
9273 * cp-tree.h: Likewise.
9277 * decl2.c: Likewise.
9279 * errfn.c: Likewise.
9280 * error.c: Likewise.
9281 * except.c: Likewise.
9284 * input.c: Likewise.
9287 * method.c: Likewise.
9288 * optimize.c: Likewise.
9289 * parse.y: Likewise.
9293 * search.c: Likewise.
9294 * semantics.c: Likewise.
9297 * typeck.c: Likewise.
9298 * typeck2.c: Likewise.
9301 2000-01-25 Richard Henderson <rth@cygnus.com>
9303 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
9305 2000-01-25 Mark Mitchell <mark@codesourcery.com>
9307 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
9308 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
9309 (struct vcall_offset_data_s): New type.
9310 (dfs_vcall_offset_queue_p): New function.
9311 (dfs_build_vcall_offset_vtbl_entries): Likewise.
9312 (build_vcall_offset_vtbl_entries): Likewise.
9313 (layout_vtable_decl): Likewise.
9314 (num_vfun_entries): Likewise.
9315 (num_extra_vtbl_entries): Add the entries for vcall offsets.
9316 (build_vtbl_initializer): Likewise.
9317 (dfs_finish_vtabls): Use layout_vtable_decl.
9318 (modify_one_vtables): Always duplicate vtables under the new ABI.
9319 (finish_struct_1): Use layout_vtable_decl.
9321 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9323 * decl.c (member_function_or_else): Change third arg from a format
9324 specifier to an `enum overload_flags'. Callers changed.
9326 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
9328 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
9329 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
9330 build_const_cast, get_delta_difference, check_return_expr): Avoid
9331 ANSI string concatenation usage.
9333 2000-01-24 Mark Mitchell <mark@codesourcery.com>
9335 * class.c (layout_class_type): Put the fields required to make a
9336 class non-empty at the end, not the beginning, of the TYPE_FIELDs
9339 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
9341 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
9344 * decl2.c (mark_used): Do instantiate inlines that have been
9345 explicitly instantiated.
9347 2000-01-24 Richard Henderson <rth@cygnus.com>
9349 * call.c (build_over_call): Use expand_tree_builtin.
9350 * typeck.c (build_function_call_real): Likewise.
9351 (build_binary_op_nodefault): Handle unordered compares.
9353 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9355 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
9356 cp_tree_index values.
9357 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
9358 New global node #defines for them.
9359 * rtti.c (call_void_fn): Replace with ...
9360 (build_runtime_decl): ... new static function.
9361 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
9362 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
9363 (build_dynamic_cast_1): Always produce correctly typed result.
9364 Explicitly produce type_info addresses. Use dynamic_cast_node.
9365 * exception.cc (__throw_bad_cast): Return `void *'.
9366 (__throw_bad_typeid): Return `const type_info &'.
9368 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9370 * cp-tree.h (get_vtable_decl): Prototype new function.
9371 * class.c (get_vtable_decl): New function. Broken out from ...
9372 (build_vtable): ... here. Use it.
9373 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
9376 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9378 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
9379 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
9380 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
9381 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
9382 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
9383 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
9384 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
9385 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
9386 (CPTI_TINFO_VAR_ID): New enumeration.
9387 (__tp_desc_type_node, __access_mode_type_node,
9388 __bltn_desc_type_node, __user_desc_type_node,
9389 __class_desc_type_node, __ptr_desc_type_node,
9390 __attr_desc_type_node, __func_desc_type_node,
9391 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
9392 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
9393 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
9394 enum_desc_type_node, class_desc_type_node,
9395 si_class_desc_type_node, vmi_class_desc_type_node,
9396 ptmd_desc_type_node, base_desc_type_node): New #defines.
9397 (tinfo_fn_id, tinfo_fn_type): Rename to ...
9398 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
9399 (tinfo_var_id): New enumeration.
9400 (DECL_TINFO_FN_P): Augment comment.
9401 * decl.c (cp_global_trees): Adjust documentation.
9402 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
9403 tinfo_decl_type and tinfo_var_id.
9404 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
9405 (build_typeid): Remove unused variable.
9406 (get_tinfo_var): Use tinfo_var_id.
9407 (tinfo_name): New static function.
9408 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
9409 (tinfo_from_decl): Likewise.
9410 (get_base_offset): New static function, broken out of
9412 (expand_si_desc): Use tinfo_name.
9413 (expand_class_desc): Likewise. Lose local static variable.
9414 Use base_desc_type_node. Use get_base_offset.
9415 (expand_ptr_desc): Use tinfo_name.
9416 (expand_attr_desc): Likewise.
9417 (expand_generic_desc): Likewise.
9419 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
9420 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
9422 2000-01-23 Mark Mitchell <mark@codesourcery.com>
9424 * cp-tree.h (__eprintf): Remove declaration.
9425 * tree.c (__eprintf): Remove definition.
9427 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
9428 Mark Mitchell <mark@codesourcery.com>
9430 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
9431 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
9433 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
9435 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
9437 2000-01-23 Mark Mitchell <mark@codesourcery.com>
9439 * cp-tree.h (register_dtor_fn): New function.
9440 * decl.c (destroy_local_static): Rename to ...
9441 (register_dtor_fn): ... this. Give it external linkage.
9442 (expand_static_init): Use it.
9443 * decl2.c (do_static_initialization): Likewise, if using
9445 (do_static_destruction): Check that __cxa_atexit is not in use.
9446 (finish_file): Don't call do_static_destruction if using
9449 * typeck.c (convert_arguments): Restore two-message error
9452 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
9454 Remap dynamic cast hint values to be consistent across ABIs.
9455 * search.c (dynamic_cast_base_recurse): Remap generated value.
9456 (get_dynamic_cast_base_type): Adjust documentation.
9457 * tinfo.h (__user_type_info::dyncast): Likewise.
9458 (__user_type_info::find_public_subobj): Remap BOFF meaning.
9459 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
9460 (__class_type_info::do_dyncast): Likewise.
9461 (__class_type_info::do_find_public_subobj): Likewise.
9462 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
9464 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
9466 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
9468 * typeck2.c (incomplete_type_error): Restore previous
9469 cp_error and cp_error_at call sequence.
9471 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
9473 * class.c (dump_class_hierarchy): Make format agree with argument;
9474 cast pointer to unsigned long and print with %lx.
9476 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
9478 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
9480 * typeck.c (composite_pointer_type, common_type,
9481 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
9482 build_function_call_real, convert_arguments,
9483 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
9484 build_unary_op, mark_addressable, build_compound_expr,
9485 build_static_cast, build_reinterpret_cast, build_const_cast,
9486 build_c_cast, build_modify_expr, get_delta_difference,
9487 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
9488 'ISO C++'. Fusion consecutive calls to diagnotic message routines
9490 * typeck2.c (readonly_error, abstract_virtuals_error,
9491 process_init_constructor, check_for_new_type): Likewise.
9493 2000-01-19 Mark Mitchell <mark@codesourcery.com>
9495 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
9498 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
9500 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
9501 (build_x_typeid): Likewise.
9502 (get_tinfo_fn): Likewise.
9503 (get_tinfo_fn_unused): Rename to ...
9504 (get_tinfo_decl): ... here.
9505 * rtti.c (build_headof): Replace logic error with assertion.
9506 (get_tinfo_fn_dynamic): Rename to ...
9507 (get_tinfo_decl_dynamic): ... here. Make static. Use
9508 complete_type_or_else.
9509 (build_x_typeid): Move into ...
9510 (build_typeid): ... here. Adjust call to
9511 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
9512 throw_bad_typeid expression.
9513 (get_tinfo_fn_unused): Rename to ...
9514 (get_tinfo_decl): ... here. Adjust comment.
9515 (get_tinfo_fn): Delete.
9516 (tinfo_from_decl): New static function.
9517 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
9518 (get_typeid): Use complete_type_or_else.
9519 (build_dynamic_cast_1): Adjust calls to
9520 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
9521 * parse.y (primary): Adjust call to build_typeid.
9522 * except.c (build_eh_type_type_ref): Adjust call to
9523 get_tinfo_decl. Mark as used.
9524 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
9525 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
9526 * parse.c: Regenerated.
9528 2000-01-17 Mark Mitchell <mark@codesourcery.com>
9530 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
9532 (resolves_to_fixed_type_p): Document calling convention.
9533 * rtti.c (build_x_typeid): Initialize NONNULL.
9535 * cp-tree.h (build_shared_int_cst): New function.
9536 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
9537 * class.c (modify_vtable_entry): Likewise.
9538 (add_virtual_function): Split out code to generated shared
9539 INTEGER_CSTs to build_share_int_cst.
9540 (modify_all_vtables): Handle all the overridden functions here.
9541 Add overridden functions from non-primary virtual bases to the
9543 (finish_struct_1): Adjust call to modify_all_vtables. Add
9544 overridden functions from non-primary bases to the vtable.
9545 * tree.c (build_shared_int_cst): New function.
9547 * cp-tree.h (scratchalloc): Remove.
9548 (build_scratch_list): Likewise.
9549 * call.c (convert_class_to_reference): Replace build_scratch_list
9550 and build_expr_list with build_tree_list.
9551 (add_candidate): Replace scratchalloc with expralloc. Note memory
9553 (build_user_type_conversion_1): Replace build_scratch_list
9554 and build_expr_list with build_tree_list.
9555 (build_new_op): Likewise.
9556 (build_op_delete_call): Likewise.
9557 (convert_like): Likewise.
9558 * cvt.c (ocp_convert): Likewise.
9559 * decl.c (start_decl): Likewise.
9560 (start_function): Likewise.
9561 (finish_destructor_body): Likewise.
9562 (maybe_build_cleanup_1): Likewise.
9563 * decl2.c (reparse_decl_as_expr): Likewise.
9564 * init.c (perform_member_init): Likewise.
9565 (expand_cleanup_for_base): Likewise.
9566 (build_builtin_delete_call): Likewise.
9567 (build_new_1): Likewise.
9568 (build_delete): Likewise.
9569 * method.c (do_build_assign_ref): Likewise.
9570 * parse.y (already_scoped_stmt): Likewise.
9571 (nontrivial_exprlist): Likewise.
9572 (net_initializer): Likewise.
9573 (initlist): Likewise.
9574 * parse.c: Regenerated.
9575 * rtti.c (build_x_typeid): Likewise.
9576 (build_dynamic_cast_1): Likewise.
9577 * typeck.c (build_x_compound_expr): Likewise.
9578 (build_static_cast): Likewise.
9579 (build_modify_expr): Likewise.
9581 * cp-tree.h (DECL_VINDEX): Add documentation.
9582 * class.c (build_vtable_entry): Likewise.
9583 (start_vtable): Add comment.
9584 (add_virtual_function): Replace pending_hard_virtuals with
9585 overridden_virtuals and pending_virtuals with new_virtuals.
9586 Replace redundant assignments with assertions.
9587 (check_for_override): Add comment.
9588 (check_bases_and_members): Replace pending_hard_virtuals with
9589 overridden_virtuals and pending_virtuals with new_virtuals.
9590 (create_vtbl_ptr): Likewise.
9591 (layout_class_type): Likewise.
9592 (finish_struct_1): Likewise. Add comments.
9594 2000-01-16 Mark Mitchell <mark@codesourcery.com>
9596 * class.c (finish_struct_1): Replace redundant code with
9599 * cp-tree.h (flag_new_abi): Move.
9600 (flag_use_cxa_atexit): Likewise.
9601 (flag_honor_std): Likewise.
9602 (flag_rtti): Likewise.
9603 (vbase_offsets_in_vtable_p): Define.
9604 (vptrs_present_everywhere_p): Likewise.
9605 (TYPE_CONTAINS_VPTR_P): Likewise.
9606 (dfs_walk_real): Declare.
9607 * class.c (build_vbase_pointer_fields): Check
9608 vbase_offsets_in_vtable_p.
9609 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
9611 (build_vbase_offset_vtbl_entries): Simplify.
9612 (build_vbase_offset_vtbl_entries): Adjust.
9613 (build_vbase_pointer): Add ability to look up vbase offsets in
9615 (start_vtable): New function.
9616 (add_virtual_function): Use it.
9617 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
9618 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
9619 (build_vtbl_initializer): Take the type of the complete object as
9620 input. Use it to correctly calculate vbase offsets.
9621 (dfs_finish_vtbls): Pass the complete type to
9622 build_vtbl_initializer.
9623 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
9624 (create_vtable_ptr): Create a vtable even if there are no
9625 new virtual functions, under the new ABI.
9626 (finish_struct_1): Likewise.
9627 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
9628 * decl.c (exapnd_static_init): Remove call to
9629 preserve_initializer.
9630 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
9632 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
9633 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
9634 (construct_virtual_bases): Don't initialize virtual base pointers
9636 (build_aggr_init): Clean up comment.
9637 (expand_aggr_init_1): Likewise.
9638 * rtti.c (expand_class_desc): Store the virtual function table
9639 index where the vbase offset lives in the offset field.
9640 * search.c (dfs_walk_real): Make it global.
9641 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
9642 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
9644 * tinfo.h (USItype): Make it signed under the new ABI.
9645 * tinfo.cc (convert_to_base): New function. Encapsulate base
9646 conversion logic here.
9647 (__class_type_info::do_upcast): Use it.
9648 (__class_type_info::do_dyncast): Likewise.
9649 (__class_type_info::do_find_public_subobj): Likewise.
9651 * init.c (construct_virtual_bases): Don't look up the addresses of
9652 virtual bases at run-time.
9654 * class.c (build_vbase_pointer): Relocate.
9655 (build_vbase_pointer_fields): Likewise.
9656 (dfs_build_vbase_offset_vtbl_entries): Likewise.
9657 (build_vbase_offset_vtbl_entries): Likewise.
9659 * decl.c (init_decl_processing): Complain if -fnew-abi
9660 -fno-vtable-thunks is used.
9662 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
9665 2000-01-15 Mark Mitchell <mark@codesourcery.com>
9667 * cp-tree.h (num_extra_vtbl_entries): New function.
9668 (size_extra_vtbl_entries): Likewise.
9669 (dfs_vtable_path_unmark): Likewise.
9670 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
9671 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
9672 * class.c (num_extra_vtbl_entries): New function.
9673 (size_extra_vtbl_entries): Likewise.
9674 (dfs_build_vbase_offset_vtbl_entries): New function.
9675 (build_vbase_offset_vtbl_entries): Likewise.
9676 (build_vtbl_initializer): Use it.
9677 (finish_struct_1): Adjust vtable sizes (using
9678 num_extra_vtbl_entries).
9679 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
9680 THUNK_DECL is non-NULL before expanding it.
9681 * init.c (expand_virtual_init): Adjust the vtable pointer by
9682 size_extra_vtbl_entries before storing it.
9683 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
9684 Handle TREE_LIST parameters here, not in the dfs_* functions.
9685 (dfs_unmarked_real_bases_queue_p): Adjust.
9686 (dfs_marked_real_bases_queue_p): Likewise.
9687 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
9688 (dfs_vtable_path_marked_real_bases_queue_p): New function.
9689 (dfs_vtable_path_unmark): Likewise.
9691 2000-01-14 Mark Mitchell <mark@codesourcery.com>
9693 * optimize.c (copy_body_r): Clear the operand three of a
9694 TARGET_EXPR when copying it.
9696 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9698 * method.c (build_decl_overload_real): Check whether we are in ::
9699 before returning __builtin_new/delete.
9701 2000-01-13 Mark Mitchell <mark@codesourcery.com>
9703 * pt.c (tsubst_friend_function): Improve comment.
9704 (instantiate_decl): Avoid crashing when a "nested" function is
9705 instantiated from the top level.
9707 * dump.c (dqeueue_and_dump): Dump
9708 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
9710 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9712 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
9714 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
9716 * g++spec.c (lang_specific_driver): Add -fnew-abi if
9717 ENABLE_NEW_GXX_ABI defined.
9718 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
9719 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
9720 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
9722 2000-01-12 Mark Mitchell <mark@codesourcery.com>
9724 * decl.c (start_cleanup_fn): Call pushdecl.
9726 * call.c (convert_class_to_reference): Fix typos.
9727 (build_conditional_expr): Handle errors gracefully.
9728 * class.c (push_nested_class): Likewise.
9729 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
9730 (DECL_THIS_EXTERN): Use it.
9731 (DECL_THIS_STATIC): Likewise.
9732 * cvt.c (convert_to_void): Handle errors gracefully.
9733 (build_expr_type_conversion): Likewise.
9734 * decl.c (maybe_push_decl): Likewise.
9735 (start_decl_1): Likewise.
9736 (require_complete_types_for_parms): Likewise.
9737 * parse.y (structsp): Likewise.
9738 (base_class): Likewise.
9739 * parse.c: Regenerated.
9740 * pt.c (finish_member_template_decl): Likewise.
9741 * typeck.c (decay_conversion): Likewise.
9743 * cp-tree.h (dfs_skip_vbases): New function.
9744 (find_vbase_instance): Likewise.
9745 * class.c (determine_primary_base): Allow a nearly empty base to
9746 serve as a primary base class under the new ABI.
9747 (get_class_offset_1): Rename to ...
9748 (dfs_get_class_offset): ... this. Simplify. Don't issue error
9750 (get_class_offset): Use it. Issue error messages here.
9751 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
9752 find the right copies of virtual bases.
9753 (fixup_vtable_deltas1): Rename to ...
9754 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
9755 bases as primary bases.
9756 (fixup_vtable_deltas): Remove.
9757 (override_one_vtable): Handle virtual bases as primary bases.
9758 (merge_overrides): Likewise.
9759 (finish_struct_1): Likewise.
9760 (dump_class_hierarchy): Dump primary-ness of bases as well.
9761 * search.c (mark_primary_bases): Use a pre-order traversal to
9762 handle primary virtual bases.
9763 (dfs_skip_vbases): New fiunction.
9764 (expand_upcast_fixups): Adjust to handle primary virtual bases.
9765 (fixup_virtual_upcast_offsets): Likewise.
9766 (fixup_all_virtual_upcast_offsets): Likewise.
9767 (dfs_find_vbase_instances): New function.
9768 (find_vbase_instance): Likewise.
9770 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
9772 * lex.c (DIR_SEPARATOR): Delete macro.
9774 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
9776 * decl2.c (lang_decode_option): Handle automatic line wrapping
9779 2000-01-11 Mark Mitchell <mark@codesourcery.com>
9781 * friend.c (do_friend): Don't resolve scopes when processing
9782 template declarations, even if the qualifying scope doesn't
9783 involve template parameters.
9785 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
9787 * class.c (dfs_modify_vtables_queue_p): Remove.
9788 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
9789 and dfs_marked_real_bases_queue_p instead of
9790 dfs_modify_vtables_queue_p.
9792 * class.c (build_vbase_path): Simplify.
9793 (dfs_propagate_binfo_offsets): New function.
9794 (propagate_binfo_offsets): Use it.
9795 (remove_base_field): Simplify.
9796 (dfs_set_offset_for_vbases): Remove.
9797 (dfs_set_offset_for_shared_vbases): New function.
9798 (dfs_set_offset_for_unshared_vbases): Likewise.
9799 (layout_virtual_bases): Use them.
9800 (layout_basetypes): Don't call propagate_binfo_offsets.
9801 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
9804 * class.c (build_base_field): New function, split out from ...
9805 (build_base_fields): ... here. Use it. Allocate primary bases
9806 first, under the new ABI.
9807 (get_vtable_entry): Remove.
9808 (remove_base_field): New function, split out from ...
9809 (remove_base_fields): ... here. Adjust since primary bases come
9810 first under the new ABI.
9812 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
9813 (initialize_vtbl_ptrs): New function.
9814 (expand_indirect_vtbls_init): Change prototype.
9815 (convert_pointer_to_vbase): Declare.
9816 * init.c (expand_direct_vtbls_init): Remove.
9817 (dfs_initialize_vtbl_ptrs): New function.
9818 (initialize_vtbl_ptrs): Likewise.
9819 (emit_base_init): Use initialize_vtbl_ptrs.
9820 * search.c (convert_pointer_to_vbase): Make it global.
9821 (expand_indirect_vtbls_init): Remove vtable initialization code.
9822 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
9824 * class.c (dfs_finish_vtbls): New function.
9825 (finish_vtbls): Use it.
9826 (dump_class_hierarchy): New function.
9828 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
9829 (BINFO_VBASE_PRIMARY_P): New macro.
9830 (BINFO_VIRTUALS): Add to documentation.
9831 (SET_BINFO_PRIMARY_MARKED_P): Remove.
9832 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9833 (dfs_mark_primary_bases_queue_p): Likewise.
9834 (dfs_unmarked_real_bases_queue_p): New function.
9835 (dfs_marked_real_bases_queue_p): Likewise.
9836 * search.c (dfs_mark_primary_bases): Adjust.
9837 (mark_primary_bases): Likewise.
9838 (get_shared_vbase_if_not_primary): New function.
9839 (dfs_unmarked_real_bases_queue_p): Likewise.
9840 (dfs_marked_real_bases_queue_p): Likewise.
9841 (dfs_get_pure_virtuals): Simplify.
9842 (get_pure_virtuals): Likewise.
9844 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9846 * lex.c: Include tm_p.h.
9848 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
9850 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
9852 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
9854 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
9855 * pt.c (instantiate_decl): Defer comdat templates that might not be
9858 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
9859 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
9860 (finish_file): Likewise.
9862 * decl2.c (import_export_class): Undo 12/14 change.
9864 * error.c (dump_decl): operator new, not operatornew.
9866 * class.c (field_decl_cmp): A nontype is "greater" than a type.
9867 * search.c (lookup_field_1): Look for the last field with the
9870 2000-01-05 Nathan Sidwell <nathan@acm.org>
9872 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
9875 2000-01-05 Nathan Sidwell <nathan@acm.org>
9877 * typeck.c (build_static_cast): Don't strip target qualifiers
9878 when casting from a class.
9880 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9882 * class.c (warn_hidden): Initialize variable `fndecl'.
9884 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
9886 * decl.c (flag_isoc9x): New variable to be able to use code in
9887 c-common.c. For now always zero.
9889 2000-01-03 Mark Mitchell <mark@codesourcery.com>
9891 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
9892 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
9893 or unshare_base_binfos for virtual bases here.
9894 * search.c (dfs_get_vbase_types): Do it here.
9895 (get_vbase_types): Adjust.
9897 2000-01-02 Mark Mitchell <mark@codesourcery.com>
9899 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
9900 (BINFO_PRIMARY_MARKED_P): Use flag 5.
9901 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
9902 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9903 (unmark_primary_bases): Remove declaration.
9904 (unmarkedp): Declare.
9905 (dfs_vbase_unmark): Likewise.
9906 * class.c (determine_primary_base): Return immediately if there
9907 are no base classes. Call mark_primary_bases here.
9908 (modify_all_direct_vtables): Remove.
9909 (modify_all_indirect_vtables): Remove.
9910 (dfs_modify_vtables_queue_p): New function.
9911 (dfs_modify_vtables): New function.
9912 (modify_all_vtables): Use them.
9913 (build_base_fields): Build FIELD_DECLs for primary virtual base
9915 (create_vtable_ptr): Don't call determine_primary_base here.
9916 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
9917 (dfs_set_offset_for_vbases): ... this.
9918 (layout_virtual_bases): Use it.
9919 (layout_class_type): Call determine_primary_base here.
9920 * search.c (unmarkedp): Make it global.
9921 (shared_marked_p): Simplify.
9922 (shared_unmarked_p): Likewise.
9923 (dfs_primary_bases_queue_p): Remove.
9924 (dfs_unmark_primary_bases): Likewise.
9925 (unmark_primary_bases): Likewise.
9926 (mark_primary_bases): Simplify.
9927 (get_pure_virtuals): Don't call mark_primary_bases here.
9928 (dfs_vbase_unmark): New function.
9929 (get_vbase_types): Simplify.
9931 * class.c (struct base_info): Remove.
9932 (determine_primary_base): Take has_virtual_p rather than a
9933 base_info as input. Don't calculate max_has_virtual.
9934 (finish_struct_bits): Remove max_has_virtual argument.
9935 (create_vtable_ptr): Remove max_has_virtual_p argument.
9936 (layout_virtual_bases): Remove max argument.
9937 (layout_basetypes): Likewise.
9938 (layout_class_type): Remove max_has_virtual_p argument.
9939 (finish_struct_1): Remove max_has_virtual.
9941 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
9942 (layout_basetypes): Remove.
9943 * class.c (propagate_binfo_offsets): Moved here from tree.c.
9944 Update to handle primary virtual bases.
9945 (remove_base_fields): New function, split out from
9947 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
9948 (layout_virtual_bases): New function, split out from
9949 layout_basetypes. Update to handle primary virtual bases.
9950 (layout_basetypes): Moved here from tree.c. Use
9951 remove_base_fields and layout_virtual_bases.
9952 * search.c (dfs_mark_primary_bases_queue_p): New function.
9953 (mark_primary_bases): Use it.
9954 * tree.c (CEIL): Remove.
9955 (propagate_binfo_offsets): Remove.
9956 (layout_basetypes): Remove.
9958 2000-01-01 Mark Mitchell <mark@codesourcery.com>
9960 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
9961 (BINFO_PRIMARY_MARKED_P): New macro.
9962 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
9963 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9964 (mark_primary_bases): New function.
9965 (unmark_primary_bases): Likewise.
9966 * search.c (get_abstract_virtuals_1): Remove.
9967 (dfs_mark_primary_bases): New function.
9968 (mark_primary_bases): Likewise.
9969 (dfs_unmark_primary_bases): Likewise.
9970 (unmark_primary_bases): Likewise.
9971 (dfs_get_pure_virtuals): Likewise.
9973 2000-01-01 Mark Mitchell <mark@codesourcery.com>
9975 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
9976 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
9977 (modify_one_vtable): Adjust.
9978 (fixup_vtable_deltas1): Likewise.
9979 (override_one_vtable): Likewise.
9980 * search.c (get_abstract_virtuals_1): Likewise.
9981 (get_pure_virtuals): Likewise.
9982 (expand_upcast_fixups): Likewise.
9983 * tree.c (debug_binfo): Likewise.
9985 * class.c (build_vtable): Don't return a value. Don't rebuild
9986 vtables for bases that have already been handled.
9987 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
9988 already been handled.
9989 (modify_one_vtable): Adjust accordingly.
9990 (fixup_vtable_deltas1): Likewise.
9991 (finish_struct_1): Likewise.
9993 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9995 * call.c (build_new_method_call): Also check destructors.