1 2001-07-28 Richard Henderson <rth@redhat.com>
3 * method.c (pending_inlines): Remove.
5 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
7 * class.c (mark_primary_virtual_base): Don't adjust base
9 (dfs_unshared_virtual_bases): Adjust them here.
10 (mark_primary_bases): Explain why we adjust at the end.
12 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
14 * class.c (finish_struct_1): When copying the primary base's
15 VFIELD, make sure we find it is at offset zero.
17 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
19 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
20 tsubst_expr for default template arguments.
22 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
25 * spew.c (yylex): Only copy the token's lineno, if it is
28 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
31 * call.c (resolve_args): Simplify, call
32 convert_from_reference.
33 (build_new_op): Resolve and convert from reference ARG1
34 earlier. Adjust ARG2 & ARG3 resolve and conversion.
36 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
38 * decl.c (last_function_parm_tags): Remove.
39 (current_function_parm_tags): Remove.
40 (init_decl_processing): Adjust.
41 (start_function): Adjust.
42 (store_parm_decls): Adjust.
45 * decl.c (grokdeclarator): Detect when a function typedef is
46 declaring a function, and create last_function_parms correctly.
48 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
50 * call.c (joust): Only prefer a non-builtin candidate to a builtin
51 one if they have the same signature.
53 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
54 it rather than toplevel_bindings_p. Give it a mangled name if static.
55 (convert_to_reference): Adjust.
56 * decl2.c (get_temp_name): Lose.
57 * mangle.c (mangle_ref_init_variable): New fn.
58 (mangle_guard_variable): Strip the ref-init header.
60 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
62 (grok_reference_init): Always use DECL_INITIAL.
64 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
67 * call.c (build_conditional_expr): Recheck args after
69 * cp-tree.h (build_conditional_expr): Move to correct file.
70 * typeck.c (decay_conversion): Diagnose any unknown types
72 (build_binary_op): Don't do initial decay or default
73 conversions on overloaded functions.
74 (build_static_cast): Don't do a decay conversion here.
76 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
79 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
80 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
82 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
84 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
85 (create_vtbl_ptr): ... here.
87 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
89 * class.c (build_vbase_offset_vbtl_entries): Look for
90 non-primary base of which we are a sub vtable.
92 2001-07-24 Phil Edwards <pme@sources.redhat.com>
94 * semantics.c (finish_this_expr): Remove unused code.
96 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
98 Simplify rtti, now we've only one ABI.
99 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
101 (tinfo_decl_id, tinfo_var_id): Remove.
102 (get_typeid_1): Remove.
104 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
105 (typeid_ok_p): New function.
106 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
107 (get_tinfo_decl): Remove old abi documentation.
108 (tinfo_from_decl): Remove.
109 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
110 (get_typeid_1): Remove.
111 (get_base_offset): Remove.
112 (synthesize_tinfo_var): Absorb get_base_offset.
113 (create_real_tinfo_var): Don't use tinfo_decl_id.
115 2001-07-23 Graham Stott <grahams@redhat.com>
117 * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
118 variable has_two_argument_delete_p.
120 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
122 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
123 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
124 (CPTI_INDEX_IDENTIFIER): Remove.
125 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
126 (delta2_identifier): Remove.
127 (index_identifier): Remove.
128 (pfn_or_delta2_identifier): Remove.
129 (flag_vtable_thunks): Remove.
130 (VTABLE_DELTA2_NAME): Remove.
131 (VTABLE_INDEX_NAME): Remove.
132 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
133 (vfunc_ptr_type_node): Adjust.
134 (VTABLE_NAME_PREFIX): Adjust.
135 (build_vfn_ref): Lose first parameter.
136 (fixup_all_virtual_upcast_offsets): Remove.
137 * decl.c (initialize_predefined_identifiers): Remove
138 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
139 (init_decl_processing): Remove no-vtable-thunk code.
140 * decl2.c (flag_vtable_thunks): Remove.
141 (mark_vtable_entries): Remove no-vtable-thunk code.
142 * error.c (dump_decl): Remove no-vtable-thunk code.
143 (dump_expr): Adjust ptr to member function code.
144 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
146 * rtti.c (build_headof): Remove no-vtable-thunk code.
147 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
148 * search.c (get_base_distance): Remove expand_upcast_fixups case.
149 (virtual_context) Remove.
150 (expand_upcast_fixups): Remove.
151 (fixup_virtual_upcast_offsets): Remove.
152 (fixup_all_virtual_upcast_offsets): Remove.
153 * typeck.c (get_member_function_from_ptrfunc): Remove
154 no-vtable-thunk code.
155 * call.c (build_over_call): Adjust call to build_vfn_ref.
156 * class.c (build_vfn_ref): Lose first parameter. Remove
157 no-vtable-thunk code.
158 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
159 (build_vtable_entry): Remove no-vtable-thunk code.
161 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
163 Remove old-abi remnants. Remove comments about old abi
164 behaviour. Remove refences to 'new-abi' in comments.
165 * cp-tree.h: Adjust comments.
166 (vbase_offsets_in_vtable_p): Delete.
167 (vcall_offsets_in_vtable_p): Delete.
168 (vptrs_present_everywhere_p): Delete.
169 (all_overridden_vfuns_in_vtables_p): Delete.
170 (merge_primary_and_secondary_vtables_p): Delete.
171 (TYPE_CONTAINS_VPTR_P): Adjust.
172 (VTT_NAME_PREFIX): Remove.
173 (CTOR_VTBL_NAME_PREFIX): Remove.
174 (init_vbase_pointers): Remove.
175 * class.c: Adjust coments.
176 (build_vbase_pointer_fields): Delete.
177 (build_vbase_pointer): Remove old-abi code.
178 (build_secondary_vtable): Likewise.
179 (modify_all_vtables): Likewise.
180 (create_vtable_ptr): Likewise.
181 (layout_class_type): Likewise.
182 (finish_struct_1): Likewise.
183 (finish_vtbls): Likewise.
184 (dfs_finish_vtbls): Delete.
185 (build_vbase_offset_vtbl_entries): Remove old-abi code.
186 * cvt.c: Adjust comments.
187 * decl.c: Adjust comments.
188 * decl2.c: Adjust comments.
189 * init.c: Adjust comments.
190 (construct_virtual_bases): Remove old-abi code.
191 * lang-specs.h: Remove -fno-new-abi.
192 * mangle.c: Adjust comments.
193 * rtti.c: Adjust comments.
194 (get_base_offset): Remove old-abi-code.
195 * search.c: Adjust comments.
196 (dfs_init_vbase_pointers): Remove.
197 (dfs_vtable_path_unmark): Remove.
198 (init_vbase_pointers): Remove.
199 * semantics.c: Adjust comments.
200 (emit_associated_thunks): Remove old-abi code.
201 * typeck.c: Adjust comments.
203 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
205 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
208 2001-07-19 Mark Mitchell <mark@codesourcery.com>
210 * class.c (finish_struct_anon): Forbid nested classes.
212 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
214 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
215 * optimize.c: Include debug.h.
216 (maybe_clone_body): Use debug hook.
217 * semantics.c: Include debug.h.
218 (expand_body): Use debug hook.
220 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
222 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
224 2001-07-18 Mark Mitchell <mark@codesourcery.com>
226 * class.c (type_requires_array_cookie): New function.
227 (check_methods): Don't try to figure out whether the type needs a
229 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
230 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
231 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
232 * pt.c (instantiate_class_template): Don't set
233 TYPE_VEC_DELETE_TAKES_SIZE.
234 * NEWS: Document ABI changes from GCC 3.0.
236 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
237 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
239 * NEWS (Changes in GCC 3.0): Fix typo.
241 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
243 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
244 which attributes are to be attached, and a flags argument. Update
245 call to decl_attributes.
246 (grokfield): Update call to decl_attributes.
247 * class.c (finish_struct): Update call to cplus_decl_attributes.
248 * cp-tree.h (cplus_decl_attributes): Update prototype.
249 * decl.c (start_decl, grokdeclarator, start_function): Update
250 calls to decl_attributes and cplus_decl_attributes.
251 * friend.c (do_friend): Update call to cplus_decl_attributes.
252 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
254 2001-07-12 Mark Mitchell <mark@codesourcery.com>
256 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
257 for `register' variables with an asm-specification.
259 2001-07-11 Mark Mitchell <mark@codesourcery.com>
261 * semantics.c (finish_asm_stmt): Mark the output operands
262 to an asm addressable, if necessary.
264 2001-07-11 Ben Elliston <bje@redhat.com>
266 * Revert this change -- there is a subtle bug.
269 * decl.c (finish_enum): New "attributes" argument; pass it to
270 cplus_decl_attributes. Use a narrower type if the enum is packed.
271 * cp-tree.h (finish_enum): Adjust prototype.
272 * parse.y (enum_head): New non-terminal.
273 (structsp): Use it. Enums now may be preceded or followed by
274 optional attributes -- pass their chained tree to finish_enum().
275 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
277 2001-07-10 Mark Mitchell <mark@codesourcery.com>
279 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
282 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
284 * semantics.c (cp_expand_stmt): Fix for null
285 current_function_return_value.
287 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
289 * call.c (build_op_delete_call): Initialize fn.
290 (convert_like_real): Delete conditional.
291 (joust): Initialize *w and *l.
292 * class.c: Add prototype for binfo_ctor_vtable.
293 (get_primary_binfo): Initialize result.
294 * init.c (build_java_class_ref): Initialize name.
296 2001-07-09 Erik Rozendaal <dlr@acm.org>
298 * typeck.c (unary_complex_lvalue): Do not duplicate the
299 argument to modify, pre-, or post-increment when used as an
300 lvalue and when the argument has side-effects.
302 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
304 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
305 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
306 cplus_decl_attributes even if attrs is NULL.
307 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
309 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
311 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
312 calls to decl_attributes.
314 2001-07-06 Ira Ruben <ira@apple.com>
316 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
317 be DECL_TEMPLATE_RESULT.
319 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
321 * cp-tree.h (copy_template_template_parm): Rename to ...
322 (bind_template_template_parm): ... here.
323 * tree.c (copy_template_template_parm): Rename to ...
324 (bind_template_template_parm): ... here. Remove the case when
325 NEWARGS is NULL_TREE.
326 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
327 BOUND_TEMPLATE_TEMPLATE_PARM.
328 * pt.c (lookup_template_class): Adjust.
330 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
332 * cvt.c (convert_lvalue): New fn.
333 * cp-tree.h: Declare it.
334 * method.c (do_build_assign_ref): Use it.
335 (do_build_copy_constructor): Convert parm to base types
336 before calling base constructors.
338 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
339 DECL_USER_ALIGN. Check flag_elide_constructors instead of
341 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
343 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
345 * optimize.c (optimize_inline_calls): New function, broken out
347 (optimize_function): ... here. Call it. Don't inline if it is
349 (dump_function): Print name of dump flag causing this dump.
350 * semantics.c (expand_body): Move thunk inline check to
353 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
355 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
356 (comptypes): Use target.comp_type_attributes.
358 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
360 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
362 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
364 * error.c (lang_print_error_function): Add a `diagnostic_context *'
367 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
369 * decl2.c (import_export_class): Update.
371 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
373 * error.c (init_error): Adjust settings.
375 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
377 * error.c (init_error): Adjust settings.
379 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
381 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
382 return pointers to data members by reference rather than by value.
384 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
386 Implement the Named Return Value optimization.
387 * cp-tree.h (struct cp_language_function): Add x_return_value.
388 (current_function_return_value): Now a macro.
389 * decl.c: Don't define it.
390 (define_label, finish_case_label): Don't clear it.
391 (init_decl_processing): Don't register it with GC.
392 * semantics.c (genrtl_finish_function): Don't check it for
393 no_return_label. Copy the RTL from the return value to
394 current_function_return_value and walk, calling...
395 (nullify_returns_r): ...this new fn.
396 * typeck.c (check_return_expr): Set current_function_return_value.
398 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
400 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
401 sharing a ctor vtable with. Merge code for cases 1 and 2.
402 (binfo_ctor_vtable): New fn.
403 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
405 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
407 * class.c (dfs_find_final_overrider): Fix logic.
409 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
410 virtual thunk instead of non-virtual.
411 (get_matching_virtual): Uncomment.
413 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
414 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
417 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
419 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
420 we've not emerged from the hierarchy of RTTI_BINFO on reaching
423 2001-06-13 Mark Mitchell <mark@codesourcery.com>
425 * NEWS: Update release number.
427 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
429 PR c++/3130, c++/3131, c++/3132
430 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
431 * class.c (force_canonical_binfo_r): Move
432 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
433 virtual bases unless they're primary and what they're primary
435 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
436 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
437 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
439 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
440 (layout_nonempty_base_or_field): Add most derived type
442 (layout_empty_base): Likewise.
443 (build_base_field): Likewise.
444 (build_base_fields): Likewise.
445 (propagate_binfo_offsets): Add most derived type
446 parameter. Skip non canonical virtual bases too.
447 (dfs_set_offset_for_unshared_vbases): Don't skip primary
448 bases. Do skip canonical bases.
449 (layout_virtual_bases): Adjust.
450 (layout_class_type): Adjust.
451 (dfs_get_primary_binfo): Build list of virtual primary base
453 (get_primary_binfo): Check that the shared virtual primary
454 base candidate was found first.
455 (accumulate_vtbl_inits): Don't do anything for non-vptr
456 containing binfos. For case 1 primary virtual bases, keep
457 checking that we've not emerged from the hierarchy of RTTI_BINFO.
459 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
462 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
463 hierarchy looking for primary bases for a ctor
464 vtable. Recursively call oneself, if we meet our primary via
465 this route and haven't met it yet via inheritance graph order.
467 2001-06-11 Mark Mitchell <mark@codesourcery.com>
469 * lang-options.h: Emit documentation for -fno-honor-std, not
472 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
474 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
476 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
478 2001-06-10 Mark Mitchell <mark@codesourcery.com>
479 Gabriel Dos Reis <gdr@codesourcery.com>
481 * Make-lang.in (cp/call.o): Depend on diagnostic.h
482 (cp/typeck.o): Depend on diagnostic.h
483 (cp/typeck2.o): Depend on diagnostic.h
484 (cp/repo.o): Depend on dignostic.h
485 * typeck.c: #include diagnostic.h
486 (convert_for_initialization): Remove extern declaration for
487 warningcount and errorcount.
489 * call.c: #include diagnostic.h
490 (convert_like_real): Remove extern declaration for warnincount and
493 * repo.c: #include diagnostic.h
494 * typeck2.c: #include diagnostic.h
496 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
498 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
501 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
504 * friend.c (do_friend): Use push_decl_namespace for classes at
507 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
508 Jason Merrill <jason_merrill@redhat.com>
511 * class.c (build_secondary_vtable): Use assert, rather than an error
513 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
514 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
515 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
516 Don't set BINFO_VTABLE for a primary virtual base.
518 2001-06-07 Mark Mitchell <mark@codesourcery.com>
520 * decl.c (duplicate_decls): Update source position information
521 when a template function is defined.
523 2001-06-07 Phil Edwards <pme@sources.redhat.com>
525 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
527 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
530 * decl.c (pushtag): Don't push into a complete type's scope.
532 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
534 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
535 (struct lang_decl_flags): Lose generate_with_vtable_p.
536 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
537 * class.c (copy_virtuals): Adjust.
538 * decl2.c (mark_vtable_entries): Adjust.
539 * method.c (make_thunk, build_vtable_entry): Adjust.
540 * class.c (update_vtable_entry_for_fn): Only look as far as the
541 first defining class.
542 (build_vtbl_initializer): Put nothing in the slot for a function only
543 defined in a lost primary virtual base.
544 (add_vcall_offset_vtbl_entries_1): Use the same code for
545 the lost primary case and the normal case.
546 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
547 (get_vfield_offset, get_derived_offset): Lose.
548 (dfs_find_final_overrider): Use look_for_overrides_here.
549 (get_matching_virtual): New fn.
550 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
552 * search.c (look_for_overrides_here): Split out from...
553 (look_for_overrides_r): Here.
555 * class.c (find_final_overrider): Return error_mark_node on error.
557 * decl2.c (key_method): #if 0 accidental change.
559 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
561 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
562 (build_over_call): Likewise.
563 * decl.c (grokparms): Likewise.
564 * pt.c (tsubst_decl): Likewise.
565 * typeck.c (convert_arguments): Likewise.
567 2001-06-05 Mark Mitchell <mark@codesourcery.com>
569 * semantics.c (begin_class_definition): Robustify.
571 * pt.c (instantiate_decl): Tell the repository code about the
572 clones, not the cloned functions.
573 * repo.c (repo_template_used): Explicitly instantiate the cloned
574 function, not the clones.
576 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
578 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
579 ICS_BAD_FLAG on created conversion.
580 (compare_ics): Break out rank.
582 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
584 * decl.c (xref_tag): Remove extraneous %s on dependent name
587 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
589 * class.c (layout_vtable_decl): Fix off by one error on
591 (build_vtt): Likewise.
592 (build_ctor_vtbl_group): Likewise.
594 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
596 * class.c (maybe_indent_hierarchy): New function.
597 (dump_class_hierarchy_r): Add flags. Dump extra binfo
598 information, if enabled. Use maybe_indent_hierarchy. Adjust
600 (dump_class_hierarchy): Adjust prototype. Adjust output format.
601 (dump_array, dump_vtable, dump_vtt): New functions.
602 (finish_struct_1): Adjust hierarchy dumping.
603 (initialize_vtable): Call dump_vtable.
604 (build_vtt): Call dump_vtt.
605 (build_ctor_vtbl_group): Call dump_vtable.
606 * decl2.c (flag_dump_class_layout): Remove.
607 (cxx_decode_option): Remove dump translation unit
608 and dump class hierarchy check. Call dump_switch_p.
609 (finish_file): Adjust dumping.
610 (dump.c): Only dump base classes if not TDF_SLIM.
611 Only dump namespace members if not TDF_SLIM.
612 * optimize.c (dump_function): New function.
613 (optimize_function): Call dump_function.
614 * semantics.c (expand_body): Use dump_enabled_p.
616 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
619 Part missed from first commit
620 * decl2.c (finish_anon_union): Copy context.
622 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
625 * optimize.c (remap_decl): Remap anonymous aggregate members too.
627 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
630 * semantics.c (expand_body): Don't optimize thunks.
632 2001-05-25 Sam TH <sam@uchicago.edu>
634 * cp-tree.h lex.h: Fix header include guards.
636 2001-05-25 Mark Mitchell <mark@codesourcery.com>
638 * decl.c (init_decl_processing): Tweak.
640 2001-05-24 Mark Mitchell <mark@codesourcery.com>
642 * decl.c (duplicate_decls): Tidy.
643 (init_decl_processing): Always set flag_no_builtin.
645 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
648 * decl2.c (do_local_using_decl): Push the decls, even in a
651 2001-05-22 Mark Mitchell <mark@codesourcery.com>
653 * optimize.c (initialize_inlined_parameters): Don't set
654 TREE_READONLY for a VAR_DECL taking the place of an inlined
657 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
659 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
660 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
663 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
665 * parse.y: Refer to compound literals as such, not as
666 constructor-expressions.
668 2001-05-21 Mark Mitchell <mark@codesourcery.com>
670 * call.c (build_op_delete_call): Ignore exception-specifications
671 when looking for matching delete operators.
672 * init.c (build_new_1): Compute whether or not the allocation
673 function used is a placement allocation function or not, and
674 communicate this information to build_op_delete_call.
676 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
678 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
679 (build_vtbl_ref): Adjust.
680 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
681 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
683 (unsupported_options): Correspondingly.
685 * decl2.c (maybe_make_one_only): Check flag_weak, not
688 * cp-tree.def (START_CATCH_STMT): Lose.
689 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
690 * tree.c (cp_statement_code_p): Don't case it.
691 * semantics.c (cp_expand_stmt): Likewise.
692 * cp-tree.h (START_CATCH_TYPE): Lose.
694 * except.c (expand_start_catch_block): Don't start any blocks.
696 (expand_end_catch_block): Don't end any blocks.
697 * parse.y (handler): Don't pass anything from finish_handler_parms
699 * pt.c (tsubst_expr): Likewise.
700 * semantics.c (begin_handler): Call note_level_for_catch here.
701 (finish_handler_parms): Don't return anything.
702 (genrtl_catch_block, begin_catch_block): Lose.
703 (genrtl_handler): Call expand_start_catch here.
705 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
707 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
708 (get_vtable_decl, build_vtt): Not here.
710 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
713 * optimize.c (update_cloned_parm): Copy addressability and other
716 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
718 * pt.c (determine_specialization): Ignore artificial functions.
720 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
722 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
723 (C_RID_CODE): Remove.
724 * lex.c (cxx_init_options): Call set_identifier_size. Update.
725 (init_parse): Don't do it here.
727 2001-05-18 Diego Novillo <dnovillo@redhat.com>
729 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
730 function declaration to avoid stripping the symbol's attributes.
732 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
734 * decl.c (pushdecl): Adjust error string.
735 (xref_tag): Adjust friend class injection warning. Remove the
736 inherited name from the class shadowed scope.
738 2001-05-17 Mark Mitchell <mark@codesourcery.com>
740 * except.c (cp_protect_cleanup_actions): New function.
741 (init_exception_processing): Don't set protect_cleanup_actions
742 here. Do set lang_protect_cleanup_actions.
744 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
746 * spew.c (read_token): Call yyerror on all unexpected tokens.
748 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
750 * init.c (member_init_ok_or_else): Take a tree rather than
752 (expand_member_init): Adjust.
754 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
756 * decl.c (duplicate_decls): Suppress warning about duplicate
757 decls if the first decl is a friend.
759 2001-05-12 Zack Weinberg <zackw@stanford.edu>
761 * except.c (choose_personality_routine): Export. Add
762 explanatory comment. Take an enum languages, not a boolean.
763 (initialize_handler_parm): Adjust to match.
764 * cp-tree.h: Prototype choose_personality_routine.
765 * lex.c (handle_pragma_java_exceptions): New function.
766 (init_cp_pragma): Register #pragma GCC java_exceptions.
768 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
770 * method.c (build_mangled_C99_name): Remove unused prototype.
772 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
774 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
775 * typeck.c (get_member_function_from_ptrfunc,
776 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
777 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
779 Reverted Geoff Keating's 2001-05-03's patch.
781 2001-05-11 Ira Ruben <ira@apple.com>
783 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
785 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
787 * cp-tree.h (finish_label_expr, lookup_label): Delete.
788 * parse.y: Update for '&&'; don't issue warning here.
789 * semantics.c (finish_label_expr): Delete.
791 2001-05-07 Mark Mitchell <mark@codesourcery.com>
793 * splay-tree.h (splay_tree_max): New function.
794 (splay_tree_min): Likewise.
796 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
798 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
799 (pfn_vflag_identifier): Define.
800 Update comment about layout of pointer functions.
801 (build_ptrmemfunc1): Update prototype.
802 (expand_ptrmemfunc_cst): Update prototype.
803 * decl.c (initialize_predefined_identifiers): Initialize
804 pfn_vflag_identifier.
805 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
806 an extra field to the type.
807 * expr.c (cplus_expand_constant): Pass 'flag' between
808 expand_ptrmemfunc_cst and build_ptrmemfunc1.
809 * typeck.c (get_member_function_from_ptrfunc): When
810 FUNCTION_BOUNDARY < 16, look at additional field to determine
811 if a pointer-to-member is a real pointer or a vtable offset.
812 (build_ptrmemfunc1): Add new parameter to contain extra field.
813 (build_ptrmemfunc): Pass the extra field around.
814 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
815 (pfn_from_ptrmemfunc): Ignore the extra field.
817 2001-05-03 Mark Mitchell <mark@codesourcery.com>
819 * cp-tree.h (flag_inline_trees): Update documentation.
820 * decl.c (init_decl_processing): Adjust handling of
821 flag_inline_functions and flag_inline_trees to support -O3.
822 (grokfndecl): Set DECL_INLINE on all functions if that's what
824 (save_function_data): Clear DECL_INLINE in
825 current_function_cannot_inline is non-NULL.
826 * decl2.c (flag_inline_trees): Update documentation.
828 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
830 * dump.c (cp_dump_tree, USING_STMT case): New case.
831 * tree.c (cp_statement_code_p): Add USING_STMT.
832 * decl2.c (do_using_directive): Add the using directive statement.
834 * tree.c (walk_tree): Reformat an if block.
836 2001-05-02 Mark Mitchell <mark@codesourcery.com>
838 * decl.c (compute_array_index_type): Don't try to do anything with
839 the indices when processing a template.
841 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
843 * call.c: NULL_PTR -> NULL.
848 * except.c: Likewise.
851 * search.c: Likewise.
853 * typeck.c: Likewise.
854 * typeck2.c: Likewise.
856 2001-05-02 Mark Mitchell <mark@codesourcery.com>
858 * decl2.c (do_using_directive): Revert previous patch.
860 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
862 * cp-tree.def (USING_STMT): New statement node.
863 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
864 * decl2.c (do_using_directive): Add USING_STMT to statement
865 tree. Don't emit errors when processing template decl.
866 * pt.c (tsubst_expr, USING_STMT case): New case.
867 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
869 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
871 * call.c (build_new_op): Convert args from reference here.
872 (build_conditional_expr): Don't convert here.
874 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
876 * spew.c (last_token_id): New static variable.
877 (read_token): Set it here.
878 (yyerror): Use it here.
880 2001-04-30 Richard Henderson <rth@redhat.com>
882 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
885 2001-04-30 Mark Mitchell <mark@codesourcery.com>
887 * gxxint.texi: Remove.
888 * Make-lang.in: Remove all traces of gxxint.texi.
890 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
892 * decl2.c (start_static_initialization_or_destruction): Correct
893 logic to handle the -fno-use-cxa-atexit case.
895 2001-04-30 Mark Mitchell <mark@codesourcery.com>
897 * optimize.c (update_cloned_parm): New function.
898 (maybe_clone_body): Use it. Update the `this' parameter too.
900 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
902 * decl2.c (unsupported_options): Add new-abi.
903 * lang-options.h: Remove no longer supported options.
905 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
907 * except.c (can_convert_eh): Don't check template parms,
910 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
912 * optimize.c (maybe_clone_body): Copy parameter names and locations.
914 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
916 * cp-tree.h (adjust_clone_args): Prototype new function.
917 * class.c (adjust_clone_args): New function.
918 * decl.c (start_function): Call it for in charge ctors.
920 2001-04-26 Mark Mitchell <mark@codesourcery.com>
922 * method.c (use_thunk): Make sure that thunks really are emitted
925 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
927 * mangle.c (write_chars): New macro.
928 (hwint_to_ascii): New function
929 (write_number): Use it.
930 (write_integer_cst): Deal with really big numbers.
932 2001-04-25 Mark Mitchell <mark@codesourcery.com>
934 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
937 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
939 * decl.c (grokdeclarator): Set context of namespace scope
942 2001-04-24 Zack Weinberg <zackw@stanford.edu>
944 * cp/optimize.c: Include hashtab.h.
945 (struct inline_data): Add tree_pruner.
946 (expand_call_inline, expand_calls_inline): Use it when calling
948 (optimize_function): Initialize and free tree_pruner.
950 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
952 Lazy __FUNCTION__ generation.
953 * cp-tree.def (FUNCTION_NAME): Remove.
954 * cp-tree.h (function_name_declared_p): Remove.
955 (cp_fname_init): Prototype.
956 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
957 don't call declare_function_name. Call start_fname_decls.
958 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
959 clobber the line number.
960 (cp_fname_init): New function.
961 (start_function): Call start_fname_decls.
962 (finish_function): Call finish_fname_decls.
963 * lex.c (reswords): Add slots for __FUNCTION__ et al.
964 (rid_to_yy): Add mappings for __FUNCTION__ et al.
965 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
966 * parse.y (VAR_FUNC_NAME): New token.
967 (primary): Add VAR_FUNC_NAME.
968 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
970 (tsubst, FUNCTION_NAME case): Remove.
971 (tsubst_copy, FUNCTION_NAME case): Remove.
972 (tsubst_expr, DECL_STMT case): Be careful with a
973 DECL_PRETTY_FUNCTION_P.
974 (instantiate_decl): Remove function_name_declared_p.
975 * semantics.c (begin_compound_statement): Don't call
976 declare_function_name here.
977 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
978 (finish_translation_unit): Call finish_fname_decls.
979 (expand_body): Remove function_name_declared_p.
980 * typeck2.c (digest_init): Allow any ERROR_MARK.
982 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
984 * pt.c (tsubst_decl): Use VOID_TYPE_P.
985 * semantics.c: Fix some typos.
987 2001-04-23 Phil Edwards <pme@sources.redhat.com>
989 * cp/decl2.c (flag_honor_std): Always initialize to 1.
991 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
993 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
995 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
997 * except.c (build_throw): Wrap the initialization of the exception
998 object in a MUST_NOT_THROW_EXPR.
999 (do_free_exception): #if 0.
1001 2001-04-20 Mark Mitchell <mark@codesourcery.com>
1003 * cp-tree.h (finish_enum): Change prototype.
1004 * decl.c (finish_enum): Reorganize.
1005 * parse.y (structsp): Adjust calls to finish_enum.
1007 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
1009 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
1012 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
1014 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
1015 (layout_empty_base): Return at end flag.
1016 (build_base_field): Likewise.
1017 (build_base_fields): Likewise.
1018 (layout_virtual_bases): Don't add 1 to eoc value.
1019 (end_of_class): Use full size for empty bases.
1020 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
1021 empty bases. Don't add 1 to eoc value. Only add trailing padding
1022 if we're an empty class with no empty bases.
1023 (dump_class_hierarchy): Dump size and alignment.
1025 2001-04-20 Jakub Jelinek <jakub@redhat.com>
1027 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
1030 2001-04-20 Jakub Jelinek <jakub@redhat.com>
1032 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
1033 is found, look first if name does not match the structure name.
1035 2001-04-19 Mark Mitchell <mark@codesourcery.com>
1037 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
1039 (SET_DECL_LANGUAGE): New macro.
1040 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
1041 (pushdecl): Likewise.
1042 (build_library_fn_1): Likewise.
1043 (build_cp_library_fn): Likewise.
1044 (grokfndecl): Likewise.
1045 (grokvardecl): Mark `extern "C"' variables as having C linkage.
1046 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
1047 * lex.c (retrofit_lang_decl): Likewise.
1048 * mangle.c (mangle_decl_string): Don't mangle the names of
1049 variables declared with C language linkage.
1050 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
1052 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
1054 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
1055 flag_access_control from uninitialized storage.
1057 2001-04-15 Mark Mitchell <mark@codesourcery.com>
1059 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
1060 * mangle.c (write_pointer_to_member_type): Fix mangling of
1061 pointers to cv-qualified member function types.
1063 * init.c (build_delete): Create a SAVE_EXPR for the address if
1064 we're going to use it more than once.
1066 2001-04-13 Mark Mitchell <mark@codesourcery.com>
1068 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
1069 (expand_ptremfunc_cst): Change prototype.
1070 (delta2_from_ptrmemfunc): Remove.
1071 * expr.c (cplus_expand_constant): Adjust call to
1072 expand_ptrmemfunc_cst.
1073 * typeck.c (build_ptrmemfunc1): Simplify.
1074 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
1075 results in a constant.
1076 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
1077 (delta2_from_ptrmemfunc): Remove.
1078 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
1080 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
1082 * cp-tree.h (decl_namespace_list): New macro.
1083 (struct saved_scope): Add decl_ns_list.
1084 * decl.c (mark_saved_scope): Mark it.
1085 * decl2.c: Lose static decl_namespace_list.
1086 (init_decl2): Don't save it.
1088 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1090 * cp-tree.h (warn_return_type, yylex): Delete redundant
1093 * decl.c (current_class_depth, global_namespace): Likewise.
1095 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
1097 * repo.c (flag_use_repository): Likewise.
1099 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1101 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
1102 set_block, pushdecl, getdecls, gettags, init_decl_processing,
1103 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
1104 lvalue_or_else, print_lang_statistics, comp_target_types,
1105 unsigned_type, signed_type, signed_or_unsigned_type,
1106 build_function_call, mark_addressable, incomplete_type_error):
1107 Delete redundant declarations.
1109 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
1111 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
1112 (TYPE_ANONYMOUS_P): New macro.
1113 (TAGGED_TYPE_P): New macro.
1114 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
1115 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
1116 * tree.c (no_linkage_helper): Likewise.
1117 * semantics.c (begin_class_definition): Likewise.
1118 * pt.c (convert_template_argument): Likewise.
1119 * lex.c (check_for_missing_semicolon): Likewise.
1121 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
1123 * class.c (dfs_unshared_virtual_bases): New function.
1124 (mark_primary_bases): Call it.
1125 (check_bases): Ignore virtual bases when determining
1128 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
1130 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
1132 2001-04-11 Mark Mitchell <mark@codesourcery.com>
1134 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
1135 cloned function to the clone.
1137 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1139 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
1141 * semantics.c: Include expr.h.
1143 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
1145 * method.c (implicitly_declare_fn): Commonize code for copy ctor
1146 and assignment op. Set TREE_USED for parameter.
1148 2001-04-10 Mark Mitchell <mark@codesourcery.com>
1150 * class.c (find_final_overrider_data): Add `candidates'.
1151 (dfs_find_final_overrider): Don't issue error messages
1153 (find_final_overrider): Issue error messages here.
1154 (build_base_field): Don't warn about amgibuous direct bases here.
1155 (warn_about_ambiguous_direct_bases): New function.
1156 (layout_class_type): Use it.
1158 2001-04-10 Richard Henderson <rth@redhat.com>
1160 * typeck.c (build_array_ref): Push the array reference inside
1161 COMPOUND_EXPR and COND_EXPR.
1163 2001-04-05 Mark Mitchell <mark@codesourcery.com>
1165 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
1166 * decl.c (duplicate_decls): Adjust accordingly.
1167 (maybe_commonize_var): Likewise.
1168 (grokfndecl): Likewise.
1169 (start_function): Likewise.
1170 (start_method): Likewise.
1171 * decl2.c (key_method): Likewise.
1172 (import_export_decl): Likewise.
1173 * method.c (implicitly_declare_fn): Likewise.
1174 * optimize.c (maybe_clone_body): Likewise.
1176 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
1178 * lang-specs.h: Add __DEPRECATED.
1180 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
1182 * search.c (get_dynamic_cast_base_type): When building a new
1183 constant, set its type to ssizetype.
1185 2001-04-04 Jakub Jelinek <jakub@redhat.com>
1187 * optimize.c (expand_call_inline): Only add newly inlined statements
1190 2001-04-03 Mark Mitchell <mark@codesourcery.com>
1192 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
1193 (OPERATOR_FORMAT): Likewise.
1194 (OPERATOR_TYPENAME_FORMAT): Likewise.
1195 * operators.def: Remove old name-mangling information.
1196 * decl.c (grok_op_properties): Adjust accordingly.
1197 * lex.c (init_operators): Likewise.
1198 * rtti.c (get_tinfo_decl): Issue error messages about types that
1201 2001-04-03 Mark Mitchell <mark@codesourcery.com>
1203 * decl2.c (import_export_decl): Don't call import_export_class
1204 when processing an inline member function.
1205 * semantics.c (expand_body): Call import_export_decl before
1206 emitting inline functions.
1208 2001-03-28 Richard Henderson <rth@redhat.com>
1210 IA-64 ABI Exception Handling:
1211 * cp-tree.def (EH_SPEC_BLOCK): New.
1212 (MUST_NOT_THROW_EXPR): New.
1213 * cp-tree.h: Update changed function declarations.
1214 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
1215 (CPTI_CALL_UNEXPECTED): New.
1216 (struct cp_language_function): Rename x_eh_spec_try_block
1218 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
1219 * decl.c (current_binding_level): If no current function
1220 bindings, revert to scope_chain.
1221 (initialize_predefined_identifiers): Remove __cp_push_exception.
1222 (store_parm_decls): Use begin_eh_spec_block.
1223 (finish_function): Use finish_eh_spec_block.
1224 (mark_lang_function): Update for name changes.
1225 * decl2.c (finish_file): No mark_all_runtime_matches.
1226 * dump.c (cp_dump_tree): Handle new tree codes.
1227 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
1228 * except.c (catch_language_init, catch_language): Remove.
1229 (init_exception_processing): Don't set language code.
1230 Initialize call_unexpected_node, protect_cleanup_actions,
1231 eh_personality_libfunc, lang_eh_runtime_type.
1232 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
1233 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
1234 (prepare_eh_type): Split out type canonicalizations ...
1235 (build_eh_type_type): ... from here.
1236 (build_eh_type_type_ref): Remove.
1237 (mark_all_runtime_matches): Remove.
1238 (build_exc_ptr): New.
1239 (do_begin_catch, do_end_catch): New.
1240 (do_pop_exception): Remove.
1241 (build_terminate_handler): Remove.
1242 (choose_personality_routine): Split out language choice from ...
1243 (initialize_handler_parm): ... here.
1244 Use MUST_NOT_THROW_EXPR.
1245 (expand_start_catch_block): Use do_begin_catch. Simplify Java
1246 exception object handling.
1247 (expand_start_eh_spec, expand_end_eh_spec): Remove.
1248 (expand_exception_blocks, alloc_eh_object): Remove.
1249 (begin_eh_spec_block, finish_eh_spec_block): New.
1250 (do_allocate_exception, do_free_exception): New.
1251 (expand_throw): Merge into ...
1252 (build_throw): ... here. Update for abi.
1253 * expr.c (cplus_expand_expr): No expand_internal_throw.
1254 Handle MUST_NOT_THROW_EXPR.
1255 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
1256 * semantics.c (*) Update for except.h name changes.
1257 (genrtl_try_block): No protect_with_terminate.
1258 (genrtl_eh_spec_block): New.
1259 (genrtl_handler): Don't emit the goto here.
1260 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
1261 (genrtl_finish_function): Don't expand_exception_blocks.
1262 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
1264 2001-03-28 Richard Henderson <rth@redhat.com>
1266 * decl.c (struct named_label_list): Rename eh_region to
1267 in_try_scope, add in_catch_scope.
1268 (struct binding_level): Rename eh_region to is_try_scope,
1270 (note_level_for_try): Rename from note_level_for_eh.
1271 (note_level_for_catch): New.
1272 (poplevel): Copy both is_try_scope and is_catch_scope to
1273 the named_label_list struct.
1274 (check_previous_goto_1): Don't check for catch block via
1275 DECL_ARTIFICIAL; use in_try_scope instead.
1276 (check_goto): Likewise.
1277 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
1278 * except.c (expand_start_catch_block): Call note_level_for_catch.
1279 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
1281 2001-03-27 Richard Henderson <rth@redhat.com>
1283 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
1284 exceptions_via_longjmp.
1286 2001-03-27 Phil Edwards <pme@sources.redhat.com>
1288 * pt.c (check_default_tmpl_args): Make error messages clearer.
1290 2001-03-26 Phil Edwards <pme@sources.redhat.com>
1292 * error.c: Also undefine 'A' macro used for cp_printers definition.
1294 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1296 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
1298 2001-03-26 Mike Yang <yang@research.att.com>
1299 Mark Mitchell <mark@codesourcery.com>
1301 * dump.c (dump_access): New function.
1302 (cp_dump_tree): Use it. Dump basetype information for class
1305 2001-03-26 Mark Mitchell <mark@codesourcery.com>
1307 * Makefile.in (optimize.o): Depend on params.h.
1308 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
1309 (init_decl_processing): Set flag_no_inline when doing
1311 * optimize.c: Include params.h.
1312 (struct inline_data): Improve documentation of FNS. Add
1313 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
1314 (INSNS_PER_STMT): New macro.
1315 (remap_block): Use CLONING_P.
1316 (inlinable_function_p): Don't inline big functions.
1317 (expand_call_inline): Keep track of how much inlining we've done.
1318 (optimize_function): Set FIRST_INLINED_FN.
1319 (maybe_clone_body): Set CLONING_P.
1320 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
1322 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
1323 rest_of_compilation. Clear DECL_RTL for local variables
1325 (clear_decl_rtl): New function.
1327 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
1330 * cp-tree.h (skip_type_access_control,
1331 reset_type_access_control): Prototype.
1332 * decl.c (grokdeclarator): Access of friends is not checked.
1333 * parse.y (component_decl_list): Reset type access control.
1334 * semantics.c (decl_type_access_control): Clear
1335 current_type_lookups.
1336 (save_type_access_control): Don't save if not deferring.
1337 (skip_type_access_control, reset_type_access_control): New
1339 (begin_class_definition): Do type access control for basetypes.
1340 Start deferred access control.
1341 (finish_class_definition): Resume immediate access control if
1342 this is a local class.
1344 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1346 * class.c (add_method): Use memcpy/memmove, not bcopy.
1348 * decl.c (duplicate_decls): Likewise.
1350 2001-03-23 Jakub Jelinek <jakub@redhat.com>
1352 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
1355 2001-03-23 Jakub Jelinek <jakub@redhat.com>
1357 * decl.c (local_names): Define.
1358 (push_local_name): New.
1359 (grok_reference_init): Return init if initializing static reference
1360 variable with non-constant instead of emitting it.
1361 Move expand_static_init call to cp_finish_decl.
1362 (layout_var_decl): Call push_local_name.
1363 (maybe_commonize_var): Allow inlining functions even if they have
1364 static local variables, use comdat_linkage for them if flag_weak.
1365 (check_initializer): Call obscure_complex_init if
1366 grok_reference_init returned non-zero.
1367 (save_function_data): Clear x_local_names.
1368 (pop_cp_function_context): Free x_local_names.
1369 (mark_inlined_fns): Remove.
1370 (mark_lang_function): Mark x_local_names.
1371 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
1372 Mark inlined_fns as tree, remove call to mark_inlined_fns.
1373 * class.c (alter_access): Ensure DECL_ACCESS is never set if
1374 DECL_DISCRIMINATOR_P.
1375 * cp-tree.h (cp_language_function): Add x_local_names.
1376 (lang_decl_flags): Add discriminator into u2.
1377 (lang_decl_inlined_fns): Remove.
1378 (lang_decl): inlined_fns is now a TREE_VEC.
1379 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
1380 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
1381 TREE_VEC, not a custom structure.
1382 (optimize_function): Likewise.
1383 * mangle.c (discriminator_for_local_entity): Discriminate among
1384 VAR_DECL local entities.
1385 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
1388 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
1390 Add support for Java interface method calls.
1391 * cp-tree.h (struct lang_type): Add java_interface flag.
1392 (TYPE_JAVA_INTERFACE): New macro.
1393 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
1394 by setting TYPE_JAVA_INTERFACE.
1395 * call.c (java_iface_lookup_fn): New static.
1396 (build_over_call): If calling a method declared in a
1397 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
1398 expression which resolves the function address.
1399 (build_java_interface_fn_ref): New function.
1401 2001-03-22 Richard Henderson <rth@redhat.com>
1403 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
1404 * except.c: Don't include it.
1406 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
1407 based on an idea from Joe Buck <jbuck@synopsys.com>
1409 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
1411 (data_def, component_decl): Add reductions to bad_decl.
1413 2001-03-22 Jakub Jelinek <jakub@redhat.com>
1415 * method.c (do_build_assign_ref): Don't use build_modify_expr for
1416 anonymous aggregates, since they don't have assignment operator
1418 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
1419 assignment operators for anonymous structure fields.
1421 2001-03-21 Jason Merrill <jason@redhat.com>
1423 * pt.c (instantiate_decl): Abort if we see a member constant
1424 instantiation that doesn't already have its initializer.
1425 Downgrade explicit instantiation without definition to pedwarn.
1427 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
1428 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
1429 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
1431 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
1432 (pending_vtables): Remove.
1433 * decl2.c (pending_vtables): Remove.
1434 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
1435 CLASSTYPE_VTABLE_NEEDS_WRITING.
1436 (import_export_class): Likewise.
1437 (init_decl2): Don't mark pending_vtables.
1438 * lex.c (handle_pragma_vtable): Just sorry.
1439 * pt.c (instantiate_class_template): Don't mess with
1440 CLASSTYPE_VTABLE_NEEDS_WRITING.
1441 (mark_class_instantiated): Likewise.
1442 * ptree.c (print_lang_type): Don't print it.
1443 * semantics.c (begin_class_definition): Don't set it.
1445 * pt.c (template_tail): Replace with last_pending_template.
1446 (maybe_templates, maybe_template_tail): Remove.
1447 (add_pending_template): Adjust.
1448 (instantiate_pending_templates): Adjust.
1450 * cp-tree.h (struct saved_scope): Remove lang_stack field.
1451 (current_lang_stack): Remove.
1452 * decl.c (maybe_push_to_top_level): Don't initialize it.
1453 (duplicate_decls): Use current_lang_depth.
1454 (xref_basetypes): Likewise.
1455 * class.c (current_lang_depth): New fn.
1456 (push_lang_context): Use more varray functionality.
1457 (pop_lang_context): Likewise.
1459 * error.c (GLOBAL_THING): Always use '__'.
1461 2001-03-21 Mark Mitchell <mark@codesourcery.com>
1463 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
1465 * mangle.c (mangle_decl_string): Mangle the names of overloaded
1466 operators, even when they have `extern "C"' linkage.
1468 2001-03-19 Mark Mitchell <mark@codesourcery.com>
1470 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
1471 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1472 where it's not necessary.
1473 (add_method): Remove optimization involving comparison of
1474 DECL_ASSEMBLER_NAME.
1475 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
1476 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1477 where it's not necessary.
1478 (check_methods): Likewise.
1479 (build_clone): Likewise.
1480 (built_vtt): Likewise.
1481 * cp-tree.h (DECL_NEEDED_P): Likewise.
1482 * decl.c (pushtag): Likewise.
1483 (duplicate_decls): Likewise.
1484 (pushdecl): Likewise.
1485 (builtin_function): Likewise.
1486 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
1487 (build_cp_library_fn): Likewise.
1488 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
1489 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1490 where it's not necessary.
1491 (make_rtl_for_nonlocal_decl): Likewise.
1492 (cp_finish_decl): Likewise.
1493 (grokfndecl): Likewise.
1494 (grokvardecl): Likewise.
1495 (grokdeclarator): Likewise.
1496 (start_function): Likewise.
1497 (cp_missing_return_ok_p): Likewise.
1498 * decl2.c (grokclassfn): Likewise.
1499 (check_classfn): Likewise.
1500 (finish_static_data_member_decl): Likewise.
1501 (grokfield): Likewise.
1502 * error.c (GLOBAL_IORD_P): Remove.
1503 (dump_global_iord): Improve output.
1504 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
1505 * except.c (nothrow_libfn_p): Summarily reject any function not in
1507 * init.c (build_java_class_ref): Don't explicitly set
1508 DECL_ASSEMBLER_NAME after calling mangle_decl.
1509 * mangle.c (mangle_decl_string): Handle extern "C" functions.
1510 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
1511 * method.c (set_mangled_name_for_decl): Don't explicitly set
1512 DECL_ASSEMBLER_NAME after calling mangle_decl.
1513 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
1514 IDENTIFIER_GLOBAL_VALUE for the thunk.
1515 * pt.c (set_mangled_name_for_template_decl): Remove.
1516 (check_explicit_specialization): Don't use it.
1517 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
1518 (tsubst_friend_function): Likewise.
1519 (tsubst_decl): Likewise.
1520 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
1521 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
1522 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
1523 where it's not necessary.
1524 (tinfo_base_init): Likewise.
1525 (create_real_tinfo_var): Likewise.
1526 * search.c (looup_field_1): Likewise.
1527 * semantics.c (finish_named_return_value): Likewise.
1528 * tree.c (init_tree): Set lang_set_decl_assembler_name.
1530 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
1532 Correct semantics restrictions checking in throw-expression.
1533 * except.c (is_admissible_throw_operand): New function.
1534 (build_throw): Use it.
1536 2001-03-14 Mark Mitchell <mark@codesourcery.com>
1538 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
1541 2001-03-14 Mark Mitchell <mark@codesourcery.com>
1543 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1544 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
1545 * decl.c (duplicate_decls): Likewise.
1546 (builtin_function): Likewise.
1547 (build_library_fn): Likewise.
1548 (build_cp_library_fn): Likewise.
1549 (check_initializer): Likewise.
1550 (cp_finish_decl): Likewise.
1551 * decl2.c (grokfield): Likewise.
1552 (grok_function_init): Remove #if 0'd code.
1553 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
1554 * friend.c (do_friend): Likewise.
1555 * init.c (get_temp_regvar): Likewise.
1556 * method.c (make_thunk): Likewise.
1557 * pt.c (tsubst_friend_function): Likewise.
1558 (tsubst_decl): Likewise.
1559 (regenerate_decl_from_template): Likewise.
1560 * semantics.c (genrtl_named_return_value): Likewise.
1561 (expand_body): Likewise.
1562 (genrtl_finish_function): Likewise.
1563 * tree.c (cp_tree_equal): Likewise.
1565 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
1567 * call.c (convert_like_real): Add extra semantics to INNER
1568 parameter. Don't convert to temporary if a user conversion
1569 gives us an lvalue that we're about to bind to a reference.
1570 Set INNER to indicate pending reference binding on recursive
1573 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
1575 * cp/lex.c: Delete duplicate pending_lang_change.
1577 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
1579 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
1581 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
1582 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
1584 2001-03-09 Zack Weinberg <zackw@stanford.edu>
1586 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
1588 2001-03-08 Stan Shebs <shebs@apple.com>
1590 * cp-tree.h (set_identifier_local_value): Remove unused decl.
1592 2001-03-06 Zack Weinberg <zackw@stanford.edu>
1594 * spew.c: Remove references to CPP_OSTRING.
1596 2001-03-06 Andrew Haley <aph@redhat.com>
1598 * typeck.c (convert_arguments): Check that we have an fndecl.
1600 2001-03-05 Andrew Haley <aph@redhat.com>
1602 * typeck.c (convert_arguments): Don't do ellipsis conversion for
1603 __built_in_constant_p.
1605 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1607 * typeck.c (build_static_cast): Allow enum to enum conversions
1610 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1612 * class.c (check_field_decls): Pointers to member do not a
1613 non-pod struct make, as per DR 148.
1615 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
1617 * call.c (joust): cp_pedwarn when using gnu extension concerning
1618 worst conversion sequences.
1620 2001-03-01 Zack Weinberg <zackw@stanford.edu>
1622 * decl.c: Replace all uses of 'boolean' with 'bool'.
1624 2001-03-01 Zack Weinberg <zackw@stanford.edu>
1626 * lang-specs.h: Add zero initializer for cpp_spec field to
1627 all array elements that need one. Don't put an #ifdef inside
1628 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
1631 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
1633 Implement using decls inside template functions.
1634 * decl2.c (validate_nonmember_using_decl): Don't special case
1635 fake_std_node in the global namespace. Don't reject early when
1636 processing a template.
1637 (do_local_using_decl): Add to statement tree. Don't do further
1638 processing when building a template.
1639 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
1641 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
1643 * decl2.c (do_nonmember_using_decl): Don't complain if we find
1644 same function. Do complain about ambiguating extern "C"
1647 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
1649 Remove floating point and complex type template constant parms.
1650 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
1651 COMPLEX_TYPE extensions.
1652 (invalid_nontype_parm_type_p): Likewise.
1654 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
1656 * except.c (call_eh_info): Revert "match_function"'s type.
1658 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
1660 Fix ctor vtable vcall offsets.
1661 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
1662 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
1663 (get_matching_base): Remove.
1664 (get_original_base): New function.
1665 (build_vtbl_initializer): Initialize vid.rtti_binfo.
1666 Use a virtual thunk for a ctor vtable with an index
1667 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
1668 primary base within a constructor vtable. Only set
1669 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
1670 when primary base has been lost.
1671 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
1673 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
1675 * call.c (joust): Ensure more_specialized()'s argument length
1676 parameter has correct value for constructors.
1678 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
1680 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
1682 * decl.c (mark_inlined_fns): Prototype.
1684 2001-02-22 Mark Mitchell <mark@codesourcery.com>
1686 * spew.c (yylex): Correct handling of friends.
1688 2001-02-22 Mark Mitchell <mark@codesourcery.com>
1690 * mangle.c (write_encoding): Pass write_function_type the
1691 FUNCTION_DECL for the function being encoded.
1692 (write_function_type): Pass it along to write_bare_function_type.
1693 (write_bare_function_type): Pass it along to write_method_parms.
1694 (write_method_parms): Don't mangle the compiler-generated
1695 parameters to a constructor or destructor.
1697 2001-02-22 Andreas Jaeger <aj@suse.de>
1699 * optimize.c: Include toplev.h for
1700 note_deferral_of_defined_inline_function prototype.
1702 2001-02-22 Jakub Jelinek <jakub@redhat.com>
1704 * cp-tree.h (struct lang_decl_inlined_fns): New.
1705 (struct lang_decls): Add inlined_fns.
1706 (DECL_INLINED_FNS): New macro.
1707 * optimize.c (struct inline_data): Add inlined_fns.
1708 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
1709 (inlinable_function_p): Likewise, fix typo in comment,
1710 function is not inlinable if it already inlined function currently
1712 (expand_call_inline): Add fn to inlined_fns if neccessary.
1713 (optimize_function): Initialize inlined_fns.
1714 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
1715 * decl.c (mark_inlined_fns): New function.
1716 (lang_mark_tree): Call it.
1718 2001-02-21 Jason Merrill <jason@redhat.com>
1720 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
1721 (DECL_UNINLINABLE): Move to middle-end.
1723 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
1724 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
1725 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
1726 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
1727 parms and outer BLOCK. note_deferral_of_defined_inline_function.
1729 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
1732 2001-02-19 Mark Mitchell <mark@codesourcery.com>
1734 * decl2.c (set_decl_namespace): Allow explicit instantiations in
1737 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1739 * optimize.c (expand_call_inline): Don't walk subtrees of type
1742 2001-02-18 Mark Mitchell <mark@codesourcery.com>
1744 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
1747 2001-02-18 Jason Merrill <jason@redhat.com>
1749 Do put the VTT parameter in DECL_ARGUMENTS.
1750 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
1751 (current_vtt_parm): New macro.
1752 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
1753 (DECL_HAS_VTT_PARM_P): New macro.
1754 (DECL_VTT_PARM): Remove.
1755 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
1756 * decl.c (duplicate_decls): Only copy the operator code if
1758 (start_function): Set current_vtt_parm.
1759 (lang_mark_tree): Don't mark vtt_parm.
1760 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
1761 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
1762 * class.c (build_clone): Maybe remove the VTT parm.
1763 * optimize.c (maybe_clone_body): Set up the VTT parm.
1764 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
1765 * call.c (build_over_call): Just allow the VTT arg.
1766 * method.c (make_thunk): Don't set DECL_VTT_PARM.
1767 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
1768 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
1769 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
1770 * error.c (dump_function_decl): Likewise.
1771 * call.c (build_user_type_conversion_1, convert_like_real): Abort
1772 if we try to call a constructor with in-charge or VTT parms.
1773 * method.c (skip_artificial_parms_for): New fn.
1774 * call.c (add_function_candidate, build_over_call): Call it.
1775 * call.c (build_new_method_call): Use current_vtt_parm.
1776 * init.c (expand_virtual_init): Likewise.
1777 * class.c (same_signature_p): No longer static.
1778 * cp-tree.h: Declare it.
1779 * search.c (look_for_overrides_r): Use it.
1781 2001-02-17 Mark Mitchell <mark@codesourcery.com>
1783 * cp-tree.h (new_abi_rtti_p): Remove.
1784 (name_mangling_version): Likewise.
1785 (flag_do_squangling): Likewise.
1786 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
1787 * decl.c (grokfndecl): Likewise.
1788 * decl2.c (name_mangling_version): Remove.
1789 (flag_do_squangling): Likewise.
1790 (lang_f_options): Remove `squangle'.
1791 (unsupported_options): Add `squangle'.
1792 (cxx_decode_option): Issue a warning about uses of
1793 -fname-mangling-version.
1794 (finish_file): Remove old ABI support.
1795 * pt.c (check_explicit_specialization): Likewise.
1796 (tsubst_decl): Likewise.
1797 * rtti.c (init_rtti_processing): Likewise.
1798 (build_headof): Likewise.
1799 (get_tinfo_decl_dynamic): Likewise.
1800 (tinfo_from_decl): Likewise.
1801 (build_dynamic_cast_1): Likewise.
1802 (synthesize_tinfo_var): Likewise.
1803 * init.c (build_new): Allow enumeration types for the array-bounds
1804 in a direct-new-declarator.
1806 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
1808 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
1809 TREE_PROTECTED from the template being specialized.
1811 2001-02-17 Jason Merrill <jason@redhat.com>
1813 * decl2.c (build_artificial_parm): Set TREE_READONLY.
1815 * decl.c (bad_specifiers): Allow throw specs on things with
1816 pointer-to-function or -member-function type.
1817 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
1820 2001-02-17 Mark Mitchell <mark@codesourcery.com>
1822 * call.c (check_dtor_name): Handle template names correctly.
1824 2001-02-16 Jason Merrill <jason@redhat.com>
1826 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
1827 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
1828 * optimize.c (maybe_clone_body): Don't substitute it.
1829 * call.c (build_new_method_call): Check in_chrg instead.
1830 * init.c (expand_virtual_init): Likewise.
1832 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
1834 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
1835 class-type introduces at least a type-name.
1837 2001-02-16 Jakub Jelinek <jakub@redhat.com>
1839 * call.c (convert_like_real): Create a temporary for non-lvalue.
1841 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
1843 * cp-tree.h: Fix typos in comments.
1845 2001-02-16 Jason Merrill <jason@redhat.com>
1847 * optimize.c (remap_block): If we're compiling a clone, pass the
1848 new block to insert_block.
1850 2001-02-16 Mark Mitchell <mark@codesourcery.com>
1852 * semantics.c (finish_asm_stmt): Robustify.
1854 2001-02-15 Mark Mitchell <mark@codesourcery.com>
1856 * pt.c (push_template_decl_real): Don't remangle the name of a
1859 2001-02-15 Jim Meyering <meyering@lucent.com>
1861 * Make-lang.in (c++.install-common): Depend on installdirs.
1862 (c++.install-info): Likewise.
1863 (c++.install-man): Likewise.
1865 2001-02-15 Mark Mitchell <mark@codesourcery.com>
1867 * typeck2.c (build_m_component_ref): Robustify.
1869 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
1871 * friend.c (do_friend): Don't take the nested [template] class
1872 into account when deciding whether to warn about the friend
1873 function not referring to a template function.
1875 2001-02-14 Jakub Jelinek <jakub@redhat.com>
1877 * typeck.c (build_unary_op): Clarify error message.
1879 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
1881 * parse.y (component_constructor_declarator): allow optional
1882 parentheses around constructor class name.
1884 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1886 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
1888 * init.c (emit_base_init): Remove incorrect comment about
1890 * method.c (make_thunk): Fix comment alignment.
1892 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1894 Kill remnants of this is variable.
1895 * cp-tree.h (flag_this_is_variable): Remove.
1896 * decl2.c (flag_this_is_variable): Remove.
1897 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
1898 (build_vbase_path): The path is non-static, even in a cdtor.
1899 (resolves_to_fixed_type_p): Add additional return value.
1900 * search.c (init_vbase_pointers): Adjust.
1901 * tree.c (lvalue_p_1): Adjust.
1902 * typeck.c (mark_addressable): Adjust.
1904 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1906 * pt.c (unify): Don't check cv quals of array types.
1908 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
1910 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
1911 check whether we already have the type.
1913 2001-02-13 Mark Mitchell <mark@codesourcery.com>
1915 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
1916 * call.c (build_op_delete_call): Simplify to remove duplicate
1918 * class.c (clone_function_decl): Don't build the deleting variant
1919 of a non-virtual destructor.
1920 * decl.c (finish_destructor_body): Don't call delete if this is a
1921 non-virtual destructor.
1922 * init.c (build_delete): Explicitly call `operator delete' when
1923 deleting an object with a non-virtual destructor.
1925 2001-02-13 Jason Merrill <jason@redhat.com>
1927 * lang-specs.h: Add more __EXCEPTIONS.
1929 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
1931 * typeck2.c (process_init_constructor): Check
1932 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
1934 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
1936 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
1937 Remove spurious information in comment. Allow further
1938 adjustments of REFERENCE_TYPE args.
1940 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
1942 * errfn.c (cp_deprecated): Tweak diagnostic text.
1943 * parse.y (new_initializer): Deprecate initializer lists
1946 2001-02-12 Mark Mitchell <mark@codesourcery.com>
1948 Remove old ABI support.
1950 2001-02-11 Mark Mitchell <mark@codesourcery.com>
1952 * decl2.c (flag_vtable_thunks): Always set it to 1.
1953 (flag_new_abi): Likewise.
1954 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
1956 * Makefile.in (g++spec.o): Fix typo.
1958 2001-02-09 Jason Merrill <jason@redhat.com>
1960 * lang-specs.h: Restore definition of __EXCEPTIONS.
1962 2001-02-08 Jason Merrill <jason@redhat.com>
1964 * search.c (shared_member_p): New function.
1965 (lookup_field_r): Use it.
1966 * cp-tree.h (SHARED_MEMBER_P): Remove.
1968 * method.c (process_overload_item): Handle template-dependent array
1970 * pt.c (type_unification_real): If we end up with undeduced nontype
1973 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
1976 * typeck2.c (friendly_abort): Don't say anything if we have
1977 earlier errors or sorries.
1979 * decl.c (check_tag_decl): Notice attempts to redefine bool and
1980 wchar_t. Ignore if in_system_header.
1982 * decl.c (maybe_push_cleanup_level): New fn...
1983 (start_decl_1): ...split out from here.
1984 * cvt.c (build_up_reference): Use it.
1985 * cp-tree.h: Declare it.
1987 2001-02-07 Mark Mitchell <mark@codesourcery.com>
1989 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
1992 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
1994 * pt.c (lookup_template_class): Make sure it's a primary
1995 template or template_template_parm when called from the parser.
1996 (instantiate_template_class): Add assertion.
1998 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
2000 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
2001 from error_mark_node.
2003 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
2005 Fix specification and implementation bugs in V3 ABI
2006 construction vtables.
2007 * cp-tree.h (flag_dump_class_layout): New flag.
2008 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
2009 (BINFO_LOST_PRIMARY_P): New flag.
2010 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
2011 (BINFO_PRIMARY_MARKED_P): Rename to ...
2012 (BINFO_PRIMARY_P): ... here.
2013 (binfo_via_virtual): New prototype.
2014 * decl2.c (flag_dump_class_layout): New flag.
2015 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
2016 use `=' as a file name separator.
2017 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
2019 (build_vtbl_address): If this is a virtual primary base, then
2020 get the vtbl of what it is ultimately primary for.
2021 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
2022 for BINFO_PRIMARY_P.
2023 (dfs_skip_nonprimary_vbases_markedp): Likewise.
2024 (get_shared_vbase_if_not_primary): Likewise.
2025 (dfs_get_pure_virtuals): Likewise.
2026 (expand_upcast_fixups): Likewise.
2027 (fixup_virtual_upcast_offsets): Likewise.
2028 (dfs_find_vbase_instance): Likewise.
2029 (find_vbase_instance): Likewise.
2030 (binfo_from_vbase): Adjust comment to reflect reality.
2031 (binfo_via_virtual): New function.
2032 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
2033 for binfo walking during VTT construction.
2034 (dfs_mark_primary_bases): Remove.
2035 (force_canonical_binfo_r): New function.
2036 (force_canonical_binfo): New function.
2037 (mark_primary_virtual_base): New function.
2038 (mark_primary_bases): Walk in inheritance graph order, use
2039 mark_primary_virtual_base.
2040 (determine_primary_base): Use some more intermediate variables.
2041 (dfs_find_final_overrider): Don't check for overriding along a
2043 (dfs_modify_vtables): Walk into primary virtual bases too.
2044 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
2045 (build_base_fields): Likewise.
2046 (dfs_set_offset_for_unshared_vbases): Likewise.
2047 (layout_virtual_bases): Likewise.
2048 (end_of_class): Likewise.
2049 (finish_struct_1): Call dump_class_hierarchy, if requested.
2050 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
2051 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
2052 (dump_class_hierarchy): Add file parameter. Append to file, if
2054 (finish_vtbls): Adjust accumulate_vtbl_inits call.
2055 Use canonical base for virtual bases.
2056 (build_vtt): Add more comments. Adjust build_vtt_inits call.
2057 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
2058 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
2059 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
2061 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
2062 from DATA. We want virtual primary bases and all bases via virtual.
2063 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
2064 virtual base when not a construction vtable.
2065 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
2066 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
2067 Use canonical bases when processing virtual bases.
2068 (accumulate_vtbl_inits): We're interested in any base via a
2070 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
2071 within a construction vtable, determine what is being overridden.
2072 (build_vtbl_initializer): Add more comments
2073 (add_vcall_offset_vtbl_entries_1): Adjust comment.
2074 (build_rtti_vtbl_entries): Check if the base has lost its
2077 2001-02-05 Mark Mitchell <mark@codesourcery.com>
2079 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
2081 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2083 * decl.c (pushdecl): Call abort instead of fatal.
2084 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
2085 * init.c (build_new_1): Likewise.
2086 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
2087 * decl.c (build_typename_type): hash_table_init now returns void.
2088 decl.c (init_decl_processing): Make an error non-fatal.
2090 2001-02-04 Mark Mitchell <mark@codesourcery.com>
2092 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
2094 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
2095 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
2096 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
2097 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
2098 * decl.c (maybe_commonize_var): Use the new name-mangling where
2100 * decl2.c (comdat_linkage): Enhance comments. Make all
2101 compiler-generated things static, if COMDAT is not available.
2102 (get_tinfo_decl): Do not make typeinfo objects that belong in the
2104 (tinfo_base_init): Use the correct mangled name for typeinfo
2105 strings, and push them into the global scope.
2106 (typeinfo_in_lib_p): New function.
2107 (synthesize_tinfo_var): Use it.
2108 (create_real_tinfo_var): Likewise.
2110 2001-02-03 Jakub Jelinek <jakub@redhat.com>
2112 * decl.c (push_class_binding): Use context_for_name_lookup instead
2114 * search.c (context_for_name_lookup): Remove static. Check for NULL
2115 context in the loop.
2116 * cp-tree.h (context_for_name_lookup): Add prototype.
2118 2001-02-02 Jakub Jelinek <jakub@redhat.com>
2120 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
2121 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
2123 * call.c (convert_class_to_reference, build_user_type_conversion_1,
2124 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
2126 2001-02-02 Mark Mitchell <mark@codesourcery.com>
2128 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
2129 of macros used when compiling g++spec.c.
2130 * g++spec.c (lang_specific_driver): Link with the shared
2133 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
2135 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
2136 make_reference_declarator, make_call_declarator), method.c
2137 (implicitly_declare_fn), parse.y (namespace_using_decl,
2138 notype_unqualified_id, expr_or_declarator, new_type_id,
2139 after_type_declarator, direct_after_type_declarator,
2140 notype_declarator, complex_notype_declarator,
2141 complex_direct_notype_declarator, qualified_id,
2142 notype_qualified_id, overqualified_id, direct_new_declarator,
2143 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
2144 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
2145 instead of build_parse_node.
2147 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2149 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
2150 (minus_one_node): Moved to top level gcc directory. Renamed
2151 to integer_minus_one_node.
2153 * init.c (init_init_processing): Don't set minus_one_node.
2154 (build_vec_init): Use integer_minus_one_node.
2156 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2158 2001-01-28 Jakub Jelinek <jakub@redhat.com>
2160 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
2161 identical and they would be replaced with constant, remove
2162 MODIFY_EXPR from the tree.
2164 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2166 * Make-lang.in: Remove all dependencies on defaults.h.
2167 * call.c: Don't include defaults.h.
2169 * decl2.c: Likewise.
2170 * except.c: Likewise.
2174 * typeck.c: Likewise.
2176 2001-01-25 Jakub Jelinek <jakub@redhat.com>
2178 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
2179 operators even in "C" linkage.
2180 * method.c (set_mangled_name_for_decl): Likewise.
2181 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
2182 overloaded operators in "C" linkage.
2184 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
2186 * pt.c (tsubst_decl): Remove IN_DECL parameter.
2187 (tsubst_arg_types): Check parameter is not void.
2188 (tsubst): Adjust tsubst_decl call.
2190 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
2192 * call.c (add_builtin_candidate): Quote std properly, from
2195 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2197 * pt.c (check_explicit_specialization): Clone constructors and
2200 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
2202 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
2203 indicates anything special about template depth. Make sure we
2204 only count the user visible template classes.
2206 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
2208 * call.c (build_conv): Typo in comment.
2209 (add_builtin_candidate): Add more explanation.
2210 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
2211 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
2212 when we have enumeral types.
2213 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
2214 candidates for relops and eqops.
2215 (joust): Simplify control flow. Allow a non-template user
2216 function to hide a builtin.
2218 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
2220 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
2221 (more_specialized): Add deduction parameter.
2222 * call.c (joust): Adjust more_specialized call.
2223 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
2224 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
2225 (get_bindings_order): Remove.
2226 (get_bindings_real): Add DEDUCE parameter.
2227 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
2228 REFERENCE_TYPE jig for DEDUCE_ORDER.
2229 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
2230 maybe_adjust_types_for_deduction.
2231 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
2233 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
2234 (check_cv_quals_for_unify): Use new unify qualifier flags.
2235 (unify): Clear new unify qualifier flags.
2236 (get_bindings_real): Add DEDUCE parameter.
2237 (get_bindings): Adjust call to get_bindings_real.
2238 (get_bindings_overload): Likewise.
2239 (most_specialized_instantiation): Adjust call to
2242 2001-01-19 Jason Merrill <jason@redhat.com>
2244 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
2246 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
2249 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
2251 * decl2.c (arg_assoc_class): Fix double iteration logic.
2253 2001-01-19 Jason Merrill <jason@redhat.com>
2255 * init.c (build_delete): Always call convert_force to strip cv-quals.
2257 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
2258 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
2259 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
2261 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2263 * search.c (get_vbase_1): Count only virtual bases.
2265 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2267 * class.c (duplicate_tag_error): Robustify flag clearing.
2269 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2271 * cp-tree.h (lookup_template_class): Add complain parm.
2272 * decl.c (lookup_namespace_name): Adjust call to
2273 lookup_template_class.
2274 (make_typename_type): Likewise.
2275 * semantics.c (finish_template_type): Likewise.
2276 * pt.c (lookup_template_class): Add complain parm. Adjust.
2277 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
2280 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
2282 * pt.c (copy_default_args_to_explicit_spec): Preserve
2283 object's CV quals. Reorganize.
2285 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2287 * typeck.c (build_modify_expr): Say `initialization' for
2289 * init.c (build_default_init): Convert to enumeral type, if
2292 2001-01-18 Jakub Jelinek <jakub@redhat.com>
2294 * parse.y (nomods_initdcl0): Properly set things up for
2297 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2299 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
2300 (type_unification_real): Set it.
2303 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2305 * decl.c (finish_destructor_body): Convert to vbase pointer here.
2307 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2309 * semantics.c (begin_class_definition): Check we're not inside a
2312 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
2314 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
2317 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2319 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
2320 * call.c (build_over_call): Add comment.
2322 2001-01-16 Daniel Berlin <dberlin@redhat.com>
2324 * cvt.c (ocp_convert): Handle vector type conversion
2325 * typeck2.c (digest_init): Handle vector type initializations
2327 2001-01-16 Phil Edwards <pme@sources.redhat.com>
2329 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
2332 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
2334 * pt.c (check_nontype_parm): Rename to ...
2335 (invalid_nontype_parm_type_p): ... here.
2336 (process_template_parm): Adjust.
2337 (convert_template_argument): Adjust.
2339 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
2341 * pt.c (check_nontype_parm): New function.
2342 (process_template_parm): Use it.
2343 (convert_template_argument): Use it.
2344 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
2347 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
2349 * tree.c: Add defaults.h
2350 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
2351 * Make-lang.in (cp/tree.o): Add defaults.h.
2353 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2355 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
2357 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2359 * g++.1: Change to be ".so man1/gcc.1".
2361 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
2363 * Make-lang.in (c++.info, c++.install-info): Build and install g++
2365 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
2366 ($(srcdir)/cp/g++int.info): New target.
2367 * gxxint.texi: Add info directory entry. Use @@ in email address.
2368 * .cvsignore: Update.
2370 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
2372 * typeck.c (build_c_cast): Do template processing earlier.
2373 Always pedwarn on array casts.
2375 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
2377 * friend.c (make_friend_class): Make sure a templated class is
2378 actually a template.
2380 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2382 * decl2.c (get_guard): Set linkage from guarded decl.
2384 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2386 * call.c (convert_default_arg): Check for unprocessed
2388 * cp-tree.h (replace_defarg): Move to spew.c.
2389 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
2390 spew.c, which is where they really are.
2391 (done_pending_defargs): Declare.
2392 (unprocessed_defarg_fn): Declare.
2393 * decl.c (replace_defarg): Move to spew.c
2394 * parse.y (structsp): Call done_pending_defargs.
2395 * spew.c (defarg_fns): Rearrange list structure.
2396 (defarg_fnsdone): New static variable.
2397 (defarg_depfns): New static variable.
2398 (init_spew): Adjust.
2399 (add_defarg_fn): Store the type in TREE_TYPE.
2400 (do_pending_defargs): Detect and deal with ordering constraints
2402 (done_pending_defargs): New function.
2403 (unprocessed_defarg_fn): New function.
2404 (replace_defarg): Moved from decl.c. Robustify. Don't save
2405 if circularity detected.
2407 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2409 * pt.c (unify): Check array has a domain, before checking
2410 whether it is variable sized.
2412 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2414 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
2415 parameters with pointers to arrays of unknown bound.
2417 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
2419 * parse.y (template_parm_header, template_spec_header): New
2420 reductions. Split out from ...
2421 (template_header): ... here. Use them.
2422 (template_template_parm): Use template_parm_header.
2423 * semantics.c (finish_template_template_parm): Add assert.
2425 2001-01-10 Mark Mitchell <mark@codesourcery.com>
2427 * mangle.c (write_builtin_type): Fix thinko.
2429 * pt.c (copy_default_args_to_explicit_spec_1): New function.
2430 (copy_default_args_to_explicit_spec): Likewise.
2431 (check_explicit_specialization): Use it.
2433 * class.c (finish_struct_1): Remove last argument in call to
2434 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
2435 * decl.c (builtin_function): Likewise.
2436 (build_cp_library_fn): Likewise.
2437 (check_initializer): Likewise.
2438 (make_rtl_for_nonlocal_decl): Likewise.
2439 (cp_finish_decl): Likewise.
2440 (start_function): Likewise.
2441 * decl2.c (finish_anon_union): Likewise.
2442 * friend.c (do_friend): Likewise.
2443 * init.c (build_java_class_ref): Likewise.
2444 * method.c (make_thunk): Likewise.
2445 * pt.c (tsubst_friend_function): Likewise.
2446 * semantics.c (expand_body): Likewise.
2448 2001-01-10 Mark Mitchell <mark@codesourcery.com>
2450 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
2451 looking at DECL_CLONED_FUNCTION for non-functions.
2453 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2455 * error.c (dump_template_parameter): Use parm to determine how
2456 to print default value.
2458 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2460 * class.c (duplicate_tag_error): Clear more flags.
2462 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
2464 * call.c (build_new_method_call): Use binfo_for_vbase.
2466 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
2468 * cp-tree.h (flag_cond_mismatch): Don't declare.
2469 * decl2.c (flag_cond_mismatch): Don't define.
2470 (lang_f_options): Remove cond-mismatch.
2471 (unsupported_options): Add cond-mismatch.
2473 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
2475 * class.c (handle_using_decl): Reject using of constructor name
2476 of sourcing class. Allow injecting of a method with same name as
2477 nested class. Fixup error messages.
2479 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
2481 * decl2.c (lang_decode_option): Handle -Wformat=2.
2483 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2485 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
2486 initialized_in_class.
2487 (DECL_DEFINED_IN_CLASS_P): Rename to ...
2488 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
2489 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
2490 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
2491 * pt.c (check_default_tmpl_args): Adjust for
2492 DECL_INITIALIZED_IN_CLASS_P.
2493 (instantiate_class_template): Likewise.
2494 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
2496 * class.c (finish_struct): Constify saved_filename.
2498 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2500 * class.c (duplicate_tag_error): Adjust diagnostic.
2501 (finish_struct): Locally set location to start of struct.
2502 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
2504 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
2506 * decl.c (struct binding_level): Adjust class_shadowed comments
2508 (push_class_level_binding): Ajust comments to reflect reality.
2509 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
2510 Don't set TREE_VALUE on the class_shadowed list.
2512 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
2514 * decl2.c (acceptable_java_type): Allow references too.
2515 * init.c (build_java_class_ref): When using the new ABI, search
2516 `class$' and have it mangled with `mangle_decl.'
2517 * mangle.c (write_java_integer_type_codes): New function.
2518 (write_builtin_type): Detect and mangle Java integer and real
2521 2001-01-07 Mark Mitchell <mark@codesourcery.com>
2523 * decl2.c (grokfield): Don't accept `asm' specifiers for
2524 non-static data members.
2526 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2528 * expr.c (cplus_expand_expr): Don't reset `target'.
2530 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
2532 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
2534 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
2536 * parse.y (template_datadef): Check for error_mark_node.
2538 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
2540 * cp-tree.def (DEFAULT_ARG): Make `x' class.
2542 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
2544 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
2545 (record_builtin_type): Make non-static.
2546 (flag_short_double): Don't declare.
2547 (init_decl_processing): Remove the creation of many tree nodes now
2548 in c_common_nodes_and_builtins.
2549 (build_void_list_node): New function.
2550 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
2551 * cp-tree.h (flag_short_wchar): Don't declare.
2553 2001-01-04 Mark Mitchell <mark@codesourcery.com>
2555 * call.c (build_conv): Don't use build1 for USER_CONV.
2556 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
2558 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
2560 * lex.c (lang_init): Call c_common_lang_init.
2562 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
2564 * search.c (lookup_fnfields_here): Remove.
2565 (look_for_overrides_r): Use lookup_fnfields_1.
2566 Ignore functions from using declarations.
2568 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
2570 Implement exceptions specifiers for implicit member functions.
2571 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
2572 * method.c (synthesize_exception_spec): New function.
2573 (locate_dtor, locate_ctor, locate_copy): New functions.
2574 (implicitly_declare_fn): Generate the exception spec too.
2575 * search.c (check_final_overrider): Check artificial functions
2577 * typeck2.c (merge_exception_specifiers): New function.
2579 2001-01-03 Jason Merrill <jason@redhat.com>
2581 * init.c (build_default_init): New fn.
2582 (perform_member_init): Split out from here.
2583 (build_new_1): Use it. Simplify initialization logic.
2584 (build_vec_init): Take an array, rather than a pointer and maxindex.
2585 Speed up simple initializations. Don't clean up if we're assigning.
2586 * cp-tree.h: Adjust.
2587 * decl2.c (do_static_initialization): Remove TREE_VEC case.
2588 * parse.y (new_initializer): Return void_zero_node for ().
2589 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
2590 * typeck2.c (digest_init): Only complain about user-written
2593 2000-12-22 Mike Stump <mrs@wrs.com>
2595 * decl2.c: (max_tinst_depth): Increase to 50.
2597 2001-01-02 Mark Mitchell <mark@codesourcery.com>
2599 * class.c (invalidate_class_lookup_cache): Zero the
2600 previous_class_values.
2601 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
2603 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
2604 * decl.c (free_bindings): New variable.
2605 (push_binding): Don't create a new binding if we have one on the
2607 (pop_binding): Put old bindings on the free list.
2608 (init_decl_processing): Use size_int, not build_int_2.
2609 Register free_bindings as a GC root.
2610 (cp_make_fname_decl): Use size_int, not build_int_2.
2611 (push_inline_template_parms_recursive): Likewise.
2612 (end_template_parm_list): Likewise.
2613 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
2614 (tsubst_template_parms): Use size_int, not build_int_2.
2616 * rtti.c (get_vmi_pseudo_type_info): Likewise.
2618 2001-01-02 Richard Henderson <rth@redhat.com>
2620 * parse.y (asm): Set ASM_INPUT_P.
2622 2001-01-02 Jason Merrill <jason@redhat.com>
2624 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
2627 * typeck.c (cp_truthvalue_conversion): New fn.
2628 * cvt.c (ocp_convert): Use it.
2630 * cp-tree.h: Lose c-common.c decls.
2632 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
2633 * cvt.c (convert_to_void): Use type_unknown_p.
2635 * typeck.c (strip_all_pointer_quals): Also strip quals from
2636 pointer-to-member types.
2638 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
2641 * call.c (build_new_method_call): Do evaluate the object parameter
2642 when accessing a static member.
2643 * typeck.c (build_component_ref): Likewise.
2645 2001-01-02 Andreas Jaeger <aj@suse.de>
2647 * decl.c (cp_missing_noreturn_ok_p): New.
2648 (init_decl_processing): Set lang_missing_noreturn_ok_p.
2650 2000-12-29 Jakub Jelinek <jakub@redhat.com>
2652 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
2654 2000-12-29 Mark Mitchell <mark@codesourcery.com>
2656 * class.c (pushclass): Remove #if 0'd code.
2657 * cp-tree.h (overload_template_name): Remove.
2658 * decl.c (store_bindings): Simplify.
2659 (pop_from_top_level): Likewise.
2660 * pt.c (overload_template_name): Remove.
2661 (instantiate_decl): Don't call push_to_top_level if it's not
2664 2000-12-28 Mark Mitchell <mark@codesourcery.com>
2666 * pt.c (register_local_specialization): Don't return a value.
2667 (lookup_template_class): Use move-to-front heuristic when looking
2668 up template instantiations.
2669 (instantiate_decl): Only push_to_top_level when we're actually
2670 going to instantiate the template.
2672 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
2674 * search.c (binfo_for_vtable): Return least derived class, not
2675 most. Handle secondary vtables.
2677 2000-12-22 Jason Merrill <jason@redhat.com>
2679 * pt.c (more_specialized): Don't optimize len==0.
2680 (fn_type_unification): If we're adding the return type, increase len.
2682 * typeck.c (build_binary_op): Fix pmf comparison logic.
2684 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
2685 DECL_STATIC_FUNCTION_P.
2687 * semantics.c (genrtl_finish_function): Don't try to jump to
2688 return_label unless it exists.
2690 In partial ordering for a call, ignore parms for which we don't have
2692 * call.c (joust): Pass len to more_specialized.
2693 (add_template_candidate_real): Strip 'this', pass len.
2694 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
2695 (get_bindings_order): New fn. Pass len down.
2696 (get_bindings_real): Strip 'this', pass len.
2697 (fn_type_unification): Likewise.
2698 (type_unification_real): Succeed after checking 'len' args.
2699 (most_specialized_instantiation): Lose explicit_args parm.
2700 * class.c (resolve_address_of_overloaded_function): Strip 'this',
2703 2000-12-21 Jason Merrill <jason@redhat.com>
2705 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
2706 DECL_TEMPLATE_RESULT.
2708 * search.c (lookup_field_r): Call lookup_fnfields_1, not
2709 lookup_fnfields_here.
2711 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
2713 * call.c (build_object_call): Also allow conversions that return
2714 reference to pointer to function.
2715 (add_conv_candidate): Handle totype being ref to ptr to fn.
2716 (build_field_call): Also allow members of type reference to function.
2717 Lose support for calling pointer to METHOD_TYPE fields.
2719 * error.c (dump_expr): Handle *_CAST_EXPR.
2721 * typeck2.c (build_scoped_ref): Always convert to the naming class.
2723 * tree.c (break_out_cleanups): Lose.
2724 * cp-tree.h: Remove prototype.
2725 * typeck.c (build_component_ref): Don't break_out_cleanups.
2726 (build_compound_expr): Likewise.
2727 * semantics.c (finish_expr_stmt): Likewise.
2729 2000-12-20 Richard Henderson <rth@redhat.com>
2731 * cp-tree.h: Update declarations.
2732 * decl.c (finish_case_label): Return the new stmt node.
2733 * semantics.c (finish_goto_stmt): Likewise.
2734 (finish_expr_stmt, finish_return_stmt): Likewise.
2735 (finish_break_stmt, finish_continue_stmt): Likewise.
2736 (finish_asm_stmt): Likewise.
2737 * parse.y (already_scoped_stmt): Set STMT_LINENO.
2738 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
2739 (simple_if, simple_stmt): Return the new stmt node.
2742 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
2744 * cp-tree.h: Don't declare warn_long_long.
2746 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2748 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
2751 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2753 * pt.c (unify): Handle when both ARG and PARM are
2754 BOUND_TEMPLATE_TEMPLATE_PARM.
2756 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2758 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
2759 DECL_TEMPLATE_PARM_P.
2761 2000-12-15 Jason Merrill <jason@redhat.com>
2763 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
2765 * init.c (build_new_1): Don't strip quals from type.
2767 * decl.c (pushdecl): Don't check for linkage on a non-decl.
2769 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
2771 * call.c (build_new_function_call): Lose space before paren in
2773 (build_new_method_call): Likewise.
2775 * typeck2.c (build_m_component_ref): Propagate quals from datum.
2777 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2779 * pt.c (check_explicit_specialization): Propagate default
2780 function arguments to explicit specializations.
2782 2000-12-13 DJ Delorie <dj@redhat.com>
2784 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
2787 2000-12-08 Jason Merrill <jason@redhat.com>
2789 * error.c (dump_function_name): Don't let the user see __comp_ctor.
2791 Clean up copy-initialization in overloading code.
2792 * call.c (build_user_type_conversion_1): Die if we are asked to
2793 convert to the same or a base type.
2794 (implicit_conversion): Avoid doing so. Lose reference binding code.
2795 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
2796 direct-initialization. Also do direct-init part of copy-init.
2797 (build_user_type_conversion): Don't provide context to convert_like.
2798 * cvt.c (ocp_convert): build_user_type_conversion will now provide
2799 the constructor call for copy-init.
2801 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
2802 instantiation of a member template.
2803 (do_decl_instantiation): Not here.
2805 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
2807 * class.c (check_field_decls): Don't special case anonymous
2808 fields in error messages.
2809 (note_name_declared_in_class): Use %D on diagnostic.
2811 * tree.c (pod_type_p): Use strip_array_types.
2812 (cp_valid_lang_attribute): Likewise.
2813 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
2814 multiple evaluations.
2815 (cp_has_mutable_p): Use strip_array_types.
2817 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
2819 * cp-tree.h (sufficient_parms_p): Declare new function.
2820 * call.c (sufficient_parms_p): New function, broken out of ...
2821 (add_function_candidate): ... here. Use it.
2822 (add_conv_candidate): Use it.
2823 * decl.c (grok_ctor_properties): Use it.
2825 2000-12-07 Jakub Jelinek <jakub@redhat.com>
2827 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
2829 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
2831 * decl2.c (lang_decode_option): Handle -Wformat-security.
2833 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2835 * pt.c (verify_class_unification): New function.
2836 (get_class_bindings): Use it.
2837 (try_class_unification): Tidy.
2838 (unify): Handle when argument of a template-id is not
2839 template parameter dependent.
2840 (template_args_equal): Handle when TREE_CODE's do not match.
2842 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
2844 * lang-specs.h (c++): When invoking the stand-alone preprocessor
2845 for -save-temps, pass all relevant -Defines to it, and then don't
2846 pass them to cc1plus.
2848 2000-12-05 Will Cohen <wcohen@redhat.com>
2850 * decl.c (finish_case_label): Cleared
2851 more_cleanups_ok in surrounding function scopes.
2852 (define_label): Likewise.
2854 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
2856 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
2857 (get_matching_virtual): Remove.
2858 (look_for_overrides): Declare new function.
2859 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
2861 * class.c (check_for_override): Move base class iteration code
2862 to look_for_overrides.
2863 * search.c (next_baselink): Remove.
2864 (get_virtuals_named_this): Remove.
2865 (get_virtual_destructor): Remove.
2866 (tree_has_any_destructors_p): Remove.
2867 (struct gvnt_info): Remove.
2868 (check_final_overrider): Remove `virtual' from error messages.
2869 (get_matching_virtuals): Remove. Move functionality to ...
2870 (look_for_overrides): ... here, and ...
2871 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
2874 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
2876 * typeck.c (get_delta_difference): If via a virtual base,
2878 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
2881 2000-12-04 Richard Henderson <rth@redhat.com>
2883 * error.c (dump_tree): Use output_add_string not OB_PUTS.
2885 2000-12-04 Jason Merrill <jason@redhat.com>
2887 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
2888 (write_builtin_type): Pass intSI_type_node and the like through
2890 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
2891 Pass intSI_type_node and the like through type_for_mode.
2892 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
2893 * pt.c (tsubst, unify): Likewise.
2894 * tree.c (walk_tree): Likewise.
2895 * error.c (dump_type): Likewise.
2896 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
2898 * Make-lang.in: Tweak top comment for emacs.
2901 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
2903 * class.c (clone_function_decl): Robustify.
2905 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
2907 * decl.c (store_bindings): Only search in the non modified
2908 old_bindings for duplicates.
2910 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
2912 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
2915 * typeck.c (build_static_cast): Remove unused variable.
2917 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2919 * pt.c: Fix typo in comment.
2921 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
2923 * decl2.c (warn_format): Remove definition.
2924 (lang_decode_option): Handle -Wformat-nonliteral,
2925 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
2927 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
2929 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
2930 (init_decl_processing): Don't create string_type_node,
2931 const_string_type_node, wint_type_node, intmax_type_node,
2932 uintmax_type_node, default_function_type, ptrdiff_type_node and
2933 unsigned_ptrdiff_type_node. Adjust position of call to
2934 c_common_nodes_and_builtins.
2935 (identifier_global_value): New function.
2937 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
2939 * call.c (standard_conversion): Reject pointer to member
2940 conversions from ambiguous, inaccessible or virtual bases.
2941 * typeck.c (build_static_cast): Don't check pointers to members
2944 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
2946 * method.c (do_build_copy_constructor): Preserve cv
2947 qualifications when accessing source object members.
2948 (do_build_assign_ref): Likewise. Remove separate diagnostics for
2951 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
2953 * method.c (do_build_assign_ref): Construct appropriately
2954 CV-qualified base reference. Don't allow const casts in base
2957 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
2959 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
2960 incomplete return type.
2962 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2964 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
2965 * semantics.c (finish_base_specifier): Accept a _TYPE not a
2968 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2970 * spew.c (yyerror): Cope if yylval.ttype is NULL.
2972 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2974 * decl.c (grokdeclarator): Diagnose undefined template contexts.
2976 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
2978 * decl.c (grokdeclarator): Do type access control on friend
2981 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
2983 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
2984 bison parser ickiness.
2985 * pt.c (tsubst_friend_function): Enter namespace scope when
2986 tsubsting the function name.
2987 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
2989 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
2991 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
2992 * cvt.c (cp_convert_to_pointer): Add force parameter.
2993 Allow conversions via virtual base if forced.
2994 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
2995 (ocp_convert): Likewise.
2996 * search.c (binfo_from_vbase): Return the virtual base's binfo.
2997 * typeck.c (get_delta_difference): Adjust handling of virtual
3000 2000-11-26 Mark Mitchell <mark@codesourcery.com>
3002 * tree.c (struct list_hash): Remove.
3003 (list_hash_table): Make it be an htab.
3004 (struct list_proxy): New type.
3005 (list_hash_eq): New function.
3006 (list_hash_pieces): Renamed from ...
3007 (list_hash): ... this.
3008 (list_hash_lookup): Remove.
3009 (list_hash_add): Remove.
3010 (hash_tree_cons): Use the generic hashtable.
3011 (mark_list_hash): Remove.
3012 (init_tree): Create the hashtable.
3014 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
3016 * method.c (build_mangled_C9x_name): Rename to
3017 build_mangled_C99_name. Change C9X references in comments to
3020 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
3022 * parse.y (unary_expr): Move VA_ARG from here ...
3023 (primary): ... to here.
3025 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
3027 * semantics.c (finish_id_expr): If type is error_mark, return
3030 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
3032 * pt.c (lookup_template_class): Simplify loop exit constructs.
3033 Cope when there is no partial instantiation of a template
3036 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
3038 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
3040 2000-11-22 Mark Mitchell <mark@codesourcery.com>
3042 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
3045 * pt.c (do_decl_instantiate): Explicitly clone constructors and
3046 destructors that haven't already been cloned.
3048 2000-11-20 Richard Henderson <rth@redhat.com>
3050 * parse.y (yyparse_1): Rename the parser entry point.
3052 2000-11-20 Alex Samuel <samuel@codesourcery.com>
3054 * mangle.c (write_name): Use <unscoped-name> for names directly in
3056 (write_unscoped_name): Accept names directly in function scope.
3058 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
3060 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
3061 * parse.y (extdef): Add EXPORT reduction.
3062 * spew.c (yylex): Don't skip export here.
3064 2000-11-19 Mark Mitchell <mark@codesourcery.com>
3066 * decl.c (init_decl_processing): Correct name of pure virtual
3067 function under the new ABI.
3068 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
3069 (throw_bad_typeid): Likewise for bad typeid function.
3071 2000-11-18 Mark Mitchell <mark@codesourcery.com>
3073 * decl.c (grokparms): Don't even function types of `void' type,
3075 * mangle.c (write_type): Don't crash when confronted with the
3078 * decl.c (grokparms): Don't create parameters of `void' type.
3080 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
3082 * lex.c (mark_impl_file_chain): Delete.
3083 (init_parse): Remove call to ggc_add_string_root. No need to
3084 ggc_strdup a string constant. Do not add impl_file_chain to GC
3086 (handle_pragma_implementation): No need to ggc_strdup main_filename.
3088 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3090 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
3092 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3094 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
3095 * decl.c (grokdeclarator): Don't reject void parms here.
3096 (require_complete_types_for_parms): Simplify, use
3097 complete_type_or_else.
3098 (grokparms): Remove bitrot. Remove funcdef parm.
3099 Deal with ellipsis parm lists here.
3100 * semantics.c (finish_parmlist): Don't append void_list_node
3101 here. Set PARMLIST_ELLIPSIS_P.
3103 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
3105 * typeck2.c (incomplete_type_error): Reorganise to avoid
3106 excessive diagnostics.
3108 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
3110 * lex.c (struct impl_files, internal_filename): Constify a char *.
3112 2000-11-16 Mark Mitchell <mark@codesourcery.com>
3114 * mangle.c (write_special_name_constructor): Don't generate
3115 assembler junk when confronted with an old-style constructor.
3116 (write_special_name_destructor): Likewise.
3117 (mangle_decl_string): Do it here instead.
3119 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
3121 * call.c (op_error): Make error messages clearer.
3123 2000-11-15 Mark Mitchell <mark@codesourcery.com>
3125 * decl.c (wrapup_globals_for_namespace): Don't mark things
3126 TREE_ASM_WRITTEN when they're not.
3128 2000-11-15 Jason Merrill <jason@redhat.com>
3130 * typeck2.c (friendly_abort): Uncount the error before handing
3133 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
3135 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
3137 2000-11-14 Mark Mitchell <mark@codesourcery.com>
3139 * class.c (build_vtbl_initializer): Fix typo in comment.
3140 * typeck.c (expr_sizeof): Don't crash on errors.
3142 2000-11-14 Jim Wilson <wilson@redhat.com>
3144 * lang-specs.h: Add %2 after %(cc1_options).
3146 2000-11-14 Richard Henderson <rth@redhat.com>
3148 * typeck.c (c_sizeof): Be strict about casting result value
3149 back to c_size_type_node.
3150 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
3152 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
3154 * typeck.c (build_unary_op): Use boolean_increment from
3155 c-common.c, moving the relevant code there.
3157 2000-11-11 Jason Merrill <jason@redhat.com>
3159 * typeck.c (mark_addressable): Don't call put_var_into_stack.
3161 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
3164 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3166 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
3167 * lex.c (copy_lang_decl): Likewise.
3169 2000-11-09 Mark Mitchell <mark@codesourcery.com>
3171 * dump.c (cp_dump_tree): Don't dump function bodies here.
3173 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
3174 (dump.o): Update dependency list.
3175 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
3176 (flag_dump_translation_unit): Likewise.
3177 (CP_TYPE_QUALS): Adjust definition.
3178 (DECL_C_BIT_FIELD): Remove.
3179 (SET_DECL_C_BIT_FIELD): Likewise.
3180 (CLEAR_DECL_C_BIT_FIELD): Likewise.
3181 (add_maybe_template): Likewise.
3182 (strip_array_types): Likewise.
3183 (dump_node_to_file): Likewise.
3184 (cp_dump_tree): New function.
3185 * decl.c (init_decl_processing): Set lang_dump_tree.
3186 * decl2.c (flag_dump_translation_unit): Remove.
3187 * dump.c: Move most of it to ../c-dump.c.
3188 (cp_dump_tree): New function.
3189 * pt.c (add_maybe_template): Remove.
3190 * typeck.c (strip_array_types): Likewise.
3192 2000-11-07 Eric Christopher <echristo@redhat.com>
3194 * decl.c (init_decl_processing): Change definition of
3195 __wchar_t to wchar_t. Remove artificial declaration of
3197 * lex.c: Change instances of __wchar_t to wchar_t.
3199 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
3201 * lex.c (do_identifier): Don't lookup_name for operators.
3202 * parse.y (operator): Save looking_for_typename.
3203 (unoperator): Restore it.
3204 * spew.c (frob_opname): Use nth_token for lookahead.
3206 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
3208 * decl.c (grok_op_properties): Always use coerce_new_type and
3210 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
3211 exception specification. Tidy up.
3212 (coerce_delete_type): Preserve exception specification. Tidy up.
3214 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
3216 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
3217 (push_binding_level), error.c (cp_tree_printer), pt.c
3218 (process_partial_specialization, tsubst_template_arg_vector),
3219 search.c (lookup_member): Use memset () instead of bzero ().
3221 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
3223 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
3225 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
3227 * Make-lang.in (c++.distdir): Remove.
3229 2000-11-04 Mark Mitchell <mark@codesourcery.com>
3231 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
3232 declarations from different namespaces to be combined.
3234 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
3236 * decl.c: Include tm_p.h.
3238 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
3240 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
3242 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
3244 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
3245 (build_overload_value), repo.c (open_repo_file), xref.c
3246 (open_xref_file): Use strchr () and strrchr () instead of index ()
3249 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
3251 * call.c (build_over_call): Call fold on the CALL_EXPR.
3253 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
3255 * error.c (dump_template_decl): Separate template hearders with
3258 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
3260 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
3261 TS_* flags with corresponding TFF_*. Adjust prototypes of
3262 functions (which used to take a tree_string_flags) to take an int.
3264 * cp-tree.h (enum tree_string_flags): Remove
3265 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
3266 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
3267 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3268 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3269 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
3270 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
3271 (type_as_string, decl_as_string, expr_as_string,
3272 context_as_string): Adjust prototype.
3274 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
3275 instead of TS_PLAIN.
3277 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
3278 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
3281 2000-10-30 Mark Mitchell <mark@codesourcery.com>
3283 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
3284 (linkage_kind): New enumeration.
3285 (decl_linkage): New function.
3286 * decl2.c (comdat_linkage): Extend comment.
3287 * error.c (dump_function_decl): Print the arguments used to
3288 instantiate a template, even when not printing the type of the
3290 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
3291 not TREE_PUBLIC, to test for external linkage.
3292 * tree.c (decl_linkage): New function.
3294 2000-10-28 Mark Mitchell <mark@codesourcery.com>
3296 * pt.c (instantiate_decl): Always instantiate static data members
3297 initialized in-class.
3299 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
3301 * Make-lang.in: Move all build rules here from Makefile.in,
3302 adapt to new context. Wrap all rules that change the current
3303 directory in parentheses. Expunge all references to $(P).
3304 When one command depends on another and they're run all at
3305 once, use && to separate them, not ;. Add OUTPUT_OPTION to
3306 all object-file generation rules. Delete obsolete variables.
3308 * Makefile.in: Delete.
3309 * config-lang.in: Delete outputs= line.
3311 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
3313 * error.c (dump_function_decl): Print no space between
3314 `ptr-operator' the `type-specifier' of the return type.
3315 (dump_type_prefix): Make sure we put space at the appropriate
3318 2000-10-23 Jason Merrill <jason@redhat.com>
3320 * call.c (equal_functions): Also call decls_match for extern "C" fns.
3322 2000-10-22 Jason Merrill <jason@redhat.com>
3324 * call.c (build_conditional_expr): Use ocp_convert to force
3327 2000-10-22 Mark Mitchell <mark@codesourcery.com>
3329 * call.c (standard_conversion): Use RVALUE_CONVs for all
3330 expressions that satisfy lvalue_p, not just those that satisfy
3333 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
3335 * typeck.c (c_sizeof): Return an expression of `size_t' type,
3336 not one with TYPE_IS_SIZETYPE set.
3337 (dubious_conversion_warnings): Remove special-case code.
3339 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
3341 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
3342 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
3343 (dump_type_prefix): Print vector-of-int as 'int vector'.
3344 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
3345 * tree.c (walk_tree): Handle VECTOR_TYPE.
3347 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
3349 2000-10-21 Jason Merrill <jason@redhat.com>
3351 * parse.y (operator): Set got_object from got_scope.
3352 Set looking_for_typename.
3353 * decl.c (lookup_name_real): Clear val after setting from_obj.
3354 Reorganize diagnostic.
3356 2000-10-20 Jason Merrill <jason@redhat.com>
3358 * tree.c (walk_tree): Don't walk into default args.
3360 * error.c (dump_expr): Use host_integerp.
3362 2000-10-20 David Edelsohn <edelsohn@gnu.org>
3364 * typeck2.c (abstract_virtuals_error): Use "because" instead of
3365 "since" in error message.
3367 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3369 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
3371 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
3373 * decl.c (revert_static_member_fn): Fixed typo.
3375 2000-10-19 Mark Mitchell <mark@codesourcery.com>
3377 * class.c (subobject_offset_fn): New type.
3378 (dfs_record_base_offsets): Remove.
3379 (record_base_offsets): Likewise.
3380 (dfs_search_base_offsets): Likewise.
3381 (record_subobject_offset): New function.
3382 (check_subobject_offset): Likewise.
3383 (walk_subobject_offsets): Likewise.
3384 (record_subobject_offsets): Likewise.
3385 (layout_conflict_p): Reimplement.
3386 (layout_nonempty_base_or_field): Correct handling of type
3387 conflicts during layout.
3388 (layout_empty_base): Likewise.
3389 (build_base_field): Adjust to handle new representation of empty
3391 (build_base_fields): Likewise.
3392 (layout_virtual_bases): Likewise.
3393 (splay_tree_compare_integer_csts): New function.
3394 (layout_class_type): Use a splay_tree, rather than a varray, to
3395 represent the offsets of empty bases.
3397 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
3398 * decl.c (select_decl): Don't return declarations that are
3401 2000-10-18 Mark Mitchell <mark@codesourcery.com>
3403 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
3404 (fake_std_node): New macro.
3405 * decl.c (in_std): Rename to ...
3406 (in_fake_std): ... this.
3407 (flag_no_builtin): Remove.
3408 (flag_no_nonansi_builtin): Likewise.
3409 (walk_namespaces_r): Use fake_std_node.
3410 (push_namespace): Use std_identifier.
3411 (pop_namespace): Use in_fake_std.
3412 (lookup_name_real): Use fake_std_node.
3413 (init_decl_processing): When -fhonor-std, create the `std'
3414 namespace. Don't create a dummy fake_std_node in that case.
3415 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
3416 (builtin_function): Put builtins whose names don't begin
3417 with `_' in the std namespace.
3418 * decl2.c (flag_no_builtin): Remove.
3419 (flag_no_nonansi_builtin): Likewise.
3420 (set_decl_namespace): Use fake_std_node.
3421 (validate_nonmember_using_decl): Likewise.
3422 (do_using_directive): Likewise.
3423 (handle_class_head): Likewise.
3424 * dump.c (dequeue_and_dump): Likewise.
3425 * except.c (init_exception_processing): Use std_identifier.
3426 * init.c (build_member_call): Use fake_std_node.
3427 * rtti.c (init_rtti_processing): Use std_identifier.
3429 2000-10-17 Mark Mitchell <mark@codesourcery.com>
3431 * cp-tree.h (back_end_hook): Remove declaration.
3432 * decl2.c (back_end_hook): Remove definition.
3434 * dump.c (dequeue_and_dump): Dump TREE_USED.
3436 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
3438 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
3440 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
3442 * decl.c (WINT_TYPE): Define.
3443 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
3444 c_size_type_node, signed_size_type_node and wint_type_node.
3446 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
3448 * decl2.c (warn_missing_format_attribute): New variable.
3449 (lang_decode_option): Decode -Wmissing-format-attribute.
3451 2000-10-16 Mark Mitchell <mark@codesourcery.com>
3453 * typeck.c (qualify_type): Remove.
3454 (composite_pointer_type): Fix handling of conversions to `cv void*'.
3456 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3458 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
3460 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3462 * Makefile.in (parse.c, parse.h): Create atomically.
3464 2000-10-12 Mark Mitchell <mark@codesourcery.com>
3466 * class.c (current_obstack): Remove.
3467 * decl.c (ggc_p): Remove.
3468 (start_decl): Don't use decl_tree_cons.
3469 (grokdeclarator): Don't use build_decl_list.
3470 (start_function): Don't use decl_tree_cons.
3471 (finish_function): Don't mess with obstacks.
3472 * decl2.c (grok_x_components): Don't use build_decl_list.
3473 * lex.c (make_call_declarator): Don't call decl_tree_cons.
3474 (implicitly_declare_fn): Don't call build_decl_list.
3475 * parse.y (frob_specs): Don't call build_decl_list or
3477 (expr_or_declarator_intern): Don't call decl_tree_cons.
3478 (primary): Don't call build_decl_list.
3479 (fcast_or_absdcl): Likewise.
3480 (typed_declspecs): Don't call decl_tree_cons.
3481 (reserved_declspecs): Don't call build_decl_list.
3482 (declmods): Likewise.
3483 (reserved_typespecquals): Likewise.
3485 (new_type_id): Likewise.
3486 (cv_qualifiers): Likewise.
3487 (after_type_declarator_intern): Likewise.
3488 (notype_declarator_intern): Likewise.
3489 (absdcl_intern): Likewise.
3490 (named_parm): Likewise.
3491 * pt.c (most_specialized_class): Likewise.
3492 * repo.c (temporary_obstack): Make it a structure, not a pointer.
3493 (init_repo): Initialize it.
3494 * search.c (current_obstack): Remove.
3495 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
3497 2000-10-09 Richard Henderson <rth@cygnus.com>
3499 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
3500 (c++ language support bits for libgcc): Remove.
3501 (c++.clean): Remove cplib2.txt cleanup.
3502 * config-lang.in (headers, lib2funcs): Remove.
3504 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
3505 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
3506 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
3507 * inc/new.h, inc/typeinfo: Remove files.
3509 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
3511 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
3513 (init_decl_processing): Initialize intmax_type_node and
3516 2000-10-06 Richard Henderson <rth@cygnus.com>
3518 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
3519 (original_result_rtx): Remove.
3520 * decl.c (save_function_data): Don't clear x_result_rtx.
3521 (mark_lang_function): Don't mark it either.
3522 * expr.c (fixup_result_decl): Remove.
3523 * semantics.c (genrtl_named_return_value): Frob the return decl
3524 before calling emit_local_var.
3525 (genrtl_finish_function): Don't call fixup_result_decl.
3526 Always emit the jump to return_label.
3528 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
3530 * pt.c (lookup_template_class): Set current access for enum.
3531 (tsubst_enum): Set file & line for enum decl.
3533 * spew.c (yylex): Remove unused variable.
3535 2000-10-05 Richard Henderson <rth@cygnus.com>
3537 * semantics.c (genrtl_finish_function): Don't init or check
3538 can_reach_end; remove noreturn and return value checks.
3540 2000-10-05 Tom Tromey <tromey@cygnus.com>
3542 * init.c (build_java_class_ref): Use `build_static_name' with a
3543 suffix, not a prefix, to build the class object's name.
3545 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3547 * cp-tree.h (access_kind): Fix comment typo.
3548 * decl2.c (grokfield): Fix diagnostic typo.
3549 * semantics.c (finish_template_type): Fix comment typo.
3550 (finish_qualified_object_call_expr): Likewise.
3552 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3554 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
3557 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
3559 * spew.c (frob_id): New static function.
3560 (frob_opname): Use it.
3563 2000-10-01 Mark Mitchell <mark@codesourcery.com>
3565 * decl.c (lang_mark_false_label_stack): Remove.
3566 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
3568 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
3570 * gxxint.texi: Use @email for formatting email addresses.
3572 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
3574 * error.c: Remove direct obstack manipulation. Replace with
3575 output_buffer-based formatting. Adjust calls to removed macros.
3576 (obstack_chunk_alloc, obstack_chunk_free): Remove.
3577 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
3578 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
3580 2000-09-24 Mark Mitchell <mark@codesourcery.com>
3582 * ir.texi: Move to ../c-tree.texi.
3584 2000-09-20 Jason Merrill <jason@redhat.com>
3586 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
3588 2000-09-21 Andreas Jaeger <aj@suse.de>
3590 * errfn.c: Move declaration of cp_printer and cp_printers to ...
3591 * cp-tree.h: ... here.
3593 * error.c: Remove declaration of cp_printer.
3595 2000-09-20 Mark Mitchell <mark@codesourcery.com>
3597 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
3599 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
3601 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
3604 2000-09-18 Mark Mitchell <mark@codesourcery.com>
3606 * decl.c (start_function): Robustify.
3608 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3610 * cp-tree.h (check_function_format): Accept a `status' parameter.
3612 * call.c, typeck.c: Updates calls to `check_function_format'.
3614 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
3616 * decl2.c (handle_class_head): Always push some scope even
3619 2000-09-16 Mark Mitchell <mark@codesourcery.com>
3621 * cp-tree.h (struct cp_language_function): Remove
3622 x_scope_stmt_stack and name_declared.
3623 (current_scope_stmt_stack): Remove.
3624 (function_name_declared_p): New macro.
3625 (struct lang_decl_flags): Use c_lang_decl as a base class.
3627 (struct lang_decl): Replace saved_tree with context.
3628 (DECL_FRIEND_CONTEXT): Adjust accordingly.
3629 (SET_DECL_FRIEND_CONTEXT): Likewise.
3630 (DECL_VIRTUAL_CONTEXT): Likewise.
3631 (DECL_SAVED_TREE): Remove.
3632 (C_DECLARED_LABEL_FLAG): Likewise.
3633 (cplus_expand_expr_stmt): Don't declare.
3634 (add_decl_stmt): Likewise.
3635 (add_scope_stmt): Likewise.
3636 * decl.c (mark_stmt_tree): Remove.
3637 (case_compare): Likewise.
3638 (finish_case_label): Use c_add_case_label.
3639 (init_decl_processing): Set more language-specific hooks.
3640 (build_enumerator): Fix typo in comment.
3641 (cplus_expand_expr_stmt): Remove.
3642 (mark_lang_function): Use mark_c_language_function.
3643 (lang_mark_tree): Use c_mark_lang_decl.
3644 * decl2.c: Change order of inclusion.
3645 * except.c: Likewise.
3646 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
3647 back on c_expand_expr.
3648 * friend.c: Include expr.h.
3649 * init.c: Change order of inclusion.
3650 * Makefile.in: Update dependencies.
3651 * lex.h (free_lang_decl_chain): Remove.
3652 * optimize.c (maybe_clone_body): Use function_name_declared_p.
3653 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
3655 (instantiate_decl): Use function_name_declared_p.
3656 * semantics.c (lang_expand_expr_stmt): Remove.
3657 (set_current_function_name_declared): Likewise.
3658 (current_function_name_declared): Likewise.
3659 (begin_compound_stmt): Use function_name_declared_p.
3660 (add_decl_stmt): Remove.
3661 (setup_vtbl_ptr): Use function_name_declared_p.
3662 (add_scope_stmt): Remove.
3663 (current_scope_stmt_stack): New function.
3664 (cp_expand_stmt): Don't handle SCOPE_STMTs.
3665 (expand_body): Use function_name_declared_p.
3666 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
3667 * typeck.c: Change order of includes.
3668 (convert_sequence): Remove.
3670 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
3672 * lex.c (reswords): Add _Complex.
3674 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3676 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
3678 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
3680 * init.c (begin_init_stmts): Don't use // comments.
3682 2000-09-12 Jason Merrill <jason@redhat.com>
3684 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
3685 all non-extern arrays.
3687 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
3688 typenames, too. Downgrade complaint to pedwarn.
3689 (xref_tag): Warn about surprising behavior of 'friend struct T'.
3690 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
3691 'class This::Inherited'.
3693 2000-09-12 Mark Mitchell <mark@codesourcery.com>
3695 * decl.c (finish_case_label): Given the LABEL_DECL a
3698 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
3700 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
3701 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
3702 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
3703 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
3704 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
3706 (sorry_for_unsupported_tree, print_scope_operator,
3707 print_left_paren, print_right_paren, print_left_bracket,
3708 print_right_bracket, print_whitespace): Likewise.
3709 (aggr_variety): Rename to class_key_or_enum.
3710 (print_type): Rename to print_type_id.
3711 (print_type_specifier_seq, print_simple_type_specifier,
3712 print_elaborated_type_specifier,
3713 print_rest_of_abstract_declarator,
3714 print_parameter_declaration_clause, print_exception_specification,
3715 print_nested_name_specifier, print_template_id,
3716 typedef_original_name, print_template_argument_list_start,
3717 print_template_argument_list_end): New functions.
3719 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
3721 * ir.texi: Add more documentation.
3723 2000-09-11 Mark Mitchell <mark@codesourcery.com>
3725 * cp-tree.h (struct saved_scope): Remove x_function_parms.
3726 (current_function_parms): Don't define.
3727 (struct cp_language_function): Remove parms_stored.
3728 (current_function_just_assigned_this): Don't define.
3729 (current_function_parms_stored): Likewise.
3730 (static_ctors): Declare.
3731 (static_dtors): Likewise.
3732 (SF_EXPAND): Don't define.
3733 (expand_start_early_try_stmts): Remove declaration.
3734 (store_parm_decls): Likewise.
3735 * decl.c (static_ctors): Don't declare.
3736 (static_dtors): Likewise.
3737 (struct binding_level): Remove this_block.
3738 (poplevel): Remove dead code.
3739 (set_block): Likewise.
3740 (mark_binding_level): Don't mark this_block.
3741 (mark_saved_scope): Don't mark x_function_parms.
3742 (init_decl_processing): Don't add current_function_parms as a GC
3744 (check_function_type): Change prototype.
3745 (start_function): Remove RTL-generation code.
3746 (expand_start_early_try_stmts): Remove.
3747 (store_parm_decls): Give it internal linkage. Remove
3748 RTL-generation code.
3749 (finish_function): Remove RTL-generation code.
3750 * decl2.c (static_ctors): Fix formatting.
3751 (static_dtors): Likewise.
3752 * method.c (use_thunk): Don't call store_parm_decls.
3753 (synthesize_method): Likewise.
3754 * optimize.c (maybe_clone_body): Likewise.
3755 * parse.y (fn.def2): Likewise.
3756 (.set_base_init): Likewise.
3757 (nodecls): Likewise.
3758 * pt.c (instantiate_decl): Likewise.
3759 * rtti.c (synthesize_tinfo_fn): Likewise.
3760 * semantics.c (genrtl_try_block): Simplify.
3761 (expand_body): Use genrtl_start_function and
3762 genrtl_finish_function.
3763 (genrtl_start_function): New function.
3764 (genrtl_finish_function): Likewise.
3766 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
3768 * error.c (cp_tree_printer, case 'P'): Append break.
3770 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
3772 * cp-tree.h (frob_opname): Declare.
3773 * parse.y (saved_scopes): New static variable.
3774 (cp_parse_init): Adjust.
3775 (do_id): If lastiddecl is NULL, do do_identifier.
3776 (operator): Save scope information.
3777 (unoperator): New reduction. Restore scope information.
3778 (operator_name): Append unoperator. Call frob_opname.
3779 * spew.c (frob_opname): Define.
3781 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
3783 * decl.c, rtti.c: Include defaults.h if not already included.
3784 Don't define the *_TYPE_SIZE macros.
3786 2000-09-09 Mark Mitchell <mark@codesourcery.com>
3788 * cp-tree.h (push_switch): Change prototype.
3789 (check_cp_case_value): Remove declaration.
3790 (decl_constant_value): Likewise.
3791 * decl.c (struct cp_switch): Add switch_stmt and cases.
3792 (case_compare): New function.
3793 (push_switch): Set switch_stmt. Initialize cases.
3794 (pop_switch): Clean up cases.
3795 (define_case_label): Rename to ...
3796 (finish_case_label): ... this. Do semantic analysis for case
3798 (start_function): Correct comment.
3799 * decl2.c (check_cp_case_value): Remove.
3800 * expr.c (do_case): Remove.
3801 * pt.c (tsubst_expr): Adjust call to finish_case_label.
3802 * semantics.c (genrtl_do_poplevel): Remove declaration.
3803 (RECHAIN_STMTS): Remove.
3804 (finish_break_stmt): Use build_break_stmt.
3805 (finish_continue_stmt): Use build_continue_stmt.
3806 (finish_switch_cond): Adjust condition here, rater than in
3807 c_expand_start_case.
3808 (finish_case_label): Remove.
3809 * typeck.c (c_expand_return): Remove.
3810 (c_expand_start_case): Likewise.
3812 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
3814 * ir.texi: Document type nodes.
3816 2000-09-06 Mark Mitchell <mark@codesourcery.com>
3818 * cp-tree.h (init_cp_semantics): Declare.
3819 (genrtl_try_block): Don't declare.
3820 (genrtl_handler): Likewise.
3821 (genrtl_catch_block): Likewise.
3822 (genrtl_ctor_stmt): Likewise.
3823 (genrtl_subobject): Likewise.
3824 (genrtl_do_poplevel): Likewise.
3825 (genrtl_named_return_value): Likewise.
3826 * lex.c (init_parse): Call init_cp_semantics.
3827 * semantics.c (genrtl_try_block): Give it internal linkage.
3828 (genrtl_handler): Likewise.
3829 (genrtl_catch_block): Likewise.
3830 (genrtl_ctor_stmt): Likewise.
3831 (genrtl_subobject): Likewise.
3832 (genrtl_do_poplevel): Likewise.
3833 (genrtl_named_return_value): Likewise.
3834 (lang_expand_stmt): Rename to ...
3835 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
3836 (init_cp_semantics): Define.
3838 * decl.c (initialize_local_var): Remove RTL-generating code.
3839 * semantics.c (genrtl_try_block): Fix formatting.
3841 Move statement-tree facilities from C++ to C front-end.
3842 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
3843 (void_zero_node): Remove.
3844 (stmt_tree): Likewise.
3845 (scope_chain): Adjust.
3846 (language_function): Rename to cp_language_function.
3847 (cp_function_chain): Adjust.
3848 (current_stmt_tree): Remove.
3849 (last_tree): Likewise.
3850 (last_expr_type): Likewise.
3851 (struct lang_decl): Adjust.
3852 (STMT_IS_FULL_EXPR_P): Remove.
3854 (begin_stmt_tree): Likewise.
3855 (finish_stmt_tree): Likewise.
3856 (walk_tree_fn): Likewise.
3857 (walk_stmt_tree): Likewise.
3858 * class.c (finish_struct): Replace use of add_tree with add_stmt.
3859 * decl.c (mark_stmt_tree): Adjust type.
3860 (init_decl_processing): Don't build void_zero_node.
3861 (initialize_local_var): Adjust usage of current_stmt_tree.
3862 (finish_enum): Use add_stmt, not add_tree.
3863 (save_function_data): Adjust use of language_function.
3864 (finish_constructor_body): Use add_stmt, not add_tree.
3865 (finish_destructor_body): Likewise.
3866 (push_cp_function_context): Adjust use of language_function.
3867 (pop_cp_function_context): Likewise.
3868 (mark_lang_function): Likewise.
3869 (mark_cp_function_context): Likewise.
3870 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
3871 (build_vec_init): Likewise.
3872 * semantics.c (SET_LAST_STMT): Remove.
3873 (RECHAIN_STMTS): Don't use it.
3874 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
3875 (current_stmt_tree): Define.
3877 (finish_goto_stmt): Use add_stmt, not add_tree.
3878 (finish_expr_stmt): Likewise.
3879 (begin_if_stmt): Likewise.
3880 (finish_then_clause): Likewise.
3881 (begin_while_stmt): Likewise.
3882 (begin_do_stmt): Likewise.
3883 (finish_return_stmt): Likewise.
3884 (begin_for_stmt): Likewise.
3885 (finish_break_stmt): Likewise.
3886 (finish_continue_stmt): Likewise.
3887 (begin_switch_stmt): Likewise.
3888 (finish_case_label): Likewise.
3889 (begin_try_block): Likewise.
3890 (begin_function_try_block): Likewise.
3891 (begin_handler): Likewise.
3892 (begin_catch_block): Likewise.
3893 (begin_compound_stmt): Likewise.
3894 (begin_asm_stmt): Likewise.
3895 (finish_asm_stmt): Likewise.
3896 (finish_label_stmt): Likewise.
3897 (add_decl_stmt): Likewise.
3898 (finish_subobject): Likewise.
3899 (finish_decl_cleanup): Likewise.
3900 (finish_named_return_value): Likewise.
3901 (setup_vtbl_ptr): Likewise.
3902 (add_scope_stmt): Likewise.
3903 (finish_stmt_expr): Likewise.
3904 (prune_unused_decls): Remove.
3905 (begin_stmt_tree): Likewise.
3906 (finish_stmt_tree): Likewise.
3907 (prep_stmt): Adjust use of current_stmt_tree.
3908 (lang_expand_stmt): Likewise.
3909 * tree.c (statement_code_p): Remove.
3910 (cp_statement_code_p): New function.
3911 (walk_stmt_tree): Remove.
3912 (init_tree): Set lang_statement_code_p.
3914 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
3916 Integrated preprocessor.
3918 * Make-lang.in, Makefile.in: Remove all references to input.c,
3919 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
3920 * gxx.gperf, hash.h, input.c: Delete.
3921 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
3922 initialized properly.
3924 * class.c (fixup_pending_inline): Take a tree, not a
3925 struct pending_inline *. All callers changed.
3926 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
3927 RID_PROTECTED entries in ridpointers[] array here.
3928 * decl.c (duplicate_decls): Do not refer to struct
3930 (record_builtin_type, init_decl_processing): Use RID_MAX not
3932 (grokdeclarator): Use C_IS_RESERVED_WORD.
3933 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
3935 (grok_x_components): Do not inspect pending_inlines chain.
3937 * cp-tree.h (struct lang_identifier): Add rid_code entry.
3938 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
3939 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
3940 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
3941 TIME_IDENTIFIER_FILEINFO): Kill.
3943 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
3945 * parse.y: Call do_pending_inlines unconditionally.
3946 reinit_parse_for_method is now snarf_method. fn.defpen is no
3947 longer necessary. Remove unnecessary <itype> annotation on
3948 SCOPE. Do not refer to end_of_file or struct pending_inline.
3949 * semantics.c (begin_inline_definitions): Call
3950 do_pending_inlines unconditionally.
3952 * lex.c: Remove all code now shared with C front end.
3953 Initialize cpplib properly if USE_CPPLIB. Put reserved words
3954 into the get_identifier table. Rewrite pragma handling to
3955 work with the registry. Move code to save tokens for later
3956 processing to spew.c.
3958 * spew.c: Rewrite everything in terms of token streams instead
3959 of text. Move routines here from lex.c / input.c as
3960 appropriate. GC-mark trees hanging off the pending inlines
3963 2000-09-06 Mark Mitchell <mark@codesourcery.com>
3965 * NEWS: Mention that the named return value extension has been
3967 * cp-tree.h (original_result_rtx): Define.
3968 (TREE_REFERENCE_EXPR): Remove.
3969 (DECL_VPARENT): Likewise.
3970 (pushdecl_nonclass_level): Likewise.
3971 (store_return_init): Likewise.
3972 (reinit_lang_specific): Likewise.
3973 (genrtl_named_return_value): Change prototype.
3974 * decl.c (original_result_rtx): Remove.
3975 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
3976 Do not generate RTL for local variables here.
3977 (store_return_init): Remove.
3978 * semantics.c (genrtl_named_return_value): Simplify. Fold in
3980 (finish_named_return_value): Adjust accordingly. Warn that this
3981 extension is deprecated.
3982 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
3984 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3986 * pt.c (type_unification_real): Replace switch with if.
3987 (unify): Tsubst non-type parms before comparing.
3989 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3991 * error.c (dump_typename): New function, broken out of ...
3992 (dump_type): ... here. Use it.
3993 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
3995 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
3997 * init.c (build_offset_ref): Deal with namespace scoped
4000 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
4002 * class.c (resolve_address_of_overloaded_function): Add
4003 explanation message.
4004 * decl.c (define_case_label): Reformat explanation.
4005 * decl2.c (finish_static_data_member_decl): Likewise.
4006 (grokfield): Likewise.
4007 * friend.c (do_friend): Likewise.
4009 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
4011 * tree.c (walk_tree): Expose tail recursion.
4012 (walk_stmt_tree): New function.
4013 * cp-tree.h: Prototype walk_stmt_tree.
4014 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
4015 the BLOCKs directly. If a BLOCK has no variables after
4016 pruning, discard it.
4017 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
4018 restore the line number.
4020 2000-09-05 Mark Mitchell <mark@codesourcery.com>
4022 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
4023 (pt.o): Remove dependency on HTAB_H.
4024 * cp-tree.h: Include hashtab.h.
4025 (walk_tree): Change prototype.
4026 (walk_tree_without_duplicates): New function.
4027 * decl.c (check_default_argument): Use it.
4028 * optimize.c (remap_decl): Adjust calls to walk_tree.
4029 (copy_body): Likewise.
4030 (expand_calls_inline): Likewise.
4031 (calls_setjmp_p): Use walk_tree_without_duplicates.
4032 * pt.c: Don't include hashtab.h.
4033 (for_each_template_parm): Use walk_tree_without_duplicates.
4034 * semantics.c (finish-stmt_tree): Likewise.
4035 (expand_body): Likewise.
4036 * tree.c (walk_tree): Add additional parameter.
4037 (walk_tree_without_duplicates): New function.
4038 (count_trees): Use it.
4039 (verify_stmt_tree): Adjust call to walk_tree.
4040 (find_tree): Use walk_tree_without_duplicates.
4041 (no_linkage_check): Likewise.
4042 (break_out_target_exprs): Adjust call to walk_tree.
4043 (cp_unsave): Likewise.
4045 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4047 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
4048 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
4049 * cp-tree.h (TYPE_BINFO): Adjust comment.
4050 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
4051 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
4052 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4053 (TYPE_TEMPLATE_INFO): Likewise.
4054 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
4055 * class.c (push_nested_class): Likewise.
4056 * decl.c (lookup_name_real): Likewise.
4057 (grokdeclarator): Likewise.
4058 (grok_op_properties): Likewise.
4059 (xref_tag): Likewise.
4060 (xref_basetypes): Likewise.
4061 * decl2.c (constructor_name_full): Likewise.
4062 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
4063 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
4064 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
4065 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4066 (dump_type_suffix): Likewise.
4067 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
4069 (get_aggr_from_typedef): Likewise.
4070 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
4071 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4072 (write_template_parm): Likewise.
4073 (write_template_template_parm): Check tree code instead of
4074 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4075 * method.c (build_overload_nested_name): Add
4076 BOUND_TEMPLATE_TEMPLATE_PARM.
4077 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
4078 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4079 * pt.c (convert_template_argument): Check tree code instead of
4080 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4081 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
4082 (for_each_template_parm): Adjust comment.
4083 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
4084 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4085 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
4086 template_args_equal to compare template template parameter cases.
4087 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4088 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
4090 * tree.c (copy_template_template_parm): Decide whether to create
4091 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
4092 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
4093 (copy_tree_r): Likewise.
4094 * typeck.c (comptypes): Likewise. Check tree code instead of
4095 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
4097 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
4099 * decl.c (finish_function): Move the code for handling functions
4100 marked with the constructor and destructor attributes inside the
4103 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4105 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
4107 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4109 * pt.c (lookup_template_class): Remove abort.
4110 * tree.c (get_type_decl): Allow error_mark_node.
4112 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
4114 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
4117 2000-09-03 Mark Mitchell <mark@codesourcery.com>
4119 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
4122 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
4124 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
4125 union tag mismatch error reporting.
4127 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
4129 * call.c (build_scoped_method_call): Check it is not a namespace.
4131 2000-08-30 Jason Merrill <jason@redhat.com>
4133 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
4135 * tree.c (bot_manip): Check TREE_CONSTANT rather than
4136 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
4137 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
4139 * decl.c (start_function): Always call make_function_rtl.
4141 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
4143 * semantics.c (prune_unused_decls): New function.
4144 (finish_stmt_tree): Call it via walk_tree.
4146 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
4148 * class.c (build_secondary_vtable): Constify a char *.
4149 * decl.c (init_decl_processing): Initialize function_id_node,
4150 pretty_function_id_node, and func_id_node.
4151 * input.c (struct input_source): Constify 'str'.
4152 (feed_input): Constify first argument.
4153 * mangle.c (write_identifier): Constify argument.
4154 * pt.c (mangle_class_name_for_template): Constify argument.
4156 2000-08-29 Mark Mitchell <mark@codesourcery.com>
4158 * typeck.c (mark_addressable): Remove code that pokes around in
4161 2000-08-28 Jason Merrill <jason@redhat.com>
4163 * lex.c (file_name_nondirectory): Move to toplev.c.
4165 * cp-tree.h (LOCAL_CLASS_P): New macro.
4166 * class.c (finish_struct_1): Use it.
4168 2000-08-27 Alex Samuel <samuel@codesourcery.com>
4170 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
4171 (write_encoding): Pass another argument to write_name.
4172 (write_name): Add ignore_local_scope parameter. Fix handling of
4174 (write_nested_name): Use write_unqualified_name.
4175 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
4176 (write_template_prefix): Use write_unqualified_name.
4177 (write_component): Remove.
4178 (write_local_name): Add parameter. Use direct local entity to
4179 discriminator calculation.
4180 (write_class_enum_type): Pass another argument to write_name.
4181 (write_template_template_arg): Likewise.
4182 (make_guard_variable): Likewise.
4184 2000-08-27 Jason Merrill <jason@redhat.com>
4186 * decl.c (pushdecl): Matching decls for local externs are found in
4187 the current level. Propagate linkage information from previous
4190 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
4192 * ir.texi (Expressions): Fix typo.
4194 2000-08-25 Greg McGary <greg@mcgary.org>
4196 * tree.c (init_tree): Use ARRAY_SIZE.
4198 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
4200 * error.c (cp_tree_printer): Rework.
4202 2000-08-25 Mark Mitchell <mark@codesourcery.com>
4204 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
4206 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
4207 (cp-demangle.o): Remove target.
4208 (dyn-string.o): Likewise.
4210 * decl.c (grokfndecl): Require that `main' return an `int'.
4211 * mangle.c (write_encoding): Don't mangle return types for
4212 conversion functions.
4214 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
4216 * error.c (tree_formatting_info): New data type.
4217 (tree_being_formatted): New macro.
4218 (tree_formatting_flags): Likewise.
4219 (put_whitespace): Likewise.
4220 (print_tree_identifier): Likewise.
4221 (print_identifier): Likewise.
4222 (cp_tree_printer, print_function_argument_list, print_declaration,
4223 print_expression, print_function_declaration,
4224 print_function_parameter, print_type, print_cv_qualifier): New
4226 (init_error): Initialize lang_printer.
4228 2000-08-24 Jason Merrill <jason@redhat.com>
4230 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
4231 adjustment necessary.
4233 2000-08-24 Greg McGary <greg@mcgary.org>
4235 * cp-tree.h (MAIN_NAME_P): Remove macro.
4237 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
4239 * error.c (print_instantiation_context): Don't forget to flush the
4242 2000-08-23 Jason Merrill <jason@redhat.com>
4244 * typeck.c (build_ptrmemfunc): Save the input pmf.
4246 * method.c (process_modifiers): Use same_type_p.
4248 2000-08-23 Mark Mitchell <mark@codesourcery.com>
4250 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
4251 * mangle.c (write_function_type): Change prototype.
4252 (write_encoding): Don't mangle return types for
4253 constructors or destructors.
4254 (write_type): Adjust call to write_function_type.
4255 * pt.c (instantiate_template): Instantiate alternate entry points
4256 when instantiating the main function.
4258 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
4260 * error.c (cp_print_error_function): Don't use embedded '\n' in
4263 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
4265 * decl.c (init_decl_processing): Remove bogus initialization.
4266 * error.c (lang_print_error_function): Restore here.
4267 (init_error): Initialize print_error_function.
4269 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4271 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
4273 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
4275 * Makefile.in (error.o): Depends on diagnostic.h
4277 * cp-tree.h (problematic_instantiation_changed,
4278 record_last_problematic_instantiation, current_instantiation,
4279 print_instantiation_context): Declare.
4280 (maybe_print_template_context): Remove.
4282 * decl.c (init_decl_processing): Set print_error_function to NULL.
4283 (lang_print_error_function): Remove, since we're using a new
4286 * error.c: #include diagnostic.h
4287 (function_category): New function.
4288 (cp_diagnostic_starter): Likewise.
4289 (cp_diagnostic_finalizer): Likewise.
4290 (cp_print_error_function): Likewise.
4291 (maybe_print_instantiation_context): Likewise.
4292 (print_instantiation_full_context): Likewise.
4293 (print_instantiation_partial_context): Likewise.
4294 (print_instantiation_context): Define.
4295 (init_error): Initialize diagnostic pager and finalizer.
4297 * pt.c (problematic_instantiation_changed): Define.
4298 (record_last_problematic_instantiation): Likewise.
4299 (current_instantiation): Likewise.
4300 (maybe_print_template_context): Remove.
4301 (print_template_context): Likewise.
4302 (current_tinst_level): Make static to reflect Brendan Kehoe's
4303 change of 1995-04-13.
4304 (push_tinst_level): Call print_instantiation_context.
4306 2000-08-21 Nix <nix@esperi.demon.co.uk>
4308 * lang-specs.h: Do not process -o or run the assembler if
4311 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
4313 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
4315 * decl2.c (lang_decode_option): Disable gettext attributes for
4318 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
4320 * lex.c (lang_init_options): Default diagnostic message maximum
4321 length to 80, when line-wrapping.
4323 2000-08-20 Mark Mitchell <mark@codesourcery.com>
4325 * class.c (build_vtbl_initializer): Clear the entire
4326 vtbl_init_data. Start keeping track of the functions for which we
4327 have created vcall offsets here.
4328 (dfs_build_vcall_offset_vtbl_entries): Remove.
4329 (build_vcall_offset_vtbl_entries): Reimplement.
4330 (add_vcall_offset_vtbl_entries_r): New function.
4331 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
4332 computing when vcall offsets are necessary.
4334 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4336 * decl.c (member_function_or_else): Use cp_error ... %T.
4337 (grokdeclarator): Likewise.
4338 (start_method): Likewise.
4339 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
4341 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4343 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
4346 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4348 * cp-tree.h (PTRMEM_OK_P): New macro.
4349 (itf_ptrmem_ok): New enumeration value.
4350 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
4351 argument. Diagnose implicit pointer to member.
4352 (instantiate_type): Don't diagnose implicit pointer to member
4353 here. Pass itf_ptrmem_ok if ok. Adjust calls to
4354 resolve_address_of_overloaded_function.
4355 * init.c (build_offset_ref): Set PTRMEM_OK_P.
4356 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
4357 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
4358 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
4359 (build_unary_op): Deal with single non-static member in
4362 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4364 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
4366 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
4368 * cp-tree.h (enum_name_string): Remove prototype.
4369 (report_case_error): Remove prototype.
4370 * cp/typeck2.c (enum_name_string): Remove.
4371 (report_case_error): Remove.
4372 * error.c (dump_expr): Deal with enum values directly.
4373 Correctly negate integer constant.
4375 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4377 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
4378 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
4379 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
4380 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
4381 (__cxa_vec_new): Use __cxa_vec_new2.
4382 (__cxa_vec_delete): Use __cxa_vec_delete2.
4384 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4386 * vec.cc (__cxa_vec_new): Set "C" linkage.
4387 (__cxa_vec_ctor): Likewise.
4388 (__cxa_vec_cctor): Likewise.
4389 (__cxa_vec_dtor): Likewise.
4390 (__cxa_vec_delete): Likewise.
4391 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
4392 (__cxa_vec_ctor): Likewise.
4393 (__cxa_vec_cctor): Likewise.
4394 (__cxa_vec_dtor): Likewise.
4395 (__cxa_vec_delete): Likewise.
4397 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4399 * class.c (instantiate_type): Reinstate local variable
4400 deleted in previous change.
4402 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
4405 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4407 * cp-tree.h (instantiate_type_flags): New enumeration.
4408 (instantiate_type): Change parameter.
4409 * class.c (instantiate_type): Adjust prototype. Adjust.
4410 * call.c (standard_conversion): Adjust instantiate_type call.
4411 (reference_binding): Likewise.
4412 (build_op_delete_call): Likewise.
4413 (convert_like_real): Likewise.
4414 * cvt.c (cp_convert_to_pointer): Likewise.
4415 (convert_to_reference): Likewise.
4416 * pt.c (convert_nontype_argument): Likewise.
4417 * typeck.c (build_binary_op): Likewise.
4418 (build_ptrmemfunc): Likewise.
4419 (convert_for_assignment): Likewise.
4421 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
4423 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
4424 (current_aggr): Define.
4425 * decl.c (grokdeclarator): Make sure a friend class is an
4426 elaborated type specifier.
4427 * parse.y (current_aggr): Remove static definition.
4428 (cp_parse_init): Adjust.
4429 (structsp): Clear and restore current_aggr.
4430 (component_decl_list): Clear current_aggr.
4432 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
4433 aggregate tag on the typename's context.
4435 * pt.c (tsubst_friend_class): Return error_mark_node, if
4437 (instantiate_class_template): Ignore error_mark_node friend types.
4439 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
4441 * cvt.c (warn_ref_binding): New static function, broken out of ...
4442 (convert_to_reference): ... here. Use it.
4444 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
4446 * parse.y (template_arg): Add rule for template qualified with
4449 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4451 * decl2.c (add_function): Reorganize.
4452 (arg_assoc): Do not consider function template decls.
4454 2000-08-11 Jason Merrill <jason@redhat.com>
4456 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
4459 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4461 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
4462 (lookup_nested_tag): Likewise.
4464 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
4467 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4469 * parse.y (named_complex_class_head_sans_basetype): Remove
4472 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4474 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
4475 explicit TEMPLATE_ID_EXPR args.
4476 (build_expr_from_tree, case CALL_EXPR): Likewise.
4478 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
4480 * decl.c (check_tag_decl): Diagnose typename's which don't
4483 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
4485 * init.c (build_aggr_init): Reject bogus array initializers
4488 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
4490 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
4492 * cp/tinfo.cc (__dynamic_cast): Likewise.
4493 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
4495 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
4497 * cvt.c (convert_to_pointer_force): Fix error message when
4498 attempting to cast from ambiguous base.
4500 2000-08-08 Jason Merrill <jason@redhat.com>
4502 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
4503 (tsubst_template_arg_vector): Likewise.
4505 * decl2.c (build_anon_union_vars): Choose the largest field; don't
4506 assume that one will be as large as the union.
4508 2000-08-07 Kazu Hirata <kazu@hxi.com>
4510 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
4511 * decl.c (pop_labels): Likewise.
4513 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
4515 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
4517 (__pointer_to_member_type_info): Likewise.
4518 (__base_class_info): Likewise.
4519 (__class_type_info): Likewise.
4520 (__si_class_type_info): Likewise.
4521 (__vmi_class_type_info): Likewise.
4522 * tinfo.cc (__si_class_type_info::__do_find_public_src):
4523 Changed member names to match specifications.
4524 (__vmi_class_type_info::__do_find_public_src): Likewise.
4525 (__si_class_type_info::__do_dyncast): Likewise.
4526 (__vmi_class_type_info::__do_dyncast): Likewise.
4527 (__si_class_type_info::__do_upcast): Likewise.
4528 (__vmi_class_type_info::__do_upcast): Likewise.
4529 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
4530 (__pbase_type_info::__pointer_catch): Likewise.
4531 (__pointer_type_info::__pointer_catch): Likewise.
4532 (__pointer_to_member_type_info::__pointer_catch): Likewise.
4534 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
4536 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
4537 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
4538 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
4540 2000-08-04 Mark Mitchell <mark@codesourcery.com>
4542 * cp-tree.h (add_method): Change prototype.
4543 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
4544 Don't double the size of the method vector in the error case.
4545 (handle_using_decl): Adjust call to add_method.
4546 (add_implicitly_declared_members): Likewise.
4547 (clone_function_decl): Likewise.
4548 * decl2.c (check_classfn): Likewise.
4549 * semantics.c (finish_member_declaration): Likewise.
4551 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
4553 * decl.c (flag_isoc94): New variable.
4555 2000-08-02 Jason Merrill <jason@redhat.com>
4557 * pt.c (do_type_instantiation): Add complain parm; don't complain
4558 if called recursively.
4559 * cp-tree.h, parse.y: Adjust.
4561 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
4563 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
4564 -Wno-strict-prototypes.
4566 * g++spec.c: Adjust type of second argument to
4567 lang_specific_driver, and update code as necessary.
4569 * cp-tree.h: Don't prototype min_precision here.
4570 (my_friendly_assert): Cast expression to void.
4571 * semantics.c (do_poplevel): Initialize scope_stmts.
4573 2000-08-02 Mark Mitchell <mark@codesourcery.com>
4575 * cp-tree.h (DECL_NEEDED_P): Tweak.
4577 2000-07-28 Jason Merrill <jason@redhat.com>
4579 * lang-specs.h: Use %i in rule for .ii files.
4581 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
4583 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
4585 2000-07-30 Mark Mitchell <mark@codesourcery.com>
4587 Allow indirect primary bases.
4588 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
4590 (CLASSTYPE_VFIELD_PARENT): Remove.
4591 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
4592 (BINFO_PRIMARY_BINFO): Remove.
4593 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
4594 (BINFO_VBASE_PRIMARY_P): Likewise.
4595 (BINFO_PRIMARY_BASE_OF): New macro.
4596 (BINFO_INDIRECT_PRIMARY_P): Likewise.
4597 (get_primary_binfo): New function.
4598 * decl.c (lang_mark_tree): Make lang_type::primary_base.
4599 * class.c (vcall_offset_data_s): Rename to ...
4600 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
4601 and add ctor_vtbl_p.
4602 (get_derived_offset): Use get_primary_binfo.
4603 (dfs_mark_primary_bases): Adjust handling of virtual primary
4605 (mark_primary_bases): Likewise.
4606 (set_primary_base): Take a binfo, not an integer, as a
4607 representation of the primary base.
4608 (indirect_primary_base_p): Remove.
4609 (determine_primary_base): Adjust for indirect primary bases.
4610 (dfs_find_final_overrider): Fix typo in coment.
4611 (update_vtable_entry_for_fn): Use get_primary_binfo.
4612 (layout_nonempty_base_or_field): Tweak.
4613 (build_base_fields): Adjust for new primary base semantics.
4614 (dfs_propagate_binfo_offsets): Remove.
4615 (propagate_binfo_offsets): Rewrite.
4616 (dfs_set_offset_for_shared_vbases): Remove.
4617 (layout_virtual_bases): Don't use it.
4618 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
4620 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
4621 CLASSTYPE_VFIELD_PARENT.
4622 (dfs_get_primary_binfo): New function.
4623 (get_primary_binfo): Likewise.
4624 (dump_class_hierarchy_r): Tweak printing of primary bases.
4625 (build_vtbl_initializer): Fix typo in comments. Use
4627 (build_vcall_and_vbase_vtbl_entries): Likewise.
4628 (build_vbaes_offset_vtbl_entries): Likewise.
4629 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
4630 BV_VCALL_INDEX to handle indirect primary bases.
4631 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
4632 (build_rtti_vtbl_entries): Likewise.
4633 * search.c (get_shared_vbase_if_not_primary): Tweak.
4634 (find_vbase_instance): Likewise.
4635 (binfo_for_vtable): Simplify.
4636 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
4637 (make_binfo): Make it have 11 entries.
4639 2000-07-30 Alex Samuel <samuel@codesourcery.com>
4641 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
4642 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
4643 ascertaining primaryness.
4644 (G): Remove template_args.
4645 (decl_is_template_id): New function.
4646 (write_encoding): Use decl_is_template_id.
4647 (write_name): Likewise. Handle type_decls. Get main variant of
4649 (write_nested_name): Likewise.
4650 (write_prefix): Likewise.
4651 (write_template_prefix): Likewise.
4652 (write_special_name_constructor): Remove defunct production from
4654 (write_bare_function_type): Remove comment about absent parameter.
4655 (write_template_template_arg): Add missing grammar production to
4658 2000-07-27 Jason Merrill <jason@redhat.com>
4660 * decl.c (duplicate_decls): If common_type produces a non-typedef
4661 type for a typedef, just use the old type.
4663 2000-07-27 Mark Mitchell <mark@codesourcery.com>
4665 * cp-tree.h (function_depth): Declare.
4666 (verify_stmt_tree): Likewise.
4667 (find_tree): Likewise.
4668 * decl.c (function_depth): Give it external linkage.
4669 * optimize.c (optimize_function): Increment and decrement it.
4670 * tree.c (verify_stmt_tree_r): New function.
4671 (verify_stmt_tree): Likewise.
4672 (find_tree_r): Likewise.
4673 (find_tree): Likewise.
4675 2000-07-27 Jason Merrill <jason@redhat.com>
4677 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
4679 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
4681 2000-07-26 Mark Mitchell <mark@codesourcery.com>
4683 * decl.c (start_cleanup_fn): Mark the function as `inline'.
4684 * decl2.c (get_guard): Call cp_finish_decl, not
4685 rest_of_decl_compilation, for local guards.
4686 * lex.c (do_identifier): Remove unused variable.
4688 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
4690 * parse.y: Add missing ';'.
4692 2000-07-26 Mark Mitchell <mark@codesourcery.com>
4694 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
4697 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
4699 Kill strict_prototype. Backwards compatibility only for
4700 non NO_IMPLICIT_EXTERN_C systems.
4701 * cp-tree.h (flag_strict_prototype): Remove.
4702 (strict_prototype): Remove.
4703 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
4704 * decl.c (maybe_push_to_top_level): Adjust.
4705 (pop_from_top_level): Adjust.
4706 (decls_match): Only allow sloppy parm matching for ancient
4708 (init_decl_processing): Adjust.
4709 (grokdeclarator): Adjust.
4710 * decl2.c (flag_strict_prototype): Remove.
4711 (strict_prototype): Remove.
4712 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
4713 (lang_f_options): Remove "strict-prototype".
4714 (unsupported-options): Add "strict-prototype".
4715 * lex.c (do_identifier): Adjust.
4716 (do_scoped_id): Adjust.
4717 * parse.y (empty_parms): Adjust.
4718 * class.c (push_lang_context): Adjust.
4719 (pop_lang_context): Adjust.
4720 * typeck.c (comp_target_parms): Adjust.
4722 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
4724 * decl.c (poplevel): Deal with anonymous variables at for scope.
4725 (maybe_inject_for_scope_var): Likewise.
4727 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
4729 * decl.c: Remove all signal handling code, now done in toplev.c.
4731 2000-07-23 Mark Mitchell <mark@codesourcery.com>
4733 * decl.c (make_rtl_for_nonlocal_decl): Rework.
4735 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
4738 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
4740 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
4741 Define my_friendly_assert and my_friendly_abort as macros
4742 which may call friendly_abort. Prototype friendly abort, not
4743 my_friendly_abort or my_friendly_assert.
4744 * decl.c (signal_catch): Report the signal caught in the error
4745 message. Call fatal directly.
4746 * typeck2.c (ack, my_friendly_assert): Delete.
4747 (my_friendly_abort): Rename to friendly_abort. Expect file,
4748 line, and function parameters. Report the abort code, then
4749 call fancy_abort. Do not mask an abort if errors have
4752 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
4754 * typeck.c (comp_target_parms): Remove obsolete parameter.
4755 (comp_target_types): Adjust.
4757 2000-07-17 Jason Merrill <jason@redhat.com>
4759 * typeck.c (mark_addressable): Never set TREE_USED.
4760 * call.c (build_call): Don't abort on calls to library functions
4761 that have been declared normally.
4763 * typeck.c (build_binary_op): Fix grammar in warning.
4765 * exception.cc (__eh_free): Fix prototype.
4767 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
4769 * decl.c (pushdecl): Handle seeing an OVERLOAD in
4770 IDENTIFIER_NAMESPACE_VALUE.
4772 2000-07-16 Mark Mitchell <mark@codesourcery.com>
4774 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
4775 * method.c (use_thunk): Correct handling of vcall offsets.
4777 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
4779 * .cvsignore: parse.h and parse.c have no cp- prefix.
4781 2000-07-13 Mark Mitchell <mark@codesourcery.com>
4783 * .cvsignore: New file.
4785 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
4787 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
4789 2000-07-12 Mark Mitchell <mark@codesourcery.com>
4791 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
4793 * parse.h: Likewise.
4795 2000-07-11 Mark Mitchell <mark@codesourcery.com>
4797 * class.c (layout_class_type): Add pointers to virtual bases after
4798 base classes under the old ABI.
4800 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
4802 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
4803 (finish_continue_stmt): Likewise.
4804 (begin_for_stmt): Remove call to note_level_for_for.
4805 (finish_goto_stmt): Change call from build_min_nt
4807 (finish_expr_stmt): Likewise.
4808 (begin_if_stmt): Likewise.
4809 (begin_while_stmt): Likewise.
4810 (finish_while_stmt): Likewise.
4811 (finish_return_stmt): Likewise.
4812 (begin_for_stmt): Likewise.
4813 (finish_for_stmt): Likewise.
4814 (finish_break_stmt): Likewise.
4815 (begin_switch_stmt): Likewise.
4816 (finish_case_label): Likewise.
4817 (genrtl_try_block): Likewise.
4818 (begin_try_block): Likewise.
4819 (begin_handler): Likewise.
4820 (begin_compound_stmt): Likewise.
4821 (finish_asm_stmt): Likewise.
4822 (finish_label_stmt): Likewise.
4823 (add_decl_stmt): Likewise.
4824 (finish_subobject): Likewise.
4825 (finish_decl_cleanup): Likewise.
4826 (finish_named_return_value): Likewise.
4827 (setup_vtbl_ptr): Likewise.
4828 (add_scope_stmt): Likewise.
4829 * decl.c (finish_constructor_body): Likewise.
4830 (finish_destructor_body): Likewise.
4831 * optimize.c (copy_body_r): Likewise.
4832 (initialize_inlined_parameters): Likewise.
4833 (declare_return_variable): Likewise.
4834 (expand_call_inline): Likewise.
4836 2000-07-10 Jakub Jelinek <jakub@redhat.com>
4838 * semantics.c (expand_body): Sync interface information
4839 at the end of function body expansion.
4841 2000-07-09 Jason Merrill <jason@redhat.com>
4843 * init.c (build_new_1): Bail early if the call to new fails.
4845 * decl.c (compute_array_index_type): Check specifically for
4846 an INTEGER_CST, not just TREE_CONSTANT.
4848 * decl.c (duplicate_decls): Don't call duplicate_decls on
4849 the DECL_TEMPLATE_RESULT.
4850 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
4853 * error.c (dump_template_bindings): Don't crash if we had an
4854 invalid argument list.
4856 * typeck.c (c_expand_start_case): Do narrowing here.
4857 * semantics.c (finish_switch_cond): Not here.
4859 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
4861 * parse.y (asm_clobbers): Do string concatenation.
4863 2000-07-09 Mark Mitchell <mark@codesourcery.com>
4865 * decl.c (pushtag): Don't put local classes in template functions
4866 on the local_classes list.
4868 2000-07-04 Scott Snyder <snyder@fnal.gov>
4870 * decl2.c (get_guard): Add missing return for old ABI local
4873 2000-07-09 Mark Mitchell <mark@codesourcery.com>
4875 * cp-tree.h (char_type_p): New function.
4876 * decl.c (init_decl_processing): Don't initialize
4877 signed_wchar_type_node or unsigned_wchar_type_node.
4878 (complete_array_type): Handle brace-enclosed string-constants.
4879 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
4880 * tree.c (char_type_p): New function.
4881 * typeck2.c (digest_init): Use char_type_p.
4883 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
4885 * pt.c (tsubst): Don't layout type, if it's error_mark.
4887 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
4889 * pt.c (instantiate_pending_templates): Reset template level.
4891 2000-07-05 Jason Merrill <jason@redhat.com>
4893 * call.c (joust): Don't complain about `operator char *()' beating
4894 `operator const char *() const'.
4896 2000-07-04 scott snyder <snyder@fnal.gov>
4897 Jason Merrill <jason@redhat.com>
4899 * repo.c (repo_get_id): Handle the case where a class with virtual
4900 bases has a null TYPE_BINFO_VTABLE.
4902 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
4903 Jason Merrill <jason@redhat.com>
4905 * parse.y (member_init): Just pass in the type.
4906 * init.c (expand_member_init): Handle getting a type.
4908 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4909 Jason Merrill <jason@redhat.com>
4911 * decl.c (finish_function): Warn if a function has no return
4913 Suggested by Andrew Koenig.
4914 * typeck.c (check_return_expr): Do set current_function_returns_value
4915 if we got an error_mark_node.
4917 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
4919 * decl2.c (push_decl_namespace): Push the original namespace.
4921 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
4923 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
4924 * semantics.c (begin_class_definition): Clear it.
4926 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
4928 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
4929 (genrtl_expr_stmt): Likewise.
4930 (genrtl_decl_stmt): Likewise.
4931 (genrtl_if_stmt): Likewise.
4932 (genrtl_while_stmt): Likewise.
4933 (genrtl_do_stmt): Likewise.
4934 (genrtl_return_stmt): Likewise.
4935 (genrtl_for_stmt): Likewise.
4936 (genrtl_break_stmt): Likewise.
4937 (genrtl_continue_stmt): Likewise.
4938 (genrtl_scope_stmt): Likewise.
4939 (genrtl_switch_stmt): Likewise.
4940 (genrtl_case_label): Likewise.
4941 (genrtl_begin_compound_stmt): Likewise.
4942 (genrtl_finish_compound_stmt): Likewise.
4943 (genrtl_compound_stmt): Likewise.
4944 (genrtl_asm_stmt): Likewise.
4946 * init.c (begin_init_stmts): Remove call to
4947 genrtl_begin_compound_stmt.
4948 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
4950 * semantics.c (lang_expand_stmt): Changed call to
4951 genrtl_compound_stmt to ignore return value.
4953 2000-07-02 Mark Mitchell <mark@codesourcery.com>
4955 * mangle.c (canonicalize_for_substitution): Return the canonical
4958 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
4960 * typeck.c (commonparms): Remove obstack manipulations.
4962 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
4964 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
4966 * Makefile.in (OBJS): Added ../c-semantics.o.
4967 (OBJDEPS): Likewise.
4969 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
4971 (struct stmt_tree): Added comment.
4972 (current_function_name_declared): Removed.
4973 (stmts_are_full_exprs_p): Likewise.
4974 (genrtl_do_pushlevel): Likewise.
4975 (genrtl_clear_out_block): Likewise.
4976 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
4977 (DECL_ANON_UNION_ELEMS): Likewise.
4978 (emit_local_var): Likewise.
4979 (make_rtl_for_local_static): Likewise.
4980 (do_case): Likewise.
4981 (expand_stmt): Likewise.
4982 (genrtl_decl_cleanup): Likewise.
4983 (c_expand_asm_operands): Likewise.
4984 (c_expand_return): Likewise.
4985 (c_expand_start_case): Likewise.
4987 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
4988 (emit_local_var): Likewise.
4989 (initialize_local_var): Change reference to
4990 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
4991 Change reference to stmts_are_full_exprs_p to
4992 current_stmt_tree->stmts_are_full_exprs_p.
4993 (push_cp_function_context): Likewise.
4995 * expect.c (expand_throw): Change reference to
4996 stmts_are_full_exprs_p.
4998 * init.c (build_aggr_init): Change reference to
4999 stmts_are_full_exprs_p.
5000 (build_vec_init): Likewise.
5002 * optimize.c (maybe_clone_body): Change reference to
5003 current_function_name_declared to
5004 cp_function_chain->name_declared.
5006 * pt.c (instantiate_decl): Change reference to
5007 current_function_name_declared to
5008 cp_function_chain->name_declared.
5010 * semantics.c (expand_cond): Moved declaration to c-common.h.
5011 (genrtl_do_pushlevel): Moved to c-semantics.c.
5012 (genrtl_clear_out_block): Likewise.
5013 (genrtl_goto_stmt): Likewise.
5014 (genrtl_expr_stmt): Likewise.
5015 (genrtl_decl_stmt): Likewise.
5016 (gerntl_if_stmt): Likewise.
5017 (genrtl_while_stmt): Likewise.
5018 (genrtl_do_stmt): Likewise.
5019 (genrtl_return_stmt): Likewise.
5020 (genrtl_for_stmt): Likewise.
5021 (genrtl_break_stmt): Likewise.
5022 (genrtl_continue_stmt): Likewise.
5023 (genrtl_scope_stmt): Likewise.
5024 (genrtl_switch_stmt): Likewise.
5025 (genrtl_case_label): Likewise.
5026 (genrtl_begin_compound_stmt): Likewise.
5027 (genrtl_finish_compound_stmt): Likewise.
5028 (genrtl_compound_stmt): Likewise.
5029 (genrtl_asm_stmt): Likewise.
5030 (genrtl_decl_cleanup): Likewise.
5031 (expand_cond): Likewise.
5032 (expand_stmt): Renamed to ...
5033 (lang_expand_stmt): ... this.
5034 (lang_expand_expr_stmt): Initialize.
5035 (set_current_function_name_declared): Likewise.
5036 (stmts_are_full_exprs_p): Likewise.
5037 (current_function_name_declared): Likewise.
5038 (anon_aggr_type_p): Likewise.
5039 (do_poplevel): Change reference to
5040 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
5041 Change reference to stmts_are_full_exprs_p to
5042 current_stmt_tree->stmts_are_full_exprs_p.
5043 (add_tree): Likewise.
5044 (finish_expr_stmt): Likewise.
5045 (prep_stmt): Likewise.
5046 (lang_expand_stmt): Likewise.
5047 (begin_compound_stmt): Change reference to
5048 current_function_name_declared to
5049 cp_function_chain->name_declared and call to
5050 current_function_name_declared().
5051 (setup_vtbl_ptr): Likewise.
5052 (genrtl_do_poplevel): Removed.
5054 2000-06-30 Jason Merrill <jason@redhat.com>
5056 * init.c (init_init_processing): Go back to aligning like
5057 double_type_node for old ABI.
5058 (get_cookie_size): Make cookie larger if we get a type that needs
5060 (build_vec_delete): Call it.
5062 * typeck.c (qualify_type_recursive): New fn.
5063 (composite_pointer_type): Use it.
5064 (build_binary_op): Use composite_pointer_type.
5066 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
5067 Jason Merrill <jason@redhat.com>
5069 * typeck.c (check_return_expr): Don't complain about returning
5070 NULL from operator new if -fcheck-new.
5071 * cp-tree.h: Declare flag_check_new here.
5074 2000-06-28 Alex Samuel <samuel@codesourcery.com>
5076 * mangle.c (find_substitution): Use same_type_p.
5077 (write_encoding): Don't check for substitutions.
5079 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
5081 * parse.y (expr_no_comma_rangle): New non-terminal.
5082 (template_parm): Use it for default parameter case.
5083 (template_arg): Use it.
5084 (expr_no_commas): Remove commented out undefined extensions.
5085 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5086 * parse.h, parse.c: Rebuilt.
5088 2000-06-30 Mark Mitchell <mark@codesourcery.com>
5090 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
5091 (finish_asm_stmt): Do it here, instead.
5093 * cp-tree.h (ridpointers): Don't declare.
5094 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
5095 (record_builtin_java_type): Likewise.
5096 (init_decl_processing): Likewise.
5097 * lex.c: Move inclusion of lex.h.
5098 (ridpointers): Don't define.
5099 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
5101 * lex.h (enum rid): Rename to ...
5102 (enum cp_rid): ... this.
5103 (ridpointers): Don't declare.
5104 * parse.y: Move inclusion of lex.h.
5105 * parse.c: Regenerated.
5106 * spew.c: Move inclusion of lex.h.
5108 * cp-tree.h (struct language_function): Remove temp_name_counter.
5109 (temp_name_counter): Remove.
5110 (get_temp_name): Change prototype.
5111 (get_guard): New function.
5112 (get_guard_cond): Likewise.
5113 (set_guard): Likewise.
5114 * cvt.c (build_up_reference): Adjust call to get_temp_name.
5115 * decl.c (expand_static_init): Use get_guard and friends to
5116 implement guard variables.
5117 * decl2.c (get_temp_name): Assume that the variables created are
5119 (get_sentry): Rename to ...
5120 (get_guard): ... this. Implement new ABI guard variables.
5121 (get_guard_bits): New function.
5122 (get_guard_cond): Likewise.
5123 (set_guard): Likewise.
5124 (start_static_initialization_or_destruction): Use them.
5125 (do_static_initialization): Replace sentry with guard throughout.
5126 (do_static_destruction): Likewise.
5127 * init.c (create_temporary_var): Add comment.
5129 2000-06-28 Alex Samuel <samuel@codesourcery.com>
5131 * mangle.c (find_substitution): Use same_type_p.
5132 (write_encoding): Don't check for substitutions.
5134 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
5136 * parse.y (expr_no_comma_rangle): New non-terminal.
5137 (template_parm): Use it for default parameter case.
5138 (template_arg): Use it.
5139 (expr_no_commas): Remove commented out undefined extensions.
5140 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
5141 * parse.h, parse.c: Rebuilt.
5143 2000-06-29 Mark Mitchell <mark@codesourcery.com>
5145 * cp-tree.h (flag_const_strings): Remove.
5146 (warn_parentheses): Likewise.
5147 (warn_format): Likewise.
5148 (common_type): Likewise.
5149 (default_conversion): Likewise.
5150 (build_binary_op): Likewise.
5151 (cp_build_binary_op): New macro.
5152 * call.c (build_new_op): Use cp_build_binary_op instead of
5154 * class.c (build_vtable_entry_ref): Likewise.
5155 * decl.c (expand_static_init): Likewise.
5156 (compute_array_index_type): Likewise.
5157 (build_enumerator): Likewise.
5158 * decl2.c (delete_sanity): Likewise.
5159 (start_static_initialization_or_destruction): Likewise.
5160 * error.c (dump_type_suffix): Likewise.
5161 * init.c (resolve_offset_ref): Likewise.
5162 (build_new): Likewise.
5163 (build_new_1): Likewise.
5164 (build_vec_delete_1): Likewise.
5165 (build_vec_init): Likewise.
5166 (build_delete): Likewise.
5167 * rtti.c (synthesize_tinfo_fn): Likewise.
5168 (synthesize_tinfo_var): Likewise.
5169 * search.c (expand_upcast_fixups): Likewise.
5170 (fixup_all_virtual_upcast_offsets): Likewise.
5171 * typeck.c (build_array_ref): Likewise.
5172 (get_member_function_from_ptrfunc): Likewise.
5173 (build_binary_op): Add parameter.
5174 (pointer_int_sum): Use cp_build_binary_op.
5175 (pointer_diff): Likewise.
5176 (build_modify_expr): Likewise.
5177 (get_delta_difference): Likewise.
5178 (build_ptrmemfunc): Likewise.
5180 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
5182 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
5183 * decl.c (create_implicit_typedef): Adjust.
5184 * decl2.c (build_artificial_parm): Adjust.
5185 * method.c (implicitly_declare_fn): Adjust.
5186 * pt.c (push_inline_template_parms_recursive): Adjust.
5187 (process_template_parm): Adjust.
5188 (overloaded_template_name): Adjust.
5189 * semantics.c (finish_template_template_parm): Adjust.
5191 2000-06-28 Mark Mitchell <mark@codesourcery.com>
5193 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
5194 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
5195 where to emit thunks.
5196 (build_vtt): Adjust call to build_vtt_inits.
5197 (build_vtt_inits): Add parameter to indicate whether or not
5198 sub-VTTs for virtual bases should be included. Adjust handling of
5199 construction vtables.
5200 (get_matching_base): New function.
5201 (dfs_build_vtt_inits): Rename to ...
5202 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
5203 construction vtables.
5204 (dfs_fixup_binfo_vtbls): Likewise.
5205 (build_ctor_vtbl_groups): Build construction vtables for virtual
5207 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
5208 to build construction vtbls.
5209 (dfs_accumulate_vtbl_inits): Adjust handling of
5210 construction vtables.
5212 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
5215 2000-06-27 Mark Mitchell <mark@codesourcery.com>
5217 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
5219 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
5221 * search.c (hides): Remove.
5222 (is_subobject_of_p): Add most_derived parameter. Use
5224 (lookup_field_queue_p): Adjust.
5225 (lookup_field_r): Adjust.
5227 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
5229 * decl2.c (handle_class_head): Bash typedefs to the type's main
5232 2000-06-25 Mark Mitchell <mark@codesourcery.com>
5234 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
5235 (begin_global_stmt_expr): ... this.
5236 (genrtl_finish_stmt_expr): Rename to ...
5237 (finish_global_stmt_expr): ... this.
5238 * init.c (begin_init_stmts): Adjust calls.
5239 (finish_init_stmts): Likewise.
5240 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
5241 (begin_global_stmt_expr): ... this.
5242 (genrtl_finish_stmt_expr): Rename to ...
5243 (finish_global_stmt_expr): ... this.
5245 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5247 * search.c (lookup_member): Fix typo in comment.
5249 2000-06-24 Jason Merrill <jason@redhat.com>
5251 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
5252 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
5254 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5256 * parse.y (complex_direct_notype_declarator): Support global_scope.
5257 * Makefile.in: Adjust conflict count.
5259 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
5261 * parse.y (template_arg): Convert TEMPLATE_DECL
5262 that is a template template paramter to
5263 TEMPLATE_TEMPLATE_PARM here.
5265 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
5266 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
5267 (copy_template_template_parm): Adjust prototype.
5268 * decl.c (grokdeclarator): Remove dead code.
5269 * pt.c (process_template_parm): Tidy.
5270 (lookup_template_class): Construct nodes in
5271 copy_template_template_parm.
5272 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
5273 lookup_template_class. Use TYPE_TI_TEMPLATE.
5274 * tree.c (copy_template_template_parm): Add NEWARGS
5276 (mapcar): Adjust call to copy_template_template_parm.
5277 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
5278 * method.c (build_template_template_parm_names): Change error
5279 code to avoid compilation warning.
5281 * gxxint.texi: Document template template parameter
5284 2000-06-21 Alex Samuel <samuel@codesourcery.com>
5286 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
5287 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
5288 (cp-demangle.o): New rule.
5289 (dyn-string.o): Likewise.
5290 * inc/cxxabi.h (__cxa_demangle): New declaration.
5292 2000-06-22 Mark Mitchell <mark@codesourcery.com>
5294 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
5295 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
5296 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
5298 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
5299 (make_thunk): Change prototype.
5300 (emit_thunk): Rename to use_thunk.
5301 (mangle_thunk): Change prototype.
5302 * class.c (get_derived_offset): Simplify.
5303 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
5304 BV_GENERATE_THUNK_WITH_VTABLE_P.
5305 (build_primary_vtable): Simplify.
5306 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
5307 (dfs_find_base): Remove.
5308 (update_vtable_entry_for_fn): Correct bug in finding the base
5309 where a virtual function was first declared. Figure out whether
5310 or not to emit a vcall-thunk with the vtables in which it appears.
5311 Correct logic for deciding whether to use an ordinary thunk, or a
5313 (finish_struct_1): Remove unnecssary code.
5314 (build_vtbl_initializer): Use ssize_int for the running counter of
5316 (build_vtbl_initializer): Only use vcall thunks where necessary.
5317 Mark thunks as needing to be emitted with their vtables, or not.
5318 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
5319 indices. Use size_binop.
5320 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
5321 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
5323 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
5324 (build_vtable_entry): Mark thunks as needing to be emitted with
5325 their vtables, or not.
5326 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
5327 * decl2.c (mark_vtable_entries): Use use_thunk instead of
5329 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
5331 * error.c (dump_expr): Use BV_FN.
5332 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
5334 * method.c (make_thunk): Likewise.
5335 (emit_thunk): Rename to use_thunk. Allow callers to decide
5336 whether or not to actually emit the thunk. Adjust for changes in
5337 representation of vcall offsets.
5338 * search.c (dfs_get_pure_virtuals): Use BV_FN.
5339 * semantics.c (emit_associated_thunks): New function.
5340 (expand_body): Use it.
5341 * ir.texi: Adjust decriptions of thunks.
5343 2000-06-22 Jason Merrill <jason@redhat.com>
5345 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
5346 (tsubst_friend_function): Copy it here.
5348 * decl.c (grok_op_properties): Fix typo.
5350 * decl2.c (delete_sanity): Clarify warning, avoid failure on
5353 * pt.c (check_explicit_specialization): Clarify error.
5355 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
5356 an old OVERLOAD when we're declaring a non-function.
5357 (pushdecl, destroy_local_var): Check for error_mark_node.
5358 (warn_extern_redeclared_static): Also bail early if
5360 (push_overloaded_decl): Ignore an old error_mark_node.
5362 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
5364 * call.c (build_x_va_arg): Check if in a template decl.
5365 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
5367 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
5369 * class.c (push_lang_context): TYPE_NAME gets you to the Java
5371 * decl.c (check_goto): Computed gotos assumed OK.
5373 2000-06-20 Jason Merrill <jason@redhat.com>
5375 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
5376 for which we don't need to look for instantiations.
5378 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
5380 * parse.y (program): Always call finish_translation_unit.
5381 * parse.c, parse.h: Rebuilt.
5383 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
5385 * method.c: Don't include hard-reg-set.h.
5387 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
5389 * rtti.c (get_base_offset): Cope when vbase field is in a base.
5391 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
5393 * call.c (build_conditional_expr): Use VOID_TYPE_P.
5394 * cvt.c (cp_convert_to_pointer): Likewise.
5395 (convert_to_void): Likewise.
5396 * error.c (dump_expr): Likewise.
5397 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
5398 * init.c (build_delete): Likewise.
5399 * method.c (emit_thunk): Likewise.
5400 * optmize.c (declare_return_variable): Likewise.
5401 * rtti.c (get_tinfo_decl_dynamic): Likewise.
5402 (get_typeid): Likewise.
5403 (build_dynamic_cast_1): Likewise.
5404 * typeck.c (composite_pointer_type): Likewise.
5405 (common_type): Likewise.
5406 (build_indirect_ref): Likewise.
5407 (build_binary_op): Likewise.
5408 (build_x_compound_expr): Likewise.
5409 (check_return_expr): Likewise.
5410 * typeck2.c (add_exception_specifier): Likewise.
5412 * mangle.c (write_method_parms): Use direct comparison for end
5415 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
5417 * cp-tree.h (genrtl_try_block): Declare function.
5418 (genrtl_handler): Likewise.
5419 (genrtl_catch_block): Likewise.
5420 (genrtl_ctor_stmt): Likewise.
5421 (genrtl_subobject): Likewise.
5422 (genrtl_decl_cleanup): Likewise.
5423 (genrtl_do_poplevel): Likewise.
5424 (genrtl_do_pushlevel): Likewise.
5425 (genrtl_clear_out_block): Likewise.
5426 (genrtl_goto_stmt): Likewise.
5427 (genrtl_expr_stmt): Likewise.
5428 (genrtl_decl_stmt): Likewise.
5429 (genrtl_if_stmt): Likewise.
5430 (genrtl_while_stmt): Likewise.
5431 (genrtl_do_stmt): Likewise.
5432 (genrtl_return_stmt): Likewise.
5433 (genrtl_for_stmt): Likewise.
5434 (genrtl_break_stmt): Likewise.
5435 (genrtl_continue_stmt): Likewise.
5436 (genrtl_scope_stmt): Likewise.
5437 (genrtl_switch_stmt): Likewise.
5438 (genrtl_case_label): Likewise.
5439 (genrtl_begin_compound_stmt): Likewise.
5440 (genrtl_finish_compound_stmt): Likewise.
5441 (genrtl_compound_stmt): Likewise.
5442 (genrtl_asm_stmt): Likewise.
5443 (genrtl_named_return_value): Likewise.
5444 (genrtl_begin_stmt_expr): Likewise.
5445 (genrtl_finish_stmt_expr): Likewise.
5446 (finish_for_stmt): Removed first argument.
5447 (finish_switch_stmt): Likewise.
5449 * semantics.c (genrtl_try_block): Define function.
5450 (genrtl_handler): Likewise.
5451 (genrtl_catch_block): Likewise.
5452 (genrtl_ctor_stmt): Likewise.
5453 (genrtl_subobject): Likewise.
5454 (genrtl_decl_cleanup): Likewise.
5455 (genrtl_do_poplevel): Likewise.
5456 (genrtl_do_pushlevel): Likewise.
5457 (genrtl_clear_out_block): Likewise.
5458 (genrtl_goto_stmt): Likewise.
5459 (genrtl_expr_stmt): Likewise.
5460 (genrtl_decl_stmt): Likewise.
5461 (genrtl_if_stmt): Likewise.
5462 (genrtl_while_stmt): Likewise.
5463 (genrtl_do_stmt): Likewise.
5464 (genrtl_return_stmt): Likewise.
5465 (genrtl_for_stmt): Likewise.
5466 (genrtl_break_stmt): Likewise.
5467 (genrtl_continue_stmt): Likewise.
5468 (genrtl_scope_stmt): Likewise.
5469 (genrtl_switch_stmt): Likewise.
5470 (genrtl_case_label): Likewise.
5471 (genrtl_begin_compound_stmt): Likewise.
5472 (genrtl_finish_compound_stmt): Likewise.
5473 (genrtl_compound_stmt): Likewise.
5474 (genrtl_asm_stmt): Likewise.
5475 (genrtl_named_return_value): Likewise.
5476 (genrtl_begin_stmt_expr): Likewise.
5477 (genrtl_finish_stmt_expr): Likewise.
5478 (finish_for_stmt): Removed first argument and generate rtl
5480 (finish_switch_stmt): Likewise.
5481 (do_poplevel): Removed generate rtl specific code.
5482 (do_pushlevel): Likewise.
5483 (add_tree): Likewise.
5484 (finish_goto_stmt): Likewise.
5485 (finish_expr_stmt): Likewise.
5486 (begin_if_stmt): Likewise.
5487 (finish_if_stmt_cond): Likewise.
5488 (finish_then_clause): Likewise.
5489 (begin_else_clause): Likewise.
5490 (finish_else_clause): Likewise.
5491 (finish_if_stmt): Likewise.
5492 (clear_out_block): Likewise.
5493 (begin_while_stmt): Likewise.
5494 (finish_while_stmt_cond): Likewise.
5495 (finish_while_stmt): Likewise.
5496 (begin_do_stmt): Likewise.
5497 (finish_do_body): Likewise.
5498 (finish_do_stmt): Likewise.
5499 (finish_return_stmt): Likewise.
5500 (begin_for_stmt): Likewise.
5501 (finish_for_init_stmt): Likewise.
5502 (finish_for_cond): Likewise.
5503 (finish_for_expr): Likewise.
5504 (finish_break_stmt): Likewise.
5505 (finish_continue_stmt): Likewise.
5506 (begin_switch_stmt): Likewise.
5507 (finish_switch_cond): Likewise.
5508 (finish_case_label): Likewise.
5509 (begin_try_block): Likewise.
5510 (begin_function_try_block): Likewise.
5511 (finish_try_block): Likewise.
5512 (finish_cleanup_try_block): Likewise.
5513 (finish_cleanup): Likewise.
5514 (finish_function_try_block): Likewise.
5515 (finish_handler_sequence): Likewise.
5516 (finish_function_handler_sequence): Likewise.
5517 (begin_handler): Likewise.
5518 (finish_handler_parms): Likewise.
5519 (begin_catch_block): Likewise.
5520 (finish_handler): Likewise.
5521 (begin_compound_stmt): Likewise.
5522 (finish_compound_stmt): Likewise.
5523 (finish_asm_stmt): Likewise.
5524 (finish_label_stmt): Likewise.
5525 (finish_label_decl): Likewise.
5526 (finish_subobject): Likewise.
5527 (finish_decl_cleanup): Likewise.
5528 (finish_named_return_value): Likewise.
5529 (begin_stmt_expr): Likewise.
5530 (finish_stmt_expr): Likewise.
5532 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
5533 to call genrtl_expr_stmt when appropriate.
5535 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
5536 begin_compound_expr to call genrtl_begin_stmt_expr and
5537 genrtl_begin_compound_expr when appropriate.
5538 (finish_init_stmts): Changed calls to finish_compound_expr and
5539 finish_stmt_expr to call genrtl_finish_compound_expr and
5540 genrtl_finish_stmt_expr when appropriate.
5541 (expand_default_init): Changed call to finish_expr_stmt to call
5542 genrtl_expr_stmt when appropriate.
5543 (build_vec_init): Likewise.
5545 * parse.y (simple_stmt): Removed first argument from call to
5546 finish_for_stmt. Removed first argument from call to
5549 * parse.c: Regenerated.
5551 * pt.c (tsubst_expr): Removed first argument from call to
5552 finish_for_stmt. Removed first argument from call to
5555 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
5557 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
5558 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
5560 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
5561 (cplus_tree_code_length[]): Likewise.
5562 (cplus_tree_code_name[]): Likewise.
5563 (init_parse): Added call to add_c_tree_codes. Changed
5564 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
5566 2000-06-16 Mark Mitchell <mark@codesourcery.com>
5568 * cp-tree.h (finish_mem_initializers): Declare.
5569 (count_trees): Likewise.
5570 * parse.y (base_init): Use finish_mem_initializers.
5571 * semantics.c (finish_mem_initializers): New function.
5573 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
5574 the number of trees.
5576 (count_trees): Don't use it.
5578 2000-06-15 Jason Merrill <jason@redhat.com>
5580 * tree.c (count_trees): New debugging function.
5582 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
5583 * init.c (build_member_call): Pull out the name of a DECL.
5585 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
5586 * semantics.c (expand_body): Push to TV_INTEGRATION here.
5587 * optimize.c (optimize_function): Not here.
5588 * pt.c (instantiate_decl): Push to TV_PARSE.
5590 2000-06-15 Mark Mitchell <mark@codesourcery.com>
5592 * cp-tree.h (struct language_function): Remove x_base_init_list
5593 and x_member_init_list.
5594 (current_base_init_list): Remove.
5595 (current_member_init_list): Likewise.
5596 (setup_vtbl_ptr): Change prototype.
5597 (emit_base_init): Likewise.
5598 (expand_member_init): Likewise.
5599 (reinit_parse_for_function): Remove.
5600 * decl.c (save_function_data): Don't clear x_base_init_list and
5602 (mark_language_function): Don't mark them.
5603 * init.c (perform_member_init): Tweak comment.
5604 (sort_member_init): Take the list of initializers as an argument.
5605 (sort_base_init): Likewise.
5606 (emit_base_init): Likewise.
5607 (expand_member_init): Return the initializer. Don't use global
5609 * lex.c (reinit_parse_for_function): Remove.
5610 * method.c (build_template_parm_names): Correct substitution.
5611 (do_build_copy_constructor): Don't use current_member_init_list
5612 and current_base_init_list.
5613 (synthesize_method): Likewise.
5614 * parse.y (base_init): Split mem-initializers into
5615 base-initializers and field-initializers.
5616 (member_init_list): Build up the list here.
5617 (member_init): Return the initializer.
5618 (fn.depfn): Don't use reinit_parse_for_function.
5619 * parse.c: Regenerated.
5620 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
5622 (tsubst_expr): Don't use current_member_init_list
5623 and current_base_init_list.
5624 (tsubst_expr_values): Rename to ...
5625 (tsubst_initializer_list): ... this. Use convert_from_reference.
5626 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
5627 and current_base_init_list.
5628 (begin_function_definition): Don't call reinit_parse_for_function.
5630 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
5632 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
5635 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
5637 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
5639 * cp-tree.h (IF_COND): Move to c-common.h.
5640 (THEN_CLAUSE): Likewise.
5641 (ELSE_CLAUSE): Likewise.
5642 (WHILE_COND): Likewise.
5643 (WHILE_BODY): Likewise.
5644 (DO_COND): Likewise.
5645 (DO_BODY): Likewise.
5646 (RETURN_EXPR): Likewise.
5647 (EXPR_STMT_EXPR): Likewise.
5648 (FOR_INIT_STMT): Likewise.
5649 (FOR_COND): Likewise.
5650 (FOR_EXPR): Likewise.
5651 (FOR_BODY): Likewise.
5652 (SWITCH_COND): Likewise.
5653 (SWITCH_BODY): Likewise.
5654 (CASE_LOW): Likewise.
5655 (CASE_HIGH): Likewise.
5656 (GOTO_DESTINATION): Likewise.
5657 (COMPOUND_BODY): Likewise.
5658 (ASM_CV_QUAL): Likewise.
5659 (ASM_STRING): Likewise.
5660 (ASM_OUTPUTS): Likewise.
5661 (ASM_INPUTS): Likewise.
5662 (ASM_CLOBBERS): Likewise.
5663 (DECL_STMT_DECL): Likewise.
5664 (STMT_EXPR_STMT): Likewise.
5665 (LABEL_STMT_LABEL): Likewise.
5666 (SCOPE_BEGIN_P): Likewise.
5667 (SCOPE_END_P): Likewise.
5668 (SCOPE_STMT_BLOCK): Likewise.
5669 (SCOPE_NULLIFIED_P): Likewise.
5670 (SCOPE_NO_CLEANUPS_P): Likewise.
5671 (SCOPE_PARTIAL_P): Likewise.
5672 (ASM_VOLATILE_P): Likewise.
5673 (STMT_LINENO): Likewise.
5674 (STMT_LINENO_FOR_FN_P): Likewise.
5676 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
5677 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
5678 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
5679 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
5680 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
5682 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
5684 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
5685 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
5687 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
5688 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
5689 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
5691 2000-06-14 Mark Mitchell <mark@codesourcery.com>
5693 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
5694 * class.c (dfs_find_final_overrider): Set it appropriately.
5695 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
5696 avoid unneeded secondary vptrs.
5698 2000-06-13 Jakub Jelinek <jakub@redhat.com>
5700 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
5701 (check_bitfield_decl, check_field_decl): Likewise.
5702 (build_vtbl_or_vbase_field, build_base_field): Likewise.
5703 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
5704 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
5705 (xfer_tag, finish_enum): Likewise.
5706 * decl2.c (finish_builtin_type): Likewise.
5707 * init.c (init_init_processing): Likewise.
5708 * pt.c (instantiate_class_template): Likewise.
5709 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
5710 * cp-tree.h (struct lang_type): Add user_align member.
5711 (CLASSTYPE_USER_ALIGN): Define.
5713 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
5715 * Make-lang.in (c++.install-common): Install g++-cross in
5716 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
5717 $(target_alias)-g++ and $(target_alias)-c++.
5719 2000-06-12 Mark Mitchell <mark@codesourcery.com>
5721 * class.c (vcall_offset_data_s): Add last_init and fns.
5722 (overrides): Rename to same_signature_p.
5723 (dfs_find_final_overrider): Adjust accordingly.
5724 (mark_overriders): Likewise.
5725 (warn_hidden): Likewise.
5726 (build_vtbl_initializer): Reorganize machinery for building things
5727 at negative offsets.
5728 (build_vcall_and_vbase_vtbl_entries): Likewise.
5729 (build_vbase_offset_vtbl_entries): Likewise.
5730 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
5731 offset entries. Do not create two entries for functions with the
5733 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
5734 (build_rtti_vtbl_entries): Reorganize machinery for building things
5735 at negative offsets.
5737 * optimize.c (expand_call_inline): Don't recurse into the code
5738 used to initialize the parameters more than once.
5740 2000-06-11 Mark Mitchell <mark@codesourcery.com>
5742 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
5743 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
5744 (find_substitution): Only use the `Sa' substitution for
5745 std::allocator, not instantiations of it.
5746 (write_template_prefix): Move comment. Only use a TREE_LIST to
5747 represent substitutions for a member template.
5748 (write_array_type): Mangle array dimensions correctly.
5749 * optimize.c (maybe_clone_body): Copy more information from the
5751 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
5752 on the regenerated declaration.
5754 2000-06-11 Chip Salzenberg <chip@valinux.com>
5755 Mark Mitchell <mark@codesourcery.com>
5757 * class.c (build_vtable): Clarify comment.
5758 (build_ctor_vtbl_group): Pass the most derived type to
5761 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5763 * decl2.c (compare_options): Don't needlessly cast away const-ness.
5765 2000-06-10 Mark Mitchell <mark@codesourcery.com>
5767 * decl.c (add_binding): Handle duplicate declarations of external
5770 2000-06-09 Chip Salzenberg <chip@valinux.com>
5771 Mark Mitchell <mark@codesourcery.com>
5773 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
5775 (write_signed_number): New macro.
5776 (write_unsigned_number): Likewise.
5777 (write_source_name): Use them.
5778 (write_number): Handle signed and unsigned values.
5779 (write_integer_cst): Use tree_int_cst_sgn, and use
5780 write_unsigned_number or write_signed_number as appropriate.
5781 (write_discriminator): Use write_unsigned_number or
5782 write_signed_number as appropriate.
5783 (write_template_arg_literal): Likewise.
5784 (write_array_type): Use tree_low_cst.
5785 (write_template_parm): Use write_unsigned_number or
5786 write_signed_number as appropriate.
5787 (write_substitution): Adjust call to write_number.
5788 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
5789 (write_expression): Handle non-type template arguments of
5790 reference type correctly.
5791 (mangle_thunk): Use write_signed_number.
5793 2000-06-09 Chip Salzenberg <chip@valinux.com>
5795 * mangle.c (find_substition): Don't mangle objects with typename
5796 substitutions (e.g. "cin" as "Si").
5798 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
5800 * call.c (add_candidate): Use ggc_alloc_cleared.
5801 * decl.c (lookup_label): Likewise.
5802 * lex.c (retrofit_lang_decl): Likewise.
5804 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
5806 * semantics.c (expand_body): Push to TV_EXPAND.
5807 * optimize.c (optimize_function): Push to TV_INTEGRATION.
5808 * decl.c (start_function): Always call announce_function.
5810 * tinfo2.cc: Just declare abort.
5812 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
5814 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
5815 whenever @ is a symbolic name.
5817 2000-06-08 Jakub Jelinek <jakub@redhat.com>
5819 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
5821 2000-06-07 Mark Mitchell <mark@codesourcery.com>
5823 * decl.c (pushdecl): Look up functions by DECL_NAME, not
5824 DECL_ASSEMBLER_NAME.
5826 2000-06-06 Mark Mitchell <mark@codesourcery.com>
5828 * decl2.c (c_language): Define.
5830 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
5832 * lex.c (lang_init_options): Tweak.
5834 * decl2.c: Remove #inclusion of diagnostic.h
5835 (lang_decode_option): Move diagnostic formatting options to
5838 * lang-options.h: Remove documentation for diagnostic options.
5840 * Makefile.in (lex.o): Depends upon diagnostic.h
5842 2000-06-06 Mark Mitchell <mark@codesourcery.com>
5844 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
5845 the same DECL_RESULT, it's not a redefinition.
5846 * pt.c (tsubst_decl): Remove code to handle illegal
5849 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
5851 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
5853 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
5855 * search.c (maybe_suppress_debug_info): Don't check
5856 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
5858 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
5861 Remember instantiation context in deferred instantiations.
5862 * cp-tree.h (struct tinst_level): Remove.
5863 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
5864 * pt.c (current_tinst_level): Now a tree.
5865 (print_template_context, push_tinst_level, pop_tinst_level,
5866 tinst_for_decl): Adjust.
5867 (reopen_tinst_level): New fn.
5868 (init_pt): Register current_tinst_level as a root.
5869 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
5870 of the pending templates list.
5871 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
5872 * lex.c (extract_interface_info): Adjust.
5873 * decl2.c (warn_if_unknown_interface): Adjust.
5875 2000-06-05 Mark Mitchell <mark@codesourcery.com>
5877 * class.c (indirect_primary_base_p): New function.
5878 (determine_primary_base): Use it.
5880 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
5882 Update new-abi dynamic cast algorithm.
5883 * tinfo.cc (__class_type_info::__dyncast_result): Add
5884 whole_details. Adjust constructor.
5885 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
5886 Avoid unnecessary searching.
5887 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
5889 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5891 * decl.c (init_decl_processing): Don't call record_component_aliases.
5892 * tree.c (build_cplus_array_type_1): Likewise.
5894 2000-06-04 Mark Mitchell <mark@codesourcery.com>
5896 * ir.texi: Correct typo.
5897 * mangle.c (write_expression): Handle non-type template arguments
5898 with reference type.
5899 * method.c (build_overload_value): Likewise.
5900 * pt.c (convert_nontype_argument): Explicitly represent conversion
5901 to a reference with an ADDR_EXPR.
5902 (unify): Always unify arguments in left-to-right order.
5904 2000-06-03 Alex Samuel <samuel@codesourcery.com>
5905 Mark Mitchell <mark@codesourcery.com>
5907 * Make-lang.in (CXX_SRCS): Add mangle.c.
5908 * Makefile.in (CXX_OBJS): Add mangle.o.
5909 (mangle.o): New rule.
5911 * class.c (local_classes): New variable.
5912 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
5913 (get_vtt_name): Use mangle_vtt_name for new ABI.
5914 (init_class_processing): Initialize local_classes.
5915 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
5916 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
5917 (std_identifier): New macro.
5918 (DECL_VOLATILE_MEMFUNC_P): New macro.
5919 (DECL_NAMESPACE_STD_P): Likewise.
5920 (local_classes): Declare.
5921 (get_mostly_instantiated_function_type): Declare.
5922 (init_mangle): Declare.
5923 (mangle_decl): Likewise.
5924 (mangle_type_string): Likewise.
5925 (mangle_type): Likewise.
5926 (mangle_typeinfo_for_type): Likewise.
5927 (mangle_typeinfo_string_for_type): Likewise.
5928 (mangle_vtbl_for_type): Likewise.
5929 (mangle_vtt_for_type): Likewise.
5930 (mangle_ctor_vtbl_for_type): Likewise.
5931 (mangle_thunk): Likewise.
5932 (mangle_conv_op_name_for_type): Likewise.
5933 (mangle_guard_variable): Likewise.
5934 * decl.c (pushtag): Keep track of local classes.
5935 (initialize_predefined_identifiers): Initialize std_identifier.
5936 (init_decl_processing): Use std_identifier.
5937 (start_decl): Don't treat instantiations as specializations.
5938 (grokdeclarator): Likewise.
5939 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
5940 name for fully-instantiated templates.
5941 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
5942 destructors with the new ABI.
5943 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
5944 (grokfield): Use mangle_type for new ABI.
5945 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
5946 (get_sentry): Use mangle_guard_variable for new ABI.
5947 (start_static_initialization_or_destruction): Likewise.
5948 * expr.c (extract_aggr_init): Remove.
5949 (extract_scalar_init): Likewise.
5950 (extract_init): Remove #if 0'd code.
5951 * mangle.c: New function.
5952 * method.c (build_mangled_name): Assert not flag_new_abi.
5953 (build_static_name): Likewise.
5954 (build_decl_overload_real): Likewise.
5955 (build_typename_overload): Likewise.
5956 (build_overload_with_type): Likewise.
5957 (build_overload_name): Likewise.
5958 (get_ctor_vtbl_name): Likewise.
5959 (start_squangling): Likewise.
5960 (get_id_2): Likewise.
5961 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
5962 (init_method): Call init_mangle for new ABI.
5963 (make_thunk): Call mangle_thunk for new ABI.
5964 * operators.def: Correct new ABI manglings for the `%' operator.
5966 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
5967 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
5968 (lookup_template_class): Call mangle_decl for new ABI.
5969 (get_mostly_instantiated_function_type): New function.
5970 (set_mangled_name_for_template_decl): Use it.
5971 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
5972 the new ABI. Use mangle_conv_op_name_for_type for instantiated
5973 conversion op names.
5974 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
5975 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
5976 (tinfo_base_init): Likewise. Mangle typeinfo string name with
5977 mangle_typeinfo_string_for_type.
5979 2000-06-03 Mark Mitchell <mark@codesourcery.com>
5981 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
5982 (INNERMOST_TEMPLATE_ARGS): New macro.
5983 (innermost_args): Remove.
5984 (get_innermost_template_args): New function.
5985 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
5986 * error.c (dump_function_decl): Be caution when using
5987 most_general_template.
5988 * method.c (build_template_parm_names): Use
5989 INNERMOST_TEMPLATE_ARGS.
5990 * pt.c (add_to_template_args): Tidy comment
5991 (get_innermost_template_args): New function.
5992 (check_explicit_specialization): Clear DECL_INITIAL for a new
5994 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
5996 (push_template_decl): Always register specializations of the most
5998 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
5999 (coerce_template_parms): Likewise.
6000 (lookup_template_class): Likewise.
6001 (innermost_args): Remove.
6002 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
6003 (tsubst_decl): Handle tricky specializations. Use
6004 get_innermost_template_args.
6005 (instantiate_template): Simplify handling of partial
6007 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
6008 (most_general_template): Reimplement, in a more straightforward
6010 (regenerate_decl_from_template): Tweak formatting. Use
6011 TMPL_ARGS_DEPTH for clarity.
6012 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
6014 * dump.c (dequeue_and_dump): Dump information about thunks.
6016 2000-06-01 Richard Henderson <rth@cygnus.com>
6018 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
6020 2000-06-01 Richard Henderson <rth@cygnus.com>
6022 * decl2.c (unsupported_options): Fix typo, make const.
6023 (lang_decode_option): Fix bsearch argument order.
6025 2000-06-01 Mark Mitchell <mark@codesourcery.com>
6027 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
6030 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6032 * cp-tree.h (c_get_alias_set): Deleted.
6033 * Makefile.in (decl.o): Include ../expr.h.
6034 * decl.c (expr.h): Include.
6035 (init_decl_processing): Call record_component_aliases for arrays.
6036 (grokdeclarator): Likewise.
6037 Set TREE_ADDRESSABLE for fields that aren't bitfields.
6038 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
6040 2000-05-31 Mark Mitchell <mark@codesourcery.com>
6042 Remove guiding declaration support.
6043 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
6044 (flag_guiding_decls): Remove.
6045 * call.c (build_user_type_conversion_1): Remove support for
6047 (build_new_function_call): Likewise.
6048 (build_new_op): Likewise.
6049 (build_new_method_call): Likewise.
6050 * decl.c (start_function): Likewise.
6051 * friend.c (is_friend): Likewise.
6052 (do_friend): Likewise.
6053 * decl2.c ((flag_dump_translation_unit): Make it const.
6054 (flag_guiding_decls): Remove.
6055 (unsupported_options): New variable
6056 (compare_options): New function.
6057 (lang_decode_option): Use them.
6059 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
6061 * method.c (mangle_expression): Adjust test for legal expression
6064 * pt.c (instantiate_decl): Save and restore the local
6065 specializations list.
6067 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
6069 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
6071 2000-05-30 Mark Mitchell <mark@codesourcery.com>
6073 * call.c (add_template_candidate_real): Handle member template
6074 constructors for classes with virtual bases.
6075 (build_user_type_conversion_1): Use in_charge_arg_for_name.
6076 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
6078 * ir.texi: Update thunk documentation.
6080 * call.c (joust): Fix handling of overloaded builtin operators.
6082 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
6084 * cp-tree.h (DECL_ANTICIPATED): New macro.
6085 Document new use of DECL_LANG_FLAG_7.
6086 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
6087 in the user namespace.
6088 * lex.c (do_identifier): If the identifier's declaration has
6089 DECL_ANTICIPATED on, it has not yet been declared. But do not
6090 replace it with an ordinary implicit declaration.
6092 * tinfo2.cc: Include stdlib.h.
6094 2000-05-29 Mark Mitchell <mark@codesourcery.com>
6096 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
6097 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
6100 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
6102 * decl2.c (lang_decode_option): Use skip_leading_substring instead
6105 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
6107 * operators.def (<?): Duplicated, should have been...
6110 2000-05-27 Alex Samuel <samuel@codesourcery.com>
6111 Mark Mitchell <mark@codesourcery.com>
6113 * cp-tree.h (ansi_opname): Make it a macro.
6114 (ansi_assopname): Likewise.
6115 (struct lang_decl_flags): Add assignment_operator_p.
6116 (struct lang_decl): Add operator_code.
6117 (DECL_VTT_PARM): Adjust.
6118 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
6119 overloaded operator.
6120 (SET_OVERLOADED_OPERATOR_CODE): New macro.
6121 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
6122 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
6123 (opname_tab): Remove.
6124 (assignop_tab): Likewise.
6125 (operator_name_info_t): New type.
6126 (operator_name_info): New variable.
6127 (assignment_operator_name_info): Likewise.
6128 (build_cp_library_fn): Remove declaration.
6129 (push_cp_library_fn): Likewise.
6130 (operator_name_string): Likewise.
6131 (build_decl_overload): Likewise.
6132 * call.c (print_z_candidates): Simplify.
6133 (build_object_call): Adjust usage of ansi_opname. Use
6134 DECL_OVERLOADED_OPERATOR_P.
6135 (op_error): Adjust operator name lookup.
6136 (build_conditional_expr): Adjust usage of ansi_opname.
6137 (build_new_op): Likewise.
6138 (build_op_delete_call): Likewise.
6139 (build_over_call): Likewise.
6140 (joust): Use DECL_OVERLOADED_OPERATOR_P.
6141 * decl.c (duplicate_decls): Copy operator_code.
6142 (init_decl_processing): Adjust parameters to push_cp_library_fn.
6143 (builtin_function): Adjust parameters to build_library_fn_1.
6144 (build_library_fn_1): Accept an overloaded operator code.
6145 (build_library_fn): Pass ERROR_MARK.
6146 (build_cp_library_fn): Accept an overloaded operator code.
6147 (push_cp_library_fn): Likewise.
6148 (grokfndecl): Tweak.
6149 (grokdeclarator): Simplify code to compute names of overloaded
6150 operators. Adjust use of ansi_opname.
6151 (ambi_op_p): Work on tree_codes, not identifiers.
6152 (unary_op_p): Likewise.
6153 (grok_op_properties): Likewise.
6154 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
6155 (lang_mark_tree): Don't try to mark the operator_code.
6156 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
6157 * error.c (dump_decl): Remove special handling for operator
6159 (dump_function_name): Likewise.
6160 (dump_expr): Adjust name lookup of operators.
6161 (op_to_string): Simplify.
6162 (assop_to_string): Likewise.
6163 * init.c (build_new_1): Adjust use of ansi_opname.
6164 * lex.c (opname_tab): Remove.
6165 (assignop_tab): Likewise.
6166 (ansi_opname): Likewise.
6167 (ansi_assopname): Likewise.
6168 (operator_name_string): Likewise.
6169 (reinit_lang_specific): Likewise.
6170 (operator_name_info): New variable.
6171 (assignment_operator_name_info): Likewise.
6172 (init_operators): New function.
6173 (init_parse): Use it.
6174 (do_identifier): Adjust use of ansi_opname.
6175 * method.c (mangle_expression): Don't use ansi_opname for
6177 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
6178 (build_decl_overload): Remove.
6179 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
6180 (do_build_assign_ref): Adjust use of ansi_opname.
6181 (synthesize_method): Likewise.
6182 (implicitly_declare_fn): Likewise.
6183 * operators.def: New file.
6184 * parse.y (operator): Adjust use of ansi_opname.
6185 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
6186 (set_mangled_name_for_template_decl): Don't play games with
6188 (special_function_p): Adjust use of ansi_opname.
6189 * typeck.c (check_return_expr): Likewise.
6190 * Make-lang.in (cc1plus): Depend on operators.def.
6191 * Makefile.in (lex.o): Likewise.
6194 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
6196 * Make-lang.in (cplib2.ready): Eradicate.
6198 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6200 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
6201 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
6202 (built_min, cp_tree_equal): Likewise.
6204 2000-05-26 Mark Mitchell <mark@codesourcery.com>
6206 * class.c (layout_nonempty_base_or_field): Replace
6207 `record_layout_info' with `record_layout_info_s'.
6209 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
6212 * cp-tree.h (struct language_function): x_named_labels is now
6213 a struct named_label_list*.
6214 * decl.c (struct named_label_use_list): Renamed from...
6215 (struct named_label_list): ...this. New struct.
6216 (push_binding_level): Don't set eh_region.
6217 (note_level_for_eh): New fn.
6218 (pop_label): Take label and old value directly.
6219 (pop_labels): Adjust for new named_labels format.
6220 (lookup_label): Likewise.
6221 (poplevel): Note characteristics of a binding level containing a
6222 named label. Mess with named label lists earlier.
6223 (mark_named_label_lists): New fn.
6224 (mark_lang_function): Call it.
6225 (use_label): New fn, split out from...
6226 (make_label_decl): ...here. Don't call it.
6227 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
6228 check_previous_gotos): New fns, split out from...
6229 (define_label): ...here.
6230 (check_switch_goto): New fn.
6231 (define_case_label): Call it.
6232 (check_goto): New fn.
6233 * semantics.c (finish_goto_stmt): Call it and use_label.
6234 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
6235 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
6237 2000-05-26 Mark Mitchell <mark@codesourcery.com>
6239 * class.c (build_vtable_entry_ref): Correct usage of
6240 get_vtbl_decl_for_binfo.
6242 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
6243 * method.c (implicitly_declare_fn): Not here.
6245 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
6247 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
6248 (CPTI_PTMD_DESC_TYPE): ... here.
6249 (ptmd_desc_type_node): Rename to ...
6250 (ptm_desc_type_node): ... here.
6252 * rtti.c (ptmd_initializer): Rename to ...
6253 (ptm_initializer): ... here.
6254 (sythesize_tinfo_var): Adjust. Deal with pointer to member
6256 (create_tinfo_types): Adjust.
6258 2000-05-25 Mark Mitchell <mark@codesourcery.com>
6260 Finish implementation of VTTs.
6261 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
6262 CPTI_VTT_PARM_IDENTIFIER.
6263 (vtt_parm_identifier): New macro.
6264 (vtt_parm_type): Likewise.
6265 (BINFO_SUBVTT_INDEX): Likewise.
6266 (BINFO_VPTR_INDEX): Likewise.
6267 (struct lang_decl): Add vtt_parm.
6268 (DECL_VTT_PARM): New macro.
6269 (DECL_USE_VTT_PARM): Likewise.
6270 (DECL_NEEDS_VTT_PARM_P): Likewise.
6271 (get_vtt_name): Declare.
6272 (build_artifical_parm): Likewise.
6273 (fixup_all_virtual_upcast_offsets): Likewise.
6274 (expand_indirect_vtbls_init): Remove.
6275 * call.c (build_new_method_call): Pass the vtt to subobject
6276 constructors and destructors.
6277 * class.c (get_vtt_name): Give it external linkage.
6278 (build_clone): Handle the magic VTT parameters for clones.
6279 (clone_function_decl): Fix typo in comment.
6280 (build_vtt): Keep track of the indices in the VTTs where various
6281 entities are stored.
6282 (build_vtt_inits): Likewise.
6283 (dfs_build_vtt_inits): Likewise.
6284 (build_ctor_vtbl_group): Tweak type of construction vtables.
6285 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
6286 primary bases, when building construction vtables.
6287 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
6288 (initialize_predefined_identifiers): Add vtt_parm_identifier.
6289 (init_decl_processing): Initialize vtt_parm_type.
6290 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
6291 (lang_mark_tree): Make vtt_parm.
6292 * decl2.c (build_artificial_parm): New function.
6293 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
6294 (grokclassfn): Use build_artificial_parm.
6295 * init.c (initialize_vtbl_ptrs): Call
6296 fixup_all_virtual_upcast_offsets directly.
6297 (perform_member_init): Use the complete subobject destructor for
6299 (build_vtbl_address): New function.
6300 (expand_virtual_init): Handle VTTs.
6301 * optimize (maybe_clone_body): Likewise.
6302 * search.c (fixup_all_virtual_upcast_offsets): Give it external
6304 (expand_indirect_vtbls_init): Remove.
6305 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
6306 * tree.c (make_binfo): Make them bigger.
6308 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
6310 * inc/cxxabi.h (__pbase_type_info): Define, based on
6311 __pointer_type_info.
6312 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
6313 (__pointer_to_member_type_info): Likewise.
6314 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
6315 (__pointer_to_member_type_info::__is_pointer_p): Remove.
6316 (__pointer_type_info::__do_catch): Rename to ...
6317 (__pbase_type_info::__do_catch): ... here. Adjust.
6318 (__pbase_type_info::__pointer_catch): Implement.
6319 (__pointer_type_info::__pointer_catch): Adjust.
6320 (__pointer_to_member_type_info::__pointer_catch): Adjust.
6322 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
6324 * tinfo.h (__user_type_info::contained_virtual_p): New
6326 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
6328 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
6329 diamond shaped heirarchy. Add early out for mixed diamond and
6330 duplicate shaped heirarchy.
6332 2000-05-24 Mark Mitchell <mark@codesourcery.com>
6334 * cp-tree.h (build_delete): Change prototype.
6335 (build_vec_delete): Likewise.
6336 * call.c (build_scoped_method_call): Use special_function_kind
6337 values to indicate the kind of destruction to be done.
6338 (build_method_call): Likewise.
6339 * decl.c (finish_destructor_body): Likewise.
6340 (maybe_build_cleanup_1): Likewise. Rename to ...
6341 (maybe_build_cleanup): ... this.
6342 * decl2.c (delete_sanity): Use special_function_kind
6343 values to indicate the kind of destruction to be done.
6344 (build_cleanup): Likewise.
6345 * init.c (perform_member_init): Likewise.
6346 (build_vec_delete_1): Likewise.
6347 (build_dtor_call): Simplify.
6348 (build_delete): Use special_function_kind
6349 values to indicate the kind of destruction to be done.
6350 (build_vbase_delete): Likewise.
6351 (build_vec_delete): Likewise.
6353 * init.c (sort_member_init): Fix typo in error message generation
6356 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
6358 * semantics.c (begin_class_definition): make the packed
6359 attribute be sensitive to the "-fpack-struct" command line flag
6361 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
6363 Update new-abi upcast algorithm.
6364 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
6365 prototype and meaning of return value.
6366 (__si_class_type_info::__do_upcast): Likewise.
6367 (__vmi_class_type_info::__do_upcast): Likewise.
6368 * tinfo.cc (__class_type_info::__upcast_result): Replace
6369 whole2dst with part2dst. Adjust ctor.
6370 (__class_type_info::__do_upcast): Adjust call of worker function.
6371 (__class_type_info::__do_upcast): Adjust.
6372 (__si_class_type_info::__do_upcast): Adjust. Use parent's
6374 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
6375 virtual base in diamond heirarchy bug.
6377 2000-05-23 Mark Mitchell <mark@codesourcery.com>
6379 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
6380 and bitfield to tinfo_fn_p.
6381 (DECL_TINFO_FN_P): Adjust.
6382 (SET_DECL_TINFO_FN_P): Likewise.
6383 (DECL_MUTABLE_P): Likewise.
6384 (DECL_C_BIT_FIELD): Likewise.
6385 (SET_DECL_C_BIT_FIELD): Likewise.
6386 (CLEAR_DECL_C_BIT_FIELD): Likewise.
6387 (DECL_UNINLINABLE): Likewise.
6388 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
6389 (handle_using_decl): Remove assertion.
6390 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
6391 to build FIELD_DECLs.
6392 (build_base_field): Likewise.
6393 (layout_class_type): Likewise.
6394 * decl.c (init_decl_processing): Likewise.
6395 (build_ptrmemfunc_type): Likewise.
6396 (grokdeclarator): Likewise.
6397 * decl2.c (grok_x_components): Likewise.
6398 * except.c (call_eh_info): Likewise.
6399 * init.c (init_init_processing): Likewise.
6400 * rtti.c (expand_class_desc): Likewise.
6401 (create_pseudo_type_info): Likewise.
6402 (get_vmi_pseudo_type_info): Likewise.
6403 (create_tinfo_types): Likewise.
6404 * ptree.c (print_lang_decl): Adjust.
6405 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
6406 before checking DECL_MUTABLE_P.
6408 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
6409 parameters for template functions.
6410 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
6411 destructors as well as constructors.
6413 2000-05-22 Mark Mitchell <mark@codesourcery.com>
6415 * class.c (build_ctor_vtbl_group): Set inits.
6416 * optimize.c (maybe_clone_body): Set DECL_INLINE and
6417 DECL_THIS_INLINE appropriately for clones.
6419 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
6420 (DECL_CONV_FN_P): Simplify.
6421 (DECL_OPERATOR): Remove.
6422 (language_to_string): Declare.
6423 * decl.c (duplicate_decls): Fix typo in comment.
6424 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
6425 (grok_op_properties): Use DECL_CONV_FN_P instead of
6426 IDENTIFIER_TYPENAME_P.
6427 * dump.c (dequeue_and_dump): Dump the language linkage of
6429 * error.c (language_to_string): Give it external linkage.
6430 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
6431 (implicitly_declare_fn): Set DECL_LANGUAGE.
6432 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
6433 IDENTIFIER_TYPENAME_P.
6434 (tsubst_decl): Likewise.
6435 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
6436 * semantics.c (finish_member_declaration): Don't mark members of
6437 classes declared in an extern "C" region as extern "C".
6439 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6441 * decl2.c (qualified_lookup_using_namespace): Look through
6444 * decl.c (push_using_decl): Return the old decl on namespace level.
6446 2000-05-21 Mark Mitchell <mark@codesourcery.com>
6448 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
6449 (VTT_NAME_PREFIX): New macro.
6450 (CTOR_VTBL_NAME_PREFIX): Likewise.
6451 (get_ctor_vtbl_name): New function.
6452 * class.c (get_vtable_name): Simplify.
6453 (get_vtt_name): New function.
6454 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
6455 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
6456 when a virtual base becomes primary.
6457 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
6459 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
6460 additional parameters.
6461 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
6462 (initialize_array): New function.
6463 (build_vtt): Likewise.
6464 (build_vtt_inits): Likewise.
6465 (dfs_build_vtt_inits): Likewise.
6466 (dfs_fixup_binfo_vtbls): Likewise.
6467 (build_ctor_vtbl_group): Likewise.
6468 (initialize_vtable): Use initialize_array.
6469 (accumulate_vtbl_inits): Reimplement to handle construction
6471 (dfs_accumulate_vtbl_inits): Likewise.
6472 (bulid_vtbl_initializer): Adjust parameter name.
6473 * method.c (build_typename_overload): Remove #if 0'd code.
6474 (get_ctor_vtbl_name): New function.
6475 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
6476 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
6478 * cp-tree.h (struct lang_type): Remove search_slot.
6479 (CLASSTYPE_SEARCH_SLOT): Remove.
6480 (emit_base_init): Change prototype.
6481 (initialize_vtbl_ptrs): Likewise.
6482 (expand_indirect_vtbls_init): Likewise.
6483 (clear_search_slots): Remove.
6484 * decl.c (lang_mark_tree): Don't mark search_slot.
6485 * init.c (initialize_vtbl_ptrs): Simplify.
6486 (emit_base_init): Likewise.
6487 * search.c (struct vbase_info): Document decl_ptr.
6488 (convert_pointer_to_single_level): Remove.
6489 (dfs_find_vbases): Remove.
6490 (dfs_init_base_pointers): Simplify.
6491 (dfs_clear_vbase_slots): Remove.
6492 (dfs_vtable_path_unmark): New function.
6493 (init_vbase_pointers): Simplify.
6494 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
6495 (expand_indirect_vtbls_init): Simplify. Don't call
6496 mark_all_temps_used.
6497 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
6498 initialize_vtbl_ptrs.
6500 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
6502 * except.c: Add static prototypes.
6504 2000-05-20 H.J. Lu <hjl@gnu.org>
6506 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
6508 2000-05-19 Mark Mitchell <mark@codesourcery.com>
6510 Don't create a separate copy of virtual bases for the
6511 CLASSTYPE_VBASECLASSES list.
6512 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
6513 (BINFO_FOR_VBASE): Remove.
6514 (CANONICAL_BINFO): Adjust.
6515 (binfo_for_vbase): New function.
6516 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
6517 instead of BINFO_FOR_VBASE.
6518 (build_vbase_pointer): Likewise.
6519 (build_secondary_vtable): Likewise.
6520 (dfs_mark_primary_bases): Likewise.
6521 (mark_primary_bases): Likewise.
6522 (layout_nonempty_base_or_field): Likewise.
6523 (dfs_set_offset_for_shared_vbases): Likewise.
6524 (dfs_set_offset_for_unshared_vbases): Likewise.
6525 (layout_virtual_bases): Likewise. Adjust for changes to the
6526 CLASSTYPE_VBASECLASSES list.
6527 (dump_class_hierarchy_r): Use binfo_for_vbase
6528 instead of BINFO_FOR_VBASE.
6529 (dump_class_hierarchy): Likewise.
6530 (finish_vtbls): Likewise.
6531 (build_vtbl_initializer): Adjust for changes to the
6532 CLASSTYPE_VBASECLASSES list.
6533 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
6534 * decl.c (finish_destructor_body): Adjust for changes to the
6535 CLASSTYPE_VBASECLASSES list.
6536 * init.c (sort_base_init): Use binfo_for_vbase.
6537 (construct_virtual_bases): Adjust for changes to the
6538 CLASSTYPE_VBASECLASSES list.
6539 (expand_member_init): Use binfo_for_vbase.
6540 (build_vbase_delete): Adjust for changes to the
6541 CLASSTYPE_VBASECLASSES list.
6542 * method.c (do_build_copy_constructor): Likewise.
6543 * rtti.c (get_base_offset): Use binfo_for_vbase.
6544 (expand_class_desc): Remove #if 0'd code.
6545 * search.c (struct vbase_info): Remove vbase_types.
6546 (get_base_distance): Use binfo_for_vbase.
6547 (lookup_field_queue_p): Use CANONICAL_BINFO.
6548 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
6549 (get_pure_virtuals): Adjust for changes to the
6550 CLASSTYPE_VBASECLASSES list.
6551 (dfs_find_vbases): Use binfo_for_vbase.
6552 (dfs_init_vbase_pointers): Likewise.
6553 (init_vbase_pointers): Don't initialize vi.vbase_types.
6554 (virtual_context): Use binfo_for_vbase.
6555 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
6556 CLASSTYPE_VBASECLASSES list.
6557 (expand_indirect_vtbls_init): Simplify.
6558 (dfs_get_vbase_types): Don't replicate virtual bases.
6559 (find_vbase_instance): Use binfo_for_vbase.
6560 (binfo_for_vbase): New function.
6561 * typeck.c (get_delta_difference): Use binfo_for_vbase.
6563 2000-05-17 Mark Mitchell <mark@codesourcery.com>
6565 * decl2.c (finish_anon_union): Generalize error messages to handle
6566 anonymous structures.
6567 * init.c (perform_member_init): Remove `name' parameter.
6568 (build_field_list): New function.
6569 (sort_member_init): Handle anonymous union initialization order
6570 correctly. Check for multiple initializations of the same union.
6571 (emit_base_init): Don't look up fields by name here.
6572 (expand_member_init): Record the result of name lookup for future
6574 * typeck.c (build_component_ref): Fix formatting.
6576 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
6578 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
6579 * typeck.c (build_x_compound_expr): Replace warn_unused with
6582 * decl2.c (lang_decode_option): Update -Wall unused flags by
6583 calling set_Wunused.
6585 2000-05-16 Mark Mitchell <mark@codesourcery.com>
6587 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
6588 * init.c (dfs_vtable_path_unmark): Remove.
6589 * search.c (marked_new_vtable_p): Likewise.
6590 (unmarked_new_vtable_p): Likewise.
6591 (dfs_search_slot_nonempty_p): Likewise.
6592 (dfs_mark): Likewise.
6593 (dfs_vtable_path_unmark): Likewise.
6594 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
6595 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
6596 (dfs_init_vbase_pointers): Remove special-case new ABI code.
6597 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
6598 (init_vbase_pointers): Simplify.
6599 (expand_indirect_vtbls_init): Likewise.
6601 * class.c (copy_virtuals): New function.
6602 (build_primary_table): Use it.
6603 (build_secondary_vtable): Likewise.
6604 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
6605 indicate that no vcall offset is required.
6606 (add_virtual_function): Likewise.
6607 (modify_all_vtables): Likewise.
6608 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
6609 (dfs_accumulate_vtbl_inits): Likewise.
6610 (build_vtbl_initializer): Make changes to handle construction
6612 (dfs_build_vcall_offset_vtbl_entries): Likewise.
6613 (build_rtti_vtbl_entries): Likewise.
6614 (build_vtable_entries): Handle a NULL vcall_index.
6616 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
6618 * decl2.c (lang_decode_option): Fix thinko.
6620 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
6622 * except.c (check_handlers): New fn.
6623 * cp-tree.h: Declare it.
6624 * semantics.c (finish_handler_sequence): Call it.
6625 (finish_function_handler_sequence): Likewise.
6626 (finish_handler_parms): Set TREE_TYPE on the handler.
6627 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
6628 * search.c (get_base_distance_recursive): If protect>1, ignore
6630 (get_base_distance): Don't reduce watch_access.
6632 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
6634 * lex.c: #include diagnostic.h.
6635 (lang_init_options): Set default prefixing rules.
6637 * lang-options.h: Add -fdiagnostics-show-location=.
6639 * decl2.c: #include diagnostic.h.
6640 (lang_decode_option): Handle -fdiagnostics-show-location=.
6642 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
6644 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
6645 * vec.cc: Revert my 2000-05-07 change.
6647 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
6649 * class.c (check_field_decls): Complain about non-static data
6650 members with same name as class in class with constructor.
6652 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
6654 * decl.c (grokdeclarator): Allow non-static data members with
6657 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
6659 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
6660 and pending_inline.filename. Update prototypes.
6661 * decl.c (define_label): Constify filename parameter.
6662 * decl2.c (warn_if_unknown_interface): Constify local char *.
6663 * input.c Constify input_source.filename. Don't declare
6664 input_filename or lineno. Constify filename parameter to feed_input.
6665 * lex.c (init_parse): Constify parameter and return value.
6666 (cp_pragma_interface, cp_pragma_implementation): Constify
6668 (reinit_parse_for_method, reinit_parse_for_block,
6669 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
6670 Constify local char *.
6671 * pt.c: Don't declare lineno or input_filename.
6672 (print_template_context, tsubst_friend_function, tsubst_decl,
6673 tsubst, instantiate_decl): Constify local char *.
6674 * semantics.c (expand_body): Constify local char *.
6675 * tree.c (build_srcloc): Constify filename parameter.
6676 * typeck.c (c_expand_asm_operands): Constify filename
6679 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
6681 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
6684 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
6686 * inc/cxxabi.h: Fix typos in comment.
6687 (__base_class_info::__offset): Use a static_cast.
6689 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
6691 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
6692 of std::size_t and std::ptrdiff_t respectively.
6693 * tinfo.cc: Likewise.
6696 2000-05-06 Richard Henderson <rth@cygnus.com>
6698 * typeck.c (build_c_cast): Don't warn integer->pointer size
6699 mismatch for constants.
6701 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
6703 * rtti.c (ptmd_initializer): Set non-public, if class is
6706 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
6707 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6708 __cxa_vec_delete): Likewise.
6709 * tinfo.cc (__dynamic_cast): Likewise.
6710 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
6711 __cxa_vec_delete): Likewise.
6713 2000-05-04 Mark Mitchell <mark@codesourcery.com>
6715 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
6716 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
6717 (lang_decl_flags): Add vcall_offset.
6718 (THUNK_VCALL_OFFSET): Use it.
6719 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
6720 * method.c (make_thunk): Create the lang_decl here, not in
6722 (emit_thunk): Make generic thunks into ordinary functions once
6723 they have been fed to expand_body.
6724 * semantics.c (expand_body): Set current_function_is_thunk here.
6726 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6728 * class.c (update_vtable_entry_for_fn): Prototype.
6730 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
6733 * search.c (dfs_build_inheritance_graph_order): Prototype.
6735 2000-05-04 Mark Mitchell <mark@codesourcery.com>
6737 * cp-tree.h (special_function_kind): Add various kinds of
6739 (special_function_p): New function.
6740 * class.c (overrides): Don't let one kind of destructor override
6742 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
6743 whether or not to instantiate a template.
6744 * tree.c (special_function_p): Define.
6746 2000-05-03 Mark Mitchell <mark@codesourcery.com>
6748 * cp-tree.def (THUNK_DECL): Remove.
6749 * cp-tree.h (DECL_THUNK_P): New macro.
6750 (DECL_NON_THUNK_FUNCTION_P): Likewise.
6751 (DECL_EXTERN_C_FUNCTION_P): Likewise.
6752 (SET_DECL_THUNK_P): Likewise.
6753 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
6754 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
6755 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
6756 * decl.c (decls_match): Use DECL_EXTERN_C_P.
6757 (duplicate_decls): Likewise.
6758 (pushdecl): Likewise. Adjust thunk handling.
6759 (grokfndecl): Use DECL_EXTERN_C_P.
6760 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
6761 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
6762 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
6763 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
6764 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
6765 DECL_NO_STATIC_CHAIN.
6766 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
6767 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
6768 * search.c (covariant_return_p): Remove THUNK_DECL handling.
6771 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
6773 * tree.c (walk_tree): Set lineno.
6775 2000-05-01 Mark Mitchell <mark@codesourcery.com>
6777 * exception.cc: Update license notice.
6779 * new1.cc: Likewise.
6780 * new2.cc: Likewise.
6781 * tinfo.cc: Likewise.
6782 * tinfo2.cc: Likewise.
6784 * inc/cxxabi.h: Likewise.
6785 * inc/exception: Likewise.
6786 * inc/new: Likewise.
6787 * inc/new.h: Likewise.
6788 * inc/typeinfo: Likewise.
6790 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
6792 * tree.c (build_target_expr_with_type): If we already have a
6793 TARGET_EXPR, just return it.
6795 * optimize.c (initialize_inlined_parameters): Don't generate an
6796 EXPR_STMT if we can just use DECL_INITIAL.
6797 * decl.c (emit_local_var): Only make the initialization a
6798 full-expression if stmts_are_full_exprs_p.
6800 2000-05-01 Mark Mitchell <mark@codesourcery.com>
6802 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
6804 * call.c (standard_conversion): Use it.
6805 (direct_reference_binding): Likewise.
6806 (build_over_call): Likewise.
6807 (is_properly_derived_from): Likewise.
6808 (compare_ics): Likewise.
6809 * class.c (resolves_to_fixed_type_p): Likewise.
6810 * optimize.c (declare_return_variable): Likewise.
6811 * pt.c (is_specialization_of): Likewise.
6813 * typeck.c (comp_target_parms): Likeiwse.
6814 (build_static_cast): Likewise.
6815 (build_reinterpret_cast): Likewise.
6816 (build_const_cast): Likewise.
6817 (comp_ptr_ttypes_real): Likewise.
6818 (comp_ptr_ttypes_const): Likewise.
6819 * typeck2.c (process_init_constructor): Likewise.
6821 2000-04-30 Scott Snyder <snyder@fnal.gov>
6823 * decl.c (finish_destructor_body): Use the base destructor when
6824 destroying virtual bases.
6826 2000-04-30 Mark Mitchell <mark@codesourcery.com>
6828 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
6830 * optimize.c (struct inline_data): Add target_exprs field.
6831 (declare_return_variable): When a function returns an aggregate,
6832 use the variable declared in the TARGET_EXPR as the remapped
6834 (expand_call_inline): Update the pending target_exprs stack.
6835 (optimize_function): Initialize the stack.
6837 * decl2.c (finish_file): Fix typo in comment.
6839 * method.c (emit_thunk): Don't try to return a `void' value.
6841 * optimize.c (initialize_inlined_parameters): If the parameter is
6842 addressable, we need to make a new VAR_DECL, even if the
6843 initializer is constant.
6845 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
6847 * decl.c (grok_op_properties): Add an extra check of argtypes.
6849 2000-04-27 Mark Mitchell <mark@codesourcery.com>
6851 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
6853 (initialize_inlined_parameters): Try to avoid creating new
6856 2000-04-27 Alex Samuel <samuel@codesourcery.com>
6858 * lex.c (my_get_run_time): Remove.
6859 (init_filename_times): Use get_run_time instead of my_get_run_time.
6860 (check_newline): Likewise.
6861 (dump_time_statistics): Likewise.
6862 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
6863 of computing elapsed time explicitly.
6865 2000-04-26 Mark Mitchell <mark@codesourcery.com>
6867 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
6868 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
6869 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
6870 before calling decl_constant_value.
6871 * class.c (check_bitfield_decl): Likewise.
6872 * cvt.c (ocp_convert): Likewise.
6873 (convert): Likewise.
6874 * decl.c (compute_array_index_type): Likewise.
6875 (build_enumerator): Likewise.
6876 * decl2.c (check_cp_case_value): Likewise.
6877 * pt.c (convert_nontype_argument): Likewise.
6879 * typeck.c (decay_conversion): Likewise.
6880 (build_compound_expr): Likewise.
6881 (build_reinterpret_cast): Likewise.
6882 (build_c_cast): Likewise.
6883 (convert_for_assignment): Likewise.
6885 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
6887 * decl.c (finish_function): Don't play games with DECL_INLINE.
6889 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
6891 * ir.texi: Correct typo.
6893 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6895 * decl.c (grokdeclarator): Reject VLAs as members.
6897 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
6899 * call.c (standard_conversion): Accept conversion between
6902 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
6904 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
6906 * decl2.c (finish_file): Remove double setup for accounting
6909 2000-04-24 Robert Lipe <robertlipe@usa.net>
6911 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
6913 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
6915 * new.cc (set_new_handler): Needs to be in std::.
6917 2000-04-23 Mark Mitchell <mark@codesourcery.com>
6919 * cp-tree.h (lang_decl): Remove pretty_function_p.
6920 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
6921 language-specific node.
6922 * decl.c (cp_make_fname_decl): Use build_decl, not
6923 build_lang_decl, to build the variables.
6924 (grokvardecl): Don't call build_lang_decl for local variables in
6926 (grokdeclarator): Don't call build_lang_decl for local type
6927 declarations in templates.
6928 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
6929 zero'd memory, rather than calling memset.
6930 * pt.c: Include hashtab.h.
6931 (local_specializations): New variable.
6932 (retrieve_local_specialization): Use it.
6933 (register_local_specialization): Likewise.
6934 (tsubst_decl): Don't assume local variables have
6936 (instantiate_decl): Set up local_specializations.
6937 * Makefile.in (HTAB_H): New variable.
6939 2000-04-23 Richard Henderson <rth@cygnus.com>
6941 * typeck.c (c_expand_asm_operands): Restore the original
6942 contents of the output list.
6944 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
6946 * ir.texi: Document complex number representation.
6948 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
6950 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
6951 (target_incomplete_p): New function.
6952 (tinfo_base_init): Create comdat NTBS name variable.
6953 (ptr_initializer): Add non_public parameter. Calculate it.
6954 (ptmd_initializer): Likewise.
6955 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
6956 (create_real_tinfo_var): Add non_public parameter. Use it.
6957 Push proxy into global namespace.
6958 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
6960 * inc/typeinfo (type_info::before, type_info::operator==):
6961 Compare __name addresses.
6963 * tinfo2.cc: Remove new-abi builtins comment.
6965 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
6967 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
6969 * call.c (joust): Exit early if we get the same function, too.
6971 * decl2.c (key_method): Return NULL_TREE for template classes.
6972 (import_export_class): Don't need to check for template classes.
6974 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
6976 * lex.c: Remove references to cccp.c.
6978 2000-04-18 Mark Mitchell <mark@codesourcery.com>
6980 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
6981 volatile_memfunc. Add destructor_attr. Adjust dummy.
6982 (DECL_DESTRUCTOR_P): Use destructor_attr.
6983 (DECL_CONST_MEMFUNC_P): Reimplement.
6984 (DECL_VOLATILE_MEMFUNC_P): Remove.
6985 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
6986 (overrides): Use DECL_DESTRUCTOR_P.
6987 (check_for_override): Likewise.
6988 * decl.c (start_function): Likewise.
6989 * decl2.c (grokfclassfn): Likewise.
6990 (check_classfn): Likewise.
6991 (grok_function_init): Likewise.
6993 2000-04-17 Mark Mitchell <mark@codesourcery.com>
6995 * decl2.c (grokfield): Issue error on illegal data member
6998 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
7000 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
7002 2000-04-16 Mark Mitchell <mark@codesourcery.com>
7004 * class.c (build_vtable_entry): Don't build thunks for type-info
7007 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
7009 * decl.c (decls_match): Allow a redeclaration of a builtin to
7010 specify args while the builtin did not.
7012 2000-04-15 Mark Mitchell <mark@codesourcery.com>
7014 * cp-tree.def (THUNK_DECL): Add to documentation.
7015 * cp-tree.h (flag_huge_objects): Declare.
7016 * class.c (modify_vtable_entry): Tidy.
7017 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
7018 Calculate delta appropriately for the new ABI.
7019 (dfs_modify_vtables): Use it.
7020 (modify_all_vtables): Fix thinko in code to add overriding copies
7021 of functions to primary vtables.
7022 (build_clone): Fix typo in comment.
7023 (clone_function_decl): Correct order of destructors in vtable.
7024 (build_vbase_offset_vtbl_entries): Adjust comment.
7025 (dfs_vcall_offset_queue_p): Remove.
7026 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
7027 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
7028 (build_vtable_entry): Correct check for pure virtual functions.
7029 Don't declare flag_huge_objects.
7030 * decl.c (flag_huge_objects): Remove declaration.
7031 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
7032 Use int_size_in_bytes.
7033 (emit_thunk): Handle vcall offset thunks.
7035 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7037 * decl2.c (parse_time, varconst_time): Delete declarations.
7038 (finish_file): Delete LINENO declaration.
7039 START_TIME and THIS_TIME now long.
7041 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
7043 * class.c (build_base_field): Reformat comment.
7045 * inc/cxxabi.h (stddef.h): Comment inclusion.
7046 (__base_class_info::__offset): Comment shift.
7048 2000-04-12 Mark Mitchell <mark@codesourcery.com>
7050 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
7051 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
7052 (cp_push_exception_identifier): New macro.
7053 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
7054 (DECL_BASE_DESTRUCTOR_P): Likewise.
7055 (DECL_DELETING_DESTRUCTOR_P): Likewise.
7056 (get_vtbl_decl_for_binfo): Fix formatting.
7057 (in_charge_arg_for_name): New macro.
7058 (maybe_build_cleanup_and_delete): Remove declaration.
7059 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
7060 (in_charge_arg_for_name): New function.
7061 (build_new_method_call): Use it. Handle cloned destructors.
7062 (build_clone): Don't make the base constructor virtual.
7063 Automatically defer generated functions.
7064 (clone_function_decl): Handle destructors, too.
7065 (clone_constructors_and_destructors): Likewise.
7066 (create_vtable_ptr): Don't create a vtable entry for a cloned
7068 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
7069 (initialize_predefined_identifiers): Update appropriately.
7070 (finish_destructor_body): Simplify.
7071 (maybe_build_cleanup_and_delete): Remove.
7072 * except.c (expand_throw): Handle new-ABI destructors.
7073 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
7074 (build_dtor_call): New function.
7075 (build_delete): Use it. Simplify.
7076 * optimize.c (maybe_clone_body): Handle destructors.
7077 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
7079 * exception.cc (cleanup_fn): New typedef.
7080 (CALL_CLEANUP): New macro.
7081 (cp_eh_info): Use them.
7082 (__cp_push_exception): Likewise.
7083 (__cp_pop_exception): Likewise.
7085 2000-04-11 Mark Mitchell <mark@codesourcery.com>
7087 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
7088 (complete_dtor_identifier): New macro.
7089 (CLASSTYPE_FIRST_CONVERSION): Remove.
7090 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
7091 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
7092 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
7093 (CLASSTYPE_CONSTRUCTORS): Likewise.
7094 (CLASSTYPE_DESTRUCTORS): Likewise.
7095 (lang_decl): Add cloned_function.
7096 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
7097 (DECL_BASE_CONSTRUCTOR_P): Likewise.
7098 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
7099 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
7100 (DECL_CLONED_FUNCTION_P): Likewise.
7101 (DECL_CLONED_FUNCTION): Likewise.
7102 (clone_function_decl): Declare.
7103 (maybe_clone_body): Likewise.
7104 * call.c (build_user_type_conversion_1): Call complete object
7105 constructors in the new ABI.
7106 (build_new_method_call): Don't add in-charge parameters under the
7108 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
7109 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
7110 CLASSTYPE_DESTRUCTOR_SLOT.
7111 (build_clone): New function.
7112 (clone_function_decl): Likewise.
7113 (clone_constructors_and_destructors): Likewise.
7114 (check_bases_and_members): Use it.
7115 * decl.c (iniitialize_predefined_identifiers): Initialize
7116 complete_dtor_identifier.
7117 (finish_function): Don't add extra code to a clone.
7118 (lang_mark_tree): Mark cloned_function.
7119 * decl2.c (mark_used): Don't bother trying to instantiate things
7121 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
7122 * method.c (set_mangled_name_for_decl): Don't treat clones as
7124 (synthesize_method): Sythesize cloned functions, not the clones.
7125 * optimize.c (inline_data): Update comment on ret_label.
7126 (remap_block): Don't assume DECL_INITIAL exists.
7127 (copy_body_r): Allow ret_label to be NULL.
7128 (maybe_clone_body): Define.
7129 * pt.c (tsubst_decl): Handle clones.
7130 (instantiate_clone): New function.
7131 (instantiate_template): Use it.
7132 (set_mangled_name_for_template_decl): Don't treat clones as
7134 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
7135 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
7136 * semantics.c (expand_body): Clone function bodies as necessary.
7138 * optimize.c (remap_decl): Avoid sharing structure for arrays
7139 whose size is only known at run-time.
7140 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
7142 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
7143 to has_in_charge_parm_p.
7144 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
7145 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
7146 (DECL_COPY_CONSTRUCTOR_P): New macro.
7147 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
7148 (build_user_type_conversion_1): Likewise.
7149 (convert_like_real): Likewise.
7150 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
7151 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
7152 (copy_args_p): Likewise.
7153 (grok_ctor_properties): Likewise.
7154 (start_function): Likewise.
7155 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
7156 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
7157 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
7158 * method.c (do_build_copy_constructor): Use
7159 DECL_HAS_IN_CHARGE_PARM_P.
7160 (synthesize_method): Likewise.
7161 * pt.c (instantiate_template): Remove goto.
7162 * tree.c (build_cplus_method_type): Remove mention of obstacks in
7165 * cp-tre.h (finish_function): Change prototype.
7166 * decl.c (end_cleanup_fn): Adjust caller.
7167 (finish_function): Take only one parameter.
7168 * decl2.c (finish_objects): Adjust caller.
7169 (finish_static_storage_duration_function): Likewise.
7170 * method.c (emit_thunk): Likewise.
7171 * parse.y: Likewise.
7172 * parse.c: Regenerated.
7173 * pt.c (instantiate_decl): Likewise.
7174 * rtti.c (synthesize_tinfo_fn): Likewise.
7175 * semantics.c (expand_body): Likewise.
7177 * cp-tree.h (copy_decl): New function.
7178 * class.c (finish_struct_1): Use it.
7179 * lex.c (copy_decl): Define it.
7180 * pt.c (tsubst_decl): Likewise.
7181 * tree.c (copy_template_template_parm): Likewise.
7183 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
7184 has_nonpublic_assign_ref.
7185 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
7186 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
7187 * class.c (finish_struct_methods): Don't set
7188 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
7189 (interface_only): Don't declare.
7190 (interface_unknown): Likewise.
7192 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7194 * tree.h (HAVE_TEMPLATES): Remove definition.
7195 * lang-options.h (-fthis-is-variable): Remove documentation.
7197 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
7199 * class.c (instantiate_type): Handle object-relative template-id.
7201 * semantics.c (finish_expr_stmt): Call convert_to_void here.
7202 * decl.c (cplus_expand_expr_stmt): Not here.
7204 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
7205 Initialize exprtype earlier.
7207 * parse.y (fn.def1): Check for defining types in return types.
7209 * decl.c (check_tag_decl): Notice extra fundamental types.
7210 Diagnose empty decls in classes, too.
7212 * decl.c (grokdeclarator): Don't override an anonymous name if no
7213 declarator was given.
7215 * cvt.c (convert_to_void): Call resolve_offset_ref.
7217 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
7219 * decl2.c (decl_namespace): Handle getting a type.
7221 * typeck.c (build_c_cast): Re-enable warning for cast between
7222 pointer and integer of different size.
7224 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
7226 * inc/cxxabi.h (__pointer_type_info): Add restrict and
7228 (__pointer_type_info::__pointer_catch): New virtual function.
7229 (__pointer_to_member_type_info): Derive from
7230 __pointer_type_info. Adjust.
7231 (__pointer_to_member_type_info::__do_catch): Remove.
7232 (__pointer_to_member_type_info::__is_pointer_p): Declare.
7233 (__pointer_to_member_type_info::__pointer_catch): Declare.
7234 * rtti.c (qualifier_flags): Add restrict flag.
7235 (ptmd_initializer): Reorder members.
7236 (create_tinfo_types): Expand comments. Reorder
7237 ptmd_desc_type_node members.
7238 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
7240 (__pointer_type_info::__do_catch): Move specific code into
7241 __pointer_catch. Call it.
7242 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
7243 specific catch checking. Fix void conversion check.
7244 (__pointer_to_member_type_info::__do_catch): Remove.
7245 (__pointer_to_member_type_info::__pointer_catch): Implement.
7247 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7249 * lex.c (init_parse): Remove traces of classof and headof.
7250 * decl2.c (flag_operator_names): Default to 1.
7251 (lang_decode_option): Do not set it for -ansi.
7253 2000-04-09 Mark Mitchell <mark@codesourcery.com>
7255 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
7256 (DECL_MAIN_VARIANT): Remove.
7257 * decl.c (duplicate_decls): Don't set it.
7258 (start_function): Likewise.
7259 (lang_mark_tree): Don't mark it.
7260 * decl2.c (defer_fn): Don't use it.
7261 * lex.c (retrofit_lang_decl): Don't set it.
7262 * pt.c (tsubst_decl): Likewise.
7263 * ptree.c (print_lang_decl): Don't print it.
7264 * typeck.c (mark_addressable): Don't use it.
7266 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
7268 * vec.cc: Include <new> and <exception>.
7269 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
7270 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
7272 (__cxa_vec_delete): Catch dtor exceptions.
7274 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
7276 Prepend __ to implementation defined names.
7277 * inc/typeinfo (type_info): Rename _name to __name.
7278 (type_info::type_info): Rename parameter.
7279 (type_info::operator==, type_info::operator!=,
7280 type_info::before): Likewise.
7281 (type_info::is_pointer_p, type_info::is_function_p,
7282 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
7285 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
7286 (__pointer_type_info::__pointer_type_info): Likewise.
7287 (__pointer_type_info::is_pointer_p,
7288 __pointer_type_info::do_catch): Prepend __. Rename parameters.
7289 (__array_type_info::__array_type_info): Rename parameters.
7290 (__function_type_info::__function_type_info): Likewise.
7291 (__function_type_info::is_function_p): Prepend __.
7292 (__enum_type_info::__enum_type_info): Rename parameters.
7293 (__pointer_to_member_type_info::__pointer_to_member_type_info):
7295 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
7297 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
7298 (__class_type_info::__class_type_info): Rename parameters.
7299 (__class_type_info::sub_kind): Prepend __. Adjust member names.
7300 (__class_type_info::upcast_result,
7301 __class_type_info::dyncast_result): Prepend __. Move definition
7303 (__class_type_info::do_upcast, __class_type_info::do_catch,
7304 __class_type_info::find_public_src,
7305 __class_type_info::do_dyncast,
7306 __class_type_info::do_find_public_src): Prepend __. Rename
7308 (__si_class_type_info::__si_class_type_info): Rename parameters.
7309 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
7310 __si_class_type_info::do_find_public_src): Prepent __. Rename
7312 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
7313 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
7314 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
7316 (__dynamic_cast): Rename parameters.
7317 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
7318 type_info::do_catch, type_info::do_upcast): Prepend __.
7319 (contained_p, public_p, virtual_p, contained_public_p,
7320 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
7321 (__class_type_info::do_catch,
7322 __class_type_info::do_upcast): Prepend __. Adjust.
7323 (__class_type_info::__upcast_result,
7324 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
7326 (__class_type_info::find_public_src): Prepend __. Adjust.
7327 (__class_type_info::do_find_public_src,
7328 __si_class_type_info::do_find_public_src,
7329 __vmi_class_type_info::do_find_public_src): Likewise.
7330 (__class_type_info::do_dyncast,
7331 __si_class_type_info::do_dyncast,
7332 __vmi_class_type_info::do_dyncast): Likewise.
7333 (__class_type_info::do_upcast,
7334 __si_class_type_info::do_upcast,
7335 __vmi_class_type_info::do_upcast): Likewise.
7336 (__dynamic_cast): Adjust.
7337 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
7338 (__function_type_info::is_function_p): Likewise.
7339 (__pointer_type_info::do_catch): Likewise. Adjust.
7340 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
7341 (__throw_type_match_rtti_2): Adjust.
7342 (__is_pointer): Adjust.
7344 2000-04-08 Mark Mitchell <mark@codesourcery.com>
7346 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
7347 (complete_ctor_identifier): New macro.
7348 (special_function_kind): Add sfk_copy_constructor and
7349 sfk_assignment_operator.
7350 (LOOKUP_HAS_IN_CHARGE): Remove.
7351 (cons_up_default_function): Rename to ...
7352 (implicitly_declare_fn): ... this.
7353 * call.c (build_new_method_call): Add in-charge parameters for
7355 * class.c (add_implicitly_declared_members): Change parameter name
7356 from cant_have_assignment to cant_have_const_assignment.
7357 Replace calls to cons_up_default_function to implicitly_declare_fn.
7358 * cvt.c (ocp_convert): Use complete_ctor_identifier.
7359 * decl.c (initialize_predefined_identifiers): Initialize it.
7360 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
7362 * init.c (expand_default_init): Don't calculate the in-charge
7364 (build_new_1): Likewise.
7365 * lex.c (cons_up_default_function): Move to method.c.
7366 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
7367 (implicitly_declare_fn): New function.
7368 * typeck.c (build_static_cast): Use complete_ctor_identifier.
7369 (build_modify_expr): Likewise.
7370 * typeck2.c (build_functional_cast): Likewise.
7372 Under the new ABI, constructors don't return `this'.
7373 * cp-tree.h (warn_reorder): Declare.
7374 (special_function_kind): New enum.
7375 (global_base_init_list): Remove declaration.
7376 (emit_base_init): Don't return a value.
7377 (check_base_init): Don't declare.
7378 (is_aggr_typedef): Likewise.
7379 * decl.c (check_special_function_return_type): New function.
7380 (return_types): Remove.
7381 (grokdeclarator): Use check_special_function_return_type.
7382 (start_function): Don't initialize ctor_label under the new ABI.
7383 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
7384 * init.c (begin_init_stmts): Move to top of file.
7385 (finish_init_stmts): Likewise.
7386 (warn_reorder): Don't declare.
7387 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
7389 (check_base_init): Remove.
7390 (is_aggr_typedef): Likewise.
7391 (build_new_1): Don't use the return value of a constructor.
7392 * semantics.c (setup_vtbl_ptr): Don't use the return value
7394 * typeck.c (check_return_expr): Don't magically convert return
7395 statements into `return this' in constructors under the new ABI.
7397 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
7398 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
7399 (base_ctor_identifier): New macro.
7400 (base_dtor_identifier): Likewise.
7401 (deleting_dtor_identifier): Likewise.
7402 * decl.c: Don't include obstack.h.
7403 (obstack_chunk_alloc): Don't define.
7404 (obstack_chunk_free): Likewise.
7405 (struct predefined_identifier): New type.
7406 (initialize_predefined_identifiers): New function.
7407 (init_decl_processing): Use it.
7408 (debug_temp_inits): Remove.
7409 (start_method): Don't call preserve_data.
7410 (hack_incomplete_structures): Update comment.
7411 * init.c (init_init_processing): Don't initialize
7413 (build_offset_rf): Remove dead code.
7414 (build_delete): Use CLASSTYPE_N_BASECLASSES.
7415 * search.c (init_search_processing): Don't initialize
7418 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7420 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
7421 some sign_compare warnings.
7423 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
7425 Rename abi::__vmi_class_type_info members.
7426 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
7427 base_list, detail_masks members to vmi_flags, vmi_base_count,
7428 vmi_bases and vmi_flags_masks respectively.
7429 (__vmi_class_type_info::vmi_flags_masks): Rename
7430 details_unknown_mask to flags_unknown_mask.
7431 * tinfo.cc (__class_type_info::do_upcast): Adjust.
7432 (__vmi_class_type_info::do_find_public_src): Adjust.
7433 (__vmi_class_type_info::do_dyncast): Adjust.
7434 (__vmi_class_type_info::do_upcast): Adjust.
7436 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
7438 * tinfo.cc (convert_to_base): New function.
7439 (get_vbase_offset): Remove. Move into convert_to_base.
7440 (__vmi_class_type_info::do_find_public_src): Adjust.
7441 (__vmi_class_type_info::do_dyncast): Adjust.
7442 (__vmi_class_type_info::do_upcast): Adjust.
7444 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
7446 * tinfo.cc (operator=): Use __builtin_strcmp.
7447 * tinfo2.cc (before): Likewise.
7449 2000-04-06 Mark Mitchell <mark@codesourcery.com>
7451 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
7452 (DECL_SAVED_INLINE): Rename to ...
7453 (DECL_DEFERRED_FN): ... this.
7454 (in_function_p): Remove declaration.
7455 (mark_inline_for_output): Rename to ...
7456 (defer_fn): ... this.
7457 * decl.c (finish_function): Adjust call to mark_inline_for_output.
7458 (in_function_p): Remove definition.
7459 * decl2.c (saved_inlines): Rename to ...
7460 (deferred_fns): ... this.
7461 (saved_inlines_used): Rename to ...
7462 (deferred_fns_used): ... this.
7463 (mark_inline_for_output): Rename to ...
7464 (defer_fn): ... this.
7465 (finish_file): Adjust accordingly.
7466 (init_decl2): Likewise.
7467 * lex.c (cons_up_default_function): Likewise.
7468 * pt.c (mark_decl_instantiated): Likewise.
7469 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
7471 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
7472 * semantics.c (expand_body): Defer more functions.
7474 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
7477 * Make-lang.in (CXX_LIB2FUNCS): Add it.
7479 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
7480 __cxa_vec_delete): Declare.
7482 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
7484 * rtti.c (dfs_class_hint_mark): New static function.
7485 (dfs_class_hint_unmark): New static function.
7486 (class_hint_flags): Use them.
7488 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
7490 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
7492 2000-04-05 Mark Mitchell <mark@codesourcery.com>
7494 * cp-tree.h (instantiate_decl): Change prototype.
7495 * decl2.c (mark_used): Adjust call.
7496 * optimize.c (inlinable_function_p): Adjust handling of templates.
7497 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
7498 (do_type_instantiation): Likewise.
7499 (instantiate_decl): Defer more templates.
7500 (instantiate_pending_templates): Adjust logic to handle inline
7503 * Makefile.in (GGC_H): New variable. Use it throughout in place
7506 * call.c: Don't include obstack.h. Include ggc.h.
7507 (obstack_chunk_alloc): Don't define.
7508 (obstack_chunk_free): Likewise.
7509 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
7510 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
7511 (pop_switch): Free it.
7513 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
7515 * dump.c (dequeue_and_dump): Don't try to print the bit_position
7516 if we don't have a DECL_FIELD_OFFSET.
7518 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
7520 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
7523 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7525 * cfns.gperf (hash, libc_name_p): Prototype.
7527 * rtti.c (build_dynamic_cast_1): Constification.
7529 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
7531 * semantics.c (deferred_type_access_control): Prototype.
7533 2000-04-04 Mark Mitchell <mark@codesourcery.com>
7535 Correct many new ABI issues regarding vbase and vcall offset
7537 * cp-tree.h (BINFO_VTABLE): Document.
7538 (struct lang_type): Tweak formatting.
7539 (BINFO_PRIMARY_BINFO): Add to documentation.
7540 (CLASSTYPE_VSIZE): Fix typo in comment.
7541 (CLASSTYPE_VBASECLASSES): Update documentation.
7542 (BINFO_VBASE_MARKED): Remove.
7543 (SET_BINFO_VBASE_MARKED): Likewise.
7544 (CLEAR_BINFO_VBASE_MARKED): Likewise.
7545 (BINFO_FIELDS_MARKED): Remove.
7546 (SET_BINFO_FIELDS_MARKED): Likewise.
7547 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
7548 (enum access_kind): New enumeration.
7549 (num_extra_vtbl_entries): Remove declaration.
7550 (size_extra_vtbl_entries): Likewise.
7551 (get_vtbl_decl_for_binfo): New function.
7552 (dfs_vbase_unmark): Remove declaration.
7553 (mark_primary_bases): Likewise.
7554 * class.c (SAME_FN): Remove.
7555 (struct vcall_offset_data_s): Move definition.
7556 (build_vbase_pointer): Use `build', not `build_binary_op', to
7557 access the vbase pointer under the new ABI.
7558 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
7559 (build_primary_vtable): Likewise.
7560 (dfs_mark_primary_bases): Move here from search.c.
7561 (mark_primary_bases): Likewise.
7562 (determine_primary_bases): Under the new ABI, don't make a base
7563 class a primary base just because we don't yet have any virtual
7565 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
7566 (num_vfun_entries): Remove.
7567 (dfs_count_virtuals): Likewise.
7568 (num_extra_vtbl_entries): Likewise.
7569 (size_extra_vtbl_entries): Likewise.
7570 (layout_virtual_bases): Iterate in inheritance graph order under
7572 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
7573 indicate that a vfield is present.
7574 (init_class_processing): Initialize access_public_node, etc., from
7576 (get_vtbl_decl_for_binfo): New function.
7577 (dump_class_hierarchy_r): Likewise.
7578 (dump_class_hierarchy): Use it.
7579 (finish_vtbls): Build the vtbls in inheritance graph order.
7580 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
7581 (initialize_vtable): Use get_vtbl_decl_for_binfo.
7582 (accumulate_vtbl_inits): Add comments explaining why a pre-order
7584 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
7585 where the vptr points, even for primary vtables.
7586 (build_vtbl_initializer): Adjust handling of vbase and vcall
7588 (build_vcall_and_vbase_vtable_entries): New function.
7589 (dfs_build_vbase_offset_vtbl_entries): Remove.
7590 (build_vbase_offset_vtbl_entries): Reimplement.
7591 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
7592 were already handled in a primary base class vtable.
7593 (build_vcall_offset_vtbl_entries): Adjust.
7594 (build_rtti_vtbl_entries): Adjust.
7595 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
7596 * init.c (expand_virtual_init): Simplify.
7597 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
7598 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
7599 * search.c (BINFO_ACCESS): New macro.
7600 (SET_BINFO_ACCESS): Likewise.
7601 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
7602 (access_in_type): Likewise.
7603 (dfs_accessible_p): Likewise.
7604 (protected_accessible_p): Likewise.
7605 (lookup_fnfields_1): Adjust documentation.
7606 (dfs_mark_primary_bases): Move to class.c
7607 (mark_primary_bases): Likewise.
7608 (dfs_vbase_unmark): Remove.
7609 (virtual_context): Use BINFO_FOR_VBASE.
7610 (dfs_get_vbase_types): Simplify.
7611 (dfs_build_inheritance_graph_order): New function.
7612 (get_vbase_types): Use it.
7613 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
7615 * tinfo.cc (get_vbase_offset): New function.
7616 (__vmi_class_type_info::do_find_public_src): Use it.
7617 (__vmi_class_type_info::do_dyncast): Likewise.
7618 (__vmi_class_type_info::do_upcast): Likewise.
7620 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
7622 * lang-specs.h: Pass -fno-show-column to the preprocessor.
7624 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
7626 * rtti.c (class_hint_flags): Rename flags.
7627 (class_initializer): Remove flags.
7628 (synthesize_tinfo_var): Combine offset and flags. Add flags
7629 for __vmi_class_type_info.
7630 (create_tinfo_types): Remove flags from __class_type_info and
7631 __si_class_type_info. Merge flags and offset from
7632 base_class_type_info.
7633 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
7634 (__base_class_info::is_virtual_p): Adjust.
7635 (__base_class_info::is_public_p): Adjust.
7636 (__base_class_info::offset): New accessor.
7637 (__class_type_info::details): Remove member.
7638 (__class_type_info::__class_type_info): Lose details.
7639 (__class_type_info::detail_masks): Remove.
7640 (__si_class_type_info::__si_class_type_info): Lose details.
7641 (__vmi_class_type_info::details): New member.
7642 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
7643 (__vmi_class_type_info::detail_masks): New member.
7644 * tinfo.cc (__class_type_info::do_upcast): Initialize result
7645 with unknown_details_mask.
7646 (__vmi_class_type_info::do_find_public_src): Adjust
7647 (__vmi_class_type_info::do_dyncast): Adjust.
7648 (__vmi_class_type_info::do_upcast): Set result details, if
7650 (__dynamic_cast): Temporarily #if out optimization.
7652 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
7654 * rtti.c (get_tinfo_decl): Mark used.
7655 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
7656 mark as dealt with, if we output it.
7658 2000-03-28 Mark Mitchell <mark@codesourcery.com>
7660 * class.c: Reorganize to put virtual function table initialization
7661 machinery at the end of the file.
7663 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
7665 * class.c (finish_struct): Use bitsize_zero_node.
7666 * pt.c (instantiate_class_template): Likewise.
7668 2000-03-28 Mark Mitchell <mark@codesourcery.com>
7670 Put RTTI entries at negative offsets in new ABI.
7671 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
7672 vbase offset at index -3, not -1.
7673 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
7674 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
7675 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
7676 (build_rtti_vtbl_entries): New function.
7677 (set_rtti_entry): Remove.
7678 (build_primary_vtable): Don't use it.
7679 (build_secondary_vtable): Likewise.
7680 (start_vtable): Remove.
7681 (first_vfun_index): New function.
7682 (set_vindex): Likewise.
7683 (add_virtual_function): Don't call start_vtable. Do call
7685 (set_primary_base): Rename parameter.
7686 (determine_primary_base): Likewise.
7687 (num_vfun_entries): Don't use skip_rtti_stuff.
7688 (num_extra_vtbl_entries): Include RTTI information.
7689 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
7690 (skip_rtti_stuff): Remove.
7691 (dfs_modify_vtables): Don't use it.
7692 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
7693 (layout_nonempty_base_or_field): Update size handling.
7694 (create_vtable_ptr): Tweak.
7695 (layout_class_type): Adjust parameter names.
7696 (finish_struct_1): Simplify.
7697 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
7698 (skip_rtti_stuff): Remove.
7699 (first_vfun_index): New function.
7700 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
7701 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
7702 (marked_vtable_pathp): Declare.
7703 (unmarked_vtable_pathp): Likewise.
7704 * error.c (dump_expr): Use first_vfun_index to calculate vtable
7706 * rtti.c (build_headof): Look for RTTI at negative offsets.
7707 (get_tinfo_decl_dynamic): Likewise.
7708 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
7710 (create_pseudo_type_info): Do it here instead. Adjust so that
7711 vptr points at first virtual function.
7712 * search.c (marked_vtable_pathp): Make it global.
7713 (unmarked_vtable_pathp): Likewise.
7714 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
7715 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
7716 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
7717 (get_pure_virtuals): Likewise.
7718 (expand_upcast_fixups): Likewise.
7719 * tree.c (debug_binfo): Likewise.
7720 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
7723 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7725 * class.c (check_field_decl): Fix typo.
7726 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
7727 (check_methods): Likewise.
7728 (check_field_decls): Likewise.
7729 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
7730 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
7731 Use DECL_RESULT_FLD, not DECL_RESULT.
7732 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
7733 * lex.c (identifier_type): Likewise.
7734 * pt.c (determine_specialization, lookup_template_class): Likewise.
7735 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
7736 (resolve_overloaded_unification, more_specialized): Likewise.
7737 * semantics.c (finish_member_declaration): Likewise.
7738 * typeck.c (build_x_function_call): Likewise.
7740 2000-03-26 Mark Mitchell <mark@codesourcery.com>
7742 * class.c (layout_empty_base): Handle empty bases with non-byte
7744 (build_base_field): Likewise.
7745 (layout_virtual_bases): Likewise.
7747 * class.c (finish_struct_1): Fix typo in this change:
7749 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7751 2000-03-25 Mark Mitchell <mark@codesourcery.com>
7753 * decl.c (grokdeclarator): Count partial specializations when
7754 keeping track of how many template classes have been seen.
7756 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
7758 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7760 * class.c (build_vbase_pointer_fields): layout_field now place_field.
7761 (get_vfield_offset): Use byte_position.
7762 (set_rtti_entry): Set OFFSET to ssizetype zero.
7763 (get_binfo_offset_as_int): Deleted.
7764 (dfs_record_base_offsets): Use tree_low_cst.
7765 (dfs_search_base_offsets): Likewise.
7766 (layout_nonempty_base_or_field): Reflect changes in RLI format
7767 and call byte_position.
7768 (layout_empty_base): Convert offset to ssizetype.
7769 (build_base_field): use rli_size_unit_so_far.
7770 (dfs_propagate_binfo_offsets): Do computation in proper type.
7771 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
7772 (layout_class_type): Reflect changes in RLI names and fields.
7773 (finish_struct_1): Set DECL_FIELD_OFFSET.
7774 * dump.c (dequeue_and_dump): Call bit_position.
7775 * expr.c (cplus_expand_constant): Use byte_position.
7776 * rtti.c (expand_class_desc): Use bitsize_one_node.
7777 * typeck.c (build_component_addr): Use byte_position and don't
7778 special case for zero offset.
7780 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
7782 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
7784 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
7786 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
7789 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7791 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
7793 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
7794 make_typename_type, check_initializer, cp_finish_decl,
7795 xref_tag): Likewise.
7796 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
7797 decl_namespace, arg_assoc_template_arg, arg_assoc,
7798 validate_nonmember_using_decl, do_class_using_decl): Likewise.
7799 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
7800 args_to_string): Likewise.
7801 * friend.c (is_friend): Likewise.
7802 * lex.c (note_got_semicolon, note_list_got_semicolon,
7803 is_global): Likewise.
7804 * method.c (build_overload_nested_name, build_overload_value,
7805 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
7806 * parse.y (typename_sub, typename_sub1): Likewise.
7807 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
7808 process_partial_specialization, convert_template_argument,
7809 template_args_equal, add_pending_template, lookup_template_class,
7810 for_each_template_parm_r, maybe_fold_nontype_arg,
7811 tsubst, instantiate_template, type_unification_real, unify,
7812 instantiate_pending_templates, set_mangled_name_for_template_decl):
7814 * repo.c (repo_get_id, repo_template_used): Likewise.
7815 * search.c (lookup_field_1): Likewise.
7816 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
7817 * xref.c (classname): Likewise.
7819 2000-03-22 Mark Mitchell <mark@codesourcery.com>
7821 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
7822 (CANONICAL_BINFO): New macro.
7823 (BINFO_NEW_VTABLE_MARKED): Use it.
7824 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
7825 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
7826 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
7828 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7829 (build_secondary_vtable): Likewise.
7830 (dfs_finish_vtbls): Likewise.
7831 (dfs_accumulate_vtbl_inits): Likewise.
7832 (accumulate_vtbl_inits): New function.
7833 (finish_vtbls): Make sure that virtual bases come after
7834 non-virtual bases in the vtable group.
7835 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
7836 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7837 * search.c (struct vbase_info): Move definition.
7838 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7839 (unmarked_new_vtable_p): Likewise.
7840 (dfs_mark_vtable_path): Remove.
7841 (dfs_mark_new_vtable): Remove.
7842 (dfs_unmark_new_vtable): Likewise.
7843 (dfs_clear_search_slot): Likewise.
7844 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
7845 (dfs_clear_vbase_slots): Likewise.
7846 (init_vbase_pointers): LIkewise.
7848 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
7850 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
7851 SIZETYPE to a non-SIZETYPE.
7853 2000-03-21 Mark Mitchell <mark@codesourcery.com>
7855 * class.c (layout_virtual_bases): Adjust names in conditionally
7858 * class.c (record_base_offsets): New function.
7859 (layout_conflict_p): Likewise.
7860 (layout_nonempty_base_or_field): Use it.
7861 (layout_empty_base): New function.
7862 (build_base_field): Use it.
7863 (build_base_fields): Update comment.
7864 (layout_virtual_bases): Fold in a little code form
7865 layout_basetypes. Use layout_empty_base.
7866 (layout_basetypes): Remove.
7867 (end_of_class): New function.
7868 (layout_class_type): Use it. Adjust.
7870 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
7872 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
7874 (dfs_skip_nonprimary_vbases_markedp): Likewise.
7875 * typeck.c (fntype_p): Remove.
7877 * cp-tree.h (TI_SPEC_INFO): Remove.
7878 (CLASSTYPE_TI_SPEC_INFO): Likewise.
7879 * pt.c (process_partial_specialization): Likewise.
7881 * class.c (build_base_field): Fix thinko in computation of binfo
7884 * tree.c (mark_local_for_remap_p): Mark variables declared in
7885 TARGET_EXPRs as well.
7887 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
7889 * typeck.c (require_complete_type, complete_type,
7890 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
7891 build_array_ref, convert_arguments, pointer_diff,
7892 build_x_unary_op, build_unary_op, build_c_cast,
7893 build_modify_expr): Use COMPLETE_TYPE_P etc.
7894 * call.c (is_complete, convert_like_real,
7895 build_new_method_call): Likewise.
7896 * class.c (build_vbase_pointer_fields, check_bases,
7897 build_base_field, finish_struct_1, pushclass): Likewise.
7898 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
7899 * decl.c (maybe_process_template_type_declaration, pushtag,
7900 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
7901 layout_var_decl, check_initializer, cp_finish_decl,
7902 grokdeclarator, require_complete_types_for_parms,
7903 grok_op_properties, xref_tag, xref_basetypes,
7904 check_function_type): Likewise.
7905 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
7906 * friend.c (do_friend): Likewise.
7907 * init.c (build_offset_ref): Likewise.
7908 * parse.y (structsp): Likewise.
7909 * pt.c (maybe_process_partial_specialization,
7910 tsubst_friend_function, instantiate_class_template, tsubst,
7911 do_type_instantiation, instantiate_pending_templates): Likewise.
7912 * repo.c (repo_get_id): Likewise.
7913 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
7914 synthesize_tinfo_var, emit_support_tinfos): Likewise.
7915 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
7916 * semantics.c (begin_class_definition): Likewise.
7917 * tree.c (build_cplus_method_type): Likewise.
7918 * typeck2.c (digest_init, build_functional_cast,
7919 add_exception_specifier): Likewise.
7920 * parse.h, parse.c: Regenerated.
7922 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
7924 * inc/cxxabi.h: New header file. Define new-abi entry points.
7925 (__pointer_type_info::target): Rename member to ...
7926 (__pointer_type_info::type): ... here.
7927 (__base_class_info::type): Rename member to ...
7928 (__base_class_info::base): ... here.
7929 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
7930 * cp-tree.h (CPTI_ABI): New global tree enumeration.
7931 (abi_node): New global tree node.
7932 * decl.c (abi_node): Document.
7933 (init_decl_processing): Initialize abi_node.
7934 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
7935 (get_vmi_pseudo_type_info): Likewise.
7936 (create_tinfo_types): Likewise.
7937 (emit_support_tinfos): Likewise.
7938 * tinfo.h (cxxabi.h): Include for new-abi.
7939 Move rtti class definitions to new header file.
7940 * tinfo.cc (abi): Use the namespace.
7941 (std): Move new abi rtti classes from here ...
7942 (__cxxabiv1): ... to here.
7943 * tinfo2.cc (cxxabi.h): Include for new-abi.
7944 Move rtti class definitions to new header file.
7945 (std): Move new abi rtti classes from here ...
7946 (__cxxabiv1): ... to here.
7947 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
7950 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
7951 Jason Merrill <jason@casey.cygnus.com>
7953 * method.c (build_overload_int): Use host_integerp.
7955 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7957 * init.c (build_offset_ref): Handle the case of a templated member
7960 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7962 * except.c (expand_exception_blocks): Clear catch_clauses_last.
7964 2000-03-18 Mark Mitchell <mark@codesourcery.com>
7966 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
7967 * class.c (check_bitfield_decl): Turn illegal bitfields into
7969 (dfs_propagate_binfo_offsets): Adjust for new size_binop
7971 (dfs_offset_for_unshared_vbases): Likewise.
7972 * cvt.c (cp_convert_to_pointer): Convert NULL to a
7973 pointer-to-member correctly under the new ABI.
7974 * expr.c (cplus_expand_constant): Don't use cp_convert when
7975 turning an offset into a pointer-to-member.
7976 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
7977 when dereferencing them under the new ABI.
7978 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
7979 of pointers-to-members under the new ABI.
7981 * class.c (check_bitfield_decl): Remove restriction on really long
7983 (layout_class_type): Implement new ABI handling of bitfields
7984 longer than their types.
7986 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7988 * parse.y (extdefs): Call ggc_collect.
7989 * parse.c: Regenerated.
7991 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
7993 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
7994 (note_name_declared_in_class): Use OVL_CURRENT to get at a
7997 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7999 * class.c (build_vbase_path): Use integer_zerop.
8000 (build_vtable_entry): Use tree_low_cst.
8001 (get_vfield_offset): Use bit_position.
8002 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
8004 (check_bitfield_decl): Set DECL_SIZE using convert.
8005 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
8006 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
8008 (finish_struct_1): Use bit_position.
8009 (dump_class_hierarchy): Use tree_low_cst.
8010 * cp-tree.h (min_precision): Add declaration.
8011 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
8012 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
8013 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
8014 * expr.c (cplus_expand_constant): Use bit_position.
8015 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
8016 * rtti.c (get_base_offset): Use bit_position.
8017 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
8018 host_integerp, and tree_low_cst.
8019 (pointer_int_sum): Use integer_zerop.
8020 (build_component_addr): Use bit_position.
8022 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
8024 * typeck.c (require_complete_type): Don't assume size_zero_node.
8025 (complete_type_or_else): Likewise.
8027 2000-03-16 Steven Grady <grady@digitaldeck.com>
8028 Jason Merrill <jason@casey.cygnus.com>
8030 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
8032 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
8034 * decl2.c (grokfield): Bail out if type is error_mark_node.
8036 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
8038 * tinfo2.cc (__ptr_to_member_data): Rename to ...
8039 (__pointer_to_member_data): ... here. Adjust.
8040 * rtti.c (create_tinfo_types): Adjust.
8042 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
8044 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
8045 * decl.c (ref_desc_type_node): Undocument.
8046 * rtti.c (ptr_ref_initializer): Rename to ...
8047 (ptr_initializer): ... here. Adjust comments.
8048 (ptmd_initializer): Fix comment thinko.
8049 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
8050 (create_tinfo_types): Remove ref_desc_type_node init.
8051 * tinfo2.cc (__reference_type_info): Remove.
8053 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
8055 * decl.c (cp_finish_decl): Remove obsolete comment.
8057 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
8059 2000-03-14 Mark Mitchell <mark@codesourcery.com>
8061 * cp-tree.h: Tweak documentation.
8062 * class.c (build_vbase_pointer_fields): Layout the fields, too.
8063 (avoid_overlap): Remove.
8064 (get_binfo_offset_as_int): New function.
8065 (dfs_serach_base_offsets): Likewise.
8066 (layout_nonempty_base_or_field): Likewise.
8067 (build_base_field): Layout fields here. Avoid placing two objects
8068 of the same type at the same address, under the new ABI.
8069 (build_base_fields): Adjust accordingly.
8070 (create_vtable_ptr): Return the new field, but don't attach it to
8072 (remove_base_field): Remove.
8073 (remove_base_fields): Remove.
8074 (layout_basetypes): Adjust accordingly.
8075 (layout_class_type): Call layout_field for each field, rather than
8076 just making a wholesale call to layout_type.
8078 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
8080 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
8082 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
8084 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
8086 * except.c (dtor_nothrow): New fn.
8087 (do_pop_exception): Use it. Take type parm.
8088 (push_eh_cleanup): Take type parm.
8089 (expand_start_catch_block): Pass it.
8090 (build_eh_type_type_ref): Accept null type.
8092 2000-03-12 Mark Mitchell <mark@codesourcery.com>
8094 * cp-tree.h (revert_static_member_fn): Change prototype.
8095 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
8096 (grok_op_properties): Likewise.
8097 (start_function): Likewise.
8098 (revert_static_member_fn): Simplify.
8099 * pt.c (check_explicit_specialization): Adjust call to
8100 revert_static_member_fn.
8102 2000-03-11 Mark Mitchell <mark@codesourcery.com>
8104 * cp-tree.h (scope_kind): New type.
8105 (tmpl_spec_kind): Likewise.
8106 (declare_pseudo_global_level): Remove.
8107 (pseudo_global_level_p): Rename to template_parm_scope_p.
8108 (pushlevel): Remove declaration.
8109 (begin_scope): New function.
8110 (finish_scope): Likewise.
8111 (current_tmpl_spec_kind): Likewise.
8112 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
8113 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
8114 Add template_spec_p.
8115 (toplevel_bindings_p): Adjust.
8116 (declare_pseudo_global_level): Remove.
8117 (pseudo_global_level_p): Rename to template_parm_scope_p.
8118 (current_tmpl_spec_kind): New function.
8119 (begin_scope): Likewise.
8120 (finish_scope): Likewise.
8121 (maybe_push_to_top_level): Adjust.
8122 (maybe_process_template_type_declaration): Likewise.
8123 (pushtag): Likewise.
8124 (pushdecl_nonclass_level): Likewise.
8125 (lookup_tag): Likewise.
8126 (grokfndecl): Handle member template specializations. Share
8127 constructor and non-constructor code.
8128 * decl2.c (check_classfn): Handle member template specializations.
8129 * pt.c (begin_template_parm_list): Use begin_scope.
8130 (begin_specialization): Likewise.
8131 (end_specialization): Likewise.
8132 (check_explicit_specialization): Use current_tmpl_spec_kind.
8133 Handle member template specializations.
8134 (end_template_decl): Use finish_scope. Remove call to
8136 (push_template_decl_real): Remove bogus error message.
8137 (tsubst_decl): Fix typo in code contained in comment.
8138 (instantiate_template): Handle member template specializations.
8139 (most_general_template): Likewise.
8141 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
8143 * lex.c (whitespace_cr): Compress consecutive calls to warning().
8144 (do_identifier): Ditto for error().
8146 * pt.c (convert_nontype_argument): Ditto for cp_error().
8147 (convert_template_argument): Ditto for cp_pedwarn().
8149 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
8151 * exception.cc (__check_null_eh_spec): New fn.
8152 * except.c (expand_end_eh_spec): Call it if the spec is throw().
8154 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
8156 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
8157 * except.c (expand_end_eh_spec): Add the return type.
8158 * rtti.c (throw_bad_cast): Add the parmtypes.
8159 (throw_bad_typeid): Likewise.
8161 * semantics.c (expand_stmt): Only leave out rtl for unused
8162 artificials, and set DECL_IGNORED_P on them as well.
8163 * decl.c (wrapup_globals_for_namespace): Likewise.
8165 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
8167 * decl.c (maybe_commonize_var): Skip all artificial decls.
8168 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
8170 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
8172 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
8173 * cp-tree.h: Declare flag_enforce_eh_specs.
8174 * decl.c (store_parm_decls, finish_function): Check it.
8176 C library functions don't throw.
8177 * Makefile.in (cfns.h): New target.
8178 (except.o): Depend on it.
8179 * Make-lang.in (cc1plus): Depend on cfns.gperf.
8180 * cfns.gperf: New file.
8181 * cfns.h: Generated.
8182 * except.c: Include it.
8183 (nothrow_libfn_p): New fn.
8184 * decl.c (grokfndecl): Use it.
8185 * cp-tree.h: Declare it.
8187 * decl.c (push_overloaded_decl_1, auto_function,
8188 define_function): Lose.
8189 (build_library_fn_1): New static fn.
8190 (builtin_function): Use it.
8191 (get_atexit_node): Use build_library_fn_ptr.
8192 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
8193 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
8194 push_void_library_fn, push_throw_library_fn): New fns.
8195 * cp-tree.h: Declare them.
8196 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
8197 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
8198 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
8199 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
8200 * rtti.c (build_runtime_decl): Lose.
8201 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
8202 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
8203 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
8205 * call.c (build_call): Remove result_type parm.
8206 Call mark_used on unused artificial fns.
8207 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
8209 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
8211 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
8213 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
8214 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
8215 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
8216 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
8217 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
8218 expand_generic_desc): Likewise.
8220 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8222 * exception.cc (__cp_pop_exception): Cleanup the original object.
8224 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8226 * decl.c (grok_op_properties): Merge conversion to void warning
8227 with other silly op warnings.
8229 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
8231 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
8232 array CONSTRUCTOR elements. Don't use expr_tree_cons.
8234 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8236 * decl.c (cp_make_fname_decl): New function.
8237 (wrapup_globals_for_namespace): Don't emit unused static vars.
8238 (init_decl_processing): Remove comment about use of
8239 array_domain_type. Set make_fname_decl.
8240 (cp_finish_decl): Remove __FUNCTION__ nadgering.
8241 * semantics.c (begin_compound_stmt): Remove
8242 current_function_name_declared flagging.
8243 (expand_stmt): Don't emit unused local statics.
8244 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
8247 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
8249 * typeck.c (convert_for_assignment): Don't look at array
8251 * call.c (convert_like_real): Likewise.
8253 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
8255 Add initial support for '\uNNNN' specifier.
8256 * lex.c (read_ucs): New fn.
8257 (readescape, skip_white_space): Call it.
8258 (is_extended_char, is_extended_char_1): New fns.
8259 (utf8_extend_token): New fn, #if 0'd out.
8260 (real_yylex): Treat extended chars like letters.
8262 * search.c (note_debug_info_needed): Walk the bases even if we
8263 weren't deferring the type itself.
8265 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8267 * decl2.c (finish_objects): Constify a char*.
8269 * method.c (emit_thunk): Likewise.
8271 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
8273 * typeck.c (dubious_conversion_warnings): Look through
8276 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8278 * class.c (dfs_modify_vtables): I is now unsigned.
8279 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
8280 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
8281 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
8282 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
8283 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
8284 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
8285 Call integer_all_onesp.
8286 * typeck2.c (process_init_constructor): Use compare_tree_int.
8288 * lang-specs.h (as): Don't call if -syntax-only.
8290 2000-03-06 Mark Mitchell <mark@codesourcery.com>
8292 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
8293 RTL_EXPR_HAS_NO_SCOPE after all.
8295 2000-03-05 Mark Mitchell <mark@codesourcery.com>
8297 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
8298 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
8299 RTL_EXPR_HAS_NO_SCOPE.
8301 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
8304 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
8306 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
8308 * call.c (convert_like): Macrofy.
8309 (convert_like_with_context): New macro.
8310 (convert_like_real): Renamed from convert_like. Add calling
8311 context parameters, for diagnostics. Add recursive flag. Call
8312 dubious_conversion_warnings for outer conversion.
8313 (build_user_type_conversion): Use convert_like_with_context.
8314 (build_over_call): Likewise. Don't warn about dubious
8315 conversions here. Adjust convert_default_arg calls.
8316 (convert_default_arg): Add context parameters for diagnostics.
8317 Pass throught to convert_like_with_context.
8318 * cp-tree.h (convert_default_arg): Add context parameters.
8319 (dubious_conversion_warnings): Prototype new function.
8320 * typeck.c (convert_arguments): Adjust convert_default_arg call.
8321 (dubious_conversion_warnings): New function, broken
8322 out of convert_for_assignment.
8323 (convert_for_assignment): Adjust.
8325 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
8327 * decl2.c (key_method): Break out from...
8328 (import_export_vtable, import_export_class): ...here.
8330 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
8331 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
8333 * search.c (note_debug_info_needed, dfs_debug_mark,
8334 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
8335 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
8337 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
8339 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
8342 2000-03-02 Mark Mitchell <mark@codesourcery.com>
8344 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
8345 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
8346 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
8347 (lang_type): Split gets_new into has_new and has_array_new.
8348 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8349 (TYPE_GETS_NEW): Split into ...
8350 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
8351 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
8352 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
8353 (build_op_new_call): Don't declare.
8354 (build_new_1): Likewise.
8355 * call.c (build_op_new_call): Remove.
8356 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
8357 instead of TYPE_NEEDS_DESTRUCTOR.
8358 (finish_struct_bits): Likewise.
8359 (add_implicitly_declared_members): Likewise.
8360 (check_field_decl): Likewise.
8361 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
8362 correctly under the new ABI.
8363 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
8364 instead of TYPE_NEEDS_DESTRUCTOR.
8365 (initialize_local_var): Likewise.
8366 (destroy_local_var): Likewise.
8367 (cp_finish_decl): Likewise.
8368 (register_dtor_fn): Likewise.
8369 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
8370 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
8371 TYPE_VEC_DELETE_TAKES_SIZE here.
8372 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
8373 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
8374 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8375 (finish_destructor_body): Likewise.
8376 (maybe_build_cleanup_1): Likewise.
8377 * decl2.c (do_static_destruction): Likewise.
8378 * init.c (build_new_1): Make it static.
8379 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8380 (expand_cleanup_for_base): Likewise.
8381 (get_cookie_size): New function.
8382 (build_new_1): Handle array-new cookies correctly under the new
8384 (build_vec_delete_1): Likewise.
8385 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8386 (build_delete): Likewise.
8387 (build_vec_delete): Handle array-new cookies correctly under the new
8389 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8390 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
8391 TYPE_HAS_ARRAY_NEW_OPERATOR.
8392 * ptree.c (print_lang_type): Check them.
8393 * search.c (context_for_name_lookup): Fix typo in comment.
8394 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
8395 * tree.c (break_out_cleanups): Likewise.
8396 (build_cplus_array_test_1): Likewise.
8397 (cp_build_qualified_type_real): Likewise.
8398 * typeck.c (complete_type): Likewise.
8400 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
8401 the command-line, not the end.
8403 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
8405 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
8407 2000-03-02 Tom Tromey <tromey@cygnus.com>
8409 * cp-tree.h (build_java_class_ref): Declare.
8410 * init.c (build_java_class_ref): No longer static.
8411 * except.c (expand_throw): Generate a Java-style `throw' if the
8412 thrown object is a "Java" object.
8413 (initialize_handler_parm): Generate a Java-style lookup of
8414 exception info if the caught object is a "Java" object.
8415 (catch_language, catch_language_init): New globals.
8416 (decl_is_java_type): New function.
8417 (expand_start_catch_block): Don't call push_eh_info() or
8418 push_eh_cleanup() when handling a Java-style "catch". Pass Java
8419 class reference to build_catch_block.
8421 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8423 * typeck.c (comptypes): Treat sizetype like its language equivalent.
8425 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
8427 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
8428 to merge reference/pointer code and fix incorrect warnings.
8430 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
8432 * search.c (protected_accessible_p): Use context_for_name_lookup.
8434 * init.c (construct_virtual_bases): Fix thinko.
8435 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
8437 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
8439 * decl.c (current_function_decl): Move to toplev.c.
8441 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
8443 * pt.c (fn_type_unification): Unify return type, whenever
8445 (get_bindings_real): Only pass return type when necessary.
8446 Remove explicit return type check.
8447 * class.c (resolve_address_of_overloaded_function): Pass desired
8448 return type to fn_type_unification.
8450 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8452 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
8454 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
8456 * rtti.c (expand_class_desc): Likewise.
8457 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
8458 (THUNK_VCALL_OFFSET): Likewise.
8459 (THUNK_DELTA): Reflect changes in ../tree.h.
8461 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
8463 * search.c (protected_accessible_p): Also allow the access if
8464 the member is public in DERIVED. Lose TYPE parm.
8465 (friend_accessible_p): Lose TYPE parm.
8466 (accessible_p): Adjust.
8468 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8470 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
8471 on things that are not sizes; ssize_binop deleted.
8472 Call size_diffop when appropriate.
8473 (dfs_build_vcall_offset_vtbl_entries): Likewise.
8474 (build_primary_vtable, build_secondary_vtable): Likewise.
8475 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
8476 Variable I is HOST_WIDE_INT.
8477 (get_vfield_offset): Pass proper types to size_binop.
8478 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
8479 (finish_struct_1): Likewise.
8480 (skip_rtti_stuff): Arg N is now pointer to signed.
8481 (layout_class_type): Use size_zero_node.
8482 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
8483 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
8484 * decl.c (complete_arry_type): Pass proper types to size_binop.
8485 (xref_basetypes): BINFO_OFFSET is sizetype.
8486 * error.c (dump_expr): Don't use size_binop non-sizes.
8487 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
8488 * init.c (construct_virtual_bases): Fix type error.
8489 (build_vec_delete_1): Pass proper type to size_binop and don't
8491 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
8492 * rtti.c (get_base_offset): Pass proper type to size_binop.
8493 * search.c (dfs_find_vbases): Fix type error.
8494 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
8495 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
8496 * tree.c (debug_binfo): Variable N is signed.
8497 Use HOST_WIDE_INT_PRINT_DEC.
8498 * typeck.c (comptypes): sizetype is same as equivalent integer type.
8499 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
8500 size_one_node and size_zero_node.
8501 (c_alignof): Use size_one_node.
8502 (build_component_addr): Pass proper types to size_binop.
8503 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
8505 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
8507 Implement class scope using-declarations for functions.
8508 * class.c (handle_using_decl): Call add_method for used functions.
8509 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
8510 (add_method): Used functions are hidden by local functions.
8511 (check_bases_and_members): Handle using-decls before finalizing
8512 CLASSTYPE_METHOD_VEC.
8513 * call.c (add_function_candidate): Add ctype parm; if non-zero,
8514 override the type of 'this' accordingly.
8515 (add_template_candidate, add_template_candidate_real): Add ctype parm.
8516 (convert_class_to_reference, build_user_type_conversion_1,
8517 build_new_function_call, build_object_call, build_new_op,
8518 build_new_method_call): Pass ctype parm.
8520 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
8522 * call.c (convert_class_to_reference, build_user_type_conversion_1,
8523 build_new_function_call, build_object_call, build_new_op,
8524 build_new_method_call, build_op_delete_call): Don't get basetype_path
8526 * typeck.c (build_component_ref): Likewise.
8527 * init.c (build_offset_ref): Likewise.
8528 (resolve_offset_ref): Don't call enforce_access.
8529 Call build_scoped_ref.
8530 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
8531 would cause an error or if -pedantic.
8532 * class.c (alter_access): Lose binfo parm.
8534 2000-02-26 Mark Mitchell <mark@codesourcery.com>
8536 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
8539 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
8541 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
8542 pseudo_type_info creation into the std namespace
8544 2000-02-26 Mark Mitchell <mark@codesourcery.com>
8546 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
8547 (import_export_class): Remove declaration.
8548 * decl2.c (import_export_class): Make it static.
8549 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
8550 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
8551 EXPR_WITH_FILE_LOCATION.
8552 * lex.c (check_newline): Tweak filename/lineno setting.
8553 * semantics.c (begin_while_stmt): Fix typo in comment.
8555 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8557 * lang-options.h (-fmessage-length=): Add missing option.
8559 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
8561 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
8563 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
8565 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
8567 * optimize.c (expand_call_inline): Emit the return label before
8568 evaluating the return value.
8570 2000-02-24 Mark Mitchell <mark@codesourcery.com>
8572 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
8573 than duplicating functionality here.
8574 * optimize.c: Include input.h.
8575 (expand_call_inline): Use push_srcloc and pop_srcloc.
8576 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
8577 * parse.c: Regenerated.
8578 * Makefile.in (lex.o): Depend on input.h.
8579 (optimize.o): Likewise.
8581 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
8583 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
8584 function type, rather than ICE.
8586 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
8588 * decl.c (grokdeclarator): Call decl_type_access_control.
8589 * parse.y (parse_end_decl): Don't call decl_type_access_control if
8592 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
8594 * decl.c (decls_match): Remove obsolete static member nadgering.
8596 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8598 * decl.c (grokdeclarator): Change ANSI to ISO.
8599 * lex.c (consume_string, readescape, do_identifier): Likewise.
8600 (parse_float, real_yylex): Likewise.
8601 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
8602 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
8603 new_type_id, maybe_label_decls, simple_stmt,
8604 for.init.statement): Likewise.
8605 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
8606 * semantics.c (finish_named_return_value): Likewise.
8607 * parse.c: Regenerate.
8609 2000-02-21 Mark Mitchell <mark@codesourcery.com>
8611 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
8612 (CPTI_CLASS_STAR_TYPE): Remove.
8613 (vtable_index_type): Likewise.
8614 (class_star_type_node): Remove.
8615 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
8616 (build_binary_op_nodefault): Remove.
8617 * call.c (build_new_op): Use build_binary_op instead of
8618 build_binary_op_nodefault.
8619 * decl.c (init_decl_processing): Remove class_star_type_node
8620 initialization. Make delta_type_node ptrdiff_type_node under the
8621 new ABI. Initialize vtable_index_type.
8622 (build_ptrmemfunc_type): Build different structures for the new
8624 (build_enumerator): Use build_binary_op instead of
8625 build_binary_op_nodefault.
8626 * method.c (build_overload_value): Mangle pointers-to-members
8627 appropriately under the new ABI.
8628 * typeck.c (build_array_ref): Use build_binary_op instead of
8629 build_binary_op_nodefault.
8630 (get_member_function_from_ptrfunc): Adjust for the new ABI.
8631 (build_binary_op_nodefault): Rename to ...
8632 (build_binary_op): ... this. Remove old version. Adjust for
8633 pointer-to-member comparisons under the new ABI.
8634 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
8635 (build_ptrmemfunc): Adjust for the new ABI.
8636 (expand_ptrmemfunc_cst): Likewise.
8637 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
8638 (pfn_from_ptrmemfunc): Adjust for the new ABI.
8640 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
8642 * call.c (build_object_call): Compress consecutive calls to
8644 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
8645 (build_op_delete_call): Adjust message formatting.
8647 * class.c (check_bases): Compress consecutive calls to
8649 (finish_struct_anon): Say 'ISO C++'.
8651 * decl.c (start_decl): Same here.
8652 (grok_reference_init): Likewise.
8653 (grokfndecl): Correct message formatting.
8654 (grokfndecl): Improve diagnostic.
8655 (check_static_variable_definition): Likewise. Say 'ISO C++'
8656 (compute_array_index_type): Say 'ISO C++'
8657 (create_array_type_for_decl): Compress consecutive calls to
8659 (grokdeclarator): Say 'ISO C++'
8660 (grok_op_properties): Likewise.
8662 * decl2.c (delete_sanity): Clairify diagnostic.
8663 (check_member_template): Same here.
8664 (grok_function_init): Use consistent terminology.
8666 * expr.c (do_case): Say 'ISO C++'
8668 * friend.c (do_friend): Compress consecutive calls to warning.
8670 2000-02-20 Mark Mitchell <mark@codesourcery.com>
8672 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
8673 * class.c (build_secondary_vtable): Reorganize. Don't create a
8674 new vtable under the new ABI.
8675 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
8677 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
8678 the initializing elements.
8679 (initialize_vtable): New function.
8680 (dfs_finish_vtbls): Use it.
8681 (dfs_accumulate_vtbl_inits): New function.
8682 (finish_vtbls): Merge primary and secondary vtables under the new
8684 (finish_struct_1): Remove redundant call to layout_vtable_decl.
8685 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
8688 * class.c (build_vtable): New function, split out from ...
8689 (get_vtable_decl): ... here, and ...
8690 (build_secondary_vtable): ... here.
8692 * pt.c (tsubst_decl): Fix formatting.
8694 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8696 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
8697 (avoid_overlap, build_base_field): Likewise.
8698 (build_base_field, build_base_fields, is_empty_class):
8699 Test DECL_SIZE with integer_zero.
8700 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
8701 * cp-tree.h (struct lang_type): New field size_unit.
8702 (CLASSTYPE_SIZE_UNIT): New macro.
8703 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
8704 (cp_finish_decl): Delete -Wlarger-than processing.
8705 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
8706 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
8707 * tree.c (make_binfo): binfo vector is one entry longer.
8708 (walk_tree): Walk DECL_SIZE_UNIT.
8710 2000-02-19 Mark Mitchell <mark@codesourcery.com>
8712 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
8714 (build_vtable_entry): Don't assume all vtable entries are
8716 (build_vtbl_initializer): Adjust accordingly.
8717 (get_vtable_decl): Fix formatting.
8719 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
8721 * semantics.c (deferred_type_access_control): Walk the entire
8723 (save_type_access_control): Rename from
8724 initial_deferred_type_access_control. Just remember the value.
8725 (decl_type_access_control): New fn.
8726 (begin_function_definition): Use deferred_type_access_control, after
8727 we've started the function. Set type_lookups to error_mark_node.
8728 * parse.y (frob_specs, fn.def1): Adjust.
8729 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
8730 (parse_end_decl, parse_bitfield0, parse_method): New fns.
8731 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
8732 (after_type_component_declarator0): Likewise.
8733 (after_type_component_declarator): Likewise.
8734 (notype_component_declarator): Likewise.
8735 * cp-tree.h: Adjust.
8737 * decl.c (redeclaration_error_message): Allow redeclaration of
8738 namespace-scope decls.
8740 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
8742 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
8744 2000-02-17 Mark Mitchell <mark@codesourcery.com>
8746 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
8747 * decl2.c (grokclassfn): Likewise.
8749 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
8751 * decl2.c (lang_decode_option): Don't set default message length
8753 * lex.c (lang_init_options): Set it here.
8755 2000-02-16 Mark Mitchell <mark@codesourcery.com>
8757 Make DECL_CONTEXT mean the class in which a member function was
8758 declared, even for a virtual function.
8759 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
8760 (DECL_FRIEND_CONTEXT): New macro.
8761 (DECL_REAL_CONTEXT): Remove.
8762 (SET_DECL_FRIEND_CONTEXT): Likewise.
8763 (DECL_VIRTUAL_CONTEXT): Adjust.
8764 (DECL_CLASS_SCOPE_P): Use TYPE_P.
8765 (add_friends): Remove.
8766 (hack_decl_function_context): Likewise.
8767 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
8769 (build_over_call): Fix indentation. Use DECL_CONTEXT
8770 instead of DECL_CLASS_CONTEXT.
8771 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
8772 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
8773 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8774 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
8775 (build_base_field): Likewise.
8776 (finish_struct_1): Likewise.
8777 (build_self_reference): Likewise.
8778 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
8780 (pushtag): Use decl_function_context, not
8781 hack_decl_function_context.
8782 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8783 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
8784 (pushdecl): Remove bogus code.
8785 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
8786 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8787 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8788 Use decl_function_context, nothack_decl_function_context.
8789 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
8790 (grokdeclarator): Likewise. Use decl_function_context, not
8791 hack_decl_function_context.
8792 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
8793 (start_function): Use DECL_FRIEND_CONTEXT, not
8794 DECL_CLASS_CONTEXT. Use decl_function_context, not
8795 hack_decl_function_context.
8796 (finish_function): Use decl_function_context, not
8797 hack_decl_function_context.
8798 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
8800 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
8801 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
8802 (grokfield): Likewise.
8803 (finish_builtin_type): Likewise.
8804 (finish_vtable_vardec): Use decl_function_context, not
8805 hack_decl_function_context.
8806 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8807 (start_static_initialization_or_destruction): Likewise.
8808 (finish_static_initialization_or_destruction): Likewise.
8809 (mark_used): Adjust logic for deciding when to synthesize methods.
8810 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
8812 * error.c (dump_function_decl): Use DECL_CONTEXT, not
8814 * friend.c (is_friend): Likewise.
8815 (add_friends): Remove.
8816 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
8817 * lex.c (begin_definition_of_inclass_inline): Use
8818 decl_function_context, not hack_decl_function_context.
8819 (process_next_inline): Likewise.
8820 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
8821 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
8822 DECL_CLASSS_CONTEXT.
8823 (hack_identifier): Likewise.
8824 (synthesize_method): Use decl_function_context, not
8825 hack_decl_function_context.
8826 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
8828 (is_member_template): Use decl_function_context, not
8829 hack_decl_function_context. Use DECL_CONTEXT, not
8831 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
8833 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
8835 (push_template_decl_real): Likewise.
8836 (instantiate_class_template): Don't call add_friends.
8837 (tsubst_default_argument): Use DECL_CONTEXT, not
8839 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
8840 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8841 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
8843 * repo.c (repo_inline_used): Likewise.
8844 * search.c (current_scope): Adjust for new _CONTEXT macros.
8845 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
8847 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
8848 (lookup_fnfields_here):Likewise.
8849 (check_final_overrider): Likewise.
8850 (init_vbase_pointers): Likewise.
8851 (virtual_context): Likewise.
8852 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
8853 (expand_body): Use decl_function_context, not
8854 hack_decl_function_context.
8855 * tree.c (hack_decl_function_context): Remove.
8856 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
8858 * typeck2.c (error_not_base_type): Likewise.
8860 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
8862 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
8864 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8866 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
8868 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
8870 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
8872 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
8874 * decl2.c (lang_decode_option): Enable automatic line wrapping.
8876 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
8878 * parse.y (frob_specs): Split out...
8879 (parse_decl): From here.
8880 (fn.def2): Call initial_deferred_type_access_control.
8881 (after_type_component_declarator0): Call frob_specs.
8882 (notype_component_declarator0): Likewise.
8883 * search.c (friend_accessible_p): Nested classes are friends of their
8886 2000-02-10 Mark Mitchell <mark@codesourcery.com>
8888 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
8889 used to create an implicit temporary.
8891 * class.c (dfs_modify_vtables): Tweak calculation of functions to
8894 2000-02-08 Nathan Sidwell <nathan@acm.org>
8896 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
8897 strip array element qualifiers too.
8899 2000-02-07 Mark Mitchell <mark@codesourcery.com>
8901 * decl.c (store_parm_decls): Don't build cleanups for parameters
8902 while processing_template_decl.
8904 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
8906 * cp-tree.h (struct saved_scope): Add incomplete field.
8907 (namespace_scope_incomplete): New macro.
8908 * decl.c (pushdecl): Use it.
8909 (hack_incomplete_structures): Use it. See through artificial
8911 (mark_saved_scope): Mark it.
8913 Implement access control for nested types.
8914 * search.c (type_access_control): New fn.
8915 (accessible_p): Now we do perform access control for types.
8916 * semantics.c (deferred_type_access_control): New fn.
8917 (initial_deferred_type_access_control): New fn.
8918 (begin_function_definition): Call it. Add lookups parm.
8919 * decl.c (struct binding_level): Add this_class field.
8920 (pushlevel_class): Set it.
8921 (mark_binding_level): Mark it.
8922 (lookup_name_real): Use it. Call type_access_control.
8923 (mark_saved_scope): Mark lookups field.
8924 * cp-tree.h (flagged_type_tree): Add lookups field.
8925 (struct saved_scope): Add lookups field.
8926 (type_lookups): New macro.
8927 * parse.y (declmods): Now <ftype>.
8928 (parse_decl): Add lookups parm. Call
8929 initial_deferred_type_access_control.
8930 (lang_extdef): Clear type_lookups.
8931 (typed_declspecs, declmods, typespec): Set lookups field.
8932 (initdcl): Call deferred_type_access_control.
8933 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
8934 component_decl_1, named_parm): Adjust.
8935 * friend.c (is_friend): Nested classes are friends of their
8938 * class.c (currently_open_derived_class): New fn.
8939 * method.c (hack_identifier): Use it.
8941 * lex.c (do_identifier): Remove obsolete code.
8943 * parse.y (typed_typespecs): Propagate new_type_flag properly.
8945 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
8947 * tinfo.h: Remove apostrophes from C++ comment (xgettext
8948 thinks this file is plain C).
8950 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8952 * Makefile.in (call.o): Depend on $(EXPR_H).
8954 * call.c: Include "expr.h".
8956 * class.c (dump_class_hierarchy): Add prototype.
8958 * search.c (dfs_get_pure_virtuals): Likewise.
8960 2000-02-1 Ulrich Drepper <drepper@redhat.com>
8962 * parse.y (simple_stmt): Allow :: token in asm parameter list.
8965 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
8967 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
8968 Store it in DECL_FCONTEXT.
8969 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
8971 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
8973 * tinfo.h (old abi): #include "tconfig.h".
8974 * tinfo.cc (convert_to_base): Move into old abi section.
8976 2000-01-31 Mark Mitchell <mark@codesourcery.com>
8978 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
8979 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
8980 (BINFO_PRIMARY_BINFO): New macro.
8981 (BF_DELTA): Rename to ...
8982 (BV_DELTA): ... this.
8983 (BF_VCALL_INDEX): Rename to ...
8984 (BV_VCALL_INDEX): ... this.
8985 (BF_FN): Rename to ...
8987 * class.c (build_vbase_path): Adjust for changes to reverse_path.
8988 (set_rtti_entry): Rename BF_ macros to BV_ variants.
8989 (modify_vtable_entry): Simplify.
8990 (add_virtual_function): Rename BF_ macros to BV_ variants.
8991 (build_vtable_initializer): Likewise.
8992 (get_class_offset_1): Remove.
8993 (dfs_get_class_offset): Likewise.
8994 (get_class_offset): Likewise.
8995 (dfs_find_final_overrider): New function.
8996 (find_final_overrider): Likewise.
8997 (modify_one_vtable): Remove.
8998 (dfs_find_base): New function.
8999 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
9000 find_final_overrider.
9001 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
9003 (dfs_fixup_vtable_deltas): Remove.
9004 (override_one_vtable): Remove.
9005 (merge_overrides): Likewise.
9006 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
9007 unreal chilren of virtual bases.
9008 (finish_struct_1): Don't use merge_overrides. Don't use
9009 dfs_fixup_vtable_deltas.
9010 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
9013 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
9014 Jason Merrill <jason@yorick.cygnus.com>
9016 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
9018 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
9020 * exception.cc (__throw_bad_typeid): Add missing std::.
9022 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9024 * cp-tree.h (make_thunk): PROTO -> PARAMS.
9026 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
9028 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
9030 Runtime support for new-abi rtti.
9031 * inc/typeinfo (type_info::operator!=): Define in class.
9032 (type_info::before, type_info::name, type_info::operator==,
9033 type_info::operator!=): Define new ABI implementations.
9034 (type_info::is_pointer_p, type_info::is_function_p): Declare
9035 new virtual functions.
9036 (type_info::do_catch, type_info::do_upcast): Likewise.
9038 * tinfo.h (__base_class_info): Define new class.
9039 (__class_type_info): Likewise.
9040 (__si_class_type_info): Likewise.
9041 (__vmi_class_type_info): Likewise.
9042 (__dynamic_cast): Prototype.
9044 * tinfo.cc: Conditionalize old and new rtti mechanisms.
9045 (type_info::is_pointer_p): Define new function.
9046 (type_info::is_function_p): Likewise.
9047 (type_info::do_catch): Likewise.
9048 (type_info::do_upcast): Likewise.
9049 (vtable_prefix): New structure for vtable access.
9050 (adjust_pointer): Define new template function.
9051 (contained_p, public_p, virtual_p, contained_public_p,
9052 contained_nonpublic_p, contained_nonvirtual_p): Define new
9054 (nonvirtual_base_type): New local variable.
9055 (__class_type_info::~__class_type_info): Define.
9056 (__si_class_type_info::~__si_class_type_info): Likewise.
9057 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
9058 (__class_type_info::do_catch): Define new function.
9059 (__class_type_info::do_upcast): Likewise.
9060 (__class_type_info::find_public_src): Likewise.
9061 (__class_type_info::do_find_public_src): Likewise.
9062 (__si_class_type_info::do_find_public_src): Likewise.
9063 (__vmi_class_type_info::do_find_public_src): Likewise.
9064 (__class_type_info::do_dyncast): Likewise.
9065 (__si_class_type_info::do_dyncast): Likewise.
9066 (__vmi_class_type_info::do_dyncast): Likewise.
9067 (__class_type_info::do_upcast): Likewise.
9068 (__si_class_type_info::do_upcast): Likewise.
9069 (__vmi_class_type_info::do_upcast): Likewise.
9070 (__dynamic_cast): Likewise.
9072 * tinfo2.cc (__fundamental_type_info): Define new class.
9073 (__pointer_type_info): Likewise.
9074 (__reference_type_info): Likewise.
9075 (__array_type_info): Likewise.
9076 (__function_type_info): Likewise.
9077 (__enum_type_info): Likewise.
9078 (__ptr_to_member_type_info): Likewise.
9079 (__fundamental_type_info::~__fundamental_type_info): Define.
9080 (__pointer_type_info::~__pointer_type_info): Likewise.
9081 (__reference_type_info::~__reference_type_info): Likewise.
9082 (__array_type_info::~__array_type_info): Likewise.
9083 (__function_type_info::~__function_type_info): Likewise.
9084 (__enum_type_info::~__enum_type_info): Likewise.
9085 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
9086 (__pointer_type_info::do_catch): Define new function.
9087 (__ptr_to_member_type_info::do_catch): Define new function.
9089 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
9090 (__is_pointer): Likewise.
9092 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
9094 2000-01-30 Mark Mitchell <mark@codesourcery.com>
9096 * cp/class.c (build_vtable): Rename to build_primary_vtable.
9097 (prepare_fresh_vtable): Rename to build_secondary_vtable.
9098 (make_new_vtable): New function.
9099 (modify_vtable_entry): Handle generation of new vtables correctly.
9100 (modify_one_vtable): Remove unused parameter.
9101 (dfs_fixup_vtable_deltas): Likewise.
9102 (override_one_vtable): Use build_secondary_vtable.
9103 (finish_struct_1): Use build_primary_vtable and
9104 build_secondary_vtable.
9106 2000-01-28 Ulrich Drepper <drepper@redhat.com>
9108 * cp/decl.c: Adjust variable names, comments, help strings.
9110 2000-01-29 Nathan Sidwell <nathan@acm.org>
9112 * new2.cc (operator delete[]): Use operator delete, don't assume
9115 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
9117 * class.c (build_vtbl_initializer): Add argument to
9118 build_vtable_entry call.
9120 2000-01-27 Mark Mitchell <mark@codesourcery.com>
9122 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
9123 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
9124 (BF_DELTA): New macro.
9125 (BF_VCALL_INDEX): Likewise.
9127 (THUNK_VCALL_OFFSET): Likewise.
9128 (make_thunk): Change prototype.
9129 * class.c (build_vtable_entry): Integrate
9130 build_vtable_entry_for_fn. Handle vcall indices.
9131 (build_vtable_entry_for_fn): Remove.
9132 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
9133 BF_VCALL_INDEX, BF_FN.
9134 (modify_vtable_entry): Integrate common code from
9135 modify_one_vtable and dfs_fixup_vtable_deltas.
9136 (add_virtual_function): Set BF_VCALL_INDEX.
9137 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
9139 (modify_one_vtable): Simplify.
9140 (dfs_fixup_vtable_deltas): Likewise.
9141 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
9142 * method.c (make_thunk): Handle vcall indices.
9144 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
9146 Compiler side new abi rtti (not enabled).
9147 * cp-tree.h (new_abi_rtti_p): New macro.
9148 (emit_support_tinfos): Prototype new function.
9149 (tinfo_decl_p): Likewise.
9150 (emit_tinfo_decl): Likwise.
9151 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
9153 (doing_runtime): New local static.
9154 (init_rtti_processing): Add new-abi initializer.
9155 (get_tinfo_decl): Add new-abi logic.
9156 (tinfo_from_decl): Likewise.
9157 (build_dynamic_cast_1): Likewise.
9158 (qualifier_flags): New static function.
9159 (tinfo_base_init): Likewise.
9160 (generic_initializer): Likewise.
9161 (ptr_ref_initializer): Likewise.
9162 (ptmd_initializer): Likewise.
9163 (class_hint_flags): Likewise.
9164 (class_initializer): Likewise.
9165 (synthesize_tinfo_var): Likewise.
9166 (create_real_tinfo_var): Likewise.
9167 (create_pseudo_type_info): Likewise.
9168 (get_vmi_pseudo_type_info): Likewise.
9169 (create_tinfo_types): Likewise.
9170 (emit_support_tinfos): New global function.
9171 (tinfo_decl_p): New global predicate.
9172 (emit_tinfo_decl): New global function.
9173 * class.c (set_rtti_entry): Generalize for old and new rtti.
9174 (build_vtbl_initializer): Likewise.
9175 * decl2.c (finish_file): Likewise.
9177 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
9179 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
9180 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
9182 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
9184 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
9187 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
9189 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
9191 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
9193 * optimize.c (calls_setjmp_r): Supply new argument
9194 to special_function_p.
9196 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9198 * call.c: PROTO -> PARAMS.
9199 * class.c: Likewise.
9200 * cp-tree.h: Likewise.
9204 * decl2.c: Likewise.
9206 * errfn.c: Likewise.
9207 * error.c: Likewise.
9208 * except.c: Likewise.
9211 * input.c: Likewise.
9214 * method.c: Likewise.
9215 * optimize.c: Likewise.
9216 * parse.y: Likewise.
9220 * search.c: Likewise.
9221 * semantics.c: Likewise.
9224 * typeck.c: Likewise.
9225 * typeck2.c: Likewise.
9228 2000-01-25 Richard Henderson <rth@cygnus.com>
9230 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
9232 2000-01-25 Mark Mitchell <mark@codesourcery.com>
9234 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
9235 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
9236 (struct vcall_offset_data_s): New type.
9237 (dfs_vcall_offset_queue_p): New function.
9238 (dfs_build_vcall_offset_vtbl_entries): Likewise.
9239 (build_vcall_offset_vtbl_entries): Likewise.
9240 (layout_vtable_decl): Likewise.
9241 (num_vfun_entries): Likewise.
9242 (num_extra_vtbl_entries): Add the entries for vcall offsets.
9243 (build_vtbl_initializer): Likewise.
9244 (dfs_finish_vtabls): Use layout_vtable_decl.
9245 (modify_one_vtables): Always duplicate vtables under the new ABI.
9246 (finish_struct_1): Use layout_vtable_decl.
9248 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9250 * decl.c (member_function_or_else): Change third arg from a format
9251 specifier to an `enum overload_flags'. Callers changed.
9253 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
9255 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
9256 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
9257 build_const_cast, get_delta_difference, check_return_expr): Avoid
9258 ANSI string concatenation usage.
9260 2000-01-24 Mark Mitchell <mark@codesourcery.com>
9262 * class.c (layout_class_type): Put the fields required to make a
9263 class non-empty at the end, not the beginning, of the TYPE_FIELDs
9266 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
9268 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
9271 * decl2.c (mark_used): Do instantiate inlines that have been
9272 explicitly instantiated.
9274 2000-01-24 Richard Henderson <rth@cygnus.com>
9276 * call.c (build_over_call): Use expand_tree_builtin.
9277 * typeck.c (build_function_call_real): Likewise.
9278 (build_binary_op_nodefault): Handle unordered compares.
9280 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9282 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
9283 cp_tree_index values.
9284 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
9285 New global node #defines for them.
9286 * rtti.c (call_void_fn): Replace with ...
9287 (build_runtime_decl): ... new static function.
9288 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
9289 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
9290 (build_dynamic_cast_1): Always produce correctly typed result.
9291 Explicitly produce type_info addresses. Use dynamic_cast_node.
9292 * exception.cc (__throw_bad_cast): Return `void *'.
9293 (__throw_bad_typeid): Return `const type_info &'.
9295 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9297 * cp-tree.h (get_vtable_decl): Prototype new function.
9298 * class.c (get_vtable_decl): New function. Broken out from ...
9299 (build_vtable): ... here. Use it.
9300 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
9303 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
9305 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
9306 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
9307 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
9308 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
9309 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
9310 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
9311 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
9312 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
9313 (CPTI_TINFO_VAR_ID): New enumeration.
9314 (__tp_desc_type_node, __access_mode_type_node,
9315 __bltn_desc_type_node, __user_desc_type_node,
9316 __class_desc_type_node, __ptr_desc_type_node,
9317 __attr_desc_type_node, __func_desc_type_node,
9318 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
9319 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
9320 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
9321 enum_desc_type_node, class_desc_type_node,
9322 si_class_desc_type_node, vmi_class_desc_type_node,
9323 ptmd_desc_type_node, base_desc_type_node): New #defines.
9324 (tinfo_fn_id, tinfo_fn_type): Rename to ...
9325 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
9326 (tinfo_var_id): New enumeration.
9327 (DECL_TINFO_FN_P): Augment comment.
9328 * decl.c (cp_global_trees): Adjust documentation.
9329 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
9330 tinfo_decl_type and tinfo_var_id.
9331 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
9332 (build_typeid): Remove unused variable.
9333 (get_tinfo_var): Use tinfo_var_id.
9334 (tinfo_name): New static function.
9335 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
9336 (tinfo_from_decl): Likewise.
9337 (get_base_offset): New static function, broken out of
9339 (expand_si_desc): Use tinfo_name.
9340 (expand_class_desc): Likewise. Lose local static variable.
9341 Use base_desc_type_node. Use get_base_offset.
9342 (expand_ptr_desc): Use tinfo_name.
9343 (expand_attr_desc): Likewise.
9344 (expand_generic_desc): Likewise.
9346 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
9347 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
9349 2000-01-23 Mark Mitchell <mark@codesourcery.com>
9351 * cp-tree.h (__eprintf): Remove declaration.
9352 * tree.c (__eprintf): Remove definition.
9354 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
9355 Mark Mitchell <mark@codesourcery.com>
9357 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
9358 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
9360 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
9362 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
9364 2000-01-23 Mark Mitchell <mark@codesourcery.com>
9366 * cp-tree.h (register_dtor_fn): New function.
9367 * decl.c (destroy_local_static): Rename to ...
9368 (register_dtor_fn): ... this. Give it external linkage.
9369 (expand_static_init): Use it.
9370 * decl2.c (do_static_initialization): Likewise, if using
9372 (do_static_destruction): Check that __cxa_atexit is not in use.
9373 (finish_file): Don't call do_static_destruction if using
9376 * typeck.c (convert_arguments): Restore two-message error
9379 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
9381 Remap dynamic cast hint values to be consistent across ABIs.
9382 * search.c (dynamic_cast_base_recurse): Remap generated value.
9383 (get_dynamic_cast_base_type): Adjust documentation.
9384 * tinfo.h (__user_type_info::dyncast): Likewise.
9385 (__user_type_info::find_public_subobj): Remap BOFF meaning.
9386 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
9387 (__class_type_info::do_dyncast): Likewise.
9388 (__class_type_info::do_find_public_subobj): Likewise.
9389 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
9391 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
9393 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
9395 * typeck2.c (incomplete_type_error): Restore previous
9396 cp_error and cp_error_at call sequence.
9398 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
9400 * class.c (dump_class_hierarchy): Make format agree with argument;
9401 cast pointer to unsigned long and print with %lx.
9403 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
9405 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
9407 * typeck.c (composite_pointer_type, common_type,
9408 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
9409 build_function_call_real, convert_arguments,
9410 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
9411 build_unary_op, mark_addressable, build_compound_expr,
9412 build_static_cast, build_reinterpret_cast, build_const_cast,
9413 build_c_cast, build_modify_expr, get_delta_difference,
9414 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
9415 'ISO C++'. Fusion consecutive calls to diagnotic message routines
9417 * typeck2.c (readonly_error, abstract_virtuals_error,
9418 process_init_constructor, check_for_new_type): Likewise.
9420 2000-01-19 Mark Mitchell <mark@codesourcery.com>
9422 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
9425 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
9427 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
9428 (build_x_typeid): Likewise.
9429 (get_tinfo_fn): Likewise.
9430 (get_tinfo_fn_unused): Rename to ...
9431 (get_tinfo_decl): ... here.
9432 * rtti.c (build_headof): Replace logic error with assertion.
9433 (get_tinfo_fn_dynamic): Rename to ...
9434 (get_tinfo_decl_dynamic): ... here. Make static. Use
9435 complete_type_or_else.
9436 (build_x_typeid): Move into ...
9437 (build_typeid): ... here. Adjust call to
9438 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
9439 throw_bad_typeid expression.
9440 (get_tinfo_fn_unused): Rename to ...
9441 (get_tinfo_decl): ... here. Adjust comment.
9442 (get_tinfo_fn): Delete.
9443 (tinfo_from_decl): New static function.
9444 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
9445 (get_typeid): Use complete_type_or_else.
9446 (build_dynamic_cast_1): Adjust calls to
9447 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
9448 * parse.y (primary): Adjust call to build_typeid.
9449 * except.c (build_eh_type_type_ref): Adjust call to
9450 get_tinfo_decl. Mark as used.
9451 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
9452 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
9453 * parse.c: Regenerated.
9455 2000-01-17 Mark Mitchell <mark@codesourcery.com>
9457 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
9459 (resolves_to_fixed_type_p): Document calling convention.
9460 * rtti.c (build_x_typeid): Initialize NONNULL.
9462 * cp-tree.h (build_shared_int_cst): New function.
9463 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
9464 * class.c (modify_vtable_entry): Likewise.
9465 (add_virtual_function): Split out code to generated shared
9466 INTEGER_CSTs to build_share_int_cst.
9467 (modify_all_vtables): Handle all the overridden functions here.
9468 Add overridden functions from non-primary virtual bases to the
9470 (finish_struct_1): Adjust call to modify_all_vtables. Add
9471 overridden functions from non-primary bases to the vtable.
9472 * tree.c (build_shared_int_cst): New function.
9474 * cp-tree.h (scratchalloc): Remove.
9475 (build_scratch_list): Likewise.
9476 * call.c (convert_class_to_reference): Replace build_scratch_list
9477 and build_expr_list with build_tree_list.
9478 (add_candidate): Replace scratchalloc with expralloc. Note memory
9480 (build_user_type_conversion_1): Replace build_scratch_list
9481 and build_expr_list with build_tree_list.
9482 (build_new_op): Likewise.
9483 (build_op_delete_call): Likewise.
9484 (convert_like): Likewise.
9485 * cvt.c (ocp_convert): Likewise.
9486 * decl.c (start_decl): Likewise.
9487 (start_function): Likewise.
9488 (finish_destructor_body): Likewise.
9489 (maybe_build_cleanup_1): Likewise.
9490 * decl2.c (reparse_decl_as_expr): Likewise.
9491 * init.c (perform_member_init): Likewise.
9492 (expand_cleanup_for_base): Likewise.
9493 (build_builtin_delete_call): Likewise.
9494 (build_new_1): Likewise.
9495 (build_delete): Likewise.
9496 * method.c (do_build_assign_ref): Likewise.
9497 * parse.y (already_scoped_stmt): Likewise.
9498 (nontrivial_exprlist): Likewise.
9499 (net_initializer): Likewise.
9500 (initlist): Likewise.
9501 * parse.c: Regenerated.
9502 * rtti.c (build_x_typeid): Likewise.
9503 (build_dynamic_cast_1): Likewise.
9504 * typeck.c (build_x_compound_expr): Likewise.
9505 (build_static_cast): Likewise.
9506 (build_modify_expr): Likewise.
9508 * cp-tree.h (DECL_VINDEX): Add documentation.
9509 * class.c (build_vtable_entry): Likewise.
9510 (start_vtable): Add comment.
9511 (add_virtual_function): Replace pending_hard_virtuals with
9512 overridden_virtuals and pending_virtuals with new_virtuals.
9513 Replace redundant assignments with assertions.
9514 (check_for_override): Add comment.
9515 (check_bases_and_members): Replace pending_hard_virtuals with
9516 overridden_virtuals and pending_virtuals with new_virtuals.
9517 (create_vtbl_ptr): Likewise.
9518 (layout_class_type): Likewise.
9519 (finish_struct_1): Likewise. Add comments.
9521 2000-01-16 Mark Mitchell <mark@codesourcery.com>
9523 * class.c (finish_struct_1): Replace redundant code with
9526 * cp-tree.h (flag_new_abi): Move.
9527 (flag_use_cxa_atexit): Likewise.
9528 (flag_honor_std): Likewise.
9529 (flag_rtti): Likewise.
9530 (vbase_offsets_in_vtable_p): Define.
9531 (vptrs_present_everywhere_p): Likewise.
9532 (TYPE_CONTAINS_VPTR_P): Likewise.
9533 (dfs_walk_real): Declare.
9534 * class.c (build_vbase_pointer_fields): Check
9535 vbase_offsets_in_vtable_p.
9536 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
9538 (build_vbase_offset_vtbl_entries): Simplify.
9539 (build_vbase_offset_vtbl_entries): Adjust.
9540 (build_vbase_pointer): Add ability to look up vbase offsets in
9542 (start_vtable): New function.
9543 (add_virtual_function): Use it.
9544 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
9545 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
9546 (build_vtbl_initializer): Take the type of the complete object as
9547 input. Use it to correctly calculate vbase offsets.
9548 (dfs_finish_vtbls): Pass the complete type to
9549 build_vtbl_initializer.
9550 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
9551 (create_vtable_ptr): Create a vtable even if there are no
9552 new virtual functions, under the new ABI.
9553 (finish_struct_1): Likewise.
9554 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
9555 * decl.c (exapnd_static_init): Remove call to
9556 preserve_initializer.
9557 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
9559 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
9560 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
9561 (construct_virtual_bases): Don't initialize virtual base pointers
9563 (build_aggr_init): Clean up comment.
9564 (expand_aggr_init_1): Likewise.
9565 * rtti.c (expand_class_desc): Store the virtual function table
9566 index where the vbase offset lives in the offset field.
9567 * search.c (dfs_walk_real): Make it global.
9568 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
9569 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
9571 * tinfo.h (USItype): Make it signed under the new ABI.
9572 * tinfo.cc (convert_to_base): New function. Encapsulate base
9573 conversion logic here.
9574 (__class_type_info::do_upcast): Use it.
9575 (__class_type_info::do_dyncast): Likewise.
9576 (__class_type_info::do_find_public_subobj): Likewise.
9578 * init.c (construct_virtual_bases): Don't look up the addresses of
9579 virtual bases at run-time.
9581 * class.c (build_vbase_pointer): Relocate.
9582 (build_vbase_pointer_fields): Likewise.
9583 (dfs_build_vbase_offset_vtbl_entries): Likewise.
9584 (build_vbase_offset_vtbl_entries): Likewise.
9586 * decl.c (init_decl_processing): Complain if -fnew-abi
9587 -fno-vtable-thunks is used.
9589 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
9592 2000-01-15 Mark Mitchell <mark@codesourcery.com>
9594 * cp-tree.h (num_extra_vtbl_entries): New function.
9595 (size_extra_vtbl_entries): Likewise.
9596 (dfs_vtable_path_unmark): Likewise.
9597 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
9598 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
9599 * class.c (num_extra_vtbl_entries): New function.
9600 (size_extra_vtbl_entries): Likewise.
9601 (dfs_build_vbase_offset_vtbl_entries): New function.
9602 (build_vbase_offset_vtbl_entries): Likewise.
9603 (build_vtbl_initializer): Use it.
9604 (finish_struct_1): Adjust vtable sizes (using
9605 num_extra_vtbl_entries).
9606 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
9607 THUNK_DECL is non-NULL before expanding it.
9608 * init.c (expand_virtual_init): Adjust the vtable pointer by
9609 size_extra_vtbl_entries before storing it.
9610 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
9611 Handle TREE_LIST parameters here, not in the dfs_* functions.
9612 (dfs_unmarked_real_bases_queue_p): Adjust.
9613 (dfs_marked_real_bases_queue_p): Likewise.
9614 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
9615 (dfs_vtable_path_marked_real_bases_queue_p): New function.
9616 (dfs_vtable_path_unmark): Likewise.
9618 2000-01-14 Mark Mitchell <mark@codesourcery.com>
9620 * optimize.c (copy_body_r): Clear the operand three of a
9621 TARGET_EXPR when copying it.
9623 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9625 * method.c (build_decl_overload_real): Check whether we are in ::
9626 before returning __builtin_new/delete.
9628 2000-01-13 Mark Mitchell <mark@codesourcery.com>
9630 * pt.c (tsubst_friend_function): Improve comment.
9631 (instantiate_decl): Avoid crashing when a "nested" function is
9632 instantiated from the top level.
9634 * dump.c (dqeueue_and_dump): Dump
9635 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
9637 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9639 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
9641 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
9643 * g++spec.c (lang_specific_driver): Add -fnew-abi if
9644 ENABLE_NEW_GXX_ABI defined.
9645 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
9646 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
9647 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
9649 2000-01-12 Mark Mitchell <mark@codesourcery.com>
9651 * decl.c (start_cleanup_fn): Call pushdecl.
9653 * call.c (convert_class_to_reference): Fix typos.
9654 (build_conditional_expr): Handle errors gracefully.
9655 * class.c (push_nested_class): Likewise.
9656 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
9657 (DECL_THIS_EXTERN): Use it.
9658 (DECL_THIS_STATIC): Likewise.
9659 * cvt.c (convert_to_void): Handle errors gracefully.
9660 (build_expr_type_conversion): Likewise.
9661 * decl.c (maybe_push_decl): Likewise.
9662 (start_decl_1): Likewise.
9663 (require_complete_types_for_parms): Likewise.
9664 * parse.y (structsp): Likewise.
9665 (base_class): Likewise.
9666 * parse.c: Regenerated.
9667 * pt.c (finish_member_template_decl): Likewise.
9668 * typeck.c (decay_conversion): Likewise.
9670 * cp-tree.h (dfs_skip_vbases): New function.
9671 (find_vbase_instance): Likewise.
9672 * class.c (determine_primary_base): Allow a nearly empty base to
9673 serve as a primary base class under the new ABI.
9674 (get_class_offset_1): Rename to ...
9675 (dfs_get_class_offset): ... this. Simplify. Don't issue error
9677 (get_class_offset): Use it. Issue error messages here.
9678 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
9679 find the right copies of virtual bases.
9680 (fixup_vtable_deltas1): Rename to ...
9681 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
9682 bases as primary bases.
9683 (fixup_vtable_deltas): Remove.
9684 (override_one_vtable): Handle virtual bases as primary bases.
9685 (merge_overrides): Likewise.
9686 (finish_struct_1): Likewise.
9687 (dump_class_hierarchy): Dump primary-ness of bases as well.
9688 * search.c (mark_primary_bases): Use a pre-order traversal to
9689 handle primary virtual bases.
9690 (dfs_skip_vbases): New fiunction.
9691 (expand_upcast_fixups): Adjust to handle primary virtual bases.
9692 (fixup_virtual_upcast_offsets): Likewise.
9693 (fixup_all_virtual_upcast_offsets): Likewise.
9694 (dfs_find_vbase_instances): New function.
9695 (find_vbase_instance): Likewise.
9697 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
9699 * lex.c (DIR_SEPARATOR): Delete macro.
9701 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
9703 * decl2.c (lang_decode_option): Handle automatic line wrapping
9706 2000-01-11 Mark Mitchell <mark@codesourcery.com>
9708 * friend.c (do_friend): Don't resolve scopes when processing
9709 template declarations, even if the qualifying scope doesn't
9710 involve template parameters.
9712 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
9714 * class.c (dfs_modify_vtables_queue_p): Remove.
9715 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
9716 and dfs_marked_real_bases_queue_p instead of
9717 dfs_modify_vtables_queue_p.
9719 * class.c (build_vbase_path): Simplify.
9720 (dfs_propagate_binfo_offsets): New function.
9721 (propagate_binfo_offsets): Use it.
9722 (remove_base_field): Simplify.
9723 (dfs_set_offset_for_vbases): Remove.
9724 (dfs_set_offset_for_shared_vbases): New function.
9725 (dfs_set_offset_for_unshared_vbases): Likewise.
9726 (layout_virtual_bases): Use them.
9727 (layout_basetypes): Don't call propagate_binfo_offsets.
9728 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
9731 * class.c (build_base_field): New function, split out from ...
9732 (build_base_fields): ... here. Use it. Allocate primary bases
9733 first, under the new ABI.
9734 (get_vtable_entry): Remove.
9735 (remove_base_field): New function, split out from ...
9736 (remove_base_fields): ... here. Adjust since primary bases come
9737 first under the new ABI.
9739 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
9740 (initialize_vtbl_ptrs): New function.
9741 (expand_indirect_vtbls_init): Change prototype.
9742 (convert_pointer_to_vbase): Declare.
9743 * init.c (expand_direct_vtbls_init): Remove.
9744 (dfs_initialize_vtbl_ptrs): New function.
9745 (initialize_vtbl_ptrs): Likewise.
9746 (emit_base_init): Use initialize_vtbl_ptrs.
9747 * search.c (convert_pointer_to_vbase): Make it global.
9748 (expand_indirect_vtbls_init): Remove vtable initialization code.
9749 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
9751 * class.c (dfs_finish_vtbls): New function.
9752 (finish_vtbls): Use it.
9753 (dump_class_hierarchy): New function.
9755 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
9756 (BINFO_VBASE_PRIMARY_P): New macro.
9757 (BINFO_VIRTUALS): Add to documentation.
9758 (SET_BINFO_PRIMARY_MARKED_P): Remove.
9759 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9760 (dfs_mark_primary_bases_queue_p): Likewise.
9761 (dfs_unmarked_real_bases_queue_p): New function.
9762 (dfs_marked_real_bases_queue_p): Likewise.
9763 * search.c (dfs_mark_primary_bases): Adjust.
9764 (mark_primary_bases): Likewise.
9765 (get_shared_vbase_if_not_primary): New function.
9766 (dfs_unmarked_real_bases_queue_p): Likewise.
9767 (dfs_marked_real_bases_queue_p): Likewise.
9768 (dfs_get_pure_virtuals): Simplify.
9769 (get_pure_virtuals): Likewise.
9771 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9773 * lex.c: Include tm_p.h.
9775 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
9777 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
9779 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
9781 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
9782 * pt.c (instantiate_decl): Defer comdat templates that might not be
9785 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
9786 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
9787 (finish_file): Likewise.
9789 * decl2.c (import_export_class): Undo 12/14 change.
9791 * error.c (dump_decl): operator new, not operatornew.
9793 * class.c (field_decl_cmp): A nontype is "greater" than a type.
9794 * search.c (lookup_field_1): Look for the last field with the
9797 2000-01-05 Nathan Sidwell <nathan@acm.org>
9799 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
9802 2000-01-05 Nathan Sidwell <nathan@acm.org>
9804 * typeck.c (build_static_cast): Don't strip target qualifiers
9805 when casting from a class.
9807 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9809 * class.c (warn_hidden): Initialize variable `fndecl'.
9811 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
9813 * decl.c (flag_isoc9x): New variable to be able to use code in
9814 c-common.c. For now always zero.
9816 2000-01-03 Mark Mitchell <mark@codesourcery.com>
9818 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
9819 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
9820 or unshare_base_binfos for virtual bases here.
9821 * search.c (dfs_get_vbase_types): Do it here.
9822 (get_vbase_types): Adjust.
9824 2000-01-02 Mark Mitchell <mark@codesourcery.com>
9826 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
9827 (BINFO_PRIMARY_MARKED_P): Use flag 5.
9828 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
9829 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9830 (unmark_primary_bases): Remove declaration.
9831 (unmarkedp): Declare.
9832 (dfs_vbase_unmark): Likewise.
9833 * class.c (determine_primary_base): Return immediately if there
9834 are no base classes. Call mark_primary_bases here.
9835 (modify_all_direct_vtables): Remove.
9836 (modify_all_indirect_vtables): Remove.
9837 (dfs_modify_vtables_queue_p): New function.
9838 (dfs_modify_vtables): New function.
9839 (modify_all_vtables): Use them.
9840 (build_base_fields): Build FIELD_DECLs for primary virtual base
9842 (create_vtable_ptr): Don't call determine_primary_base here.
9843 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
9844 (dfs_set_offset_for_vbases): ... this.
9845 (layout_virtual_bases): Use it.
9846 (layout_class_type): Call determine_primary_base here.
9847 * search.c (unmarkedp): Make it global.
9848 (shared_marked_p): Simplify.
9849 (shared_unmarked_p): Likewise.
9850 (dfs_primary_bases_queue_p): Remove.
9851 (dfs_unmark_primary_bases): Likewise.
9852 (unmark_primary_bases): Likewise.
9853 (mark_primary_bases): Simplify.
9854 (get_pure_virtuals): Don't call mark_primary_bases here.
9855 (dfs_vbase_unmark): New function.
9856 (get_vbase_types): Simplify.
9858 * class.c (struct base_info): Remove.
9859 (determine_primary_base): Take has_virtual_p rather than a
9860 base_info as input. Don't calculate max_has_virtual.
9861 (finish_struct_bits): Remove max_has_virtual argument.
9862 (create_vtable_ptr): Remove max_has_virtual_p argument.
9863 (layout_virtual_bases): Remove max argument.
9864 (layout_basetypes): Likewise.
9865 (layout_class_type): Remove max_has_virtual_p argument.
9866 (finish_struct_1): Remove max_has_virtual.
9868 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
9869 (layout_basetypes): Remove.
9870 * class.c (propagate_binfo_offsets): Moved here from tree.c.
9871 Update to handle primary virtual bases.
9872 (remove_base_fields): New function, split out from
9874 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
9875 (layout_virtual_bases): New function, split out from
9876 layout_basetypes. Update to handle primary virtual bases.
9877 (layout_basetypes): Moved here from tree.c. Use
9878 remove_base_fields and layout_virtual_bases.
9879 * search.c (dfs_mark_primary_bases_queue_p): New function.
9880 (mark_primary_bases): Use it.
9881 * tree.c (CEIL): Remove.
9882 (propagate_binfo_offsets): Remove.
9883 (layout_basetypes): Remove.
9885 2000-01-01 Mark Mitchell <mark@codesourcery.com>
9887 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
9888 (BINFO_PRIMARY_MARKED_P): New macro.
9889 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
9890 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
9891 (mark_primary_bases): New function.
9892 (unmark_primary_bases): Likewise.
9893 * search.c (get_abstract_virtuals_1): Remove.
9894 (dfs_mark_primary_bases): New function.
9895 (mark_primary_bases): Likewise.
9896 (dfs_unmark_primary_bases): Likewise.
9897 (unmark_primary_bases): Likewise.
9898 (dfs_get_pure_virtuals): Likewise.
9900 2000-01-01 Mark Mitchell <mark@codesourcery.com>
9902 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
9903 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
9904 (modify_one_vtable): Adjust.
9905 (fixup_vtable_deltas1): Likewise.
9906 (override_one_vtable): Likewise.
9907 * search.c (get_abstract_virtuals_1): Likewise.
9908 (get_pure_virtuals): Likewise.
9909 (expand_upcast_fixups): Likewise.
9910 * tree.c (debug_binfo): Likewise.
9912 * class.c (build_vtable): Don't return a value. Don't rebuild
9913 vtables for bases that have already been handled.
9914 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
9915 already been handled.
9916 (modify_one_vtable): Adjust accordingly.
9917 (fixup_vtable_deltas1): Likewise.
9918 (finish_struct_1): Likewise.
9920 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9922 * call.c (build_new_method_call): Also check destructors.