1 2002-01-05 Richard Henderson <rth@redhat.com>
3 * semantics.c (expand_body): Revert last change.
5 2002-01-04 Jason Merrill <jason@redhat.com>
7 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
10 * class.c (build_vtbl_initializer): Check for a lost primary
11 before calculating the vtable entry to throw away.
13 2002-01-02 Jason Merrill <jason@redhat.com>
15 * semantics.c (expand_body): Call outlining_inline_function when
16 emitting an inline function out of line.
18 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
20 PR c++/5116, c++/764 reversion
21 * call.c (build_new_op): Revert the instantiations. They are
24 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
27 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
29 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
32 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
33 (tsubst, case POINTER_TYPE): Handle pmfs here.
34 (tsubst, case OFFSET_TYPE): Check it is not an offset to
35 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
37 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
40 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
41 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
42 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
44 (tsubst_template_parms): Break up loop statements.
45 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
46 parm PARM_DECLs don't get promoted.
48 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
51 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
52 (build_x_function_call): Cope with a COMPONENT_REF containing a
55 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
58 * pt.c (convert_template_argument): Be more careful determining
59 when RECORD_TYPE templates are or are not templates.
61 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
64 * cp-tree.h (handle_class_head): Adjust prototype.
65 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
66 parameters. Use for all class heads.
67 * parse.y (named_class_head_sans_basetype, named_class_head,
68 named_complex_class_head_sans_basetype,
69 named_class_head_sans_basetype_defn,
70 unnamed_class_head): Remove.
71 (class_head, class_head_apparent_template): Recognize class heads
72 (class_head_decl, class_head_defn): New reductions. Process class
74 (structsp): Adjust class definition and class declaration
76 (maybe_base_class_list): Give diagnostic on empty list.
78 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
81 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
82 single non-static member.
83 (unary_complex_lvalue): If it cannot be a pointer to member, don't
84 make it so. Check it is not pointer to reference.
86 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
89 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
90 are processing a template decl.
92 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
95 * call.c (build_new_op): Make sure template class operands are
96 instantiated. Simplify arglist construction.
98 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
100 * call.c (build_user_type_conversion_1): Use my_friendly_assert
101 rather than if ... abort.
102 * cvt.c (convert_to_reference): Likewise.
103 * semantics.c (setup_vtbl_ptr): Likewise.
104 * pt.c (lookup_template_class): Comment typo.
106 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
109 * pt.c (push_template_decl_real): Make sure DECL has
112 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
115 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
116 for non-reference fields.
117 * typeck.c (require_complete_type): Use resolve_offset_ref).
119 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
122 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
124 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
127 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
128 up. Don't stabilize_references when initializing a reference.
130 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
132 * decl2.c (lang_f_options): Const-ify.
134 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
136 * config-lang.in (diff_excludes): Remove.
138 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
141 * typeck.c (build_function_call_real): Use original function
142 expression for errors.
144 2001-12-18 Jason Merrill <jason@redhat.com>
146 * class.c (add_method): Do compare 'this' quals when trying to match a
147 used function. Don't defer to another used function.
149 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
151 * pt.c (instantiate_clone): Remove, fold into ...
152 (instantiate_template): ... here. Simplify by removing mutual
154 * typeck2.c (build_m_component_ref): Don't cv qualify the function
155 pointed to by a pointer to function.
156 * class.c (delete_duplicate_fields_1): Typo.
158 2001-12-18 Jason Merrill <jason@redhat.com>
160 C++ ABI change: destroy value arguments in caller.
161 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
162 create an extra binding level for the parameters.
163 * decl.c (store_parm_decls): Don't do parameter cleanups.
165 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
167 * call.c (build_new_method_call): Use '%#V'.
168 * error.c (cv_to_string): Use V parameter to determine padding.
170 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
172 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
173 spellings in messages.
175 2001-12-17 Zack Weinberg <zack@codesourcery.com>
177 * cp-tree.h: Delete #defines for cp_error, cp_warning,
178 cp_pedwarn, and cp_compiler_error.
179 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
180 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
181 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
182 typeck2.c: Change calls to the above macros to use their
183 language-independent equivalents: error, warning, pedwarn, and
184 internal_error respectively.
186 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
188 * decl2.c (finish_file): Remove back_end_hook.
190 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
192 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
193 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
194 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
196 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
198 * lang-options.h: Use American spelling in messages.
200 2001-12-13 Jason Merrill <jason@redhat.com>
202 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
204 Use cleanups to run base and member destructors.
205 * init.c (push_base_cleanups): New function, split out from...
206 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
207 * decl.c (finish_destructor_body): Move vbase destruction code to
209 (begin_function_body, finish_function_body): New fns.
210 (finish_function): Move [cd]tor handling and call_poplevel to
211 finish_function_body.
212 (pushdecl): Skip the new level.
213 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
214 (setup_vtbl_ptr): Call push_base_cleanups.
215 * method.c (synthesize_method): Call {begin,end}_function_body.
216 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
217 * cp-tree.h: Declare new fns.
218 * parse.y (function_body, .begin_function_body): New nonterminals.
219 (fndef, pending_inline, function_try_block): Use function_body.
220 (ctor_initializer_opt, function_try_block): No longer has a value.
221 (base_init): Remove .set_base_init token.
222 (.set_base_init, compstmt_or_error): Remove.
223 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
225 * optimize.c (maybe_clone_body): Fix parameter updating.
227 2001-12-12 Jason Merrill <jason@redhat.com>
229 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
230 * semantics.c (genrtl_start_function): Don't pass
231 parms_have_cleanups or push an extra binding level.
232 (genrtl_finish_function): Lose cleanup_label cruft.
234 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
235 (ctor_label): Remove.
236 * semantics.c (finish_return_stmt): Lose ctor_label support.
237 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
238 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
241 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
243 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
245 * decl.c (finish_function): Check VMS_TARGET, not VMS.
247 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
248 (end_cleanup_fn): And poplevel.
250 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
251 if we're in a template.
253 2001-12-12 Jakub Jelinek <jakub@redhat.com>
255 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
256 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
257 THIS_NAME_P): Delete.
258 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
259 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
260 with internal naming scheme.
261 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
263 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
265 * decl.c (grokdeclarator): Deprecated implicit typename use.
267 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
270 * parse.y (frob_specs): Indicate it is a language linkage which
271 contained the extern.
272 * decl.c (grokdeclarator): Allow extern language linkage with
275 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
278 * decl.c (add_binding): Don't reject duplicate typedefs involving
281 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
283 * parse.y, semantics.c: Similarly.
285 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
288 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
289 (copy_args_p): Rename to ...
290 (copy_fn_p): ... here.
291 (grok_special_member_properties): New function.
292 (grok_op_properties): Lose VIRTUALP parameter.
293 (copy_assignment_arg_p): Remove.
294 * call.c (build_over_call): Use copy_fn_p.
295 * decl.c (grokfndecl): Reformat. Adjust call to
297 (copy_args_p): Rename to ...
298 (copy_fn_p): ... here. Reject template functions. Check for pass
300 (grok_special_member_properties): Remember special functions.
301 (grok_ctor_properties): Don't remember them here, just check.
302 (grok_op_properties): Likewise.
303 (start_method): Call grok_special_member_properties.
304 * decl2.c (grokfield): Likewise.
305 (copy_assignment_arg_p): Remove.
306 (grok_function_init): Don't remember abstract assignment here.
307 * pt.c (instantiate_class_template): Call
308 grok_special_member_properties.
309 (tsubst_decl): Adjust grok_op_properties call.
311 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
313 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
314 RID_TYPES_COMPATIBLE_P.
316 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
318 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
319 call to build_aggr_init.
320 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
322 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
324 * parse.y: Replace uses of the string non-terminal with STRING.
325 Don't perform string concatentaion here.
326 (string): Remove non-terminal.
327 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
329 2001-12-05 Jason Merrill <jason@redhat.com>
331 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
332 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
333 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
334 * pt.c (push_tinst_level): No longer static.
335 * cp-tree.h: Declare them.
337 * init.c (resolve_offset_ref): Don't check access for the base
338 conversion to access a FIELD_DECL.
340 * cp-tree.h (TYPE_REFFN_P): New macro.
341 * decl.c (bad_specifiers): Check it, too.
343 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
344 on the __*_type_info type if we haven't seen a definition.
346 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
348 * decl.c: Include c-common.h.
349 (shadow_warning): Move to c-common.c.
351 Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
353 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
355 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
357 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
359 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
362 * init.c (sort_base_init): Allow binfos to be directly specified.
363 * method.c (do_build_copy_constructor): Explicitly convert to the
365 (do_build_assign_ref): Likewise.
367 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
369 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
370 declaration and initialization.
372 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
374 * typeck2.c: Remove leading capital from diagnostic messages, as
375 per GNU coding standards.
377 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
380 * decl.c (xref_basetypes): Handle attributes between
383 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
386 * parse.y (named_complex_class_head_sans_basetype): Add new
388 * Make-lang.in (parse.c): Adjust expected conflict count.
390 2001-12-03 Jason Merrill <jason@redhat.com>
392 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
393 immediate binfos for our virtual bases.
395 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
397 * call.c (build_java_interface_fn_ref): Similarly.
398 * except.c (is_admissible_throw_operand): Similarly.
399 * init.c (build_java_class_ref): Similarly.
400 * xref.c (open_xref_file): Similarly.
402 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
404 * class.c (finish_struct): Remove trailing periods from messages.
405 * decl.c (check_tag_decl): Similarly.
406 * lex.c (cxx_set_yydebug): Similarly.
407 * typeck2.c (friendly_abort): Similarly.
409 2001-11-29 Mark Mitchell <mark@codesourcery.com>
412 * cp-tree.h (ovl_member): Remove.
413 * decl2.c (merge_functions): Handle extern "C" functions
415 * tree.c (ovl_member): Remove.
417 2001-11-29 Mark Mitchell <mark@codesourcery.com>
420 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
421 FUNCTION_DECL, as input.
422 (mark_overriders): Remove.
423 (warn_hidden): Rework for the new ABI.
425 2001-11-29 Mark Mitchell <mark@codesourcery.com>
428 * call.c (convert_like_real): Do not build additional temporaries
429 for rvalues of class type.
431 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
433 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
434 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
435 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
436 (DERIVED_FROM_P): Likewise.
437 (enum base_access): Renumber, add ba_quiet bit mask.
439 (get_base_distance): Remove.
440 (binfo_value): Remove.
441 (ACCESSIBLY_DERIVED_FROM_P): Remove.
442 * call.c (standard_conversion): Use lookup_base.
443 * class.c (strictly_overrides): Likewise.
444 (layout_virtual_bases): Likewise.
445 (warn_about_ambiguous_direct_bases): Likewise.
446 (is_base_of_enclosing_class): Likewise.
447 (add_vcall_offset_vtbl_entries_1): Likewise.
448 * cvt.c (build_up_reference): Adjust comment.
449 * init.c (build_member_call): Reformat.
450 * search.c (get_binfo): Remove.
451 (get_base_distance_recursive): Remove.
452 (get_base_distance): Remove.
453 (lookup_base_r): Tweak.
454 (lookup_base): Add ba_quiet control. Complete the types here.
455 (covariant_return_p): Use lookup_base.
456 * tree.c (binfo_value): Remove.
457 (maybe_dummy_object): Use lookup_base.
458 * typeck.c (build_static_cast): Use lookup_base.
459 (get_delta_difference): Likewise.
460 * typeck2.c (binfo_or_else): Use lookup_base.
461 (build_scoped_ref): Add back error_mark_check.
462 (build_m_component_ref): Use lookup_base.
464 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
466 * Make-lang.in (c++.generated-manpages): New dummy target.
468 Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
470 * Make-lang.in (cp-lang.o): Depends on c-common.h.
471 * cp-lang.c (c-common.h): Include.
472 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
473 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
474 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
476 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
478 * decl2.c (c_language): Move to c-common.c.
479 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
483 2001-11-26 Jason Merrill <jason@redhat.com>
485 * call.c (joust): Remove COND_EXPR hack.
487 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
489 * cp/search.c (lookup_base_r): Declare bk in variable declaration
492 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
495 * class.c (build_vbase_pointer): Remove.
496 (build_vbase_path): Remove.
497 (build_base_path): New function.
498 * cp-tree.h (base_access, base_kind): New enumerations.
499 (build_base_path): Declare.
500 (convert_pointer_to_real): Remove.
501 (convert_pointer_to): Remove.
502 (lookup_base): Declare.
503 (convert_pointer_to_vbase): Remove.
504 * call.c (build_scoped_method_call): Use lookup_base &
505 build_base_path instead of convert_pointer_to_real,
506 get_base_distance & get_binfo.
507 (build_over_call): Likewise.
508 * cvt.c (cp_convert_to_pointer): Likewise.
509 (convert_to_pointer_force): Likewise.
510 (build_up_reference): Likewise.
511 (convert_pointer_to_real): Remove.
512 (convert_pointer_to): Remove.
513 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
514 instead of convert_pointer_to_vbase & build_vbase_path.
515 (emit_base_init): Use build_base_path instead of
516 convert_pointer_to_real.
517 (expand_virtual_init): Lose unrequired conversions.
518 (resolve_offset_ref): Use lookup_base and build_base_path
519 instead of convert_pointer_to.
520 * rtti.c (build_dynamic_cast_1): Use lookup_base &
521 build_base_path instead of get_base_distance & build_vbase_path.
522 * search.c (get_vbase_1): Remove.
524 (convert_pointer_to_vbase): Remove.
525 (lookup_base_recursive): New function.
526 (lookup_base): New function.
527 * typeck.c (require_complete_type): Use lookup_base &
528 build_base_path instead of convert_pointer_to.
529 (build_component_ref): Likewise.
530 (build_x_function_call): Likewise.
531 (get_member_function_from_ptrfunc): Likewise.
532 (build_component_addr): Likewise.
533 * typeck2.c (build_scoped_ref): Likewise.
535 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
537 * cp-tree.h (CP_TYPE_QUALS): Removed.
538 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
539 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
540 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
541 * dump.c (cp_dump_tree): Use void* dump_info argument to match
542 lang-hooks prototype.
543 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
544 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
545 CP_TYPE_QUALS changed to cp_type_quals.
546 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
547 (CXX_C_OBJS): Remove c-dump.o.
549 2001-11-21 Mark Mitchell <mark@codesourcery.com>
552 * pt.c (lookup_template_class): Ensure that all specializations
553 are registered on the list corresponding to the most general
556 2001-11-20 Mark Mitchell <mark@codesourcery.com>
558 * call.c (non_reference): Add documentation.
559 (convert_class_to_reference): Do not strip reference types
560 from conversion operators.
561 (maybe_handle_ref_bind): Simplify.
562 (compare_ics): Correct handling of references.
564 2001-11-19 John Wilkinson <johnw@research.att.com>
566 * dump.c (dump_op): New function.
567 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
568 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
569 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
571 2001-11-19 Mark Mitchell <mark@codesourcery.com>
574 * semantics.c (finish_sizeof): Make sure that expression created
575 while processing a template do not have a type.
576 (finish_alignof): Likewise.
577 * typeck.c (c_sizeof): Likewise.
578 (expr_sizeof): Likewise.
580 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
582 * lex.c (cxx_finish): Call c_common_finish.
583 (finish_parse): Remove.
585 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
587 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
588 when displaying error message about missing array bounds.
590 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
592 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
594 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
596 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
598 * cp-tree.h (print_class_statistics): Restore.
600 2001-11-15 Jason Merrill <jason@redhat.com>
602 * method.c (use_thunk): Don't emit debugging information for thunks.
604 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
605 * decl.c (make_typename_type): Handle getting a class template.
606 * search.c (lookup_field_r): A class template is good enough for
609 * call.c (convert_like_real): Only use cp_convert for the bad part.
610 (standard_conversion): Also allow bad int->enum.
611 * typeck.c (ptr_reasonably_similar): Also allow functions to
612 interconvert. Pointers to same-size integers are reasonably
615 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
618 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
621 * init.c (sort_base_init): Remove unreachable code.
622 (expand_member_init): Adjust comment to reflect reality. Simplify
623 and remove unreachable code.
625 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
627 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
628 (cxx_init): Update prototype.
629 * decl.c (init_decl_processing): Rename. Move null node init
630 to its creation time.
631 * lex.c (cxx_init_options): Update.
632 (cxx_init): Combine with old init_parse; also call
633 cxx_init_decl_processing.
635 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
637 * decl.c (check_initializer): Try to complete the type of an
638 array element before checking whether it's complete. Don't
639 complain about arrays with complete element types but an
641 (cp_finish_decl): Build the hierarchical constructor before
642 calling maybe_deduce_size_from_array_init.
644 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
646 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
648 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
651 * parse.y (already_scoped_stmt): Remove.
652 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
654 2001-11-12 H.J. Lu <hjl@gnu.org>
656 * cp/cvt.c (ocp_convert): Don't warn the address of a weak
657 function is always `true'.
659 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
661 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
662 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
663 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
664 * cp-tree.h (print_class_statistics): Remove.
665 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
666 cxx_print_identifier, cxx_set_yydebug): New.
667 * lex.c (set_yydebug): Rename c_set_yydebug.
668 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
669 lang_print_xnode): Rename.
670 * tree.c (print_lang_statistics): Rename.
672 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
674 * class.c (dump_array): Fix format specifier warning.
676 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
678 * cp-lang.c (LANG_HOOKS_NAME): Override.
679 (struct lang_hooks): Constify.
680 * lex.c (cxx_init_options): Update.
681 (lang_identify): Remove.
682 * parse.y (language_string): Remove.
684 2001-11-08 Andreas Franck <afranck@gmx.de>
686 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
687 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
688 suggested by autoconf.
689 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
690 (c++.install-common): Use the transformed target alias names.
692 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
694 * Make-lang.in: Update.
695 * cp-lang.c: Include langhooks-def.h.
697 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
699 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
701 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
703 * lex.c (copy_lang_type): Add static prototype.
705 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
707 * pt.c (unify): Handle SCOPE_REF.
709 2001-11-01 Jakub Jelinek <jakub@redhat.com>
711 * tree.c (cp_copy_res_decl_for_inlining): Adjust
712 DECL_ABSTRACT_ORIGIN for the return variable.
714 2001-10-31 Zack Weinberg <zack@codesourcery.com>
716 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
718 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
720 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
721 semantics.c, spew.c: Fix spelling errors.
723 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
725 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
727 2001-10-25 Zack Weinberg <zack@codesourcery.com>
729 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
732 Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
734 * cp-lang.c (cxx_get_alias_set): New function.
735 Point LANG_HOOKS_GET_ALIAS_SET to it.
737 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
739 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
740 * cp-tree.h (make_unbound_class_template): Prototype new function.
741 * decl.c (make_unbound_class_template): New function.
742 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
743 * error.c (dump_type): Likewise.
744 * mangle.c (write_type): Likewise.
745 * parse.y (template_parm): Likewise.
746 (template_argument): Use make_unbound_class_template.
747 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
749 (tsubst_copy): Likewise.
751 * tree.c (walk_tree): Likewise.
752 * typeck.c (comptypes): Likewise.
754 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
756 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
757 extra calls into fewer ones.
759 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
761 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
762 Warn when merging inline with attribute noinline.
763 (start_decl, start_function): Warn if inline and attribute
764 noinline appear in the same declaration.
766 2001-10-16 H.J. Lu <hjl@gnu.org>
768 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
769 for tree checking disabled.
771 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
773 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
774 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
776 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
778 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
779 (unify): Only handle MINUS_EXPR specially if the above flag is set
780 and the subtracted constant is 1. Clear the flag on recursive calls.
781 Set it when unifying the maximum value in an INTEGER_TYPE's range.
783 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
785 * decl.c (bad_specifiers): Don't allow exception specifications
788 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
790 * cp/lex.c (init_cp_pragma): Similarly.
792 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
794 * pt.c (lookup_template_class): Build complete template arguments
795 for BOUND_TEMPLATE_TEMPLATE_PARM.
797 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
799 * cp-tree.h (TYPE_BINFO): Update comment.
800 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
801 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
802 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
803 (copy_type): Prototype new function.
804 * lex.c (copy_lang_decl): Gather tree node statistics.
805 (copy_lang_type): New function.
806 (copy_type): Likewise.
807 (cp_make_lang_type): Create lang_type for
808 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
809 and BOUND_TEMPLATE_TEMPLATE_PARM.
810 * pt.c (tsubst): Use copy_type instead of copy_node.
811 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
813 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
815 * pt.c (determine_specialization): Ignore functions without
818 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
821 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
823 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
825 * typeck2.c (store_init_value): Don't re-digest a bracketed
828 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
831 2001-10-11 Richard Henderson <rth@redhat.com>
833 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
835 (build_vtbl_ref_1): Split out from build_vtbl_ref.
836 (build_vfn_ref): Use it to handle vtable descriptors before
837 calling build_vtable_entry_ref.
838 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
840 2001-10-10 Richard Henderson <rth@redhat.com>
842 * parse.y (asm_operand): Allow named operands.
843 * semantics.c (finish_asm_stmt): Tweek for changed location
844 of the operand constrant.
846 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
848 * call.c (standard_conversion): Add bad conversion between
849 integers and pointers.
850 (convert_like_real): Don't use convert_for_initialization for bad
851 conversions; complain here and use cp_convert.
852 (build_over_call): Don't handle bad conversions specially.
853 (perform_implicit_conversion): Allow bad conversions.
854 (can_convert_arg_bad): New fn.
855 * cp-tree.h: Declare it.
856 * typeck.c (convert_for_assignment): Use it.
857 (ptr_reasonably_similar): Any target type is similar to void.
859 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
861 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
862 (cp/cp-lang.o): New rule.
863 * cp-tree.h: Declare hooks.
864 * tree.c: Make hooks non-static.
865 (init_tree): Don't initialize hooks here.
866 * lex.c: Likewise. Move definition of lang_hooks to...
867 * cp-lang.c: ... new file.
869 2001-10-08 Richard Henderson <rth@redhat.com>
871 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
872 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
874 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
876 * class.c (build_vtable_entry_ref): Const-ify.
877 * decl.c (predefined_identifier,
878 initialize_predefined_identifiers): Likewise.
879 * init.c (build_new_1): Likewise.
880 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
883 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
885 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
886 (INSNS_PER_STMT): Likewise.
887 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
888 (copy_body, initialize_inlined_parameters): Likewise.
889 (declare_return_variable, inlinable_function_p): Likewise.
890 (expand_call_inline, expand_calls_inline): Likewise.
891 (optimize_inline_calls, clone_body): Likewise.
892 * tree.c (walk_tree): Moved to ../tree-inline.c.
893 (walk_tree_without_duplicates): Likewise.
894 (copy_tree_r, remap_save_expr): Likewise.
896 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
898 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
899 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
900 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
901 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
902 (flag_inline_trees): Moved declaration to ../tree-inline.h.
903 (walk_tree): Moved declaration to ../tree-inline.h.
904 (walk_tree_without_duplicates, copy_tree_r): Likewise.
905 (remap_save_expr): Likewise.
906 * decl.c: Include tree-inline.h.
907 (lang_mark_tree): Don't mark inlined_fns.
908 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
909 * optimize.c: Include tree-inline.h.
910 (optimize_inline_calls): Move declaration to ../tree.h, as
912 (remap_decl): Use language-independent constructs and hooks.
913 (remap_block, copy_body_r, declare_return_variable): Likewise.
914 (inlinable_function_p): Likewise. Don't test for
915 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
916 no longer language-specific.
917 (optimize_inline_calls): Likewise. Make it non-static. Moved
918 call of dump_function to...
919 (optimize_function): Here...
920 (clone_body): New function, extracted from...
921 (maybe_clone_body): ... here. Build decl_map locally and pass
923 * pt.c, semantics.c: Include tree-inline.h.
925 (cp_walk_subtrees): New language-specific hook for tree inlining.
926 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
927 cp_is_overload_p, cp_auto_var_in_fn_p,
928 cp_copy_res_decl_for_inlining): Likewise.
929 (walk_tree): Move language-specific constructs into...
930 (cp_walk_subtrees): this new function.
931 (copy_tree_r): Use language-independent constructs and hooks.
932 (init_tree): Initialize tree inlining hooks.
933 (remap_save_expr): Adjust prototype so that the declaration
934 does not require the definition of splay_tree.
936 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
938 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
939 to build the declaration instead of the declaration itself.
941 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
943 * decl2.c (cxx_decode_option): Add 'else'.
945 * spew.c (end_input): No longer static.
946 * cp-tree.h: Declare it.
947 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
949 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
951 * call.c (build_over_call), typeck.c (build_function_call_real):
952 Pass type attributes to check_function_format rather than name or
953 assembler name. Don't require there to be a name or assembler
954 name to check formats.
956 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
958 * decl.c (init_decl_processing): Don't call
959 init_function_format_info. Initialize lang_attribute_table
961 (builtin_function): Call decl_attributes.
962 (insert_default_attributes): New.
964 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
966 * decl.c (grokdeclarator): Copy array typedef handling from C
969 * decl.c (grokdeclarator): Copy too-large array handling from C
972 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
974 * config-lang.in (target_libs): Added target-gperf, so that we
975 don't try to build it if C++ is disabled.
977 2001-09-23 Zack Weinberg <zack@codesourcery.com>
979 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
980 (cp/errfn.o): Delete rule.
981 (cp/error.o): Depend on flags.h.
982 * errfn.c: Delete file.
983 * cp-tree.h: Declare warn_deprecated. Remove definitions of
984 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
985 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
986 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
987 internal_error respectively. Make cp_deprecated into a macro.
988 Don't define cp_printer typedef or declare cp_printers.
989 * error.c: Include flags.h.
990 Delete: struct tree_formatting_info, print_function_argument_list,
991 print_declaration, print_expression, print_function_declaration,
992 print_function_parameter, print_type_id, print_cv_qualifier_seq,
993 print_type_specifier_seq, print_simple_type_specifier,
994 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
995 print_parameter_declaration_clause, print_exception_specification,
996 print_nested_name_specifier, and definition of cp_printers.
997 (locate_error): New function.
998 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
999 rewritten in terms of locate_error and diagnostic.c.
1000 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
1001 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
1002 (init_error): Adjust to match.
1004 Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1006 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
1008 2001-09-21 Richard Henderson <rth@redhat.com>
1010 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
1011 (build_vtbl_initializer): Likewise.
1012 (build_vfn_ref): New.
1013 * cp-tree.h: Declare it.
1014 * call.c (build_over_call): Use it.
1015 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
1016 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
1018 Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
1020 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
1022 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
1024 Table-driven attributes.
1025 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
1026 * decl2.c (cplus_decl_attributes): Only take one attributes
1028 * cp-tree.c (cplus_decl_attributes): Update prototype.
1029 * class.c (finish_struct), decl.c (start_decl, start_function),
1030 decl2.c (grokfield), friend.c (do_friend), parse.y
1031 (parse_bitfield): Update calls to cplus_decl_attributes.
1032 * decl.c (grokdeclarator): Take a pointer to a single ordinary
1034 * decl.h (grokdeclarator): Update prototype.
1035 * decl2.c (grokfield): Take a single ordinary attribute list.
1036 * friend.c (do_friend): Likewise.
1037 * decl.c (shadow_tag, groktypename, start_decl,
1038 start_handler_parms, grokdeclarator, grokparms, start_function,
1039 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
1040 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
1041 (process_template_parm, do_decl_instantiation): Pass single
1042 ordinary attribute lists around.
1043 * decl.c (grokdeclarator): Correct handling of nested attributes.
1045 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
1046 * decl.c (grokdeclarator): Embedded attrs bind to the right,
1049 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
1050 (cp_attribute_table): Declare.
1051 * decl.c (valid_lang_attribute): Don't define.
1052 (lang_attribute_table): Define.
1053 (init_decl_processing): Initialize lang_attribute_table instead of
1054 valid_lang_attribute.
1055 * tree.c (cp_valid_lang_attribute): Remove.
1056 (handle_java_interface_attribute, handle_com_interface_attribute,
1057 handle_init_priority_attribute): New functions.
1058 (cp_attribute_table): New array.
1059 * decl2.c (import_export_class): Don't use
1060 targetm.valid_type_attribute.
1062 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1064 * Make-lang.in (cp/error.o): Depend on real.h
1065 * error.c: #include "real.h"
1067 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1069 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
1070 xmalloc/strcpy/strcat.
1072 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1074 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
1076 * pt.c (tsubst_decl): Likewise.
1078 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1080 * decl2.c (lang_f_options): Const-ification.
1081 * lex.c (cplus_tree_code_name): Likewise.
1082 * spew.c (yyerror): Likewise.
1084 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
1087 * class.c (force_canonical_binfo_r): Check & move an indirect
1089 (force_canonical_binfo): Check that it's not already
1091 (mark_primary_virtual_base): Remove BINFO parameter.
1092 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
1094 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
1096 Remove TYPE_NONCOPIED_PARTS.
1097 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
1098 CLASSTYPE_PURE_VIRTUALS.
1099 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
1100 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
1101 (layout_class_type): Don't call fixup_inline_methods here ...
1102 (finish_struct_1): ... call it here.
1104 2001-09-04 Mark Mitchell <mark@codesourcery.com>
1106 * decl.c (duplicate_decls): Remove code deadling with
1108 * decl2.c (finish_file): Likewise.
1109 * pt.c (instantiate_decl): Likewise.
1110 * semantics.c (expand_body): Don't defer local functions if
1111 they wouldn't be deferred for some other reason. Don't
1112 generate RTL for functions that will not be emitted.
1113 (genrtl_start_function): Remove code deadling with
1115 (genrtl_finish_function): Likewise.
1117 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
1120 * call.c (build_over_call): Do not optimize any empty base
1123 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1125 * error.c (dump_template_decl): Output template parameters
1126 together with their specifiers.
1127 Output `class' prefix for template template parameter.
1128 (dump_decl): Fix formatting.
1130 2001-08-30 Kurt Garloff <garloff@suse.de>
1132 * optimize.c (inlinable_function_p): Allow only smaller single
1133 functions. Halve inline limit after reaching recursive limit.
1135 2001-08-30 Joern Rennecke <amylaar@redhat.com>
1136 Jason Merrill <jason_merrill@redhat.com>
1138 * class.c (build_vtable_entry_ref): Subtract in char*, not
1141 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
1143 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
1144 (build_cplus_array_type): Use cp_build_qualified_type, not
1145 TYPE_MAIN_VARIANT, to get an unqualified version.
1147 * decl2.c (grok_alignof): Lose.
1148 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
1149 * typeck.c (c_alignof): Lose.
1150 * semantics.c (finish_sizeof, finish_alignof): New.
1151 * parse.y: Use them.
1152 * cp-tree.h: Declare them.
1154 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
1156 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
1157 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
1158 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
1160 2001-08-19 Jakub Jelinek <jakub@redhat.com>
1162 * typeck2.c (add_exception_specifier): Only require complete type if
1163 not in processing template declaration.
1165 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1167 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
1168 GNU_xref_start_scope and GNU_xref_end_scope.
1170 * tree.c (TYPE_HASH): Moved to ../tree.h.
1172 2001-08-16 Mark Mitchell <mark@codesourcery.com>
1174 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
1177 2001-08-14 Richard Henderson <rth@redhat.com>
1179 * class.c, cp-tree.h (build_vfn_ref): Remove.
1180 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
1182 2001-08-13 Mark Mitchell <mark@codesourcery.com>
1184 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
1185 empty class assignment as having side-effects to avoid
1188 2001-08-13 Zack Weinberg <zackw@panix.com>
1190 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
1191 * except.c: Include libfuncs.h.
1193 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1195 * decl.c (grokdeclarator): Clarify diagnostic message.
1197 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1199 * decl2.c (do_nonmember_using_decl): Replace using directive
1200 with using declaration in the error message.
1202 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1204 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
1205 criterion to avoid rebuilding expression tree instead of
1206 processing_template_decl.
1208 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
1210 Support named return value optimization for inlines, too.
1211 * decl.c (finish_function): Nullify returns here.
1212 * semantics.c (genrtl_start_function): Not here.
1213 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
1214 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
1215 Also nullify the CLEANUP_STMT for the nrv.
1216 * cp-tree.h: Declare it.
1217 * optimize.c (declare_return_variable): Replace the nrv with the
1219 * typeck.c (check_return_expr): Be more flexible on alignment check.
1220 Ignore cv-quals when checking for a matching type.
1222 2001-08-09 Richard Henderson <rth@redhat.com>
1224 * decl2.c (finish_objects): Use target hooks instead of
1225 assemble_constructor and assemble_destructor.
1227 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
1229 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
1231 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
1234 Stop using TYPE_NONCOPIED_PARTS.
1235 * call.c (build_over_call): Be careful when copy constructing
1236 or assigning to an empty class.
1237 * class.c (check_bases_and_members): It has a
1238 COMPLEX_ASSIGN_REF if it has a vptr.
1239 (layout_class_type): Don't add empty class padding to
1240 TYPE_NONCOPIED_PARTS.
1241 (finish_struct_1): Don't add the VFIELD either.
1242 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
1245 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
1247 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
1249 2001-08-06 Richard Henderson <rth@redhat.com>
1251 * decl2.c (finish_objects): Pass a symbol_ref and priority to
1252 assemble_{constructor,destructor}. Remove priority handling.
1254 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1256 Don't allow template-id in using-declaration.
1257 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
1258 (do_class_using_decl): Likewise.
1260 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
1262 * cp/spew.c (read_token): No need to pop buffers.
1264 2001-08-02 Stan Shebs <shebs@apple.com>
1266 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
1267 (fnaddr_from_vtable_entry): Remove decl.
1268 * method.c (use_thunk): Update comment.
1270 2001-08-01 Andrew Cagney <ac131313@redhat.com>
1272 * repo.c (get_base_filename): Change return value to const char
1275 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
1279 * cp-tree.h (flag_honor_std): Remove.
1280 (CPTI_FAKE_STD): Remove.
1281 (std_node): Remove comment about it being NULL.
1282 (fake_std_node): Remove.
1283 * decl.c (in_fake_std): Remove.
1284 (walk_namespaces_r): Remove fake_std_node check.
1285 (push_namespace): Remove in_fake_std code.
1286 (pop_namespace): Likewise.
1287 (lookup_name_real): Remove fake_std_node check.
1288 (init_decl_processing): Always create std_node. Always add
1290 (builtin_function): Always put non '_' fns in std.
1291 * decl2.c (flag_honor_std): Remove.
1292 (lang_f_options): Remove honor-std.
1293 (unsupported_options): Add honor-std.
1294 (set_decl_namespace): Remove fake_std_node check.
1295 (validate_nonmember_using_decl): Likewise.
1296 (do_using_directive): Likewise.
1297 (handle_class_head): Likewise.
1298 * dump.c (cp_dump_tree): Likewise.
1299 * except.c (init_exception_processing): Adjust.
1300 * init.c (build_member_call): Remove fake_std_node check.
1301 (build_offset_ref): Likewise.
1302 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
1303 * rtti.c (init_rtti_processing): Adjust.
1305 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
1307 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
1308 operand while calling cp_tree_equal.
1310 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
1312 The 3.0 ABI no longer has vbase pointer fields.
1313 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
1314 FORMAT_VBASE_NAME): Remove.
1315 * method.c (do_build_copy_constructor): Adjust.
1316 (do_build_assign_ref): Adjust.
1317 * search.c (lookup_field_r): Adjust.
1318 * typeck.c (build_component_ref): Adjust.
1320 The 3.0 ABI always has a vtable pointer at the start of every
1322 * rtti.c (build_headof_sub): Remove.
1323 (build_headof): Adjust.
1324 (get_tinfo_decl_dynamic): No need to check flag_rtti
1326 (create_real_tinfo_var): Explain why we need a hidden name.
1328 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
1331 * class.c (update_vtable_entry_for_fn): The fixed adjustment
1332 of a virtual thunk should be from declaring base.
1334 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
1336 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
1337 the shared virtual base, so preserving inheritance graph order.
1339 2001-07-30 Andreas Jaeger <aj@suse.de>
1341 * decl2.c: Remove unused var global_temp_name_counter.
1343 2001-07-28 Richard Henderson <rth@redhat.com>
1345 * method.c (pending_inlines): Remove.
1347 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
1349 * class.c (mark_primary_virtual_base): Don't adjust base
1351 (dfs_unshared_virtual_bases): Adjust them here.
1352 (mark_primary_bases): Explain why we adjust at the end.
1354 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
1356 * class.c (finish_struct_1): When copying the primary base's
1357 VFIELD, make sure we find it is at offset zero.
1359 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1361 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
1362 tsubst_expr for default template arguments.
1364 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
1367 * spew.c (yylex): Only copy the token's lineno, if it is
1370 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
1373 * call.c (resolve_args): Simplify, call
1374 convert_from_reference.
1375 (build_new_op): Resolve and convert from reference ARG1
1376 earlier. Adjust ARG2 & ARG3 resolve and conversion.
1378 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
1380 * decl.c (last_function_parm_tags): Remove.
1381 (current_function_parm_tags): Remove.
1382 (init_decl_processing): Adjust.
1383 (start_function): Adjust.
1384 (store_parm_decls): Adjust.
1387 * decl.c (grokdeclarator): Detect when a function typedef is
1388 declaring a function, and create last_function_parms correctly.
1390 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
1392 * call.c (joust): Only prefer a non-builtin candidate to a builtin
1393 one if they have the same signature.
1395 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
1396 it rather than toplevel_bindings_p. Give it a mangled name if static.
1397 (convert_to_reference): Adjust.
1398 * decl2.c (get_temp_name): Lose.
1399 * mangle.c (mangle_ref_init_variable): New fn.
1400 (mangle_guard_variable): Strip the ref-init header.
1401 * cp-tree.h: Adjust.
1402 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
1404 (grok_reference_init): Always use DECL_INITIAL.
1406 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
1409 * call.c (build_conditional_expr): Recheck args after
1411 * cp-tree.h (build_conditional_expr): Move to correct file.
1412 * typeck.c (decay_conversion): Diagnose any unknown types
1414 (build_binary_op): Don't do initial decay or default
1415 conversions on overloaded functions.
1416 (build_static_cast): Don't do a decay conversion here.
1418 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
1421 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
1422 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
1424 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
1426 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
1427 (create_vtbl_ptr): ... here.
1429 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
1431 * class.c (build_vbase_offset_vbtl_entries): Look for
1432 non-primary base of which we are a sub vtable.
1434 2001-07-24 Phil Edwards <pme@sources.redhat.com>
1436 * semantics.c (finish_this_expr): Remove unused code.
1438 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
1440 Simplify rtti, now we've only one ABI.
1441 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
1443 (tinfo_decl_id, tinfo_var_id): Remove.
1444 (get_typeid_1): Remove.
1446 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
1447 (typeid_ok_p): New function.
1448 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
1449 (get_tinfo_decl): Remove old abi documentation.
1450 (tinfo_from_decl): Remove.
1451 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
1452 (get_typeid_1): Remove.
1453 (get_base_offset): Remove.
1454 (synthesize_tinfo_var): Absorb get_base_offset.
1455 (create_real_tinfo_var): Don't use tinfo_decl_id.
1457 2001-07-23 Graham Stott <grahams@redhat.com>
1459 * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
1460 variable has_two_argument_delete_p.
1462 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
1464 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
1465 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
1466 (CPTI_INDEX_IDENTIFIER): Remove.
1467 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
1468 (delta2_identifier): Remove.
1469 (index_identifier): Remove.
1470 (pfn_or_delta2_identifier): Remove.
1471 (flag_vtable_thunks): Remove.
1472 (VTABLE_DELTA2_NAME): Remove.
1473 (VTABLE_INDEX_NAME): Remove.
1474 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
1475 (vfunc_ptr_type_node): Adjust.
1476 (VTABLE_NAME_PREFIX): Adjust.
1477 (build_vfn_ref): Lose first parameter.
1478 (fixup_all_virtual_upcast_offsets): Remove.
1479 * decl.c (initialize_predefined_identifiers): Remove
1480 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
1481 (init_decl_processing): Remove no-vtable-thunk code.
1482 * decl2.c (flag_vtable_thunks): Remove.
1483 (mark_vtable_entries): Remove no-vtable-thunk code.
1484 * error.c (dump_decl): Remove no-vtable-thunk code.
1485 (dump_expr): Adjust ptr to member function code.
1486 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
1488 * rtti.c (build_headof): Remove no-vtable-thunk code.
1489 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
1490 * search.c (get_base_distance): Remove expand_upcast_fixups case.
1491 (virtual_context) Remove.
1492 (expand_upcast_fixups): Remove.
1493 (fixup_virtual_upcast_offsets): Remove.
1494 (fixup_all_virtual_upcast_offsets): Remove.
1495 * typeck.c (get_member_function_from_ptrfunc): Remove
1496 no-vtable-thunk code.
1497 * call.c (build_over_call): Adjust call to build_vfn_ref.
1498 * class.c (build_vfn_ref): Lose first parameter. Remove
1499 no-vtable-thunk code.
1500 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
1501 (build_vtable_entry): Remove no-vtable-thunk code.
1503 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
1505 Remove old-abi remnants. Remove comments about old abi
1506 behaviour. Remove references to 'new-abi' in comments.
1507 * cp-tree.h: Adjust comments.
1508 (vbase_offsets_in_vtable_p): Delete.
1509 (vcall_offsets_in_vtable_p): Delete.
1510 (vptrs_present_everywhere_p): Delete.
1511 (all_overridden_vfuns_in_vtables_p): Delete.
1512 (merge_primary_and_secondary_vtables_p): Delete.
1513 (TYPE_CONTAINS_VPTR_P): Adjust.
1514 (VTT_NAME_PREFIX): Remove.
1515 (CTOR_VTBL_NAME_PREFIX): Remove.
1516 (init_vbase_pointers): Remove.
1517 * class.c: Adjust coments.
1518 (build_vbase_pointer_fields): Delete.
1519 (build_vbase_pointer): Remove old-abi code.
1520 (build_secondary_vtable): Likewise.
1521 (modify_all_vtables): Likewise.
1522 (create_vtable_ptr): Likewise.
1523 (layout_class_type): Likewise.
1524 (finish_struct_1): Likewise.
1525 (finish_vtbls): Likewise.
1526 (dfs_finish_vtbls): Delete.
1527 (build_vbase_offset_vtbl_entries): Remove old-abi code.
1528 * cvt.c: Adjust comments.
1529 * decl.c: Adjust comments.
1530 * decl2.c: Adjust comments.
1531 * init.c: Adjust comments.
1532 (construct_virtual_bases): Remove old-abi code.
1533 * lang-specs.h: Remove -fno-new-abi.
1534 * mangle.c: Adjust comments.
1535 * rtti.c: Adjust comments.
1536 (get_base_offset): Remove old-abi-code.
1537 * search.c: Adjust comments.
1538 (dfs_init_vbase_pointers): Remove.
1539 (dfs_vtable_path_unmark): Remove.
1540 (init_vbase_pointers): Remove.
1541 * semantics.c: Adjust comments.
1542 (emit_associated_thunks): Remove old-abi code.
1543 * typeck.c: Adjust comments.
1545 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
1547 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
1550 2001-07-19 Mark Mitchell <mark@codesourcery.com>
1552 * class.c (finish_struct_anon): Forbid nested classes.
1554 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
1556 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
1557 * optimize.c: Include debug.h.
1558 (maybe_clone_body): Use debug hook.
1559 * semantics.c: Include debug.h.
1560 (expand_body): Use debug hook.
1562 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
1564 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
1566 2001-07-18 Mark Mitchell <mark@codesourcery.com>
1568 * class.c (type_requires_array_cookie): New function.
1569 (check_methods): Don't try to figure out whether the type needs a
1571 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
1572 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
1573 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
1574 * pt.c (instantiate_class_template): Don't set
1575 TYPE_VEC_DELETE_TAKES_SIZE.
1576 * NEWS: Document ABI changes from GCC 3.0.
1578 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
1579 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
1581 * NEWS (Changes in GCC 3.0): Fix typo.
1583 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
1585 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
1586 which attributes are to be attached, and a flags argument. Update
1587 call to decl_attributes.
1588 (grokfield): Update call to decl_attributes.
1589 * class.c (finish_struct): Update call to cplus_decl_attributes.
1590 * cp-tree.h (cplus_decl_attributes): Update prototype.
1591 * decl.c (start_decl, grokdeclarator, start_function): Update
1592 calls to decl_attributes and cplus_decl_attributes.
1593 * friend.c (do_friend): Update call to cplus_decl_attributes.
1594 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
1596 2001-07-12 Mark Mitchell <mark@codesourcery.com>
1598 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
1599 for `register' variables with an asm-specification.
1601 2001-07-11 Mark Mitchell <mark@codesourcery.com>
1603 * semantics.c (finish_asm_stmt): Mark the output operands
1604 to an asm addressable, if necessary.
1606 2001-07-11 Ben Elliston <bje@redhat.com>
1608 * Revert this change -- there is a subtle bug.
1611 * decl.c (finish_enum): New "attributes" argument; pass it to
1612 cplus_decl_attributes. Use a narrower type if the enum is packed.
1613 * cp-tree.h (finish_enum): Adjust prototype.
1614 * parse.y (enum_head): New non-terminal.
1615 (structsp): Use it. Enums now may be preceded or followed by
1616 optional attributes -- pass their chained tree to finish_enum().
1617 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
1619 2001-07-10 Mark Mitchell <mark@codesourcery.com>
1621 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
1624 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
1626 * semantics.c (cp_expand_stmt): Fix for null
1627 current_function_return_value.
1629 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
1631 * call.c (build_op_delete_call): Initialize fn.
1632 (convert_like_real): Delete conditional.
1633 (joust): Initialize *w and *l.
1634 * class.c: Add prototype for binfo_ctor_vtable.
1635 (get_primary_binfo): Initialize result.
1636 * init.c (build_java_class_ref): Initialize name.
1638 2001-07-09 Erik Rozendaal <dlr@acm.org>
1640 * typeck.c (unary_complex_lvalue): Do not duplicate the
1641 argument to modify, pre-, or post-increment when used as an
1642 lvalue and when the argument has side-effects.
1644 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
1646 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
1647 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
1648 cplus_decl_attributes even if attrs is NULL.
1649 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
1651 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
1653 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
1654 calls to decl_attributes.
1656 2001-07-06 Ira Ruben <ira@apple.com>
1658 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
1659 be DECL_TEMPLATE_RESULT.
1661 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1663 * cp-tree.h (copy_template_template_parm): Rename to ...
1664 (bind_template_template_parm): ... here.
1665 * tree.c (copy_template_template_parm): Rename to ...
1666 (bind_template_template_parm): ... here. Remove the case when
1667 NEWARGS is NULL_TREE.
1668 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
1669 BOUND_TEMPLATE_TEMPLATE_PARM.
1670 * pt.c (lookup_template_class): Adjust.
1672 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
1674 * cvt.c (convert_lvalue): New fn.
1675 * cp-tree.h: Declare it.
1676 * method.c (do_build_assign_ref): Use it.
1677 (do_build_copy_constructor): Convert parm to base types
1678 before calling base constructors.
1680 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
1681 DECL_USER_ALIGN. Check flag_elide_constructors instead of
1683 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
1685 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
1687 * optimize.c (optimize_inline_calls): New function, broken out
1689 (optimize_function): ... here. Call it. Don't inline if it is
1691 (dump_function): Print name of dump flag causing this dump.
1692 * semantics.c (expand_body): Move thunk inline check to
1695 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
1697 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
1698 (comptypes): Use target.comp_type_attributes.
1700 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
1702 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
1704 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1706 * error.c (lang_print_error_function): Add a `diagnostic_context *'
1709 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
1711 * decl2.c (import_export_class): Update.
1713 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
1715 * error.c (init_error): Adjust settings.
1717 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
1719 * error.c (init_error): Adjust settings.
1721 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
1723 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
1724 return pointers to data members by reference rather than by value.
1726 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
1728 Implement the Named Return Value optimization.
1729 * cp-tree.h (struct cp_language_function): Add x_return_value.
1730 (current_function_return_value): Now a macro.
1731 * decl.c: Don't define it.
1732 (define_label, finish_case_label): Don't clear it.
1733 (init_decl_processing): Don't register it with GC.
1734 * semantics.c (genrtl_finish_function): Don't check it for
1735 no_return_label. Copy the RTL from the return value to
1736 current_function_return_value and walk, calling...
1737 (nullify_returns_r): ...this new fn.
1738 * typeck.c (check_return_expr): Set current_function_return_value.
1740 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
1742 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
1743 sharing a ctor vtable with. Merge code for cases 1 and 2.
1744 (binfo_ctor_vtable): New fn.
1745 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
1747 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
1749 * class.c (dfs_find_final_overrider): Fix logic.
1751 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
1752 virtual thunk instead of non-virtual.
1753 (get_matching_virtual): Uncomment.
1755 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
1756 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
1759 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
1761 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
1762 we've not emerged from the hierarchy of RTTI_BINFO on reaching
1765 2001-06-13 Mark Mitchell <mark@codesourcery.com>
1767 * NEWS: Update release number.
1769 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
1771 PR c++/3130, c++/3131, c++/3132
1772 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
1773 * class.c (force_canonical_binfo_r): Move
1774 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
1775 virtual bases unless they're primary and what they're primary
1777 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
1778 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
1779 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
1781 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
1782 (layout_nonempty_base_or_field): Add most derived type
1784 (layout_empty_base): Likewise.
1785 (build_base_field): Likewise.
1786 (build_base_fields): Likewise.
1787 (propagate_binfo_offsets): Add most derived type
1788 parameter. Skip non canonical virtual bases too.
1789 (dfs_set_offset_for_unshared_vbases): Don't skip primary
1790 bases. Do skip canonical bases.
1791 (layout_virtual_bases): Adjust.
1792 (layout_class_type): Adjust.
1793 (dfs_get_primary_binfo): Build list of virtual primary base
1795 (get_primary_binfo): Check that the shared virtual primary
1796 base candidate was found first.
1797 (accumulate_vtbl_inits): Don't do anything for non-vptr
1798 containing binfos. For case 1 primary virtual bases, keep
1799 checking that we've not emerged from the hierarchy of RTTI_BINFO.
1801 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
1804 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
1805 hierarchy looking for primary bases for a ctor
1806 vtable. Recursively call oneself, if we meet our primary via
1807 this route and haven't met it yet via inheritance graph order.
1809 2001-06-11 Mark Mitchell <mark@codesourcery.com>
1811 * lang-options.h: Emit documentation for -fno-honor-std, not
1814 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
1816 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
1817 Don't clobber delta.
1818 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
1820 2001-06-10 Mark Mitchell <mark@codesourcery.com>
1821 Gabriel Dos Reis <gdr@codesourcery.com>
1823 * Make-lang.in (cp/call.o): Depend on diagnostic.h
1824 (cp/typeck.o): Depend on diagnostic.h
1825 (cp/typeck2.o): Depend on diagnostic.h
1826 (cp/repo.o): Depend on dignostic.h
1827 * typeck.c: #include diagnostic.h
1828 (convert_for_initialization): Remove extern declaration for
1829 warningcount and errorcount.
1831 * call.c: #include diagnostic.h
1832 (convert_like_real): Remove extern declaration for warnincount and
1835 * repo.c: #include diagnostic.h
1836 * typeck2.c: #include diagnostic.h
1838 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
1840 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
1843 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
1846 * friend.c (do_friend): Use push_decl_namespace for classes at
1849 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
1850 Jason Merrill <jason_merrill@redhat.com>
1853 * class.c (build_secondary_vtable): Use assert, rather than an error
1855 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
1856 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
1857 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
1858 Don't set BINFO_VTABLE for a primary virtual base.
1860 2001-06-07 Mark Mitchell <mark@codesourcery.com>
1862 * decl.c (duplicate_decls): Update source position information
1863 when a template function is defined.
1865 2001-06-07 Phil Edwards <pme@sources.redhat.com>
1867 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
1869 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
1872 * decl.c (pushtag): Don't push into a complete type's scope.
1874 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
1876 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
1877 (struct lang_decl_flags): Lose generate_with_vtable_p.
1878 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
1879 * class.c (copy_virtuals): Adjust.
1880 * decl2.c (mark_vtable_entries): Adjust.
1881 * method.c (make_thunk, build_vtable_entry): Adjust.
1882 * class.c (update_vtable_entry_for_fn): Only look as far as the
1883 first defining class.
1884 (build_vtbl_initializer): Put nothing in the slot for a function only
1885 defined in a lost primary virtual base.
1886 (add_vcall_offset_vtbl_entries_1): Use the same code for
1887 the lost primary case and the normal case.
1888 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
1889 (get_vfield_offset, get_derived_offset): Lose.
1890 (dfs_find_final_overrider): Use look_for_overrides_here.
1891 (get_matching_virtual): New fn.
1892 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
1894 * search.c (look_for_overrides_here): Split out from...
1895 (look_for_overrides_r): Here.
1897 * class.c (find_final_overrider): Return error_mark_node on error.
1899 * decl2.c (key_method): #if 0 accidental change.
1901 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
1903 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
1904 (build_over_call): Likewise.
1905 * decl.c (grokparms): Likewise.
1906 * pt.c (tsubst_decl): Likewise.
1907 * typeck.c (convert_arguments): Likewise.
1909 2001-06-05 Mark Mitchell <mark@codesourcery.com>
1911 * semantics.c (begin_class_definition): Robustify.
1913 * pt.c (instantiate_decl): Tell the repository code about the
1914 clones, not the cloned functions.
1915 * repo.c (repo_template_used): Explicitly instantiate the cloned
1916 function, not the clones.
1918 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
1920 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
1921 ICS_BAD_FLAG on created conversion.
1922 (compare_ics): Break out rank.
1924 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
1926 * decl.c (xref_tag): Remove extraneous %s on dependent name
1929 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
1931 * class.c (layout_vtable_decl): Fix off by one error on
1933 (build_vtt): Likewise.
1934 (build_ctor_vtbl_group): Likewise.
1936 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
1938 * class.c (maybe_indent_hierarchy): New function.
1939 (dump_class_hierarchy_r): Add flags. Dump extra binfo
1940 information, if enabled. Use maybe_indent_hierarchy. Adjust
1942 (dump_class_hierarchy): Adjust prototype. Adjust output format.
1943 (dump_array, dump_vtable, dump_vtt): New functions.
1944 (finish_struct_1): Adjust hierarchy dumping.
1945 (initialize_vtable): Call dump_vtable.
1946 (build_vtt): Call dump_vtt.
1947 (build_ctor_vtbl_group): Call dump_vtable.
1948 * decl2.c (flag_dump_class_layout): Remove.
1949 (cxx_decode_option): Remove dump translation unit
1950 and dump class hierarchy check. Call dump_switch_p.
1951 (finish_file): Adjust dumping.
1952 (dump.c): Only dump base classes if not TDF_SLIM.
1953 Only dump namespace members if not TDF_SLIM.
1954 * optimize.c (dump_function): New function.
1955 (optimize_function): Call dump_function.
1956 * semantics.c (expand_body): Use dump_enabled_p.
1958 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
1961 Part missed from first commit
1962 * decl2.c (finish_anon_union): Copy context.
1964 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
1967 * optimize.c (remap_decl): Remap anonymous aggregate members too.
1969 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
1972 * semantics.c (expand_body): Don't optimize thunks.
1974 2001-05-25 Sam TH <sam@uchicago.edu>
1976 * cp-tree.h lex.h: Fix header include guards.
1978 2001-05-25 Mark Mitchell <mark@codesourcery.com>
1980 * decl.c (init_decl_processing): Tweak.
1982 2001-05-24 Mark Mitchell <mark@codesourcery.com>
1984 * decl.c (duplicate_decls): Tidy.
1985 (init_decl_processing): Always set flag_no_builtin.
1987 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
1990 * decl2.c (do_local_using_decl): Push the decls, even in a
1993 2001-05-22 Mark Mitchell <mark@codesourcery.com>
1995 * optimize.c (initialize_inlined_parameters): Don't set
1996 TREE_READONLY for a VAR_DECL taking the place of an inlined
1999 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
2001 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
2002 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
2005 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
2007 * parse.y: Refer to compound literals as such, not as
2008 constructor-expressions.
2010 2001-05-21 Mark Mitchell <mark@codesourcery.com>
2012 * call.c (build_op_delete_call): Ignore exception-specifications
2013 when looking for matching delete operators.
2014 * init.c (build_new_1): Compute whether or not the allocation
2015 function used is a placement allocation function or not, and
2016 communicate this information to build_op_delete_call.
2018 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
2020 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
2021 (build_vtbl_ref): Adjust.
2022 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
2023 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
2025 (unsupported_options): Correspondingly.
2027 * decl2.c (maybe_make_one_only): Check flag_weak, not
2028 supports_one_only().
2030 * cp-tree.def (START_CATCH_STMT): Lose.
2031 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
2032 * tree.c (cp_statement_code_p): Don't case it.
2033 * semantics.c (cp_expand_stmt): Likewise.
2034 * cp-tree.h (START_CATCH_TYPE): Lose.
2035 (HANDLER_TYPE): New.
2036 * except.c (expand_start_catch_block): Don't start any blocks.
2038 (expand_end_catch_block): Don't end any blocks.
2039 * parse.y (handler): Don't pass anything from finish_handler_parms
2041 * pt.c (tsubst_expr): Likewise.
2042 * semantics.c (begin_handler): Call note_level_for_catch here.
2043 (finish_handler_parms): Don't return anything.
2044 (genrtl_catch_block, begin_catch_block): Lose.
2045 (genrtl_handler): Call expand_start_catch here.
2047 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
2049 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
2050 (get_vtable_decl, build_vtt): Not here.
2052 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
2055 * optimize.c (update_cloned_parm): Copy addressability and other
2058 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2060 * pt.c (determine_specialization): Ignore artificial functions.
2062 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
2064 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
2065 (C_RID_CODE): Remove.
2066 * lex.c (cxx_init_options): Call set_identifier_size. Update.
2067 (init_parse): Don't do it here.
2069 2001-05-18 Diego Novillo <dnovillo@redhat.com>
2071 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
2072 function declaration to avoid stripping the symbol's attributes.
2074 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
2076 * decl.c (pushdecl): Adjust error string.
2077 (xref_tag): Adjust friend class injection warning. Remove the
2078 inherited name from the class shadowed scope.
2080 2001-05-17 Mark Mitchell <mark@codesourcery.com>
2082 * except.c (cp_protect_cleanup_actions): New function.
2083 (init_exception_processing): Don't set protect_cleanup_actions
2084 here. Do set lang_protect_cleanup_actions.
2086 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
2088 * spew.c (read_token): Call yyerror on all unexpected tokens.
2090 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
2092 * init.c (member_init_ok_or_else): Take a tree rather than
2094 (expand_member_init): Adjust.
2096 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
2098 * decl.c (duplicate_decls): Suppress warning about duplicate
2099 decls if the first decl is a friend.
2101 2001-05-12 Zack Weinberg <zackw@stanford.edu>
2103 * except.c (choose_personality_routine): Export. Add
2104 explanatory comment. Take an enum languages, not a boolean.
2105 (initialize_handler_parm): Adjust to match.
2106 * cp-tree.h: Prototype choose_personality_routine.
2107 * lex.c (handle_pragma_java_exceptions): New function.
2108 (init_cp_pragma): Register #pragma GCC java_exceptions.
2110 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
2112 * method.c (build_mangled_C99_name): Remove unused prototype.
2114 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
2116 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
2117 * typeck.c (get_member_function_from_ptrfunc,
2118 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
2119 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
2121 Reverted Geoff Keating's 2001-05-03's patch.
2123 2001-05-11 Ira Ruben <ira@apple.com>
2125 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
2127 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
2129 * cp-tree.h (finish_label_expr, lookup_label): Delete.
2130 * parse.y: Update for '&&'; don't issue warning here.
2131 * semantics.c (finish_label_expr): Delete.
2133 2001-05-07 Mark Mitchell <mark@codesourcery.com>
2135 * splay-tree.h (splay_tree_max): New function.
2136 (splay_tree_min): Likewise.
2138 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
2140 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
2141 (pfn_vflag_identifier): Define.
2142 Update comment about layout of pointer functions.
2143 (build_ptrmemfunc1): Update prototype.
2144 (expand_ptrmemfunc_cst): Update prototype.
2145 * decl.c (initialize_predefined_identifiers): Initialize
2146 pfn_vflag_identifier.
2147 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
2148 an extra field to the type.
2149 * expr.c (cplus_expand_constant): Pass 'flag' between
2150 expand_ptrmemfunc_cst and build_ptrmemfunc1.
2151 * typeck.c (get_member_function_from_ptrfunc): When
2152 FUNCTION_BOUNDARY < 16, look at additional field to determine
2153 if a pointer-to-member is a real pointer or a vtable offset.
2154 (build_ptrmemfunc1): Add new parameter to contain extra field.
2155 (build_ptrmemfunc): Pass the extra field around.
2156 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
2157 (pfn_from_ptrmemfunc): Ignore the extra field.
2159 2001-05-03 Mark Mitchell <mark@codesourcery.com>
2161 * cp-tree.h (flag_inline_trees): Update documentation.
2162 * decl.c (init_decl_processing): Adjust handling of
2163 flag_inline_functions and flag_inline_trees to support -O3.
2164 (grokfndecl): Set DECL_INLINE on all functions if that's what
2166 (save_function_data): Clear DECL_INLINE in
2167 current_function_cannot_inline is non-NULL.
2168 * decl2.c (flag_inline_trees): Update documentation.
2170 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
2172 * dump.c (cp_dump_tree, USING_STMT case): New case.
2173 * tree.c (cp_statement_code_p): Add USING_STMT.
2174 * decl2.c (do_using_directive): Add the using directive statement.
2176 * tree.c (walk_tree): Reformat an if block.
2178 2001-05-02 Mark Mitchell <mark@codesourcery.com>
2180 * decl.c (compute_array_index_type): Don't try to do anything with
2181 the indices when processing a template.
2183 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2185 * call.c: NULL_PTR -> NULL.
2186 * class.c: Likewise.
2189 * decl2.c: Likewise.
2190 * except.c: Likewise.
2193 * search.c: Likewise.
2195 * typeck.c: Likewise.
2196 * typeck2.c: Likewise.
2198 2001-05-02 Mark Mitchell <mark@codesourcery.com>
2200 * decl2.c (do_using_directive): Revert previous patch.
2202 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
2204 * cp-tree.def (USING_STMT): New statement node.
2205 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
2206 * decl2.c (do_using_directive): Add USING_STMT to statement
2207 tree. Don't emit errors when processing template decl.
2208 * pt.c (tsubst_expr, USING_STMT case): New case.
2209 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
2211 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
2213 * call.c (build_new_op): Convert args from reference here.
2214 (build_conditional_expr): Don't convert here.
2216 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
2218 * spew.c (last_token_id): New static variable.
2219 (read_token): Set it here.
2220 (yyerror): Use it here.
2222 2001-04-30 Richard Henderson <rth@redhat.com>
2224 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
2227 2001-04-30 Mark Mitchell <mark@codesourcery.com>
2229 * gxxint.texi: Remove.
2230 * Make-lang.in: Remove all traces of gxxint.texi.
2232 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
2234 * decl2.c (start_static_initialization_or_destruction): Correct
2235 logic to handle the -fno-use-cxa-atexit case.
2237 2001-04-30 Mark Mitchell <mark@codesourcery.com>
2239 * optimize.c (update_cloned_parm): New function.
2240 (maybe_clone_body): Use it. Update the `this' parameter too.
2242 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
2244 * decl2.c (unsupported_options): Add new-abi.
2245 * lang-options.h: Remove no longer supported options.
2247 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
2249 * except.c (can_convert_eh): Don't check template parms,
2252 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
2254 * optimize.c (maybe_clone_body): Copy parameter names and locations.
2256 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
2258 * cp-tree.h (adjust_clone_args): Prototype new function.
2259 * class.c (adjust_clone_args): New function.
2260 * decl.c (start_function): Call it for in charge ctors.
2262 2001-04-26 Mark Mitchell <mark@codesourcery.com>
2264 * method.c (use_thunk): Make sure that thunks really are emitted
2267 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
2269 * mangle.c (write_chars): New macro.
2270 (hwint_to_ascii): New function
2271 (write_number): Use it.
2272 (write_integer_cst): Deal with really big numbers.
2274 2001-04-25 Mark Mitchell <mark@codesourcery.com>
2276 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
2279 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
2281 * decl.c (grokdeclarator): Set context of namespace scope
2284 2001-04-24 Zack Weinberg <zackw@stanford.edu>
2286 * cp/optimize.c: Include hashtab.h.
2287 (struct inline_data): Add tree_pruner.
2288 (expand_call_inline, expand_calls_inline): Use it when calling
2290 (optimize_function): Initialize and free tree_pruner.
2292 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
2294 Lazy __FUNCTION__ generation.
2295 * cp-tree.def (FUNCTION_NAME): Remove.
2296 * cp-tree.h (function_name_declared_p): Remove.
2297 (cp_fname_init): Prototype.
2298 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
2299 don't call declare_function_name. Call start_fname_decls.
2300 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
2301 clobber the line number.
2302 (cp_fname_init): New function.
2303 (start_function): Call start_fname_decls.
2304 (finish_function): Call finish_fname_decls.
2305 * lex.c (reswords): Add slots for __FUNCTION__ et al.
2306 (rid_to_yy): Add mappings for __FUNCTION__ et al.
2307 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
2308 * parse.y (VAR_FUNC_NAME): New token.
2309 (primary): Add VAR_FUNC_NAME.
2310 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
2312 (tsubst, FUNCTION_NAME case): Remove.
2313 (tsubst_copy, FUNCTION_NAME case): Remove.
2314 (tsubst_expr, DECL_STMT case): Be careful with a
2315 DECL_PRETTY_FUNCTION_P.
2316 (instantiate_decl): Remove function_name_declared_p.
2317 * semantics.c (begin_compound_statement): Don't call
2318 declare_function_name here.
2319 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
2320 (finish_translation_unit): Call finish_fname_decls.
2321 (expand_body): Remove function_name_declared_p.
2322 * typeck2.c (digest_init): Allow any ERROR_MARK.
2324 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
2326 * pt.c (tsubst_decl): Use VOID_TYPE_P.
2327 * semantics.c: Fix some typos.
2329 2001-04-23 Phil Edwards <pme@sources.redhat.com>
2331 * cp/decl2.c (flag_honor_std): Always initialize to 1.
2333 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2335 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
2337 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
2339 * except.c (build_throw): Wrap the initialization of the exception
2340 object in a MUST_NOT_THROW_EXPR.
2341 (do_free_exception): #if 0.
2343 2001-04-20 Mark Mitchell <mark@codesourcery.com>
2345 * cp-tree.h (finish_enum): Change prototype.
2346 * decl.c (finish_enum): Reorganize.
2347 * parse.y (structsp): Adjust calls to finish_enum.
2349 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
2351 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
2354 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
2356 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
2357 (layout_empty_base): Return at end flag.
2358 (build_base_field): Likewise.
2359 (build_base_fields): Likewise.
2360 (layout_virtual_bases): Don't add 1 to eoc value.
2361 (end_of_class): Use full size for empty bases.
2362 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
2363 empty bases. Don't add 1 to eoc value. Only add trailing padding
2364 if we're an empty class with no empty bases.
2365 (dump_class_hierarchy): Dump size and alignment.
2367 2001-04-20 Jakub Jelinek <jakub@redhat.com>
2369 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
2372 2001-04-20 Jakub Jelinek <jakub@redhat.com>
2374 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
2375 is found, look first if name does not match the structure name.
2377 2001-04-19 Mark Mitchell <mark@codesourcery.com>
2379 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
2381 (SET_DECL_LANGUAGE): New macro.
2382 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
2383 (pushdecl): Likewise.
2384 (build_library_fn_1): Likewise.
2385 (build_cp_library_fn): Likewise.
2386 (grokfndecl): Likewise.
2387 (grokvardecl): Mark `extern "C"' variables as having C linkage.
2388 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
2389 * lex.c (retrofit_lang_decl): Likewise.
2390 * mangle.c (mangle_decl_string): Don't mangle the names of
2391 variables declared with C language linkage.
2392 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
2394 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
2396 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
2397 flag_access_control from uninitialized storage.
2399 2001-04-15 Mark Mitchell <mark@codesourcery.com>
2401 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
2402 * mangle.c (write_pointer_to_member_type): Fix mangling of
2403 pointers to cv-qualified member function types.
2405 * init.c (build_delete): Create a SAVE_EXPR for the address if
2406 we're going to use it more than once.
2408 2001-04-13 Mark Mitchell <mark@codesourcery.com>
2410 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
2411 (expand_ptremfunc_cst): Change prototype.
2412 (delta2_from_ptrmemfunc): Remove.
2413 * expr.c (cplus_expand_constant): Adjust call to
2414 expand_ptrmemfunc_cst.
2415 * typeck.c (build_ptrmemfunc1): Simplify.
2416 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
2417 results in a constant.
2418 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
2419 (delta2_from_ptrmemfunc): Remove.
2420 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
2422 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
2424 * cp-tree.h (decl_namespace_list): New macro.
2425 (struct saved_scope): Add decl_ns_list.
2426 * decl.c (mark_saved_scope): Mark it.
2427 * decl2.c: Lose static decl_namespace_list.
2428 (init_decl2): Don't save it.
2430 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2432 * cp-tree.h (warn_return_type, yylex): Delete redundant
2435 * decl.c (current_class_depth, global_namespace): Likewise.
2437 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
2439 * repo.c (flag_use_repository): Likewise.
2441 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2443 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
2444 set_block, pushdecl, getdecls, gettags, init_decl_processing,
2445 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
2446 lvalue_or_else, print_lang_statistics, comp_target_types,
2447 unsigned_type, signed_type, signed_or_unsigned_type,
2448 build_function_call, mark_addressable, incomplete_type_error):
2449 Delete redundant declarations.
2451 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
2453 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
2454 (TYPE_ANONYMOUS_P): New macro.
2455 (TAGGED_TYPE_P): New macro.
2456 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
2457 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
2458 * tree.c (no_linkage_helper): Likewise.
2459 * semantics.c (begin_class_definition): Likewise.
2460 * pt.c (convert_template_argument): Likewise.
2461 * lex.c (check_for_missing_semicolon): Likewise.
2463 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
2465 * class.c (dfs_unshared_virtual_bases): New function.
2466 (mark_primary_bases): Call it.
2467 (check_bases): Ignore virtual bases when determining
2470 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
2472 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
2474 2001-04-11 Mark Mitchell <mark@codesourcery.com>
2476 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
2477 cloned function to the clone.
2479 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2481 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
2483 * semantics.c: Include expr.h.
2485 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
2487 * method.c (implicitly_declare_fn): Commonize code for copy ctor
2488 and assignment op. Set TREE_USED for parameter.
2490 2001-04-10 Mark Mitchell <mark@codesourcery.com>
2492 * class.c (find_final_overrider_data): Add `candidates'.
2493 (dfs_find_final_overrider): Don't issue error messages
2495 (find_final_overrider): Issue error messages here.
2496 (build_base_field): Don't warn about amgibuous direct bases here.
2497 (warn_about_ambiguous_direct_bases): New function.
2498 (layout_class_type): Use it.
2500 2001-04-10 Richard Henderson <rth@redhat.com>
2502 * typeck.c (build_array_ref): Push the array reference inside
2503 COMPOUND_EXPR and COND_EXPR.
2505 2001-04-05 Mark Mitchell <mark@codesourcery.com>
2507 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
2508 * decl.c (duplicate_decls): Adjust accordingly.
2509 (maybe_commonize_var): Likewise.
2510 (grokfndecl): Likewise.
2511 (start_function): Likewise.
2512 (start_method): Likewise.
2513 * decl2.c (key_method): Likewise.
2514 (import_export_decl): Likewise.
2515 * method.c (implicitly_declare_fn): Likewise.
2516 * optimize.c (maybe_clone_body): Likewise.
2518 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
2520 * lang-specs.h: Add __DEPRECATED.
2522 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
2524 * search.c (get_dynamic_cast_base_type): When building a new
2525 constant, set its type to ssizetype.
2527 2001-04-04 Jakub Jelinek <jakub@redhat.com>
2529 * optimize.c (expand_call_inline): Only add newly inlined statements
2532 2001-04-03 Mark Mitchell <mark@codesourcery.com>
2534 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
2535 (OPERATOR_FORMAT): Likewise.
2536 (OPERATOR_TYPENAME_FORMAT): Likewise.
2537 * operators.def: Remove old name-mangling information.
2538 * decl.c (grok_op_properties): Adjust accordingly.
2539 * lex.c (init_operators): Likewise.
2540 * rtti.c (get_tinfo_decl): Issue error messages about types that
2543 2001-04-03 Mark Mitchell <mark@codesourcery.com>
2545 * decl2.c (import_export_decl): Don't call import_export_class
2546 when processing an inline member function.
2547 * semantics.c (expand_body): Call import_export_decl before
2548 emitting inline functions.
2550 2001-03-28 Richard Henderson <rth@redhat.com>
2552 IA-64 ABI Exception Handling:
2553 * cp-tree.def (EH_SPEC_BLOCK): New.
2554 (MUST_NOT_THROW_EXPR): New.
2555 * cp-tree.h: Update changed function declarations.
2556 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
2557 (CPTI_CALL_UNEXPECTED): New.
2558 (struct cp_language_function): Rename x_eh_spec_try_block
2560 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
2561 * decl.c (current_binding_level): If no current function
2562 bindings, revert to scope_chain.
2563 (initialize_predefined_identifiers): Remove __cp_push_exception.
2564 (store_parm_decls): Use begin_eh_spec_block.
2565 (finish_function): Use finish_eh_spec_block.
2566 (mark_lang_function): Update for name changes.
2567 * decl2.c (finish_file): No mark_all_runtime_matches.
2568 * dump.c (cp_dump_tree): Handle new tree codes.
2569 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
2570 * except.c (catch_language_init, catch_language): Remove.
2571 (init_exception_processing): Don't set language code.
2572 Initialize call_unexpected_node, protect_cleanup_actions,
2573 eh_personality_libfunc, lang_eh_runtime_type.
2574 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
2575 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
2576 (prepare_eh_type): Split out type canonicalizations ...
2577 (build_eh_type_type): ... from here.
2578 (build_eh_type_type_ref): Remove.
2579 (mark_all_runtime_matches): Remove.
2580 (build_exc_ptr): New.
2581 (do_begin_catch, do_end_catch): New.
2582 (do_pop_exception): Remove.
2583 (build_terminate_handler): Remove.
2584 (choose_personality_routine): Split out language choice from ...
2585 (initialize_handler_parm): ... here.
2586 Use MUST_NOT_THROW_EXPR.
2587 (expand_start_catch_block): Use do_begin_catch. Simplify Java
2588 exception object handling.
2589 (expand_start_eh_spec, expand_end_eh_spec): Remove.
2590 (expand_exception_blocks, alloc_eh_object): Remove.
2591 (begin_eh_spec_block, finish_eh_spec_block): New.
2592 (do_allocate_exception, do_free_exception): New.
2593 (expand_throw): Merge into ...
2594 (build_throw): ... here. Update for abi.
2595 * expr.c (cplus_expand_expr): No expand_internal_throw.
2596 Handle MUST_NOT_THROW_EXPR.
2597 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
2598 * semantics.c (*) Update for except.h name changes.
2599 (genrtl_try_block): No protect_with_terminate.
2600 (genrtl_eh_spec_block): New.
2601 (genrtl_handler): Don't emit the goto here.
2602 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
2603 (genrtl_finish_function): Don't expand_exception_blocks.
2604 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
2606 2001-03-28 Richard Henderson <rth@redhat.com>
2608 * decl.c (struct named_label_list): Rename eh_region to
2609 in_try_scope, add in_catch_scope.
2610 (struct binding_level): Rename eh_region to is_try_scope,
2612 (note_level_for_try): Rename from note_level_for_eh.
2613 (note_level_for_catch): New.
2614 (poplevel): Copy both is_try_scope and is_catch_scope to
2615 the named_label_list struct.
2616 (check_previous_goto_1): Don't check for catch block via
2617 DECL_ARTIFICIAL; use in_try_scope instead.
2618 (check_goto): Likewise.
2619 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
2620 * except.c (expand_start_catch_block): Call note_level_for_catch.
2621 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
2623 2001-03-27 Richard Henderson <rth@redhat.com>
2625 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
2626 exceptions_via_longjmp.
2628 2001-03-27 Phil Edwards <pme@sources.redhat.com>
2630 * pt.c (check_default_tmpl_args): Make error messages clearer.
2632 2001-03-26 Phil Edwards <pme@sources.redhat.com>
2634 * error.c: Also undefine 'A' macro used for cp_printers definition.
2636 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2638 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
2640 2001-03-26 Mike Yang <yang@research.att.com>
2641 Mark Mitchell <mark@codesourcery.com>
2643 * dump.c (dump_access): New function.
2644 (cp_dump_tree): Use it. Dump basetype information for class
2647 2001-03-26 Mark Mitchell <mark@codesourcery.com>
2649 * Makefile.in (optimize.o): Depend on params.h.
2650 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
2651 (init_decl_processing): Set flag_no_inline when doing
2653 * optimize.c: Include params.h.
2654 (struct inline_data): Improve documentation of FNS. Add
2655 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
2656 (INSNS_PER_STMT): New macro.
2657 (remap_block): Use CLONING_P.
2658 (inlinable_function_p): Don't inline big functions.
2659 (expand_call_inline): Keep track of how much inlining we've done.
2660 (optimize_function): Set FIRST_INLINED_FN.
2661 (maybe_clone_body): Set CLONING_P.
2662 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
2664 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
2665 rest_of_compilation. Clear DECL_RTL for local variables
2667 (clear_decl_rtl): New function.
2669 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
2672 * cp-tree.h (skip_type_access_control,
2673 reset_type_access_control): Prototype.
2674 * decl.c (grokdeclarator): Access of friends is not checked.
2675 * parse.y (component_decl_list): Reset type access control.
2676 * semantics.c (decl_type_access_control): Clear
2677 current_type_lookups.
2678 (save_type_access_control): Don't save if not deferring.
2679 (skip_type_access_control, reset_type_access_control): New
2681 (begin_class_definition): Do type access control for basetypes.
2682 Start deferred access control.
2683 (finish_class_definition): Resume immediate access control if
2684 this is a local class.
2686 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2688 * class.c (add_method): Use memcpy/memmove, not bcopy.
2690 * decl.c (duplicate_decls): Likewise.
2692 2001-03-23 Jakub Jelinek <jakub@redhat.com>
2694 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
2697 2001-03-23 Jakub Jelinek <jakub@redhat.com>
2699 * decl.c (local_names): Define.
2700 (push_local_name): New.
2701 (grok_reference_init): Return init if initializing static reference
2702 variable with non-constant instead of emitting it.
2703 Move expand_static_init call to cp_finish_decl.
2704 (layout_var_decl): Call push_local_name.
2705 (maybe_commonize_var): Allow inlining functions even if they have
2706 static local variables, use comdat_linkage for them if flag_weak.
2707 (check_initializer): Call obscure_complex_init if
2708 grok_reference_init returned non-zero.
2709 (save_function_data): Clear x_local_names.
2710 (pop_cp_function_context): Free x_local_names.
2711 (mark_inlined_fns): Remove.
2712 (mark_lang_function): Mark x_local_names.
2713 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
2714 Mark inlined_fns as tree, remove call to mark_inlined_fns.
2715 * class.c (alter_access): Ensure DECL_ACCESS is never set if
2716 DECL_DISCRIMINATOR_P.
2717 * cp-tree.h (cp_language_function): Add x_local_names.
2718 (lang_decl_flags): Add discriminator into u2.
2719 (lang_decl_inlined_fns): Remove.
2720 (lang_decl): inlined_fns is now a TREE_VEC.
2721 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
2722 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
2723 TREE_VEC, not a custom structure.
2724 (optimize_function): Likewise.
2725 * mangle.c (discriminator_for_local_entity): Discriminate among
2726 VAR_DECL local entities.
2727 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
2730 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
2732 Add support for Java interface method calls.
2733 * cp-tree.h (struct lang_type): Add java_interface flag.
2734 (TYPE_JAVA_INTERFACE): New macro.
2735 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
2736 by setting TYPE_JAVA_INTERFACE.
2737 * call.c (java_iface_lookup_fn): New static.
2738 (build_over_call): If calling a method declared in a
2739 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
2740 expression which resolves the function address.
2741 (build_java_interface_fn_ref): New function.
2743 2001-03-22 Richard Henderson <rth@redhat.com>
2745 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
2746 * except.c: Don't include it.
2748 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
2749 based on an idea from Joe Buck <jbuck@synopsys.com>
2751 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
2753 (data_def, component_decl): Add reductions to bad_decl.
2755 2001-03-22 Jakub Jelinek <jakub@redhat.com>
2757 * method.c (do_build_assign_ref): Don't use build_modify_expr for
2758 anonymous aggregates, since they don't have assignment operator
2760 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
2761 assignment operators for anonymous structure fields.
2763 2001-03-21 Jason Merrill <jason@redhat.com>
2765 * pt.c (instantiate_decl): Abort if we see a member constant
2766 instantiation that doesn't already have its initializer.
2767 Downgrade explicit instantiation without definition to pedwarn.
2769 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
2770 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
2771 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
2773 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
2774 (pending_vtables): Remove.
2775 * decl2.c (pending_vtables): Remove.
2776 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
2777 CLASSTYPE_VTABLE_NEEDS_WRITING.
2778 (import_export_class): Likewise.
2779 (init_decl2): Don't mark pending_vtables.
2780 * lex.c (handle_pragma_vtable): Just sorry.
2781 * pt.c (instantiate_class_template): Don't mess with
2782 CLASSTYPE_VTABLE_NEEDS_WRITING.
2783 (mark_class_instantiated): Likewise.
2784 * ptree.c (print_lang_type): Don't print it.
2785 * semantics.c (begin_class_definition): Don't set it.
2787 * pt.c (template_tail): Replace with last_pending_template.
2788 (maybe_templates, maybe_template_tail): Remove.
2789 (add_pending_template): Adjust.
2790 (instantiate_pending_templates): Adjust.
2792 * cp-tree.h (struct saved_scope): Remove lang_stack field.
2793 (current_lang_stack): Remove.
2794 * decl.c (maybe_push_to_top_level): Don't initialize it.
2795 (duplicate_decls): Use current_lang_depth.
2796 (xref_basetypes): Likewise.
2797 * class.c (current_lang_depth): New fn.
2798 (push_lang_context): Use more varray functionality.
2799 (pop_lang_context): Likewise.
2801 * error.c (GLOBAL_THING): Always use '__'.
2803 2001-03-21 Mark Mitchell <mark@codesourcery.com>
2805 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
2807 * mangle.c (mangle_decl_string): Mangle the names of overloaded
2808 operators, even when they have `extern "C"' linkage.
2810 2001-03-19 Mark Mitchell <mark@codesourcery.com>
2812 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
2813 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
2814 where it's not necessary.
2815 (add_method): Remove optimization involving comparison of
2816 DECL_ASSEMBLER_NAME.
2817 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
2818 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
2819 where it's not necessary.
2820 (check_methods): Likewise.
2821 (build_clone): Likewise.
2822 (built_vtt): Likewise.
2823 * cp-tree.h (DECL_NEEDED_P): Likewise.
2824 * decl.c (pushtag): Likewise.
2825 (duplicate_decls): Likewise.
2826 (pushdecl): Likewise.
2827 (builtin_function): Likewise.
2828 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
2829 (build_cp_library_fn): Likewise.
2830 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
2831 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
2832 where it's not necessary.
2833 (make_rtl_for_nonlocal_decl): Likewise.
2834 (cp_finish_decl): Likewise.
2835 (grokfndecl): Likewise.
2836 (grokvardecl): Likewise.
2837 (grokdeclarator): Likewise.
2838 (start_function): Likewise.
2839 (cp_missing_return_ok_p): Likewise.
2840 * decl2.c (grokclassfn): Likewise.
2841 (check_classfn): Likewise.
2842 (finish_static_data_member_decl): Likewise.
2843 (grokfield): Likewise.
2844 * error.c (GLOBAL_IORD_P): Remove.
2845 (dump_global_iord): Improve output.
2846 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
2847 * except.c (nothrow_libfn_p): Summarily reject any function not in
2849 * init.c (build_java_class_ref): Don't explicitly set
2850 DECL_ASSEMBLER_NAME after calling mangle_decl.
2851 * mangle.c (mangle_decl_string): Handle extern "C" functions.
2852 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
2853 * method.c (set_mangled_name_for_decl): Don't explicitly set
2854 DECL_ASSEMBLER_NAME after calling mangle_decl.
2855 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
2856 IDENTIFIER_GLOBAL_VALUE for the thunk.
2857 * pt.c (set_mangled_name_for_template_decl): Remove.
2858 (check_explicit_specialization): Don't use it.
2859 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
2860 (tsubst_friend_function): Likewise.
2861 (tsubst_decl): Likewise.
2862 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
2863 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
2864 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
2865 where it's not necessary.
2866 (tinfo_base_init): Likewise.
2867 (create_real_tinfo_var): Likewise.
2868 * search.c (looup_field_1): Likewise.
2869 * semantics.c (finish_named_return_value): Likewise.
2870 * tree.c (init_tree): Set lang_set_decl_assembler_name.
2872 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
2874 Correct semantics restrictions checking in throw-expression.
2875 * except.c (is_admissible_throw_operand): New function.
2876 (build_throw): Use it.
2878 2001-03-14 Mark Mitchell <mark@codesourcery.com>
2880 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
2883 2001-03-14 Mark Mitchell <mark@codesourcery.com>
2885 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
2886 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
2887 * decl.c (duplicate_decls): Likewise.
2888 (builtin_function): Likewise.
2889 (build_library_fn): Likewise.
2890 (build_cp_library_fn): Likewise.
2891 (check_initializer): Likewise.
2892 (cp_finish_decl): Likewise.
2893 * decl2.c (grokfield): Likewise.
2894 (grok_function_init): Remove #if 0'd code.
2895 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
2896 * friend.c (do_friend): Likewise.
2897 * init.c (get_temp_regvar): Likewise.
2898 * method.c (make_thunk): Likewise.
2899 * pt.c (tsubst_friend_function): Likewise.
2900 (tsubst_decl): Likewise.
2901 (regenerate_decl_from_template): Likewise.
2902 * semantics.c (genrtl_named_return_value): Likewise.
2903 (expand_body): Likewise.
2904 (genrtl_finish_function): Likewise.
2905 * tree.c (cp_tree_equal): Likewise.
2907 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
2909 * call.c (convert_like_real): Add extra semantics to INNER
2910 parameter. Don't convert to temporary if a user conversion
2911 gives us an lvalue that we're about to bind to a reference.
2912 Set INNER to indicate pending reference binding on recursive
2915 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
2917 * cp/lex.c: Delete duplicate pending_lang_change.
2919 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
2921 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
2923 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
2924 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
2926 2001-03-09 Zack Weinberg <zackw@stanford.edu>
2928 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
2930 2001-03-08 Stan Shebs <shebs@apple.com>
2932 * cp-tree.h (set_identifier_local_value): Remove unused decl.
2934 2001-03-06 Zack Weinberg <zackw@stanford.edu>
2936 * spew.c: Remove references to CPP_OSTRING.
2938 2001-03-06 Andrew Haley <aph@redhat.com>
2940 * typeck.c (convert_arguments): Check that we have an fndecl.
2942 2001-03-05 Andrew Haley <aph@redhat.com>
2944 * typeck.c (convert_arguments): Don't do ellipsis conversion for
2945 __built_in_constant_p.
2947 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
2949 * typeck.c (build_static_cast): Allow enum to enum conversions
2952 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
2954 * class.c (check_field_decls): Pointers to member do not a
2955 non-pod struct make, as per DR 148.
2957 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
2959 * call.c (joust): cp_pedwarn when using gnu extension concerning
2960 worst conversion sequences.
2962 2001-03-01 Zack Weinberg <zackw@stanford.edu>
2964 * decl.c: Replace all uses of 'boolean' with 'bool'.
2966 2001-03-01 Zack Weinberg <zackw@stanford.edu>
2968 * lang-specs.h: Add zero initializer for cpp_spec field to
2969 all array elements that need one. Don't put an #ifdef inside
2970 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
2973 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
2975 Implement using decls inside template functions.
2976 * decl2.c (validate_nonmember_using_decl): Don't special case
2977 fake_std_node in the global namespace. Don't reject early when
2978 processing a template.
2979 (do_local_using_decl): Add to statement tree. Don't do further
2980 processing when building a template.
2981 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
2983 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
2985 * decl2.c (do_nonmember_using_decl): Don't complain if we find
2986 same function. Do complain about ambiguating extern "C"
2989 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
2991 Remove floating point and complex type template constant parms.
2992 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
2993 COMPLEX_TYPE extensions.
2994 (invalid_nontype_parm_type_p): Likewise.
2996 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
2998 * except.c (call_eh_info): Revert "match_function"'s type.
3000 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
3002 Fix ctor vtable vcall offsets.
3003 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
3004 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
3005 (get_matching_base): Remove.
3006 (get_original_base): New function.
3007 (build_vtbl_initializer): Initialize vid.rtti_binfo.
3008 Use a virtual thunk for a ctor vtable with an index
3009 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
3010 primary base within a constructor vtable. Only set
3011 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
3012 when primary base has been lost.
3013 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
3015 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
3017 * call.c (joust): Ensure more_specialized()'s argument length
3018 parameter has correct value for constructors.
3020 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
3022 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
3024 * decl.c (mark_inlined_fns): Prototype.
3026 2001-02-22 Mark Mitchell <mark@codesourcery.com>
3028 * spew.c (yylex): Correct handling of friends.
3030 2001-02-22 Mark Mitchell <mark@codesourcery.com>
3032 * mangle.c (write_encoding): Pass write_function_type the
3033 FUNCTION_DECL for the function being encoded.
3034 (write_function_type): Pass it along to write_bare_function_type.
3035 (write_bare_function_type): Pass it along to write_method_parms.
3036 (write_method_parms): Don't mangle the compiler-generated
3037 parameters to a constructor or destructor.
3039 2001-02-22 Andreas Jaeger <aj@suse.de>
3041 * optimize.c: Include toplev.h for
3042 note_deferral_of_defined_inline_function prototype.
3044 2001-02-22 Jakub Jelinek <jakub@redhat.com>
3046 * cp-tree.h (struct lang_decl_inlined_fns): New.
3047 (struct lang_decls): Add inlined_fns.
3048 (DECL_INLINED_FNS): New macro.
3049 * optimize.c (struct inline_data): Add inlined_fns.
3050 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
3051 (inlinable_function_p): Likewise, fix typo in comment,
3052 function is not inlinable if it already inlined function currently
3054 (expand_call_inline): Add fn to inlined_fns if necessary.
3055 (optimize_function): Initialize inlined_fns.
3056 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
3057 * decl.c (mark_inlined_fns): New function.
3058 (lang_mark_tree): Call it.
3060 2001-02-21 Jason Merrill <jason@redhat.com>
3062 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
3063 (DECL_UNINLINABLE): Move to middle-end.
3065 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
3066 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
3067 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
3068 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
3069 parms and outer BLOCK. note_deferral_of_defined_inline_function.
3071 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
3074 2001-02-19 Mark Mitchell <mark@codesourcery.com>
3076 * decl2.c (set_decl_namespace): Allow explicit instantiations in
3079 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3081 * optimize.c (expand_call_inline): Don't walk subtrees of type
3084 2001-02-18 Mark Mitchell <mark@codesourcery.com>
3086 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
3089 2001-02-18 Jason Merrill <jason@redhat.com>
3091 Do put the VTT parameter in DECL_ARGUMENTS.
3092 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
3093 (current_vtt_parm): New macro.
3094 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
3095 (DECL_HAS_VTT_PARM_P): New macro.
3096 (DECL_VTT_PARM): Remove.
3097 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
3098 * decl.c (duplicate_decls): Only copy the operator code if
3100 (start_function): Set current_vtt_parm.
3101 (lang_mark_tree): Don't mark vtt_parm.
3102 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
3103 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
3104 * class.c (build_clone): Maybe remove the VTT parm.
3105 * optimize.c (maybe_clone_body): Set up the VTT parm.
3106 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
3107 * call.c (build_over_call): Just allow the VTT arg.
3108 * method.c (make_thunk): Don't set DECL_VTT_PARM.
3109 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
3110 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
3111 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
3112 * error.c (dump_function_decl): Likewise.
3113 * call.c (build_user_type_conversion_1, convert_like_real): Abort
3114 if we try to call a constructor with in-charge or VTT parms.
3115 * method.c (skip_artificial_parms_for): New fn.
3116 * call.c (add_function_candidate, build_over_call): Call it.
3117 * call.c (build_new_method_call): Use current_vtt_parm.
3118 * init.c (expand_virtual_init): Likewise.
3119 * class.c (same_signature_p): No longer static.
3120 * cp-tree.h: Declare it.
3121 * search.c (look_for_overrides_r): Use it.
3123 2001-02-17 Mark Mitchell <mark@codesourcery.com>
3125 * cp-tree.h (new_abi_rtti_p): Remove.
3126 (name_mangling_version): Likewise.
3127 (flag_do_squangling): Likewise.
3128 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
3129 * decl.c (grokfndecl): Likewise.
3130 * decl2.c (name_mangling_version): Remove.
3131 (flag_do_squangling): Likewise.
3132 (lang_f_options): Remove `squangle'.
3133 (unsupported_options): Add `squangle'.
3134 (cxx_decode_option): Issue a warning about uses of
3135 -fname-mangling-version.
3136 (finish_file): Remove old ABI support.
3137 * pt.c (check_explicit_specialization): Likewise.
3138 (tsubst_decl): Likewise.
3139 * rtti.c (init_rtti_processing): Likewise.
3140 (build_headof): Likewise.
3141 (get_tinfo_decl_dynamic): Likewise.
3142 (tinfo_from_decl): Likewise.
3143 (build_dynamic_cast_1): Likewise.
3144 (synthesize_tinfo_var): Likewise.
3145 * init.c (build_new): Allow enumeration types for the array-bounds
3146 in a direct-new-declarator.
3148 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
3150 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
3151 TREE_PROTECTED from the template being specialized.
3153 2001-02-17 Jason Merrill <jason@redhat.com>
3155 * decl2.c (build_artificial_parm): Set TREE_READONLY.
3157 * decl.c (bad_specifiers): Allow throw specs on things with
3158 pointer-to-function or -member-function type.
3159 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
3162 2001-02-17 Mark Mitchell <mark@codesourcery.com>
3164 * call.c (check_dtor_name): Handle template names correctly.
3166 2001-02-16 Jason Merrill <jason@redhat.com>
3168 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
3169 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
3170 * optimize.c (maybe_clone_body): Don't substitute it.
3171 * call.c (build_new_method_call): Check in_chrg instead.
3172 * init.c (expand_virtual_init): Likewise.
3174 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
3176 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
3177 class-type introduces at least a type-name.
3179 2001-02-16 Jakub Jelinek <jakub@redhat.com>
3181 * call.c (convert_like_real): Create a temporary for non-lvalue.
3183 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
3185 * cp-tree.h: Fix typos in comments.
3187 2001-02-16 Jason Merrill <jason@redhat.com>
3189 * optimize.c (remap_block): If we're compiling a clone, pass the
3190 new block to insert_block.
3192 2001-02-16 Mark Mitchell <mark@codesourcery.com>
3194 * semantics.c (finish_asm_stmt): Robustify.
3196 2001-02-15 Mark Mitchell <mark@codesourcery.com>
3198 * pt.c (push_template_decl_real): Don't remangle the name of a
3201 2001-02-15 Jim Meyering <meyering@lucent.com>
3203 * Make-lang.in (c++.install-common): Depend on installdirs.
3204 (c++.install-info): Likewise.
3205 (c++.install-man): Likewise.
3207 2001-02-15 Mark Mitchell <mark@codesourcery.com>
3209 * typeck2.c (build_m_component_ref): Robustify.
3211 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
3213 * friend.c (do_friend): Don't take the nested [template] class
3214 into account when deciding whether to warn about the friend
3215 function not referring to a template function.
3217 2001-02-14 Jakub Jelinek <jakub@redhat.com>
3219 * typeck.c (build_unary_op): Clarify error message.
3221 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
3223 * parse.y (component_constructor_declarator): allow optional
3224 parentheses around constructor class name.
3226 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
3228 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
3230 * init.c (emit_base_init): Remove incorrect comment about
3232 * method.c (make_thunk): Fix comment alignment.
3234 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
3236 Kill remnants of this is variable.
3237 * cp-tree.h (flag_this_is_variable): Remove.
3238 * decl2.c (flag_this_is_variable): Remove.
3239 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
3240 (build_vbase_path): The path is non-static, even in a cdtor.
3241 (resolves_to_fixed_type_p): Add additional return value.
3242 * search.c (init_vbase_pointers): Adjust.
3243 * tree.c (lvalue_p_1): Adjust.
3244 * typeck.c (mark_addressable): Adjust.
3246 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
3248 * pt.c (unify): Don't check cv quals of array types.
3250 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
3252 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
3253 check whether we already have the type.
3255 2001-02-13 Mark Mitchell <mark@codesourcery.com>
3257 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
3258 * call.c (build_op_delete_call): Simplify to remove duplicate
3260 * class.c (clone_function_decl): Don't build the deleting variant
3261 of a non-virtual destructor.
3262 * decl.c (finish_destructor_body): Don't call delete if this is a
3263 non-virtual destructor.
3264 * init.c (build_delete): Explicitly call `operator delete' when
3265 deleting an object with a non-virtual destructor.
3267 2001-02-13 Jason Merrill <jason@redhat.com>
3269 * lang-specs.h: Add more __EXCEPTIONS.
3271 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
3273 * typeck2.c (process_init_constructor): Check
3274 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
3276 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
3278 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
3279 Remove spurious information in comment. Allow further
3280 adjustments of REFERENCE_TYPE args.
3282 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
3284 * errfn.c (cp_deprecated): Tweak diagnostic text.
3285 * parse.y (new_initializer): Deprecate initializer lists
3288 2001-02-12 Mark Mitchell <mark@codesourcery.com>
3290 Remove old ABI support.
3292 2001-02-11 Mark Mitchell <mark@codesourcery.com>
3294 * decl2.c (flag_vtable_thunks): Always set it to 1.
3295 (flag_new_abi): Likewise.
3296 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
3298 * Makefile.in (g++spec.o): Fix typo.
3300 2001-02-09 Jason Merrill <jason@redhat.com>
3302 * lang-specs.h: Restore definition of __EXCEPTIONS.
3304 2001-02-08 Jason Merrill <jason@redhat.com>
3306 * search.c (shared_member_p): New function.
3307 (lookup_field_r): Use it.
3308 * cp-tree.h (SHARED_MEMBER_P): Remove.
3310 * method.c (process_overload_item): Handle template-dependent array
3312 * pt.c (type_unification_real): If we end up with undeduced nontype
3315 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
3318 * typeck2.c (friendly_abort): Don't say anything if we have
3319 earlier errors or sorries.
3321 * decl.c (check_tag_decl): Notice attempts to redefine bool and
3322 wchar_t. Ignore if in_system_header.
3324 * decl.c (maybe_push_cleanup_level): New fn...
3325 (start_decl_1): ...split out from here.
3326 * cvt.c (build_up_reference): Use it.
3327 * cp-tree.h: Declare it.
3329 2001-02-07 Mark Mitchell <mark@codesourcery.com>
3331 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
3334 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
3336 * pt.c (lookup_template_class): Make sure it's a primary
3337 template or template_template_parm when called from the parser.
3338 (instantiate_template_class): Add assertion.
3340 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
3342 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
3343 from error_mark_node.
3345 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
3347 Fix specification and implementation bugs in V3 ABI
3348 construction vtables.
3349 * cp-tree.h (flag_dump_class_layout): New flag.
3350 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
3351 (BINFO_LOST_PRIMARY_P): New flag.
3352 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
3353 (BINFO_PRIMARY_MARKED_P): Rename to ...
3354 (BINFO_PRIMARY_P): ... here.
3355 (binfo_via_virtual): New prototype.
3356 * decl2.c (flag_dump_class_layout): New flag.
3357 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
3358 use `=' as a file name separator.
3359 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
3361 (build_vtbl_address): If this is a virtual primary base, then
3362 get the vtbl of what it is ultimately primary for.
3363 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
3364 for BINFO_PRIMARY_P.
3365 (dfs_skip_nonprimary_vbases_markedp): Likewise.
3366 (get_shared_vbase_if_not_primary): Likewise.
3367 (dfs_get_pure_virtuals): Likewise.
3368 (expand_upcast_fixups): Likewise.
3369 (fixup_virtual_upcast_offsets): Likewise.
3370 (dfs_find_vbase_instance): Likewise.
3371 (find_vbase_instance): Likewise.
3372 (binfo_from_vbase): Adjust comment to reflect reality.
3373 (binfo_via_virtual): New function.
3374 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
3375 for binfo walking during VTT construction.
3376 (dfs_mark_primary_bases): Remove.
3377 (force_canonical_binfo_r): New function.
3378 (force_canonical_binfo): New function.
3379 (mark_primary_virtual_base): New function.
3380 (mark_primary_bases): Walk in inheritance graph order, use
3381 mark_primary_virtual_base.
3382 (determine_primary_base): Use some more intermediate variables.
3383 (dfs_find_final_overrider): Don't check for overriding along a
3385 (dfs_modify_vtables): Walk into primary virtual bases too.
3386 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
3387 (build_base_fields): Likewise.
3388 (dfs_set_offset_for_unshared_vbases): Likewise.
3389 (layout_virtual_bases): Likewise.
3390 (end_of_class): Likewise.
3391 (finish_struct_1): Call dump_class_hierarchy, if requested.
3392 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
3393 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
3394 (dump_class_hierarchy): Add file parameter. Append to file, if
3396 (finish_vtbls): Adjust accumulate_vtbl_inits call.
3397 Use canonical base for virtual bases.
3398 (build_vtt): Add more comments. Adjust build_vtt_inits call.
3399 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
3400 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
3401 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
3403 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
3404 from DATA. We want virtual primary bases and all bases via virtual.
3405 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
3406 virtual base when not a construction vtable.
3407 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
3408 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
3409 Use canonical bases when processing virtual bases.
3410 (accumulate_vtbl_inits): We're interested in any base via a
3412 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
3413 within a construction vtable, determine what is being overridden.
3414 (build_vtbl_initializer): Add more comments
3415 (add_vcall_offset_vtbl_entries_1): Adjust comment.
3416 (build_rtti_vtbl_entries): Check if the base has lost its
3419 2001-02-05 Mark Mitchell <mark@codesourcery.com>
3421 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
3423 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3425 * decl.c (pushdecl): Call abort instead of fatal.
3426 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
3427 * init.c (build_new_1): Likewise.
3428 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
3429 * decl.c (build_typename_type): hash_table_init now returns void.
3430 decl.c (init_decl_processing): Make an error non-fatal.
3432 2001-02-04 Mark Mitchell <mark@codesourcery.com>
3434 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
3436 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
3437 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
3438 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
3439 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
3440 * decl.c (maybe_commonize_var): Use the new name-mangling where
3442 * decl2.c (comdat_linkage): Enhance comments. Make all
3443 compiler-generated things static, if COMDAT is not available.
3444 (get_tinfo_decl): Do not make typeinfo objects that belong in the
3446 (tinfo_base_init): Use the correct mangled name for typeinfo
3447 strings, and push them into the global scope.
3448 (typeinfo_in_lib_p): New function.
3449 (synthesize_tinfo_var): Use it.
3450 (create_real_tinfo_var): Likewise.
3452 2001-02-03 Jakub Jelinek <jakub@redhat.com>
3454 * decl.c (push_class_binding): Use context_for_name_lookup instead
3456 * search.c (context_for_name_lookup): Remove static. Check for NULL
3457 context in the loop.
3458 * cp-tree.h (context_for_name_lookup): Add prototype.
3460 2001-02-02 Jakub Jelinek <jakub@redhat.com>
3462 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
3463 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
3465 * call.c (convert_class_to_reference, build_user_type_conversion_1,
3466 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
3468 2001-02-02 Mark Mitchell <mark@codesourcery.com>
3470 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
3471 of macros used when compiling g++spec.c.
3472 * g++spec.c (lang_specific_driver): Link with the shared
3475 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
3477 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
3478 make_reference_declarator, make_call_declarator), method.c
3479 (implicitly_declare_fn), parse.y (namespace_using_decl,
3480 notype_unqualified_id, expr_or_declarator, new_type_id,
3481 after_type_declarator, direct_after_type_declarator,
3482 notype_declarator, complex_notype_declarator,
3483 complex_direct_notype_declarator, qualified_id,
3484 notype_qualified_id, overqualified_id, direct_new_declarator,
3485 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
3486 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
3487 instead of build_parse_node.
3489 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3491 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
3492 (minus_one_node): Moved to top level gcc directory. Renamed
3493 to integer_minus_one_node.
3495 * init.c (init_init_processing): Don't set minus_one_node.
3496 (build_vec_init): Use integer_minus_one_node.
3498 * rtti.c (get_tinfo_decl_dynamic): Likewise.
3500 2001-01-28 Jakub Jelinek <jakub@redhat.com>
3502 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
3503 identical and they would be replaced with constant, remove
3504 MODIFY_EXPR from the tree.
3506 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3508 * Make-lang.in: Remove all dependencies on defaults.h.
3509 * call.c: Don't include defaults.h.
3511 * decl2.c: Likewise.
3512 * except.c: Likewise.
3516 * typeck.c: Likewise.
3518 2001-01-25 Jakub Jelinek <jakub@redhat.com>
3520 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
3521 operators even in "C" linkage.
3522 * method.c (set_mangled_name_for_decl): Likewise.
3523 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
3524 overloaded operators in "C" linkage.
3526 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
3528 * pt.c (tsubst_decl): Remove IN_DECL parameter.
3529 (tsubst_arg_types): Check parameter is not void.
3530 (tsubst): Adjust tsubst_decl call.
3532 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
3534 * call.c (add_builtin_candidate): Quote std properly, from
3537 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3539 * pt.c (check_explicit_specialization): Clone constructors and
3542 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
3544 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
3545 indicates anything special about template depth. Make sure we
3546 only count the user visible template classes.
3548 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
3550 * call.c (build_conv): Typo in comment.
3551 (add_builtin_candidate): Add more explanation.
3552 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
3553 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
3554 when we have enumeral types.
3555 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
3556 candidates for relops and eqops.
3557 (joust): Simplify control flow. Allow a non-template user
3558 function to hide a builtin.
3560 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
3562 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
3563 (more_specialized): Add deduction parameter.
3564 * call.c (joust): Adjust more_specialized call.
3565 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
3566 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
3567 (get_bindings_order): Remove.
3568 (get_bindings_real): Add DEDUCE parameter.
3569 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
3570 REFERENCE_TYPE jig for DEDUCE_ORDER.
3571 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
3572 maybe_adjust_types_for_deduction.
3573 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
3575 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
3576 (check_cv_quals_for_unify): Use new unify qualifier flags.
3577 (unify): Clear new unify qualifier flags.
3578 (get_bindings_real): Add DEDUCE parameter.
3579 (get_bindings): Adjust call to get_bindings_real.
3580 (get_bindings_overload): Likewise.
3581 (most_specialized_instantiation): Adjust call to
3584 2001-01-19 Jason Merrill <jason@redhat.com>
3586 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
3588 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
3591 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
3593 * decl2.c (arg_assoc_class): Fix double iteration logic.
3595 2001-01-19 Jason Merrill <jason@redhat.com>
3597 * init.c (build_delete): Always call convert_force to strip cv-quals.
3599 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
3600 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
3601 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
3603 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
3605 * search.c (get_vbase_1): Count only virtual bases.
3607 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
3609 * class.c (duplicate_tag_error): Robustify flag clearing.
3611 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
3613 * cp-tree.h (lookup_template_class): Add complain parm.
3614 * decl.c (lookup_namespace_name): Adjust call to
3615 lookup_template_class.
3616 (make_typename_type): Likewise.
3617 * semantics.c (finish_template_type): Likewise.
3618 * pt.c (lookup_template_class): Add complain parm. Adjust.
3619 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
3622 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
3624 * pt.c (copy_default_args_to_explicit_spec): Preserve
3625 object's CV quals. Reorganize.
3627 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
3629 * typeck.c (build_modify_expr): Say `initialization' for
3631 * init.c (build_default_init): Convert to enumeral type, if
3634 2001-01-18 Jakub Jelinek <jakub@redhat.com>
3636 * parse.y (nomods_initdcl0): Properly set things up for
3639 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
3641 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
3642 (type_unification_real): Set it.
3645 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
3647 * decl.c (finish_destructor_body): Convert to vbase pointer here.
3649 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
3651 * semantics.c (begin_class_definition): Check we're not inside a
3654 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
3656 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
3659 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
3661 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
3662 * call.c (build_over_call): Add comment.
3664 2001-01-16 Daniel Berlin <dberlin@redhat.com>
3666 * cvt.c (ocp_convert): Handle vector type conversion
3667 * typeck2.c (digest_init): Handle vector type initializations
3669 2001-01-16 Phil Edwards <pme@sources.redhat.com>
3671 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
3674 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
3676 * pt.c (check_nontype_parm): Rename to ...
3677 (invalid_nontype_parm_type_p): ... here.
3678 (process_template_parm): Adjust.
3679 (convert_template_argument): Adjust.
3681 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
3683 * pt.c (check_nontype_parm): New function.
3684 (process_template_parm): Use it.
3685 (convert_template_argument): Use it.
3686 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
3689 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
3691 * tree.c: Add defaults.h
3692 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
3693 * Make-lang.in (cp/tree.o): Add defaults.h.
3695 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
3697 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
3699 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
3701 * g++.1: Change to be ".so man1/gcc.1".
3703 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
3705 * Make-lang.in (c++.info, c++.install-info): Build and install g++
3707 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
3708 ($(srcdir)/cp/g++int.info): New target.
3709 * gxxint.texi: Add info directory entry. Use @@ in email address.
3710 * .cvsignore: Update.
3712 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
3714 * typeck.c (build_c_cast): Do template processing earlier.
3715 Always pedwarn on array casts.
3717 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
3719 * friend.c (make_friend_class): Make sure a templated class is
3720 actually a template.
3722 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
3724 * decl2.c (get_guard): Set linkage from guarded decl.
3726 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
3728 * call.c (convert_default_arg): Check for unprocessed
3730 * cp-tree.h (replace_defarg): Move to spew.c.
3731 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
3732 spew.c, which is where they really are.
3733 (done_pending_defargs): Declare.
3734 (unprocessed_defarg_fn): Declare.
3735 * decl.c (replace_defarg): Move to spew.c
3736 * parse.y (structsp): Call done_pending_defargs.
3737 * spew.c (defarg_fns): Rearrange list structure.
3738 (defarg_fnsdone): New static variable.
3739 (defarg_depfns): New static variable.
3740 (init_spew): Adjust.
3741 (add_defarg_fn): Store the type in TREE_TYPE.
3742 (do_pending_defargs): Detect and deal with ordering constraints
3744 (done_pending_defargs): New function.
3745 (unprocessed_defarg_fn): New function.
3746 (replace_defarg): Moved from decl.c. Robustify. Don't save
3747 if circularity detected.
3749 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
3751 * pt.c (unify): Check array has a domain, before checking
3752 whether it is variable sized.
3754 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
3756 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
3757 parameters with pointers to arrays of unknown bound.
3759 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
3761 * parse.y (template_parm_header, template_spec_header): New
3762 reductions. Split out from ...
3763 (template_header): ... here. Use them.
3764 (template_template_parm): Use template_parm_header.
3765 * semantics.c (finish_template_template_parm): Add assert.
3767 2001-01-10 Mark Mitchell <mark@codesourcery.com>
3769 * mangle.c (write_builtin_type): Fix thinko.
3771 * pt.c (copy_default_args_to_explicit_spec_1): New function.
3772 (copy_default_args_to_explicit_spec): Likewise.
3773 (check_explicit_specialization): Use it.
3775 * class.c (finish_struct_1): Remove last argument in call to
3776 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
3777 * decl.c (builtin_function): Likewise.
3778 (build_cp_library_fn): Likewise.
3779 (check_initializer): Likewise.
3780 (make_rtl_for_nonlocal_decl): Likewise.
3781 (cp_finish_decl): Likewise.
3782 (start_function): Likewise.
3783 * decl2.c (finish_anon_union): Likewise.
3784 * friend.c (do_friend): Likewise.
3785 * init.c (build_java_class_ref): Likewise.
3786 * method.c (make_thunk): Likewise.
3787 * pt.c (tsubst_friend_function): Likewise.
3788 * semantics.c (expand_body): Likewise.
3790 2001-01-10 Mark Mitchell <mark@codesourcery.com>
3792 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
3793 looking at DECL_CLONED_FUNCTION for non-functions.
3795 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
3797 * error.c (dump_template_parameter): Use parm to determine how
3798 to print default value.
3800 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
3802 * class.c (duplicate_tag_error): Clear more flags.
3804 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
3806 * call.c (build_new_method_call): Use binfo_for_vbase.
3808 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
3810 * cp-tree.h (flag_cond_mismatch): Don't declare.
3811 * decl2.c (flag_cond_mismatch): Don't define.
3812 (lang_f_options): Remove cond-mismatch.
3813 (unsupported_options): Add cond-mismatch.
3815 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
3817 * class.c (handle_using_decl): Reject using of constructor name
3818 of sourcing class. Allow injecting of a method with same name as
3819 nested class. Fixup error messages.
3821 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
3823 * decl2.c (lang_decode_option): Handle -Wformat=2.
3825 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
3827 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
3828 initialized_in_class.
3829 (DECL_DEFINED_IN_CLASS_P): Rename to ...
3830 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
3831 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
3832 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
3833 * pt.c (check_default_tmpl_args): Adjust for
3834 DECL_INITIALIZED_IN_CLASS_P.
3835 (instantiate_class_template): Likewise.
3836 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
3838 * class.c (finish_struct): Constify saved_filename.
3840 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
3842 * class.c (duplicate_tag_error): Adjust diagnostic.
3843 (finish_struct): Locally set location to start of struct.
3844 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
3846 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
3848 * decl.c (struct binding_level): Adjust class_shadowed comments
3850 (push_class_level_binding): Adjust comments to reflect reality.
3851 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
3852 Don't set TREE_VALUE on the class_shadowed list.
3854 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
3856 * decl2.c (acceptable_java_type): Allow references too.
3857 * init.c (build_java_class_ref): When using the new ABI, search
3858 `class$' and have it mangled with `mangle_decl.'
3859 * mangle.c (write_java_integer_type_codes): New function.
3860 (write_builtin_type): Detect and mangle Java integer and real
3863 2001-01-07 Mark Mitchell <mark@codesourcery.com>
3865 * decl2.c (grokfield): Don't accept `asm' specifiers for
3866 non-static data members.
3868 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3870 * expr.c (cplus_expand_expr): Don't reset `target'.
3872 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
3874 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
3876 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
3878 * parse.y (template_datadef): Check for error_mark_node.
3880 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
3882 * cp-tree.def (DEFAULT_ARG): Make `x' class.
3884 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
3886 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
3887 (record_builtin_type): Make non-static.
3888 (flag_short_double): Don't declare.
3889 (init_decl_processing): Remove the creation of many tree nodes now
3890 in c_common_nodes_and_builtins.
3891 (build_void_list_node): New function.
3892 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
3893 * cp-tree.h (flag_short_wchar): Don't declare.
3895 2001-01-04 Mark Mitchell <mark@codesourcery.com>
3897 * call.c (build_conv): Don't use build1 for USER_CONV.
3898 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
3900 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
3902 * lex.c (lang_init): Call c_common_lang_init.
3904 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
3906 * search.c (lookup_fnfields_here): Remove.
3907 (look_for_overrides_r): Use lookup_fnfields_1.
3908 Ignore functions from using declarations.
3910 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
3912 Implement exceptions specifiers for implicit member functions.
3913 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
3914 * method.c (synthesize_exception_spec): New function.
3915 (locate_dtor, locate_ctor, locate_copy): New functions.
3916 (implicitly_declare_fn): Generate the exception spec too.
3917 * search.c (check_final_overrider): Check artificial functions
3919 * typeck2.c (merge_exception_specifiers): New function.
3921 2001-01-03 Jason Merrill <jason@redhat.com>
3923 * init.c (build_default_init): New fn.
3924 (perform_member_init): Split out from here.
3925 (build_new_1): Use it. Simplify initialization logic.
3926 (build_vec_init): Take an array, rather than a pointer and maxindex.
3927 Speed up simple initializations. Don't clean up if we're assigning.
3928 * cp-tree.h: Adjust.
3929 * decl2.c (do_static_initialization): Remove TREE_VEC case.
3930 * parse.y (new_initializer): Return void_zero_node for ().
3931 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
3932 * typeck2.c (digest_init): Only complain about user-written
3935 2000-12-22 Mike Stump <mrs@wrs.com>
3937 * decl2.c: (max_tinst_depth): Increase to 50.
3939 2001-01-02 Mark Mitchell <mark@codesourcery.com>
3941 * class.c (invalidate_class_lookup_cache): Zero the
3942 previous_class_values.
3943 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
3945 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
3946 * decl.c (free_bindings): New variable.
3947 (push_binding): Don't create a new binding if we have one on the
3949 (pop_binding): Put old bindings on the free list.
3950 (init_decl_processing): Use size_int, not build_int_2.
3951 Register free_bindings as a GC root.
3952 (cp_make_fname_decl): Use size_int, not build_int_2.
3953 (push_inline_template_parms_recursive): Likewise.
3954 (end_template_parm_list): Likewise.
3955 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
3956 (tsubst_template_parms): Use size_int, not build_int_2.
3958 * rtti.c (get_vmi_pseudo_type_info): Likewise.
3960 2001-01-02 Richard Henderson <rth@redhat.com>
3962 * parse.y (asm): Set ASM_INPUT_P.
3964 2001-01-02 Jason Merrill <jason@redhat.com>
3966 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
3969 * typeck.c (cp_truthvalue_conversion): New fn.
3970 * cvt.c (ocp_convert): Use it.
3972 * cp-tree.h: Lose c-common.c decls.
3974 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
3975 * cvt.c (convert_to_void): Use type_unknown_p.
3977 * typeck.c (strip_all_pointer_quals): Also strip quals from
3978 pointer-to-member types.
3980 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
3983 * call.c (build_new_method_call): Do evaluate the object parameter
3984 when accessing a static member.
3985 * typeck.c (build_component_ref): Likewise.
3987 2001-01-02 Andreas Jaeger <aj@suse.de>
3989 * decl.c (cp_missing_noreturn_ok_p): New.
3990 (init_decl_processing): Set lang_missing_noreturn_ok_p.
3992 2000-12-29 Jakub Jelinek <jakub@redhat.com>
3994 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
3996 2000-12-29 Mark Mitchell <mark@codesourcery.com>
3998 * class.c (pushclass): Remove #if 0'd code.
3999 * cp-tree.h (overload_template_name): Remove.
4000 * decl.c (store_bindings): Simplify.
4001 (pop_from_top_level): Likewise.
4002 * pt.c (overload_template_name): Remove.
4003 (instantiate_decl): Don't call push_to_top_level if it's not
4006 2000-12-28 Mark Mitchell <mark@codesourcery.com>
4008 * pt.c (register_local_specialization): Don't return a value.
4009 (lookup_template_class): Use move-to-front heuristic when looking
4010 up template instantiations.
4011 (instantiate_decl): Only push_to_top_level when we're actually
4012 going to instantiate the template.
4014 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4016 * search.c (binfo_for_vtable): Return least derived class, not
4017 most. Handle secondary vtables.
4019 2000-12-22 Jason Merrill <jason@redhat.com>
4021 * pt.c (more_specialized): Don't optimize len==0.
4022 (fn_type_unification): If we're adding the return type, increase len.
4024 * typeck.c (build_binary_op): Fix pmf comparison logic.
4026 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
4027 DECL_STATIC_FUNCTION_P.
4029 * semantics.c (genrtl_finish_function): Don't try to jump to
4030 return_label unless it exists.
4032 In partial ordering for a call, ignore parms for which we don't have
4034 * call.c (joust): Pass len to more_specialized.
4035 (add_template_candidate_real): Strip 'this', pass len.
4036 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
4037 (get_bindings_order): New fn. Pass len down.
4038 (get_bindings_real): Strip 'this', pass len.
4039 (fn_type_unification): Likewise.
4040 (type_unification_real): Succeed after checking 'len' args.
4041 (most_specialized_instantiation): Lose explicit_args parm.
4042 * class.c (resolve_address_of_overloaded_function): Strip 'this',
4045 2000-12-21 Jason Merrill <jason@redhat.com>
4047 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
4048 DECL_TEMPLATE_RESULT.
4050 * search.c (lookup_field_r): Call lookup_fnfields_1, not
4051 lookup_fnfields_here.
4053 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
4055 * call.c (build_object_call): Also allow conversions that return
4056 reference to pointer to function.
4057 (add_conv_candidate): Handle totype being ref to ptr to fn.
4058 (build_field_call): Also allow members of type reference to function.
4059 Lose support for calling pointer to METHOD_TYPE fields.
4061 * error.c (dump_expr): Handle *_CAST_EXPR.
4063 * typeck2.c (build_scoped_ref): Always convert to the naming class.
4065 * tree.c (break_out_cleanups): Lose.
4066 * cp-tree.h: Remove prototype.
4067 * typeck.c (build_component_ref): Don't break_out_cleanups.
4068 (build_compound_expr): Likewise.
4069 * semantics.c (finish_expr_stmt): Likewise.
4071 2000-12-20 Richard Henderson <rth@redhat.com>
4073 * cp-tree.h: Update declarations.
4074 * decl.c (finish_case_label): Return the new stmt node.
4075 * semantics.c (finish_goto_stmt): Likewise.
4076 (finish_expr_stmt, finish_return_stmt): Likewise.
4077 (finish_break_stmt, finish_continue_stmt): Likewise.
4078 (finish_asm_stmt): Likewise.
4079 * parse.y (already_scoped_stmt): Set STMT_LINENO.
4080 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
4081 (simple_if, simple_stmt): Return the new stmt node.
4084 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
4086 * cp-tree.h: Don't declare warn_long_long.
4088 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4090 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
4093 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4095 * pt.c (unify): Handle when both ARG and PARM are
4096 BOUND_TEMPLATE_TEMPLATE_PARM.
4098 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4100 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
4101 DECL_TEMPLATE_PARM_P.
4103 2000-12-15 Jason Merrill <jason@redhat.com>
4105 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
4107 * init.c (build_new_1): Don't strip quals from type.
4109 * decl.c (pushdecl): Don't check for linkage on a non-decl.
4111 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
4113 * call.c (build_new_function_call): Lose space before paren in
4115 (build_new_method_call): Likewise.
4117 * typeck2.c (build_m_component_ref): Propagate quals from datum.
4119 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4121 * pt.c (check_explicit_specialization): Propagate default
4122 function arguments to explicit specializations.
4124 2000-12-13 DJ Delorie <dj@redhat.com>
4126 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
4129 2000-12-08 Jason Merrill <jason@redhat.com>
4131 * error.c (dump_function_name): Don't let the user see __comp_ctor.
4133 Clean up copy-initialization in overloading code.
4134 * call.c (build_user_type_conversion_1): Die if we are asked to
4135 convert to the same or a base type.
4136 (implicit_conversion): Avoid doing so. Lose reference binding code.
4137 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
4138 direct-initialization. Also do direct-init part of copy-init.
4139 (build_user_type_conversion): Don't provide context to convert_like.
4140 * cvt.c (ocp_convert): build_user_type_conversion will now provide
4141 the constructor call for copy-init.
4143 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
4144 instantiation of a member template.
4145 (do_decl_instantiation): Not here.
4147 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
4149 * class.c (check_field_decls): Don't special case anonymous
4150 fields in error messages.
4151 (note_name_declared_in_class): Use %D on diagnostic.
4153 * tree.c (pod_type_p): Use strip_array_types.
4154 (cp_valid_lang_attribute): Likewise.
4155 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
4156 multiple evaluations.
4157 (cp_has_mutable_p): Use strip_array_types.
4159 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
4161 * cp-tree.h (sufficient_parms_p): Declare new function.
4162 * call.c (sufficient_parms_p): New function, broken out of ...
4163 (add_function_candidate): ... here. Use it.
4164 (add_conv_candidate): Use it.
4165 * decl.c (grok_ctor_properties): Use it.
4167 2000-12-07 Jakub Jelinek <jakub@redhat.com>
4169 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
4171 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
4173 * decl2.c (lang_decode_option): Handle -Wformat-security.
4175 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4177 * pt.c (verify_class_unification): New function.
4178 (get_class_bindings): Use it.
4179 (try_class_unification): Tidy.
4180 (unify): Handle when argument of a template-id is not
4181 template parameter dependent.
4182 (template_args_equal): Handle when TREE_CODE's do not match.
4184 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
4186 * lang-specs.h (c++): When invoking the stand-alone preprocessor
4187 for -save-temps, pass all relevant -Defines to it, and then don't
4188 pass them to cc1plus.
4190 2000-12-05 Will Cohen <wcohen@redhat.com>
4192 * decl.c (finish_case_label): Cleared
4193 more_cleanups_ok in surrounding function scopes.
4194 (define_label): Likewise.
4196 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
4198 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
4199 (get_matching_virtual): Remove.
4200 (look_for_overrides): Declare new function.
4201 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
4203 * class.c (check_for_override): Move base class iteration code
4204 to look_for_overrides.
4205 * search.c (next_baselink): Remove.
4206 (get_virtuals_named_this): Remove.
4207 (get_virtual_destructor): Remove.
4208 (tree_has_any_destructors_p): Remove.
4209 (struct gvnt_info): Remove.
4210 (check_final_overrider): Remove `virtual' from error messages.
4211 (get_matching_virtuals): Remove. Move functionality to ...
4212 (look_for_overrides): ... here, and ...
4213 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
4216 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
4218 * typeck.c (get_delta_difference): If via a virtual base,
4220 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
4223 2000-12-04 Richard Henderson <rth@redhat.com>
4225 * error.c (dump_tree): Use output_add_string not OB_PUTS.
4227 2000-12-04 Jason Merrill <jason@redhat.com>
4229 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
4230 (write_builtin_type): Pass intSI_type_node and the like through
4232 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
4233 Pass intSI_type_node and the like through type_for_mode.
4234 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
4235 * pt.c (tsubst, unify): Likewise.
4236 * tree.c (walk_tree): Likewise.
4237 * error.c (dump_type): Likewise.
4238 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
4240 * Make-lang.in: Tweak top comment for emacs.
4243 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
4245 * class.c (clone_function_decl): Robustify.
4247 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
4249 * decl.c (store_bindings): Only search in the non modified
4250 old_bindings for duplicates.
4252 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
4254 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
4257 * typeck.c (build_static_cast): Remove unused variable.
4259 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4261 * pt.c: Fix typo in comment.
4263 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
4265 * decl2.c (warn_format): Remove definition.
4266 (lang_decode_option): Handle -Wformat-nonliteral,
4267 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
4269 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
4271 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
4272 (init_decl_processing): Don't create string_type_node,
4273 const_string_type_node, wint_type_node, intmax_type_node,
4274 uintmax_type_node, default_function_type, ptrdiff_type_node and
4275 unsigned_ptrdiff_type_node. Adjust position of call to
4276 c_common_nodes_and_builtins.
4277 (identifier_global_value): New function.
4279 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
4281 * call.c (standard_conversion): Reject pointer to member
4282 conversions from ambiguous, inaccessible or virtual bases.
4283 * typeck.c (build_static_cast): Don't check pointers to members
4286 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
4288 * method.c (do_build_copy_constructor): Preserve cv
4289 qualifications when accessing source object members.
4290 (do_build_assign_ref): Likewise. Remove separate diagnostics for
4293 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
4295 * method.c (do_build_assign_ref): Construct appropriately
4296 CV-qualified base reference. Don't allow const casts in base
4299 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
4301 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
4302 incomplete return type.
4304 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
4306 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
4307 * semantics.c (finish_base_specifier): Accept a _TYPE not a
4310 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
4312 * spew.c (yyerror): Cope if yylval.ttype is NULL.
4314 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
4316 * decl.c (grokdeclarator): Diagnose undefined template contexts.
4318 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
4320 * decl.c (grokdeclarator): Do type access control on friend
4323 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
4325 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
4326 bison parser ickiness.
4327 * pt.c (tsubst_friend_function): Enter namespace scope when
4328 tsubsting the function name.
4329 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
4331 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
4333 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
4334 * cvt.c (cp_convert_to_pointer): Add force parameter.
4335 Allow conversions via virtual base if forced.
4336 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
4337 (ocp_convert): Likewise.
4338 * search.c (binfo_from_vbase): Return the virtual base's binfo.
4339 * typeck.c (get_delta_difference): Adjust handling of virtual
4342 2000-11-26 Mark Mitchell <mark@codesourcery.com>
4344 * tree.c (struct list_hash): Remove.
4345 (list_hash_table): Make it be an htab.
4346 (struct list_proxy): New type.
4347 (list_hash_eq): New function.
4348 (list_hash_pieces): Renamed from ...
4349 (list_hash): ... this.
4350 (list_hash_lookup): Remove.
4351 (list_hash_add): Remove.
4352 (hash_tree_cons): Use the generic hashtable.
4353 (mark_list_hash): Remove.
4354 (init_tree): Create the hashtable.
4356 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
4358 * method.c (build_mangled_C9x_name): Rename to
4359 build_mangled_C99_name. Change C9X references in comments to
4362 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
4364 * parse.y (unary_expr): Move VA_ARG from here ...
4365 (primary): ... to here.
4367 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
4369 * semantics.c (finish_id_expr): If type is error_mark, return
4372 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
4374 * pt.c (lookup_template_class): Simplify loop exit constructs.
4375 Cope when there is no partial instantiation of a template
4378 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
4380 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
4382 2000-11-22 Mark Mitchell <mark@codesourcery.com>
4384 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
4387 * pt.c (do_decl_instantiate): Explicitly clone constructors and
4388 destructors that haven't already been cloned.
4390 2000-11-20 Richard Henderson <rth@redhat.com>
4392 * parse.y (yyparse_1): Rename the parser entry point.
4394 2000-11-20 Alex Samuel <samuel@codesourcery.com>
4396 * mangle.c (write_name): Use <unscoped-name> for names directly in
4398 (write_unscoped_name): Accept names directly in function scope.
4400 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
4402 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
4403 * parse.y (extdef): Add EXPORT reduction.
4404 * spew.c (yylex): Don't skip export here.
4406 2000-11-19 Mark Mitchell <mark@codesourcery.com>
4408 * decl.c (init_decl_processing): Correct name of pure virtual
4409 function under the new ABI.
4410 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
4411 (throw_bad_typeid): Likewise for bad typeid function.
4413 2000-11-18 Mark Mitchell <mark@codesourcery.com>
4415 * decl.c (grokparms): Don't even function types of `void' type,
4417 * mangle.c (write_type): Don't crash when confronted with the
4420 * decl.c (grokparms): Don't create parameters of `void' type.
4422 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
4424 * lex.c (mark_impl_file_chain): Delete.
4425 (init_parse): Remove call to ggc_add_string_root. No need to
4426 ggc_strdup a string constant. Do not add impl_file_chain to GC
4428 (handle_pragma_implementation): No need to ggc_strdup main_filename.
4430 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
4432 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
4434 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
4436 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
4437 * decl.c (grokdeclarator): Don't reject void parms here.
4438 (require_complete_types_for_parms): Simplify, use
4439 complete_type_or_else.
4440 (grokparms): Remove bitrot. Remove funcdef parm.
4441 Deal with ellipsis parm lists here.
4442 * semantics.c (finish_parmlist): Don't append void_list_node
4443 here. Set PARMLIST_ELLIPSIS_P.
4445 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
4447 * typeck2.c (incomplete_type_error): Reorganise to avoid
4448 excessive diagnostics.
4450 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
4452 * lex.c (struct impl_files, internal_filename): Constify a char *.
4454 2000-11-16 Mark Mitchell <mark@codesourcery.com>
4456 * mangle.c (write_special_name_constructor): Don't generate
4457 assembler junk when confronted with an old-style constructor.
4458 (write_special_name_destructor): Likewise.
4459 (mangle_decl_string): Do it here instead.
4461 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
4463 * call.c (op_error): Make error messages clearer.
4465 2000-11-15 Mark Mitchell <mark@codesourcery.com>
4467 * decl.c (wrapup_globals_for_namespace): Don't mark things
4468 TREE_ASM_WRITTEN when they're not.
4470 2000-11-15 Jason Merrill <jason@redhat.com>
4472 * typeck2.c (friendly_abort): Uncount the error before handing
4475 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
4477 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
4479 2000-11-14 Mark Mitchell <mark@codesourcery.com>
4481 * class.c (build_vtbl_initializer): Fix typo in comment.
4482 * typeck.c (expr_sizeof): Don't crash on errors.
4484 2000-11-14 Jim Wilson <wilson@redhat.com>
4486 * lang-specs.h: Add %2 after %(cc1_options).
4488 2000-11-14 Richard Henderson <rth@redhat.com>
4490 * typeck.c (c_sizeof): Be strict about casting result value
4491 back to c_size_type_node.
4492 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
4494 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
4496 * typeck.c (build_unary_op): Use boolean_increment from
4497 c-common.c, moving the relevant code there.
4499 2000-11-11 Jason Merrill <jason@redhat.com>
4501 * typeck.c (mark_addressable): Don't call put_var_into_stack.
4503 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
4506 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4508 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
4509 * lex.c (copy_lang_decl): Likewise.
4511 2000-11-09 Mark Mitchell <mark@codesourcery.com>
4513 * dump.c (cp_dump_tree): Don't dump function bodies here.
4515 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
4516 (dump.o): Update dependency list.
4517 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
4518 (flag_dump_translation_unit): Likewise.
4519 (CP_TYPE_QUALS): Adjust definition.
4520 (DECL_C_BIT_FIELD): Remove.
4521 (SET_DECL_C_BIT_FIELD): Likewise.
4522 (CLEAR_DECL_C_BIT_FIELD): Likewise.
4523 (add_maybe_template): Likewise.
4524 (strip_array_types): Likewise.
4525 (dump_node_to_file): Likewise.
4526 (cp_dump_tree): New function.
4527 * decl.c (init_decl_processing): Set lang_dump_tree.
4528 * decl2.c (flag_dump_translation_unit): Remove.
4529 * dump.c: Move most of it to ../c-dump.c.
4530 (cp_dump_tree): New function.
4531 * pt.c (add_maybe_template): Remove.
4532 * typeck.c (strip_array_types): Likewise.
4534 2000-11-07 Eric Christopher <echristo@redhat.com>
4536 * decl.c (init_decl_processing): Change definition of
4537 __wchar_t to wchar_t. Remove artificial declaration of
4539 * lex.c: Change instances of __wchar_t to wchar_t.
4541 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
4543 * lex.c (do_identifier): Don't lookup_name for operators.
4544 * parse.y (operator): Save looking_for_typename.
4545 (unoperator): Restore it.
4546 * spew.c (frob_opname): Use nth_token for lookahead.
4548 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
4550 * decl.c (grok_op_properties): Always use coerce_new_type and
4552 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
4553 exception specification. Tidy up.
4554 (coerce_delete_type): Preserve exception specification. Tidy up.
4556 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
4558 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
4559 (push_binding_level), error.c (cp_tree_printer), pt.c
4560 (process_partial_specialization, tsubst_template_arg_vector),
4561 search.c (lookup_member): Use memset () instead of bzero ().
4563 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
4565 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
4567 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
4569 * Make-lang.in (c++.distdir): Remove.
4571 2000-11-04 Mark Mitchell <mark@codesourcery.com>
4573 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
4574 declarations from different namespaces to be combined.
4576 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
4578 * decl.c: Include tm_p.h.
4580 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
4582 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
4584 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
4586 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
4587 (build_overload_value), repo.c (open_repo_file), xref.c
4588 (open_xref_file): Use strchr () and strrchr () instead of index ()
4591 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
4593 * call.c (build_over_call): Call fold on the CALL_EXPR.
4595 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
4597 * error.c (dump_template_decl): Separate template hearders with
4600 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
4602 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
4603 TS_* flags with corresponding TFF_*. Adjust prototypes of
4604 functions (which used to take a tree_string_flags) to take an int.
4606 * cp-tree.h (enum tree_string_flags): Remove
4607 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
4608 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
4609 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
4610 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
4611 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
4612 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
4613 (type_as_string, decl_as_string, expr_as_string,
4614 context_as_string): Adjust prototype.
4616 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
4617 instead of TS_PLAIN.
4619 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
4620 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
4623 2000-10-30 Mark Mitchell <mark@codesourcery.com>
4625 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
4626 (linkage_kind): New enumeration.
4627 (decl_linkage): New function.
4628 * decl2.c (comdat_linkage): Extend comment.
4629 * error.c (dump_function_decl): Print the arguments used to
4630 instantiate a template, even when not printing the type of the
4632 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
4633 not TREE_PUBLIC, to test for external linkage.
4634 * tree.c (decl_linkage): New function.
4636 2000-10-28 Mark Mitchell <mark@codesourcery.com>
4638 * pt.c (instantiate_decl): Always instantiate static data members
4639 initialized in-class.
4641 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
4643 * Make-lang.in: Move all build rules here from Makefile.in,
4644 adapt to new context. Wrap all rules that change the current
4645 directory in parentheses. Expunge all references to $(P).
4646 When one command depends on another and they're run all at
4647 once, use && to separate them, not ;. Add OUTPUT_OPTION to
4648 all object-file generation rules. Delete obsolete variables.
4650 * Makefile.in: Delete.
4651 * config-lang.in: Delete outputs= line.
4653 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
4655 * error.c (dump_function_decl): Print no space between
4656 `ptr-operator' the `type-specifier' of the return type.
4657 (dump_type_prefix): Make sure we put space at the appropriate
4660 2000-10-23 Jason Merrill <jason@redhat.com>
4662 * call.c (equal_functions): Also call decls_match for extern "C" fns.
4664 2000-10-22 Jason Merrill <jason@redhat.com>
4666 * call.c (build_conditional_expr): Use ocp_convert to force
4669 2000-10-22 Mark Mitchell <mark@codesourcery.com>
4671 * call.c (standard_conversion): Use RVALUE_CONVs for all
4672 expressions that satisfy lvalue_p, not just those that satisfy
4675 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
4677 * typeck.c (c_sizeof): Return an expression of `size_t' type,
4678 not one with TYPE_IS_SIZETYPE set.
4679 (dubious_conversion_warnings): Remove special-case code.
4681 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
4683 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
4684 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
4685 (dump_type_prefix): Print vector-of-int as 'int vector'.
4686 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
4687 * tree.c (walk_tree): Handle VECTOR_TYPE.
4689 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
4691 2000-10-21 Jason Merrill <jason@redhat.com>
4693 * parse.y (operator): Set got_object from got_scope.
4694 Set looking_for_typename.
4695 * decl.c (lookup_name_real): Clear val after setting from_obj.
4696 Reorganize diagnostic.
4698 2000-10-20 Jason Merrill <jason@redhat.com>
4700 * tree.c (walk_tree): Don't walk into default args.
4702 * error.c (dump_expr): Use host_integerp.
4704 2000-10-20 David Edelsohn <edelsohn@gnu.org>
4706 * typeck2.c (abstract_virtuals_error): Use "because" instead of
4707 "since" in error message.
4709 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4711 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
4713 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
4715 * decl.c (revert_static_member_fn): Fixed typo.
4717 2000-10-19 Mark Mitchell <mark@codesourcery.com>
4719 * class.c (subobject_offset_fn): New type.
4720 (dfs_record_base_offsets): Remove.
4721 (record_base_offsets): Likewise.
4722 (dfs_search_base_offsets): Likewise.
4723 (record_subobject_offset): New function.
4724 (check_subobject_offset): Likewise.
4725 (walk_subobject_offsets): Likewise.
4726 (record_subobject_offsets): Likewise.
4727 (layout_conflict_p): Reimplement.
4728 (layout_nonempty_base_or_field): Correct handling of type
4729 conflicts during layout.
4730 (layout_empty_base): Likewise.
4731 (build_base_field): Adjust to handle new representation of empty
4733 (build_base_fields): Likewise.
4734 (layout_virtual_bases): Likewise.
4735 (splay_tree_compare_integer_csts): New function.
4736 (layout_class_type): Use a splay_tree, rather than a varray, to
4737 represent the offsets of empty bases.
4739 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
4740 * decl.c (select_decl): Don't return declarations that are
4743 2000-10-18 Mark Mitchell <mark@codesourcery.com>
4745 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
4746 (fake_std_node): New macro.
4747 * decl.c (in_std): Rename to ...
4748 (in_fake_std): ... this.
4749 (flag_no_builtin): Remove.
4750 (flag_no_nonansi_builtin): Likewise.
4751 (walk_namespaces_r): Use fake_std_node.
4752 (push_namespace): Use std_identifier.
4753 (pop_namespace): Use in_fake_std.
4754 (lookup_name_real): Use fake_std_node.
4755 (init_decl_processing): When -fhonor-std, create the `std'
4756 namespace. Don't create a dummy fake_std_node in that case.
4757 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
4758 (builtin_function): Put builtins whose names don't begin
4759 with `_' in the std namespace.
4760 * decl2.c (flag_no_builtin): Remove.
4761 (flag_no_nonansi_builtin): Likewise.
4762 (set_decl_namespace): Use fake_std_node.
4763 (validate_nonmember_using_decl): Likewise.
4764 (do_using_directive): Likewise.
4765 (handle_class_head): Likewise.
4766 * dump.c (dequeue_and_dump): Likewise.
4767 * except.c (init_exception_processing): Use std_identifier.
4768 * init.c (build_member_call): Use fake_std_node.
4769 * rtti.c (init_rtti_processing): Use std_identifier.
4771 2000-10-17 Mark Mitchell <mark@codesourcery.com>
4773 * cp-tree.h (back_end_hook): Remove declaration.
4774 * decl2.c (back_end_hook): Remove definition.
4776 * dump.c (dequeue_and_dump): Dump TREE_USED.
4778 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
4780 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
4782 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
4784 * decl.c (WINT_TYPE): Define.
4785 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
4786 c_size_type_node, signed_size_type_node and wint_type_node.
4788 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
4790 * decl2.c (warn_missing_format_attribute): New variable.
4791 (lang_decode_option): Decode -Wmissing-format-attribute.
4793 2000-10-16 Mark Mitchell <mark@codesourcery.com>
4795 * typeck.c (qualify_type): Remove.
4796 (composite_pointer_type): Fix handling of conversions to `cv void*'.
4798 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4800 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
4802 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4804 * Makefile.in (parse.c, parse.h): Create atomically.
4806 2000-10-12 Mark Mitchell <mark@codesourcery.com>
4808 * class.c (current_obstack): Remove.
4809 * decl.c (ggc_p): Remove.
4810 (start_decl): Don't use decl_tree_cons.
4811 (grokdeclarator): Don't use build_decl_list.
4812 (start_function): Don't use decl_tree_cons.
4813 (finish_function): Don't mess with obstacks.
4814 * decl2.c (grok_x_components): Don't use build_decl_list.
4815 * lex.c (make_call_declarator): Don't call decl_tree_cons.
4816 (implicitly_declare_fn): Don't call build_decl_list.
4817 * parse.y (frob_specs): Don't call build_decl_list or
4819 (expr_or_declarator_intern): Don't call decl_tree_cons.
4820 (primary): Don't call build_decl_list.
4821 (fcast_or_absdcl): Likewise.
4822 (typed_declspecs): Don't call decl_tree_cons.
4823 (reserved_declspecs): Don't call build_decl_list.
4824 (declmods): Likewise.
4825 (reserved_typespecquals): Likewise.
4827 (new_type_id): Likewise.
4828 (cv_qualifiers): Likewise.
4829 (after_type_declarator_intern): Likewise.
4830 (notype_declarator_intern): Likewise.
4831 (absdcl_intern): Likewise.
4832 (named_parm): Likewise.
4833 * pt.c (most_specialized_class): Likewise.
4834 * repo.c (temporary_obstack): Make it a structure, not a pointer.
4835 (init_repo): Initialize it.
4836 * search.c (current_obstack): Remove.
4837 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
4839 2000-10-09 Richard Henderson <rth@cygnus.com>
4841 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
4842 (c++ language support bits for libgcc): Remove.
4843 (c++.clean): Remove cplib2.txt cleanup.
4844 * config-lang.in (headers, lib2funcs): Remove.
4846 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
4847 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
4848 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
4849 * inc/new.h, inc/typeinfo: Remove files.
4851 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
4853 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
4855 (init_decl_processing): Initialize intmax_type_node and
4858 2000-10-06 Richard Henderson <rth@cygnus.com>
4860 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
4861 (original_result_rtx): Remove.
4862 * decl.c (save_function_data): Don't clear x_result_rtx.
4863 (mark_lang_function): Don't mark it either.
4864 * expr.c (fixup_result_decl): Remove.
4865 * semantics.c (genrtl_named_return_value): Frob the return decl
4866 before calling emit_local_var.
4867 (genrtl_finish_function): Don't call fixup_result_decl.
4868 Always emit the jump to return_label.
4870 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
4872 * pt.c (lookup_template_class): Set current access for enum.
4873 (tsubst_enum): Set file & line for enum decl.
4875 * spew.c (yylex): Remove unused variable.
4877 2000-10-05 Richard Henderson <rth@cygnus.com>
4879 * semantics.c (genrtl_finish_function): Don't init or check
4880 can_reach_end; remove noreturn and return value checks.
4882 2000-10-05 Tom Tromey <tromey@cygnus.com>
4884 * init.c (build_java_class_ref): Use `build_static_name' with a
4885 suffix, not a prefix, to build the class object's name.
4887 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
4889 * cp-tree.h (access_kind): Fix comment typo.
4890 * decl2.c (grokfield): Fix diagnostic typo.
4891 * semantics.c (finish_template_type): Fix comment typo.
4892 (finish_qualified_object_call_expr): Likewise.
4894 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
4896 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
4899 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
4901 * spew.c (frob_id): New static function.
4902 (frob_opname): Use it.
4905 2000-10-01 Mark Mitchell <mark@codesourcery.com>
4907 * decl.c (lang_mark_false_label_stack): Remove.
4908 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
4910 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
4912 * gxxint.texi: Use @email for formatting email addresses.
4914 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
4916 * error.c: Remove direct obstack manipulation. Replace with
4917 output_buffer-based formatting. Adjust calls to removed macros.
4918 (obstack_chunk_alloc, obstack_chunk_free): Remove.
4919 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
4920 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
4922 2000-09-24 Mark Mitchell <mark@codesourcery.com>
4924 * ir.texi: Move to ../c-tree.texi.
4926 2000-09-20 Jason Merrill <jason@redhat.com>
4928 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
4930 2000-09-21 Andreas Jaeger <aj@suse.de>
4932 * errfn.c: Move declaration of cp_printer and cp_printers to ...
4933 * cp-tree.h: ... here.
4935 * error.c: Remove declaration of cp_printer.
4937 2000-09-20 Mark Mitchell <mark@codesourcery.com>
4939 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
4941 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
4943 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
4946 2000-09-18 Mark Mitchell <mark@codesourcery.com>
4948 * decl.c (start_function): Robustify.
4950 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4952 * cp-tree.h (check_function_format): Accept a `status' parameter.
4954 * call.c, typeck.c: Updates calls to `check_function_format'.
4956 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
4958 * decl2.c (handle_class_head): Always push some scope even
4961 2000-09-16 Mark Mitchell <mark@codesourcery.com>
4963 * cp-tree.h (struct cp_language_function): Remove
4964 x_scope_stmt_stack and name_declared.
4965 (current_scope_stmt_stack): Remove.
4966 (function_name_declared_p): New macro.
4967 (struct lang_decl_flags): Use c_lang_decl as a base class.
4969 (struct lang_decl): Replace saved_tree with context.
4970 (DECL_FRIEND_CONTEXT): Adjust accordingly.
4971 (SET_DECL_FRIEND_CONTEXT): Likewise.
4972 (DECL_VIRTUAL_CONTEXT): Likewise.
4973 (DECL_SAVED_TREE): Remove.
4974 (C_DECLARED_LABEL_FLAG): Likewise.
4975 (cplus_expand_expr_stmt): Don't declare.
4976 (add_decl_stmt): Likewise.
4977 (add_scope_stmt): Likewise.
4978 * decl.c (mark_stmt_tree): Remove.
4979 (case_compare): Likewise.
4980 (finish_case_label): Use c_add_case_label.
4981 (init_decl_processing): Set more language-specific hooks.
4982 (build_enumerator): Fix typo in comment.
4983 (cplus_expand_expr_stmt): Remove.
4984 (mark_lang_function): Use mark_c_language_function.
4985 (lang_mark_tree): Use c_mark_lang_decl.
4986 * decl2.c: Change order of inclusion.
4987 * except.c: Likewise.
4988 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
4989 back on c_expand_expr.
4990 * friend.c: Include expr.h.
4991 * init.c: Change order of inclusion.
4992 * Makefile.in: Update dependencies.
4993 * lex.h (free_lang_decl_chain): Remove.
4994 * optimize.c (maybe_clone_body): Use function_name_declared_p.
4995 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
4997 (instantiate_decl): Use function_name_declared_p.
4998 * semantics.c (lang_expand_expr_stmt): Remove.
4999 (set_current_function_name_declared): Likewise.
5000 (current_function_name_declared): Likewise.
5001 (begin_compound_stmt): Use function_name_declared_p.
5002 (add_decl_stmt): Remove.
5003 (setup_vtbl_ptr): Use function_name_declared_p.
5004 (add_scope_stmt): Remove.
5005 (current_scope_stmt_stack): New function.
5006 (cp_expand_stmt): Don't handle SCOPE_STMTs.
5007 (expand_body): Use function_name_declared_p.
5008 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
5009 * typeck.c: Change order of includes.
5010 (convert_sequence): Remove.
5012 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
5014 * lex.c (reswords): Add _Complex.
5016 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5018 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
5020 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
5022 * init.c (begin_init_stmts): Don't use // comments.
5024 2000-09-12 Jason Merrill <jason@redhat.com>
5026 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
5027 all non-extern arrays.
5029 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
5030 typenames, too. Downgrade complaint to pedwarn.
5031 (xref_tag): Warn about surprising behavior of 'friend struct T'.
5032 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
5033 'class This::Inherited'.
5035 2000-09-12 Mark Mitchell <mark@codesourcery.com>
5037 * decl.c (finish_case_label): Given the LABEL_DECL a
5040 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
5042 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
5043 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
5044 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
5045 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
5046 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
5048 (sorry_for_unsupported_tree, print_scope_operator,
5049 print_left_paren, print_right_paren, print_left_bracket,
5050 print_right_bracket, print_whitespace): Likewise.
5051 (aggr_variety): Rename to class_key_or_enum.
5052 (print_type): Rename to print_type_id.
5053 (print_type_specifier_seq, print_simple_type_specifier,
5054 print_elaborated_type_specifier,
5055 print_rest_of_abstract_declarator,
5056 print_parameter_declaration_clause, print_exception_specification,
5057 print_nested_name_specifier, print_template_id,
5058 typedef_original_name, print_template_argument_list_start,
5059 print_template_argument_list_end): New functions.
5061 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
5063 * ir.texi: Add more documentation.
5065 2000-09-11 Mark Mitchell <mark@codesourcery.com>
5067 * cp-tree.h (struct saved_scope): Remove x_function_parms.
5068 (current_function_parms): Don't define.
5069 (struct cp_language_function): Remove parms_stored.
5070 (current_function_just_assigned_this): Don't define.
5071 (current_function_parms_stored): Likewise.
5072 (static_ctors): Declare.
5073 (static_dtors): Likewise.
5074 (SF_EXPAND): Don't define.
5075 (expand_start_early_try_stmts): Remove declaration.
5076 (store_parm_decls): Likewise.
5077 * decl.c (static_ctors): Don't declare.
5078 (static_dtors): Likewise.
5079 (struct binding_level): Remove this_block.
5080 (poplevel): Remove dead code.
5081 (set_block): Likewise.
5082 (mark_binding_level): Don't mark this_block.
5083 (mark_saved_scope): Don't mark x_function_parms.
5084 (init_decl_processing): Don't add current_function_parms as a GC
5086 (check_function_type): Change prototype.
5087 (start_function): Remove RTL-generation code.
5088 (expand_start_early_try_stmts): Remove.
5089 (store_parm_decls): Give it internal linkage. Remove
5090 RTL-generation code.
5091 (finish_function): Remove RTL-generation code.
5092 * decl2.c (static_ctors): Fix formatting.
5093 (static_dtors): Likewise.
5094 * method.c (use_thunk): Don't call store_parm_decls.
5095 (synthesize_method): Likewise.
5096 * optimize.c (maybe_clone_body): Likewise.
5097 * parse.y (fn.def2): Likewise.
5098 (.set_base_init): Likewise.
5099 (nodecls): Likewise.
5100 * pt.c (instantiate_decl): Likewise.
5101 * rtti.c (synthesize_tinfo_fn): Likewise.
5102 * semantics.c (genrtl_try_block): Simplify.
5103 (expand_body): Use genrtl_start_function and
5104 genrtl_finish_function.
5105 (genrtl_start_function): New function.
5106 (genrtl_finish_function): Likewise.
5108 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
5110 * error.c (cp_tree_printer, case 'P'): Append break.
5112 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
5114 * cp-tree.h (frob_opname): Declare.
5115 * parse.y (saved_scopes): New static variable.
5116 (cp_parse_init): Adjust.
5117 (do_id): If lastiddecl is NULL, do do_identifier.
5118 (operator): Save scope information.
5119 (unoperator): New reduction. Restore scope information.
5120 (operator_name): Append unoperator. Call frob_opname.
5121 * spew.c (frob_opname): Define.
5123 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
5125 * decl.c, rtti.c: Include defaults.h if not already included.
5126 Don't define the *_TYPE_SIZE macros.
5128 2000-09-09 Mark Mitchell <mark@codesourcery.com>
5130 * cp-tree.h (push_switch): Change prototype.
5131 (check_cp_case_value): Remove declaration.
5132 (decl_constant_value): Likewise.
5133 * decl.c (struct cp_switch): Add switch_stmt and cases.
5134 (case_compare): New function.
5135 (push_switch): Set switch_stmt. Initialize cases.
5136 (pop_switch): Clean up cases.
5137 (define_case_label): Rename to ...
5138 (finish_case_label): ... this. Do semantic analysis for case
5140 (start_function): Correct comment.
5141 * decl2.c (check_cp_case_value): Remove.
5142 * expr.c (do_case): Remove.
5143 * pt.c (tsubst_expr): Adjust call to finish_case_label.
5144 * semantics.c (genrtl_do_poplevel): Remove declaration.
5145 (RECHAIN_STMTS): Remove.
5146 (finish_break_stmt): Use build_break_stmt.
5147 (finish_continue_stmt): Use build_continue_stmt.
5148 (finish_switch_cond): Adjust condition here, rater than in
5149 c_expand_start_case.
5150 (finish_case_label): Remove.
5151 * typeck.c (c_expand_return): Remove.
5152 (c_expand_start_case): Likewise.
5154 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
5156 * ir.texi: Document type nodes.
5158 2000-09-06 Mark Mitchell <mark@codesourcery.com>
5160 * cp-tree.h (init_cp_semantics): Declare.
5161 (genrtl_try_block): Don't declare.
5162 (genrtl_handler): Likewise.
5163 (genrtl_catch_block): Likewise.
5164 (genrtl_ctor_stmt): Likewise.
5165 (genrtl_subobject): Likewise.
5166 (genrtl_do_poplevel): Likewise.
5167 (genrtl_named_return_value): Likewise.
5168 * lex.c (init_parse): Call init_cp_semantics.
5169 * semantics.c (genrtl_try_block): Give it internal linkage.
5170 (genrtl_handler): Likewise.
5171 (genrtl_catch_block): Likewise.
5172 (genrtl_ctor_stmt): Likewise.
5173 (genrtl_subobject): Likewise.
5174 (genrtl_do_poplevel): Likewise.
5175 (genrtl_named_return_value): Likewise.
5176 (lang_expand_stmt): Rename to ...
5177 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
5178 (init_cp_semantics): Define.
5180 * decl.c (initialize_local_var): Remove RTL-generating code.
5181 * semantics.c (genrtl_try_block): Fix formatting.
5183 Move statement-tree facilities from C++ to C front-end.
5184 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
5185 (void_zero_node): Remove.
5186 (stmt_tree): Likewise.
5187 (scope_chain): Adjust.
5188 (language_function): Rename to cp_language_function.
5189 (cp_function_chain): Adjust.
5190 (current_stmt_tree): Remove.
5191 (last_tree): Likewise.
5192 (last_expr_type): Likewise.
5193 (struct lang_decl): Adjust.
5194 (STMT_IS_FULL_EXPR_P): Remove.
5196 (begin_stmt_tree): Likewise.
5197 (finish_stmt_tree): Likewise.
5198 (walk_tree_fn): Likewise.
5199 (walk_stmt_tree): Likewise.
5200 * class.c (finish_struct): Replace use of add_tree with add_stmt.
5201 * decl.c (mark_stmt_tree): Adjust type.
5202 (init_decl_processing): Don't build void_zero_node.
5203 (initialize_local_var): Adjust usage of current_stmt_tree.
5204 (finish_enum): Use add_stmt, not add_tree.
5205 (save_function_data): Adjust use of language_function.
5206 (finish_constructor_body): Use add_stmt, not add_tree.
5207 (finish_destructor_body): Likewise.
5208 (push_cp_function_context): Adjust use of language_function.
5209 (pop_cp_function_context): Likewise.
5210 (mark_lang_function): Likewise.
5211 (mark_cp_function_context): Likewise.
5212 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
5213 (build_vec_init): Likewise.
5214 * semantics.c (SET_LAST_STMT): Remove.
5215 (RECHAIN_STMTS): Don't use it.
5216 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
5217 (current_stmt_tree): Define.
5219 (finish_goto_stmt): Use add_stmt, not add_tree.
5220 (finish_expr_stmt): Likewise.
5221 (begin_if_stmt): Likewise.
5222 (finish_then_clause): Likewise.
5223 (begin_while_stmt): Likewise.
5224 (begin_do_stmt): Likewise.
5225 (finish_return_stmt): Likewise.
5226 (begin_for_stmt): Likewise.
5227 (finish_break_stmt): Likewise.
5228 (finish_continue_stmt): Likewise.
5229 (begin_switch_stmt): Likewise.
5230 (finish_case_label): Likewise.
5231 (begin_try_block): Likewise.
5232 (begin_function_try_block): Likewise.
5233 (begin_handler): Likewise.
5234 (begin_catch_block): Likewise.
5235 (begin_compound_stmt): Likewise.
5236 (begin_asm_stmt): Likewise.
5237 (finish_asm_stmt): Likewise.
5238 (finish_label_stmt): Likewise.
5239 (add_decl_stmt): Likewise.
5240 (finish_subobject): Likewise.
5241 (finish_decl_cleanup): Likewise.
5242 (finish_named_return_value): Likewise.
5243 (setup_vtbl_ptr): Likewise.
5244 (add_scope_stmt): Likewise.
5245 (finish_stmt_expr): Likewise.
5246 (prune_unused_decls): Remove.
5247 (begin_stmt_tree): Likewise.
5248 (finish_stmt_tree): Likewise.
5249 (prep_stmt): Adjust use of current_stmt_tree.
5250 (lang_expand_stmt): Likewise.
5251 * tree.c (statement_code_p): Remove.
5252 (cp_statement_code_p): New function.
5253 (walk_stmt_tree): Remove.
5254 (init_tree): Set lang_statement_code_p.
5256 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
5258 Integrated preprocessor.
5260 * Make-lang.in, Makefile.in: Remove all references to input.c,
5261 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
5262 * gxx.gperf, hash.h, input.c: Delete.
5263 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
5264 initialized properly.
5266 * class.c (fixup_pending_inline): Take a tree, not a
5267 struct pending_inline *. All callers changed.
5268 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
5269 RID_PROTECTED entries in ridpointers[] array here.
5270 * decl.c (duplicate_decls): Do not refer to struct
5272 (record_builtin_type, init_decl_processing): Use RID_MAX not
5274 (grokdeclarator): Use C_IS_RESERVED_WORD.
5275 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
5277 (grok_x_components): Do not inspect pending_inlines chain.
5279 * cp-tree.h (struct lang_identifier): Add rid_code entry.
5280 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
5281 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
5282 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
5283 TIME_IDENTIFIER_FILEINFO): Kill.
5285 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
5287 * parse.y: Call do_pending_inlines unconditionally.
5288 reinit_parse_for_method is now snarf_method. fn.defpen is no
5289 longer necessary. Remove unnecessary <itype> annotation on
5290 SCOPE. Do not refer to end_of_file or struct pending_inline.
5291 * semantics.c (begin_inline_definitions): Call
5292 do_pending_inlines unconditionally.
5294 * lex.c: Remove all code now shared with C front end.
5295 Initialize cpplib properly if USE_CPPLIB. Put reserved words
5296 into the get_identifier table. Rewrite pragma handling to
5297 work with the registry. Move code to save tokens for later
5298 processing to spew.c.
5300 * spew.c: Rewrite everything in terms of token streams instead
5301 of text. Move routines here from lex.c / input.c as
5302 appropriate. GC-mark trees hanging off the pending inlines
5305 2000-09-06 Mark Mitchell <mark@codesourcery.com>
5307 * NEWS: Mention that the named return value extension has been
5309 * cp-tree.h (original_result_rtx): Define.
5310 (TREE_REFERENCE_EXPR): Remove.
5311 (DECL_VPARENT): Likewise.
5312 (pushdecl_nonclass_level): Likewise.
5313 (store_return_init): Likewise.
5314 (reinit_lang_specific): Likewise.
5315 (genrtl_named_return_value): Change prototype.
5316 * decl.c (original_result_rtx): Remove.
5317 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
5318 Do not generate RTL for local variables here.
5319 (store_return_init): Remove.
5320 * semantics.c (genrtl_named_return_value): Simplify. Fold in
5322 (finish_named_return_value): Adjust accordingly. Warn that this
5323 extension is deprecated.
5324 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
5326 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
5328 * pt.c (type_unification_real): Replace switch with if.
5329 (unify): Tsubst non-type parms before comparing.
5331 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
5333 * error.c (dump_typename): New function, broken out of ...
5334 (dump_type): ... here. Use it.
5335 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
5337 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
5339 * init.c (build_offset_ref): Deal with namespace scoped
5342 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
5344 * class.c (resolve_address_of_overloaded_function): Add
5345 explanation message.
5346 * decl.c (define_case_label): Reformat explanation.
5347 * decl2.c (finish_static_data_member_decl): Likewise.
5348 (grokfield): Likewise.
5349 * friend.c (do_friend): Likewise.
5351 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
5353 * tree.c (walk_tree): Expose tail recursion.
5354 (walk_stmt_tree): New function.
5355 * cp-tree.h: Prototype walk_stmt_tree.
5356 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
5357 the BLOCKs directly. If a BLOCK has no variables after
5358 pruning, discard it.
5359 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
5360 restore the line number.
5362 2000-09-05 Mark Mitchell <mark@codesourcery.com>
5364 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
5365 (pt.o): Remove dependency on HTAB_H.
5366 * cp-tree.h: Include hashtab.h.
5367 (walk_tree): Change prototype.
5368 (walk_tree_without_duplicates): New function.
5369 * decl.c (check_default_argument): Use it.
5370 * optimize.c (remap_decl): Adjust calls to walk_tree.
5371 (copy_body): Likewise.
5372 (expand_calls_inline): Likewise.
5373 (calls_setjmp_p): Use walk_tree_without_duplicates.
5374 * pt.c: Don't include hashtab.h.
5375 (for_each_template_parm): Use walk_tree_without_duplicates.
5376 * semantics.c (finish-stmt_tree): Likewise.
5377 (expand_body): Likewise.
5378 * tree.c (walk_tree): Add additional parameter.
5379 (walk_tree_without_duplicates): New function.
5380 (count_trees): Use it.
5381 (verify_stmt_tree): Adjust call to walk_tree.
5382 (find_tree): Use walk_tree_without_duplicates.
5383 (no_linkage_check): Likewise.
5384 (break_out_target_exprs): Adjust call to walk_tree.
5385 (cp_unsave): Likewise.
5387 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5389 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
5390 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
5391 * cp-tree.h (TYPE_BINFO): Adjust comment.
5392 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
5393 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
5394 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
5395 (TYPE_TEMPLATE_INFO): Likewise.
5396 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
5397 * class.c (push_nested_class): Likewise.
5398 * decl.c (lookup_name_real): Likewise.
5399 (grokdeclarator): Likewise.
5400 (grok_op_properties): Likewise.
5401 (xref_tag): Likewise.
5402 (xref_basetypes): Likewise.
5403 * decl2.c (constructor_name_full): Likewise.
5404 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
5405 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
5406 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
5407 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
5408 (dump_type_suffix): Likewise.
5409 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
5411 (get_aggr_from_typedef): Likewise.
5412 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
5413 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
5414 (write_template_parm): Likewise.
5415 (write_template_template_parm): Check tree code instead of
5416 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5417 * method.c (build_overload_nested_name): Add
5418 BOUND_TEMPLATE_TEMPLATE_PARM.
5419 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
5420 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
5421 * pt.c (convert_template_argument): Check tree code instead of
5422 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5423 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
5424 (for_each_template_parm): Adjust comment.
5425 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
5426 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
5427 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
5428 template_args_equal to compare template template parameter cases.
5429 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
5430 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
5432 * tree.c (copy_template_template_parm): Decide whether to create
5433 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
5434 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
5435 (copy_tree_r): Likewise.
5436 * typeck.c (comptypes): Likewise. Check tree code instead of
5437 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
5439 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
5441 * decl.c (finish_function): Move the code for handling functions
5442 marked with the constructor and destructor attributes inside the
5445 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
5447 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
5449 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
5451 * pt.c (lookup_template_class): Remove abort.
5452 * tree.c (get_type_decl): Allow error_mark_node.
5454 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
5456 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
5459 2000-09-03 Mark Mitchell <mark@codesourcery.com>
5461 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
5464 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
5466 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
5467 union tag mismatch error reporting.
5469 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
5471 * call.c (build_scoped_method_call): Check it is not a namespace.
5473 2000-08-30 Jason Merrill <jason@redhat.com>
5475 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
5477 * tree.c (bot_manip): Check TREE_CONSTANT rather than
5478 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
5479 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
5481 * decl.c (start_function): Always call make_function_rtl.
5483 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
5485 * semantics.c (prune_unused_decls): New function.
5486 (finish_stmt_tree): Call it via walk_tree.
5488 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
5490 * class.c (build_secondary_vtable): Constify a char *.
5491 * decl.c (init_decl_processing): Initialize function_id_node,
5492 pretty_function_id_node, and func_id_node.
5493 * input.c (struct input_source): Constify 'str'.
5494 (feed_input): Constify first argument.
5495 * mangle.c (write_identifier): Constify argument.
5496 * pt.c (mangle_class_name_for_template): Constify argument.
5498 2000-08-29 Mark Mitchell <mark@codesourcery.com>
5500 * typeck.c (mark_addressable): Remove code that pokes around in
5503 2000-08-28 Jason Merrill <jason@redhat.com>
5505 * lex.c (file_name_nondirectory): Move to toplev.c.
5507 * cp-tree.h (LOCAL_CLASS_P): New macro.
5508 * class.c (finish_struct_1): Use it.
5510 2000-08-27 Alex Samuel <samuel@codesourcery.com>
5512 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
5513 (write_encoding): Pass another argument to write_name.
5514 (write_name): Add ignore_local_scope parameter. Fix handling of
5516 (write_nested_name): Use write_unqualified_name.
5517 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
5518 (write_template_prefix): Use write_unqualified_name.
5519 (write_component): Remove.
5520 (write_local_name): Add parameter. Use direct local entity to
5521 discriminator calculation.
5522 (write_class_enum_type): Pass another argument to write_name.
5523 (write_template_template_arg): Likewise.
5524 (make_guard_variable): Likewise.
5526 2000-08-27 Jason Merrill <jason@redhat.com>
5528 * decl.c (pushdecl): Matching decls for local externs are found in
5529 the current level. Propagate linkage information from previous
5532 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
5534 * ir.texi (Expressions): Fix typo.
5536 2000-08-25 Greg McGary <greg@mcgary.org>
5538 * tree.c (init_tree): Use ARRAY_SIZE.
5540 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
5542 * error.c (cp_tree_printer): Rework.
5544 2000-08-25 Mark Mitchell <mark@codesourcery.com>
5546 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
5548 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
5549 (cp-demangle.o): Remove target.
5550 (dyn-string.o): Likewise.
5552 * decl.c (grokfndecl): Require that `main' return an `int'.
5553 * mangle.c (write_encoding): Don't mangle return types for
5554 conversion functions.
5556 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
5558 * error.c (tree_formatting_info): New data type.
5559 (tree_being_formatted): New macro.
5560 (tree_formatting_flags): Likewise.
5561 (put_whitespace): Likewise.
5562 (print_tree_identifier): Likewise.
5563 (print_identifier): Likewise.
5564 (cp_tree_printer, print_function_argument_list, print_declaration,
5565 print_expression, print_function_declaration,
5566 print_function_parameter, print_type, print_cv_qualifier): New
5568 (init_error): Initialize lang_printer.
5570 2000-08-24 Jason Merrill <jason@redhat.com>
5572 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
5573 adjustment necessary.
5575 2000-08-24 Greg McGary <greg@mcgary.org>
5577 * cp-tree.h (MAIN_NAME_P): Remove macro.
5579 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
5581 * error.c (print_instantiation_context): Don't forget to flush the
5584 2000-08-23 Jason Merrill <jason@redhat.com>
5586 * typeck.c (build_ptrmemfunc): Save the input pmf.
5588 * method.c (process_modifiers): Use same_type_p.
5590 2000-08-23 Mark Mitchell <mark@codesourcery.com>
5592 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
5593 * mangle.c (write_function_type): Change prototype.
5594 (write_encoding): Don't mangle return types for
5595 constructors or destructors.
5596 (write_type): Adjust call to write_function_type.
5597 * pt.c (instantiate_template): Instantiate alternate entry points
5598 when instantiating the main function.
5600 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
5602 * error.c (cp_print_error_function): Don't use embedded '\n' in
5605 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
5607 * decl.c (init_decl_processing): Remove bogus initialization.
5608 * error.c (lang_print_error_function): Restore here.
5609 (init_error): Initialize print_error_function.
5611 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5613 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
5615 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
5617 * Makefile.in (error.o): Depends on diagnostic.h
5619 * cp-tree.h (problematic_instantiation_changed,
5620 record_last_problematic_instantiation, current_instantiation,
5621 print_instantiation_context): Declare.
5622 (maybe_print_template_context): Remove.
5624 * decl.c (init_decl_processing): Set print_error_function to NULL.
5625 (lang_print_error_function): Remove, since we're using a new
5628 * error.c: #include diagnostic.h
5629 (function_category): New function.
5630 (cp_diagnostic_starter): Likewise.
5631 (cp_diagnostic_finalizer): Likewise.
5632 (cp_print_error_function): Likewise.
5633 (maybe_print_instantiation_context): Likewise.
5634 (print_instantiation_full_context): Likewise.
5635 (print_instantiation_partial_context): Likewise.
5636 (print_instantiation_context): Define.
5637 (init_error): Initialize diagnostic pager and finalizer.
5639 * pt.c (problematic_instantiation_changed): Define.
5640 (record_last_problematic_instantiation): Likewise.
5641 (current_instantiation): Likewise.
5642 (maybe_print_template_context): Remove.
5643 (print_template_context): Likewise.
5644 (current_tinst_level): Make static to reflect Brendan Kehoe's
5645 change of 1995-04-13.
5646 (push_tinst_level): Call print_instantiation_context.
5648 2000-08-21 Nix <nix@esperi.demon.co.uk>
5650 * lang-specs.h: Do not process -o or run the assembler if
5653 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
5655 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
5657 * decl2.c (lang_decode_option): Disable gettext attributes for
5660 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
5662 * lex.c (lang_init_options): Default diagnostic message maximum
5663 length to 80, when line-wrapping.
5665 2000-08-20 Mark Mitchell <mark@codesourcery.com>
5667 * class.c (build_vtbl_initializer): Clear the entire
5668 vtbl_init_data. Start keeping track of the functions for which we
5669 have created vcall offsets here.
5670 (dfs_build_vcall_offset_vtbl_entries): Remove.
5671 (build_vcall_offset_vtbl_entries): Reimplement.
5672 (add_vcall_offset_vtbl_entries_r): New function.
5673 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
5674 computing when vcall offsets are necessary.
5676 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
5678 * decl.c (member_function_or_else): Use cp_error ... %T.
5679 (grokdeclarator): Likewise.
5680 (start_method): Likewise.
5681 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
5683 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
5685 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
5688 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
5690 * cp-tree.h (PTRMEM_OK_P): New macro.
5691 (itf_ptrmem_ok): New enumeration value.
5692 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
5693 argument. Diagnose implicit pointer to member.
5694 (instantiate_type): Don't diagnose implicit pointer to member
5695 here. Pass itf_ptrmem_ok if ok. Adjust calls to
5696 resolve_address_of_overloaded_function.
5697 * init.c (build_offset_ref): Set PTRMEM_OK_P.
5698 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
5699 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
5700 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
5701 (build_unary_op): Deal with single non-static member in
5704 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
5706 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
5708 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
5710 * cp-tree.h (enum_name_string): Remove prototype.
5711 (report_case_error): Remove prototype.
5712 * cp/typeck2.c (enum_name_string): Remove.
5713 (report_case_error): Remove.
5714 * error.c (dump_expr): Deal with enum values directly.
5715 Correctly negate integer constant.
5717 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
5719 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
5720 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
5721 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
5722 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
5723 (__cxa_vec_new): Use __cxa_vec_new2.
5724 (__cxa_vec_delete): Use __cxa_vec_delete2.
5726 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
5728 * vec.cc (__cxa_vec_new): Set "C" linkage.
5729 (__cxa_vec_ctor): Likewise.
5730 (__cxa_vec_cctor): Likewise.
5731 (__cxa_vec_dtor): Likewise.
5732 (__cxa_vec_delete): Likewise.
5733 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
5734 (__cxa_vec_ctor): Likewise.
5735 (__cxa_vec_cctor): Likewise.
5736 (__cxa_vec_dtor): Likewise.
5737 (__cxa_vec_delete): Likewise.
5739 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
5741 * class.c (instantiate_type): Reinstate local variable
5742 deleted in previous change.
5744 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
5747 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
5749 * cp-tree.h (instantiate_type_flags): New enumeration.
5750 (instantiate_type): Change parameter.
5751 * class.c (instantiate_type): Adjust prototype. Adjust.
5752 * call.c (standard_conversion): Adjust instantiate_type call.
5753 (reference_binding): Likewise.
5754 (build_op_delete_call): Likewise.
5755 (convert_like_real): Likewise.
5756 * cvt.c (cp_convert_to_pointer): Likewise.
5757 (convert_to_reference): Likewise.
5758 * pt.c (convert_nontype_argument): Likewise.
5759 * typeck.c (build_binary_op): Likewise.
5760 (build_ptrmemfunc): Likewise.
5761 (convert_for_assignment): Likewise.
5763 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
5765 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
5766 (current_aggr): Define.
5767 * decl.c (grokdeclarator): Make sure a friend class is an
5768 elaborated type specifier.
5769 * parse.y (current_aggr): Remove static definition.
5770 (cp_parse_init): Adjust.
5771 (structsp): Clear and restore current_aggr.
5772 (component_decl_list): Clear current_aggr.
5774 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
5775 aggregate tag on the typename's context.
5777 * pt.c (tsubst_friend_class): Return error_mark_node, if
5779 (instantiate_class_template): Ignore error_mark_node friend types.
5781 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
5783 * cvt.c (warn_ref_binding): New static function, broken out of ...
5784 (convert_to_reference): ... here. Use it.
5786 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
5788 * parse.y (template_arg): Add rule for template qualified with
5791 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5793 * decl2.c (add_function): Reorganize.
5794 (arg_assoc): Do not consider function template decls.
5796 2000-08-11 Jason Merrill <jason@redhat.com>
5798 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
5801 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
5803 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
5804 (lookup_nested_tag): Likewise.
5806 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
5809 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
5811 * parse.y (named_complex_class_head_sans_basetype): Remove
5814 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
5816 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
5817 explicit TEMPLATE_ID_EXPR args.
5818 (build_expr_from_tree, case CALL_EXPR): Likewise.
5820 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
5822 * decl.c (check_tag_decl): Diagnose typename's which don't
5825 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
5827 * init.c (build_aggr_init): Reject bogus array initializers
5830 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
5832 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
5834 * cp/tinfo.cc (__dynamic_cast): Likewise.
5835 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
5837 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
5839 * cvt.c (convert_to_pointer_force): Fix error message when
5840 attempting to cast from ambiguous base.
5842 2000-08-08 Jason Merrill <jason@redhat.com>
5844 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
5845 (tsubst_template_arg_vector): Likewise.
5847 * decl2.c (build_anon_union_vars): Choose the largest field; don't
5848 assume that one will be as large as the union.
5850 2000-08-07 Kazu Hirata <kazu@hxi.com>
5852 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
5853 * decl.c (pop_labels): Likewise.
5855 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
5857 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
5859 (__pointer_to_member_type_info): Likewise.
5860 (__base_class_info): Likewise.
5861 (__class_type_info): Likewise.
5862 (__si_class_type_info): Likewise.
5863 (__vmi_class_type_info): Likewise.
5864 * tinfo.cc (__si_class_type_info::__do_find_public_src):
5865 Changed member names to match specifications.
5866 (__vmi_class_type_info::__do_find_public_src): Likewise.
5867 (__si_class_type_info::__do_dyncast): Likewise.
5868 (__vmi_class_type_info::__do_dyncast): Likewise.
5869 (__si_class_type_info::__do_upcast): Likewise.
5870 (__vmi_class_type_info::__do_upcast): Likewise.
5871 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
5872 (__pbase_type_info::__pointer_catch): Likewise.
5873 (__pointer_type_info::__pointer_catch): Likewise.
5874 (__pointer_to_member_type_info::__pointer_catch): Likewise.
5876 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
5878 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
5879 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
5880 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
5882 2000-08-04 Mark Mitchell <mark@codesourcery.com>
5884 * cp-tree.h (add_method): Change prototype.
5885 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
5886 Don't double the size of the method vector in the error case.
5887 (handle_using_decl): Adjust call to add_method.
5888 (add_implicitly_declared_members): Likewise.
5889 (clone_function_decl): Likewise.
5890 * decl2.c (check_classfn): Likewise.
5891 * semantics.c (finish_member_declaration): Likewise.
5893 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
5895 * decl.c (flag_isoc94): New variable.
5897 2000-08-02 Jason Merrill <jason@redhat.com>
5899 * pt.c (do_type_instantiation): Add complain parm; don't complain
5900 if called recursively.
5901 * cp-tree.h, parse.y: Adjust.
5903 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
5905 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
5906 -Wno-strict-prototypes.
5908 * g++spec.c: Adjust type of second argument to
5909 lang_specific_driver, and update code as necessary.
5911 * cp-tree.h: Don't prototype min_precision here.
5912 (my_friendly_assert): Cast expression to void.
5913 * semantics.c (do_poplevel): Initialize scope_stmts.
5915 2000-08-02 Mark Mitchell <mark@codesourcery.com>
5917 * cp-tree.h (DECL_NEEDED_P): Tweak.
5919 2000-07-28 Jason Merrill <jason@redhat.com>
5921 * lang-specs.h: Use %i in rule for .ii files.
5923 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
5925 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
5927 2000-07-30 Mark Mitchell <mark@codesourcery.com>
5929 Allow indirect primary bases.
5930 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
5932 (CLASSTYPE_VFIELD_PARENT): Remove.
5933 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
5934 (BINFO_PRIMARY_BINFO): Remove.
5935 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
5936 (BINFO_VBASE_PRIMARY_P): Likewise.
5937 (BINFO_PRIMARY_BASE_OF): New macro.
5938 (BINFO_INDIRECT_PRIMARY_P): Likewise.
5939 (get_primary_binfo): New function.
5940 * decl.c (lang_mark_tree): Make lang_type::primary_base.
5941 * class.c (vcall_offset_data_s): Rename to ...
5942 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
5943 and add ctor_vtbl_p.
5944 (get_derived_offset): Use get_primary_binfo.
5945 (dfs_mark_primary_bases): Adjust handling of virtual primary
5947 (mark_primary_bases): Likewise.
5948 (set_primary_base): Take a binfo, not an integer, as a
5949 representation of the primary base.
5950 (indirect_primary_base_p): Remove.
5951 (determine_primary_base): Adjust for indirect primary bases.
5952 (dfs_find_final_overrider): Fix typo in coment.
5953 (update_vtable_entry_for_fn): Use get_primary_binfo.
5954 (layout_nonempty_base_or_field): Tweak.
5955 (build_base_fields): Adjust for new primary base semantics.
5956 (dfs_propagate_binfo_offsets): Remove.
5957 (propagate_binfo_offsets): Rewrite.
5958 (dfs_set_offset_for_shared_vbases): Remove.
5959 (layout_virtual_bases): Don't use it.
5960 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
5962 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
5963 CLASSTYPE_VFIELD_PARENT.
5964 (dfs_get_primary_binfo): New function.
5965 (get_primary_binfo): Likewise.
5966 (dump_class_hierarchy_r): Tweak printing of primary bases.
5967 (build_vtbl_initializer): Fix typo in comments. Use
5969 (build_vcall_and_vbase_vtbl_entries): Likewise.
5970 (build_vbaes_offset_vtbl_entries): Likewise.
5971 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
5972 BV_VCALL_INDEX to handle indirect primary bases.
5973 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
5974 (build_rtti_vtbl_entries): Likewise.
5975 * search.c (get_shared_vbase_if_not_primary): Tweak.
5976 (find_vbase_instance): Likewise.
5977 (binfo_for_vtable): Simplify.
5978 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
5979 (make_binfo): Make it have 11 entries.
5981 2000-07-30 Alex Samuel <samuel@codesourcery.com>
5983 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
5984 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
5985 ascertaining primaryness.
5986 (G): Remove template_args.
5987 (decl_is_template_id): New function.
5988 (write_encoding): Use decl_is_template_id.
5989 (write_name): Likewise. Handle type_decls. Get main variant of
5991 (write_nested_name): Likewise.
5992 (write_prefix): Likewise.
5993 (write_template_prefix): Likewise.
5994 (write_special_name_constructor): Remove defunct production from
5996 (write_bare_function_type): Remove comment about absent parameter.
5997 (write_template_template_arg): Add missing grammar production to
6000 2000-07-27 Jason Merrill <jason@redhat.com>
6002 * decl.c (duplicate_decls): If common_type produces a non-typedef
6003 type for a typedef, just use the old type.
6005 2000-07-27 Mark Mitchell <mark@codesourcery.com>
6007 * cp-tree.h (function_depth): Declare.
6008 (verify_stmt_tree): Likewise.
6009 (find_tree): Likewise.
6010 * decl.c (function_depth): Give it external linkage.
6011 * optimize.c (optimize_function): Increment and decrement it.
6012 * tree.c (verify_stmt_tree_r): New function.
6013 (verify_stmt_tree): Likewise.
6014 (find_tree_r): Likewise.
6015 (find_tree): Likewise.
6017 2000-07-27 Jason Merrill <jason@redhat.com>
6019 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
6021 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
6023 2000-07-26 Mark Mitchell <mark@codesourcery.com>
6025 * decl.c (start_cleanup_fn): Mark the function as `inline'.
6026 * decl2.c (get_guard): Call cp_finish_decl, not
6027 rest_of_decl_compilation, for local guards.
6028 * lex.c (do_identifier): Remove unused variable.
6030 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
6032 * parse.y: Add missing ';'.
6034 2000-07-26 Mark Mitchell <mark@codesourcery.com>
6036 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
6039 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
6041 Kill strict_prototype. Backwards compatibility only for
6042 non NO_IMPLICIT_EXTERN_C systems.
6043 * cp-tree.h (flag_strict_prototype): Remove.
6044 (strict_prototype): Remove.
6045 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
6046 * decl.c (maybe_push_to_top_level): Adjust.
6047 (pop_from_top_level): Adjust.
6048 (decls_match): Only allow sloppy parm matching for ancient
6050 (init_decl_processing): Adjust.
6051 (grokdeclarator): Adjust.
6052 * decl2.c (flag_strict_prototype): Remove.
6053 (strict_prototype): Remove.
6054 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
6055 (lang_f_options): Remove "strict-prototype".
6056 (unsupported-options): Add "strict-prototype".
6057 * lex.c (do_identifier): Adjust.
6058 (do_scoped_id): Adjust.
6059 * parse.y (empty_parms): Adjust.
6060 * class.c (push_lang_context): Adjust.
6061 (pop_lang_context): Adjust.
6062 * typeck.c (comp_target_parms): Adjust.
6064 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
6066 * decl.c (poplevel): Deal with anonymous variables at for scope.
6067 (maybe_inject_for_scope_var): Likewise.
6069 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
6071 * decl.c: Remove all signal handling code, now done in toplev.c.
6073 2000-07-23 Mark Mitchell <mark@codesourcery.com>
6075 * decl.c (make_rtl_for_nonlocal_decl): Rework.
6077 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
6080 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
6082 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
6083 Define my_friendly_assert and my_friendly_abort as macros
6084 which may call friendly_abort. Prototype friendly abort, not
6085 my_friendly_abort or my_friendly_assert.
6086 * decl.c (signal_catch): Report the signal caught in the error
6087 message. Call fatal directly.
6088 * typeck2.c (ack, my_friendly_assert): Delete.
6089 (my_friendly_abort): Rename to friendly_abort. Expect file,
6090 line, and function parameters. Report the abort code, then
6091 call fancy_abort. Do not mask an abort if errors have
6094 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
6096 * typeck.c (comp_target_parms): Remove obsolete parameter.
6097 (comp_target_types): Adjust.
6099 2000-07-17 Jason Merrill <jason@redhat.com>
6101 * typeck.c (mark_addressable): Never set TREE_USED.
6102 * call.c (build_call): Don't abort on calls to library functions
6103 that have been declared normally.
6105 * typeck.c (build_binary_op): Fix grammar in warning.
6107 * exception.cc (__eh_free): Fix prototype.
6109 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
6111 * decl.c (pushdecl): Handle seeing an OVERLOAD in
6112 IDENTIFIER_NAMESPACE_VALUE.
6114 2000-07-16 Mark Mitchell <mark@codesourcery.com>
6116 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
6117 * method.c (use_thunk): Correct handling of vcall offsets.
6119 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
6121 * .cvsignore: parse.h and parse.c have no cp- prefix.
6123 2000-07-13 Mark Mitchell <mark@codesourcery.com>
6125 * .cvsignore: New file.
6127 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
6129 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
6131 2000-07-12 Mark Mitchell <mark@codesourcery.com>
6133 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
6135 * parse.h: Likewise.
6137 2000-07-11 Mark Mitchell <mark@codesourcery.com>
6139 * class.c (layout_class_type): Add pointers to virtual bases after
6140 base classes under the old ABI.
6142 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
6144 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
6145 (finish_continue_stmt): Likewise.
6146 (begin_for_stmt): Remove call to note_level_for_for.
6147 (finish_goto_stmt): Change call from build_min_nt
6149 (finish_expr_stmt): Likewise.
6150 (begin_if_stmt): Likewise.
6151 (begin_while_stmt): Likewise.
6152 (finish_while_stmt): Likewise.
6153 (finish_return_stmt): Likewise.
6154 (begin_for_stmt): Likewise.
6155 (finish_for_stmt): Likewise.
6156 (finish_break_stmt): Likewise.
6157 (begin_switch_stmt): Likewise.
6158 (finish_case_label): Likewise.
6159 (genrtl_try_block): Likewise.
6160 (begin_try_block): Likewise.
6161 (begin_handler): Likewise.
6162 (begin_compound_stmt): Likewise.
6163 (finish_asm_stmt): Likewise.
6164 (finish_label_stmt): Likewise.
6165 (add_decl_stmt): Likewise.
6166 (finish_subobject): Likewise.
6167 (finish_decl_cleanup): Likewise.
6168 (finish_named_return_value): Likewise.
6169 (setup_vtbl_ptr): Likewise.
6170 (add_scope_stmt): Likewise.
6171 * decl.c (finish_constructor_body): Likewise.
6172 (finish_destructor_body): Likewise.
6173 * optimize.c (copy_body_r): Likewise.
6174 (initialize_inlined_parameters): Likewise.
6175 (declare_return_variable): Likewise.
6176 (expand_call_inline): Likewise.
6178 2000-07-10 Jakub Jelinek <jakub@redhat.com>
6180 * semantics.c (expand_body): Sync interface information
6181 at the end of function body expansion.
6183 2000-07-09 Jason Merrill <jason@redhat.com>
6185 * init.c (build_new_1): Bail early if the call to new fails.
6187 * decl.c (compute_array_index_type): Check specifically for
6188 an INTEGER_CST, not just TREE_CONSTANT.
6190 * decl.c (duplicate_decls): Don't call duplicate_decls on
6191 the DECL_TEMPLATE_RESULT.
6192 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
6195 * error.c (dump_template_bindings): Don't crash if we had an
6196 invalid argument list.
6198 * typeck.c (c_expand_start_case): Do narrowing here.
6199 * semantics.c (finish_switch_cond): Not here.
6201 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
6203 * parse.y (asm_clobbers): Do string concatenation.
6205 2000-07-09 Mark Mitchell <mark@codesourcery.com>
6207 * decl.c (pushtag): Don't put local classes in template functions
6208 on the local_classes list.
6210 2000-07-04 Scott Snyder <snyder@fnal.gov>
6212 * decl2.c (get_guard): Add missing return for old ABI local
6215 2000-07-09 Mark Mitchell <mark@codesourcery.com>
6217 * cp-tree.h (char_type_p): New function.
6218 * decl.c (init_decl_processing): Don't initialize
6219 signed_wchar_type_node or unsigned_wchar_type_node.
6220 (complete_array_type): Handle brace-enclosed string-constants.
6221 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
6222 * tree.c (char_type_p): New function.
6223 * typeck2.c (digest_init): Use char_type_p.
6225 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
6227 * pt.c (tsubst): Don't layout type, if it's error_mark.
6229 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
6231 * pt.c (instantiate_pending_templates): Reset template level.
6233 2000-07-05 Jason Merrill <jason@redhat.com>
6235 * call.c (joust): Don't complain about `operator char *()' beating
6236 `operator const char *() const'.
6238 2000-07-04 scott snyder <snyder@fnal.gov>
6239 Jason Merrill <jason@redhat.com>
6241 * repo.c (repo_get_id): Handle the case where a class with virtual
6242 bases has a null TYPE_BINFO_VTABLE.
6244 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
6245 Jason Merrill <jason@redhat.com>
6247 * parse.y (member_init): Just pass in the type.
6248 * init.c (expand_member_init): Handle getting a type.
6250 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6251 Jason Merrill <jason@redhat.com>
6253 * decl.c (finish_function): Warn if a function has no return
6255 Suggested by Andrew Koenig.
6256 * typeck.c (check_return_expr): Do set current_function_returns_value
6257 if we got an error_mark_node.
6259 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
6261 * decl2.c (push_decl_namespace): Push the original namespace.
6263 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
6265 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
6266 * semantics.c (begin_class_definition): Clear it.
6268 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
6270 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
6271 (genrtl_expr_stmt): Likewise.
6272 (genrtl_decl_stmt): Likewise.
6273 (genrtl_if_stmt): Likewise.
6274 (genrtl_while_stmt): Likewise.
6275 (genrtl_do_stmt): Likewise.
6276 (genrtl_return_stmt): Likewise.
6277 (genrtl_for_stmt): Likewise.
6278 (genrtl_break_stmt): Likewise.
6279 (genrtl_continue_stmt): Likewise.
6280 (genrtl_scope_stmt): Likewise.
6281 (genrtl_switch_stmt): Likewise.
6282 (genrtl_case_label): Likewise.
6283 (genrtl_begin_compound_stmt): Likewise.
6284 (genrtl_finish_compound_stmt): Likewise.
6285 (genrtl_compound_stmt): Likewise.
6286 (genrtl_asm_stmt): Likewise.
6288 * init.c (begin_init_stmts): Remove call to
6289 genrtl_begin_compound_stmt.
6290 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
6292 * semantics.c (lang_expand_stmt): Changed call to
6293 genrtl_compound_stmt to ignore return value.
6295 2000-07-02 Mark Mitchell <mark@codesourcery.com>
6297 * mangle.c (canonicalize_for_substitution): Return the canonical
6300 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
6302 * typeck.c (commonparms): Remove obstack manipulations.
6304 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
6306 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
6308 * Makefile.in (OBJS): Added ../c-semantics.o.
6309 (OBJDEPS): Likewise.
6311 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
6313 (struct stmt_tree): Added comment.
6314 (current_function_name_declared): Removed.
6315 (stmts_are_full_exprs_p): Likewise.
6316 (genrtl_do_pushlevel): Likewise.
6317 (genrtl_clear_out_block): Likewise.
6318 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
6319 (DECL_ANON_UNION_ELEMS): Likewise.
6320 (emit_local_var): Likewise.
6321 (make_rtl_for_local_static): Likewise.
6322 (do_case): Likewise.
6323 (expand_stmt): Likewise.
6324 (genrtl_decl_cleanup): Likewise.
6325 (c_expand_asm_operands): Likewise.
6326 (c_expand_return): Likewise.
6327 (c_expand_start_case): Likewise.
6329 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
6330 (emit_local_var): Likewise.
6331 (initialize_local_var): Change reference to
6332 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
6333 Change reference to stmts_are_full_exprs_p to
6334 current_stmt_tree->stmts_are_full_exprs_p.
6335 (push_cp_function_context): Likewise.
6337 * expect.c (expand_throw): Change reference to
6338 stmts_are_full_exprs_p.
6340 * init.c (build_aggr_init): Change reference to
6341 stmts_are_full_exprs_p.
6342 (build_vec_init): Likewise.
6344 * optimize.c (maybe_clone_body): Change reference to
6345 current_function_name_declared to
6346 cp_function_chain->name_declared.
6348 * pt.c (instantiate_decl): Change reference to
6349 current_function_name_declared to
6350 cp_function_chain->name_declared.
6352 * semantics.c (expand_cond): Moved declaration to c-common.h.
6353 (genrtl_do_pushlevel): Moved to c-semantics.c.
6354 (genrtl_clear_out_block): Likewise.
6355 (genrtl_goto_stmt): Likewise.
6356 (genrtl_expr_stmt): Likewise.
6357 (genrtl_decl_stmt): Likewise.
6358 (gerntl_if_stmt): Likewise.
6359 (genrtl_while_stmt): Likewise.
6360 (genrtl_do_stmt): Likewise.
6361 (genrtl_return_stmt): Likewise.
6362 (genrtl_for_stmt): Likewise.
6363 (genrtl_break_stmt): Likewise.
6364 (genrtl_continue_stmt): Likewise.
6365 (genrtl_scope_stmt): Likewise.
6366 (genrtl_switch_stmt): Likewise.
6367 (genrtl_case_label): Likewise.
6368 (genrtl_begin_compound_stmt): Likewise.
6369 (genrtl_finish_compound_stmt): Likewise.
6370 (genrtl_compound_stmt): Likewise.
6371 (genrtl_asm_stmt): Likewise.
6372 (genrtl_decl_cleanup): Likewise.
6373 (expand_cond): Likewise.
6374 (expand_stmt): Renamed to ...
6375 (lang_expand_stmt): ... this.
6376 (lang_expand_expr_stmt): Initialize.
6377 (set_current_function_name_declared): Likewise.
6378 (stmts_are_full_exprs_p): Likewise.
6379 (current_function_name_declared): Likewise.
6380 (anon_aggr_type_p): Likewise.
6381 (do_poplevel): Change reference to
6382 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
6383 Change reference to stmts_are_full_exprs_p to
6384 current_stmt_tree->stmts_are_full_exprs_p.
6385 (add_tree): Likewise.
6386 (finish_expr_stmt): Likewise.
6387 (prep_stmt): Likewise.
6388 (lang_expand_stmt): Likewise.
6389 (begin_compound_stmt): Change reference to
6390 current_function_name_declared to
6391 cp_function_chain->name_declared and call to
6392 current_function_name_declared().
6393 (setup_vtbl_ptr): Likewise.
6394 (genrtl_do_poplevel): Removed.
6396 2000-06-30 Jason Merrill <jason@redhat.com>
6398 * init.c (init_init_processing): Go back to aligning like
6399 double_type_node for old ABI.
6400 (get_cookie_size): Make cookie larger if we get a type that needs
6402 (build_vec_delete): Call it.
6404 * typeck.c (qualify_type_recursive): New fn.
6405 (composite_pointer_type): Use it.
6406 (build_binary_op): Use composite_pointer_type.
6408 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
6409 Jason Merrill <jason@redhat.com>
6411 * typeck.c (check_return_expr): Don't complain about returning
6412 NULL from operator new if -fcheck-new.
6413 * cp-tree.h: Declare flag_check_new here.
6416 2000-06-28 Alex Samuel <samuel@codesourcery.com>
6418 * mangle.c (find_substitution): Use same_type_p.
6419 (write_encoding): Don't check for substitutions.
6421 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
6423 * parse.y (expr_no_comma_rangle): New non-terminal.
6424 (template_parm): Use it for default parameter case.
6425 (template_arg): Use it.
6426 (expr_no_commas): Remove commented out undefined extensions.
6427 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
6428 * parse.h, parse.c: Rebuilt.
6430 2000-06-30 Mark Mitchell <mark@codesourcery.com>
6432 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
6433 (finish_asm_stmt): Do it here, instead.
6435 * cp-tree.h (ridpointers): Don't declare.
6436 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
6437 (record_builtin_java_type): Likewise.
6438 (init_decl_processing): Likewise.
6439 * lex.c: Move inclusion of lex.h.
6440 (ridpointers): Don't define.
6441 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
6443 * lex.h (enum rid): Rename to ...
6444 (enum cp_rid): ... this.
6445 (ridpointers): Don't declare.
6446 * parse.y: Move inclusion of lex.h.
6447 * parse.c: Regenerated.
6448 * spew.c: Move inclusion of lex.h.
6450 * cp-tree.h (struct language_function): Remove temp_name_counter.
6451 (temp_name_counter): Remove.
6452 (get_temp_name): Change prototype.
6453 (get_guard): New function.
6454 (get_guard_cond): Likewise.
6455 (set_guard): Likewise.
6456 * cvt.c (build_up_reference): Adjust call to get_temp_name.
6457 * decl.c (expand_static_init): Use get_guard and friends to
6458 implement guard variables.
6459 * decl2.c (get_temp_name): Assume that the variables created are
6461 (get_sentry): Rename to ...
6462 (get_guard): ... this. Implement new ABI guard variables.
6463 (get_guard_bits): New function.
6464 (get_guard_cond): Likewise.
6465 (set_guard): Likewise.
6466 (start_static_initialization_or_destruction): Use them.
6467 (do_static_initialization): Replace sentry with guard throughout.
6468 (do_static_destruction): Likewise.
6469 * init.c (create_temporary_var): Add comment.
6471 2000-06-28 Alex Samuel <samuel@codesourcery.com>
6473 * mangle.c (find_substitution): Use same_type_p.
6474 (write_encoding): Don't check for substitutions.
6476 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
6478 * parse.y (expr_no_comma_rangle): New non-terminal.
6479 (template_parm): Use it for default parameter case.
6480 (template_arg): Use it.
6481 (expr_no_commas): Remove commented out undefined extensions.
6482 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
6483 * parse.h, parse.c: Rebuilt.
6485 2000-06-29 Mark Mitchell <mark@codesourcery.com>
6487 * cp-tree.h (flag_const_strings): Remove.
6488 (warn_parentheses): Likewise.
6489 (warn_format): Likewise.
6490 (common_type): Likewise.
6491 (default_conversion): Likewise.
6492 (build_binary_op): Likewise.
6493 (cp_build_binary_op): New macro.
6494 * call.c (build_new_op): Use cp_build_binary_op instead of
6496 * class.c (build_vtable_entry_ref): Likewise.
6497 * decl.c (expand_static_init): Likewise.
6498 (compute_array_index_type): Likewise.
6499 (build_enumerator): Likewise.
6500 * decl2.c (delete_sanity): Likewise.
6501 (start_static_initialization_or_destruction): Likewise.
6502 * error.c (dump_type_suffix): Likewise.
6503 * init.c (resolve_offset_ref): Likewise.
6504 (build_new): Likewise.
6505 (build_new_1): Likewise.
6506 (build_vec_delete_1): Likewise.
6507 (build_vec_init): Likewise.
6508 (build_delete): Likewise.
6509 * rtti.c (synthesize_tinfo_fn): Likewise.
6510 (synthesize_tinfo_var): Likewise.
6511 * search.c (expand_upcast_fixups): Likewise.
6512 (fixup_all_virtual_upcast_offsets): Likewise.
6513 * typeck.c (build_array_ref): Likewise.
6514 (get_member_function_from_ptrfunc): Likewise.
6515 (build_binary_op): Add parameter.
6516 (pointer_int_sum): Use cp_build_binary_op.
6517 (pointer_diff): Likewise.
6518 (build_modify_expr): Likewise.
6519 (get_delta_difference): Likewise.
6520 (build_ptrmemfunc): Likewise.
6522 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
6524 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
6525 * decl.c (create_implicit_typedef): Adjust.
6526 * decl2.c (build_artificial_parm): Adjust.
6527 * method.c (implicitly_declare_fn): Adjust.
6528 * pt.c (push_inline_template_parms_recursive): Adjust.
6529 (process_template_parm): Adjust.
6530 (overloaded_template_name): Adjust.
6531 * semantics.c (finish_template_template_parm): Adjust.
6533 2000-06-28 Mark Mitchell <mark@codesourcery.com>
6535 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
6536 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
6537 where to emit thunks.
6538 (build_vtt): Adjust call to build_vtt_inits.
6539 (build_vtt_inits): Add parameter to indicate whether or not
6540 sub-VTTs for virtual bases should be included. Adjust handling of
6541 construction vtables.
6542 (get_matching_base): New function.
6543 (dfs_build_vtt_inits): Rename to ...
6544 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
6545 construction vtables.
6546 (dfs_fixup_binfo_vtbls): Likewise.
6547 (build_ctor_vtbl_groups): Build construction vtables for virtual
6549 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
6550 to build construction vtbls.
6551 (dfs_accumulate_vtbl_inits): Adjust handling of
6552 construction vtables.
6554 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
6557 2000-06-27 Mark Mitchell <mark@codesourcery.com>
6559 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
6561 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
6563 * search.c (hides): Remove.
6564 (is_subobject_of_p): Add most_derived parameter. Use
6566 (lookup_field_queue_p): Adjust.
6567 (lookup_field_r): Adjust.
6569 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
6571 * decl2.c (handle_class_head): Bash typedefs to the type's main
6574 2000-06-25 Mark Mitchell <mark@codesourcery.com>
6576 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
6577 (begin_global_stmt_expr): ... this.
6578 (genrtl_finish_stmt_expr): Rename to ...
6579 (finish_global_stmt_expr): ... this.
6580 * init.c (begin_init_stmts): Adjust calls.
6581 (finish_init_stmts): Likewise.
6582 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
6583 (begin_global_stmt_expr): ... this.
6584 (genrtl_finish_stmt_expr): Rename to ...
6585 (finish_global_stmt_expr): ... this.
6587 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6589 * search.c (lookup_member): Fix typo in comment.
6591 2000-06-24 Jason Merrill <jason@redhat.com>
6593 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
6594 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
6596 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6598 * parse.y (complex_direct_notype_declarator): Support global_scope.
6599 * Makefile.in: Adjust conflict count.
6601 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
6603 * parse.y (template_arg): Convert TEMPLATE_DECL
6604 that is a template template parameter to
6605 TEMPLATE_TEMPLATE_PARM here.
6607 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
6608 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
6609 (copy_template_template_parm): Adjust prototype.
6610 * decl.c (grokdeclarator): Remove dead code.
6611 * pt.c (process_template_parm): Tidy.
6612 (lookup_template_class): Construct nodes in
6613 copy_template_template_parm.
6614 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
6615 lookup_template_class. Use TYPE_TI_TEMPLATE.
6616 * tree.c (copy_template_template_parm): Add NEWARGS
6618 (mapcar): Adjust call to copy_template_template_parm.
6619 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
6620 * method.c (build_template_template_parm_names): Change error
6621 code to avoid compilation warning.
6623 * gxxint.texi: Document template template parameter
6626 2000-06-21 Alex Samuel <samuel@codesourcery.com>
6628 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
6629 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
6630 (cp-demangle.o): New rule.
6631 (dyn-string.o): Likewise.
6632 * inc/cxxabi.h (__cxa_demangle): New declaration.
6634 2000-06-22 Mark Mitchell <mark@codesourcery.com>
6636 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
6637 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
6638 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
6640 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
6641 (make_thunk): Change prototype.
6642 (emit_thunk): Rename to use_thunk.
6643 (mangle_thunk): Change prototype.
6644 * class.c (get_derived_offset): Simplify.
6645 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
6646 BV_GENERATE_THUNK_WITH_VTABLE_P.
6647 (build_primary_vtable): Simplify.
6648 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
6649 (dfs_find_base): Remove.
6650 (update_vtable_entry_for_fn): Correct bug in finding the base
6651 where a virtual function was first declared. Figure out whether
6652 or not to emit a vcall-thunk with the vtables in which it appears.
6653 Correct logic for deciding whether to use an ordinary thunk, or a
6655 (finish_struct_1): Remove unnecssary code.
6656 (build_vtbl_initializer): Use ssize_int for the running counter of
6658 (build_vtbl_initializer): Only use vcall thunks where necessary.
6659 Mark thunks as needing to be emitted with their vtables, or not.
6660 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
6661 indices. Use size_binop.
6662 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
6663 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
6665 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
6666 (build_vtable_entry): Mark thunks as needing to be emitted with
6667 their vtables, or not.
6668 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
6669 * decl2.c (mark_vtable_entries): Use use_thunk instead of
6671 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
6673 * error.c (dump_expr): Use BV_FN.
6674 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
6676 * method.c (make_thunk): Likewise.
6677 (emit_thunk): Rename to use_thunk. Allow callers to decide
6678 whether or not to actually emit the thunk. Adjust for changes in
6679 representation of vcall offsets.
6680 * search.c (dfs_get_pure_virtuals): Use BV_FN.
6681 * semantics.c (emit_associated_thunks): New function.
6682 (expand_body): Use it.
6683 * ir.texi: Adjust decriptions of thunks.
6685 2000-06-22 Jason Merrill <jason@redhat.com>
6687 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
6688 (tsubst_friend_function): Copy it here.
6690 * decl.c (grok_op_properties): Fix typo.
6692 * decl2.c (delete_sanity): Clarify warning, avoid failure on
6695 * pt.c (check_explicit_specialization): Clarify error.
6697 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
6698 an old OVERLOAD when we're declaring a non-function.
6699 (pushdecl, destroy_local_var): Check for error_mark_node.
6700 (warn_extern_redeclared_static): Also bail early if
6702 (push_overloaded_decl): Ignore an old error_mark_node.
6704 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
6706 * call.c (build_x_va_arg): Check if in a template decl.
6707 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
6709 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
6711 * class.c (push_lang_context): TYPE_NAME gets you to the Java
6713 * decl.c (check_goto): Computed gotos assumed OK.
6715 2000-06-20 Jason Merrill <jason@redhat.com>
6717 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
6718 for which we don't need to look for instantiations.
6720 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
6722 * parse.y (program): Always call finish_translation_unit.
6723 * parse.c, parse.h: Rebuilt.
6725 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
6727 * method.c: Don't include hard-reg-set.h.
6729 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
6731 * rtti.c (get_base_offset): Cope when vbase field is in a base.
6733 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
6735 * call.c (build_conditional_expr): Use VOID_TYPE_P.
6736 * cvt.c (cp_convert_to_pointer): Likewise.
6737 (convert_to_void): Likewise.
6738 * error.c (dump_expr): Likewise.
6739 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
6740 * init.c (build_delete): Likewise.
6741 * method.c (emit_thunk): Likewise.
6742 * optmize.c (declare_return_variable): Likewise.
6743 * rtti.c (get_tinfo_decl_dynamic): Likewise.
6744 (get_typeid): Likewise.
6745 (build_dynamic_cast_1): Likewise.
6746 * typeck.c (composite_pointer_type): Likewise.
6747 (common_type): Likewise.
6748 (build_indirect_ref): Likewise.
6749 (build_binary_op): Likewise.
6750 (build_x_compound_expr): Likewise.
6751 (check_return_expr): Likewise.
6752 * typeck2.c (add_exception_specifier): Likewise.
6754 * mangle.c (write_method_parms): Use direct comparison for end
6757 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
6759 * cp-tree.h (genrtl_try_block): Declare function.
6760 (genrtl_handler): Likewise.
6761 (genrtl_catch_block): Likewise.
6762 (genrtl_ctor_stmt): Likewise.
6763 (genrtl_subobject): Likewise.
6764 (genrtl_decl_cleanup): Likewise.
6765 (genrtl_do_poplevel): Likewise.
6766 (genrtl_do_pushlevel): Likewise.
6767 (genrtl_clear_out_block): Likewise.
6768 (genrtl_goto_stmt): Likewise.
6769 (genrtl_expr_stmt): Likewise.
6770 (genrtl_decl_stmt): Likewise.
6771 (genrtl_if_stmt): Likewise.
6772 (genrtl_while_stmt): Likewise.
6773 (genrtl_do_stmt): Likewise.
6774 (genrtl_return_stmt): Likewise.
6775 (genrtl_for_stmt): Likewise.
6776 (genrtl_break_stmt): Likewise.
6777 (genrtl_continue_stmt): Likewise.
6778 (genrtl_scope_stmt): Likewise.
6779 (genrtl_switch_stmt): Likewise.
6780 (genrtl_case_label): Likewise.
6781 (genrtl_begin_compound_stmt): Likewise.
6782 (genrtl_finish_compound_stmt): Likewise.
6783 (genrtl_compound_stmt): Likewise.
6784 (genrtl_asm_stmt): Likewise.
6785 (genrtl_named_return_value): Likewise.
6786 (genrtl_begin_stmt_expr): Likewise.
6787 (genrtl_finish_stmt_expr): Likewise.
6788 (finish_for_stmt): Removed first argument.
6789 (finish_switch_stmt): Likewise.
6791 * semantics.c (genrtl_try_block): Define function.
6792 (genrtl_handler): Likewise.
6793 (genrtl_catch_block): Likewise.
6794 (genrtl_ctor_stmt): Likewise.
6795 (genrtl_subobject): Likewise.
6796 (genrtl_decl_cleanup): Likewise.
6797 (genrtl_do_poplevel): Likewise.
6798 (genrtl_do_pushlevel): Likewise.
6799 (genrtl_clear_out_block): Likewise.
6800 (genrtl_goto_stmt): Likewise.
6801 (genrtl_expr_stmt): Likewise.
6802 (genrtl_decl_stmt): Likewise.
6803 (genrtl_if_stmt): Likewise.
6804 (genrtl_while_stmt): Likewise.
6805 (genrtl_do_stmt): Likewise.
6806 (genrtl_return_stmt): Likewise.
6807 (genrtl_for_stmt): Likewise.
6808 (genrtl_break_stmt): Likewise.
6809 (genrtl_continue_stmt): Likewise.
6810 (genrtl_scope_stmt): Likewise.
6811 (genrtl_switch_stmt): Likewise.
6812 (genrtl_case_label): Likewise.
6813 (genrtl_begin_compound_stmt): Likewise.
6814 (genrtl_finish_compound_stmt): Likewise.
6815 (genrtl_compound_stmt): Likewise.
6816 (genrtl_asm_stmt): Likewise.
6817 (genrtl_named_return_value): Likewise.
6818 (genrtl_begin_stmt_expr): Likewise.
6819 (genrtl_finish_stmt_expr): Likewise.
6820 (finish_for_stmt): Removed first argument and generate rtl
6822 (finish_switch_stmt): Likewise.
6823 (do_poplevel): Removed generate rtl specific code.
6824 (do_pushlevel): Likewise.
6825 (add_tree): Likewise.
6826 (finish_goto_stmt): Likewise.
6827 (finish_expr_stmt): Likewise.
6828 (begin_if_stmt): Likewise.
6829 (finish_if_stmt_cond): Likewise.
6830 (finish_then_clause): Likewise.
6831 (begin_else_clause): Likewise.
6832 (finish_else_clause): Likewise.
6833 (finish_if_stmt): Likewise.
6834 (clear_out_block): Likewise.
6835 (begin_while_stmt): Likewise.
6836 (finish_while_stmt_cond): Likewise.
6837 (finish_while_stmt): Likewise.
6838 (begin_do_stmt): Likewise.
6839 (finish_do_body): Likewise.
6840 (finish_do_stmt): Likewise.
6841 (finish_return_stmt): Likewise.
6842 (begin_for_stmt): Likewise.
6843 (finish_for_init_stmt): Likewise.
6844 (finish_for_cond): Likewise.
6845 (finish_for_expr): Likewise.
6846 (finish_break_stmt): Likewise.
6847 (finish_continue_stmt): Likewise.
6848 (begin_switch_stmt): Likewise.
6849 (finish_switch_cond): Likewise.
6850 (finish_case_label): Likewise.
6851 (begin_try_block): Likewise.
6852 (begin_function_try_block): Likewise.
6853 (finish_try_block): Likewise.
6854 (finish_cleanup_try_block): Likewise.
6855 (finish_cleanup): Likewise.
6856 (finish_function_try_block): Likewise.
6857 (finish_handler_sequence): Likewise.
6858 (finish_function_handler_sequence): Likewise.
6859 (begin_handler): Likewise.
6860 (finish_handler_parms): Likewise.
6861 (begin_catch_block): Likewise.
6862 (finish_handler): Likewise.
6863 (begin_compound_stmt): Likewise.
6864 (finish_compound_stmt): Likewise.
6865 (finish_asm_stmt): Likewise.
6866 (finish_label_stmt): Likewise.
6867 (finish_label_decl): Likewise.
6868 (finish_subobject): Likewise.
6869 (finish_decl_cleanup): Likewise.
6870 (finish_named_return_value): Likewise.
6871 (begin_stmt_expr): Likewise.
6872 (finish_stmt_expr): Likewise.
6874 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
6875 to call genrtl_expr_stmt when appropriate.
6877 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
6878 begin_compound_expr to call genrtl_begin_stmt_expr and
6879 genrtl_begin_compound_expr when appropriate.
6880 (finish_init_stmts): Changed calls to finish_compound_expr and
6881 finish_stmt_expr to call genrtl_finish_compound_expr and
6882 genrtl_finish_stmt_expr when appropriate.
6883 (expand_default_init): Changed call to finish_expr_stmt to call
6884 genrtl_expr_stmt when appropriate.
6885 (build_vec_init): Likewise.
6887 * parse.y (simple_stmt): Removed first argument from call to
6888 finish_for_stmt. Removed first argument from call to
6891 * parse.c: Regenerated.
6893 * pt.c (tsubst_expr): Removed first argument from call to
6894 finish_for_stmt. Removed first argument from call to
6897 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
6899 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
6900 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
6902 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
6903 (cplus_tree_code_length[]): Likewise.
6904 (cplus_tree_code_name[]): Likewise.
6905 (init_parse): Added call to add_c_tree_codes. Changed
6906 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
6908 2000-06-16 Mark Mitchell <mark@codesourcery.com>
6910 * cp-tree.h (finish_mem_initializers): Declare.
6911 (count_trees): Likewise.
6912 * parse.y (base_init): Use finish_mem_initializers.
6913 * semantics.c (finish_mem_initializers): New function.
6915 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
6916 the number of trees.
6918 (count_trees): Don't use it.
6920 2000-06-15 Jason Merrill <jason@redhat.com>
6922 * tree.c (count_trees): New debugging function.
6924 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
6925 * init.c (build_member_call): Pull out the name of a DECL.
6927 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
6928 * semantics.c (expand_body): Push to TV_INTEGRATION here.
6929 * optimize.c (optimize_function): Not here.
6930 * pt.c (instantiate_decl): Push to TV_PARSE.
6932 2000-06-15 Mark Mitchell <mark@codesourcery.com>
6934 * cp-tree.h (struct language_function): Remove x_base_init_list
6935 and x_member_init_list.
6936 (current_base_init_list): Remove.
6937 (current_member_init_list): Likewise.
6938 (setup_vtbl_ptr): Change prototype.
6939 (emit_base_init): Likewise.
6940 (expand_member_init): Likewise.
6941 (reinit_parse_for_function): Remove.
6942 * decl.c (save_function_data): Don't clear x_base_init_list and
6944 (mark_language_function): Don't mark them.
6945 * init.c (perform_member_init): Tweak comment.
6946 (sort_member_init): Take the list of initializers as an argument.
6947 (sort_base_init): Likewise.
6948 (emit_base_init): Likewise.
6949 (expand_member_init): Return the initializer. Don't use global
6951 * lex.c (reinit_parse_for_function): Remove.
6952 * method.c (build_template_parm_names): Correct substitution.
6953 (do_build_copy_constructor): Don't use current_member_init_list
6954 and current_base_init_list.
6955 (synthesize_method): Likewise.
6956 * parse.y (base_init): Split mem-initializers into
6957 base-initializers and field-initializers.
6958 (member_init_list): Build up the list here.
6959 (member_init): Return the initializer.
6960 (fn.depfn): Don't use reinit_parse_for_function.
6961 * parse.c: Regenerated.
6962 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
6964 (tsubst_expr): Don't use current_member_init_list
6965 and current_base_init_list.
6966 (tsubst_expr_values): Rename to ...
6967 (tsubst_initializer_list): ... this. Use convert_from_reference.
6968 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
6969 and current_base_init_list.
6970 (begin_function_definition): Don't call reinit_parse_for_function.
6972 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
6974 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
6977 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
6979 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
6981 * cp-tree.h (IF_COND): Move to c-common.h.
6982 (THEN_CLAUSE): Likewise.
6983 (ELSE_CLAUSE): Likewise.
6984 (WHILE_COND): Likewise.
6985 (WHILE_BODY): Likewise.
6986 (DO_COND): Likewise.
6987 (DO_BODY): Likewise.
6988 (RETURN_EXPR): Likewise.
6989 (EXPR_STMT_EXPR): Likewise.
6990 (FOR_INIT_STMT): Likewise.
6991 (FOR_COND): Likewise.
6992 (FOR_EXPR): Likewise.
6993 (FOR_BODY): Likewise.
6994 (SWITCH_COND): Likewise.
6995 (SWITCH_BODY): Likewise.
6996 (CASE_LOW): Likewise.
6997 (CASE_HIGH): Likewise.
6998 (GOTO_DESTINATION): Likewise.
6999 (COMPOUND_BODY): Likewise.
7000 (ASM_CV_QUAL): Likewise.
7001 (ASM_STRING): Likewise.
7002 (ASM_OUTPUTS): Likewise.
7003 (ASM_INPUTS): Likewise.
7004 (ASM_CLOBBERS): Likewise.
7005 (DECL_STMT_DECL): Likewise.
7006 (STMT_EXPR_STMT): Likewise.
7007 (LABEL_STMT_LABEL): Likewise.
7008 (SCOPE_BEGIN_P): Likewise.
7009 (SCOPE_END_P): Likewise.
7010 (SCOPE_STMT_BLOCK): Likewise.
7011 (SCOPE_NULLIFIED_P): Likewise.
7012 (SCOPE_NO_CLEANUPS_P): Likewise.
7013 (SCOPE_PARTIAL_P): Likewise.
7014 (ASM_VOLATILE_P): Likewise.
7015 (STMT_LINENO): Likewise.
7016 (STMT_LINENO_FOR_FN_P): Likewise.
7018 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
7019 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
7020 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
7021 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
7022 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
7024 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
7026 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
7027 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
7029 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
7030 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
7031 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
7033 2000-06-14 Mark Mitchell <mark@codesourcery.com>
7035 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
7036 * class.c (dfs_find_final_overrider): Set it appropriately.
7037 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
7038 avoid unneeded secondary vptrs.
7040 2000-06-13 Jakub Jelinek <jakub@redhat.com>
7042 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
7043 (check_bitfield_decl, check_field_decl): Likewise.
7044 (build_vtbl_or_vbase_field, build_base_field): Likewise.
7045 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
7046 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
7047 (xfer_tag, finish_enum): Likewise.
7048 * decl2.c (finish_builtin_type): Likewise.
7049 * init.c (init_init_processing): Likewise.
7050 * pt.c (instantiate_class_template): Likewise.
7051 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
7052 * cp-tree.h (struct lang_type): Add user_align member.
7053 (CLASSTYPE_USER_ALIGN): Define.
7055 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7057 * Make-lang.in (c++.install-common): Install g++-cross in
7058 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
7059 $(target_alias)-g++ and $(target_alias)-c++.
7061 2000-06-12 Mark Mitchell <mark@codesourcery.com>
7063 * class.c (vcall_offset_data_s): Add last_init and fns.
7064 (overrides): Rename to same_signature_p.
7065 (dfs_find_final_overrider): Adjust accordingly.
7066 (mark_overriders): Likewise.
7067 (warn_hidden): Likewise.
7068 (build_vtbl_initializer): Reorganize machinery for building things
7069 at negative offsets.
7070 (build_vcall_and_vbase_vtbl_entries): Likewise.
7071 (build_vbase_offset_vtbl_entries): Likewise.
7072 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
7073 offset entries. Do not create two entries for functions with the
7075 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
7076 (build_rtti_vtbl_entries): Reorganize machinery for building things
7077 at negative offsets.
7079 * optimize.c (expand_call_inline): Don't recurse into the code
7080 used to initialize the parameters more than once.
7082 2000-06-11 Mark Mitchell <mark@codesourcery.com>
7084 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
7085 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
7086 (find_substitution): Only use the `Sa' substitution for
7087 std::allocator, not instantiations of it.
7088 (write_template_prefix): Move comment. Only use a TREE_LIST to
7089 represent substitutions for a member template.
7090 (write_array_type): Mangle array dimensions correctly.
7091 * optimize.c (maybe_clone_body): Copy more information from the
7093 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
7094 on the regenerated declaration.
7096 2000-06-11 Chip Salzenberg <chip@valinux.com>
7097 Mark Mitchell <mark@codesourcery.com>
7099 * class.c (build_vtable): Clarify comment.
7100 (build_ctor_vtbl_group): Pass the most derived type to
7103 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7105 * decl2.c (compare_options): Don't needlessly cast away const-ness.
7107 2000-06-10 Mark Mitchell <mark@codesourcery.com>
7109 * decl.c (add_binding): Handle duplicate declarations of external
7112 2000-06-09 Chip Salzenberg <chip@valinux.com>
7113 Mark Mitchell <mark@codesourcery.com>
7115 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
7117 (write_signed_number): New macro.
7118 (write_unsigned_number): Likewise.
7119 (write_source_name): Use them.
7120 (write_number): Handle signed and unsigned values.
7121 (write_integer_cst): Use tree_int_cst_sgn, and use
7122 write_unsigned_number or write_signed_number as appropriate.
7123 (write_discriminator): Use write_unsigned_number or
7124 write_signed_number as appropriate.
7125 (write_template_arg_literal): Likewise.
7126 (write_array_type): Use tree_low_cst.
7127 (write_template_parm): Use write_unsigned_number or
7128 write_signed_number as appropriate.
7129 (write_substitution): Adjust call to write_number.
7130 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
7131 (write_expression): Handle non-type template arguments of
7132 reference type correctly.
7133 (mangle_thunk): Use write_signed_number.
7135 2000-06-09 Chip Salzenberg <chip@valinux.com>
7137 * mangle.c (find_substition): Don't mangle objects with typename
7138 substitutions (e.g. "cin" as "Si").
7140 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
7142 * call.c (add_candidate): Use ggc_alloc_cleared.
7143 * decl.c (lookup_label): Likewise.
7144 * lex.c (retrofit_lang_decl): Likewise.
7146 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
7148 * semantics.c (expand_body): Push to TV_EXPAND.
7149 * optimize.c (optimize_function): Push to TV_INTEGRATION.
7150 * decl.c (start_function): Always call announce_function.
7152 * tinfo2.cc: Just declare abort.
7154 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
7156 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
7157 whenever @ is a symbolic name.
7159 2000-06-08 Jakub Jelinek <jakub@redhat.com>
7161 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
7163 2000-06-07 Mark Mitchell <mark@codesourcery.com>
7165 * decl.c (pushdecl): Look up functions by DECL_NAME, not
7166 DECL_ASSEMBLER_NAME.
7168 2000-06-06 Mark Mitchell <mark@codesourcery.com>
7170 * decl2.c (c_language): Define.
7172 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
7174 * lex.c (lang_init_options): Tweak.
7176 * decl2.c: Remove #inclusion of diagnostic.h
7177 (lang_decode_option): Move diagnostic formatting options to
7180 * lang-options.h: Remove documentation for diagnostic options.
7182 * Makefile.in (lex.o): Depends upon diagnostic.h
7184 2000-06-06 Mark Mitchell <mark@codesourcery.com>
7186 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
7187 the same DECL_RESULT, it's not a redefinition.
7188 * pt.c (tsubst_decl): Remove code to handle illegal
7191 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
7193 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
7195 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
7197 * search.c (maybe_suppress_debug_info): Don't check
7198 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
7200 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
7203 Remember instantiation context in deferred instantiations.
7204 * cp-tree.h (struct tinst_level): Remove.
7205 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
7206 * pt.c (current_tinst_level): Now a tree.
7207 (print_template_context, push_tinst_level, pop_tinst_level,
7208 tinst_for_decl): Adjust.
7209 (reopen_tinst_level): New fn.
7210 (init_pt): Register current_tinst_level as a root.
7211 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
7212 of the pending templates list.
7213 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
7214 * lex.c (extract_interface_info): Adjust.
7215 * decl2.c (warn_if_unknown_interface): Adjust.
7217 2000-06-05 Mark Mitchell <mark@codesourcery.com>
7219 * class.c (indirect_primary_base_p): New function.
7220 (determine_primary_base): Use it.
7222 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
7224 Update new-abi dynamic cast algorithm.
7225 * tinfo.cc (__class_type_info::__dyncast_result): Add
7226 whole_details. Adjust constructor.
7227 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
7228 Avoid unnecessary searching.
7229 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
7231 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7233 * decl.c (init_decl_processing): Don't call record_component_aliases.
7234 * tree.c (build_cplus_array_type_1): Likewise.
7236 2000-06-04 Mark Mitchell <mark@codesourcery.com>
7238 * ir.texi: Correct typo.
7239 * mangle.c (write_expression): Handle non-type template arguments
7240 with reference type.
7241 * method.c (build_overload_value): Likewise.
7242 * pt.c (convert_nontype_argument): Explicitly represent conversion
7243 to a reference with an ADDR_EXPR.
7244 (unify): Always unify arguments in left-to-right order.
7246 2000-06-03 Alex Samuel <samuel@codesourcery.com>
7247 Mark Mitchell <mark@codesourcery.com>
7249 * Make-lang.in (CXX_SRCS): Add mangle.c.
7250 * Makefile.in (CXX_OBJS): Add mangle.o.
7251 (mangle.o): New rule.
7253 * class.c (local_classes): New variable.
7254 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
7255 (get_vtt_name): Use mangle_vtt_name for new ABI.
7256 (init_class_processing): Initialize local_classes.
7257 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
7258 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
7259 (std_identifier): New macro.
7260 (DECL_VOLATILE_MEMFUNC_P): New macro.
7261 (DECL_NAMESPACE_STD_P): Likewise.
7262 (local_classes): Declare.
7263 (get_mostly_instantiated_function_type): Declare.
7264 (init_mangle): Declare.
7265 (mangle_decl): Likewise.
7266 (mangle_type_string): Likewise.
7267 (mangle_type): Likewise.
7268 (mangle_typeinfo_for_type): Likewise.
7269 (mangle_typeinfo_string_for_type): Likewise.
7270 (mangle_vtbl_for_type): Likewise.
7271 (mangle_vtt_for_type): Likewise.
7272 (mangle_ctor_vtbl_for_type): Likewise.
7273 (mangle_thunk): Likewise.
7274 (mangle_conv_op_name_for_type): Likewise.
7275 (mangle_guard_variable): Likewise.
7276 * decl.c (pushtag): Keep track of local classes.
7277 (initialize_predefined_identifiers): Initialize std_identifier.
7278 (init_decl_processing): Use std_identifier.
7279 (start_decl): Don't treat instantiations as specializations.
7280 (grokdeclarator): Likewise.
7281 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
7282 name for fully-instantiated templates.
7283 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
7284 destructors with the new ABI.
7285 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
7286 (grokfield): Use mangle_type for new ABI.
7287 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
7288 (get_sentry): Use mangle_guard_variable for new ABI.
7289 (start_static_initialization_or_destruction): Likewise.
7290 * expr.c (extract_aggr_init): Remove.
7291 (extract_scalar_init): Likewise.
7292 (extract_init): Remove #if 0'd code.
7293 * mangle.c: New function.
7294 * method.c (build_mangled_name): Assert not flag_new_abi.
7295 (build_static_name): Likewise.
7296 (build_decl_overload_real): Likewise.
7297 (build_typename_overload): Likewise.
7298 (build_overload_with_type): Likewise.
7299 (build_overload_name): Likewise.
7300 (get_ctor_vtbl_name): Likewise.
7301 (start_squangling): Likewise.
7302 (get_id_2): Likewise.
7303 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
7304 (init_method): Call init_mangle for new ABI.
7305 (make_thunk): Call mangle_thunk for new ABI.
7306 * operators.def: Correct new ABI manglings for the `%' operator.
7308 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
7309 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
7310 (lookup_template_class): Call mangle_decl for new ABI.
7311 (get_mostly_instantiated_function_type): New function.
7312 (set_mangled_name_for_template_decl): Use it.
7313 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
7314 the new ABI. Use mangle_conv_op_name_for_type for instantiated
7315 conversion op names.
7316 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
7317 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
7318 (tinfo_base_init): Likewise. Mangle typeinfo string name with
7319 mangle_typeinfo_string_for_type.
7321 2000-06-03 Mark Mitchell <mark@codesourcery.com>
7323 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
7324 (INNERMOST_TEMPLATE_ARGS): New macro.
7325 (innermost_args): Remove.
7326 (get_innermost_template_args): New function.
7327 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
7328 * error.c (dump_function_decl): Be caution when using
7329 most_general_template.
7330 * method.c (build_template_parm_names): Use
7331 INNERMOST_TEMPLATE_ARGS.
7332 * pt.c (add_to_template_args): Tidy comment
7333 (get_innermost_template_args): New function.
7334 (check_explicit_specialization): Clear DECL_INITIAL for a new
7336 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
7338 (push_template_decl): Always register specializations of the most
7340 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
7341 (coerce_template_parms): Likewise.
7342 (lookup_template_class): Likewise.
7343 (innermost_args): Remove.
7344 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
7345 (tsubst_decl): Handle tricky specializations. Use
7346 get_innermost_template_args.
7347 (instantiate_template): Simplify handling of partial
7349 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
7350 (most_general_template): Reimplement, in a more straightforward
7352 (regenerate_decl_from_template): Tweak formatting. Use
7353 TMPL_ARGS_DEPTH for clarity.
7354 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
7356 * dump.c (dequeue_and_dump): Dump information about thunks.
7358 2000-06-01 Richard Henderson <rth@cygnus.com>
7360 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
7362 2000-06-01 Richard Henderson <rth@cygnus.com>
7364 * decl2.c (unsupported_options): Fix typo, make const.
7365 (lang_decode_option): Fix bsearch argument order.
7367 2000-06-01 Mark Mitchell <mark@codesourcery.com>
7369 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
7372 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7374 * cp-tree.h (c_get_alias_set): Deleted.
7375 * Makefile.in (decl.o): Include ../expr.h.
7376 * decl.c (expr.h): Include.
7377 (init_decl_processing): Call record_component_aliases for arrays.
7378 (grokdeclarator): Likewise.
7379 Set TREE_ADDRESSABLE for fields that aren't bitfields.
7380 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
7382 2000-05-31 Mark Mitchell <mark@codesourcery.com>
7384 Remove guiding declaration support.
7385 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
7386 (flag_guiding_decls): Remove.
7387 * call.c (build_user_type_conversion_1): Remove support for
7389 (build_new_function_call): Likewise.
7390 (build_new_op): Likewise.
7391 (build_new_method_call): Likewise.
7392 * decl.c (start_function): Likewise.
7393 * friend.c (is_friend): Likewise.
7394 (do_friend): Likewise.
7395 * decl2.c ((flag_dump_translation_unit): Make it const.
7396 (flag_guiding_decls): Remove.
7397 (unsupported_options): New variable
7398 (compare_options): New function.
7399 (lang_decode_option): Use them.
7401 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
7403 * method.c (mangle_expression): Adjust test for legal expression
7406 * pt.c (instantiate_decl): Save and restore the local
7407 specializations list.
7409 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
7411 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
7413 2000-05-30 Mark Mitchell <mark@codesourcery.com>
7415 * call.c (add_template_candidate_real): Handle member template
7416 constructors for classes with virtual bases.
7417 (build_user_type_conversion_1): Use in_charge_arg_for_name.
7418 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
7420 * ir.texi: Update thunk documentation.
7422 * call.c (joust): Fix handling of overloaded builtin operators.
7424 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
7426 * cp-tree.h (DECL_ANTICIPATED): New macro.
7427 Document new use of DECL_LANG_FLAG_7.
7428 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
7429 in the user namespace.
7430 * lex.c (do_identifier): If the identifier's declaration has
7431 DECL_ANTICIPATED on, it has not yet been declared. But do not
7432 replace it with an ordinary implicit declaration.
7434 * tinfo2.cc: Include stdlib.h.
7436 2000-05-29 Mark Mitchell <mark@codesourcery.com>
7438 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
7439 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
7442 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
7444 * decl2.c (lang_decode_option): Use skip_leading_substring instead
7447 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
7449 * operators.def (<?): Duplicated, should have been...
7452 2000-05-27 Alex Samuel <samuel@codesourcery.com>
7453 Mark Mitchell <mark@codesourcery.com>
7455 * cp-tree.h (ansi_opname): Make it a macro.
7456 (ansi_assopname): Likewise.
7457 (struct lang_decl_flags): Add assignment_operator_p.
7458 (struct lang_decl): Add operator_code.
7459 (DECL_VTT_PARM): Adjust.
7460 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
7461 overloaded operator.
7462 (SET_OVERLOADED_OPERATOR_CODE): New macro.
7463 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
7464 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
7465 (opname_tab): Remove.
7466 (assignop_tab): Likewise.
7467 (operator_name_info_t): New type.
7468 (operator_name_info): New variable.
7469 (assignment_operator_name_info): Likewise.
7470 (build_cp_library_fn): Remove declaration.
7471 (push_cp_library_fn): Likewise.
7472 (operator_name_string): Likewise.
7473 (build_decl_overload): Likewise.
7474 * call.c (print_z_candidates): Simplify.
7475 (build_object_call): Adjust usage of ansi_opname. Use
7476 DECL_OVERLOADED_OPERATOR_P.
7477 (op_error): Adjust operator name lookup.
7478 (build_conditional_expr): Adjust usage of ansi_opname.
7479 (build_new_op): Likewise.
7480 (build_op_delete_call): Likewise.
7481 (build_over_call): Likewise.
7482 (joust): Use DECL_OVERLOADED_OPERATOR_P.
7483 * decl.c (duplicate_decls): Copy operator_code.
7484 (init_decl_processing): Adjust parameters to push_cp_library_fn.
7485 (builtin_function): Adjust parameters to build_library_fn_1.
7486 (build_library_fn_1): Accept an overloaded operator code.
7487 (build_library_fn): Pass ERROR_MARK.
7488 (build_cp_library_fn): Accept an overloaded operator code.
7489 (push_cp_library_fn): Likewise.
7490 (grokfndecl): Tweak.
7491 (grokdeclarator): Simplify code to compute names of overloaded
7492 operators. Adjust use of ansi_opname.
7493 (ambi_op_p): Work on tree_codes, not identifiers.
7494 (unary_op_p): Likewise.
7495 (grok_op_properties): Likewise.
7496 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
7497 (lang_mark_tree): Don't try to mark the operator_code.
7498 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
7499 * error.c (dump_decl): Remove special handling for operator
7501 (dump_function_name): Likewise.
7502 (dump_expr): Adjust name lookup of operators.
7503 (op_to_string): Simplify.
7504 (assop_to_string): Likewise.
7505 * init.c (build_new_1): Adjust use of ansi_opname.
7506 * lex.c (opname_tab): Remove.
7507 (assignop_tab): Likewise.
7508 (ansi_opname): Likewise.
7509 (ansi_assopname): Likewise.
7510 (operator_name_string): Likewise.
7511 (reinit_lang_specific): Likewise.
7512 (operator_name_info): New variable.
7513 (assignment_operator_name_info): Likewise.
7514 (init_operators): New function.
7515 (init_parse): Use it.
7516 (do_identifier): Adjust use of ansi_opname.
7517 * method.c (mangle_expression): Don't use ansi_opname for
7519 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
7520 (build_decl_overload): Remove.
7521 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
7522 (do_build_assign_ref): Adjust use of ansi_opname.
7523 (synthesize_method): Likewise.
7524 (implicitly_declare_fn): Likewise.
7525 * operators.def: New file.
7526 * parse.y (operator): Adjust use of ansi_opname.
7527 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
7528 (set_mangled_name_for_template_decl): Don't play games with
7530 (special_function_p): Adjust use of ansi_opname.
7531 * typeck.c (check_return_expr): Likewise.
7532 * Make-lang.in (cc1plus): Depend on operators.def.
7533 * Makefile.in (lex.o): Likewise.
7536 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
7538 * Make-lang.in (cplib2.ready): Eradicate.
7540 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
7542 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
7543 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
7544 (built_min, cp_tree_equal): Likewise.
7546 2000-05-26 Mark Mitchell <mark@codesourcery.com>
7548 * class.c (layout_nonempty_base_or_field): Replace
7549 `record_layout_info' with `record_layout_info_s'.
7551 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
7554 * cp-tree.h (struct language_function): x_named_labels is now
7555 a struct named_label_list*.
7556 * decl.c (struct named_label_use_list): Renamed from...
7557 (struct named_label_list): ...this. New struct.
7558 (push_binding_level): Don't set eh_region.
7559 (note_level_for_eh): New fn.
7560 (pop_label): Take label and old value directly.
7561 (pop_labels): Adjust for new named_labels format.
7562 (lookup_label): Likewise.
7563 (poplevel): Note characteristics of a binding level containing a
7564 named label. Mess with named label lists earlier.
7565 (mark_named_label_lists): New fn.
7566 (mark_lang_function): Call it.
7567 (use_label): New fn, split out from...
7568 (make_label_decl): ...here. Don't call it.
7569 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
7570 check_previous_gotos): New fns, split out from...
7571 (define_label): ...here.
7572 (check_switch_goto): New fn.
7573 (define_case_label): Call it.
7574 (check_goto): New fn.
7575 * semantics.c (finish_goto_stmt): Call it and use_label.
7576 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
7577 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
7579 2000-05-26 Mark Mitchell <mark@codesourcery.com>
7581 * class.c (build_vtable_entry_ref): Correct usage of
7582 get_vtbl_decl_for_binfo.
7584 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
7585 * method.c (implicitly_declare_fn): Not here.
7587 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
7589 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
7590 (CPTI_PTMD_DESC_TYPE): ... here.
7591 (ptmd_desc_type_node): Rename to ...
7592 (ptm_desc_type_node): ... here.
7594 * rtti.c (ptmd_initializer): Rename to ...
7595 (ptm_initializer): ... here.
7596 (sythesize_tinfo_var): Adjust. Deal with pointer to member
7598 (create_tinfo_types): Adjust.
7600 2000-05-25 Mark Mitchell <mark@codesourcery.com>
7602 Finish implementation of VTTs.
7603 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
7604 CPTI_VTT_PARM_IDENTIFIER.
7605 (vtt_parm_identifier): New macro.
7606 (vtt_parm_type): Likewise.
7607 (BINFO_SUBVTT_INDEX): Likewise.
7608 (BINFO_VPTR_INDEX): Likewise.
7609 (struct lang_decl): Add vtt_parm.
7610 (DECL_VTT_PARM): New macro.
7611 (DECL_USE_VTT_PARM): Likewise.
7612 (DECL_NEEDS_VTT_PARM_P): Likewise.
7613 (get_vtt_name): Declare.
7614 (build_artificial_parm): Likewise.
7615 (fixup_all_virtual_upcast_offsets): Likewise.
7616 (expand_indirect_vtbls_init): Remove.
7617 * call.c (build_new_method_call): Pass the vtt to subobject
7618 constructors and destructors.
7619 * class.c (get_vtt_name): Give it external linkage.
7620 (build_clone): Handle the magic VTT parameters for clones.
7621 (clone_function_decl): Fix typo in comment.
7622 (build_vtt): Keep track of the indices in the VTTs where various
7623 entities are stored.
7624 (build_vtt_inits): Likewise.
7625 (dfs_build_vtt_inits): Likewise.
7626 (build_ctor_vtbl_group): Tweak type of construction vtables.
7627 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
7628 primary bases, when building construction vtables.
7629 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
7630 (initialize_predefined_identifiers): Add vtt_parm_identifier.
7631 (init_decl_processing): Initialize vtt_parm_type.
7632 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
7633 (lang_mark_tree): Make vtt_parm.
7634 * decl2.c (build_artificial_parm): New function.
7635 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
7636 (grokclassfn): Use build_artificial_parm.
7637 * init.c (initialize_vtbl_ptrs): Call
7638 fixup_all_virtual_upcast_offsets directly.
7639 (perform_member_init): Use the complete subobject destructor for
7641 (build_vtbl_address): New function.
7642 (expand_virtual_init): Handle VTTs.
7643 * optimize (maybe_clone_body): Likewise.
7644 * search.c (fixup_all_virtual_upcast_offsets): Give it external
7646 (expand_indirect_vtbls_init): Remove.
7647 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
7648 * tree.c (make_binfo): Make them bigger.
7650 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
7652 * inc/cxxabi.h (__pbase_type_info): Define, based on
7653 __pointer_type_info.
7654 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
7655 (__pointer_to_member_type_info): Likewise.
7656 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
7657 (__pointer_to_member_type_info::__is_pointer_p): Remove.
7658 (__pointer_type_info::__do_catch): Rename to ...
7659 (__pbase_type_info::__do_catch): ... here. Adjust.
7660 (__pbase_type_info::__pointer_catch): Implement.
7661 (__pointer_type_info::__pointer_catch): Adjust.
7662 (__pointer_to_member_type_info::__pointer_catch): Adjust.
7664 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
7666 * tinfo.h (__user_type_info::contained_virtual_p): New
7668 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
7670 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
7671 diamond shaped hierarchy. Add early out for mixed diamond and
7672 duplicate shaped hierarchy.
7674 2000-05-24 Mark Mitchell <mark@codesourcery.com>
7676 * cp-tree.h (build_delete): Change prototype.
7677 (build_vec_delete): Likewise.
7678 * call.c (build_scoped_method_call): Use special_function_kind
7679 values to indicate the kind of destruction to be done.
7680 (build_method_call): Likewise.
7681 * decl.c (finish_destructor_body): Likewise.
7682 (maybe_build_cleanup_1): Likewise. Rename to ...
7683 (maybe_build_cleanup): ... this.
7684 * decl2.c (delete_sanity): Use special_function_kind
7685 values to indicate the kind of destruction to be done.
7686 (build_cleanup): Likewise.
7687 * init.c (perform_member_init): Likewise.
7688 (build_vec_delete_1): Likewise.
7689 (build_dtor_call): Simplify.
7690 (build_delete): Use special_function_kind
7691 values to indicate the kind of destruction to be done.
7692 (build_vbase_delete): Likewise.
7693 (build_vec_delete): Likewise.
7695 * init.c (sort_member_init): Fix typo in error message generation
7698 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
7700 * semantics.c (begin_class_definition): make the packed
7701 attribute be sensitive to the "-fpack-struct" command line flag
7703 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
7705 Update new-abi upcast algorithm.
7706 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
7707 prototype and meaning of return value.
7708 (__si_class_type_info::__do_upcast): Likewise.
7709 (__vmi_class_type_info::__do_upcast): Likewise.
7710 * tinfo.cc (__class_type_info::__upcast_result): Replace
7711 whole2dst with part2dst. Adjust ctor.
7712 (__class_type_info::__do_upcast): Adjust call of worker function.
7713 (__class_type_info::__do_upcast): Adjust.
7714 (__si_class_type_info::__do_upcast): Adjust. Use parent's
7716 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
7717 virtual base in diamond hierarchy bug.
7719 2000-05-23 Mark Mitchell <mark@codesourcery.com>
7721 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
7722 and bitfield to tinfo_fn_p.
7723 (DECL_TINFO_FN_P): Adjust.
7724 (SET_DECL_TINFO_FN_P): Likewise.
7725 (DECL_MUTABLE_P): Likewise.
7726 (DECL_C_BIT_FIELD): Likewise.
7727 (SET_DECL_C_BIT_FIELD): Likewise.
7728 (CLEAR_DECL_C_BIT_FIELD): Likewise.
7729 (DECL_UNINLINABLE): Likewise.
7730 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
7731 (handle_using_decl): Remove assertion.
7732 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
7733 to build FIELD_DECLs.
7734 (build_base_field): Likewise.
7735 (layout_class_type): Likewise.
7736 * decl.c (init_decl_processing): Likewise.
7737 (build_ptrmemfunc_type): Likewise.
7738 (grokdeclarator): Likewise.
7739 * decl2.c (grok_x_components): Likewise.
7740 * except.c (call_eh_info): Likewise.
7741 * init.c (init_init_processing): Likewise.
7742 * rtti.c (expand_class_desc): Likewise.
7743 (create_pseudo_type_info): Likewise.
7744 (get_vmi_pseudo_type_info): Likewise.
7745 (create_tinfo_types): Likewise.
7746 * ptree.c (print_lang_decl): Adjust.
7747 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
7748 before checking DECL_MUTABLE_P.
7750 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
7751 parameters for template functions.
7752 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
7753 destructors as well as constructors.
7755 2000-05-22 Mark Mitchell <mark@codesourcery.com>
7757 * class.c (build_ctor_vtbl_group): Set inits.
7758 * optimize.c (maybe_clone_body): Set DECL_INLINE and
7759 DECL_THIS_INLINE appropriately for clones.
7761 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
7762 (DECL_CONV_FN_P): Simplify.
7763 (DECL_OPERATOR): Remove.
7764 (language_to_string): Declare.
7765 * decl.c (duplicate_decls): Fix typo in comment.
7766 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
7767 (grok_op_properties): Use DECL_CONV_FN_P instead of
7768 IDENTIFIER_TYPENAME_P.
7769 * dump.c (dequeue_and_dump): Dump the language linkage of
7771 * error.c (language_to_string): Give it external linkage.
7772 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
7773 (implicitly_declare_fn): Set DECL_LANGUAGE.
7774 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
7775 IDENTIFIER_TYPENAME_P.
7776 (tsubst_decl): Likewise.
7777 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
7778 * semantics.c (finish_member_declaration): Don't mark members of
7779 classes declared in an extern "C" region as extern "C".
7781 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7783 * decl2.c (qualified_lookup_using_namespace): Look through
7786 * decl.c (push_using_decl): Return the old decl on namespace level.
7788 2000-05-21 Mark Mitchell <mark@codesourcery.com>
7790 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
7791 (VTT_NAME_PREFIX): New macro.
7792 (CTOR_VTBL_NAME_PREFIX): Likewise.
7793 (get_ctor_vtbl_name): New function.
7794 * class.c (get_vtable_name): Simplify.
7795 (get_vtt_name): New function.
7796 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
7797 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
7798 when a virtual base becomes primary.
7799 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
7801 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
7802 additional parameters.
7803 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
7804 (initialize_array): New function.
7805 (build_vtt): Likewise.
7806 (build_vtt_inits): Likewise.
7807 (dfs_build_vtt_inits): Likewise.
7808 (dfs_fixup_binfo_vtbls): Likewise.
7809 (build_ctor_vtbl_group): Likewise.
7810 (initialize_vtable): Use initialize_array.
7811 (accumulate_vtbl_inits): Reimplement to handle construction
7813 (dfs_accumulate_vtbl_inits): Likewise.
7814 (bulid_vtbl_initializer): Adjust parameter name.
7815 * method.c (build_typename_overload): Remove #if 0'd code.
7816 (get_ctor_vtbl_name): New function.
7817 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
7818 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
7820 * cp-tree.h (struct lang_type): Remove search_slot.
7821 (CLASSTYPE_SEARCH_SLOT): Remove.
7822 (emit_base_init): Change prototype.
7823 (initialize_vtbl_ptrs): Likewise.
7824 (expand_indirect_vtbls_init): Likewise.
7825 (clear_search_slots): Remove.
7826 * decl.c (lang_mark_tree): Don't mark search_slot.
7827 * init.c (initialize_vtbl_ptrs): Simplify.
7828 (emit_base_init): Likewise.
7829 * search.c (struct vbase_info): Document decl_ptr.
7830 (convert_pointer_to_single_level): Remove.
7831 (dfs_find_vbases): Remove.
7832 (dfs_init_base_pointers): Simplify.
7833 (dfs_clear_vbase_slots): Remove.
7834 (dfs_vtable_path_unmark): New function.
7835 (init_vbase_pointers): Simplify.
7836 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
7837 (expand_indirect_vtbls_init): Simplify. Don't call
7838 mark_all_temps_used.
7839 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
7840 initialize_vtbl_ptrs.
7842 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
7844 * except.c: Add static prototypes.
7846 2000-05-20 H.J. Lu <hjl@gnu.org>
7848 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
7850 2000-05-19 Mark Mitchell <mark@codesourcery.com>
7852 Don't create a separate copy of virtual bases for the
7853 CLASSTYPE_VBASECLASSES list.
7854 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
7855 (BINFO_FOR_VBASE): Remove.
7856 (CANONICAL_BINFO): Adjust.
7857 (binfo_for_vbase): New function.
7858 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
7859 instead of BINFO_FOR_VBASE.
7860 (build_vbase_pointer): Likewise.
7861 (build_secondary_vtable): Likewise.
7862 (dfs_mark_primary_bases): Likewise.
7863 (mark_primary_bases): Likewise.
7864 (layout_nonempty_base_or_field): Likewise.
7865 (dfs_set_offset_for_shared_vbases): Likewise.
7866 (dfs_set_offset_for_unshared_vbases): Likewise.
7867 (layout_virtual_bases): Likewise. Adjust for changes to the
7868 CLASSTYPE_VBASECLASSES list.
7869 (dump_class_hierarchy_r): Use binfo_for_vbase
7870 instead of BINFO_FOR_VBASE.
7871 (dump_class_hierarchy): Likewise.
7872 (finish_vtbls): Likewise.
7873 (build_vtbl_initializer): Adjust for changes to the
7874 CLASSTYPE_VBASECLASSES list.
7875 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
7876 * decl.c (finish_destructor_body): Adjust for changes to the
7877 CLASSTYPE_VBASECLASSES list.
7878 * init.c (sort_base_init): Use binfo_for_vbase.
7879 (construct_virtual_bases): Adjust for changes to the
7880 CLASSTYPE_VBASECLASSES list.
7881 (expand_member_init): Use binfo_for_vbase.
7882 (build_vbase_delete): Adjust for changes to the
7883 CLASSTYPE_VBASECLASSES list.
7884 * method.c (do_build_copy_constructor): Likewise.
7885 * rtti.c (get_base_offset): Use binfo_for_vbase.
7886 (expand_class_desc): Remove #if 0'd code.
7887 * search.c (struct vbase_info): Remove vbase_types.
7888 (get_base_distance): Use binfo_for_vbase.
7889 (lookup_field_queue_p): Use CANONICAL_BINFO.
7890 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
7891 (get_pure_virtuals): Adjust for changes to the
7892 CLASSTYPE_VBASECLASSES list.
7893 (dfs_find_vbases): Use binfo_for_vbase.
7894 (dfs_init_vbase_pointers): Likewise.
7895 (init_vbase_pointers): Don't initialize vi.vbase_types.
7896 (virtual_context): Use binfo_for_vbase.
7897 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
7898 CLASSTYPE_VBASECLASSES list.
7899 (expand_indirect_vtbls_init): Simplify.
7900 (dfs_get_vbase_types): Don't replicate virtual bases.
7901 (find_vbase_instance): Use binfo_for_vbase.
7902 (binfo_for_vbase): New function.
7903 * typeck.c (get_delta_difference): Use binfo_for_vbase.
7905 2000-05-17 Mark Mitchell <mark@codesourcery.com>
7907 * decl2.c (finish_anon_union): Generalize error messages to handle
7908 anonymous structures.
7909 * init.c (perform_member_init): Remove `name' parameter.
7910 (build_field_list): New function.
7911 (sort_member_init): Handle anonymous union initialization order
7912 correctly. Check for multiple initializations of the same union.
7913 (emit_base_init): Don't look up fields by name here.
7914 (expand_member_init): Record the result of name lookup for future
7916 * typeck.c (build_component_ref): Fix formatting.
7918 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
7920 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
7921 * typeck.c (build_x_compound_expr): Replace warn_unused with
7924 * decl2.c (lang_decode_option): Update -Wall unused flags by
7925 calling set_Wunused.
7927 2000-05-16 Mark Mitchell <mark@codesourcery.com>
7929 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
7930 * init.c (dfs_vtable_path_unmark): Remove.
7931 * search.c (marked_new_vtable_p): Likewise.
7932 (unmarked_new_vtable_p): Likewise.
7933 (dfs_search_slot_nonempty_p): Likewise.
7934 (dfs_mark): Likewise.
7935 (dfs_vtable_path_unmark): Likewise.
7936 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
7937 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
7938 (dfs_init_vbase_pointers): Remove special-case new ABI code.
7939 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
7940 (init_vbase_pointers): Simplify.
7941 (expand_indirect_vtbls_init): Likewise.
7943 * class.c (copy_virtuals): New function.
7944 (build_primary_table): Use it.
7945 (build_secondary_vtable): Likewise.
7946 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
7947 indicate that no vcall offset is required.
7948 (add_virtual_function): Likewise.
7949 (modify_all_vtables): Likewise.
7950 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
7951 (dfs_accumulate_vtbl_inits): Likewise.
7952 (build_vtbl_initializer): Make changes to handle construction
7954 (dfs_build_vcall_offset_vtbl_entries): Likewise.
7955 (build_rtti_vtbl_entries): Likewise.
7956 (build_vtable_entries): Handle a NULL vcall_index.
7958 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
7960 * decl2.c (lang_decode_option): Fix thinko.
7962 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
7964 * except.c (check_handlers): New fn.
7965 * cp-tree.h: Declare it.
7966 * semantics.c (finish_handler_sequence): Call it.
7967 (finish_function_handler_sequence): Likewise.
7968 (finish_handler_parms): Set TREE_TYPE on the handler.
7969 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
7970 * search.c (get_base_distance_recursive): If protect>1, ignore
7972 (get_base_distance): Don't reduce watch_access.
7974 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
7976 * lex.c: #include diagnostic.h.
7977 (lang_init_options): Set default prefixing rules.
7979 * lang-options.h: Add -fdiagnostics-show-location=.
7981 * decl2.c: #include diagnostic.h.
7982 (lang_decode_option): Handle -fdiagnostics-show-location=.
7984 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
7986 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
7987 * vec.cc: Revert my 2000-05-07 change.
7989 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
7991 * class.c (check_field_decls): Complain about non-static data
7992 members with same name as class in class with constructor.
7994 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
7996 * decl.c (grokdeclarator): Allow non-static data members with
7999 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
8001 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
8002 and pending_inline.filename. Update prototypes.
8003 * decl.c (define_label): Constify filename parameter.
8004 * decl2.c (warn_if_unknown_interface): Constify local char *.
8005 * input.c Constify input_source.filename. Don't declare
8006 input_filename or lineno. Constify filename parameter to feed_input.
8007 * lex.c (init_parse): Constify parameter and return value.
8008 (cp_pragma_interface, cp_pragma_implementation): Constify
8010 (reinit_parse_for_method, reinit_parse_for_block,
8011 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
8012 Constify local char *.
8013 * pt.c: Don't declare lineno or input_filename.
8014 (print_template_context, tsubst_friend_function, tsubst_decl,
8015 tsubst, instantiate_decl): Constify local char *.
8016 * semantics.c (expand_body): Constify local char *.
8017 * tree.c (build_srcloc): Constify filename parameter.
8018 * typeck.c (c_expand_asm_operands): Constify filename
8021 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
8023 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
8026 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
8028 * inc/cxxabi.h: Fix typos in comment.
8029 (__base_class_info::__offset): Use a static_cast.
8031 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
8033 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
8034 of std::size_t and std::ptrdiff_t respectively.
8035 * tinfo.cc: Likewise.
8038 2000-05-06 Richard Henderson <rth@cygnus.com>
8040 * typeck.c (build_c_cast): Don't warn integer->pointer size
8041 mismatch for constants.
8043 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
8045 * rtti.c (ptmd_initializer): Set non-public, if class is
8048 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
8049 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8050 __cxa_vec_delete): Likewise.
8051 * tinfo.cc (__dynamic_cast): Likewise.
8052 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8053 __cxa_vec_delete): Likewise.
8055 2000-05-04 Mark Mitchell <mark@codesourcery.com>
8057 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
8058 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
8059 (lang_decl_flags): Add vcall_offset.
8060 (THUNK_VCALL_OFFSET): Use it.
8061 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
8062 * method.c (make_thunk): Create the lang_decl here, not in
8064 (emit_thunk): Make generic thunks into ordinary functions once
8065 they have been fed to expand_body.
8066 * semantics.c (expand_body): Set current_function_is_thunk here.
8068 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8070 * class.c (update_vtable_entry_for_fn): Prototype.
8072 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
8075 * search.c (dfs_build_inheritance_graph_order): Prototype.
8077 2000-05-04 Mark Mitchell <mark@codesourcery.com>
8079 * cp-tree.h (special_function_kind): Add various kinds of
8081 (special_function_p): New function.
8082 * class.c (overrides): Don't let one kind of destructor override
8084 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
8085 whether or not to instantiate a template.
8086 * tree.c (special_function_p): Define.
8088 2000-05-03 Mark Mitchell <mark@codesourcery.com>
8090 * cp-tree.def (THUNK_DECL): Remove.
8091 * cp-tree.h (DECL_THUNK_P): New macro.
8092 (DECL_NON_THUNK_FUNCTION_P): Likewise.
8093 (DECL_EXTERN_C_FUNCTION_P): Likewise.
8094 (SET_DECL_THUNK_P): Likewise.
8095 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
8096 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
8097 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
8098 * decl.c (decls_match): Use DECL_EXTERN_C_P.
8099 (duplicate_decls): Likewise.
8100 (pushdecl): Likewise. Adjust thunk handling.
8101 (grokfndecl): Use DECL_EXTERN_C_P.
8102 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
8103 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
8104 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
8105 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
8106 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
8107 DECL_NO_STATIC_CHAIN.
8108 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
8109 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
8110 * search.c (covariant_return_p): Remove THUNK_DECL handling.
8113 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
8115 * tree.c (walk_tree): Set lineno.
8117 2000-05-01 Mark Mitchell <mark@codesourcery.com>
8119 * exception.cc: Update license notice.
8121 * new1.cc: Likewise.
8122 * new2.cc: Likewise.
8123 * tinfo.cc: Likewise.
8124 * tinfo2.cc: Likewise.
8126 * inc/cxxabi.h: Likewise.
8127 * inc/exception: Likewise.
8128 * inc/new: Likewise.
8129 * inc/new.h: Likewise.
8130 * inc/typeinfo: Likewise.
8132 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
8134 * tree.c (build_target_expr_with_type): If we already have a
8135 TARGET_EXPR, just return it.
8137 * optimize.c (initialize_inlined_parameters): Don't generate an
8138 EXPR_STMT if we can just use DECL_INITIAL.
8139 * decl.c (emit_local_var): Only make the initialization a
8140 full-expression if stmts_are_full_exprs_p.
8142 2000-05-01 Mark Mitchell <mark@codesourcery.com>
8144 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
8146 * call.c (standard_conversion): Use it.
8147 (direct_reference_binding): Likewise.
8148 (build_over_call): Likewise.
8149 (is_properly_derived_from): Likewise.
8150 (compare_ics): Likewise.
8151 * class.c (resolves_to_fixed_type_p): Likewise.
8152 * optimize.c (declare_return_variable): Likewise.
8153 * pt.c (is_specialization_of): Likewise.
8155 * typeck.c (comp_target_parms): Likeiwse.
8156 (build_static_cast): Likewise.
8157 (build_reinterpret_cast): Likewise.
8158 (build_const_cast): Likewise.
8159 (comp_ptr_ttypes_real): Likewise.
8160 (comp_ptr_ttypes_const): Likewise.
8161 * typeck2.c (process_init_constructor): Likewise.
8163 2000-04-30 Scott Snyder <snyder@fnal.gov>
8165 * decl.c (finish_destructor_body): Use the base destructor when
8166 destroying virtual bases.
8168 2000-04-30 Mark Mitchell <mark@codesourcery.com>
8170 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
8172 * optimize.c (struct inline_data): Add target_exprs field.
8173 (declare_return_variable): When a function returns an aggregate,
8174 use the variable declared in the TARGET_EXPR as the remapped
8176 (expand_call_inline): Update the pending target_exprs stack.
8177 (optimize_function): Initialize the stack.
8179 * decl2.c (finish_file): Fix typo in comment.
8181 * method.c (emit_thunk): Don't try to return a `void' value.
8183 * optimize.c (initialize_inlined_parameters): If the parameter is
8184 addressable, we need to make a new VAR_DECL, even if the
8185 initializer is constant.
8187 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
8189 * decl.c (grok_op_properties): Add an extra check of argtypes.
8191 2000-04-27 Mark Mitchell <mark@codesourcery.com>
8193 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
8195 (initialize_inlined_parameters): Try to avoid creating new
8198 2000-04-27 Alex Samuel <samuel@codesourcery.com>
8200 * lex.c (my_get_run_time): Remove.
8201 (init_filename_times): Use get_run_time instead of my_get_run_time.
8202 (check_newline): Likewise.
8203 (dump_time_statistics): Likewise.
8204 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
8205 of computing elapsed time explicitly.
8207 2000-04-26 Mark Mitchell <mark@codesourcery.com>
8209 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
8210 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
8211 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
8212 before calling decl_constant_value.
8213 * class.c (check_bitfield_decl): Likewise.
8214 * cvt.c (ocp_convert): Likewise.
8215 (convert): Likewise.
8216 * decl.c (compute_array_index_type): Likewise.
8217 (build_enumerator): Likewise.
8218 * decl2.c (check_cp_case_value): Likewise.
8219 * pt.c (convert_nontype_argument): Likewise.
8221 * typeck.c (decay_conversion): Likewise.
8222 (build_compound_expr): Likewise.
8223 (build_reinterpret_cast): Likewise.
8224 (build_c_cast): Likewise.
8225 (convert_for_assignment): Likewise.
8227 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
8229 * decl.c (finish_function): Don't play games with DECL_INLINE.
8231 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
8233 * ir.texi: Correct typo.
8235 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8237 * decl.c (grokdeclarator): Reject VLAs as members.
8239 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
8241 * call.c (standard_conversion): Accept conversion between
8244 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
8246 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
8248 * decl2.c (finish_file): Remove double setup for accounting
8251 2000-04-24 Robert Lipe <robertlipe@usa.net>
8253 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
8255 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
8257 * new.cc (set_new_handler): Needs to be in std::.
8259 2000-04-23 Mark Mitchell <mark@codesourcery.com>
8261 * cp-tree.h (lang_decl): Remove pretty_function_p.
8262 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
8263 language-specific node.
8264 * decl.c (cp_make_fname_decl): Use build_decl, not
8265 build_lang_decl, to build the variables.
8266 (grokvardecl): Don't call build_lang_decl for local variables in
8268 (grokdeclarator): Don't call build_lang_decl for local type
8269 declarations in templates.
8270 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
8271 zero'd memory, rather than calling memset.
8272 * pt.c: Include hashtab.h.
8273 (local_specializations): New variable.
8274 (retrieve_local_specialization): Use it.
8275 (register_local_specialization): Likewise.
8276 (tsubst_decl): Don't assume local variables have
8278 (instantiate_decl): Set up local_specializations.
8279 * Makefile.in (HTAB_H): New variable.
8281 2000-04-23 Richard Henderson <rth@cygnus.com>
8283 * typeck.c (c_expand_asm_operands): Restore the original
8284 contents of the output list.
8286 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
8288 * ir.texi: Document complex number representation.
8290 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
8292 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
8293 (target_incomplete_p): New function.
8294 (tinfo_base_init): Create comdat NTBS name variable.
8295 (ptr_initializer): Add non_public parameter. Calculate it.
8296 (ptmd_initializer): Likewise.
8297 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
8298 (create_real_tinfo_var): Add non_public parameter. Use it.
8299 Push proxy into global namespace.
8300 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
8302 * inc/typeinfo (type_info::before, type_info::operator==):
8303 Compare __name addresses.
8305 * tinfo2.cc: Remove new-abi builtins comment.
8307 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
8309 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
8311 * call.c (joust): Exit early if we get the same function, too.
8313 * decl2.c (key_method): Return NULL_TREE for template classes.
8314 (import_export_class): Don't need to check for template classes.
8316 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
8318 * lex.c: Remove references to cccp.c.
8320 2000-04-18 Mark Mitchell <mark@codesourcery.com>
8322 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
8323 volatile_memfunc. Add destructor_attr. Adjust dummy.
8324 (DECL_DESTRUCTOR_P): Use destructor_attr.
8325 (DECL_CONST_MEMFUNC_P): Reimplement.
8326 (DECL_VOLATILE_MEMFUNC_P): Remove.
8327 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
8328 (overrides): Use DECL_DESTRUCTOR_P.
8329 (check_for_override): Likewise.
8330 * decl.c (start_function): Likewise.
8331 * decl2.c (grokfclassfn): Likewise.
8332 (check_classfn): Likewise.
8333 (grok_function_init): Likewise.
8335 2000-04-17 Mark Mitchell <mark@codesourcery.com>
8337 * decl2.c (grokfield): Issue error on illegal data member
8340 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
8342 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
8344 2000-04-16 Mark Mitchell <mark@codesourcery.com>
8346 * class.c (build_vtable_entry): Don't build thunks for type-info
8349 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
8351 * decl.c (decls_match): Allow a redeclaration of a builtin to
8352 specify args while the builtin did not.
8354 2000-04-15 Mark Mitchell <mark@codesourcery.com>
8356 * cp-tree.def (THUNK_DECL): Add to documentation.
8357 * cp-tree.h (flag_huge_objects): Declare.
8358 * class.c (modify_vtable_entry): Tidy.
8359 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
8360 Calculate delta appropriately for the new ABI.
8361 (dfs_modify_vtables): Use it.
8362 (modify_all_vtables): Fix thinko in code to add overriding copies
8363 of functions to primary vtables.
8364 (build_clone): Fix typo in comment.
8365 (clone_function_decl): Correct order of destructors in vtable.
8366 (build_vbase_offset_vtbl_entries): Adjust comment.
8367 (dfs_vcall_offset_queue_p): Remove.
8368 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
8369 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
8370 (build_vtable_entry): Correct check for pure virtual functions.
8371 Don't declare flag_huge_objects.
8372 * decl.c (flag_huge_objects): Remove declaration.
8373 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
8374 Use int_size_in_bytes.
8375 (emit_thunk): Handle vcall offset thunks.
8377 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8379 * decl2.c (parse_time, varconst_time): Delete declarations.
8380 (finish_file): Delete LINENO declaration.
8381 START_TIME and THIS_TIME now long.
8383 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
8385 * class.c (build_base_field): Reformat comment.
8387 * inc/cxxabi.h (stddef.h): Comment inclusion.
8388 (__base_class_info::__offset): Comment shift.
8390 2000-04-12 Mark Mitchell <mark@codesourcery.com>
8392 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
8393 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
8394 (cp_push_exception_identifier): New macro.
8395 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
8396 (DECL_BASE_DESTRUCTOR_P): Likewise.
8397 (DECL_DELETING_DESTRUCTOR_P): Likewise.
8398 (get_vtbl_decl_for_binfo): Fix formatting.
8399 (in_charge_arg_for_name): New macro.
8400 (maybe_build_cleanup_and_delete): Remove declaration.
8401 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
8402 (in_charge_arg_for_name): New function.
8403 (build_new_method_call): Use it. Handle cloned destructors.
8404 (build_clone): Don't make the base constructor virtual.
8405 Automatically defer generated functions.
8406 (clone_function_decl): Handle destructors, too.
8407 (clone_constructors_and_destructors): Likewise.
8408 (create_vtable_ptr): Don't create a vtable entry for a cloned
8410 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
8411 (initialize_predefined_identifiers): Update appropriately.
8412 (finish_destructor_body): Simplify.
8413 (maybe_build_cleanup_and_delete): Remove.
8414 * except.c (expand_throw): Handle new-ABI destructors.
8415 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
8416 (build_dtor_call): New function.
8417 (build_delete): Use it. Simplify.
8418 * optimize.c (maybe_clone_body): Handle destructors.
8419 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
8421 * exception.cc (cleanup_fn): New typedef.
8422 (CALL_CLEANUP): New macro.
8423 (cp_eh_info): Use them.
8424 (__cp_push_exception): Likewise.
8425 (__cp_pop_exception): Likewise.
8427 2000-04-11 Mark Mitchell <mark@codesourcery.com>
8429 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
8430 (complete_dtor_identifier): New macro.
8431 (CLASSTYPE_FIRST_CONVERSION): Remove.
8432 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
8433 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
8434 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
8435 (CLASSTYPE_CONSTRUCTORS): Likewise.
8436 (CLASSTYPE_DESTRUCTORS): Likewise.
8437 (lang_decl): Add cloned_function.
8438 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
8439 (DECL_BASE_CONSTRUCTOR_P): Likewise.
8440 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
8441 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
8442 (DECL_CLONED_FUNCTION_P): Likewise.
8443 (DECL_CLONED_FUNCTION): Likewise.
8444 (clone_function_decl): Declare.
8445 (maybe_clone_body): Likewise.
8446 * call.c (build_user_type_conversion_1): Call complete object
8447 constructors in the new ABI.
8448 (build_new_method_call): Don't add in-charge parameters under the
8450 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
8451 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
8452 CLASSTYPE_DESTRUCTOR_SLOT.
8453 (build_clone): New function.
8454 (clone_function_decl): Likewise.
8455 (clone_constructors_and_destructors): Likewise.
8456 (check_bases_and_members): Use it.
8457 * decl.c (iniitialize_predefined_identifiers): Initialize
8458 complete_dtor_identifier.
8459 (finish_function): Don't add extra code to a clone.
8460 (lang_mark_tree): Mark cloned_function.
8461 * decl2.c (mark_used): Don't bother trying to instantiate things
8463 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
8464 * method.c (set_mangled_name_for_decl): Don't treat clones as
8466 (synthesize_method): Sythesize cloned functions, not the clones.
8467 * optimize.c (inline_data): Update comment on ret_label.
8468 (remap_block): Don't assume DECL_INITIAL exists.
8469 (copy_body_r): Allow ret_label to be NULL.
8470 (maybe_clone_body): Define.
8471 * pt.c (tsubst_decl): Handle clones.
8472 (instantiate_clone): New function.
8473 (instantiate_template): Use it.
8474 (set_mangled_name_for_template_decl): Don't treat clones as
8476 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
8477 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
8478 * semantics.c (expand_body): Clone function bodies as necessary.
8480 * optimize.c (remap_decl): Avoid sharing structure for arrays
8481 whose size is only known at run-time.
8482 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
8484 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
8485 to has_in_charge_parm_p.
8486 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
8487 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
8488 (DECL_COPY_CONSTRUCTOR_P): New macro.
8489 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
8490 (build_user_type_conversion_1): Likewise.
8491 (convert_like_real): Likewise.
8492 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
8493 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
8494 (copy_args_p): Likewise.
8495 (grok_ctor_properties): Likewise.
8496 (start_function): Likewise.
8497 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
8498 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
8499 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
8500 * method.c (do_build_copy_constructor): Use
8501 DECL_HAS_IN_CHARGE_PARM_P.
8502 (synthesize_method): Likewise.
8503 * pt.c (instantiate_template): Remove goto.
8504 * tree.c (build_cplus_method_type): Remove mention of obstacks in
8507 * cp-tre.h (finish_function): Change prototype.
8508 * decl.c (end_cleanup_fn): Adjust caller.
8509 (finish_function): Take only one parameter.
8510 * decl2.c (finish_objects): Adjust caller.
8511 (finish_static_storage_duration_function): Likewise.
8512 * method.c (emit_thunk): Likewise.
8513 * parse.y: Likewise.
8514 * parse.c: Regenerated.
8515 * pt.c (instantiate_decl): Likewise.
8516 * rtti.c (synthesize_tinfo_fn): Likewise.
8517 * semantics.c (expand_body): Likewise.
8519 * cp-tree.h (copy_decl): New function.
8520 * class.c (finish_struct_1): Use it.
8521 * lex.c (copy_decl): Define it.
8522 * pt.c (tsubst_decl): Likewise.
8523 * tree.c (copy_template_template_parm): Likewise.
8525 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
8526 has_nonpublic_assign_ref.
8527 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
8528 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
8529 * class.c (finish_struct_methods): Don't set
8530 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
8531 (interface_only): Don't declare.
8532 (interface_unknown): Likewise.
8534 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8536 * tree.h (HAVE_TEMPLATES): Remove definition.
8537 * lang-options.h (-fthis-is-variable): Remove documentation.
8539 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
8541 * class.c (instantiate_type): Handle object-relative template-id.
8543 * semantics.c (finish_expr_stmt): Call convert_to_void here.
8544 * decl.c (cplus_expand_expr_stmt): Not here.
8546 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
8547 Initialize exprtype earlier.
8549 * parse.y (fn.def1): Check for defining types in return types.
8551 * decl.c (check_tag_decl): Notice extra fundamental types.
8552 Diagnose empty decls in classes, too.
8554 * decl.c (grokdeclarator): Don't override an anonymous name if no
8555 declarator was given.
8557 * cvt.c (convert_to_void): Call resolve_offset_ref.
8559 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
8561 * decl2.c (decl_namespace): Handle getting a type.
8563 * typeck.c (build_c_cast): Re-enable warning for cast between
8564 pointer and integer of different size.
8566 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
8568 * inc/cxxabi.h (__pointer_type_info): Add restrict and
8570 (__pointer_type_info::__pointer_catch): New virtual function.
8571 (__pointer_to_member_type_info): Derive from
8572 __pointer_type_info. Adjust.
8573 (__pointer_to_member_type_info::__do_catch): Remove.
8574 (__pointer_to_member_type_info::__is_pointer_p): Declare.
8575 (__pointer_to_member_type_info::__pointer_catch): Declare.
8576 * rtti.c (qualifier_flags): Add restrict flag.
8577 (ptmd_initializer): Reorder members.
8578 (create_tinfo_types): Expand comments. Reorder
8579 ptmd_desc_type_node members.
8580 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
8582 (__pointer_type_info::__do_catch): Move specific code into
8583 __pointer_catch. Call it.
8584 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
8585 specific catch checking. Fix void conversion check.
8586 (__pointer_to_member_type_info::__do_catch): Remove.
8587 (__pointer_to_member_type_info::__pointer_catch): Implement.
8589 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8591 * lex.c (init_parse): Remove traces of classof and headof.
8592 * decl2.c (flag_operator_names): Default to 1.
8593 (lang_decode_option): Do not set it for -ansi.
8595 2000-04-09 Mark Mitchell <mark@codesourcery.com>
8597 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
8598 (DECL_MAIN_VARIANT): Remove.
8599 * decl.c (duplicate_decls): Don't set it.
8600 (start_function): Likewise.
8601 (lang_mark_tree): Don't mark it.
8602 * decl2.c (defer_fn): Don't use it.
8603 * lex.c (retrofit_lang_decl): Don't set it.
8604 * pt.c (tsubst_decl): Likewise.
8605 * ptree.c (print_lang_decl): Don't print it.
8606 * typeck.c (mark_addressable): Don't use it.
8608 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
8610 * vec.cc: Include <new> and <exception>.
8611 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
8612 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
8614 (__cxa_vec_delete): Catch dtor exceptions.
8616 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
8618 Prepend __ to implementation defined names.
8619 * inc/typeinfo (type_info): Rename _name to __name.
8620 (type_info::type_info): Rename parameter.
8621 (type_info::operator==, type_info::operator!=,
8622 type_info::before): Likewise.
8623 (type_info::is_pointer_p, type_info::is_function_p,
8624 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
8627 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
8628 (__pointer_type_info::__pointer_type_info): Likewise.
8629 (__pointer_type_info::is_pointer_p,
8630 __pointer_type_info::do_catch): Prepend __. Rename parameters.
8631 (__array_type_info::__array_type_info): Rename parameters.
8632 (__function_type_info::__function_type_info): Likewise.
8633 (__function_type_info::is_function_p): Prepend __.
8634 (__enum_type_info::__enum_type_info): Rename parameters.
8635 (__pointer_to_member_type_info::__pointer_to_member_type_info):
8637 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
8639 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
8640 (__class_type_info::__class_type_info): Rename parameters.
8641 (__class_type_info::sub_kind): Prepend __. Adjust member names.
8642 (__class_type_info::upcast_result,
8643 __class_type_info::dyncast_result): Prepend __. Move definition
8645 (__class_type_info::do_upcast, __class_type_info::do_catch,
8646 __class_type_info::find_public_src,
8647 __class_type_info::do_dyncast,
8648 __class_type_info::do_find_public_src): Prepend __. Rename
8650 (__si_class_type_info::__si_class_type_info): Rename parameters.
8651 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
8652 __si_class_type_info::do_find_public_src): Prepent __. Rename
8654 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
8655 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
8656 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
8658 (__dynamic_cast): Rename parameters.
8659 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
8660 type_info::do_catch, type_info::do_upcast): Prepend __.
8661 (contained_p, public_p, virtual_p, contained_public_p,
8662 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
8663 (__class_type_info::do_catch,
8664 __class_type_info::do_upcast): Prepend __. Adjust.
8665 (__class_type_info::__upcast_result,
8666 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
8668 (__class_type_info::find_public_src): Prepend __. Adjust.
8669 (__class_type_info::do_find_public_src,
8670 __si_class_type_info::do_find_public_src,
8671 __vmi_class_type_info::do_find_public_src): Likewise.
8672 (__class_type_info::do_dyncast,
8673 __si_class_type_info::do_dyncast,
8674 __vmi_class_type_info::do_dyncast): Likewise.
8675 (__class_type_info::do_upcast,
8676 __si_class_type_info::do_upcast,
8677 __vmi_class_type_info::do_upcast): Likewise.
8678 (__dynamic_cast): Adjust.
8679 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
8680 (__function_type_info::is_function_p): Likewise.
8681 (__pointer_type_info::do_catch): Likewise. Adjust.
8682 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
8683 (__throw_type_match_rtti_2): Adjust.
8684 (__is_pointer): Adjust.
8686 2000-04-08 Mark Mitchell <mark@codesourcery.com>
8688 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
8689 (complete_ctor_identifier): New macro.
8690 (special_function_kind): Add sfk_copy_constructor and
8691 sfk_assignment_operator.
8692 (LOOKUP_HAS_IN_CHARGE): Remove.
8693 (cons_up_default_function): Rename to ...
8694 (implicitly_declare_fn): ... this.
8695 * call.c (build_new_method_call): Add in-charge parameters for
8697 * class.c (add_implicitly_declared_members): Change parameter name
8698 from cant_have_assignment to cant_have_const_assignment.
8699 Replace calls to cons_up_default_function to implicitly_declare_fn.
8700 * cvt.c (ocp_convert): Use complete_ctor_identifier.
8701 * decl.c (initialize_predefined_identifiers): Initialize it.
8702 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
8704 * init.c (expand_default_init): Don't calculate the in-charge
8706 (build_new_1): Likewise.
8707 * lex.c (cons_up_default_function): Move to method.c.
8708 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
8709 (implicitly_declare_fn): New function.
8710 * typeck.c (build_static_cast): Use complete_ctor_identifier.
8711 (build_modify_expr): Likewise.
8712 * typeck2.c (build_functional_cast): Likewise.
8714 Under the new ABI, constructors don't return `this'.
8715 * cp-tree.h (warn_reorder): Declare.
8716 (special_function_kind): New enum.
8717 (global_base_init_list): Remove declaration.
8718 (emit_base_init): Don't return a value.
8719 (check_base_init): Don't declare.
8720 (is_aggr_typedef): Likewise.
8721 * decl.c (check_special_function_return_type): New function.
8722 (return_types): Remove.
8723 (grokdeclarator): Use check_special_function_return_type.
8724 (start_function): Don't initialize ctor_label under the new ABI.
8725 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
8726 * init.c (begin_init_stmts): Move to top of file.
8727 (finish_init_stmts): Likewise.
8728 (warn_reorder): Don't declare.
8729 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
8731 (check_base_init): Remove.
8732 (is_aggr_typedef): Likewise.
8733 (build_new_1): Don't use the return value of a constructor.
8734 * semantics.c (setup_vtbl_ptr): Don't use the return value
8736 * typeck.c (check_return_expr): Don't magically convert return
8737 statements into `return this' in constructors under the new ABI.
8739 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
8740 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
8741 (base_ctor_identifier): New macro.
8742 (base_dtor_identifier): Likewise.
8743 (deleting_dtor_identifier): Likewise.
8744 * decl.c: Don't include obstack.h.
8745 (obstack_chunk_alloc): Don't define.
8746 (obstack_chunk_free): Likewise.
8747 (struct predefined_identifier): New type.
8748 (initialize_predefined_identifiers): New function.
8749 (init_decl_processing): Use it.
8750 (debug_temp_inits): Remove.
8751 (start_method): Don't call preserve_data.
8752 (hack_incomplete_structures): Update comment.
8753 * init.c (init_init_processing): Don't initialize
8755 (build_offset_rf): Remove dead code.
8756 (build_delete): Use CLASSTYPE_N_BASECLASSES.
8757 * search.c (init_search_processing): Don't initialize
8760 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8762 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
8763 some sign_compare warnings.
8765 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
8767 Rename abi::__vmi_class_type_info members.
8768 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
8769 base_list, detail_masks members to vmi_flags, vmi_base_count,
8770 vmi_bases and vmi_flags_masks respectively.
8771 (__vmi_class_type_info::vmi_flags_masks): Rename
8772 details_unknown_mask to flags_unknown_mask.
8773 * tinfo.cc (__class_type_info::do_upcast): Adjust.
8774 (__vmi_class_type_info::do_find_public_src): Adjust.
8775 (__vmi_class_type_info::do_dyncast): Adjust.
8776 (__vmi_class_type_info::do_upcast): Adjust.
8778 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
8780 * tinfo.cc (convert_to_base): New function.
8781 (get_vbase_offset): Remove. Move into convert_to_base.
8782 (__vmi_class_type_info::do_find_public_src): Adjust.
8783 (__vmi_class_type_info::do_dyncast): Adjust.
8784 (__vmi_class_type_info::do_upcast): Adjust.
8786 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
8788 * tinfo.cc (operator=): Use __builtin_strcmp.
8789 * tinfo2.cc (before): Likewise.
8791 2000-04-06 Mark Mitchell <mark@codesourcery.com>
8793 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
8794 (DECL_SAVED_INLINE): Rename to ...
8795 (DECL_DEFERRED_FN): ... this.
8796 (in_function_p): Remove declaration.
8797 (mark_inline_for_output): Rename to ...
8798 (defer_fn): ... this.
8799 * decl.c (finish_function): Adjust call to mark_inline_for_output.
8800 (in_function_p): Remove definition.
8801 * decl2.c (saved_inlines): Rename to ...
8802 (deferred_fns): ... this.
8803 (saved_inlines_used): Rename to ...
8804 (deferred_fns_used): ... this.
8805 (mark_inline_for_output): Rename to ...
8806 (defer_fn): ... this.
8807 (finish_file): Adjust accordingly.
8808 (init_decl2): Likewise.
8809 * lex.c (cons_up_default_function): Likewise.
8810 * pt.c (mark_decl_instantiated): Likewise.
8811 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
8813 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
8814 * semantics.c (expand_body): Defer more functions.
8816 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
8819 * Make-lang.in (CXX_LIB2FUNCS): Add it.
8821 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8822 __cxa_vec_delete): Declare.
8824 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
8826 * rtti.c (dfs_class_hint_mark): New static function.
8827 (dfs_class_hint_unmark): New static function.
8828 (class_hint_flags): Use them.
8830 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
8832 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
8834 2000-04-05 Mark Mitchell <mark@codesourcery.com>
8836 * cp-tree.h (instantiate_decl): Change prototype.
8837 * decl2.c (mark_used): Adjust call.
8838 * optimize.c (inlinable_function_p): Adjust handling of templates.
8839 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
8840 (do_type_instantiation): Likewise.
8841 (instantiate_decl): Defer more templates.
8842 (instantiate_pending_templates): Adjust logic to handle inline
8845 * Makefile.in (GGC_H): New variable. Use it throughout in place
8848 * call.c: Don't include obstack.h. Include ggc.h.
8849 (obstack_chunk_alloc): Don't define.
8850 (obstack_chunk_free): Likewise.
8851 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
8852 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
8853 (pop_switch): Free it.
8855 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
8857 * dump.c (dequeue_and_dump): Don't try to print the bit_position
8858 if we don't have a DECL_FIELD_OFFSET.
8860 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
8862 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
8865 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8867 * cfns.gperf (hash, libc_name_p): Prototype.
8869 * rtti.c (build_dynamic_cast_1): Constification.
8871 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
8873 * semantics.c (deferred_type_access_control): Prototype.
8875 2000-04-04 Mark Mitchell <mark@codesourcery.com>
8877 Correct many new ABI issues regarding vbase and vcall offset
8879 * cp-tree.h (BINFO_VTABLE): Document.
8880 (struct lang_type): Tweak formatting.
8881 (BINFO_PRIMARY_BINFO): Add to documentation.
8882 (CLASSTYPE_VSIZE): Fix typo in comment.
8883 (CLASSTYPE_VBASECLASSES): Update documentation.
8884 (BINFO_VBASE_MARKED): Remove.
8885 (SET_BINFO_VBASE_MARKED): Likewise.
8886 (CLEAR_BINFO_VBASE_MARKED): Likewise.
8887 (BINFO_FIELDS_MARKED): Remove.
8888 (SET_BINFO_FIELDS_MARKED): Likewise.
8889 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
8890 (enum access_kind): New enumeration.
8891 (num_extra_vtbl_entries): Remove declaration.
8892 (size_extra_vtbl_entries): Likewise.
8893 (get_vtbl_decl_for_binfo): New function.
8894 (dfs_vbase_unmark): Remove declaration.
8895 (mark_primary_bases): Likewise.
8896 * class.c (SAME_FN): Remove.
8897 (struct vcall_offset_data_s): Move definition.
8898 (build_vbase_pointer): Use `build', not `build_binary_op', to
8899 access the vbase pointer under the new ABI.
8900 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
8901 (build_primary_vtable): Likewise.
8902 (dfs_mark_primary_bases): Move here from search.c.
8903 (mark_primary_bases): Likewise.
8904 (determine_primary_bases): Under the new ABI, don't make a base
8905 class a primary base just because we don't yet have any virtual
8907 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
8908 (num_vfun_entries): Remove.
8909 (dfs_count_virtuals): Likewise.
8910 (num_extra_vtbl_entries): Likewise.
8911 (size_extra_vtbl_entries): Likewise.
8912 (layout_virtual_bases): Iterate in inheritance graph order under
8914 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
8915 indicate that a vfield is present.
8916 (init_class_processing): Initialize access_public_node, etc., from
8918 (get_vtbl_decl_for_binfo): New function.
8919 (dump_class_hierarchy_r): Likewise.
8920 (dump_class_hierarchy): Use it.
8921 (finish_vtbls): Build the vtbls in inheritance graph order.
8922 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
8923 (initialize_vtable): Use get_vtbl_decl_for_binfo.
8924 (accumulate_vtbl_inits): Add comments explaining why a pre-order
8926 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
8927 where the vptr points, even for primary vtables.
8928 (build_vtbl_initializer): Adjust handling of vbase and vcall
8930 (build_vcall_and_vbase_vtable_entries): New function.
8931 (dfs_build_vbase_offset_vtbl_entries): Remove.
8932 (build_vbase_offset_vtbl_entries): Reimplement.
8933 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
8934 were already handled in a primary base class vtable.
8935 (build_vcall_offset_vtbl_entries): Adjust.
8936 (build_rtti_vtbl_entries): Adjust.
8937 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
8938 * init.c (expand_virtual_init): Simplify.
8939 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
8940 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
8941 * search.c (BINFO_ACCESS): New macro.
8942 (SET_BINFO_ACCESS): Likewise.
8943 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
8944 (access_in_type): Likewise.
8945 (dfs_accessible_p): Likewise.
8946 (protected_accessible_p): Likewise.
8947 (lookup_fnfields_1): Adjust documentation.
8948 (dfs_mark_primary_bases): Move to class.c
8949 (mark_primary_bases): Likewise.
8950 (dfs_vbase_unmark): Remove.
8951 (virtual_context): Use BINFO_FOR_VBASE.
8952 (dfs_get_vbase_types): Simplify.
8953 (dfs_build_inheritance_graph_order): New function.
8954 (get_vbase_types): Use it.
8955 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
8957 * tinfo.cc (get_vbase_offset): New function.
8958 (__vmi_class_type_info::do_find_public_src): Use it.
8959 (__vmi_class_type_info::do_dyncast): Likewise.
8960 (__vmi_class_type_info::do_upcast): Likewise.
8962 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
8964 * lang-specs.h: Pass -fno-show-column to the preprocessor.
8966 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
8968 * rtti.c (class_hint_flags): Rename flags.
8969 (class_initializer): Remove flags.
8970 (synthesize_tinfo_var): Combine offset and flags. Add flags
8971 for __vmi_class_type_info.
8972 (create_tinfo_types): Remove flags from __class_type_info and
8973 __si_class_type_info. Merge flags and offset from
8974 base_class_type_info.
8975 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
8976 (__base_class_info::is_virtual_p): Adjust.
8977 (__base_class_info::is_public_p): Adjust.
8978 (__base_class_info::offset): New accessor.
8979 (__class_type_info::details): Remove member.
8980 (__class_type_info::__class_type_info): Lose details.
8981 (__class_type_info::detail_masks): Remove.
8982 (__si_class_type_info::__si_class_type_info): Lose details.
8983 (__vmi_class_type_info::details): New member.
8984 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
8985 (__vmi_class_type_info::detail_masks): New member.
8986 * tinfo.cc (__class_type_info::do_upcast): Initialize result
8987 with unknown_details_mask.
8988 (__vmi_class_type_info::do_find_public_src): Adjust
8989 (__vmi_class_type_info::do_dyncast): Adjust.
8990 (__vmi_class_type_info::do_upcast): Set result details, if
8992 (__dynamic_cast): Temporarily #if out optimization.
8994 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
8996 * rtti.c (get_tinfo_decl): Mark used.
8997 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
8998 mark as dealt with, if we output it.
9000 2000-03-28 Mark Mitchell <mark@codesourcery.com>
9002 * class.c: Reorganize to put virtual function table initialization
9003 machinery at the end of the file.
9005 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
9007 * class.c (finish_struct): Use bitsize_zero_node.
9008 * pt.c (instantiate_class_template): Likewise.
9010 2000-03-28 Mark Mitchell <mark@codesourcery.com>
9012 Put RTTI entries at negative offsets in new ABI.
9013 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
9014 vbase offset at index -3, not -1.
9015 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
9016 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
9017 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
9018 (build_rtti_vtbl_entries): New function.
9019 (set_rtti_entry): Remove.
9020 (build_primary_vtable): Don't use it.
9021 (build_secondary_vtable): Likewise.
9022 (start_vtable): Remove.
9023 (first_vfun_index): New function.
9024 (set_vindex): Likewise.
9025 (add_virtual_function): Don't call start_vtable. Do call
9027 (set_primary_base): Rename parameter.
9028 (determine_primary_base): Likewise.
9029 (num_vfun_entries): Don't use skip_rtti_stuff.
9030 (num_extra_vtbl_entries): Include RTTI information.
9031 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
9032 (skip_rtti_stuff): Remove.
9033 (dfs_modify_vtables): Don't use it.
9034 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
9035 (layout_nonempty_base_or_field): Update size handling.
9036 (create_vtable_ptr): Tweak.
9037 (layout_class_type): Adjust parameter names.
9038 (finish_struct_1): Simplify.
9039 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
9040 (skip_rtti_stuff): Remove.
9041 (first_vfun_index): New function.
9042 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
9043 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
9044 (marked_vtable_pathp): Declare.
9045 (unmarked_vtable_pathp): Likewise.
9046 * error.c (dump_expr): Use first_vfun_index to calculate vtable
9048 * rtti.c (build_headof): Look for RTTI at negative offsets.
9049 (get_tinfo_decl_dynamic): Likewise.
9050 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
9052 (create_pseudo_type_info): Do it here instead. Adjust so that
9053 vptr points at first virtual function.
9054 * search.c (marked_vtable_pathp): Make it global.
9055 (unmarked_vtable_pathp): Likewise.
9056 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
9057 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
9058 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
9059 (get_pure_virtuals): Likewise.
9060 (expand_upcast_fixups): Likewise.
9061 * tree.c (debug_binfo): Likewise.
9062 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
9065 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9067 * class.c (check_field_decl): Fix typo.
9068 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
9069 (check_methods): Likewise.
9070 (check_field_decls): Likewise.
9071 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
9072 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
9073 Use DECL_RESULT_FLD, not DECL_RESULT.
9074 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
9075 * lex.c (identifier_type): Likewise.
9076 * pt.c (determine_specialization, lookup_template_class): Likewise.
9077 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
9078 (resolve_overloaded_unification, more_specialized): Likewise.
9079 * semantics.c (finish_member_declaration): Likewise.
9080 * typeck.c (build_x_function_call): Likewise.
9082 2000-03-26 Mark Mitchell <mark@codesourcery.com>
9084 * class.c (layout_empty_base): Handle empty bases with non-byte
9086 (build_base_field): Likewise.
9087 (layout_virtual_bases): Likewise.
9089 * class.c (finish_struct_1): Fix typo in this change:
9091 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9093 2000-03-25 Mark Mitchell <mark@codesourcery.com>
9095 * decl.c (grokdeclarator): Count partial specializations when
9096 keeping track of how many template classes have been seen.
9098 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
9100 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9102 * class.c (build_vbase_pointer_fields): layout_field now place_field.
9103 (get_vfield_offset): Use byte_position.
9104 (set_rtti_entry): Set OFFSET to ssizetype zero.
9105 (get_binfo_offset_as_int): Deleted.
9106 (dfs_record_base_offsets): Use tree_low_cst.
9107 (dfs_search_base_offsets): Likewise.
9108 (layout_nonempty_base_or_field): Reflect changes in RLI format
9109 and call byte_position.
9110 (layout_empty_base): Convert offset to ssizetype.
9111 (build_base_field): use rli_size_unit_so_far.
9112 (dfs_propagate_binfo_offsets): Do computation in proper type.
9113 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
9114 (layout_class_type): Reflect changes in RLI names and fields.
9115 (finish_struct_1): Set DECL_FIELD_OFFSET.
9116 * dump.c (dequeue_and_dump): Call bit_position.
9117 * expr.c (cplus_expand_constant): Use byte_position.
9118 * rtti.c (expand_class_desc): Use bitsize_one_node.
9119 * typeck.c (build_component_addr): Use byte_position and don't
9120 special case for zero offset.
9122 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
9124 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
9126 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
9128 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
9131 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9133 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
9135 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
9136 make_typename_type, check_initializer, cp_finish_decl,
9137 xref_tag): Likewise.
9138 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
9139 decl_namespace, arg_assoc_template_arg, arg_assoc,
9140 validate_nonmember_using_decl, do_class_using_decl): Likewise.
9141 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
9142 args_to_string): Likewise.
9143 * friend.c (is_friend): Likewise.
9144 * lex.c (note_got_semicolon, note_list_got_semicolon,
9145 is_global): Likewise.
9146 * method.c (build_overload_nested_name, build_overload_value,
9147 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
9148 * parse.y (typename_sub, typename_sub1): Likewise.
9149 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
9150 process_partial_specialization, convert_template_argument,
9151 template_args_equal, add_pending_template, lookup_template_class,
9152 for_each_template_parm_r, maybe_fold_nontype_arg,
9153 tsubst, instantiate_template, type_unification_real, unify,
9154 instantiate_pending_templates, set_mangled_name_for_template_decl):
9156 * repo.c (repo_get_id, repo_template_used): Likewise.
9157 * search.c (lookup_field_1): Likewise.
9158 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
9159 * xref.c (classname): Likewise.
9161 2000-03-22 Mark Mitchell <mark@codesourcery.com>
9163 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
9164 (CANONICAL_BINFO): New macro.
9165 (BINFO_NEW_VTABLE_MARKED): Use it.
9166 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
9167 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
9168 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
9170 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
9171 (build_secondary_vtable): Likewise.
9172 (dfs_finish_vtbls): Likewise.
9173 (dfs_accumulate_vtbl_inits): Likewise.
9174 (accumulate_vtbl_inits): New function.
9175 (finish_vtbls): Make sure that virtual bases come after
9176 non-virtual bases in the vtable group.
9177 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
9178 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
9179 * search.c (struct vbase_info): Move definition.
9180 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
9181 (unmarked_new_vtable_p): Likewise.
9182 (dfs_mark_vtable_path): Remove.
9183 (dfs_mark_new_vtable): Remove.
9184 (dfs_unmark_new_vtable): Likewise.
9185 (dfs_clear_search_slot): Likewise.
9186 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
9187 (dfs_clear_vbase_slots): Likewise.
9188 (init_vbase_pointers): LIkewise.
9190 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
9192 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
9193 SIZETYPE to a non-SIZETYPE.
9195 2000-03-21 Mark Mitchell <mark@codesourcery.com>
9197 * class.c (layout_virtual_bases): Adjust names in conditionally
9200 * class.c (record_base_offsets): New function.
9201 (layout_conflict_p): Likewise.
9202 (layout_nonempty_base_or_field): Use it.
9203 (layout_empty_base): New function.
9204 (build_base_field): Use it.
9205 (build_base_fields): Update comment.
9206 (layout_virtual_bases): Fold in a little code form
9207 layout_basetypes. Use layout_empty_base.
9208 (layout_basetypes): Remove.
9209 (end_of_class): New function.
9210 (layout_class_type): Use it. Adjust.
9212 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
9214 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
9216 (dfs_skip_nonprimary_vbases_markedp): Likewise.
9217 * typeck.c (fntype_p): Remove.
9219 * cp-tree.h (TI_SPEC_INFO): Remove.
9220 (CLASSTYPE_TI_SPEC_INFO): Likewise.
9221 * pt.c (process_partial_specialization): Likewise.
9223 * class.c (build_base_field): Fix thinko in computation of binfo
9226 * tree.c (mark_local_for_remap_p): Mark variables declared in
9227 TARGET_EXPRs as well.
9229 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
9231 * typeck.c (require_complete_type, complete_type,
9232 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
9233 build_array_ref, convert_arguments, pointer_diff,
9234 build_x_unary_op, build_unary_op, build_c_cast,
9235 build_modify_expr): Use COMPLETE_TYPE_P etc.
9236 * call.c (is_complete, convert_like_real,
9237 build_new_method_call): Likewise.
9238 * class.c (build_vbase_pointer_fields, check_bases,
9239 build_base_field, finish_struct_1, pushclass): Likewise.
9240 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
9241 * decl.c (maybe_process_template_type_declaration, pushtag,
9242 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
9243 layout_var_decl, check_initializer, cp_finish_decl,
9244 grokdeclarator, require_complete_types_for_parms,
9245 grok_op_properties, xref_tag, xref_basetypes,
9246 check_function_type): Likewise.
9247 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
9248 * friend.c (do_friend): Likewise.
9249 * init.c (build_offset_ref): Likewise.
9250 * parse.y (structsp): Likewise.
9251 * pt.c (maybe_process_partial_specialization,
9252 tsubst_friend_function, instantiate_class_template, tsubst,
9253 do_type_instantiation, instantiate_pending_templates): Likewise.
9254 * repo.c (repo_get_id): Likewise.
9255 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
9256 synthesize_tinfo_var, emit_support_tinfos): Likewise.
9257 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
9258 * semantics.c (begin_class_definition): Likewise.
9259 * tree.c (build_cplus_method_type): Likewise.
9260 * typeck2.c (digest_init, build_functional_cast,
9261 add_exception_specifier): Likewise.
9262 * parse.h, parse.c: Regenerated.
9264 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
9266 * inc/cxxabi.h: New header file. Define new-abi entry points.
9267 (__pointer_type_info::target): Rename member to ...
9268 (__pointer_type_info::type): ... here.
9269 (__base_class_info::type): Rename member to ...
9270 (__base_class_info::base): ... here.
9271 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
9272 * cp-tree.h (CPTI_ABI): New global tree enumeration.
9273 (abi_node): New global tree node.
9274 * decl.c (abi_node): Document.
9275 (init_decl_processing): Initialize abi_node.
9276 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
9277 (get_vmi_pseudo_type_info): Likewise.
9278 (create_tinfo_types): Likewise.
9279 (emit_support_tinfos): Likewise.
9280 * tinfo.h (cxxabi.h): Include for new-abi.
9281 Move rtti class definitions to new header file.
9282 * tinfo.cc (abi): Use the namespace.
9283 (std): Move new abi rtti classes from here ...
9284 (__cxxabiv1): ... to here.
9285 * tinfo2.cc (cxxabi.h): Include for new-abi.
9286 Move rtti class definitions to new header file.
9287 (std): Move new abi rtti classes from here ...
9288 (__cxxabiv1): ... to here.
9289 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
9292 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
9293 Jason Merrill <jason@casey.cygnus.com>
9295 * method.c (build_overload_int): Use host_integerp.
9297 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
9299 * init.c (build_offset_ref): Handle the case of a templated member
9302 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9304 * except.c (expand_exception_blocks): Clear catch_clauses_last.
9306 2000-03-18 Mark Mitchell <mark@codesourcery.com>
9308 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
9309 * class.c (check_bitfield_decl): Turn illegal bitfields into
9311 (dfs_propagate_binfo_offsets): Adjust for new size_binop
9313 (dfs_offset_for_unshared_vbases): Likewise.
9314 * cvt.c (cp_convert_to_pointer): Convert NULL to a
9315 pointer-to-member correctly under the new ABI.
9316 * expr.c (cplus_expand_constant): Don't use cp_convert when
9317 turning an offset into a pointer-to-member.
9318 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
9319 when dereferencing them under the new ABI.
9320 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
9321 of pointers-to-members under the new ABI.
9323 * class.c (check_bitfield_decl): Remove restriction on really long
9325 (layout_class_type): Implement new ABI handling of bitfields
9326 longer than their types.
9328 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9330 * parse.y (extdefs): Call ggc_collect.
9331 * parse.c: Regenerated.
9333 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
9335 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
9336 (note_name_declared_in_class): Use OVL_CURRENT to get at a
9339 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9341 * class.c (build_vbase_path): Use integer_zerop.
9342 (build_vtable_entry): Use tree_low_cst.
9343 (get_vfield_offset): Use bit_position.
9344 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
9346 (check_bitfield_decl): Set DECL_SIZE using convert.
9347 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
9348 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
9350 (finish_struct_1): Use bit_position.
9351 (dump_class_hierarchy): Use tree_low_cst.
9352 * cp-tree.h (min_precision): Add declaration.
9353 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
9354 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
9355 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
9356 * expr.c (cplus_expand_constant): Use bit_position.
9357 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
9358 * rtti.c (get_base_offset): Use bit_position.
9359 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
9360 host_integerp, and tree_low_cst.
9361 (pointer_int_sum): Use integer_zerop.
9362 (build_component_addr): Use bit_position.
9364 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
9366 * typeck.c (require_complete_type): Don't assume size_zero_node.
9367 (complete_type_or_else): Likewise.
9369 2000-03-16 Steven Grady <grady@digitaldeck.com>
9370 Jason Merrill <jason@casey.cygnus.com>
9372 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
9374 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
9376 * decl2.c (grokfield): Bail out if type is error_mark_node.
9378 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
9380 * tinfo2.cc (__ptr_to_member_data): Rename to ...
9381 (__pointer_to_member_data): ... here. Adjust.
9382 * rtti.c (create_tinfo_types): Adjust.
9384 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
9386 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
9387 * decl.c (ref_desc_type_node): Undocument.
9388 * rtti.c (ptr_ref_initializer): Rename to ...
9389 (ptr_initializer): ... here. Adjust comments.
9390 (ptmd_initializer): Fix comment thinko.
9391 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
9392 (create_tinfo_types): Remove ref_desc_type_node init.
9393 * tinfo2.cc (__reference_type_info): Remove.
9395 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
9397 * decl.c (cp_finish_decl): Remove obsolete comment.
9399 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
9401 2000-03-14 Mark Mitchell <mark@codesourcery.com>
9403 * cp-tree.h: Tweak documentation.
9404 * class.c (build_vbase_pointer_fields): Layout the fields, too.
9405 (avoid_overlap): Remove.
9406 (get_binfo_offset_as_int): New function.
9407 (dfs_serach_base_offsets): Likewise.
9408 (layout_nonempty_base_or_field): Likewise.
9409 (build_base_field): Layout fields here. Avoid placing two objects
9410 of the same type at the same address, under the new ABI.
9411 (build_base_fields): Adjust accordingly.
9412 (create_vtable_ptr): Return the new field, but don't attach it to
9414 (remove_base_field): Remove.
9415 (remove_base_fields): Remove.
9416 (layout_basetypes): Adjust accordingly.
9417 (layout_class_type): Call layout_field for each field, rather than
9418 just making a wholesale call to layout_type.
9420 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
9422 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
9424 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
9426 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
9428 * except.c (dtor_nothrow): New fn.
9429 (do_pop_exception): Use it. Take type parm.
9430 (push_eh_cleanup): Take type parm.
9431 (expand_start_catch_block): Pass it.
9432 (build_eh_type_type_ref): Accept null type.
9434 2000-03-12 Mark Mitchell <mark@codesourcery.com>
9436 * cp-tree.h (revert_static_member_fn): Change prototype.
9437 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
9438 (grok_op_properties): Likewise.
9439 (start_function): Likewise.
9440 (revert_static_member_fn): Simplify.
9441 * pt.c (check_explicit_specialization): Adjust call to
9442 revert_static_member_fn.
9444 2000-03-11 Mark Mitchell <mark@codesourcery.com>
9446 * cp-tree.h (scope_kind): New type.
9447 (tmpl_spec_kind): Likewise.
9448 (declare_pseudo_global_level): Remove.
9449 (pseudo_global_level_p): Rename to template_parm_scope_p.
9450 (pushlevel): Remove declaration.
9451 (begin_scope): New function.
9452 (finish_scope): Likewise.
9453 (current_tmpl_spec_kind): Likewise.
9454 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
9455 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
9456 Add template_spec_p.
9457 (toplevel_bindings_p): Adjust.
9458 (declare_pseudo_global_level): Remove.
9459 (pseudo_global_level_p): Rename to template_parm_scope_p.
9460 (current_tmpl_spec_kind): New function.
9461 (begin_scope): Likewise.
9462 (finish_scope): Likewise.
9463 (maybe_push_to_top_level): Adjust.
9464 (maybe_process_template_type_declaration): Likewise.
9465 (pushtag): Likewise.
9466 (pushdecl_nonclass_level): Likewise.
9467 (lookup_tag): Likewise.
9468 (grokfndecl): Handle member template specializations. Share
9469 constructor and non-constructor code.
9470 * decl2.c (check_classfn): Handle member template specializations.
9471 * pt.c (begin_template_parm_list): Use begin_scope.
9472 (begin_specialization): Likewise.
9473 (end_specialization): Likewise.
9474 (check_explicit_specialization): Use current_tmpl_spec_kind.
9475 Handle member template specializations.
9476 (end_template_decl): Use finish_scope. Remove call to
9478 (push_template_decl_real): Remove bogus error message.
9479 (tsubst_decl): Fix typo in code contained in comment.
9480 (instantiate_template): Handle member template specializations.
9481 (most_general_template): Likewise.
9483 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
9485 * lex.c (whitespace_cr): Compress consecutive calls to warning().
9486 (do_identifier): Ditto for error().
9488 * pt.c (convert_nontype_argument): Ditto for cp_error().
9489 (convert_template_argument): Ditto for cp_pedwarn().
9491 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
9493 * exception.cc (__check_null_eh_spec): New fn.
9494 * except.c (expand_end_eh_spec): Call it if the spec is throw().
9496 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
9498 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
9499 * except.c (expand_end_eh_spec): Add the return type.
9500 * rtti.c (throw_bad_cast): Add the parmtypes.
9501 (throw_bad_typeid): Likewise.
9503 * semantics.c (expand_stmt): Only leave out rtl for unused
9504 artificials, and set DECL_IGNORED_P on them as well.
9505 * decl.c (wrapup_globals_for_namespace): Likewise.
9507 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
9509 * decl.c (maybe_commonize_var): Skip all artificial decls.
9510 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
9512 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
9514 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
9515 * cp-tree.h: Declare flag_enforce_eh_specs.
9516 * decl.c (store_parm_decls, finish_function): Check it.
9518 C library functions don't throw.
9519 * Makefile.in (cfns.h): New target.
9520 (except.o): Depend on it.
9521 * Make-lang.in (cc1plus): Depend on cfns.gperf.
9522 * cfns.gperf: New file.
9523 * cfns.h: Generated.
9524 * except.c: Include it.
9525 (nothrow_libfn_p): New fn.
9526 * decl.c (grokfndecl): Use it.
9527 * cp-tree.h: Declare it.
9529 * decl.c (push_overloaded_decl_1, auto_function,
9530 define_function): Lose.
9531 (build_library_fn_1): New static fn.
9532 (builtin_function): Use it.
9533 (get_atexit_node): Use build_library_fn_ptr.
9534 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
9535 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
9536 push_void_library_fn, push_throw_library_fn): New fns.
9537 * cp-tree.h: Declare them.
9538 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
9539 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
9540 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
9541 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
9542 * rtti.c (build_runtime_decl): Lose.
9543 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
9544 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
9545 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
9547 * call.c (build_call): Remove result_type parm.
9548 Call mark_used on unused artificial fns.
9549 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
9551 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
9553 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
9555 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
9556 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
9557 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
9558 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
9559 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
9560 expand_generic_desc): Likewise.
9562 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
9564 * exception.cc (__cp_pop_exception): Cleanup the original object.
9566 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
9568 * decl.c (grok_op_properties): Merge conversion to void warning
9569 with other silly op warnings.
9571 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
9573 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
9574 array CONSTRUCTOR elements. Don't use expr_tree_cons.
9576 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
9578 * decl.c (cp_make_fname_decl): New function.
9579 (wrapup_globals_for_namespace): Don't emit unused static vars.
9580 (init_decl_processing): Remove comment about use of
9581 array_domain_type. Set make_fname_decl.
9582 (cp_finish_decl): Remove __FUNCTION__ nadgering.
9583 * semantics.c (begin_compound_stmt): Remove
9584 current_function_name_declared flagging.
9585 (expand_stmt): Don't emit unused local statics.
9586 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
9589 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
9591 * typeck.c (convert_for_assignment): Don't look at array
9593 * call.c (convert_like_real): Likewise.
9595 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
9597 Add initial support for '\uNNNN' specifier.
9598 * lex.c (read_ucs): New fn.
9599 (readescape, skip_white_space): Call it.
9600 (is_extended_char, is_extended_char_1): New fns.
9601 (utf8_extend_token): New fn, #if 0'd out.
9602 (real_yylex): Treat extended chars like letters.
9604 * search.c (note_debug_info_needed): Walk the bases even if we
9605 weren't deferring the type itself.
9607 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9609 * decl2.c (finish_objects): Constify a char*.
9611 * method.c (emit_thunk): Likewise.
9613 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
9615 * typeck.c (dubious_conversion_warnings): Look through
9618 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9620 * class.c (dfs_modify_vtables): I is now unsigned.
9621 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
9622 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
9623 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
9624 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
9625 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
9626 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
9627 Call integer_all_onesp.
9628 * typeck2.c (process_init_constructor): Use compare_tree_int.
9630 * lang-specs.h (as): Don't call if -syntax-only.
9632 2000-03-06 Mark Mitchell <mark@codesourcery.com>
9634 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
9635 RTL_EXPR_HAS_NO_SCOPE after all.
9637 2000-03-05 Mark Mitchell <mark@codesourcery.com>
9639 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
9640 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
9641 RTL_EXPR_HAS_NO_SCOPE.
9643 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
9646 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
9648 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
9650 * call.c (convert_like): Macrofy.
9651 (convert_like_with_context): New macro.
9652 (convert_like_real): Renamed from convert_like. Add calling
9653 context parameters, for diagnostics. Add recursive flag. Call
9654 dubious_conversion_warnings for outer conversion.
9655 (build_user_type_conversion): Use convert_like_with_context.
9656 (build_over_call): Likewise. Don't warn about dubious
9657 conversions here. Adjust convert_default_arg calls.
9658 (convert_default_arg): Add context parameters for diagnostics.
9659 Pass through to convert_like_with_context.
9660 * cp-tree.h (convert_default_arg): Add context parameters.
9661 (dubious_conversion_warnings): Prototype new function.
9662 * typeck.c (convert_arguments): Adjust convert_default_arg call.
9663 (dubious_conversion_warnings): New function, broken
9664 out of convert_for_assignment.
9665 (convert_for_assignment): Adjust.
9667 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
9669 * decl2.c (key_method): Break out from...
9670 (import_export_vtable, import_export_class): ...here.
9672 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
9673 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
9675 * search.c (note_debug_info_needed, dfs_debug_mark,
9676 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
9677 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
9679 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
9681 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
9684 2000-03-02 Mark Mitchell <mark@codesourcery.com>
9686 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
9687 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
9688 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
9689 (lang_type): Split gets_new into has_new and has_array_new.
9690 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9691 (TYPE_GETS_NEW): Split into ...
9692 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
9693 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
9694 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
9695 (build_op_new_call): Don't declare.
9696 (build_new_1): Likewise.
9697 * call.c (build_op_new_call): Remove.
9698 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
9699 instead of TYPE_NEEDS_DESTRUCTOR.
9700 (finish_struct_bits): Likewise.
9701 (add_implicitly_declared_members): Likewise.
9702 (check_field_decl): Likewise.
9703 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
9704 correctly under the new ABI.
9705 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
9706 instead of TYPE_NEEDS_DESTRUCTOR.
9707 (initialize_local_var): Likewise.
9708 (destroy_local_var): Likewise.
9709 (cp_finish_decl): Likewise.
9710 (register_dtor_fn): Likewise.
9711 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
9712 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
9713 TYPE_VEC_DELETE_TAKES_SIZE here.
9714 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
9715 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
9716 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9717 (finish_destructor_body): Likewise.
9718 (maybe_build_cleanup_1): Likewise.
9719 * decl2.c (do_static_destruction): Likewise.
9720 * init.c (build_new_1): Make it static.
9721 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9722 (expand_cleanup_for_base): Likewise.
9723 (get_cookie_size): New function.
9724 (build_new_1): Handle array-new cookies correctly under the new
9726 (build_vec_delete_1): Likewise.
9727 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9728 (build_delete): Likewise.
9729 (build_vec_delete): Handle array-new cookies correctly under the new
9731 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9732 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
9733 TYPE_HAS_ARRAY_NEW_OPERATOR.
9734 * ptree.c (print_lang_type): Check them.
9735 * search.c (context_for_name_lookup): Fix typo in comment.
9736 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
9737 * tree.c (break_out_cleanups): Likewise.
9738 (build_cplus_array_test_1): Likewise.
9739 (cp_build_qualified_type_real): Likewise.
9740 * typeck.c (complete_type): Likewise.
9742 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
9743 the command-line, not the end.
9745 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
9747 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
9749 2000-03-02 Tom Tromey <tromey@cygnus.com>
9751 * cp-tree.h (build_java_class_ref): Declare.
9752 * init.c (build_java_class_ref): No longer static.
9753 * except.c (expand_throw): Generate a Java-style `throw' if the
9754 thrown object is a "Java" object.
9755 (initialize_handler_parm): Generate a Java-style lookup of
9756 exception info if the caught object is a "Java" object.
9757 (catch_language, catch_language_init): New globals.
9758 (decl_is_java_type): New function.
9759 (expand_start_catch_block): Don't call push_eh_info() or
9760 push_eh_cleanup() when handling a Java-style "catch". Pass Java
9761 class reference to build_catch_block.
9763 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9765 * typeck.c (comptypes): Treat sizetype like its language equivalent.
9767 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
9769 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
9770 to merge reference/pointer code and fix incorrect warnings.
9772 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
9774 * search.c (protected_accessible_p): Use context_for_name_lookup.
9776 * init.c (construct_virtual_bases): Fix thinko.
9777 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
9779 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
9781 * decl.c (current_function_decl): Move to toplev.c.
9783 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
9785 * pt.c (fn_type_unification): Unify return type, whenever
9787 (get_bindings_real): Only pass return type when necessary.
9788 Remove explicit return type check.
9789 * class.c (resolve_address_of_overloaded_function): Pass desired
9790 return type to fn_type_unification.
9792 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9794 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
9796 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
9798 * rtti.c (expand_class_desc): Likewise.
9799 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
9800 (THUNK_VCALL_OFFSET): Likewise.
9801 (THUNK_DELTA): Reflect changes in ../tree.h.
9803 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
9805 * search.c (protected_accessible_p): Also allow the access if
9806 the member is public in DERIVED. Lose TYPE parm.
9807 (friend_accessible_p): Lose TYPE parm.
9808 (accessible_p): Adjust.
9810 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9812 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
9813 on things that are not sizes; ssize_binop deleted.
9814 Call size_diffop when appropriate.
9815 (dfs_build_vcall_offset_vtbl_entries): Likewise.
9816 (build_primary_vtable, build_secondary_vtable): Likewise.
9817 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
9818 Variable I is HOST_WIDE_INT.
9819 (get_vfield_offset): Pass proper types to size_binop.
9820 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
9821 (finish_struct_1): Likewise.
9822 (skip_rtti_stuff): Arg N is now pointer to signed.
9823 (layout_class_type): Use size_zero_node.
9824 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
9825 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
9826 * decl.c (complete_arry_type): Pass proper types to size_binop.
9827 (xref_basetypes): BINFO_OFFSET is sizetype.
9828 * error.c (dump_expr): Don't use size_binop non-sizes.
9829 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
9830 * init.c (construct_virtual_bases): Fix type error.
9831 (build_vec_delete_1): Pass proper type to size_binop and don't
9833 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
9834 * rtti.c (get_base_offset): Pass proper type to size_binop.
9835 * search.c (dfs_find_vbases): Fix type error.
9836 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
9837 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
9838 * tree.c (debug_binfo): Variable N is signed.
9839 Use HOST_WIDE_INT_PRINT_DEC.
9840 * typeck.c (comptypes): sizetype is same as equivalent integer type.
9841 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
9842 size_one_node and size_zero_node.
9843 (c_alignof): Use size_one_node.
9844 (build_component_addr): Pass proper types to size_binop.
9845 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
9847 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
9849 Implement class scope using-declarations for functions.
9850 * class.c (handle_using_decl): Call add_method for used functions.
9851 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
9852 (add_method): Used functions are hidden by local functions.
9853 (check_bases_and_members): Handle using-decls before finalizing
9854 CLASSTYPE_METHOD_VEC.
9855 * call.c (add_function_candidate): Add ctype parm; if non-zero,
9856 override the type of 'this' accordingly.
9857 (add_template_candidate, add_template_candidate_real): Add ctype parm.
9858 (convert_class_to_reference, build_user_type_conversion_1,
9859 build_new_function_call, build_object_call, build_new_op,
9860 build_new_method_call): Pass ctype parm.
9862 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
9864 * call.c (convert_class_to_reference, build_user_type_conversion_1,
9865 build_new_function_call, build_object_call, build_new_op,
9866 build_new_method_call, build_op_delete_call): Don't get basetype_path
9868 * typeck.c (build_component_ref): Likewise.
9869 * init.c (build_offset_ref): Likewise.
9870 (resolve_offset_ref): Don't call enforce_access.
9871 Call build_scoped_ref.
9872 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
9873 would cause an error or if -pedantic.
9874 * class.c (alter_access): Lose binfo parm.
9876 2000-02-26 Mark Mitchell <mark@codesourcery.com>
9878 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
9881 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
9883 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
9884 pseudo_type_info creation into the std namespace
9886 2000-02-26 Mark Mitchell <mark@codesourcery.com>
9888 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
9889 (import_export_class): Remove declaration.
9890 * decl2.c (import_export_class): Make it static.
9891 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
9892 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
9893 EXPR_WITH_FILE_LOCATION.
9894 * lex.c (check_newline): Tweak filename/lineno setting.
9895 * semantics.c (begin_while_stmt): Fix typo in comment.
9897 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9899 * lang-options.h (-fmessage-length=): Add missing option.
9901 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
9903 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
9905 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
9907 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
9909 * optimize.c (expand_call_inline): Emit the return label before
9910 evaluating the return value.
9912 2000-02-24 Mark Mitchell <mark@codesourcery.com>
9914 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
9915 than duplicating functionality here.
9916 * optimize.c: Include input.h.
9917 (expand_call_inline): Use push_srcloc and pop_srcloc.
9918 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
9919 * parse.c: Regenerated.
9920 * Makefile.in (lex.o): Depend on input.h.
9921 (optimize.o): Likewise.
9923 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
9925 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
9926 function type, rather than ICE.
9928 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
9930 * decl.c (grokdeclarator): Call decl_type_access_control.
9931 * parse.y (parse_end_decl): Don't call decl_type_access_control if
9934 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
9936 * decl.c (decls_match): Remove obsolete static member nadgering.
9938 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9940 * decl.c (grokdeclarator): Change ANSI to ISO.
9941 * lex.c (consume_string, readescape, do_identifier): Likewise.
9942 (parse_float, real_yylex): Likewise.
9943 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
9944 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
9945 new_type_id, maybe_label_decls, simple_stmt,
9946 for.init.statement): Likewise.
9947 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
9948 * semantics.c (finish_named_return_value): Likewise.
9949 * parse.c: Regenerate.
9951 2000-02-21 Mark Mitchell <mark@codesourcery.com>
9953 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
9954 (CPTI_CLASS_STAR_TYPE): Remove.
9955 (vtable_index_type): Likewise.
9956 (class_star_type_node): Remove.
9957 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
9958 (build_binary_op_nodefault): Remove.
9959 * call.c (build_new_op): Use build_binary_op instead of
9960 build_binary_op_nodefault.
9961 * decl.c (init_decl_processing): Remove class_star_type_node
9962 initialization. Make delta_type_node ptrdiff_type_node under the
9963 new ABI. Initialize vtable_index_type.
9964 (build_ptrmemfunc_type): Build different structures for the new
9966 (build_enumerator): Use build_binary_op instead of
9967 build_binary_op_nodefault.
9968 * method.c (build_overload_value): Mangle pointers-to-members
9969 appropriately under the new ABI.
9970 * typeck.c (build_array_ref): Use build_binary_op instead of
9971 build_binary_op_nodefault.
9972 (get_member_function_from_ptrfunc): Adjust for the new ABI.
9973 (build_binary_op_nodefault): Rename to ...
9974 (build_binary_op): ... this. Remove old version. Adjust for
9975 pointer-to-member comparisons under the new ABI.
9976 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
9977 (build_ptrmemfunc): Adjust for the new ABI.
9978 (expand_ptrmemfunc_cst): Likewise.
9979 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
9980 (pfn_from_ptrmemfunc): Adjust for the new ABI.
9982 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
9984 * call.c (build_object_call): Compress consecutive calls to
9986 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
9987 (build_op_delete_call): Adjust message formatting.
9989 * class.c (check_bases): Compress consecutive calls to
9991 (finish_struct_anon): Say 'ISO C++'.
9993 * decl.c (start_decl): Same here.
9994 (grok_reference_init): Likewise.
9995 (grokfndecl): Correct message formatting.
9996 (grokfndecl): Improve diagnostic.
9997 (check_static_variable_definition): Likewise. Say 'ISO C++'
9998 (compute_array_index_type): Say 'ISO C++'
9999 (create_array_type_for_decl): Compress consecutive calls to
10001 (grokdeclarator): Say 'ISO C++'
10002 (grok_op_properties): Likewise.
10004 * decl2.c (delete_sanity): Clairify diagnostic.
10005 (check_member_template): Same here.
10006 (grok_function_init): Use consistent terminology.
10008 * expr.c (do_case): Say 'ISO C++'
10010 * friend.c (do_friend): Compress consecutive calls to warning.
10012 2000-02-20 Mark Mitchell <mark@codesourcery.com>
10014 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
10015 * class.c (build_secondary_vtable): Reorganize. Don't create a
10016 new vtable under the new ABI.
10017 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
10018 computing the size.
10019 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
10020 the initializing elements.
10021 (initialize_vtable): New function.
10022 (dfs_finish_vtbls): Use it.
10023 (dfs_accumulate_vtbl_inits): New function.
10024 (finish_vtbls): Merge primary and secondary vtables under the new
10026 (finish_struct_1): Remove redundant call to layout_vtable_decl.
10027 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
10030 * class.c (build_vtable): New function, split out from ...
10031 (get_vtable_decl): ... here, and ...
10032 (build_secondary_vtable): ... here.
10034 * pt.c (tsubst_decl): Fix formatting.
10036 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10038 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
10039 (avoid_overlap, build_base_field): Likewise.
10040 (build_base_field, build_base_fields, is_empty_class):
10041 Test DECL_SIZE with integer_zero.
10042 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
10043 * cp-tree.h (struct lang_type): New field size_unit.
10044 (CLASSTYPE_SIZE_UNIT): New macro.
10045 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
10046 (cp_finish_decl): Delete -Wlarger-than processing.
10047 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
10048 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
10049 * tree.c (make_binfo): binfo vector is one entry longer.
10050 (walk_tree): Walk DECL_SIZE_UNIT.
10052 2000-02-19 Mark Mitchell <mark@codesourcery.com>
10054 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
10056 (build_vtable_entry): Don't assume all vtable entries are
10058 (build_vtbl_initializer): Adjust accordingly.
10059 (get_vtable_decl): Fix formatting.
10061 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
10063 * semantics.c (deferred_type_access_control): Walk the entire
10065 (save_type_access_control): Rename from
10066 initial_deferred_type_access_control. Just remember the value.
10067 (decl_type_access_control): New fn.
10068 (begin_function_definition): Use deferred_type_access_control, after
10069 we've started the function. Set type_lookups to error_mark_node.
10070 * parse.y (frob_specs, fn.def1): Adjust.
10071 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
10072 (parse_end_decl, parse_bitfield0, parse_method): New fns.
10073 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
10074 (after_type_component_declarator0): Likewise.
10075 (after_type_component_declarator): Likewise.
10076 (notype_component_declarator): Likewise.
10077 * cp-tree.h: Adjust.
10079 * decl.c (redeclaration_error_message): Allow redeclaration of
10080 namespace-scope decls.
10082 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
10084 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
10086 2000-02-17 Mark Mitchell <mark@codesourcery.com>
10088 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
10089 * decl2.c (grokclassfn): Likewise.
10091 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
10093 * decl2.c (lang_decode_option): Don't set default message length
10095 * lex.c (lang_init_options): Set it here.
10097 2000-02-16 Mark Mitchell <mark@codesourcery.com>
10099 Make DECL_CONTEXT mean the class in which a member function was
10100 declared, even for a virtual function.
10101 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
10102 (DECL_FRIEND_CONTEXT): New macro.
10103 (DECL_REAL_CONTEXT): Remove.
10104 (SET_DECL_FRIEND_CONTEXT): Likewise.
10105 (DECL_VIRTUAL_CONTEXT): Adjust.
10106 (DECL_CLASS_SCOPE_P): Use TYPE_P.
10107 (add_friends): Remove.
10108 (hack_decl_function_context): Likewise.
10109 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
10111 (build_over_call): Fix indentation. Use DECL_CONTEXT
10112 instead of DECL_CLASS_CONTEXT.
10113 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
10114 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
10115 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10116 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
10117 (build_base_field): Likewise.
10118 (finish_struct_1): Likewise.
10119 (build_self_reference): Likewise.
10120 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
10122 (pushtag): Use decl_function_context, not
10123 hack_decl_function_context.
10124 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
10125 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
10126 (pushdecl): Remove bogus code.
10127 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
10128 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
10129 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10130 Use decl_function_context, nothack_decl_function_context.
10131 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
10132 (grokdeclarator): Likewise. Use decl_function_context, not
10133 hack_decl_function_context.
10134 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
10135 (start_function): Use DECL_FRIEND_CONTEXT, not
10136 DECL_CLASS_CONTEXT. Use decl_function_context, not
10137 hack_decl_function_context.
10138 (finish_function): Use decl_function_context, not
10139 hack_decl_function_context.
10140 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
10141 DECL_CLASS_CONTEXT.
10142 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
10143 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
10144 (grokfield): Likewise.
10145 (finish_builtin_type): Likewise.
10146 (finish_vtable_vardec): Use decl_function_context, not
10147 hack_decl_function_context.
10148 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10149 (start_static_initialization_or_destruction): Likewise.
10150 (finish_static_initialization_or_destruction): Likewise.
10151 (mark_used): Adjust logic for deciding when to synthesize methods.
10152 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
10154 * error.c (dump_function_decl): Use DECL_CONTEXT, not
10155 DECL_CLASS_CONTEXT.
10156 * friend.c (is_friend): Likewise.
10157 (add_friends): Remove.
10158 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
10159 * lex.c (begin_definition_of_inclass_inline): Use
10160 decl_function_context, not hack_decl_function_context.
10161 (process_next_inline): Likewise.
10162 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
10163 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
10164 DECL_CLASSS_CONTEXT.
10165 (hack_identifier): Likewise.
10166 (synthesize_method): Use decl_function_context, not
10167 hack_decl_function_context.
10168 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
10170 (is_member_template): Use decl_function_context, not
10171 hack_decl_function_context. Use DECL_CONTEXT, not
10172 DECL_CLASS_CONTEXT.
10173 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
10174 DECL_CLASS_CONTEXT.
10175 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
10177 (push_template_decl_real): Likewise.
10178 (instantiate_class_template): Don't call add_friends.
10179 (tsubst_default_argument): Use DECL_CONTEXT, not
10181 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
10182 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10183 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
10184 DECL_CLASS_CONTEXT.
10185 * repo.c (repo_inline_used): Likewise.
10186 * search.c (current_scope): Adjust for new _CONTEXT macros.
10187 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
10189 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
10190 (lookup_fnfields_here):Likewise.
10191 (check_final_overrider): Likewise.
10192 (init_vbase_pointers): Likewise.
10193 (virtual_context): Likewise.
10194 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
10195 (expand_body): Use decl_function_context, not
10196 hack_decl_function_context.
10197 * tree.c (hack_decl_function_context): Remove.
10198 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
10199 DECL_CLASS_CONTEXT.
10200 * typeck2.c (error_not_base_type): Likewise.
10202 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
10204 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
10206 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10208 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
10210 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
10212 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
10214 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
10216 * decl2.c (lang_decode_option): Enable automatic line wrapping.
10218 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
10220 * parse.y (frob_specs): Split out...
10221 (parse_decl): From here.
10222 (fn.def2): Call initial_deferred_type_access_control.
10223 (after_type_component_declarator0): Call frob_specs.
10224 (notype_component_declarator0): Likewise.
10225 * search.c (friend_accessible_p): Nested classes are friends of their
10228 2000-02-10 Mark Mitchell <mark@codesourcery.com>
10230 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
10231 used to create an implicit temporary.
10233 * class.c (dfs_modify_vtables): Tweak calculation of functions to
10236 2000-02-08 Nathan Sidwell <nathan@acm.org>
10238 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
10239 strip array element qualifiers too.
10241 2000-02-07 Mark Mitchell <mark@codesourcery.com>
10243 * decl.c (store_parm_decls): Don't build cleanups for parameters
10244 while processing_template_decl.
10246 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
10248 * cp-tree.h (struct saved_scope): Add incomplete field.
10249 (namespace_scope_incomplete): New macro.
10250 * decl.c (pushdecl): Use it.
10251 (hack_incomplete_structures): Use it. See through artificial
10253 (mark_saved_scope): Mark it.
10255 Implement access control for nested types.
10256 * search.c (type_access_control): New fn.
10257 (accessible_p): Now we do perform access control for types.
10258 * semantics.c (deferred_type_access_control): New fn.
10259 (initial_deferred_type_access_control): New fn.
10260 (begin_function_definition): Call it. Add lookups parm.
10261 * decl.c (struct binding_level): Add this_class field.
10262 (pushlevel_class): Set it.
10263 (mark_binding_level): Mark it.
10264 (lookup_name_real): Use it. Call type_access_control.
10265 (mark_saved_scope): Mark lookups field.
10266 * cp-tree.h (flagged_type_tree): Add lookups field.
10267 (struct saved_scope): Add lookups field.
10268 (type_lookups): New macro.
10269 * parse.y (declmods): Now <ftype>.
10270 (parse_decl): Add lookups parm. Call
10271 initial_deferred_type_access_control.
10272 (lang_extdef): Clear type_lookups.
10273 (typed_declspecs, declmods, typespec): Set lookups field.
10274 (initdcl): Call deferred_type_access_control.
10275 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
10276 component_decl_1, named_parm): Adjust.
10277 * friend.c (is_friend): Nested classes are friends of their
10280 * class.c (currently_open_derived_class): New fn.
10281 * method.c (hack_identifier): Use it.
10283 * lex.c (do_identifier): Remove obsolete code.
10285 * parse.y (typed_typespecs): Propagate new_type_flag properly.
10287 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
10289 * tinfo.h: Remove apostrophes from C++ comment (xgettext
10290 thinks this file is plain C).
10292 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10294 * Makefile.in (call.o): Depend on $(EXPR_H).
10296 * call.c: Include "expr.h".
10298 * class.c (dump_class_hierarchy): Add prototype.
10300 * search.c (dfs_get_pure_virtuals): Likewise.
10302 2000-02-1 Ulrich Drepper <drepper@redhat.com>
10304 * parse.y (simple_stmt): Allow :: token in asm parameter list.
10305 * parse.c: Rebuilt.
10307 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
10309 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
10310 Store it in DECL_FCONTEXT.
10311 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
10313 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
10315 * tinfo.h (old abi): #include "tconfig.h".
10316 * tinfo.cc (convert_to_base): Move into old abi section.
10318 2000-01-31 Mark Mitchell <mark@codesourcery.com>
10320 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
10321 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
10322 (BINFO_PRIMARY_BINFO): New macro.
10323 (BF_DELTA): Rename to ...
10324 (BV_DELTA): ... this.
10325 (BF_VCALL_INDEX): Rename to ...
10326 (BV_VCALL_INDEX): ... this.
10327 (BF_FN): Rename to ...
10329 * class.c (build_vbase_path): Adjust for changes to reverse_path.
10330 (set_rtti_entry): Rename BF_ macros to BV_ variants.
10331 (modify_vtable_entry): Simplify.
10332 (add_virtual_function): Rename BF_ macros to BV_ variants.
10333 (build_vtable_initializer): Likewise.
10334 (get_class_offset_1): Remove.
10335 (dfs_get_class_offset): Likewise.
10336 (get_class_offset): Likewise.
10337 (dfs_find_final_overrider): New function.
10338 (find_final_overrider): Likewise.
10339 (modify_one_vtable): Remove.
10340 (dfs_find_base): New function.
10341 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
10342 find_final_overrider.
10343 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
10345 (dfs_fixup_vtable_deltas): Remove.
10346 (override_one_vtable): Remove.
10347 (merge_overrides): Likewise.
10348 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
10349 unreal chilren of virtual bases.
10350 (finish_struct_1): Don't use merge_overrides. Don't use
10351 dfs_fixup_vtable_deltas.
10352 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
10355 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
10356 Jason Merrill <jason@yorick.cygnus.com>
10358 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
10360 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
10362 * exception.cc (__throw_bad_typeid): Add missing std::.
10364 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10366 * cp-tree.h (make_thunk): PROTO -> PARAMS.
10368 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
10370 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
10372 Runtime support for new-abi rtti.
10373 * inc/typeinfo (type_info::operator!=): Define in class.
10374 (type_info::before, type_info::name, type_info::operator==,
10375 type_info::operator!=): Define new ABI implementations.
10376 (type_info::is_pointer_p, type_info::is_function_p): Declare
10377 new virtual functions.
10378 (type_info::do_catch, type_info::do_upcast): Likewise.
10380 * tinfo.h (__base_class_info): Define new class.
10381 (__class_type_info): Likewise.
10382 (__si_class_type_info): Likewise.
10383 (__vmi_class_type_info): Likewise.
10384 (__dynamic_cast): Prototype.
10386 * tinfo.cc: Conditionalize old and new rtti mechanisms.
10387 (type_info::is_pointer_p): Define new function.
10388 (type_info::is_function_p): Likewise.
10389 (type_info::do_catch): Likewise.
10390 (type_info::do_upcast): Likewise.
10391 (vtable_prefix): New structure for vtable access.
10392 (adjust_pointer): Define new template function.
10393 (contained_p, public_p, virtual_p, contained_public_p,
10394 contained_nonpublic_p, contained_nonvirtual_p): Define new
10396 (nonvirtual_base_type): New local variable.
10397 (__class_type_info::~__class_type_info): Define.
10398 (__si_class_type_info::~__si_class_type_info): Likewise.
10399 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
10400 (__class_type_info::do_catch): Define new function.
10401 (__class_type_info::do_upcast): Likewise.
10402 (__class_type_info::find_public_src): Likewise.
10403 (__class_type_info::do_find_public_src): Likewise.
10404 (__si_class_type_info::do_find_public_src): Likewise.
10405 (__vmi_class_type_info::do_find_public_src): Likewise.
10406 (__class_type_info::do_dyncast): Likewise.
10407 (__si_class_type_info::do_dyncast): Likewise.
10408 (__vmi_class_type_info::do_dyncast): Likewise.
10409 (__class_type_info::do_upcast): Likewise.
10410 (__si_class_type_info::do_upcast): Likewise.
10411 (__vmi_class_type_info::do_upcast): Likewise.
10412 (__dynamic_cast): Likewise.
10414 * tinfo2.cc (__fundamental_type_info): Define new class.
10415 (__pointer_type_info): Likewise.
10416 (__reference_type_info): Likewise.
10417 (__array_type_info): Likewise.
10418 (__function_type_info): Likewise.
10419 (__enum_type_info): Likewise.
10420 (__ptr_to_member_type_info): Likewise.
10421 (__fundamental_type_info::~__fundamental_type_info): Define.
10422 (__pointer_type_info::~__pointer_type_info): Likewise.
10423 (__reference_type_info::~__reference_type_info): Likewise.
10424 (__array_type_info::~__array_type_info): Likewise.
10425 (__function_type_info::~__function_type_info): Likewise.
10426 (__enum_type_info::~__enum_type_info): Likewise.
10427 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
10428 (__pointer_type_info::do_catch): Define new function.
10429 (__ptr_to_member_type_info::do_catch): Define new function.
10431 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
10432 (__is_pointer): Likewise.
10434 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
10436 2000-01-30 Mark Mitchell <mark@codesourcery.com>
10438 * cp/class.c (build_vtable): Rename to build_primary_vtable.
10439 (prepare_fresh_vtable): Rename to build_secondary_vtable.
10440 (make_new_vtable): New function.
10441 (modify_vtable_entry): Handle generation of new vtables correctly.
10442 (modify_one_vtable): Remove unused parameter.
10443 (dfs_fixup_vtable_deltas): Likewise.
10444 (override_one_vtable): Use build_secondary_vtable.
10445 (finish_struct_1): Use build_primary_vtable and
10446 build_secondary_vtable.
10448 2000-01-28 Ulrich Drepper <drepper@redhat.com>
10450 * cp/decl.c: Adjust variable names, comments, help strings.
10452 2000-01-29 Nathan Sidwell <nathan@acm.org>
10454 * new2.cc (operator delete[]): Use operator delete, don't assume
10457 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
10459 * class.c (build_vtbl_initializer): Add argument to
10460 build_vtable_entry call.
10462 2000-01-27 Mark Mitchell <mark@codesourcery.com>
10464 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
10465 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
10466 (BF_DELTA): New macro.
10467 (BF_VCALL_INDEX): Likewise.
10469 (THUNK_VCALL_OFFSET): Likewise.
10470 (make_thunk): Change prototype.
10471 * class.c (build_vtable_entry): Integrate
10472 build_vtable_entry_for_fn. Handle vcall indices.
10473 (build_vtable_entry_for_fn): Remove.
10474 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
10475 BF_VCALL_INDEX, BF_FN.
10476 (modify_vtable_entry): Integrate common code from
10477 modify_one_vtable and dfs_fixup_vtable_deltas.
10478 (add_virtual_function): Set BF_VCALL_INDEX.
10479 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
10481 (modify_one_vtable): Simplify.
10482 (dfs_fixup_vtable_deltas): Likewise.
10483 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
10484 * method.c (make_thunk): Handle vcall indices.
10486 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
10488 Compiler side new abi rtti (not enabled).
10489 * cp-tree.h (new_abi_rtti_p): New macro.
10490 (emit_support_tinfos): Prototype new function.
10491 (tinfo_decl_p): Likewise.
10492 (emit_tinfo_decl): Likwise.
10493 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
10495 (doing_runtime): New local static.
10496 (init_rtti_processing): Add new-abi initializer.
10497 (get_tinfo_decl): Add new-abi logic.
10498 (tinfo_from_decl): Likewise.
10499 (build_dynamic_cast_1): Likewise.
10500 (qualifier_flags): New static function.
10501 (tinfo_base_init): Likewise.
10502 (generic_initializer): Likewise.
10503 (ptr_ref_initializer): Likewise.
10504 (ptmd_initializer): Likewise.
10505 (class_hint_flags): Likewise.
10506 (class_initializer): Likewise.
10507 (synthesize_tinfo_var): Likewise.
10508 (create_real_tinfo_var): Likewise.
10509 (create_pseudo_type_info): Likewise.
10510 (get_vmi_pseudo_type_info): Likewise.
10511 (create_tinfo_types): Likewise.
10512 (emit_support_tinfos): New global function.
10513 (tinfo_decl_p): New global predicate.
10514 (emit_tinfo_decl): New global function.
10515 * class.c (set_rtti_entry): Generalize for old and new rtti.
10516 (build_vtbl_initializer): Likewise.
10517 * decl2.c (finish_file): Likewise.
10519 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
10521 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
10522 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
10524 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
10526 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
10529 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
10531 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
10533 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
10535 * optimize.c (calls_setjmp_r): Supply new argument
10536 to special_function_p.
10538 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10540 * call.c: PROTO -> PARAMS.
10541 * class.c: Likewise.
10542 * cp-tree.h: Likewise.
10544 * decl.c: Likewise.
10545 * decl.h: Likewise.
10546 * decl2.c: Likewise.
10547 * dump.c: Likewise.
10548 * errfn.c: Likewise.
10549 * error.c: Likewise.
10550 * except.c: Likewise.
10551 * expr.c: Likewise.
10552 * init.c: Likewise.
10553 * input.c: Likewise.
10556 * method.c: Likewise.
10557 * optimize.c: Likewise.
10558 * parse.y: Likewise.
10560 * repo.c: Likewise.
10561 * rtti.c: Likewise.
10562 * search.c: Likewise.
10563 * semantics.c: Likewise.
10564 * spew.c: Likewise.
10565 * tree.c: Likewise.
10566 * typeck.c: Likewise.
10567 * typeck2.c: Likewise.
10568 * xref.c: Likewise.
10570 2000-01-25 Richard Henderson <rth@cygnus.com>
10572 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
10574 2000-01-25 Mark Mitchell <mark@codesourcery.com>
10576 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
10577 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
10578 (struct vcall_offset_data_s): New type.
10579 (dfs_vcall_offset_queue_p): New function.
10580 (dfs_build_vcall_offset_vtbl_entries): Likewise.
10581 (build_vcall_offset_vtbl_entries): Likewise.
10582 (layout_vtable_decl): Likewise.
10583 (num_vfun_entries): Likewise.
10584 (num_extra_vtbl_entries): Add the entries for vcall offsets.
10585 (build_vtbl_initializer): Likewise.
10586 (dfs_finish_vtabls): Use layout_vtable_decl.
10587 (modify_one_vtables): Always duplicate vtables under the new ABI.
10588 (finish_struct_1): Use layout_vtable_decl.
10590 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10592 * decl.c (member_function_or_else): Change third arg from a format
10593 specifier to an `enum overload_flags'. Callers changed.
10595 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
10597 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
10598 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
10599 build_const_cast, get_delta_difference, check_return_expr): Avoid
10600 ANSI string concatenation usage.
10602 2000-01-24 Mark Mitchell <mark@codesourcery.com>
10604 * class.c (layout_class_type): Put the fields required to make a
10605 class non-empty at the end, not the beginning, of the TYPE_FIELDs
10608 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
10610 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
10613 * decl2.c (mark_used): Do instantiate inlines that have been
10614 explicitly instantiated.
10616 2000-01-24 Richard Henderson <rth@cygnus.com>
10618 * call.c (build_over_call): Use expand_tree_builtin.
10619 * typeck.c (build_function_call_real): Likewise.
10620 (build_binary_op_nodefault): Handle unordered compares.
10622 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
10624 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
10625 cp_tree_index values.
10626 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
10627 New global node #defines for them.
10628 * rtti.c (call_void_fn): Replace with ...
10629 (build_runtime_decl): ... new static function.
10630 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
10631 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
10632 (build_dynamic_cast_1): Always produce correctly typed result.
10633 Explicitly produce type_info addresses. Use dynamic_cast_node.
10634 * exception.cc (__throw_bad_cast): Return `void *'.
10635 (__throw_bad_typeid): Return `const type_info &'.
10637 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
10639 * cp-tree.h (get_vtable_decl): Prototype new function.
10640 * class.c (get_vtable_decl): New function. Broken out from ...
10641 (build_vtable): ... here. Use it.
10642 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
10643 by get_vtable_decl.
10645 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
10647 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
10648 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
10649 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
10650 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
10651 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
10652 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
10653 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
10654 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
10655 (CPTI_TINFO_VAR_ID): New enumeration.
10656 (__tp_desc_type_node, __access_mode_type_node,
10657 __bltn_desc_type_node, __user_desc_type_node,
10658 __class_desc_type_node, __ptr_desc_type_node,
10659 __attr_desc_type_node, __func_desc_type_node,
10660 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
10661 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
10662 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
10663 enum_desc_type_node, class_desc_type_node,
10664 si_class_desc_type_node, vmi_class_desc_type_node,
10665 ptmd_desc_type_node, base_desc_type_node): New #defines.
10666 (tinfo_fn_id, tinfo_fn_type): Rename to ...
10667 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
10668 (tinfo_var_id): New enumeration.
10669 (DECL_TINFO_FN_P): Augment comment.
10670 * decl.c (cp_global_trees): Adjust documentation.
10671 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
10672 tinfo_decl_type and tinfo_var_id.
10673 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
10674 (build_typeid): Remove unused variable.
10675 (get_tinfo_var): Use tinfo_var_id.
10676 (tinfo_name): New static function.
10677 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
10678 (tinfo_from_decl): Likewise.
10679 (get_base_offset): New static function, broken out of
10681 (expand_si_desc): Use tinfo_name.
10682 (expand_class_desc): Likewise. Lose local static variable.
10683 Use base_desc_type_node. Use get_base_offset.
10684 (expand_ptr_desc): Use tinfo_name.
10685 (expand_attr_desc): Likewise.
10686 (expand_generic_desc): Likewise.
10688 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
10689 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
10691 2000-01-23 Mark Mitchell <mark@codesourcery.com>
10693 * cp-tree.h (__eprintf): Remove declaration.
10694 * tree.c (__eprintf): Remove definition.
10696 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
10697 Mark Mitchell <mark@codesourcery.com>
10699 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
10700 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
10702 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
10704 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
10706 2000-01-23 Mark Mitchell <mark@codesourcery.com>
10708 * cp-tree.h (register_dtor_fn): New function.
10709 * decl.c (destroy_local_static): Rename to ...
10710 (register_dtor_fn): ... this. Give it external linkage.
10711 (expand_static_init): Use it.
10712 * decl2.c (do_static_initialization): Likewise, if using
10714 (do_static_destruction): Check that __cxa_atexit is not in use.
10715 (finish_file): Don't call do_static_destruction if using
10718 * typeck.c (convert_arguments): Restore two-message error
10721 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
10723 Remap dynamic cast hint values to be consistent across ABIs.
10724 * search.c (dynamic_cast_base_recurse): Remap generated value.
10725 (get_dynamic_cast_base_type): Adjust documentation.
10726 * tinfo.h (__user_type_info::dyncast): Likewise.
10727 (__user_type_info::find_public_subobj): Remap BOFF meaning.
10728 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
10729 (__class_type_info::do_dyncast): Likewise.
10730 (__class_type_info::do_find_public_subobj): Likewise.
10731 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
10733 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
10735 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
10737 * typeck2.c (incomplete_type_error): Restore previous
10738 cp_error and cp_error_at call sequence.
10740 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
10742 * class.c (dump_class_hierarchy): Make format agree with argument;
10743 cast pointer to unsigned long and print with %lx.
10745 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
10747 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
10749 * typeck.c (composite_pointer_type, common_type,
10750 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
10751 build_function_call_real, convert_arguments,
10752 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
10753 build_unary_op, mark_addressable, build_compound_expr,
10754 build_static_cast, build_reinterpret_cast, build_const_cast,
10755 build_c_cast, build_modify_expr, get_delta_difference,
10756 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
10757 'ISO C++'. Fusion consecutive calls to diagnostic message routines
10759 * typeck2.c (readonly_error, abstract_virtuals_error,
10760 process_init_constructor, check_for_new_type): Likewise.
10762 2000-01-19 Mark Mitchell <mark@codesourcery.com>
10764 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
10767 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
10769 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
10770 (build_x_typeid): Likewise.
10771 (get_tinfo_fn): Likewise.
10772 (get_tinfo_fn_unused): Rename to ...
10773 (get_tinfo_decl): ... here.
10774 * rtti.c (build_headof): Replace logic error with assertion.
10775 (get_tinfo_fn_dynamic): Rename to ...
10776 (get_tinfo_decl_dynamic): ... here. Make static. Use
10777 complete_type_or_else.
10778 (build_x_typeid): Move into ...
10779 (build_typeid): ... here. Adjust call to
10780 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
10781 throw_bad_typeid expression.
10782 (get_tinfo_fn_unused): Rename to ...
10783 (get_tinfo_decl): ... here. Adjust comment.
10784 (get_tinfo_fn): Delete.
10785 (tinfo_from_decl): New static function.
10786 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
10787 (get_typeid): Use complete_type_or_else.
10788 (build_dynamic_cast_1): Adjust calls to
10789 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
10790 * parse.y (primary): Adjust call to build_typeid.
10791 * except.c (build_eh_type_type_ref): Adjust call to
10792 get_tinfo_decl. Mark as used.
10793 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
10794 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
10795 * parse.c: Regenerated.
10797 2000-01-17 Mark Mitchell <mark@codesourcery.com>
10799 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
10800 calling convention.
10801 (resolves_to_fixed_type_p): Document calling convention.
10802 * rtti.c (build_x_typeid): Initialize NONNULL.
10804 * cp-tree.h (build_shared_int_cst): New function.
10805 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
10806 * class.c (modify_vtable_entry): Likewise.
10807 (add_virtual_function): Split out code to generated shared
10808 INTEGER_CSTs to build_share_int_cst.
10809 (modify_all_vtables): Handle all the overridden functions here.
10810 Add overridden functions from non-primary virtual bases to the
10812 (finish_struct_1): Adjust call to modify_all_vtables. Add
10813 overridden functions from non-primary bases to the vtable.
10814 * tree.c (build_shared_int_cst): New function.
10816 * cp-tree.h (scratchalloc): Remove.
10817 (build_scratch_list): Likewise.
10818 * call.c (convert_class_to_reference): Replace build_scratch_list
10819 and build_expr_list with build_tree_list.
10820 (add_candidate): Replace scratchalloc with expralloc. Note memory
10822 (build_user_type_conversion_1): Replace build_scratch_list
10823 and build_expr_list with build_tree_list.
10824 (build_new_op): Likewise.
10825 (build_op_delete_call): Likewise.
10826 (convert_like): Likewise.
10827 * cvt.c (ocp_convert): Likewise.
10828 * decl.c (start_decl): Likewise.
10829 (start_function): Likewise.
10830 (finish_destructor_body): Likewise.
10831 (maybe_build_cleanup_1): Likewise.
10832 * decl2.c (reparse_decl_as_expr): Likewise.
10833 * init.c (perform_member_init): Likewise.
10834 (expand_cleanup_for_base): Likewise.
10835 (build_builtin_delete_call): Likewise.
10836 (build_new_1): Likewise.
10837 (build_delete): Likewise.
10838 * method.c (do_build_assign_ref): Likewise.
10839 * parse.y (already_scoped_stmt): Likewise.
10840 (nontrivial_exprlist): Likewise.
10841 (net_initializer): Likewise.
10842 (initlist): Likewise.
10843 * parse.c: Regenerated.
10844 * rtti.c (build_x_typeid): Likewise.
10845 (build_dynamic_cast_1): Likewise.
10846 * typeck.c (build_x_compound_expr): Likewise.
10847 (build_static_cast): Likewise.
10848 (build_modify_expr): Likewise.
10850 * cp-tree.h (DECL_VINDEX): Add documentation.
10851 * class.c (build_vtable_entry): Likewise.
10852 (start_vtable): Add comment.
10853 (add_virtual_function): Replace pending_hard_virtuals with
10854 overridden_virtuals and pending_virtuals with new_virtuals.
10855 Replace redundant assignments with assertions.
10856 (check_for_override): Add comment.
10857 (check_bases_and_members): Replace pending_hard_virtuals with
10858 overridden_virtuals and pending_virtuals with new_virtuals.
10859 (create_vtbl_ptr): Likewise.
10860 (layout_class_type): Likewise.
10861 (finish_struct_1): Likewise. Add comments.
10863 2000-01-16 Mark Mitchell <mark@codesourcery.com>
10865 * class.c (finish_struct_1): Replace redundant code with
10868 * cp-tree.h (flag_new_abi): Move.
10869 (flag_use_cxa_atexit): Likewise.
10870 (flag_honor_std): Likewise.
10871 (flag_rtti): Likewise.
10872 (vbase_offsets_in_vtable_p): Define.
10873 (vptrs_present_everywhere_p): Likewise.
10874 (TYPE_CONTAINS_VPTR_P): Likewise.
10875 (dfs_walk_real): Declare.
10876 * class.c (build_vbase_pointer_fields): Check
10877 vbase_offsets_in_vtable_p.
10878 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
10880 (build_vbase_offset_vtbl_entries): Simplify.
10881 (build_vbase_offset_vtbl_entries): Adjust.
10882 (build_vbase_pointer): Add ability to look up vbase offsets in
10884 (start_vtable): New function.
10885 (add_virtual_function): Use it.
10886 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
10887 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
10888 (build_vtbl_initializer): Take the type of the complete object as
10889 input. Use it to correctly calculate vbase offsets.
10890 (dfs_finish_vtbls): Pass the complete type to
10891 build_vtbl_initializer.
10892 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
10893 (create_vtable_ptr): Create a vtable even if there are no
10894 new virtual functions, under the new ABI.
10895 (finish_struct_1): Likewise.
10896 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
10897 * decl.c (exapnd_static_init): Remove call to
10898 preserve_initializer.
10899 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
10901 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
10902 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
10903 (construct_virtual_bases): Don't initialize virtual base pointers
10905 (build_aggr_init): Clean up comment.
10906 (expand_aggr_init_1): Likewise.
10907 * rtti.c (expand_class_desc): Store the virtual function table
10908 index where the vbase offset lives in the offset field.
10909 * search.c (dfs_walk_real): Make it global.
10910 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
10911 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
10913 * tinfo.h (USItype): Make it signed under the new ABI.
10914 * tinfo.cc (convert_to_base): New function. Encapsulate base
10915 conversion logic here.
10916 (__class_type_info::do_upcast): Use it.
10917 (__class_type_info::do_dyncast): Likewise.
10918 (__class_type_info::do_find_public_subobj): Likewise.
10920 * init.c (construct_virtual_bases): Don't look up the addresses of
10921 virtual bases at run-time.
10923 * class.c (build_vbase_pointer): Relocate.
10924 (build_vbase_pointer_fields): Likewise.
10925 (dfs_build_vbase_offset_vtbl_entries): Likewise.
10926 (build_vbase_offset_vtbl_entries): Likewise.
10928 * decl.c (init_decl_processing): Complain if -fnew-abi
10929 -fno-vtable-thunks is used.
10931 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
10934 2000-01-15 Mark Mitchell <mark@codesourcery.com>
10936 * cp-tree.h (num_extra_vtbl_entries): New function.
10937 (size_extra_vtbl_entries): Likewise.
10938 (dfs_vtable_path_unmark): Likewise.
10939 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
10940 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
10941 * class.c (num_extra_vtbl_entries): New function.
10942 (size_extra_vtbl_entries): Likewise.
10943 (dfs_build_vbase_offset_vtbl_entries): New function.
10944 (build_vbase_offset_vtbl_entries): Likewise.
10945 (build_vtbl_initializer): Use it.
10946 (finish_struct_1): Adjust vtable sizes (using
10947 num_extra_vtbl_entries).
10948 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
10949 THUNK_DECL is non-NULL before expanding it.
10950 * init.c (expand_virtual_init): Adjust the vtable pointer by
10951 size_extra_vtbl_entries before storing it.
10952 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
10953 Handle TREE_LIST parameters here, not in the dfs_* functions.
10954 (dfs_unmarked_real_bases_queue_p): Adjust.
10955 (dfs_marked_real_bases_queue_p): Likewise.
10956 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
10957 (dfs_vtable_path_marked_real_bases_queue_p): New function.
10958 (dfs_vtable_path_unmark): Likewise.
10960 2000-01-14 Mark Mitchell <mark@codesourcery.com>
10962 * optimize.c (copy_body_r): Clear the operand three of a
10963 TARGET_EXPR when copying it.
10965 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10967 * method.c (build_decl_overload_real): Check whether we are in ::
10968 before returning __builtin_new/delete.
10970 2000-01-13 Mark Mitchell <mark@codesourcery.com>
10972 * pt.c (tsubst_friend_function): Improve comment.
10973 (instantiate_decl): Avoid crashing when a "nested" function is
10974 instantiated from the top level.
10976 * dump.c (dqeueue_and_dump): Dump
10977 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
10979 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10981 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
10983 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
10985 * g++spec.c (lang_specific_driver): Add -fnew-abi if
10986 ENABLE_NEW_GXX_ABI defined.
10987 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
10988 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
10989 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
10991 2000-01-12 Mark Mitchell <mark@codesourcery.com>
10993 * decl.c (start_cleanup_fn): Call pushdecl.
10995 * call.c (convert_class_to_reference): Fix typos.
10996 (build_conditional_expr): Handle errors gracefully.
10997 * class.c (push_nested_class): Likewise.
10998 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
10999 (DECL_THIS_EXTERN): Use it.
11000 (DECL_THIS_STATIC): Likewise.
11001 * cvt.c (convert_to_void): Handle errors gracefully.
11002 (build_expr_type_conversion): Likewise.
11003 * decl.c (maybe_push_decl): Likewise.
11004 (start_decl_1): Likewise.
11005 (require_complete_types_for_parms): Likewise.
11006 * parse.y (structsp): Likewise.
11007 (base_class): Likewise.
11008 * parse.c: Regenerated.
11009 * pt.c (finish_member_template_decl): Likewise.
11010 * typeck.c (decay_conversion): Likewise.
11012 * cp-tree.h (dfs_skip_vbases): New function.
11013 (find_vbase_instance): Likewise.
11014 * class.c (determine_primary_base): Allow a nearly empty base to
11015 serve as a primary base class under the new ABI.
11016 (get_class_offset_1): Rename to ...
11017 (dfs_get_class_offset): ... this. Simplify. Don't issue error
11019 (get_class_offset): Use it. Issue error messages here.
11020 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
11021 find the right copies of virtual bases.
11022 (fixup_vtable_deltas1): Rename to ...
11023 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
11024 bases as primary bases.
11025 (fixup_vtable_deltas): Remove.
11026 (override_one_vtable): Handle virtual bases as primary bases.
11027 (merge_overrides): Likewise.
11028 (finish_struct_1): Likewise.
11029 (dump_class_hierarchy): Dump primary-ness of bases as well.
11030 * search.c (mark_primary_bases): Use a pre-order traversal to
11031 handle primary virtual bases.
11032 (dfs_skip_vbases): New fiunction.
11033 (expand_upcast_fixups): Adjust to handle primary virtual bases.
11034 (fixup_virtual_upcast_offsets): Likewise.
11035 (fixup_all_virtual_upcast_offsets): Likewise.
11036 (dfs_find_vbase_instances): New function.
11037 (find_vbase_instance): Likewise.
11039 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
11041 * lex.c (DIR_SEPARATOR): Delete macro.
11043 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
11045 * decl2.c (lang_decode_option): Handle automatic line wrapping
11048 2000-01-11 Mark Mitchell <mark@codesourcery.com>
11050 * friend.c (do_friend): Don't resolve scopes when processing
11051 template declarations, even if the qualifying scope doesn't
11052 involve template parameters.
11054 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
11056 * class.c (dfs_modify_vtables_queue_p): Remove.
11057 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
11058 and dfs_marked_real_bases_queue_p instead of
11059 dfs_modify_vtables_queue_p.
11061 * class.c (build_vbase_path): Simplify.
11062 (dfs_propagate_binfo_offsets): New function.
11063 (propagate_binfo_offsets): Use it.
11064 (remove_base_field): Simplify.
11065 (dfs_set_offset_for_vbases): Remove.
11066 (dfs_set_offset_for_shared_vbases): New function.
11067 (dfs_set_offset_for_unshared_vbases): Likewise.
11068 (layout_virtual_bases): Use them.
11069 (layout_basetypes): Don't call propagate_binfo_offsets.
11070 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
11073 * class.c (build_base_field): New function, split out from ...
11074 (build_base_fields): ... here. Use it. Allocate primary bases
11075 first, under the new ABI.
11076 (get_vtable_entry): Remove.
11077 (remove_base_field): New function, split out from ...
11078 (remove_base_fields): ... here. Adjust since primary bases come
11079 first under the new ABI.
11081 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
11082 (initialize_vtbl_ptrs): New function.
11083 (expand_indirect_vtbls_init): Change prototype.
11084 (convert_pointer_to_vbase): Declare.
11085 * init.c (expand_direct_vtbls_init): Remove.
11086 (dfs_initialize_vtbl_ptrs): New function.
11087 (initialize_vtbl_ptrs): Likewise.
11088 (emit_base_init): Use initialize_vtbl_ptrs.
11089 * search.c (convert_pointer_to_vbase): Make it global.
11090 (expand_indirect_vtbls_init): Remove vtable initialization code.
11091 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
11093 * class.c (dfs_finish_vtbls): New function.
11094 (finish_vtbls): Use it.
11095 (dump_class_hierarchy): New function.
11097 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
11098 (BINFO_VBASE_PRIMARY_P): New macro.
11099 (BINFO_VIRTUALS): Add to documentation.
11100 (SET_BINFO_PRIMARY_MARKED_P): Remove.
11101 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
11102 (dfs_mark_primary_bases_queue_p): Likewise.
11103 (dfs_unmarked_real_bases_queue_p): New function.
11104 (dfs_marked_real_bases_queue_p): Likewise.
11105 * search.c (dfs_mark_primary_bases): Adjust.
11106 (mark_primary_bases): Likewise.
11107 (get_shared_vbase_if_not_primary): New function.
11108 (dfs_unmarked_real_bases_queue_p): Likewise.
11109 (dfs_marked_real_bases_queue_p): Likewise.
11110 (dfs_get_pure_virtuals): Simplify.
11111 (get_pure_virtuals): Likewise.
11113 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11115 * lex.c: Include tm_p.h.
11117 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
11119 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
11121 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
11123 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
11124 * pt.c (instantiate_decl): Defer comdat templates that might not be
11127 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
11128 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
11129 (finish_file): Likewise.
11131 * decl2.c (import_export_class): Undo 12/14 change.
11133 * error.c (dump_decl): operator new, not operatornew.
11135 * class.c (field_decl_cmp): A nontype is "greater" than a type.
11136 * search.c (lookup_field_1): Look for the last field with the
11139 2000-01-05 Nathan Sidwell <nathan@acm.org>
11141 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
11144 2000-01-05 Nathan Sidwell <nathan@acm.org>
11146 * typeck.c (build_static_cast): Don't strip target qualifiers
11147 when casting from a class.
11149 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11151 * class.c (warn_hidden): Initialize variable `fndecl'.
11153 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
11155 * decl.c (flag_isoc9x): New variable to be able to use code in
11156 c-common.c. For now always zero.
11158 2000-01-03 Mark Mitchell <mark@codesourcery.com>
11160 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
11161 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
11162 or unshare_base_binfos for virtual bases here.
11163 * search.c (dfs_get_vbase_types): Do it here.
11164 (get_vbase_types): Adjust.
11166 2000-01-02 Mark Mitchell <mark@codesourcery.com>
11168 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
11169 (BINFO_PRIMARY_MARKED_P): Use flag 5.
11170 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
11171 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
11172 (unmark_primary_bases): Remove declaration.
11173 (unmarkedp): Declare.
11174 (dfs_vbase_unmark): Likewise.
11175 * class.c (determine_primary_base): Return immediately if there
11176 are no base classes. Call mark_primary_bases here.
11177 (modify_all_direct_vtables): Remove.
11178 (modify_all_indirect_vtables): Remove.
11179 (dfs_modify_vtables_queue_p): New function.
11180 (dfs_modify_vtables): New function.
11181 (modify_all_vtables): Use them.
11182 (build_base_fields): Build FIELD_DECLs for primary virtual base
11184 (create_vtable_ptr): Don't call determine_primary_base here.
11185 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
11186 (dfs_set_offset_for_vbases): ... this.
11187 (layout_virtual_bases): Use it.
11188 (layout_class_type): Call determine_primary_base here.
11189 * search.c (unmarkedp): Make it global.
11190 (shared_marked_p): Simplify.
11191 (shared_unmarked_p): Likewise.
11192 (dfs_primary_bases_queue_p): Remove.
11193 (dfs_unmark_primary_bases): Likewise.
11194 (unmark_primary_bases): Likewise.
11195 (mark_primary_bases): Simplify.
11196 (get_pure_virtuals): Don't call mark_primary_bases here.
11197 (dfs_vbase_unmark): New function.
11198 (get_vbase_types): Simplify.
11200 * class.c (struct base_info): Remove.
11201 (determine_primary_base): Take has_virtual_p rather than a
11202 base_info as input. Don't calculate max_has_virtual.
11203 (finish_struct_bits): Remove max_has_virtual argument.
11204 (create_vtable_ptr): Remove max_has_virtual_p argument.
11205 (layout_virtual_bases): Remove max argument.
11206 (layout_basetypes): Likewise.
11207 (layout_class_type): Remove max_has_virtual_p argument.
11208 (finish_struct_1): Remove max_has_virtual.
11210 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
11211 (layout_basetypes): Remove.
11212 * class.c (propagate_binfo_offsets): Moved here from tree.c.
11213 Update to handle primary virtual bases.
11214 (remove_base_fields): New function, split out from
11216 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
11217 (layout_virtual_bases): New function, split out from
11218 layout_basetypes. Update to handle primary virtual bases.
11219 (layout_basetypes): Moved here from tree.c. Use
11220 remove_base_fields and layout_virtual_bases.
11221 * search.c (dfs_mark_primary_bases_queue_p): New function.
11222 (mark_primary_bases): Use it.
11223 * tree.c (CEIL): Remove.
11224 (propagate_binfo_offsets): Remove.
11225 (layout_basetypes): Remove.
11227 2000-01-01 Mark Mitchell <mark@codesourcery.com>
11229 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
11230 (BINFO_PRIMARY_MARKED_P): New macro.
11231 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
11232 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
11233 (mark_primary_bases): New function.
11234 (unmark_primary_bases): Likewise.
11235 * search.c (get_abstract_virtuals_1): Remove.
11236 (dfs_mark_primary_bases): New function.
11237 (mark_primary_bases): Likewise.
11238 (dfs_unmark_primary_bases): Likewise.
11239 (unmark_primary_bases): Likewise.
11240 (dfs_get_pure_virtuals): Likewise.
11242 2000-01-01 Mark Mitchell <mark@codesourcery.com>
11244 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
11245 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
11246 (modify_one_vtable): Adjust.
11247 (fixup_vtable_deltas1): Likewise.
11248 (override_one_vtable): Likewise.
11249 * search.c (get_abstract_virtuals_1): Likewise.
11250 (get_pure_virtuals): Likewise.
11251 (expand_upcast_fixups): Likewise.
11252 * tree.c (debug_binfo): Likewise.
11254 * class.c (build_vtable): Don't return a value. Don't rebuild
11255 vtables for bases that have already been handled.
11256 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
11257 already been handled.
11258 (modify_one_vtable): Adjust accordingly.
11259 (fixup_vtable_deltas1): Likewise.
11260 (finish_struct_1): Likewise.
11262 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11264 * call.c (build_new_method_call): Also check destructors.