1 2002-03-22 Zack Weinberg <zack@codesourcery.com>
3 * error.c: Always use REAL_VALUE_TO_DECIMAL; don't test
6 2002-03-22 Jeff Knaggs <jknaggs@redhat.com>
8 * typeck.c (expand_ptrmemfunc_cst): Scale idx down to an index
9 into the vtable_entry array regardless of
10 TARGET_PTRMEMFUNC_VBIT_LOCATION.
12 2002-03-21 Aldy Hernandez <aldyh@redhat.com>
14 * tree.c (cp_cannot_inline_tree_fn): Same.
16 2002-03-21 Neil Booth <neil@daikokuya.demon.co.uk>
18 * cp-tree.h (pushdecl, pushlevel, poplevel, set_block,
19 insert_block, getdecls, global_bindings_p): New.
21 2002-03-20 Nathan Sidwell <nathan@codesourcery.com>
24 * mangle.c (struct globals) Add internal_mangling_p member.
25 (write_template_param): Do internal mangling, if needed.
26 (mangle_conv_op_name_for_type): Request internal mangling.
28 2002-03-20 Jason Merrill <jason@redhat.com>
31 * init.c (build_delete): Check access for a member op delete here.
32 * decl2.c (delete_sanity): Not here.
34 2002-03-19 Jason Merrill <jason@redhat.com>
37 * class.c (get_vfield_name): Use the constructor_name.
39 2002-03-20 Neil Booth <neil@daikokuya.demon.co.uk>
41 * cp-lang.c (LANG_HOOKS_DECL_PRINTABLE_NAME): Redefine.
42 * cp-tree.h (lang_printable_name): Rename.
43 * error.c (lang_decl_name): Use new hook.
44 * lex.c (cxx_init): Remove old hook.
45 * pt.c (tsubst_decl): Use new hook.
46 * tree.c (lang_printable_name): Rename.
48 2002-03-18 Eric Botcazou <ebotcazou@multimania.com>
51 * pt.c (tsubst_decl): Move __PRETTY_FUNCTION__ handling...
52 (tsubst_expr) [DECL_STMT]: ...here. And substitute the initializer
53 only after recording the declaration.
55 2002-03-18 Jason Merrill <jason@redhat.com>
58 * init.c (resolve_offset_ref): Hand off to build_component_ref.
61 * call.c (build_over_call): Fix empty class logic.
64 * cp-tree.h (struct saved_scope): Add last_parms field.
65 * decl.c (maybe_push_to_top_level): Save last_function_parms.
66 (pop_from_top_level): Restore it.
69 * mangle.c (write_expression): Strip NOP_EXPRs sooner. Also strip
73 * pt.c (tsubst_friend_function): Use decl_namespace_context.
75 PR c++/3948 -- C++ ABI change, followup to 2001-12-18 patch.
76 * class.c (finish_struct_bits): Also set TREE_ADDRESSABLE for a
77 type with a nontrivial destructor.
79 2002-03-17 Jason Merrill <jason@redhat.com>
82 * class.c (build_base_path): Virtual base layout is fixed in
85 2002-03-17 Neil Booth <neil@daikokuya.demon.co.uk>
87 * cp-lang.c (LANG_HOOKS_PARSE_FILE): Redefine.
88 * parse.y (yyparse): Remove macro.
90 2002-03-17 Jason Merrill <jason@redhat.com>
93 * init.c (build_new_1): Pass the right pointer to op delete.
95 2002-03-16 Nathan Sidwell <nathan@codesourcery.com>
98 * cp-tree.h (CLASSTYPE_METHOD_VEC): Document where templated
99 conversion operators go.
100 (struct lang_decl_flags): Add template_conv_p and unused
102 (DECL_TEMPLATE_CONV_FN_P): New macro.
103 * call.c (build_user_type_conversion_1): Don't check second type
104 conversion of overload set first.
105 * class.c (add_method): Make sure templated conversion operators
106 all end up on slot 2.
107 * lex.c (do_identifier): A conversion operator token might be
108 satisfied by a templated conversion operator.
109 * pt.c (check_explicit_specialization): Use
110 CLASSTYPE_FIRST_CONVERSION_SLOT.
111 (template_parm_this_level_p): New function.
112 (push_template_decl_real): Determine DECL_TEMPLATE_CONV_FN_P.
113 * search.c (lookup_fnfields_1): Template conversions will be on
115 * typeck.c (build_component_ref): Preserve the type of an
116 conversion operator name on the overload type.
117 (build_x_function_call): Retrieve the conversion operator name.
119 2002-03-15 Richard Henderson <rth@redhat.com>
121 * init.c (build_new_1): Use size_binop instead of cp_build_binary_op.
123 2002-03-15 Mark Mitchell <mark@codesourcery.com>
125 * cp-tree.h (CLEANUP_DECL): Remove.
126 (CLEANUP_EXPR): Likewise.
127 * decl.c (destroy_local_var): Simplify.
128 (maybe_build_cleanup): Tidy.
129 * dump.c (cp_dump_tree): Remove handling of CLEANUP_STMT.
130 * semantics.c (cp_expand_stmt): Likewise.
131 * cp/tree.c (cp_statement_code_p): Likewise.
133 2002-03-15 Jason Merrill <jason@redhat.com>
136 * decl.c (duplicate_decls): Use merge_types instead of common_type.
137 * typeck.c (common_type): Just hand off to
138 type_after_usual_arithmetic_conversions and
139 composite_pointer_type.
140 (merge_types): New fn.
141 (commonparms): Use it instead of common_type.
142 (type_after_usual_arithmetic_conversions): Also handle COMPLEX_TYPE.
143 (composite_pointer_type): Also handle attributes.
144 * cp-tree.h: Declare merge_types.
146 * decl.c (make_rtl_for_nonlocal_decl): Also defer COMDAT
148 * decl2.c (maybe_make_one_only): Also mark the decl as needed.
150 2002-03-14 Richard Henderson <rth@redhat.com>
152 * decl.c: Include c-pragma.h.
153 (start_decl, start_function): Invoke maybe_apply_pragma_weak.
154 * Make-lang.in: Update dependencies.
156 2002-03-14 Jakub Jelinek <jakub@redhat.com>
159 * call.c (build_over_call): Set TREE_NO_UNUSED_WARNING too.
160 * cvt.c (convert_to_void): Preserve TREE_NO_UNUSED_WARNING.
162 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
164 * mangle.c (write_builtin_type): Handle 128-bit integers even if
165 they are not a standard integer type.
167 2002-03-12 Richard Sandiford <rsandifo@redhat.com>
169 * cp-tree.h (init_init_processing): Remove declaration.
170 * init.c (BI_header_type, init_init_processing): Remove old ABI stuff.
171 * decl.c (cxx_init_decl_processing): Don't call init_init_processing.
173 2002-03-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
175 * cp-lang.c (tree_code_type, tree_code_length, tree_code_name):
177 * decl.c (duplicate_decls): Use TREE_CODE_LENGTH, not
179 * lex.c (cplus_tree_code_type, cplus_tree_code_length,
180 cplus_tree_code_name): Delete.
181 (cxx_init): Don't call add_c_tree_codes, instead set
182 lang_unsafe_for_reeval. Don't try to copy into the various
185 2002-03-12 Nathan Sidwell <nathan@codesourcery.com>
188 * decl.c (xref_tag): Don't set CLASSTYPE_DECLARED_CLASS here.
189 * decl2.c (handle_class_head): Set CLASSTYPE_DECLARED_CLASS for
192 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
194 Revert 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>,
195 DR209 is now not a defect.
196 * cp-tree.h (skip_type_access_control): Remove.
197 * decl.c (grokdeclarator): Do type access control for friend
199 * semantics.c (decl_type_access_control): Don't reset
200 current_type_lookups.
201 (save_type_access_control): Always save the lookups.
202 (skip_type_access_control): Remove.
203 (finish_class_definition): Don't change type_lookups.
205 2002-03-11 Nathan Sidwell <nathan@codesourcery.com>
207 Revert 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>,
209 * typeck.c (build_static_cast): Compare non-qualified types
210 with pointer to member conversions.
212 2002-03-11 Dan Nicolaescu <dann@ics.uci.edu>
213 Daniel Berlin <dan@dberlin.org>
215 * cp-lang.c (ok_to_generate_alias_set_for_type): New function.
216 (cxx_get_alias_set): Use it.
218 2002-03-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
220 * cp-tree.h (stabilize_expr): Prototype.
222 2002-03-08 Craig Rodrigues <rodrigc@gcc.gnu.org>
224 * cp-tree.h (CLEAR_BINFO_MARKED): Make both parts of
225 conditional return void.
227 2002-03-08 Neil Booth <neil@daikokuya.demon.co.uk>
229 * cp-lang.c (LANG_HOOKS_UNSAVE): Redefine.
230 * cp-tree.h (cxx_unsave): New.
231 * tree.c (cp_unsave): Rename cxx_unsave, update prototype.
234 2002-03-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
236 * decl.c (cxx_init_decl_processing): Use ARRAY_SIZE in lieu of
237 explicit sizeof/sizeof.
238 * decl2.c (cxx_decode_option): Likewise.
239 * lex.c (init_reswords, REDUCE_LENGTH, TOKEN_LENGTH): Likewise.
241 2002-03-02 Nathan Sidwell <nathan@codesourcery.com>
244 * decl.c (lookup_tag): Only reject enum/class mismatch, not
245 class/union mismatch.
246 * parse.y (check_class_key): New function.
249 2002-03-01 Michael Matz <matz@suse.de>
251 * typeck.c (cp_pointer_int_sum): Complete inner type which is
252 used later by size_in_bytes().
254 2002-03-01 Phil Edwards <pme@gcc.gnu.org>
256 * cp-tree.h: Require __GNUC__ to be #defined.
257 (build_init): Add missing prototype.
259 2002-03-01 Jason Merrill <jason@redhat.com>
261 * except.c: Don't include decl.h or obstack.h. Do include
263 (build_throw): Destroy temporaries from the thrown
264 expression before calling __cxa_throw. Construct a thrown
265 temporary directly into the exception object.
266 (stabilize_throw_expr): New function.
267 (wrap_cleanups_r): New function.
268 * tree.c (stabilize_expr): New function.
269 * init.c (build_init): New function.
270 * Make-lang.in (cp/except.o): Adjust .h deps.
272 2002-02-28 Jason Merrill <jason@redhat.com>
274 * search.c (lookup_base_r): Don't clear is_non_public just because
275 we found a friendly scope.
277 * decl.c (finish_function): Only warn about missing return
278 statement with -Wreturn-type.
280 2002-02-28 Neil Booth <neil@daikokuya.demon.co.uk>
282 * class.c (build_clone): Update.
283 * cp-lang.c (LANG_HOOKS_DUP_LANG_SPECIFIC_DECL): Redefine.
284 * cp-tree.h (cxx_dup_lang_specific_decl): New.
285 * lex.c (copy_lang_decl): Rename cxx_dup_lang_specific_decl.
287 * method.c (make_thunk): Update.
289 2002-02-27 Zack Weinberg <zack@codesourcery.com>
291 * decl2.c: Delete traditional-mode-related code copied from
292 the C front end but not used, or used only to permit the
295 2002-02-24 Craig Rodrigues <rodrigc@gcc.gnu.org>
298 * cp-tree.h (SET_BINFO_MARKED): Cast false part of condition
301 2002-02-22 Jakub Jelinek <jakub@redhat.com>
304 * semantics.c (finish_switch_cond): Don't call get_unwidened
307 2002-02-22 Nathan Sidwell <nathan@codesourcery.com>
310 * cp-tree.h (tsubst_flags_t): Add tf_ignore_bad_quals,
312 (make_typename_type): Use tsubst_flags_t.
313 * decl.c (make_typename_type): Adjust. Return non-artificial
314 TYPE_DECLs, if required.
315 (grokdeclarator): Simplify CVR qualification handling. Allow bad
316 qualifiers on typedef types.
317 * decl2.c (handle_class_head): Adjust make_typename_type call.
318 * parse.y (nested_name_specifier): Likewise.
319 (typename_sub0): Likewise.
320 (typename_sub1): Likewise.
321 * pt.c (convert_template_argument): Adjust make_typename_type
323 (tsubst): Adjust cp_build_qualified_type_real calls.
324 (check_cv_quals_for_unify): Cope with alowing bad qualifications
325 on template type parms.
326 (instantiate_decl): Recheck substitutions to give warnings on bad
328 * tree.c (cp_build_qualified_type_real): Use tf_allow_bad_quals.
330 2002-02-21 Aldy Hernandez <aldyh@redhat.com>
332 * cp/decl.c (duplicate_decls): Merge always_inline attribute.
334 * cp/tree.c (cp_cannot_inline_tree_fn): Do not inline at -O0
335 unless DECL_ALWAYS_INLINE.
337 2002-02-20 Jakub Jelinek <jakub@redhat.com>
339 * typeck.c (cp_pointer_int_sum): Renamed from
340 pointer_int_sum, call pointer_int_sum.
342 2002-02-20 Jakub Jelinek <jakub@redhat.com>
344 * decl.c (duplicate_decls): Return 0 if issued error about
347 2002-02-19 Jason Merrill <jason@redhat.com>
349 ABI change: Mangle `void (A::*)() const' as
350 M1AKFvvE, not MK1AFvvE.
351 * mangle.c (write_function_type): Write cv-quals for member
353 (write_pointer_to_member_type): Not here.
355 2002-02-18 Jason Merrill <jason@redhat.com>
357 * pt.c (do_type_instantiation): Don't pedwarn if in_system_header.
358 (do_decl_instantiation): Likewise.
360 2002-02-17 Craig Rodrigues <rodrigc@gcc.gnu.org>
363 * decl.c (duplicate_decls): Make warning unconditional
364 if duplicate default argument declarations are present.
366 2002-02-17 Jakub Jelinek <jakub@redhat.com>
368 * typeck.c (build_binary_op) [BIT_XOR_EXPR]: Remove explicit
371 2002-02-15 Nathan Sidwell <nathan@codesourcery.com>
373 * decl.c (grokdeclarator): Set typedef_decl for all TYPE_DECLs,
374 remove incorrect comment. Move #if 0'd code to common path. Use
375 IMPLICIT_TYPENAME_P. Simplify & reformat ARRAY_TYPE duplication.
377 2002-02-13 Jason Merrill <jason@redhat.com>
379 * decl.c (builtin_function): Set TREE_THIS_VOLATILE on return fns.
380 (finish_function): Don't warn if current_function_returns_null.
382 * typeck2.c (digest_init): Do handle values of vector type.
384 * typeck2.c (digest_init, process_init_constructor): Treat vectors
387 2002-02-11 Jason Merrill <jason@redhat.com>
389 * parse.y (reserved_declspecs): Don't handle attributes.
390 (reserved_typespecquals): Handle them here.
391 * Make-lang.in (parse.c): Adjust expected conflicts.
393 2002-02-08 Jakub Jelinek <jakub@redhat.com>
395 * parse.y (primary, primary_no_id): Use compstmt_or_stmtexpr
397 (compstmt_or_stmtexpr): Renamed from compstmt.
398 (compstmt): In addition to compstmt_or_stmtexpr clear last_expr_type.
400 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
402 Rename instantiate_type_flags to tsubst_flags_t & expand use.
403 * cp-tree.h (instantiate_type_flags): Rename to ...
404 (tsubst_flags_t): ... here. Rename itf_complain to tf_error,
406 (instantiate_type): Adjust prototype.
407 (tsubst, tsubst_expr, tsubst_copy, lookup_template_class,
408 do_type_instantiation, cp_build_qualified_type_real): Likewise.
409 cp_build_qualified_type: Adjust.
410 * class.c (instantiate_type): Adjust parameter. Rename itf_* to
412 * call.c (standard_conversion): Rename itf_* to tf_*.
413 (reference_binding): Likewise.
414 (convert_like_real): Likewise.
415 * cvt.c (cp_convert_to_pointer): Likewise.
416 (convert_to_reference): Likewise.
417 * decl.c (lookup_namespace_name): Use tf_* flags.
418 (make_typename_type): Likewise.
419 (grokdeclarator): Likewise.
420 * pt.c (convert_nontype_argument): Adjust COMPLAIN usage.
421 (coerce_template_template_parms, convert_template_argument,
422 coerce_template_parms, maybe_get_template_decl_from_type_decl,
423 lookup_template_class, tsubst_friend_function, tsubst_friend_class,
424 instantiate_class_template, tsubst_template_arg_vector,
425 tsubst_template_parms, tsubst_aggr_type, tsubst_default_argument,
426 tsubst_decl, tsubst_arg_types, tsubst_function_type,
427 tsubst_call_declarator_parms, tsubst, tsubst_copy, tsubst_expr,
428 instantiate_template, fn_type_unification,
429 resolve_overloaded_unification, verify_class_unification,
430 unify, get_bindings_real, do_type_instantiation,
431 regenerate_decl_from_template, instantiate_decl,
432 tsubst_initializer_list, tsubst_enum,
433 get_mostly_instantiated_function_type,
434 invalid_nontype_parm_type_p): Likewise.
435 * tree.c (cp_build_qualified_type_real): Likewise.
436 * typeck.c (build_binary_op): Rename itf_* to tf_*.
437 (build_ptrmemfunc): Likewise.
438 (convert_for_assignment): Likewise.
440 2002-02-07 Nathan Sidwell <nathan@codesourcery.com>
443 * decl.c (grokdeclarator): Allow friend declarations from
445 * decl2.c (handle_class_head): Don't push into template parm contexts.
446 * pt.c (push_template_decl_real): Template parm contexts are never
449 2002-02-05 Alexandre Oliva <aoliva@redhat.com>
451 * class.c: Include target.h.
452 (check_bitfield_decl): Disregard EMPTY_FIELD_BOUNDARY,
453 BITFIELDS_NBYTES_LIMITED and PCC_BITFIELD_TYPE_MATTERS for MS
455 * Make-lang.in: Adjust deps.
457 2002-02-05 Jason Merrill <jason@redhat.com>
459 * error.c (dump_type): Be more helpful about VECTOR_TYPE.
461 2002-02-04 Jakub Jelinek <jakub@redhat.com>
463 * semantics.c (begin_switch_stmt): Clear SWITCH_TYPE.
464 (finish_switch_cond): Set SWITCH_TYPE.
466 2002-02-04 Richard Henderson <rth@redhat.com>
468 * method.c (use_thunk): Always initialize the block tree. Reindent.
469 * semantics.c (expand_body): Emit thunks after function, not before.
471 2002-02-04 Jason Merrill <jason@redhat.com>
473 * decl.c (start_function): Call cplus_decl_attributes immediately
474 after grokdeclarator.
476 * decl.c (start_function): Combine DECL_RESULT handling code.
478 2002-02-03 Jason Merrill <jason@redhat.com>
481 * Make-lang.in (CXX_OBJS): Remove cp/xref.o
482 (cp/xref.o): Remove dependencies.
483 * class.c (finish_struct_1, check_methods): Don't call xref fns.
484 (finish_struct_1): Likewise.
485 * friend.c (make_friend_class): Likewise.
486 * lex.c (cxx_init, cxx_finish, extract_interface_info): Likewise.
487 * spew.c (read_process_identifier): Likewise.
489 2002-02-01 Jason Merrill <jason@redhat.com>
492 * decl.c (finish_function): Warn about a non-void function with
493 no return statement and no abnormal exit.
494 * cp-tree.h (struct cp_language_function): Add returns_abnormally.
495 (current_function_returns_abnormally): New macro.
496 * call.c (build_call): Set it.
498 * typeck.c (build_component_ref): Always complain about offsetof
499 constructs on non-PODs. Only make it an error for members of
502 * error.c (dump_scope): Don't add TFF_DECL_SPECIFIERS.
503 (dump_function_decl): Always dump parms.
505 * decl2.c (finish_static_data_member_decl): Complain about a local
506 class with a static data member.
509 * search.c (lookup_field_1): Don't xref a static data member
510 just because we looked it up.
512 2002-01-31 Jason Merrill <jason@redhat.com>
514 * Make-lang.in (parse.c): Handle .output file.
517 * decl.c (xref_tag): Remember early attributes in TYPE_ATTRIBUTES,
519 * semantics.c (finish_class_definition): Adjust.
521 Allow attributes in parms and casts.
522 * parse.y (named_parm): Don't strip attrs.
523 (declmods): Remove 'attributes' production.
524 (nonempty_cv_qualifiers): Accept attributes.
525 (ATTRIBUTE): Give precedence.
526 * decl.c (groktypename): Handle attributes.
527 (grokparms): Likewise.
529 2002-01-29 Jakub Jelinek <jakub@redhat.com>
531 * decl2.c (cxx_decode_option): Pass 0 as last argument to
533 * lang-specs.h: Use cpp_unique_options instead of cpp_options
534 when used together with cc1_options.
536 2002-01-29 Nathan Sidwell <nathan@codesourcery.com>
539 * typeck2.c (digest_init): Make sure non-array core type is
541 * decl2.c (reparse_absdcl_as_casts): Just store the type in the
542 constructor, rather than build a new one.
543 (build_expr_from_tree, CONSTRUCTOR case): Be careful with the
544 PURPOSE of constructor elts.
546 2002-01-23 Zack Weinberg <zack@codesourcery.com>
548 * Make-lang.in (parse.c): Adjust expected number of
549 shift-reduce conflicts.
550 (decl.o): Depend on diagnostic.h.
551 * decl.c: Include diagnostic.h.
552 (grokdeclarator): Check for null pointer.
553 (finish_function): Don't abort when
554 current_binding_level->parm_flag != 1, if errors have
555 occurred; throw away the statement tree and extra binding
556 levels, and continue.
557 * lex.c (note_list_got_semicolon): Check for null pointer.
558 * method.c (hack_identifier): Just return error_mark_node if
559 value is error_mark_node.
560 * parse.y (primary: TYPEID(type_id)): No need to use
561 TYPE_MAIN_VARIANT here.
562 (handler_seq): Accept an empty list of catch clauses and
563 generate a fake handler block to avoid later crashes.
564 (ansi_raise_identifier): Accept the error token too.
565 * semantics.c (begin_class_definition,
566 finish_class_definition): Check for error_mark_node.
568 2002-01-23 Zack Weinberg <zack@codesourcery.com>
570 * typeck2.c (friendly_abort): Delete definition.
571 * cp-tree.h (friendly_abort): Don't prototype.
572 (my_friendly_assert): Use fancy_abort.
574 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
576 * cp-tree.h (my_friendly_abort): Remove.
578 2002-01-23 Jakub Jelinek <jakub@redhat.com>
580 * spew.c (pending_inlines, pending_inlines_tail,
581 processing_these_inlines): Make static.
582 (mark_pending_inlines): Remove static.
583 (begin_parsing_inclass_inline): If in function, save pi
584 for GC to cp_function_chain->unparsed_inlines instead.
585 (process_next_inline): Likewise.
586 * cp-tree.h (struct cp_language_function): Add unparsed_inlines.
587 (mark_pending_inlines): Add prototype.
588 * decl.c (spew_debug): Remove unused extern.
589 (mark_lang_function): Call mark_pending_inlines.
591 2002-01-23 Craig Rodrigues <rodrigc@gcc.gnu.org>
593 * call.c, class.c, decl.c, decl2.c, error.c, expr.c, friend.c,
594 init.c, lex.c, mangle.c, method.c, pt.c, repo.c, rtti.c, search.c,
595 semantics.c, spew.c, tree.c, typeck.c, typeck2.c, xref.c:
596 Change my_fancy_abort() to abort().
598 2002-01-23 Jason Merrill <jason@redhat.com>
601 * class.c (fixed_type_or_null): Fix thinko.
604 * init.c (resolve_offset_ref): Use build_indirect_ref.
606 * decl2.c (grokclassfn): Don't set DECL_REGISTER on 'this'.
608 2002-01-22 Jason Merrill <jason@redhat.com>
610 * parse.y (function_body): Suppress the block for the outermost
612 * decl.c (pushdecl): Don't try to skip it.
613 (begin_function_body): Keep the block we create, not the next one.
614 * init.c (emit_base_init): Don't mess with keep_next_level.
616 * class.c (build_base_path): Tweak formatting.
618 2002-01-19 Nathan Sidwell <nathan@codesourcery.com>
620 Fix regression introduced with patch for c++/775
621 * parse.y (class_head_defn): Check for template specializations
622 with a different class-key.
624 2002-01-17 Jason Merrill <jason@redhat.com>
626 * decl.c (begin_constructor_body, begin_destructor_body): New fns.
627 (begin_function_body): Call them and keep_next_level.
628 * init.c (emit_base_init): Call keep_next_level.
629 * semantics.c (setup_vtbl_ptr): Lose.
630 * cp-tree.h (struct cp_language_function): Remove vtbls_set_up_p.
631 (vtbls_set_up_p): Lose.
632 * pt.c (tsubst_expr, CTOR_INITIALIZER): Call emit_base_init.
633 * method.c (do_build_copy_constructor): Likewise.
634 (synthesize_method): Call finish_mem_initializers.
635 * parse.y (nodecls): Likewise.
637 * error.c (dump_type_suffix): Print the exception specs before
639 (dump_function_decl): Here, too.
641 * cp-tree.h (TMPL_PARMS_DEPTH): Cast to signed HOST_WIDE_INT.
643 2002-01-10 Ira Ruben <ira@apple.com>
646 * decl.c (start_method): Handle attrlist.
648 2002-01-10 Jakub Jelinek <jakub@redhat.com>
650 * decl2.c (max_tinst_depth): Increase default limit to 500.
652 2002-01-10 Graham Stott <grahams@redhat.com>
654 * spew.c (YYCHAR): Uppercase macro parameter and add
657 (NAME): Uppercase macro parameter.
659 2002-01-09 Graham Stott <grahams@redhat.com>
661 * decl.h (grokdeclarator): Wrap long line.
663 * semantics.c (FINISH_COND): Uppercase macro paramaters and
666 2002-01-08 Graham Stott <grahams@redhat.com>
668 * xref.c (FILE_NAME_ABSOLUTE_P): Add parenthesis.
669 (PALLOC): Uppercase macro parameter and whitespace.
670 (SALLOC): Uppercase macro parameter.
671 (SFREE): Uppercase macros parameter, add parenthese and
673 (STREQL): Uppercase macro parameter and whitespace.
680 * call.c (convert_like): Add parenthesis and wrap.
681 (convert_like_with_context): Likewise.
682 (ICS_RANK): Whitespace.
683 (NEED_TEMPORARY_P): Remove parenthesis.
685 * class.c (VTT_TOP_LEVEL_P): Uppercase macro parameter and
687 (VTT_MARKED_BINFO_P): Likewise.
689 * decl.c (BINDING_LEVEL): Add parenthesis.
690 (DEF_OPERATOR): Likewise.
692 * mangle.c (MANGLE_TRACE): Add parenthesis.
693 (MANGLE_TRACE_TREE): Likewise.
694 (write_signed_number): Likewise.
695 (write_unsigned_number): Likewise.
697 * pt.c (ccat): Uppercase macro parameter.
700 * search.c (SET_BINFO_ACCESS): Add parenthesis.
702 2002-01-07 Jason Merrill <jason@redhat.com>
704 * decl2.c (coerce_new_type): Downgrade error for size_t mismatch
708 * method.c (make_thunk): If !flag_weak, give the thunk the
710 (use_thunk): Here, too.
712 2002-01-07 Graham Stott <grahams@redhat.com>
714 * error.c: Update copyright date.
715 (print_scope_operator): Add parenthesis.
716 (print_left_paren): Likewise.
717 (print_right_paren): Likewise.
718 (print_left_bracket): Likewise.
719 (print_right_bracket): Likewise.
720 (print_template_argument_list_start): Likewise.
721 (print_template_argument_list_end): Likewise.
722 (print_non_consecutive_character): Likewise.
723 (print_tree_identifier): Likewise.
724 (print_identifier): Likewise.
725 (NEXT_CODE): Uppercase macro parameter.
726 (ident_fndecl): Delete unused.
727 (GLOBAL_THING): Likewise.
729 2002-01-06 Graham Stott <grahams@redhat.com>
731 * cp-tree.h (VAR_OR_FUNCTION_DECL_CHECK): Add parenthesis.
732 (VAR_FUNCTION_OR_PARM_DECL_CHECK): Likewise.
733 (VAR_TEMPL_TYPE_OR_FUNCTION_DECL_CHECK) Likewise.
734 (RECORD_OR_UNION_TYPE_CHECK): Likewise.
735 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Likewise.
736 (C_IS_RESERVED_WORD): Uppercase macro parameter.
737 (C_RID_YYCODE) Likewise.
738 (ptrmem_cst): Use rtx.
739 (LOCAL_BINDING_P): Add whitespace.
740 (INHERITED_VALUE_BINDING_P): Likewise.
741 (BINDING_SCOPE): Wrap long line.
742 (BINDING_HAS_LEVEL_P): Remove parenthesis.
743 (BINDING_VALUE): Wrap long line.
744 (BINDING_TYPE): Whitespace.
745 (IDENTIFIER_GLOBAL_VALUE): Add parenthesis.
746 (SET_IDENTIFIER_GLOBAL_VALUE): Likewise.
747 (IDENTIFIER_NAMESPACE_VALUE): Likewise.
748 (SET_IDENTIFIER_NAMESPACE_VALUE: Likewise.
749 (same_type_p): Uppercase macro parameters.
750 (same_type_ignoring_top_level_qualifiers_p): Likewise.
751 (OVL_FUNCTION): Wrap long line.
752 (OVL_CHAIN): Whitespace.
753 (OVL_CURRENT): Add parenthesis and whitespace.
754 (OVL_NEXT): Whitespace.
755 (OVL_USED): Likewise.
756 (IDENTIFIER_TYPE_VALUE): Likewise.
757 (REAL_IDENTIFIER_TYPE_VALUE): Remove parenthesis.
758 (SET_IDENTIFIER_TYPE_VALUE): Add parenthesis and whitespace.
759 (LANG_ID_FIELD): Whitespace.
760 (SET_LANG_ID(NODE,VALUE,NAME): Likewise.
761 (IDENTIFIER_LABEL_VALUE): Whitespace and wrap.
762 (SET_IDENTIFIER_LABEL_VALUE): Whitespace.
763 (IDENTIFIER_IMPLICIT_DECL): Whitespace and wrap.
764 (SET_IDENTIFIER_IMPLICIT_DECL); Whitespace.
765 (IDENTIFIER_ERROR_LOCUS): Whitespace and wrap.
766 (SET_IDENTIFIER_ERROR_LOCUS); Whitespace.
767 (IDENTIFIER_VIRTUAL_P): Likewise.
768 (IDENTIFIER_OPNAME_P): Likewise.
769 (IDENTIFIER_TYPENAME_P): Remove parenthesis.
770 (C_TYPE_FIELDS_READONLY): Uppercase macro parameters.
771 (C_SET_EXP_ORIGINAL_CODE): Likewise.
772 (TYPE_ASSEMBLER_NAME_STRING): Wrap long line.
773 (TYPE_ASSEMBLER_NAME_LENGTH): Likewise.
774 (IS_AGGR_TYPE): Uppercase macro parameter.
775 (CLASS_TYPE_P): Likewise.
776 (IS_AGGR_TYPE_CODE): Uppercase macro parameter and parenthesis.
777 (IS_AGGR_TYPE_2): Whitespace.
778 (TAGGED_TYPE_P): Uppercase macro parameter.
779 (TYPE_BUILT_IN): Whitespace.
780 (TYPE_FOR_JAVA): Likewise.
781 (FUNCTION_ARG_CHAIN): Remove parenthesis.
782 (FUNCTION_FIRST_USER_PARMTYPE): Add parenthesis.
783 (FUNCTION_FIRST_USER_PARAM): Likewise.
784 (PROMOTES_TO_AGGR_TYPE): Whitespace.
785 (DERIVED_FROM_P): Add parenthesis and wrap.
786 (UNIQUELY_DERIVED_FROM_P): Likewise.
787 (ACCESSIBLY_UNIQUELY_DERIVED_P): Likewise.
788 (PUBLICLY_UNIQUELY_DERIVED_P): Likewise.
789 (CLASSTYPE_USE_TEMPLATE): Whitespace.
790 (CLASSTYPE_INLINE_FRIENDS): Remove parenthesis.
791 (TYPE_GETS_DELETE): Add parenthesis.
792 (TYPE_HAS_CONVERSION): Add parenthesis and wrap.
793 (TYPE_HAS_ASSIGN_REF): Likewise,
794 (TYPE_HAS_CONST_ASSIGN_REF): Likewise.
795 (TYPE_HAS_INIT_REF): Likewise.
796 (TYPE_HAS_CONST_INIT_REF): Likewise.
797 (TYPE_BEING_DEFINED): Likewise.
798 (TYPE_LANG_SPECIFIC): Likewise.
799 (CLASSTYPE_RTTI): Likewise.
800 (TYPE_OVERLOADS_CALL_EXPR): Likewise.
801 (TYPE_OVERLOADS_ARRAY_REF): Likewise.
802 (TYPE_OVERLOADS_ARROW): Likewise.
803 (TYPE_USES_MULTIPLE_INHERITANCE): Likewise.
804 (TYPE_USES_VIRTUAL_BASECLASSES): Add parenthesis.
805 (CLASSTYPE_METHOD_VEC): Likewise.
806 (CLASSTYPE_MARKED_N): Likewise.
807 (CLASSTYPE_MARKED): Likewise.
808 (CLASSTYPE_MARKED2): Likewise.
809 (CLASSTYPE_MARKED3): Likewise.
810 (CLASSTYPE_MARKED4): Likewise.
811 (CLASSTYPE_MARKED5): Likewise.
812 (CLASSTYPE_MARKED6): Likewise.
813 (SET_CLASSTYPE_MARKED): Whitespace.
814 (CLEAR_CLASSTYPE_MARKED): Likewise.
815 (SET_CLASSTYPE_MARKED2): Likewise.
816 (CLEAR_CLASSTYPE_MARKED2): Likewise.
817 (SET_CLASSTYPE_MARKED3): Likewise.
818 (CLEAR_CLASSTYPE_MARKED3): Likewise.
819 (SET_CLASSTYPE_MARKED4): Likewise.
820 (CLEAR_CLASSTYPE_MARKED4): Likewise.
821 (SET_CLASSTYPE_MARKED5): Likewise.
822 (CLEAR_CLASSTYPE_MARKED5): Likewise.
823 (SET_CLASSTYPE_MARKED6): Likewise.
824 (CLEAR_CLASSTYPE_MARKED6): Likewise.
825 (CLASSTYPE_TAGS): Likewise.
826 (CLASSTYPE_VSIZE): Likewise.
827 (CLASSTYPE_VBASECLASSES): Likewise.
828 (CANONICAL_BINFO): Add parenthesis.
829 (CLASSTYPE_SIZE(NODE): Likewise.
830 (CLASSTYPE_SIZE_UNIT): Likewise.
831 (CLASSTYPE_ALIGN(NODE): Likewise.
832 (CLASSTYPE_USER_ALIGN): Likewise.
833 (TYPE_JAVA_INTERFACE): Likewise.
834 (CLASSTYPE_PURE_VIRTUALS): Likewise.
835 (CLASSTYPE_NEEDS_VIRTUAL_REINIT): Whitespace and wrap.
836 (TYPE_HAS_DEFAULT_CONSTRUCTOR): Likewise.
837 (CLASSTYPE_HAS_MUTABLE): Likewise.
838 (CLASSTYPE_FRIEND_CLASSES): Likewise. Likewise.
839 (CLASSTYPE_DECLARED_CLASS): Whitespace and wrap.
840 (CLASSTYPE_READONLY_FIELDS_NEED_INIT): Likewise.
841 (CLASSTYPE_REF_FIELDS_NEED_INIT): Likewise.
842 (CLASSTYPE_INTERFACE_ONLY): Likewise.
843 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
844 (CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
845 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
846 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
847 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
848 (CLASSTYPE_DEBUG_REQUESTED): Whitespace and wrap.
849 (BINFO_UNSHARED_MARKED): Whitespace.
850 (BINFO_MARKED): Whitespace and wrap.
851 (SET_BINFO_MARKED): Likewise.
852 (CLEAR_BINFO_MARKED): Likewise.
853 (BINFO_VTABLE_PATH_MARKED): Likewise.
854 (SET_BINFO_VTABLE_PATH_MARKED): Likewise.
855 (CLEAR_BINFO_VTABLE_PATH_MARKED): Likewise.
856 (BINFO_SUBVTT_INDEX): Remove parenthesis.
857 (BINFO_VPTR_INDEX): Likewise.
858 (BINFO_PRIMARY_BASE_OF): Likewise,
859 (CLASSTYPE_VFIELDS): Whitespace.
860 (VF_DERIVED_VALUE): Wrap long line.
861 (NAMESPACE_LEVEL): Whitespace.
862 (CAN_HAVE_FULL_LANG_DECL_P): Remove parenthesis.
863 (DEFARG_POINTER): Whitespace.
864 (DECL_NEEDED_P): Remove parenthesis.
865 (DECL_LANGUAGE): Whitespace.
866 (SET_DECL_LANGUAGE): Add parenthesis.
867 (DECL_CONSTRUCTOR_P): Whitespace and wrap.
868 (DECL_OVERLOADED_OPERATOR_P): Remove parenthesis.
869 (DECL_IN_AGGR_P): Whitespace.
870 (DECL_FRIEND_P): Likewise.
871 (DECL_BEFRIENDING_CLASSES): Likewise.
872 (DECL_STATIC_FUNCTION_P): Whitespace and wrap.
873 (DECL_NONCONVERTING_P): Whitespace.
874 (DECL_PURE_VIRTUAL_P): Likewise.
875 (DECL_NEEDS_FINAL_OVERRIDER_P): Likewise.
876 (DECL_PENDING_INLINE_INFO): Whitespace.
877 (DECL_SORTED_FIELDS): Likewise.
878 (DECL_DEFERRED_FN): Likewise.
879 (DECL_TEMPLATE_INFO): Likewise.
880 (CLASSTYPE_TEMPLATE_INFO): Whitespace and wrap.
881 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO); Likewise.
882 (SET_TYPE_TEMPLATE_INFO): Add parenthesis.
883 (TMPL_ARGS_LEVEL): Likewise.
884 (SET_TMPL_ARGS_LEVEL): Likewise.
885 (INNERMOST_TEMPLATE_PARMS): Whitespace.
886 (C_TYPEDEF_EXPLICITLY_SIGNED): Uppercase macro parameter.
887 (INTEGRAL_CODE_P(CODE): Add parenthesis.
888 (CP_INTEGRAL_TYPE_P): Remove parenthesis.
889 (TYPE_HAS_CONSTRUCTOR): Whitespace.
890 (TREE_HAS_CONSTRUCTOR): Likewise.
891 (TYPE_HAS_DESTRUCTOR): Likewise.
892 (TYPE_HAS_REAL_ASSIGN_REF): Likewise.
893 (TYPE_HAS_COMPLEX_ASSIGN_REF): Likewise.
894 (TYPE_HAS_ABSTRACT_ASSIGN_REF): Likewise.
895 (TYPE_HAS_COMPLEX_INIT_REF): Likewise.
896 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): Likewise.
897 (TYPE_PTRMEMFUNC_P): Likewise.
898 (TYPE_PTRMEMFUNC_FLAG): Likewise.
899 (TYPE_GET_PTRMEMFUNC_TYPE): Likewise.
900 (TYPE_SET_PTRMEMFUNC_TYPE): Likewise.
901 (TYPE_PTRMEM_CLASS_TYPE): Remove parenthesis.
902 (TYPE_PTRMEM_POINTED_TO_TYPE): Likewise.
903 (DECL_ACCESS): Whitespace.
904 (DECL_GLOBAL_CTOR_P): Remove parenthesis.
905 (DECL_GLOBAL_DTOR_P): Likewise.
906 (GLOBAL_INIT_PRIORITY): Likewise.
907 (DECL_TEMPLATE_PARMS): Likewise.
908 (DECL_TEMPLATE_RESULT): Likewise.
909 (DECL_TEMPLATE_INSTANTIATIONS): Likewise.
910 (DECL_TEMPLATE_SPECIALIZATIONS): Likewise.
911 (DECL_IMPLICIT_TYPEDEF_P): Remove parenthesis.
912 (SET_DECL_IMPLICIT_TYPEDEF_P): Likewise.
913 (PRIMARY_TEMPLATE_P): Add parenthesis.
914 (DECL_USE_TEMPLATE): Whitespace.
915 (CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
916 (SET_CLASSTYPE_IMPLICIT_INSTANTIATION): Likewise.
917 (CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
918 (SET_CLASSTYPE_EXPLICIT_INSTANTIATION): Likewise.
919 (CALL_DECLARATOR_PARMS): Remove parenthesis.
920 (CALL_DECLARATOR_QUALS): Likewise.
921 (CALL_DECLARATOR_EXCEPTION_SPEC): Likewise.
923 (VFIELD_NAME_P): Likewise.
924 (B_SET): Uppercase macro parameters and add parenthesis.
927 (LOOKUP_NAMESPACES_ONLY): Uppercase macro parameters.
928 (LOOKUP_TYPES_ONLY): Uppercase macro parameters.
929 (LOOKUP_QUALIFIERS_ONLY): Uppercase macro parameters.
930 (same_or_base_type_p): Likewise.
931 (cp_deprecated): Likewise.
933 2002-01-05 Richard Henderson <rth@redhat.com>
935 * semantics.c (expand_body): Revert last change.
937 2002-01-04 Jason Merrill <jason@redhat.com>
940 * class.c (update_vtable_entry_for_fn): Set delta to zero for a
943 * class.c (build_vtbl_initializer): Check for a lost primary
944 before calculating the vtable entry to throw away.
946 2002-01-02 Jason Merrill <jason@redhat.com>
948 * semantics.c (expand_body): Call outlining_inline_function when
949 emitting an inline function out of line.
951 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
953 PR c++/5116, c++/764 reversion
954 * call.c (build_new_op): Revert the instantiations. They are
957 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
960 * decl2.c (reparse_absdcl_as_casts): Don't warn about casts to void.
962 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
965 * pt.c (tsubst_aggr_type): Move pmf handling into tsubst.
966 (tsubst, case POINTER_TYPE): Handle pmfs here.
967 (tsubst, case OFFSET_TYPE): Check it is not an offset to
968 reference. If it is offset to FUNCTION_TYPE, create a METHOD_TYPE.
970 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
973 * cp-tree.h (DECL_LANG_FLAG_0): Used for PARM_DECL too.
974 (DECL_TEMPLATE_PARM_P): A PARM_DECL might be one too.
975 * pt.c (process_template_parm): SET_DECL_TEMPLATE_PARM_P on the
977 (tsubst_template_parms): Break up loop statements.
978 (tsubst_decl, case PARM_DECL): Copy DECL_TEMPLATE_PARM_P. Template
979 parm PARM_DECLs don't get promoted.
981 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
984 * typeck.c (build_component_ref): Cope with a TEMPLATE_ID_EXPR.
985 (build_x_function_call): Cope with a COMPONENT_REF containing a
988 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
991 * pt.c (convert_template_argument): Be more careful determining
992 when RECORD_TYPE templates are or are not templates.
994 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
997 * cp-tree.h (handle_class_head): Adjust prototype.
998 * decl2.c (handle_class_head): Add DEFN_P and NEW_TYPE_P
999 parameters. Use for all class heads.
1000 * parse.y (named_class_head_sans_basetype, named_class_head,
1001 named_complex_class_head_sans_basetype,
1002 named_class_head_sans_basetype_defn,
1003 unnamed_class_head): Remove.
1004 (class_head, class_head_apparent_template): Recognize class heads
1005 (class_head_decl, class_head_defn): New reductions. Process class
1007 (structsp): Adjust class definition and class declaration
1009 (maybe_base_class_list): Give diagnostic on empty list.
1011 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
1014 * typeck.c (build_x_unary_op): Don't destroy the OFFSET_REF on a
1015 single non-static member.
1016 (unary_complex_lvalue): If it cannot be a pointer to member, don't
1017 make it so. Check it is not pointer to reference.
1019 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
1022 * decl2.c (reparse_absdcl_as_casts): Don't digest_init if we
1023 are processing a template decl.
1025 2002-01-02 Nathan Sidwell <nathan@codesourcery.com>
1027 PR c++/5116, c++/764
1028 * call.c (build_new_op): Make sure template class operands are
1029 instantiated. Simplify arglist construction.
1031 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
1033 * call.c (build_user_type_conversion_1): Use my_friendly_assert
1034 rather than if ... abort.
1035 * cvt.c (convert_to_reference): Likewise.
1036 * semantics.c (setup_vtbl_ptr): Likewise.
1037 * pt.c (lookup_template_class): Comment typo.
1039 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
1042 * pt.c (push_template_decl_real): Make sure DECL has
1045 2001-12-29 Nathan Sidwell <nathan@codesourcery.com>
1048 * init.c (resolve_offset_ref): Copy cv qualifiers of this pointer
1049 for non-reference fields.
1050 * typeck.c (require_complete_type): Use resolve_offset_ref).
1052 2001-12-26 Nathan Sidwell <nathan@codesourcery.com>
1055 * parse.y (bad_parm): Better diagnostic when given a SCOPE_REF.
1057 2001-12-24 Nathan Sidwell <nathan@codesourcery.com>
1060 * typeck.c (build_modify_expr): Remove old unreachable code & tidy
1061 up. Don't stabilize_references when initializing a reference.
1063 2001-12-23 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1065 * decl2.c (lang_f_options): Const-ify.
1067 2001-12-20 Joseph S. Myers <jsm28@cam.ac.uk>
1069 * config-lang.in (diff_excludes): Remove.
1071 2001-12-19 Nathan Sidwell <nathan@codesourcery.com>
1074 * typeck.c (build_function_call_real): Use original function
1075 expression for errors.
1077 2001-12-18 Jason Merrill <jason@redhat.com>
1080 * class.c (add_method): Do compare 'this' quals when trying to match a
1081 used function. Don't defer to another used function.
1083 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
1085 * pt.c (instantiate_clone): Remove, fold into ...
1086 (instantiate_template): ... here. Simplify by removing mutual
1088 * typeck2.c (build_m_component_ref): Don't cv qualify the function
1089 pointed to by a pointer to function.
1090 * class.c (delete_duplicate_fields_1): Typo.
1092 2001-12-18 Jason Merrill <jason@redhat.com>
1094 C++ ABI change: destroy value arguments in caller.
1095 * semantics.c (genrtl_start_function, genrtl_finish_function): Don't
1096 create an extra binding level for the parameters.
1097 * decl.c (store_parm_decls): Don't do parameter cleanups.
1099 2001-12-18 Nathan Sidwell <nathan@codesourcery.com>
1101 * call.c (build_new_method_call): Use '%#V'.
1102 * error.c (cv_to_string): Use V parameter to determine padding.
1104 2001-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
1106 * call.c, decl2.c, init.c: Use "built-in" and "bit-field"
1107 spellings in messages.
1109 2001-12-17 Zack Weinberg <zack@codesourcery.com>
1111 * cp-tree.h: Delete #defines for cp_error, cp_warning,
1112 cp_pedwarn, and cp_compiler_error.
1113 * call.c, class.c, cp-tree.h, cvt.c, decl.c, decl2.c, error.c,
1114 except.c, friend.c, init.c, lex.c, method.c, parse.y, pt.c,
1115 rtti.c, search.c, semantics.c, spew.c, tree.c, typeck.c,
1116 typeck2.c: Change calls to the above macros to use their
1117 language-independent equivalents: error, warning, pedwarn, and
1118 internal_error respectively.
1120 2001-12-16 Neil Booth <neil@daikokuya.demon.co.uk>
1122 * decl2.c (finish_file): Remove back_end_hook.
1124 2001-12-16 Joseph S. Myers <jsm28@cam.ac.uk>
1126 * ChangeLog.1, ChangeLog.2, ChangeLog, NEWS, call.c, class.c,
1127 cp-tree.h, decl.c, decl2.c, except.c, operators.def, optimize.c,
1128 pt.c, rtti.c, semantics.c, typeck.c: Fix spelling errors.
1130 2001-12-15 Joseph S. Myers <jsm28@cam.ac.uk>
1132 * lang-options.h: Use American spelling in messages.
1134 2001-12-13 Jason Merrill <jason@redhat.com>
1136 * Make-lang.in (parse.h): Separate rule, just depend on parse.c.
1138 Use cleanups to run base and member destructors.
1139 * init.c (push_base_cleanups): New function, split out from...
1140 (build_delete): ...here. Lose !TYPE_HAS_DESTRUCTOR code.
1141 * decl.c (finish_destructor_body): Move vbase destruction code to
1143 (begin_function_body, finish_function_body): New fns.
1144 (finish_function): Move [cd]tor handling and call_poplevel to
1145 finish_function_body.
1146 (pushdecl): Skip the new level.
1147 * semantics.c (genrtl_try_block): Don't call end_protect_partials.
1148 (setup_vtbl_ptr): Call push_base_cleanups.
1149 * method.c (synthesize_method): Call {begin,end}_function_body.
1150 * pt.c (tsubst_expr): Handle COMPOUND_STMT_BODY_BLOCK.
1151 * cp-tree.h: Declare new fns.
1152 * parse.y (function_body, .begin_function_body): New nonterminals.
1153 (fndef, pending_inline, function_try_block): Use function_body.
1154 (ctor_initializer_opt, function_try_block): No longer has a value.
1155 (base_init): Remove .set_base_init token.
1156 (.set_base_init, compstmt_or_error): Remove.
1157 * Make-lang.in (parse.c): Expect two fewer s/r conflicts.
1159 * optimize.c (maybe_clone_body): Fix parameter updating.
1161 2001-12-12 Jason Merrill <jason@redhat.com>
1163 * decl.c (store_parm_decls): Remove parms_have_cleanups cruft.
1164 * semantics.c (genrtl_start_function): Don't pass
1165 parms_have_cleanups or push an extra binding level.
1166 (genrtl_finish_function): Lose cleanup_label cruft.
1168 * cp-tree.h (struct cp_language_function): Remove x_ctor_label.
1169 (ctor_label): Remove.
1170 * semantics.c (finish_return_stmt): Lose ctor_label support.
1171 * decl.c (finish_constructor_body, mark_lang_function): Likewise.
1172 * typeck.c (check_return_expr): Check DECL_DESTRUCTOR_P, not
1175 * call.c (build_new_method_call): Let resolves_to_fixed_type_p
1177 * class.c (fixed_type_or_null, case INDIRECT_REF): Fix.
1179 * decl.c (finish_function): Check VMS_TARGET, not VMS.
1181 * decl.c (start_cleanup_fn): Remove redundant pushlevel.
1182 (end_cleanup_fn): And poplevel.
1184 * semantics.c (setup_vtbl_ptr): Always build a CTOR_INITIALIZER
1185 if we're in a template.
1187 2001-12-12 Jakub Jelinek <jakub@redhat.com>
1189 * cp-tree.h (DESTRUCTOR_DECL_PREFIX, DESTRUCTOR_NAME_P,
1190 ANON_PARMNAME_FORMAT, ANON_PARMNAME_P, DESTRUCTOR_NAME_FORMAT,
1191 THIS_NAME_P): Delete.
1192 * spew.c (read_process_identifier): Remove DESTRUCTOR_NAME_P,
1193 THIS_NAME_P and ANON_PARMNAME_P tests from warning about clash
1194 with internal naming scheme.
1195 * error.c (dump_decl): Remove DESTRUCTOR_NAME_P use.
1197 2001-12-12 Nathan Sidwell <nathan@codesourcery.com>
1199 * decl.c (grokdeclarator): Deprecated implicit typename use.
1201 2001-12-11 Nathan Sidwell <nathan@codesourcery.com>
1204 * parse.y (frob_specs): Indicate it is a language linkage which
1205 contained the extern.
1206 * decl.c (grokdeclarator): Allow extern language linkage with
1209 2001-12-10 Nathan Sidwell <nathan@codesourcery.com>
1212 * decl.c (add_binding): Don't reject duplicate typedefs involving
1213 template parameters.
1215 2001-12-10 Neil Booth <neil@daikokuya.demon.co.uk>
1217 * parse.y, semantics.c: Similarly.
1219 2001-12-09 Nathan Sidwell <nathan@codesourcery.com>
1222 * cp-tree.h (DECL_COPY_CONSTRUCTOR_P): Use copy_fn_p.
1223 (copy_args_p): Rename to ...
1224 (copy_fn_p): ... here.
1225 (grok_special_member_properties): New function.
1226 (grok_op_properties): Lose VIRTUALP parameter.
1227 (copy_assignment_arg_p): Remove.
1228 * call.c (build_over_call): Use copy_fn_p.
1229 * decl.c (grokfndecl): Reformat. Adjust call to
1231 (copy_args_p): Rename to ...
1232 (copy_fn_p): ... here. Reject template functions. Check for pass
1234 (grok_special_member_properties): Remember special functions.
1235 (grok_ctor_properties): Don't remember them here, just check.
1236 (grok_op_properties): Likewise.
1237 (start_method): Call grok_special_member_properties.
1238 * decl2.c (grokfield): Likewise.
1239 (copy_assignment_arg_p): Remove.
1240 (grok_function_init): Don't remember abstract assignment here.
1241 * pt.c (instantiate_class_template): Call
1242 grok_special_member_properties.
1243 (tsubst_decl): Adjust grok_op_properties call.
1245 2001-12-08 Aldy Hernandez <aldyh@redhat.com>
1247 * lex.c (rid_to_yy): Add RID_CHOOSE_EXPR and
1248 RID_TYPES_COMPATIBLE_P.
1250 2001-12-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
1252 * semantics.c (simplify_aggr_init_exprs_r): Add DIRECT_BIND flag in
1253 call to build_aggr_init.
1254 * cp-tree.h (DIRECT_BIND): Document new use of DIRECT_BIND.
1256 2001-12-08 Neil Booth <neil@daikokuya.demon.co.uk>
1258 * parse.y: Replace uses of the string non-terminal with STRING.
1259 Don't perform string concatentaion here.
1260 (string): Remove non-terminal.
1261 * semantics.c (finish_asm_stmt): Don't concatenate strings here.
1263 2001-12-05 Jason Merrill <jason@redhat.com>
1265 * cp-lang.c (LANG_HOOKS_TREE_INLINING_START_INLINING): Define.
1266 (LANG_HOOKS_TREE_INLINING_END_INLINING): Define.
1267 * tree.c (cp_start_inlining, cp_end_inlining): New fns.
1268 * pt.c (push_tinst_level): No longer static.
1269 * cp-tree.h: Declare them.
1271 * init.c (resolve_offset_ref): Don't check access for the base
1272 conversion to access a FIELD_DECL.
1274 * cp-tree.h (TYPE_REFFN_P): New macro.
1275 * decl.c (bad_specifiers): Check it, too.
1277 * rtti.c (create_pseudo_type_info): Set CLASSTYPE_INTERFACE_ONLY
1278 on the __*_type_info type if we haven't seen a definition.
1280 2001-12-05 Neil Booth <neil@daikokuya.demon.co.uk>
1282 * decl.c: Include c-common.h.
1283 (shadow_warning): Move to c-common.c.
1285 Wed Dec 5 17:00:49 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1287 * decl.c (duplicate_decls): Don't copy DECL_NO_CHECK_MEMORY_USAGE.
1289 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
1291 * pt.c (end_template_parm_list): Clear TREE_CHAIN of each parm.
1293 2001-12-04 Nathan Sidwell <nathan@codesourcery.com>
1296 * init.c (sort_base_init): Allow binfos to be directly specified.
1297 * method.c (do_build_copy_constructor): Explicitly convert to the
1299 (do_build_assign_ref): Likewise.
1301 2001-12-03 Hans-Peter Nilsson <hp@bitrange.com>
1303 * decl.c (xref_basetypes): Don't use C99 construct in tag_code
1304 declaration and initialization.
1306 2001-12-03 Neil Booth <neil@daikokuya.demon.co.uk>
1308 * typeck2.c: Remove leading capital from diagnostic messages, as
1309 per GNU coding standards.
1311 2001-12-03 Mumit Khan <khan@nanotech.wisc.edu>
1314 * decl.c (xref_basetypes): Handle attributes between
1317 2001-12-03 Nathan Sidwell <nathan@codesourcery.com>
1320 * parse.y (named_complex_class_head_sans_basetype): Add new
1322 * Make-lang.in (parse.c): Adjust expected conflict count.
1324 2001-12-03 Jason Merrill <jason@redhat.com>
1326 * class.c (finish_vtbls): Fill in BINFO_VPTR_FIELD in the
1327 immediate binfos for our virtual bases.
1329 2001-12-02 Neil Booth <neil@daikokuya.demon.co.uk>
1331 * call.c (build_java_interface_fn_ref): Similarly.
1332 * except.c (is_admissible_throw_operand): Similarly.
1333 * init.c (build_java_class_ref): Similarly.
1334 * xref.c (open_xref_file): Similarly.
1336 2001-12-01 Neil Booth <neil@daikokuya.demon.co.uk>
1338 * class.c (finish_struct): Remove trailing periods from messages.
1339 * decl.c (check_tag_decl): Similarly.
1340 * lex.c (cxx_set_yydebug): Similarly.
1341 * typeck2.c (friendly_abort): Similarly.
1343 2001-11-29 Mark Mitchell <mark@codesourcery.com>
1346 * cp-tree.h (ovl_member): Remove.
1347 * decl2.c (merge_functions): Handle extern "C" functions
1349 * tree.c (ovl_member): Remove.
1351 2001-11-29 Mark Mitchell <mark@codesourcery.com>
1354 * class.c (get_basefndecls): Take an IDENTIFIER_NODE, not a
1355 FUNCTION_DECL, as input.
1356 (mark_overriders): Remove.
1357 (warn_hidden): Rework for the new ABI.
1359 2001-11-29 Mark Mitchell <mark@codesourcery.com>
1362 * call.c (convert_like_real): Do not build additional temporaries
1363 for rvalues of class type.
1365 2001-11-28 Nathan Sidwell <nathan@codesourcery.com>
1367 * cp-tree.h (UNIQUELY_DERIVED_FROM_P): Use lookup base.
1368 (ACCESSIBLY_UNIQUELY_DERIVED_FROM_P): Likewise.
1369 (PUBLICLY_UNIQUELY_DERIVED_FROM_P: Likewise.
1370 (DERIVED_FROM_P): Likewise.
1371 (enum base_access): Renumber, add ba_quiet bit mask.
1372 (get_binfo): Remove.
1373 (get_base_distance): Remove.
1374 (binfo_value): Remove.
1375 (ACCESSIBLY_DERIVED_FROM_P): Remove.
1376 * call.c (standard_conversion): Use lookup_base.
1377 * class.c (strictly_overrides): Likewise.
1378 (layout_virtual_bases): Likewise.
1379 (warn_about_ambiguous_direct_bases): Likewise.
1380 (is_base_of_enclosing_class): Likewise.
1381 (add_vcall_offset_vtbl_entries_1): Likewise.
1382 * cvt.c (build_up_reference): Adjust comment.
1383 * init.c (build_member_call): Reformat.
1384 * search.c (get_binfo): Remove.
1385 (get_base_distance_recursive): Remove.
1386 (get_base_distance): Remove.
1387 (lookup_base_r): Tweak.
1388 (lookup_base): Add ba_quiet control. Complete the types here.
1389 (covariant_return_p): Use lookup_base.
1390 * tree.c (binfo_value): Remove.
1391 (maybe_dummy_object): Use lookup_base.
1392 * typeck.c (build_static_cast): Use lookup_base.
1393 (get_delta_difference): Likewise.
1394 * typeck2.c (binfo_or_else): Use lookup_base.
1395 (build_scoped_ref): Add back error_mark_check.
1396 (build_m_component_ref): Use lookup_base.
1398 2001-11-29 Joseph S. Myers <jsm28@cam.ac.uk>
1400 * Make-lang.in (c++.generated-manpages): New dummy target.
1402 Tue Nov 27 09:03:47 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1404 * Make-lang.in (cp-lang.o): Depends on c-common.h.
1405 * cp-lang.c (c-common.h): Include.
1406 (LANG_HOOKS_EXPAND_CONSTANT, LANG_HOOKS_SAFE_FROM_P): New hooks.
1407 * decl.c (cxx_init_decl_processing): Don't set lang_safe_from_p.
1408 * expr.c (init_cplus_expand): Don't set lang_expand_constant.
1410 2001-11-26 Neil Booth <neil@daikokuya.demon.co.uk>
1412 * decl2.c (c_language): Move to c-common.c.
1413 * lex.c (cxx_post_options, cxx_init_options): Use c-common.c
1417 2001-11-26 Jason Merrill <jason@redhat.com>
1419 * call.c (joust): Remove COND_EXPR hack.
1421 2001-11-25 Aldy Hernandez <aldyh@redhat.com>
1423 * search.c (lookup_base_r): Declare bk in variable declaration
1426 2001-11-25 Nathan Sidwell <nathan@codesourcery.com>
1429 * class.c (build_vbase_pointer): Remove.
1430 (build_vbase_path): Remove.
1431 (build_base_path): New function.
1432 * cp-tree.h (base_access, base_kind): New enumerations.
1433 (build_base_path): Declare.
1434 (convert_pointer_to_real): Remove.
1435 (convert_pointer_to): Remove.
1436 (lookup_base): Declare.
1437 (convert_pointer_to_vbase): Remove.
1438 * call.c (build_scoped_method_call): Use lookup_base &
1439 build_base_path instead of convert_pointer_to_real,
1440 get_base_distance & get_binfo.
1441 (build_over_call): Likewise.
1442 * cvt.c (cp_convert_to_pointer): Likewise.
1443 (convert_to_pointer_force): Likewise.
1444 (build_up_reference): Likewise.
1445 (convert_pointer_to_real): Remove.
1446 (convert_pointer_to): Remove.
1447 * init.c (dfs_initialize_vtbl_ptrs): Use build_base_path
1448 instead of convert_pointer_to_vbase & build_vbase_path.
1449 (emit_base_init): Use build_base_path instead of
1450 convert_pointer_to_real.
1451 (expand_virtual_init): Lose unrequired conversions.
1452 (resolve_offset_ref): Use lookup_base and build_base_path
1453 instead of convert_pointer_to.
1454 * rtti.c (build_dynamic_cast_1): Use lookup_base &
1455 build_base_path instead of get_base_distance & build_vbase_path.
1456 * search.c (get_vbase_1): Remove.
1457 (get_vbase): Remove.
1458 (convert_pointer_to_vbase): Remove.
1459 (lookup_base_r): New function.
1460 (lookup_base): New function.
1461 * typeck.c (require_complete_type): Use lookup_base &
1462 build_base_path instead of convert_pointer_to.
1463 (build_component_ref): Likewise.
1464 (build_x_function_call): Likewise.
1465 (get_member_function_from_ptrfunc): Likewise.
1466 (build_component_addr): Likewise.
1467 * typeck2.c (build_scoped_ref): Likewise.
1469 2001-11-22 Bryce McKinlay <bryce@waitaki.otago.ac.nz>
1471 * cp-tree.h (CP_TYPE_QUALS): Removed.
1472 * decl.c (cxx_init_decl_processing): Don't set lang_dump_tree.
1473 * cp-lang.c: Set LANG_HOOKS_TREE_DUMP_DUMP_TREE_FN and
1474 LANG_HOOKS_TREE_DUMP_TYPE_QUALS_FN.
1475 * dump.c (cp_dump_tree): Use void* dump_info argument to match
1476 lang-hooks prototype.
1477 * call.c, cp-tree.h, cvt.c, decl.c, init.c, mangle.c, method.c, pt.c,
1478 rtti.c, semantics.c, tree.c, typeck.c, typeck2.c: All references to
1479 CP_TYPE_QUALS changed to cp_type_quals.
1480 * Make-lang.in: References to c-dump.h changed to tree-dump.h.
1481 (CXX_C_OBJS): Remove c-dump.o.
1483 2001-11-21 Mark Mitchell <mark@codesourcery.com>
1486 * pt.c (lookup_template_class): Ensure that all specializations
1487 are registered on the list corresponding to the most general
1490 2001-11-20 Mark Mitchell <mark@codesourcery.com>
1492 * call.c (non_reference): Add documentation.
1493 (convert_class_to_reference): Do not strip reference types
1494 from conversion operators.
1495 (maybe_handle_ref_bind): Simplify.
1496 (compare_ics): Correct handling of references.
1498 2001-11-19 John Wilkinson <johnw@research.att.com>
1500 * dump.c (dump_op): New function.
1501 (cp_dump_tree): Dump CLASSTYPE_TEMPLATE_SPECIALIZATION. Use
1502 dump_op. Dump DECL_MUTABLE, access and staticness for VAR_DECLs.
1503 DECL_PURE_VIRTUAL_P, DECL_VIRTUAL_P,
1505 2001-11-19 Mark Mitchell <mark@codesourcery.com>
1508 * semantics.c (finish_sizeof): Make sure that expression created
1509 while processing a template do not have a type.
1510 (finish_alignof): Likewise.
1511 * typeck.c (c_sizeof): Likewise.
1512 (expr_sizeof): Likewise.
1514 2001-11-18 Neil Booth <neil@daikokuya.demon.co.uk>
1516 * lex.c (cxx_finish): Call c_common_finish.
1517 (finish_parse): Remove.
1519 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1521 * decl.c (create_array_type_for_decl): Check if NAME is NULL_TREE
1522 when displaying error message about missing array bounds.
1524 2001-11-17 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1526 * mangle.c (write_expression): Handle CAST_EXPR, STATIC_CAST_EXPR,
1528 * operators.def: Add CAST_EXPR, STATIC_CAST_EXPR, CONST_CAST_EXPR.
1530 2001-11-16 Neil Booth <neil@daikokuya.demon.co.uk>
1532 * cp-tree.h (print_class_statistics): Restore.
1534 2001-11-15 Jason Merrill <jason@redhat.com>
1536 * method.c (use_thunk): Don't emit debugging information for thunks.
1538 * parse.y: Add ... IDENTIFIER SCOPE and ... PTYPENAME SCOPE expansions.
1539 * decl.c (make_typename_type): Handle getting a class template.
1540 * search.c (lookup_field_r): A class template is good enough for
1543 * call.c (convert_like_real): Only use cp_convert for the bad part.
1544 (standard_conversion): Also allow bad int->enum.
1545 * typeck.c (ptr_reasonably_similar): Also allow functions to
1546 interconvert. Pointers to same-size integers are reasonably
1549 * cvt.c (convert_to_void): If we build a new COND_EXPR, always
1552 2001-11-15 Nathan Sidwell <nathan@codesourcery.com>
1555 * init.c (sort_base_init): Remove unreachable code.
1556 (expand_member_init): Adjust comment to reflect reality. Simplify
1557 and remove unreachable code.
1559 2001-11-15 Neil Booth <neil@daikokuya.demon.co.uk>
1561 * cp-tree.h (init_reswords, cxx_init_decl_processing): New.
1562 (cxx_init): Update prototype.
1563 * decl.c (init_decl_processing): Rename. Move null node init
1564 to its creation time.
1565 * lex.c (cxx_init_options): Update.
1566 (cxx_init): Combine with old init_parse; also call
1567 cxx_init_decl_processing.
1569 2001-11-14 Richard Sandiford <rsandifo@redhat.com>
1571 * decl.c (check_initializer): Try to complete the type of an
1572 array element before checking whether it's complete. Don't
1573 complain about arrays with complete element types but an
1575 (cp_finish_decl): Build the hierarchical constructor before
1576 calling maybe_deduce_size_from_array_init.
1578 2001-11-14 Joseph S. Myers <jsm28@cam.ac.uk>
1580 * Make-lang.in: Change all uses of $(manext) to $(man1ext).
1582 2001-11-13 Nathan Sidwell <nathan@codesourcery.com>
1585 * parse.y (already_scoped_stmt): Remove.
1586 (simple_stmt, WHILE & FOR): Use implicitly_scoped_stmt.
1588 2001-11-12 H.J. Lu <hjl@gnu.org>
1590 * cvt.c (ocp_convert): Don't warn the address of a weak
1591 function is always `true'.
1593 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
1595 * cp-lang.c (LANG_HOOKS_PRINT_DECL, LANG_HOOKS_PRINT_TYPE,
1596 LANG_HOOKS_PRINT_STATISTICS, LANG_HOOKS_PRINT_XNODE,
1597 LANG_HOOKS_PRINT_IDENTIFIER, LANG_HOOKS_SET_YYDEBUG): Override.
1598 * cp-tree.h (print_class_statistics): Remove.
1599 (cxx_print_statistics, cxx_print_xnode, cxx_print_decl, cxx_print_type,
1600 cxx_print_identifier, cxx_set_yydebug): New.
1601 * lex.c (set_yydebug): Rename c_set_yydebug.
1602 * ptree.c (print_lang_decl, print_lang_type, print_lang_identifier,
1603 lang_print_xnode): Rename.
1604 * tree.c (print_lang_statistics): Rename.
1606 2001-11-09 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1608 * class.c (dump_array): Fix format specifier warning.
1610 2001-11-09 Neil Booth <neil@daikokuya.demon.co.uk>
1612 * cp-lang.c (LANG_HOOKS_NAME): Override.
1613 (struct lang_hooks): Constify.
1614 * lex.c (cxx_init_options): Update.
1615 (lang_identify): Remove.
1616 * parse.y (language_string): Remove.
1618 2001-11-08 Andreas Franck <afranck@gmx.de>
1620 * Make-lang.in (CXX_INSTALL_NAME, GXX_CROSS_NAME,
1621 DEMANGLER_CROSS_NAME): Handle program_transform_name the way
1622 suggested by autoconf.
1623 (GXX_TARGET_INSTALL_NAME, CXX_TARGET_INSTALL_NAME): Define.
1624 (c++.install-common): Use the transformed target alias names.
1626 2001-11-06 Neil Booth <neil@cat.daikokuya.demon.co.uk>
1628 * Make-lang.in: Update.
1629 * cp-lang.c: Include langhooks-def.h.
1631 2001-11-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1633 * pt.c (tsubst_copy): Call tsubst for TYPEOF_EXPR.
1635 2001-11-03 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1637 * lex.c (copy_lang_type): Add static prototype.
1639 2001-11-02 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1641 * pt.c (unify): Handle SCOPE_REF.
1643 2001-11-01 Jakub Jelinek <jakub@redhat.com>
1645 * tree.c (cp_copy_res_decl_for_inlining): Adjust
1646 DECL_ABSTRACT_ORIGIN for the return variable.
1648 2001-10-31 Zack Weinberg <zack@codesourcery.com>
1650 * Make-lang.in: Replace $(INTL_TARGETS) with po-generated.
1652 2001-10-28 Joseph S. Myers <jsm28@cam.ac.uk>
1654 * ChangeLog.1, ChangeLog.2, ChangeLog, class.c, decl2.c, search.c,
1655 semantics.c, spew.c: Fix spelling errors.
1657 2001-10-27 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1659 * decl2.c (validate_nonmember_using_decl): Handle NAMESPACE_DECL.
1661 2001-10-25 Zack Weinberg <zack@codesourcery.com>
1663 * cp-lang.c: Redefine LANG_HOOKS_CLEAR_BINDING_STACK to
1666 Tue Oct 23 14:00:20 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1668 * cp-lang.c (cxx_get_alias_set): New function.
1669 Point LANG_HOOKS_GET_ALIAS_SET to it.
1671 2001-10-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1673 * cp-tree.def (UNBOUND_CLASS_TEMPLATE): New tree node.
1674 * cp-tree.h (make_unbound_class_template): Prototype new function.
1675 * decl.c (make_unbound_class_template): New function.
1676 * decl2.c (arg_assoc_template_arg): Handle UNBOUND_CLASS_TEMPLATE.
1677 * error.c (dump_type): Likewise.
1678 * mangle.c (write_type): Likewise.
1679 * parse.y (template_parm): Likewise.
1680 (template_argument): Use make_unbound_class_template.
1681 * pt.c (convert_template_argument): Handle UNBOUND_CLASS_TEMPLATE.
1683 (tsubst_copy): Likewise.
1685 * tree.c (walk_tree): Likewise.
1686 * typeck.c (comptypes): Likewise.
1688 2001-10-21 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1690 * xref.c (GNU_xref_member): Use safe-ctype macros and/or fold
1691 extra calls into fewer ones.
1693 2001-10-18 Alexandre Oliva <aoliva@redhat.com>
1695 * decl.c (duplicate_decls): Propagate DECL_UNINLINABLE.
1696 Warn when merging inline with attribute noinline.
1697 (start_decl, start_function): Warn if inline and attribute
1698 noinline appear in the same declaration.
1700 2001-10-16 H.J. Lu <hjl@gnu.org>
1702 * cp-tree.h (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): Defined
1703 for tree checking disabled.
1705 2001-10-16 Hans-Peter Nilsson <hp@axis.com>
1707 * cp-tree.h (VFIELD_NAME_FORMAT) [NO_DOLLAR_IN_LABEL &&
1708 NO_DOT_IN_LABEL]: Adjust to match VFIELD_NAME.
1710 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
1712 * pt.c (UNIFY_ALLOW_MAX_CORRECTION): Define.
1713 (unify): Only handle MINUS_EXPR specially if the above flag is set
1714 and the subtracted constant is 1. Clear the flag on recursive calls.
1715 Set it when unifying the maximum value in an INTEGER_TYPE's range.
1717 2001-10-15 Richard Sandiford <rsandifo@redhat.com>
1719 * decl.c (bad_specifiers): Don't allow exception specifications
1722 2001-10-14 Neil Booth <neil@daikokuya.demon.co.uk>
1724 * cp/lex.c (init_cp_pragma): Similarly.
1726 2001-10-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1728 * pt.c (lookup_template_class): Build complete template arguments
1729 for BOUND_TEMPLATE_TEMPLATE_PARM.
1731 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1733 * cp-tree.h (TYPE_BINFO): Update comment.
1734 (BOUND_TEMPLATE_TEMPLATE_PARM_TYPE_CHECK): New macro.
1735 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Use template_info.
1736 (TYPENAME_TYPE_FULLNAME): Use TYPE_FIELDS.
1737 (copy_type): Prototype new function.
1738 * lex.c (copy_lang_decl): Gather tree node statistics.
1739 (copy_lang_type): New function.
1740 (copy_type): Likewise.
1741 (cp_make_lang_type): Create lang_type for
1742 BOUND_TEMPLATE_TEMPLATE_PARM. Set TYPE_BINFO for TYPENAME_TYPE
1743 and BOUND_TEMPLATE_TEMPLATE_PARM.
1744 * pt.c (tsubst): Use copy_type instead of copy_node.
1745 * search.c (lookup_field_1): Ignore TYPENAME_TYPE.
1747 2001-10-12 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1749 * pt.c (determine_specialization): Ignore functions without
1752 2001-10-12 Nathan Sidwell <nathan@codesourcery.com>
1755 * typeck2.c (abstract_virtuals_error): Ignore incomplete classes.
1757 2001-10-11 Jason Merrill <jason_merrill@redhat.com>
1759 * typeck2.c (store_init_value): Don't re-digest a bracketed
1762 * class.c (finish_struct_anon): Use TYPE_ANONYMOUS_P instead of
1765 2001-10-11 Richard Henderson <rth@redhat.com>
1767 * class.c (build_vtable_entry_ref): Create a VTABLE_REF instead
1768 of an asm statement.
1769 (build_vtbl_ref_1): Split out from build_vtbl_ref.
1770 (build_vfn_ref): Use it to handle vtable descriptors before
1771 calling build_vtable_entry_ref.
1772 * decl2.c (output_vtable_inherit): Use assemble_vtable_inherit.
1774 2001-10-10 Richard Henderson <rth@redhat.com>
1776 * parse.y (asm_operand): Allow named operands.
1777 * semantics.c (finish_asm_stmt): Tweek for changed location
1778 of the operand constrant.
1780 2001-10-09 Jason Merrill <jason_merrill@redhat.com>
1782 * call.c (standard_conversion): Add bad conversion between
1783 integers and pointers.
1784 (convert_like_real): Don't use convert_for_initialization for bad
1785 conversions; complain here and use cp_convert.
1786 (build_over_call): Don't handle bad conversions specially.
1787 (perform_implicit_conversion): Allow bad conversions.
1788 (can_convert_arg_bad): New fn.
1789 * cp-tree.h: Declare it.
1790 * typeck.c (convert_for_assignment): Use it.
1791 (ptr_reasonably_similar): Any target type is similar to void.
1793 2001-10-08 Alexandre Oliva <aoliva@redhat.com>
1795 * Make-lang.in (CXX_OBJS): Added cp-lang.o.
1796 (cp/cp-lang.o): New rule.
1797 * cp-tree.h: Declare hooks.
1798 * tree.c: Make hooks non-static.
1799 (init_tree): Don't initialize hooks here.
1800 * lex.c: Likewise. Move definition of lang_hooks to...
1801 * cp-lang.c: ... new file.
1803 2001-10-08 Richard Henderson <rth@redhat.com>
1805 * cp-tree.h (struct lang_decl_flags): Remove declared_inline.
1806 (DECL_DECLARED_INLINE_P): Use the bit in struct c_lang_decl.
1808 2001-10-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1810 * class.c (build_vtable_entry_ref): Const-ify.
1811 * decl.c (predefined_identifier,
1812 initialize_predefined_identifiers): Likewise.
1813 * init.c (build_new_1): Likewise.
1814 * lex.c (cplus_tree_code_type, cplus_tree_code_length, resword):
1817 2001-10-05 Alexandre Oliva <aoliva@redhat.com>
1819 * optimize.c (struct inline_data): Moved to ../tree-inline.c.
1820 (INSNS_PER_STMT): Likewise.
1821 (remap_decl, remap_block, copy_scopy_stmt, copy_body_r): Likewise.
1822 (copy_body, initialize_inlined_parameters): Likewise.
1823 (declare_return_variable, inlinable_function_p): Likewise.
1824 (expand_call_inline, expand_calls_inline): Likewise.
1825 (optimize_inline_calls, clone_body): Likewise.
1826 * tree.c (walk_tree): Moved to ../tree-inline.c.
1827 (walk_tree_without_duplicates): Likewise.
1828 (copy_tree_r, remap_save_expr): Likewise.
1830 2001-10-04 Alexandre Oliva <aoliva@redhat.com>
1832 * Make-lang.in (cp/decl.o, cp/tree.o): Depend on tree-inline.h.
1833 (cp/pt.o, cp/semantics.o, cp/optimize.o): Likewise.
1834 * cp-tree.h (lang_decl): Moved inlined_fns to tree_decl.
1835 (TREE_READONLY_DECL_P, DECL_INLINED_FNS): Moved to ../tree.h.
1836 (flag_inline_trees): Moved declaration to ../tree-inline.h.
1837 (walk_tree): Moved declaration to ../tree-inline.h.
1838 (walk_tree_without_duplicates, copy_tree_r): Likewise.
1839 (remap_save_expr): Likewise.
1840 * decl.c: Include tree-inline.h.
1841 (lang_mark_tree): Don't mark inlined_fns.
1842 * decl2.c (flag_inline_trees): Moved defn to ../tree-inline.c.
1843 * optimize.c: Include tree-inline.h.
1844 (optimize_inline_calls): Move declaration to ../tree.h, as
1846 (remap_decl): Use language-independent constructs and hooks.
1847 (remap_block, copy_body_r, declare_return_variable): Likewise.
1848 (inlinable_function_p): Likewise. Don't test for
1849 DECL_LANG_SPECIFIC before DECL_INLINED_FNS as inlined_fns is
1850 no longer language-specific.
1851 (optimize_inline_calls): Likewise. Make it non-static. Moved
1852 call of dump_function to...
1853 (optimize_function): Here...
1854 (clone_body): New function, extracted from...
1855 (maybe_clone_body): ... here. Build decl_map locally and pass
1856 it on to clone_body.
1857 * pt.c, semantics.c: Include tree-inline.h.
1859 (cp_walk_subtrees): New language-specific hook for tree inlining.
1860 (cp_cannot_inline_tree_fn, cp_add_pending_fn_decls,
1861 cp_is_overload_p, cp_auto_var_in_fn_p,
1862 cp_copy_res_decl_for_inlining): Likewise.
1863 (walk_tree): Move language-specific constructs into...
1864 (cp_walk_subtrees): this new function.
1865 (copy_tree_r): Use language-independent constructs and hooks.
1866 (init_tree): Initialize tree inlining hooks.
1867 (remap_save_expr): Adjust prototype so that the declaration
1868 does not require the definition of splay_tree.
1870 2001-10-03 John David Anglin <dave@hiauly1.hia.nrc.ca>
1872 * rtti.c (get_tinfo_decl): Call typeinfo_in_lib_p with the type used
1873 to build the declaration instead of the declaration itself.
1875 2001-10-02 Jason Merrill <jason_merrill@redhat.com>
1877 * decl2.c (cxx_decode_option): Add 'else'.
1879 * spew.c (end_input): No longer static.
1880 * cp-tree.h: Declare it.
1881 * parse.y (datadef): Add "error END_OF_SAVED_INPUT" expansion.
1883 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
1885 * call.c (build_over_call), typeck.c (build_function_call_real):
1886 Pass type attributes to check_function_format rather than name or
1887 assembler name. Don't require there to be a name or assembler
1888 name to check formats.
1890 2001-10-02 Joseph S. Myers <jsm28@cam.ac.uk>
1892 * decl.c (init_decl_processing): Don't call
1893 init_function_format_info. Initialize lang_attribute_table
1895 (builtin_function): Call decl_attributes.
1896 (insert_default_attributes): New.
1898 2001-10-01 Jason Merrill <jason_merrill@redhat.com>
1900 * decl.c (grokdeclarator): Copy array typedef handling from C
1903 * decl.c (grokdeclarator): Copy too-large array handling from C
1906 2001-09-29 Alexandre Oliva <aoliva@redhat.com>
1908 * config-lang.in (target_libs): Added target-gperf, so that we
1909 don't try to build it if C++ is disabled.
1911 2001-09-23 Zack Weinberg <zack@codesourcery.com>
1913 * Make-lang.in (CXX_OBJS): Take out cp/errfn.o.
1914 (cp/errfn.o): Delete rule.
1915 (cp/error.o): Depend on flags.h.
1916 * errfn.c: Delete file.
1917 * cp-tree.h: Declare warn_deprecated. Remove definitions of
1918 TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS,
1919 and TFF_TEMPLATE_DEFAULT_ARGUMENTS. #define cp_error, cp_warning,
1920 cp_pedwarn, and cp_compiler_error to error, warning, pedwarn, and
1921 internal_error respectively. Make cp_deprecated into a macro.
1922 Don't define cp_printer typedef or declare cp_printers.
1923 * error.c: Include flags.h.
1924 Delete: struct tree_formatting_info, print_function_argument_list,
1925 print_declaration, print_expression, print_function_declaration,
1926 print_function_parameter, print_type_id, print_cv_qualifier_seq,
1927 print_type_specifier_seq, print_simple_type_specifier,
1928 print_elaborated_type_specifier, print_rest_of_abstract_declarator,
1929 print_parameter_declaration_clause, print_exception_specification,
1930 print_nested_name_specifier, and definition of cp_printers.
1931 (locate_error): New function.
1932 (cp_error_at, cp_warning_at, cp_pedwarn_at): Moved here and
1933 rewritten in terms of locate_error and diagnostic.c.
1934 (cp_tree_printer): Rename cp_printer; wire up to *_to_string
1935 instead of deleted print_* routines. Handle %C, %L, %O, %Q also.
1936 (init_error): Adjust to match.
1938 Sat Sep 22 09:15:31 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1940 * Make-lang.in (CXX_C_OBJS): Add attribs.o.
1942 2001-09-21 Richard Henderson <rth@redhat.com>
1944 * class.c (set_vindex): Mind TARGET_VTABLE_USES_DESCRIPTORS.
1945 (build_vtbl_initializer): Likewise.
1946 (build_vfn_ref): New.
1947 * cp-tree.h: Declare it.
1948 * call.c (build_over_call): Use it.
1949 * decl2.c (mark_vtable_entries): Mark FDESC_EXPR.
1950 * typeck.c (get_member_function_from_ptrfunc): Mind descriptors.
1952 Fri Sep 21 08:16:19 2001 J"orn Rennecke <amylaar@redhat.com>
1954 * decl.c (grokdeclarator): Use C syntax for attr_flags declaration.
1956 2001-09-21 Joseph S. Myers <jsm28@cam.ac.uk>
1958 Table-driven attributes.
1959 * decl.c: Rename DECL_MACHINE_ATTRIBUTES to DECL_ATTRIBUTES.
1960 * decl2.c (cplus_decl_attributes): Only take one attributes
1962 * cp-tree.c (cplus_decl_attributes): Update prototype.
1963 * class.c (finish_struct), decl.c (start_decl, start_function),
1964 decl2.c (grokfield), friend.c (do_friend), parse.y
1965 (parse_bitfield): Update calls to cplus_decl_attributes.
1966 * decl.c (grokdeclarator): Take a pointer to a single ordinary
1968 * decl.h (grokdeclarator): Update prototype.
1969 * decl2.c (grokfield): Take a single ordinary attribute list.
1970 * friend.c (do_friend): Likewise.
1971 * decl.c (shadow_tag, groktypename, start_decl,
1972 start_handler_parms, grokdeclarator, grokparms, start_function,
1973 start_method), decl2.c (grokfield, grokbitfield, grokoptypename),
1974 parse.y (parse_field, parse_bitfield, component_decl_1), pt.c
1975 (process_template_parm, do_decl_instantiation): Pass single
1976 ordinary attribute lists around.
1977 * decl.c (grokdeclarator): Correct handling of nested attributes.
1979 1998-10-18 Jason Merrill <jason@yorick.cygnus.com>
1980 * decl.c (grokdeclarator): Embedded attrs bind to the right,
1983 * cp-tree.h (cp_valid_lang_attribute): Remove declaration
1984 (cp_attribute_table): Declare.
1985 * decl.c (valid_lang_attribute): Don't define.
1986 (lang_attribute_table): Define.
1987 (init_decl_processing): Initialize lang_attribute_table instead of
1988 valid_lang_attribute.
1989 * tree.c (cp_valid_lang_attribute): Remove.
1990 (handle_java_interface_attribute, handle_com_interface_attribute,
1991 handle_init_priority_attribute): New functions.
1992 (cp_attribute_table): New array.
1993 * decl2.c (import_export_class): Don't use
1994 targetm.valid_type_attribute.
1996 2001-09-15 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
1998 * Make-lang.in (cp/error.o): Depend on real.h
1999 * error.c: #include "real.h"
2001 2001-09-15 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2003 * mangle.c (mangle_conv_op_name_for_type): Use concat in lieu of
2004 xmalloc/strcpy/strcat.
2006 2001-09-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2008 * decl.c (warn_extern_redeclared_static, cp_make_fname_decl):
2010 * pt.c (tsubst_decl): Likewise.
2012 2001-09-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2014 * decl2.c (lang_f_options): Const-ification.
2015 * lex.c (cplus_tree_code_name): Likewise.
2016 * spew.c (yyerror): Likewise.
2018 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
2021 * class.c (force_canonical_binfo_r): Check & move an indirect
2023 (force_canonical_binfo): Check that it's not already
2025 (mark_primary_virtual_base): Remove BINFO parameter.
2026 (mark_primary_bases): Adjust, set BINFO_LOST_PRIMARY_P here.
2028 2001-09-06 Nathan Sidwell <nathan@codesourcery.com>
2030 Remove TYPE_NONCOPIED_PARTS.
2031 * cp-tree.h (CLASSTYPE_INLINE_FRIENDS): Map onto
2032 CLASSTYPE_PURE_VIRTUALS.
2033 (TYPE_RAISES_EXCEPTIONS): Map onto TYPE_BINFO.
2034 * class.c (duplicate_tag_error): Remove TYPE_NONCOPIED_PARTS.
2035 (layout_class_type): Don't call fixup_inline_methods here ...
2036 (finish_struct_1): ... call it here.
2038 2001-09-04 Mark Mitchell <mark@codesourcery.com>
2040 * decl.c (duplicate_decls): Remove code deadling with
2042 * decl2.c (finish_file): Likewise.
2043 * pt.c (instantiate_decl): Likewise.
2044 * semantics.c (expand_body): Don't defer local functions if
2045 they wouldn't be deferred for some other reason. Don't
2046 generate RTL for functions that will not be emitted.
2047 (genrtl_start_function): Remove code deadling with
2049 (genrtl_finish_function): Likewise.
2051 2001-09-04 Nathan Sidwell <nathan@codesourcery.com>
2054 * call.c (build_over_call): Do not optimize any empty base
2057 2001-08-31 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2059 * error.c (dump_template_decl): Output template parameters
2060 together with their specifiers.
2061 Output `class' prefix for template template parameter.
2062 (dump_decl): Fix formatting.
2064 2001-08-30 Kurt Garloff <garloff@suse.de>
2066 * optimize.c (inlinable_function_p): Allow only smaller single
2067 functions. Halve inline limit after reaching recursive limit.
2069 2001-08-30 Joern Rennecke <amylaar@redhat.com>
2070 Jason Merrill <jason_merrill@redhat.com>
2072 * class.c (build_vtable_entry_ref): Subtract in char*, not
2075 2001-08-23 Jason Merrill <jason_merrill@redhat.com>
2077 * tree.c (cp_build_qualified_type_real): Use get_qualified_type.
2078 (build_cplus_array_type): Use cp_build_qualified_type, not
2079 TYPE_MAIN_VARIANT, to get an unqualified version.
2081 * decl2.c (grok_alignof): Lose.
2082 (build_expr_from_tree): Use expr_sizeof and c_alignof_expr.
2083 * typeck.c (c_alignof): Lose.
2084 * semantics.c (finish_sizeof, finish_alignof): New.
2085 * parse.y: Use them.
2086 * cp-tree.h: Declare them.
2088 2001-08-22 Jason Merrill <jason_merrill@redhat.com>
2090 * pt.c (tsubst_expr): Hand off to the TREE_CHAIN of a statement.
2091 Don't loop in COMPOUND_STMT, FOR_STMT or TRY_BLOCK.
2092 * tree.c (cp_statement_code_p): A TAG_DEFN is a statement.
2094 2001-08-19 Jakub Jelinek <jakub@redhat.com>
2096 * typeck2.c (add_exception_specifier): Only require complete type if
2097 not in processing template declaration.
2099 2001-08-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2101 * decl.c: Cast argument to size_t, not HOST_WIDE_INT, in calls to
2102 GNU_xref_start_scope and GNU_xref_end_scope.
2104 * tree.c (TYPE_HASH): Moved to ../tree.h.
2106 2001-08-16 Mark Mitchell <mark@codesourcery.com>
2108 * cvt.c (convert_to_void): Preserve TREE_SIDE_EFFECTS
2111 2001-08-14 Richard Henderson <rth@redhat.com>
2113 * class.c, cp-tree.h (build_vfn_ref): Remove.
2114 * call.c, rtti.c: Replace all refernces with build_vtbl_ref.
2116 2001-08-13 Mark Mitchell <mark@codesourcery.com>
2118 * call.c (build_over_call): Mark COMPOUND_EXPRs generated for
2119 empty class assignment as having side-effects to avoid
2122 2001-08-13 Zack Weinberg <zackw@panix.com>
2124 * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
2125 * except.c: Include libfuncs.h.
2127 2001-08-11 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2129 * decl.c (grokdeclarator): Clarify diagnostic message.
2131 2001-08-13 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2133 * decl2.c (do_nonmember_using_decl): Replace using directive
2134 with using declaration in the error message.
2136 2001-08-11 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2138 * pt.c (maybe_fold_nontype_arg): Use TREE_TYPE of ARG as the
2139 criterion to avoid rebuilding expression tree instead of
2140 processing_template_decl.
2142 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
2144 Support named return value optimization for inlines, too.
2145 * decl.c (finish_function): Nullify returns here.
2146 * semantics.c (genrtl_start_function): Not here.
2147 (cp_expand_stmt): Don't mess with CLEANUP_STMTs.
2148 (nullify_returns_r): No longer static. Just clear RETURN_EXPR.
2149 Also nullify the CLEANUP_STMT for the nrv.
2150 * cp-tree.h: Declare it.
2151 * optimize.c (declare_return_variable): Replace the nrv with the
2153 * typeck.c (check_return_expr): Be more flexible on alignment check.
2154 Ignore cv-quals when checking for a matching type.
2156 2001-08-09 Richard Henderson <rth@redhat.com>
2158 * decl2.c (finish_objects): Use target hooks instead of
2159 assemble_constructor and assemble_destructor.
2161 2001-08-08 John David Anglin <dave@hiauly1.hia.nrc.ca>
2163 * g++spec.c (lang_specific_driver): Quote argument after `-Xlinker'.
2165 2001-08-07 Nathan Sidwell <nathan@codesourcery.com>
2168 Stop using TYPE_NONCOPIED_PARTS.
2169 * call.c (build_over_call): Be careful when copy constructing
2170 or assigning to an empty class.
2171 * class.c (check_bases_and_members): It has a
2172 COMPLEX_ASSIGN_REF if it has a vptr.
2173 (layout_class_type): Don't add empty class padding to
2174 TYPE_NONCOPIED_PARTS.
2175 (finish_struct_1): Don't add the VFIELD either.
2176 * cp-tree.h (TYPE_HAS_TRIVIAL_INIT_REF): Mention _copy_
2179 2001-08-07 Jason Merrill <jason_merrill@redhat.com>
2181 * tree.c (walk_tree): Walk siblings even if !walk_subtrees.
2183 2001-08-06 Richard Henderson <rth@redhat.com>
2185 * decl2.c (finish_objects): Pass a symbol_ref and priority to
2186 assemble_{constructor,destructor}. Remove priority handling.
2188 2001-08-05 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2190 Don't allow template-id in using-declaration.
2191 * decl2.c (validate_nonmember_using_decl): Handle template-ids.
2192 (do_class_using_decl): Likewise.
2194 2001-08-04 Neil Booth <neil@cat.daikokuya.demon.co.uk>
2196 * cp/spew.c (read_token): No need to pop buffers.
2198 2001-08-02 Stan Shebs <shebs@apple.com>
2200 * cp-tree.h (FNADDR_FROM_VTABLE_ENTRY): Remove, no longer used.
2201 (fnaddr_from_vtable_entry): Remove decl.
2202 * method.c (use_thunk): Update comment.
2204 2001-08-01 Andrew Cagney <ac131313@redhat.com>
2206 * repo.c (get_base_filename): Change return value to const char
2209 2001-08-02 Nathan Sidwell <nathan@codesourcery.com>
2213 * cp-tree.h (flag_honor_std): Remove.
2214 (CPTI_FAKE_STD): Remove.
2215 (std_node): Remove comment about it being NULL.
2216 (fake_std_node): Remove.
2217 * decl.c (in_fake_std): Remove.
2218 (walk_namespaces_r): Remove fake_std_node check.
2219 (push_namespace): Remove in_fake_std code.
2220 (pop_namespace): Likewise.
2221 (lookup_name_real): Remove fake_std_node check.
2222 (init_decl_processing): Always create std_node. Always add
2224 (builtin_function): Always put non '_' fns in std.
2225 * decl2.c (flag_honor_std): Remove.
2226 (lang_f_options): Remove honor-std.
2227 (unsupported_options): Add honor-std.
2228 (set_decl_namespace): Remove fake_std_node check.
2229 (validate_nonmember_using_decl): Likewise.
2230 (do_using_directive): Likewise.
2231 (handle_class_head): Likewise.
2232 * dump.c (cp_dump_tree): Likewise.
2233 * except.c (init_exception_processing): Adjust.
2234 * init.c (build_member_call): Remove fake_std_node check.
2235 (build_offset_ref): Likewise.
2236 * lang-options.h: Remove -fhonor-std, -fno-honor-std.
2237 * rtti.c (init_rtti_processing): Adjust.
2239 2001-07-31 Alexandre Petit-Bianco <apbianco@redhat.com>
2241 * tree.c (cp_tree_equal): WITH_CLEANUP_EXPR node to use its second
2242 operand while calling cp_tree_equal.
2244 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
2246 The 3.0 ABI no longer has vbase pointer fields.
2247 * cp-tree.h (VBASE_NAME, VBASE_NAME_FORMAT, VBASE_NAME_P,
2248 FORMAT_VBASE_NAME): Remove.
2249 * method.c (do_build_copy_constructor): Adjust.
2250 (do_build_assign_ref): Adjust.
2251 * search.c (lookup_field_r): Adjust.
2252 * typeck.c (build_component_ref): Adjust.
2254 The 3.0 ABI always has a vtable pointer at the start of every
2256 * rtti.c (build_headof_sub): Remove.
2257 (build_headof): Adjust.
2258 (get_tinfo_decl_dynamic): No need to check flag_rtti
2260 (create_real_tinfo_var): Explain why we need a hidden name.
2262 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
2265 * class.c (update_vtable_entry_for_fn): The fixed adjustment
2266 of a virtual thunk should be from declaring base.
2268 2001-07-31 Nathan Sidwell <nathan@codesourcery.com>
2270 * class.c (dfs_ctor_vtable_bases_queue_p): Always walk into
2271 the shared virtual base, so preserving inheritance graph order.
2273 2001-07-30 Andreas Jaeger <aj@suse.de>
2275 * decl2.c: Remove unused var global_temp_name_counter.
2277 2001-07-28 Richard Henderson <rth@redhat.com>
2279 * method.c (pending_inlines): Remove.
2281 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
2283 * class.c (mark_primary_virtual_base): Don't adjust base
2285 (dfs_unshared_virtual_bases): Adjust them here.
2286 (mark_primary_bases): Explain why we adjust at the end.
2288 2001-07-27 Nathan Sidwell <nathan@codesourcery.com>
2290 * class.c (finish_struct_1): When copying the primary base's
2291 VFIELD, make sure we find it is at offset zero.
2293 2001-07-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2295 * pt.c (tsubst_template_parms): Call maybe_fold_nontype_arg and
2296 tsubst_expr for default template arguments.
2298 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
2301 * spew.c (yylex): Only copy the token's lineno, if it is
2304 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
2307 * call.c (resolve_args): Simplify, call
2308 convert_from_reference.
2309 (build_new_op): Resolve and convert from reference ARG1
2310 earlier. Adjust ARG2 & ARG3 resolve and conversion.
2312 2001-07-26 Nathan Sidwell <nathan@codesourcery.com>
2314 * decl.c (last_function_parm_tags): Remove.
2315 (current_function_parm_tags): Remove.
2316 (init_decl_processing): Adjust.
2317 (start_function): Adjust.
2318 (store_parm_decls): Adjust.
2321 * decl.c (grokdeclarator): Detect when a function typedef is
2322 declaring a function, and create last_function_parms correctly.
2324 2001-07-25 Jason Merrill <jason_merrill@redhat.com>
2326 * call.c (joust): Only prefer a non-builtin candidate to a builtin
2327 one if they have the same signature.
2329 * cvt.c (build_up_reference): Take DECL parm. Check TREE_STATIC on
2330 it rather than toplevel_bindings_p. Give it a mangled name if static.
2331 (convert_to_reference): Adjust.
2332 * decl2.c (get_temp_name): Lose.
2333 * mangle.c (mangle_ref_init_variable): New fn.
2334 (mangle_guard_variable): Strip the ref-init header.
2335 * cp-tree.h: Adjust.
2336 * decl.c (cp_finish_decl): Add the DECL_STMT after processing the
2338 (grok_reference_init): Always use DECL_INITIAL.
2340 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
2343 * call.c (build_conditional_expr): Recheck args after
2345 * cp-tree.h (build_conditional_expr): Move to correct file.
2346 * typeck.c (decay_conversion): Diagnose any unknown types
2348 (build_binary_op): Don't do initial decay or default
2349 conversions on overloaded functions.
2350 (build_static_cast): Don't do a decay conversion here.
2352 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
2355 * typeck.c (condition_conversion): Resolve an OFFSET_REF.
2356 * expr.c (cplus_expand_expr): An OFFSET_REF should never get here.
2358 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
2360 * class.c (build_vtbl_or_vbase_field): Remove, move into ...
2361 (create_vtbl_ptr): ... here.
2363 2001-07-25 Nathan Sidwell <nathan@codesourcery.com>
2365 * class.c (build_vbase_offset_vbtl_entries): Look for
2366 non-primary base of which we are a sub vtable.
2368 2001-07-24 Phil Edwards <pme@sources.redhat.com>
2370 * semantics.c (finish_this_expr): Remove unused code.
2372 2001-07-24 Nathan Sidwell <nathan@codesourcery.com>
2374 Simplify rtti, now we've only one ABI.
2375 * cp-tree.h (cp_tree_index): Remove CPTI_TINFO_DECL_ID,
2377 (tinfo_decl_id, tinfo_var_id): Remove.
2378 (get_typeid_1): Remove.
2380 (init_rtti_processing): Remove tinfo_decl_id & tinfo_var_id.
2381 (typeid_ok_p): New function.
2382 (build_type_id): Call typeid_ok_p. Don't call tinfo_from_decl.
2383 (get_tinfo_decl): Remove old abi documentation.
2384 (tinfo_from_decl): Remove.
2385 (get_type_id): Call typeid_ok_p. Absorb get_typeid_1.
2386 (get_typeid_1): Remove.
2387 (get_base_offset): Remove.
2388 (synthesize_tinfo_var): Absorb get_base_offset.
2389 (create_real_tinfo_var): Don't use tinfo_decl_id.
2391 2001-07-23 Graham Stott <grahams@redhat.com>
2393 * cp/class.c (type_requires_array_cookie): Fix use of uninitialised
2394 variable has_two_argument_delete_p.
2396 2001-07-21 Nathan Sidwell <nathan@codesourcery.com>
2398 Remove flag_vtable_thunk. It is always on for the 3.0 ABI.
2399 * cp-tree.h (CPTI_DELTA2_IDENTIFIER): Remove.
2400 (CPTI_INDEX_IDENTIFIER): Remove.
2401 (CPT_PFN_OR_DELTA2_IDENTIFIER): Remove.
2402 (delta2_identifier): Remove.
2403 (index_identifier): Remove.
2404 (pfn_or_delta2_identifier): Remove.
2405 (flag_vtable_thunks): Remove.
2406 (VTABLE_DELTA2_NAME): Remove.
2407 (VTABLE_INDEX_NAME): Remove.
2408 (FNADDR_FROM_VTABLE_ENTRY): Adjust.
2409 (vfunc_ptr_type_node): Adjust.
2410 (VTABLE_NAME_PREFIX): Adjust.
2411 (build_vfn_ref): Lose first parameter.
2412 (fixup_all_virtual_upcast_offsets): Remove.
2413 * decl.c (initialize_predefined_identifiers): Remove
2414 delta2_identifier, index_identifier, pfn_or_delta2_identifier.
2415 (init_decl_processing): Remove no-vtable-thunk code.
2416 * decl2.c (flag_vtable_thunks): Remove.
2417 (mark_vtable_entries): Remove no-vtable-thunk code.
2418 * error.c (dump_decl): Remove no-vtable-thunk code.
2419 (dump_expr): Adjust ptr to member function code.
2420 * init.c (initialize_vtable_ptrs): Remove no-vtable-thunk
2422 * rtti.c (build_headof): Remove no-vtable-thunk code.
2423 (get_tinfo_decl_dynamic): Adjust build_vfn_ref call.
2424 * search.c (get_base_distance): Remove expand_upcast_fixups case.
2425 (virtual_context) Remove.
2426 (expand_upcast_fixups): Remove.
2427 (fixup_virtual_upcast_offsets): Remove.
2428 (fixup_all_virtual_upcast_offsets): Remove.
2429 * typeck.c (get_member_function_from_ptrfunc): Remove
2430 no-vtable-thunk code.
2431 * call.c (build_over_call): Adjust call to build_vfn_ref.
2432 * class.c (build_vfn_ref): Lose first parameter. Remove
2433 no-vtable-thunk code.
2434 (build_rtti_vtbl_entries): Remove no-vtable-thunk code.
2435 (build_vtable_entry): Remove no-vtable-thunk code.
2437 2001-07-20 Nathan Sidwell <nathan@codesourcery.com>
2439 Remove old-abi remnants. Remove comments about old abi
2440 behaviour. Remove references to 'new-abi' in comments.
2441 * cp-tree.h: Adjust comments.
2442 (vbase_offsets_in_vtable_p): Delete.
2443 (vcall_offsets_in_vtable_p): Delete.
2444 (vptrs_present_everywhere_p): Delete.
2445 (all_overridden_vfuns_in_vtables_p): Delete.
2446 (merge_primary_and_secondary_vtables_p): Delete.
2447 (TYPE_CONTAINS_VPTR_P): Adjust.
2448 (VTT_NAME_PREFIX): Remove.
2449 (CTOR_VTBL_NAME_PREFIX): Remove.
2450 (init_vbase_pointers): Remove.
2451 * class.c: Adjust coments.
2452 (build_vbase_pointer_fields): Delete.
2453 (build_vbase_pointer): Remove old-abi code.
2454 (build_secondary_vtable): Likewise.
2455 (modify_all_vtables): Likewise.
2456 (create_vtable_ptr): Likewise.
2457 (layout_class_type): Likewise.
2458 (finish_struct_1): Likewise.
2459 (finish_vtbls): Likewise.
2460 (dfs_finish_vtbls): Delete.
2461 (build_vbase_offset_vtbl_entries): Remove old-abi code.
2462 * cvt.c: Adjust comments.
2463 * decl.c: Adjust comments.
2464 * decl2.c: Adjust comments.
2465 * init.c: Adjust comments.
2466 (construct_virtual_bases): Remove old-abi code.
2467 * lang-specs.h: Remove -fno-new-abi.
2468 * mangle.c: Adjust comments.
2469 * rtti.c: Adjust comments.
2470 (get_base_offset): Remove old-abi-code.
2471 * search.c: Adjust comments.
2472 (dfs_init_vbase_pointers): Remove.
2473 (dfs_vtable_path_unmark): Remove.
2474 (init_vbase_pointers): Remove.
2475 * semantics.c: Adjust comments.
2476 (emit_associated_thunks): Remove old-abi code.
2477 * typeck.c: Adjust comments.
2479 2001-07-20 Daniel Berlin <dan@cgsoftware.com>
2481 * Make-lang.in (cp/optimize.o): Depend on $(PARAMS_H), not
2484 2001-07-19 Mark Mitchell <mark@codesourcery.com>
2486 * class.c (finish_struct_anon): Forbid nested classes.
2488 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
2490 * decl2.c: Don't include dwarfout.h and dwarf2out.h.
2491 * optimize.c: Include debug.h.
2492 (maybe_clone_body): Use debug hook.
2493 * semantics.c: Include debug.h.
2494 (expand_body): Use debug hook.
2496 2001-07-19 Neil Booth <neil@daikokuya.demon.co.uk>
2498 * spew.c (read_token, yyerror): Remove CPP_INT, CPP_FLOAT cases.
2500 2001-07-18 Mark Mitchell <mark@codesourcery.com>
2502 * class.c (type_requires_array_cookie): New function.
2503 (check_methods): Don't try to figure out whether the type needs a
2505 (check_bases_and_members): Set TYPE_VEC_NEW_USES_COOKIE here.
2506 * cp-tree.h (TYPE_VEC_DELETE_TAKES_SIZE): Remove.
2507 (TYPE_VEC_NEW_USES_COOKIE): Reimplement.
2508 * pt.c (instantiate_class_template): Don't set
2509 TYPE_VEC_DELETE_TAKES_SIZE.
2510 * NEWS: Document ABI changes from GCC 3.0.
2512 2001-07-18 Xavier Delacour <xavier@fmaudio.net>,
2513 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
2515 * NEWS (Changes in GCC 3.0): Fix typo.
2517 2001-07-13 Joseph S. Myers <jsm28@cam.ac.uk>
2519 * decl2.c (cplus_decl_attributes): Take a pointer to the node to
2520 which attributes are to be attached, and a flags argument. Update
2521 call to decl_attributes.
2522 (grokfield): Update call to decl_attributes.
2523 * class.c (finish_struct): Update call to cplus_decl_attributes.
2524 * cp-tree.h (cplus_decl_attributes): Update prototype.
2525 * decl.c (start_decl, grokdeclarator, start_function): Update
2526 calls to decl_attributes and cplus_decl_attributes.
2527 * friend.c (do_friend): Update call to cplus_decl_attributes.
2528 * parse.y (parse_bitfield): Update call to cplus_decl_attributes.
2530 2001-07-12 Mark Mitchell <mark@codesourcery.com>
2532 * decl.c (make_rtl_for_nonlocal_decl): Set DECL_C_HARD_REGISTER
2533 for `register' variables with an asm-specification.
2535 2001-07-11 Mark Mitchell <mark@codesourcery.com>
2537 * semantics.c (finish_asm_stmt): Mark the output operands
2538 to an asm addressable, if necessary.
2540 2001-07-11 Ben Elliston <bje@redhat.com>
2542 * Revert this change -- there is a subtle bug.
2545 * decl.c (finish_enum): New "attributes" argument; pass it to
2546 cplus_decl_attributes. Use a narrower type if the enum is packed.
2547 * cp-tree.h (finish_enum): Adjust prototype.
2548 * parse.y (enum_head): New non-terminal.
2549 (structsp): Use it. Enums now may be preceded or followed by
2550 optional attributes -- pass their chained tree to finish_enum().
2551 * pt.c (tsubst_enum): Pass NULL_TREE for the new argument.
2553 2001-07-10 Mark Mitchell <mark@codesourcery.com>
2555 * pt.c (tsubst_decl): Set DECL_CONTEXT for namespace-scope
2558 2001-07-10 Jason Merrill <jason_merrill@redhat.com>
2560 * semantics.c (cp_expand_stmt): Fix for null
2561 current_function_return_value.
2563 2001-07-10 Jan van Male <jan.vanmale@fenk.wau.nl>
2565 * call.c (build_op_delete_call): Initialize fn.
2566 (convert_like_real): Delete conditional.
2567 (joust): Initialize *w and *l.
2568 * class.c: Add prototype for binfo_ctor_vtable.
2569 (get_primary_binfo): Initialize result.
2570 * init.c (build_java_class_ref): Initialize name.
2572 2001-07-09 Erik Rozendaal <dlr@acm.org>
2574 * typeck.c (unary_complex_lvalue): Do not duplicate the
2575 argument to modify, pre-, or post-increment when used as an
2576 lvalue and when the argument has side-effects.
2578 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
2580 * decl.c (start_decl): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2581 (start_function): Don't call SET_DEFAULT_DECL_ATTRIBUTES. Call
2582 cplus_decl_attributes even if attrs is NULL.
2583 * friend.c (do_friend): Don't call SET_DEFAULT_DECL_ATTRIBUTES.
2585 2001-07-08 Joseph S. Myers <jsm28@cam.ac.uk>
2587 * decl.c (grokdeclarator), decl2.c (cplus_decl_attributes): Update
2588 calls to decl_attributes.
2590 2001-07-06 Ira Ruben <ira@apple.com>
2592 * cp-tree.def (TEMPLATE_DECL): Update comment. DECL_RESULT should
2593 be DECL_TEMPLATE_RESULT.
2595 2001-07-05 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2597 * cp-tree.h (copy_template_template_parm): Rename to ...
2598 (bind_template_template_parm): ... here.
2599 * tree.c (copy_template_template_parm): Rename to ...
2600 (bind_template_template_parm): ... here. Remove the case when
2601 NEWARGS is NULL_TREE.
2602 (copy_tree_r): Don't copy TEMPLATE_TEMPLATE_PARM and
2603 BOUND_TEMPLATE_TEMPLATE_PARM.
2604 * pt.c (lookup_template_class): Adjust.
2606 2001-07-05 Jason Merrill <jason_merrill@redhat.com>
2608 * cvt.c (convert_lvalue): New fn.
2609 * cp-tree.h: Declare it.
2610 * method.c (do_build_assign_ref): Use it.
2611 (do_build_copy_constructor): Convert parm to base types
2612 before calling base constructors.
2614 * typeck.c (check_return_expr): Check DECL_ALIGN instead of
2615 DECL_USER_ALIGN. Check flag_elide_constructors instead of
2617 * semantics.c (cp_expand_stmt): Don't destroy the named return value.
2619 2001-07-02 Nathan Sidwell <nathan@codesourcery.com>
2621 * optimize.c (optimize_inline_calls): New function, broken out
2623 (optimize_function): ... here. Call it. Don't inline if it is
2625 (dump_function): Print name of dump flag causing this dump.
2626 * semantics.c (expand_body): Move thunk inline check to
2629 2001-06-29 Joseph S. Myers <jsm28@cam.ac.uk>
2631 * typeck.c (COMP_TYPE_ATTRIBUTES): Don't define.
2632 (comptypes): Use target.comp_type_attributes.
2634 2001-06-29 Nathan Sidwell <nathan@codesourcery.com>
2636 * cp-tree.h (flag_dump_class_layout): Remove unneeded declaration.
2638 2001-06-28 Gabriel Dos Reis <gdr@merlin.codesourcery.com>
2640 * error.c (lang_print_error_function): Add a `diagnostic_context *'
2643 2001-06-27 Neil Booth <neil@cat.daikokuya.demon.co.uk>
2645 * decl2.c (import_export_class): Update.
2647 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
2649 * error.c (init_error): Adjust settings.
2651 2001-06-26 Gabriel Dos Reis <gdr@codesourcery.com>
2653 * error.c (init_error): Adjust settings.
2655 2001-06-19 Richard Sandiford <rsandifo@redhat.com>
2657 * except.c (initialize_handler_parm): Expect __cxa_begin_catch to
2658 return pointers to data members by reference rather than by value.
2660 2001-06-18 Jason Merrill <jason_merrill@redhat.com>
2662 Implement the Named Return Value optimization.
2663 * cp-tree.h (struct cp_language_function): Add x_return_value.
2664 (current_function_return_value): Now a macro.
2665 * decl.c: Don't define it.
2666 (define_label, finish_case_label): Don't clear it.
2667 (init_decl_processing): Don't register it with GC.
2668 * semantics.c (genrtl_finish_function): Don't check it for
2669 no_return_label. Copy the RTL from the return value to
2670 current_function_return_value and walk, calling...
2671 (nullify_returns_r): ...this new fn.
2672 * typeck.c (check_return_expr): Set current_function_return_value.
2674 2001-06-15 Jason Merrill <jason_merrill@redhat.com>
2676 * class.c (dfs_accumulate_vtbl_inits): Just point to the base we're
2677 sharing a ctor vtable with. Merge code for cases 1 and 2.
2678 (binfo_ctor_vtable): New fn.
2679 (build_vtt_inits, dfs_build_secondary_vptr_vtt_inits): Use it.
2681 2001-06-14 Jason Merrill <jason_merrill@redhat.com>
2683 * class.c (dfs_find_final_overrider): Fix logic.
2685 * class.c (update_vtable_entry_for_fn): Uncomment optimization to use
2686 virtual thunk instead of non-virtual.
2687 (get_matching_virtual): Uncomment.
2689 * pt.c (unify): Don't recurse between the POINTER_TYPE and the
2690 OFFSET_TYPE. If we're adding cv-quals, the extra ones would be on
2693 2001-06-14 Nathan Sidwell <nathan@codesourcery.com>
2695 * class.c (dfs_accumulate_vtbl_inits): For case 2 & 3, make sure
2696 we've not emerged from the hierarchy of RTTI_BINFO on reaching
2699 2001-06-13 Mark Mitchell <mark@codesourcery.com>
2701 * NEWS: Update release number.
2703 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
2705 PR c++/3130, c++/3131, c++/3132
2706 * cp-tree.h (BINFO_UNSHARED_MARKED): New #define.
2707 * class.c (force_canonical_binfo_r): Move
2708 BINFO_UNSHARED_MARKED, BINFO_LOST_PRIMARY_P. Don't move
2709 virtual bases unless they're primary and what they're primary
2711 (dfs_unshared_virtual_bases): Use BINFO_UNSHARED_MARKED. Cope
2712 with morally virtual bases. Duplicate BINFO_LOST_PRIMARY_P and
2713 BINFO_PRIMARY_BASE_OF. Clear BINFO_VTABLE for all but the most
2715 (mark_primary_bases): Use BINFO_UNSHARED_MARKED.
2716 (layout_nonempty_base_or_field): Add most derived type
2718 (layout_empty_base): Likewise.
2719 (build_base_field): Likewise.
2720 (build_base_fields): Likewise.
2721 (propagate_binfo_offsets): Add most derived type
2722 parameter. Skip non canonical virtual bases too.
2723 (dfs_set_offset_for_unshared_vbases): Don't skip primary
2724 bases. Do skip canonical bases.
2725 (layout_virtual_bases): Adjust.
2726 (layout_class_type): Adjust.
2727 (dfs_get_primary_binfo): Build list of virtual primary base
2729 (get_primary_binfo): Check that the shared virtual primary
2730 base candidate was found first.
2731 (accumulate_vtbl_inits): Don't do anything for non-vptr
2732 containing binfos. For case 1 primary virtual bases, keep
2733 checking that we've not emerged from the hierarchy of RTTI_BINFO.
2735 2001-06-12 Nathan Sidwell <nathan@codesourcery.com>
2738 * class.c (dfs_accumulate_vtbl_inits): Always walk down the
2739 hierarchy looking for primary bases for a ctor
2740 vtable. Recursively call oneself, if we meet our primary via
2741 this route and haven't met it yet via inheritance graph order.
2743 2001-06-11 Mark Mitchell <mark@codesourcery.com>
2745 * lang-options.h: Emit documentation for -fno-honor-std, not
2748 2001-06-10 Alexandre Oliva <aoliva@redhat.com>
2750 * typeck.c (get_member_function_from_ptrfunc) [vbit_in_delta]:
2751 Don't clobber delta.
2752 (expand_ptrmemfunc_cst) [ptrmemfunc_vbit_in_delta]: Adjust pfn.
2754 2001-06-10 Mark Mitchell <mark@codesourcery.com>
2755 Gabriel Dos Reis <gdr@codesourcery.com>
2757 * Make-lang.in (cp/call.o): Depend on diagnostic.h
2758 (cp/typeck.o): Depend on diagnostic.h
2759 (cp/typeck2.o): Depend on diagnostic.h
2760 (cp/repo.o): Depend on dignostic.h
2761 * typeck.c: #include diagnostic.h
2762 (convert_for_initialization): Remove extern declaration for
2763 warningcount and errorcount.
2765 * call.c: #include diagnostic.h
2766 (convert_like_real): Remove extern declaration for warnincount and
2769 * repo.c: #include diagnostic.h
2770 * typeck2.c: #include diagnostic.h
2772 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
2774 * decl.c (duplicate_decls): Fix DECL_TEMPLATE_RESULT thinko
2777 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
2780 * friend.c (do_friend): Use push_decl_namespace for classes at
2783 2001-06-08 Nathan Sidwell <nathan@codesourcery.com>
2784 Jason Merrill <jason_merrill@redhat.com>
2787 * class.c (build_secondary_vtable): Use assert, rather than an error
2789 (dfs_fixup_binfo_vtbls): BINFO_VTABLE might be NULL.
2790 (dfs_accumulate_vtbl_inits): A lost primary virtual base may
2791 be between ORIG_BINFO and RTTI_BINFO, but neither of them.
2792 Don't set BINFO_VTABLE for a primary virtual base.
2794 2001-06-07 Mark Mitchell <mark@codesourcery.com>
2796 * decl.c (duplicate_decls): Update source position information
2797 when a template function is defined.
2799 2001-06-07 Phil Edwards <pme@sources.redhat.com>
2801 * lang-specs.h: Move -D_GNU_SOURCE to config/linux.h.
2803 2001-06-07 Nathan Sidwell <nathan@codesourcery.com>
2806 * decl.c (pushtag): Don't push into a complete type's scope.
2808 2001-06-06 Jason Merrill <jason_merrill@redhat.com>
2810 * cp-tree.h (THUNK_GENERATE_WITH_VTABLE_P): Lose.
2811 (struct lang_decl_flags): Lose generate_with_vtable_p.
2812 (BV_GENERATE_THUNK_WITH_VTABLE_P): Lose.
2813 * class.c (copy_virtuals): Adjust.
2814 * decl2.c (mark_vtable_entries): Adjust.
2815 * method.c (make_thunk, build_vtable_entry): Adjust.
2816 * class.c (update_vtable_entry_for_fn): Only look as far as the
2817 first defining class.
2818 (build_vtbl_initializer): Put nothing in the slot for a function only
2819 defined in a lost primary virtual base.
2820 (add_vcall_offset_vtbl_entries_1): Use the same code for
2821 the lost primary case and the normal case.
2822 (dfs_unshared_virtual_bases): Don't lose a non-virtual primary base.
2823 (get_vfield_offset, get_derived_offset): Lose.
2824 (dfs_find_final_overrider): Use look_for_overrides_here.
2825 (get_matching_virtual): New fn.
2826 * semantics.c (emit_associated_thunks): Check BV_USE_VCALL_INDEX_P,
2828 * search.c (look_for_overrides_here): Split out from...
2829 (look_for_overrides_r): Here.
2831 * class.c (find_final_overrider): Return error_mark_node on error.
2833 * decl2.c (key_method): #if 0 accidental change.
2835 2001-06-06 John David Anglin <dave@hiauly1.hia.nrc.ca>
2837 * call.c (convert_default_arg): Use INTEGRAL_TYPE_P.
2838 (build_over_call): Likewise.
2839 * decl.c (grokparms): Likewise.
2840 * pt.c (tsubst_decl): Likewise.
2841 * typeck.c (convert_arguments): Likewise.
2843 2001-06-05 Mark Mitchell <mark@codesourcery.com>
2845 * semantics.c (begin_class_definition): Robustify.
2847 * pt.c (instantiate_decl): Tell the repository code about the
2848 clones, not the cloned functions.
2849 * repo.c (repo_template_used): Explicitly instantiate the cloned
2850 function, not the clones.
2852 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
2854 * call.c (build_user_type_conversion_1): Set ICS_USER_FLAG and
2855 ICS_BAD_FLAG on created conversion.
2856 (compare_ics): Break out rank.
2858 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
2860 * decl.c (xref_tag): Remove extraneous %s on dependent name
2863 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
2865 * class.c (layout_vtable_decl): Fix off by one error on
2867 (build_vtt): Likewise.
2868 (build_ctor_vtbl_group): Likewise.
2870 2001-06-05 Nathan Sidwell <nathan@codesourcery.com>
2872 * class.c (maybe_indent_hierarchy): New function.
2873 (dump_class_hierarchy_r): Add flags. Dump extra binfo
2874 information, if enabled. Use maybe_indent_hierarchy. Adjust
2876 (dump_class_hierarchy): Adjust prototype. Adjust output format.
2877 (dump_array, dump_vtable, dump_vtt): New functions.
2878 (finish_struct_1): Adjust hierarchy dumping.
2879 (initialize_vtable): Call dump_vtable.
2880 (build_vtt): Call dump_vtt.
2881 (build_ctor_vtbl_group): Call dump_vtable.
2882 * decl2.c (flag_dump_class_layout): Remove.
2883 (cxx_decode_option): Remove dump translation unit
2884 and dump class hierarchy check. Call dump_switch_p.
2885 (finish_file): Adjust dumping.
2886 (dump.c): Only dump base classes if not TDF_SLIM.
2887 Only dump namespace members if not TDF_SLIM.
2888 * optimize.c (dump_function): New function.
2889 (optimize_function): Call dump_function.
2890 * semantics.c (expand_body): Use dump_enabled_p.
2892 2001-06-01 Nathan Sidwell <nathan@codesourcery.com>
2895 Part missed from first commit
2896 * decl2.c (finish_anon_union): Copy context.
2898 2001-05-30 Nathan Sidwell <nathan@codesourcery.com>
2901 * optimize.c (remap_decl): Remap anonymous aggregate members too.
2903 2001-05-26 Nathan Sidwell <nathan@codesourcery.com>
2906 * semantics.c (expand_body): Don't optimize thunks.
2908 2001-05-25 Sam TH <sam@uchicago.edu>
2910 * cp-tree.h lex.h: Fix header include guards.
2912 2001-05-25 Mark Mitchell <mark@codesourcery.com>
2914 * decl.c (init_decl_processing): Tweak.
2916 2001-05-24 Mark Mitchell <mark@codesourcery.com>
2918 * decl.c (duplicate_decls): Tidy.
2919 (init_decl_processing): Always set flag_no_builtin.
2921 2001-05-24 Nathan Sidwell <nathan@codesourcery.com>
2924 * decl2.c (do_local_using_decl): Push the decls, even in a
2927 2001-05-22 Mark Mitchell <mark@codesourcery.com>
2929 * optimize.c (initialize_inlined_parameters): Don't set
2930 TREE_READONLY for a VAR_DECL taking the place of an inlined
2933 2001-05-22 Jason Merrill <jason_merrill@redhat.com>
2935 * class.c, cp-tree.h, rtti.c: Remove com_interface attribute support.
2936 * tree.c (cp_valid_lang_attribute): Warn about use of com_interface
2939 2001-05-22 Joseph S. Myers <jsm28@cam.ac.uk>
2941 * parse.y: Refer to compound literals as such, not as
2942 constructor-expressions.
2944 2001-05-21 Mark Mitchell <mark@codesourcery.com>
2946 * call.c (build_op_delete_call): Ignore exception-specifications
2947 when looking for matching delete operators.
2948 * init.c (build_new_1): Compute whether or not the allocation
2949 function used is a placement allocation function or not, and
2950 communicate this information to build_op_delete_call.
2952 2001-05-21 Jason Merrill <jason_merrill@redhat.com>
2954 * class.c (build_vtable_entry_ref): Lose vtbl parm. Fix for new abi.
2955 (build_vtbl_ref): Adjust.
2956 (dfs_accumulate_vtbl_inits): Set TREE_CONSTANT on the vtable address.
2957 * decl2.c (lang_f_options): Remove huge-objects, vtable-thunks.
2959 (unsupported_options): Correspondingly.
2961 * decl2.c (maybe_make_one_only): Check flag_weak, not
2962 supports_one_only().
2964 * cp-tree.def (START_CATCH_STMT): Lose.
2965 * dump.c (cp_dump_tree): Don't dump it. Do dump HANDLER_PARMS.
2966 * tree.c (cp_statement_code_p): Don't case it.
2967 * semantics.c (cp_expand_stmt): Likewise.
2968 * cp-tree.h (START_CATCH_TYPE): Lose.
2969 (HANDLER_TYPE): New.
2970 * except.c (expand_start_catch_block): Don't start any blocks.
2972 (expand_end_catch_block): Don't end any blocks.
2973 * parse.y (handler): Don't pass anything from finish_handler_parms
2975 * pt.c (tsubst_expr): Likewise.
2976 * semantics.c (begin_handler): Call note_level_for_catch here.
2977 (finish_handler_parms): Don't return anything.
2978 (genrtl_catch_block, begin_catch_block): Lose.
2979 (genrtl_handler): Call expand_start_catch here.
2981 2001-05-18 Jason Merrill <jason_merrill@redhat.com>
2983 * class.c (build_vtable): Set DECL_ASSEMBLER_NAME for vtables here.
2984 (get_vtable_decl, build_vtt): Not here.
2986 2001-05-20 Nathan Sidwell <nathan@codesourcery.com>
2989 * optimize.c (update_cloned_parm): Copy addressability and other
2992 2001-05-20 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
2994 * pt.c (determine_specialization): Ignore artificial functions.
2996 2001-05-20 Neil Booth <neil@daikokuya.demon.co.uk>
2998 * cp-tree.h (struct lang_identifier, C_RID_YYCODE): Update.
2999 (C_RID_CODE): Remove.
3000 * lex.c (cxx_init_options): Call set_identifier_size. Update.
3001 (init_parse): Don't do it here.
3003 2001-05-18 Diego Novillo <dnovillo@redhat.com>
3005 * decl2.c (finish_objects): Use the original SYMBOL_REF from the
3006 function declaration to avoid stripping the symbol's attributes.
3008 2001-05-18 Nathan Sidwell <nathan@codesourcery.com>
3010 * decl.c (pushdecl): Adjust error string.
3011 (xref_tag): Adjust friend class injection warning. Remove the
3012 inherited name from the class shadowed scope.
3014 2001-05-17 Mark Mitchell <mark@codesourcery.com>
3016 * except.c (cp_protect_cleanup_actions): New function.
3017 (init_exception_processing): Don't set protect_cleanup_actions
3018 here. Do set lang_protect_cleanup_actions.
3020 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
3022 * spew.c (read_token): Call yyerror on all unexpected tokens.
3024 2001-05-16 Nathan Sidwell <nathan@codesourcery.com>
3026 * init.c (member_init_ok_or_else): Take a tree rather than
3028 (expand_member_init): Adjust.
3030 2001-05-14 Nick Clifton <nickc@cambridge.redhat.com>
3032 * decl.c (duplicate_decls): Suppress warning about duplicate
3033 decls if the first decl is a friend.
3035 2001-05-12 Zack Weinberg <zackw@stanford.edu>
3037 * except.c (choose_personality_routine): Export. Add
3038 explanatory comment. Take an enum languages, not a boolean.
3039 (initialize_handler_parm): Adjust to match.
3040 * cp-tree.h: Prototype choose_personality_routine.
3041 * lex.c (handle_pragma_java_exceptions): New function.
3042 (init_cp_pragma): Register #pragma GCC java_exceptions.
3044 2001-05-12 Neil Booth <neil@cat.daikokuya.demon.co.uk>
3046 * method.c (build_mangled_C99_name): Remove unused prototype.
3048 2001-05-12 Alexandre Oliva <aoliva@redhat.com>
3050 * cp-tree.h (ptrmemfunc_vbit_where_t): Declare type.
3051 * typeck.c (get_member_function_from_ptrfunc,
3052 build_ptrmemfunc, expand_ptrmemfunc_cst): Take
3053 TARGET_PTRMEMFUNC_VBIT_LOCATION into account.
3055 Reverted Geoff Keating's 2001-05-03's patch.
3057 2001-05-11 Ira Ruben <ira@apple.com>
3059 * cp/cp-tree.h (C_EXP_ORIGINAL_CODE): Delete; declared in c-common.h.
3061 2001-05-11 Neil Booth <neil@daikokuya.demon.co.uk>
3063 * cp-tree.h (finish_label_expr, lookup_label): Delete.
3064 * parse.y: Update for '&&'; don't issue warning here.
3065 * semantics.c (finish_label_expr): Delete.
3067 2001-05-07 Mark Mitchell <mark@codesourcery.com>
3069 * splay-tree.h (splay_tree_max): New function.
3070 (splay_tree_min): Likewise.
3072 2001-05-03 Geoffrey Keating <geoffk@redhat.com>
3074 * cp-tree.h (enum cp_tree_index): Add CPTI_PFN_VFLAG_IDENTIFIER.
3075 (pfn_vflag_identifier): Define.
3076 Update comment about layout of pointer functions.
3077 (build_ptrmemfunc1): Update prototype.
3078 (expand_ptrmemfunc_cst): Update prototype.
3079 * decl.c (initialize_predefined_identifiers): Initialize
3080 pfn_vflag_identifier.
3081 (build_ptrmemfunc_type): When FUNCTION_BOUNDARY < 16, add
3082 an extra field to the type.
3083 * expr.c (cplus_expand_constant): Pass 'flag' between
3084 expand_ptrmemfunc_cst and build_ptrmemfunc1.
3085 * typeck.c (get_member_function_from_ptrfunc): When
3086 FUNCTION_BOUNDARY < 16, look at additional field to determine
3087 if a pointer-to-member is a real pointer or a vtable offset.
3088 (build_ptrmemfunc1): Add new parameter to contain extra field.
3089 (build_ptrmemfunc): Pass the extra field around.
3090 (expand_ptrmemfunc_cst): Add new parameter to return extra field.
3091 (pfn_from_ptrmemfunc): Ignore the extra field.
3093 2001-05-03 Mark Mitchell <mark@codesourcery.com>
3095 * cp-tree.h (flag_inline_trees): Update documentation.
3096 * decl.c (init_decl_processing): Adjust handling of
3097 flag_inline_functions and flag_inline_trees to support -O3.
3098 (grokfndecl): Set DECL_INLINE on all functions if that's what
3100 (save_function_data): Clear DECL_INLINE in
3101 current_function_cannot_inline is non-NULL.
3102 * decl2.c (flag_inline_trees): Update documentation.
3104 2001-05-03 Nathan Sidwell <nathan@codesourcery.com>
3106 * dump.c (cp_dump_tree, USING_STMT case): New case.
3107 * tree.c (cp_statement_code_p): Add USING_STMT.
3108 * decl2.c (do_using_directive): Add the using directive statement.
3110 * tree.c (walk_tree): Reformat an if block.
3112 2001-05-02 Mark Mitchell <mark@codesourcery.com>
3114 * decl.c (compute_array_index_type): Don't try to do anything with
3115 the indices when processing a template.
3117 2001-05-02 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3119 * call.c: NULL_PTR -> NULL.
3120 * class.c: Likewise.
3123 * decl2.c: Likewise.
3124 * except.c: Likewise.
3127 * search.c: Likewise.
3129 * typeck.c: Likewise.
3130 * typeck2.c: Likewise.
3132 2001-05-02 Mark Mitchell <mark@codesourcery.com>
3134 * decl2.c (do_using_directive): Revert previous patch.
3136 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
3138 * cp-tree.def (USING_STMT): New statement node.
3139 * cp-tree.h (USING_STMT_NAMESPACE): New macro.
3140 * decl2.c (do_using_directive): Add USING_STMT to statement
3141 tree. Don't emit errors when processing template decl.
3142 * pt.c (tsubst_expr, USING_STMT case): New case.
3143 * semantics.c (cp_expand_stmt, USING_STMT case): New case.
3145 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
3147 * call.c (build_new_op): Convert args from reference here.
3148 (build_conditional_expr): Don't convert here.
3150 2001-05-01 Nathan Sidwell <nathan@codesourcery.com>
3152 * spew.c (last_token_id): New static variable.
3153 (read_token): Set it here.
3154 (yyerror): Use it here.
3156 2001-04-30 Richard Henderson <rth@redhat.com>
3158 * cvt.c: Downcase C_PROMOTING_INTEGER_TYPE_P invocations.
3161 2001-04-30 Mark Mitchell <mark@codesourcery.com>
3163 * gxxint.texi: Remove.
3164 * Make-lang.in: Remove all traces of gxxint.texi.
3166 Mon Apr 30 16:14:10 2001 Mark P Mitchell <mark@codesourcery.com>
3168 * decl2.c (start_static_initialization_or_destruction): Correct
3169 logic to handle the -fno-use-cxa-atexit case.
3171 2001-04-30 Mark Mitchell <mark@codesourcery.com>
3173 * optimize.c (update_cloned_parm): New function.
3174 (maybe_clone_body): Use it. Update the `this' parameter too.
3176 2001-04-29 Joseph S. Myers <jsm28@cam.ac.uk>
3178 * decl2.c (unsupported_options): Add new-abi.
3179 * lang-options.h: Remove no longer supported options.
3181 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
3183 * except.c (can_convert_eh): Don't check template parms,
3186 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
3188 * optimize.c (maybe_clone_body): Copy parameter names and locations.
3190 2001-04-27 Nathan Sidwell <nathan@codesourcery.com>
3192 * cp-tree.h (adjust_clone_args): Prototype new function.
3193 * class.c (adjust_clone_args): New function.
3194 * decl.c (start_function): Call it for in charge ctors.
3196 2001-04-26 Mark Mitchell <mark@codesourcery.com>
3198 * method.c (use_thunk): Make sure that thunks really are emitted
3201 2001-04-26 Nathan Sidwell <nathan@codesourcery.com>
3203 * mangle.c (write_chars): New macro.
3204 (hwint_to_ascii): New function
3205 (write_number): Use it.
3206 (write_integer_cst): Deal with really big numbers.
3208 2001-04-25 Mark Mitchell <mark@codesourcery.com>
3210 * optimize.c (maybe_clone_body): Copy TREE_PUBLIC before emitting
3213 2001-04-25 Nathan Sidwell <nathan@codesourcery.com>
3215 * decl.c (grokdeclarator): Set context of namespace scope
3218 2001-04-24 Zack Weinberg <zackw@stanford.edu>
3220 * cp/optimize.c: Include hashtab.h.
3221 (struct inline_data): Add tree_pruner.
3222 (expand_call_inline, expand_calls_inline): Use it when calling
3224 (optimize_function): Initialize and free tree_pruner.
3226 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
3228 Lazy __FUNCTION__ generation.
3229 * cp-tree.def (FUNCTION_NAME): Remove.
3230 * cp-tree.h (function_name_declared_p): Remove.
3231 (cp_fname_init): Prototype.
3232 * decl.c (init_decl_processing): Don't generate __FUNCTION__ et al ids,
3233 don't call declare_function_name. Call start_fname_decls.
3234 (cp_make_fname_decl): Adjust parameters. Generate the name. Don't
3235 clobber the line number.
3236 (cp_fname_init): New function.
3237 (start_function): Call start_fname_decls.
3238 (finish_function): Call finish_fname_decls.
3239 * lex.c (reswords): Add slots for __FUNCTION__ et al.
3240 (rid_to_yy): Add mappings for __FUNCTION__ et al.
3241 * optimize.c (maybe_clone_body): Remove function_name_declared_p.
3242 * parse.y (VAR_FUNC_NAME): New token.
3243 (primary): Add VAR_FUNC_NAME.
3244 * pt.c (tsubst_decl): Adjust a DECL_PRETTY_FUNCTION_P's
3246 (tsubst, FUNCTION_NAME case): Remove.
3247 (tsubst_copy, FUNCTION_NAME case): Remove.
3248 (tsubst_expr, DECL_STMT case): Be careful with a
3249 DECL_PRETTY_FUNCTION_P.
3250 (instantiate_decl): Remove function_name_declared_p.
3251 * semantics.c (begin_compound_statement): Don't call
3252 declare_function_name here.
3253 (setup_vtbl_ptr). Don't save & restore function_name_declared_p.
3254 (finish_translation_unit): Call finish_fname_decls.
3255 (expand_body): Remove function_name_declared_p.
3256 * typeck2.c (digest_init): Allow any ERROR_MARK.
3258 2001-04-24 Nathan Sidwell <nathan@codesourcery.com>
3260 * pt.c (tsubst_decl): Use VOID_TYPE_P.
3261 * semantics.c: Fix some typos.
3263 2001-04-23 Phil Edwards <pme@sources.redhat.com>
3265 * cp/decl2.c (flag_honor_std): Always initialize to 1.
3267 2001-04-22 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3269 * xref.c (GNU_xref_file): Use concat in lieu of xmalloc/sprintf.
3271 2001-04-23 Jason Merrill <jason_merrill@redhat.com>
3273 * except.c (build_throw): Wrap the initialization of the exception
3274 object in a MUST_NOT_THROW_EXPR.
3275 (do_free_exception): #if 0.
3277 2001-04-20 Mark Mitchell <mark@codesourcery.com>
3279 * cp-tree.h (finish_enum): Change prototype.
3280 * decl.c (finish_enum): Reorganize.
3281 * parse.y (structsp): Adjust calls to finish_enum.
3283 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
3285 * tree.c (cp_tree_equal): Adjust final switch formatting. Add
3288 2001-04-20 Nathan Sidwell <nathan@codesourcery.com>
3290 * class.c (dfs_unshared_virtual_bases): Add ATTRIBUTE_UNUSED.
3291 (layout_empty_base): Return at end flag.
3292 (build_base_field): Likewise.
3293 (build_base_fields): Likewise.
3294 (layout_virtual_bases): Don't add 1 to eoc value.
3295 (end_of_class): Use full size for empty bases.
3296 (layout_class_type): Clear CLASSNEARLY_EMPTY_P if we appended
3297 empty bases. Don't add 1 to eoc value. Only add trailing padding
3298 if we're an empty class with no empty bases.
3299 (dump_class_hierarchy): Dump size and alignment.
3301 2001-04-20 Jakub Jelinek <jakub@redhat.com>
3303 * call.c (maybe_handle_ref_bind): Copy ICS_USER_FLAG and
3306 2001-04-20 Jakub Jelinek <jakub@redhat.com>
3308 * search.c (lookup_field_r): If looking for type and non-TYPE_DECL
3309 is found, look first if name does not match the structure name.
3311 2001-04-19 Mark Mitchell <mark@codesourcery.com>
3313 * cp-tree.h (DECL_LANGUAGE): Don't assume DECL_LANG_SPECIFIC is
3315 (SET_DECL_LANGUAGE): New macro.
3316 * decl.c (duplicate_decls): Use SET_DECL_LANGUAGE.
3317 (pushdecl): Likewise.
3318 (build_library_fn_1): Likewise.
3319 (build_cp_library_fn): Likewise.
3320 (grokfndecl): Likewise.
3321 (grokvardecl): Mark `extern "C"' variables as having C linkage.
3322 * decl2.c (grokclassfn): Use SET_DECL_LANGUAGE.
3323 * lex.c (retrofit_lang_decl): Likewise.
3324 * mangle.c (mangle_decl_string): Don't mangle the names of
3325 variables declared with C language linkage.
3326 * semantics.c (finish_member_declaration): Use SET_DECL_LANGUAGE.
3328 2001-04-18 John David Anglin <dave@hiauly1.hia.nrc.ca>
3330 * semantics.c (simplify_aggr_init_exprs_r): Don't restore
3331 flag_access_control from uninitialized storage.
3333 2001-04-15 Mark Mitchell <mark@codesourcery.com>
3335 * cp-tree.h (TYPE_PTRMEM_CLASS_TYPE): Improve documentation.
3336 * mangle.c (write_pointer_to_member_type): Fix mangling of
3337 pointers to cv-qualified member function types.
3339 * init.c (build_delete): Create a SAVE_EXPR for the address if
3340 we're going to use it more than once.
3342 2001-04-13 Mark Mitchell <mark@codesourcery.com>
3344 * cp-tree.h (DELTA2_FROM_PTRMEMFUNC): Remove.
3345 (expand_ptremfunc_cst): Change prototype.
3346 (delta2_from_ptrmemfunc): Remove.
3347 * expr.c (cplus_expand_constant): Adjust call to
3348 expand_ptrmemfunc_cst.
3349 * typeck.c (build_ptrmemfunc1): Simplify.
3350 (build_ptrmemfunc): Make sure that casting a PTRMEM_CST still
3351 results in a constant.
3352 (expand_ptrmemfunc_cst): Remove idx and delta2 parameters.
3353 (delta2_from_ptrmemfunc): Remove.
3354 (pfn_from_ptrmemfunc): Adjust call to expand_ptrmemfunc_cst.
3356 2001-04-12 Jason Merrill <jason_merrill@redhat.com>
3358 * cp-tree.h (decl_namespace_list): New macro.
3359 (struct saved_scope): Add decl_ns_list.
3360 * decl.c (mark_saved_scope): Mark it.
3361 * decl2.c: Lose static decl_namespace_list.
3362 (init_decl2): Don't save it.
3364 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3366 * cp-tree.h (warn_return_type, yylex): Delete redundant
3369 * decl.c (current_class_depth, global_namespace): Likewise.
3371 * decl2.c (current_class_depth, flag_gnu_xref): Likewise
3373 * repo.c (flag_use_repository): Likewise.
3375 2001-04-12 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3377 * cp-tree.h (pedantic, convert, global_bindings_p, insert_block,
3378 set_block, pushdecl, getdecls, gettags, init_decl_processing,
3379 maybe_build_cleanup, copy_lang_decl, prep_stmt, lvalue_p,
3380 lvalue_or_else, print_lang_statistics, comp_target_types,
3381 unsigned_type, signed_type, signed_or_unsigned_type,
3382 build_function_call, mark_addressable, incomplete_type_error):
3383 Delete redundant declarations.
3385 2001-04-11 Jason Merrill <jason_merrill@redhat.com>
3387 * cp-tree.h (TYPE_LINKAGE_IDENTIFIER): New macro.
3388 (TYPE_ANONYMOUS_P): New macro.
3389 (TAGGED_TYPE_P): New macro.
3390 * decl.c (check_tag_decl): Use TYPE_ANONYMOUS_P.
3391 (grokfndecl, grokvardecl, grokdeclarator): Likewise.
3392 * tree.c (no_linkage_helper): Likewise.
3393 * semantics.c (begin_class_definition): Likewise.
3394 * pt.c (convert_template_argument): Likewise.
3395 * lex.c (check_for_missing_semicolon): Likewise.
3397 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
3399 * class.c (dfs_unshared_virtual_bases): New function.
3400 (mark_primary_bases): Call it.
3401 (check_bases): Ignore virtual bases when determining
3404 2001-04-12 Nathan Sidwell <nathan@codesourcery.com>
3406 * method.c (make_thunk): Clear DECL_CLONED_FUNCTION.
3408 2001-04-11 Mark Mitchell <mark@codesourcery.com>
3410 * optimize.c (maybe_clone_body): Copy DECL_NUM_STMTS from the
3411 cloned function to the clone.
3413 2001-04-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3415 * Make-lang.in (cp/semantics.o): Depend on $(EXPR_H).
3417 * semantics.c: Include expr.h.
3419 2001-04-11 Nathan Sidwell <nathan@codesourcery.com>
3421 * method.c (implicitly_declare_fn): Commonize code for copy ctor
3422 and assignment op. Set TREE_USED for parameter.
3424 2001-04-10 Mark Mitchell <mark@codesourcery.com>
3426 * class.c (find_final_overrider_data): Add `candidates'.
3427 (dfs_find_final_overrider): Don't issue error messages
3429 (find_final_overrider): Issue error messages here.
3430 (build_base_field): Don't warn about amgibuous direct bases here.
3431 (warn_about_ambiguous_direct_bases): New function.
3432 (layout_class_type): Use it.
3434 2001-04-10 Richard Henderson <rth@redhat.com>
3436 * typeck.c (build_array_ref): Push the array reference inside
3437 COMPOUND_EXPR and COND_EXPR.
3439 2001-04-05 Mark Mitchell <mark@codesourcery.com>
3441 * cp-tree.h (DECL_THIS_INLINE): Rename to DECL_DECLARED_INLINE_P.
3442 * decl.c (duplicate_decls): Adjust accordingly.
3443 (maybe_commonize_var): Likewise.
3444 (grokfndecl): Likewise.
3445 (start_function): Likewise.
3446 (start_method): Likewise.
3447 * decl2.c (key_method): Likewise.
3448 (import_export_decl): Likewise.
3449 * method.c (implicitly_declare_fn): Likewise.
3450 * optimize.c (maybe_clone_body): Likewise.
3452 2001-04-05 Benjamin Kosnik <bkoz@redhat.com>
3454 * lang-specs.h: Add __DEPRECATED.
3456 Thu Apr 5 16:54:29 2001 J"orn Rennecke <amylaar@redhat.com>
3458 * search.c (get_dynamic_cast_base_type): When building a new
3459 constant, set its type to ssizetype.
3461 2001-04-04 Jakub Jelinek <jakub@redhat.com>
3463 * optimize.c (expand_call_inline): Only add newly inlined statements
3466 2001-04-03 Mark Mitchell <mark@codesourcery.com>
3468 * cp-tree.h (OPERATOR_ASSIGN_FORMAT): Remove.
3469 (OPERATOR_FORMAT): Likewise.
3470 (OPERATOR_TYPENAME_FORMAT): Likewise.
3471 * operators.def: Remove old name-mangling information.
3472 * decl.c (grok_op_properties): Adjust accordingly.
3473 * lex.c (init_operators): Likewise.
3474 * rtti.c (get_tinfo_decl): Issue error messages about types that
3477 2001-04-03 Mark Mitchell <mark@codesourcery.com>
3479 * decl2.c (import_export_decl): Don't call import_export_class
3480 when processing an inline member function.
3481 * semantics.c (expand_body): Call import_export_decl before
3482 emitting inline functions.
3484 2001-03-28 Richard Henderson <rth@redhat.com>
3486 IA-64 ABI Exception Handling:
3487 * cp-tree.def (EH_SPEC_BLOCK): New.
3488 (MUST_NOT_THROW_EXPR): New.
3489 * cp-tree.h: Update changed function declarations.
3490 (CPTI_PUSH_EXCEPTION_IDENTIFIER): Remove.
3491 (CPTI_CALL_UNEXPECTED): New.
3492 (struct cp_language_function): Rename x_eh_spec_try_block
3494 (EH_SPEC_STMTS, EH_SPEC_RAISES): New.
3495 * decl.c (current_binding_level): If no current function
3496 bindings, revert to scope_chain.
3497 (initialize_predefined_identifiers): Remove __cp_push_exception.
3498 (store_parm_decls): Use begin_eh_spec_block.
3499 (finish_function): Use finish_eh_spec_block.
3500 (mark_lang_function): Update for name changes.
3501 * decl2.c (finish_file): No mark_all_runtime_matches.
3502 * dump.c (cp_dump_tree): Handle new tree codes.
3503 * error.c (dump_expr) [BIND_EXPR]: Fix typo.
3504 * except.c (catch_language_init, catch_language): Remove.
3505 (init_exception_processing): Don't set language code.
3506 Initialize call_unexpected_node, protect_cleanup_actions,
3507 eh_personality_libfunc, lang_eh_runtime_type.
3508 (call_eh_info, push_eh_info, get_eh_info, get_eh_value): Remove.
3509 (get_eh_type, get_eh_caught, get_eh_handlers): Remove.
3510 (prepare_eh_type): Split out type canonicalizations ...
3511 (build_eh_type_type): ... from here.
3512 (build_eh_type_type_ref): Remove.
3513 (mark_all_runtime_matches): Remove.
3514 (build_exc_ptr): New.
3515 (do_begin_catch, do_end_catch): New.
3516 (do_pop_exception): Remove.
3517 (build_terminate_handler): Remove.
3518 (choose_personality_routine): Split out language choice from ...
3519 (initialize_handler_parm): ... here.
3520 Use MUST_NOT_THROW_EXPR.
3521 (expand_start_catch_block): Use do_begin_catch. Simplify Java
3522 exception object handling.
3523 (expand_start_eh_spec, expand_end_eh_spec): Remove.
3524 (expand_exception_blocks, alloc_eh_object): Remove.
3525 (begin_eh_spec_block, finish_eh_spec_block): New.
3526 (do_allocate_exception, do_free_exception): New.
3527 (expand_throw): Merge into ...
3528 (build_throw): ... here. Update for abi.
3529 * expr.c (cplus_expand_expr): No expand_internal_throw.
3530 Handle MUST_NOT_THROW_EXPR.
3531 * pt.c (tsubst_expr): Handle EH_SPEC_BLOCK.
3532 * semantics.c (*) Update for except.h name changes.
3533 (genrtl_try_block): No protect_with_terminate.
3534 (genrtl_eh_spec_block): New.
3535 (genrtl_handler): Don't emit the goto here.
3536 (cp_expand_stmt): Handle EH_SPEC_BLOCK.
3537 (genrtl_finish_function): Don't expand_exception_blocks.
3538 * tree.c (cp_statement_code_p): Handle EH_SPEC_BLOCK.
3540 2001-03-28 Richard Henderson <rth@redhat.com>
3542 * decl.c (struct named_label_list): Rename eh_region to
3543 in_try_scope, add in_catch_scope.
3544 (struct binding_level): Rename eh_region to is_try_scope,
3546 (note_level_for_try): Rename from note_level_for_eh.
3547 (note_level_for_catch): New.
3548 (poplevel): Copy both is_try_scope and is_catch_scope to
3549 the named_label_list struct.
3550 (check_previous_goto_1): Don't check for catch block via
3551 DECL_ARTIFICIAL; use in_try_scope instead.
3552 (check_goto): Likewise.
3553 * cp-tree.h (note_level_for_try, note_level_for_catch): Declare.
3554 * except.c (expand_start_catch_block): Call note_level_for_catch.
3555 * semantics.c (begin_compound_stmt): Update for note_level_for_try.
3557 2001-03-27 Richard Henderson <rth@redhat.com>
3559 * except.c: Use USING_SJLJ_EXCEPTIONS instead of
3560 exceptions_via_longjmp.
3562 2001-03-27 Phil Edwards <pme@sources.redhat.com>
3564 * pt.c (check_default_tmpl_args): Make error messages clearer.
3566 2001-03-26 Phil Edwards <pme@sources.redhat.com>
3568 * error.c: Also undefine 'A' macro used for cp_printers definition.
3570 2001-03-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3572 * Make-lang.in: Depend on $(SYSTEM_H), not system.h.
3574 2001-03-26 Mike Yang <yang@research.att.com>
3575 Mark Mitchell <mark@codesourcery.com>
3577 * dump.c (dump_access): New function.
3578 (cp_dump_tree): Use it. Dump basetype information for class
3581 2001-03-26 Mark Mitchell <mark@codesourcery.com>
3583 * Makefile.in (optimize.o): Depend on params.h.
3584 (duplicate_decls): Copy DECL_NUM_STMTS, not DECL_FRAME_SIZE.
3585 (init_decl_processing): Set flag_no_inline when doing
3587 * optimize.c: Include params.h.
3588 (struct inline_data): Improve documentation of FNS. Add
3589 FIRST_INLINED_FN, INLINED_STMTS, and CLONING_P.
3590 (INSNS_PER_STMT): New macro.
3591 (remap_block): Use CLONING_P.
3592 (inlinable_function_p): Don't inline big functions.
3593 (expand_call_inline): Keep track of how much inlining we've done.
3594 (optimize_function): Set FIRST_INLINED_FN.
3595 (maybe_clone_body): Set CLONING_P.
3596 * semantics.c (simplify_aggr_init_exprs_r): Fix typing problems in
3598 (genrtl_finish_function): Clear DECL_DEFER_OUTPUT before calling
3599 rest_of_compilation. Clear DECL_RTL for local variables
3601 (clear_decl_rtl): New function.
3603 2001-03-26 Nathan Sidwell <nathan@codesourcery.com>
3606 * cp-tree.h (skip_type_access_control,
3607 reset_type_access_control): Prototype.
3608 * decl.c (grokdeclarator): Access of friends is not checked.
3609 * parse.y (component_decl_list): Reset type access control.
3610 * semantics.c (decl_type_access_control): Clear
3611 current_type_lookups.
3612 (save_type_access_control): Don't save if not deferring.
3613 (skip_type_access_control, reset_type_access_control): New
3615 (begin_class_definition): Do type access control for basetypes.
3616 Start deferred access control.
3617 (finish_class_definition): Resume immediate access control if
3618 this is a local class.
3620 2001-03-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3622 * class.c (add_method): Use memcpy/memmove, not bcopy.
3624 * decl.c (duplicate_decls): Likewise.
3626 2001-03-23 Jakub Jelinek <jakub@redhat.com>
3628 * mangle.c (write_discriminator): Use `_0' for discriminator 1,
3631 2001-03-23 Jakub Jelinek <jakub@redhat.com>
3633 * decl.c (local_names): Define.
3634 (push_local_name): New.
3635 (grok_reference_init): Return init if initializing static reference
3636 variable with non-constant instead of emitting it.
3637 Move expand_static_init call to cp_finish_decl.
3638 (layout_var_decl): Call push_local_name.
3639 (maybe_commonize_var): Allow inlining functions even if they have
3640 static local variables, use comdat_linkage for them if flag_weak.
3641 (check_initializer): Call obscure_complex_init if
3642 grok_reference_init returned non-zero.
3643 (save_function_data): Clear x_local_names.
3644 (pop_cp_function_context): Free x_local_names.
3645 (mark_inlined_fns): Remove.
3646 (mark_lang_function): Mark x_local_names.
3647 (lang_mark_tree): Don't mark DECL_ACCESS for DECL_DISCRIMINATOR_P.
3648 Mark inlined_fns as tree, remove call to mark_inlined_fns.
3649 * class.c (alter_access): Ensure DECL_ACCESS is never set if
3650 DECL_DISCRIMINATOR_P.
3651 * cp-tree.h (cp_language_function): Add x_local_names.
3652 (lang_decl_flags): Add discriminator into u2.
3653 (lang_decl_inlined_fns): Remove.
3654 (lang_decl): inlined_fns is now a TREE_VEC.
3655 (DECL_DISCRIMINATOR_P, DECL_DISCRIMINATOR): Define.
3656 * optimize.c (inlinable_function_p): DECL_INLINED_FNS is now a
3657 TREE_VEC, not a custom structure.
3658 (optimize_function): Likewise.
3659 * mangle.c (discriminator_for_local_entity): Discriminate among
3660 VAR_DECL local entities.
3661 * search.c (dfs_access_in_type): If DECL_DISCRIMINATOR_P, DECL_ACCESS
3664 2001-03-22 Bryce McKinlay <bryce@albatross.co.nz>
3666 Add support for Java interface method calls.
3667 * cp-tree.h (struct lang_type): Add java_interface flag.
3668 (TYPE_JAVA_INTERFACE): New macro.
3669 * tree.c (cp_valid_lang_attribute): Handle "java_interface" attribute
3670 by setting TYPE_JAVA_INTERFACE.
3671 * call.c (java_iface_lookup_fn): New static.
3672 (build_over_call): If calling a method declared in a
3673 TYPE_JAVA_INTERFACE, call build_java_interface_fn_ref to generate the
3674 expression which resolves the function address.
3675 (build_java_interface_fn_ref): New function.
3677 2001-03-22 Richard Henderson <rth@redhat.com>
3679 * Make-lang.in (cp/except.o): Don't depend on insn-flags.h.
3680 * except.c: Don't include it.
3682 2001-03-22 Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at>
3683 based on an idea from Joe Buck <jbuck@synopsys.com>
3685 * parse.y (bad_decl, template_arg_list_ignore, arg_list_ignore):
3687 (data_def, component_decl): Add reductions to bad_decl.
3689 2001-03-22 Jakub Jelinek <jakub@redhat.com>
3691 * method.c (do_build_assign_ref): Don't use build_modify_expr for
3692 anonymous aggregates, since they don't have assignment operator
3694 * decl.c (fixup_anonymous_aggr): Disallow ctors, dtors and copy
3695 assignment operators for anonymous structure fields.
3697 2001-03-21 Jason Merrill <jason@redhat.com>
3699 * pt.c (instantiate_decl): Abort if we see a member constant
3700 instantiation that doesn't already have its initializer.
3701 Downgrade explicit instantiation without definition to pedwarn.
3703 * cp-tree.h (DECL_TINFO_FN_P, SET_DECL_TINFO_FN_P): Remove.
3704 * class.c (build_vtable_entry): Don't check DECL_TINFO_FN_P.
3705 (import_export_decl): Check tinfo_decl_p, not DECL_TINFO_FN_P.
3707 * cp-tree.h (CLASSTYPE_VTABLE_NEEDS_WRITING): Remove.
3708 (pending_vtables): Remove.
3709 * decl2.c (pending_vtables): Remove.
3710 (import_export_vtable): Use CLASSTYPE_INTERFACE_ONLY, not
3711 CLASSTYPE_VTABLE_NEEDS_WRITING.
3712 (import_export_class): Likewise.
3713 (init_decl2): Don't mark pending_vtables.
3714 * lex.c (handle_pragma_vtable): Just sorry.
3715 * pt.c (instantiate_class_template): Don't mess with
3716 CLASSTYPE_VTABLE_NEEDS_WRITING.
3717 (mark_class_instantiated): Likewise.
3718 * ptree.c (print_lang_type): Don't print it.
3719 * semantics.c (begin_class_definition): Don't set it.
3721 * pt.c (template_tail): Replace with last_pending_template.
3722 (maybe_templates, maybe_template_tail): Remove.
3723 (add_pending_template): Adjust.
3724 (instantiate_pending_templates): Adjust.
3726 * cp-tree.h (struct saved_scope): Remove lang_stack field.
3727 (current_lang_stack): Remove.
3728 * decl.c (maybe_push_to_top_level): Don't initialize it.
3729 (duplicate_decls): Use current_lang_depth.
3730 (xref_basetypes): Likewise.
3731 * class.c (current_lang_depth): New fn.
3732 (push_lang_context): Use more varray functionality.
3733 (pop_lang_context): Likewise.
3735 * error.c (GLOBAL_THING): Always use '__'.
3737 2001-03-21 Mark Mitchell <mark@codesourcery.com>
3739 * class.c (build_clone): Clear DECL_ASSEMBLER_NAME.
3741 * mangle.c (mangle_decl_string): Mangle the names of overloaded
3742 operators, even when they have `extern "C"' linkage.
3744 2001-03-19 Mark Mitchell <mark@codesourcery.com>
3746 * class.c (get_vtable_decl): Use SET_DECL_ASSEMBLER_NAME,
3747 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
3748 where it's not necessary.
3749 (add_method): Remove optimization involving comparison of
3750 DECL_ASSEMBLER_NAME.
3751 (build_vtbl_or_vbase_field): Use SET_DECL_ASSEMBLER_NAME,
3752 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
3753 where it's not necessary.
3754 (check_methods): Likewise.
3755 (build_clone): Likewise.
3756 (built_vtt): Likewise.
3757 * cp-tree.h (DECL_NEEDED_P): Likewise.
3758 * decl.c (pushtag): Likewise.
3759 (duplicate_decls): Likewise.
3760 (pushdecl): Likewise.
3761 (builtin_function): Likewise.
3762 (build_library_fn_1): Set DECL_LANGUAGE for library functions.
3763 (build_cp_library_fn): Likewise.
3764 (maybe_commonize_var): Use SET_DECL_ASSEMBLER_NAME,
3765 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
3766 where it's not necessary.
3767 (make_rtl_for_nonlocal_decl): Likewise.
3768 (cp_finish_decl): Likewise.
3769 (grokfndecl): Likewise.
3770 (grokvardecl): Likewise.
3771 (grokdeclarator): Likewise.
3772 (start_function): Likewise.
3773 (cp_missing_return_ok_p): Likewise.
3774 * decl2.c (grokclassfn): Likewise.
3775 (check_classfn): Likewise.
3776 (finish_static_data_member_decl): Likewise.
3777 (grokfield): Likewise.
3778 * error.c (GLOBAL_IORD_P): Remove.
3779 (dump_global_iord): Improve output.
3780 (dump_decl): Avoid using DECL_ASSEMBLER_NAME.
3781 * except.c (nothrow_libfn_p): Summarily reject any function not in
3783 * init.c (build_java_class_ref): Don't explicitly set
3784 DECL_ASSEMBLER_NAME after calling mangle_decl.
3785 * mangle.c (mangle_decl_string): Handle extern "C" functions.
3786 (mangle_decl): Set the DECL_ASSEMBLER_NAME for the decl.
3787 * method.c (set_mangled_name_for_decl): Don't explicitly set
3788 DECL_ASSEMBLER_NAME after calling mangle_decl.
3789 (make_thunk): Explicitly set the DECL_ASSEMBLER_NAME and
3790 IDENTIFIER_GLOBAL_VALUE for the thunk.
3791 * pt.c (set_mangled_name_for_template_decl): Remove.
3792 (check_explicit_specialization): Don't use it.
3793 (looup_template_class): Don't set DECL_ASSEMBLER_NAME.
3794 (tsubst_friend_function): Likewise.
3795 (tsubst_decl): Likewise.
3796 (regenerate_decl_from_template): Use COPY_DECL_ASSEMBLER_NAME.
3797 * rtti.c (get_tinfo_decl): Use SET_DECL_ASSEMBLER_NAME,
3798 COPY_DECL_ASSEMBLER_NAME, etc. Don't set DECL_ASSEMBLER_NAME
3799 where it's not necessary.
3800 (tinfo_base_init): Likewise.
3801 (create_real_tinfo_var): Likewise.
3802 * search.c (looup_field_1): Likewise.
3803 * semantics.c (finish_named_return_value): Likewise.
3804 * tree.c (init_tree): Set lang_set_decl_assembler_name.
3806 2001-03-15 Gabriel Dos Reis <gdr@codesourcery.com>
3808 Correct semantics restrictions checking in throw-expression.
3809 * except.c (is_admissible_throw_operand): New function.
3810 (build_throw): Use it.
3812 2001-03-14 Mark Mitchell <mark@codesourcery.com>
3814 * decl.c (cp_make_fnname_decl): Set DECL_IGNORED_P on __FUNCTION__
3817 2001-03-14 Mark Mitchell <mark@codesourcery.com>
3819 * class.c (build_clone): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
3820 * cp-tree.h (DECL_IN_MEMORY_P): Likewise.
3821 * decl.c (duplicate_decls): Likewise.
3822 (builtin_function): Likewise.
3823 (build_library_fn): Likewise.
3824 (build_cp_library_fn): Likewise.
3825 (check_initializer): Likewise.
3826 (cp_finish_decl): Likewise.
3827 * decl2.c (grokfield): Likewise.
3828 (grok_function_init): Remove #if 0'd code.
3829 (finish_anon_union): Use COPY_DECL_RTL, DECL_RTL_SET_P, etc.
3830 * friend.c (do_friend): Likewise.
3831 * init.c (get_temp_regvar): Likewise.
3832 * method.c (make_thunk): Likewise.
3833 * pt.c (tsubst_friend_function): Likewise.
3834 (tsubst_decl): Likewise.
3835 (regenerate_decl_from_template): Likewise.
3836 * semantics.c (genrtl_named_return_value): Likewise.
3837 (expand_body): Likewise.
3838 (genrtl_finish_function): Likewise.
3839 * tree.c (cp_tree_equal): Likewise.
3841 2001-03-12 Nathan Sidwell <nathan@codesourcery.com>
3843 * call.c (convert_like_real): Add extra semantics to INNER
3844 parameter. Don't convert to temporary if a user conversion
3845 gives us an lvalue that we're about to bind to a reference.
3846 Set INNER to indicate pending reference binding on recursive
3849 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
3851 * cp/lex.c: Delete duplicate pending_lang_change.
3853 2001-03-10 Neil Booth <neil@daikokuya.demon.co.uk>
3855 * cp/lex.c (handle_pragma_interface, handle_pragma_implementation):
3857 * cp/repo.c (get_base_filename, open_repo_file): Similarly.
3858 * cp/cp-tree.h: Remove file_name_nondirectory prototype.
3860 2001-03-09 Zack Weinberg <zackw@stanford.edu>
3862 * Make-lang.in: Add dependencies on $(TM_P_H) as appropriate.
3864 2001-03-08 Stan Shebs <shebs@apple.com>
3866 * cp-tree.h (set_identifier_local_value): Remove unused decl.
3868 2001-03-06 Zack Weinberg <zackw@stanford.edu>
3870 * spew.c: Remove references to CPP_OSTRING.
3872 2001-03-06 Andrew Haley <aph@redhat.com>
3874 * typeck.c (convert_arguments): Check that we have an fndecl.
3876 2001-03-05 Andrew Haley <aph@redhat.com>
3878 * typeck.c (convert_arguments): Don't do ellipsis conversion for
3879 __built_in_constant_p.
3881 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
3883 * typeck.c (build_static_cast): Allow enum to enum conversions
3886 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
3888 * class.c (check_field_decls): Pointers to member do not a
3889 non-pod struct make, as per DR 148.
3891 2001-03-02 Nathan Sidwell <nathan@codesourcery.com>
3893 * call.c (joust): cp_pedwarn when using gnu extension concerning
3894 worst conversion sequences.
3896 2001-03-01 Zack Weinberg <zackw@stanford.edu>
3898 * decl.c: Replace all uses of 'boolean' with 'bool'.
3900 2001-03-01 Zack Weinberg <zackw@stanford.edu>
3902 * lang-specs.h: Add zero initializer for cpp_spec field to
3903 all array elements that need one. Don't put an #ifdef inside
3904 the initializer list; set a default for CPLUSPLUS_CPP_SPEC and
3907 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
3909 Implement using decls inside template functions.
3910 * decl2.c (validate_nonmember_using_decl): Don't special case
3911 fake_std_node in the global namespace. Don't reject early when
3912 processing a template.
3913 (do_local_using_decl): Add to statement tree. Don't do further
3914 processing when building a template.
3915 * pt.c (tsubst_expr, DECL_STMT case): Deal with USING_DECLs.
3917 2001-03-01 Nathan Sidwell <nathan@codesourcery.com>
3919 * decl2.c (do_nonmember_using_decl): Don't complain if we find
3920 same function. Do complain about ambiguating extern "C"
3923 2001-02-28 Nathan Sidwell <nathan@codesourcery.com>
3925 Remove floating point and complex type template constant parms.
3926 * pt.c (convert_nontype_argument): Remove REAL_TYPE and
3927 COMPLEX_TYPE extensions.
3928 (invalid_nontype_parm_type_p): Likewise.
3930 2001-02-27 Jeffrey Oldham <oldham@codesourcery.com>
3932 * except.c (call_eh_info): Revert "match_function"'s type.
3934 2001-02-27 Nathan Sidwell <nathan@codesourcery.com>
3936 Fix ctor vtable vcall offsets.
3937 * class.c (struct vtbl_init_data_s): Add rtti_binfo member.
3938 (build_rtt_vtbl_entries): Lose RTTI_BINFO parameter.
3939 (get_matching_base): Remove.
3940 (get_original_base): New function.
3941 (build_vtbl_initializer): Initialize vid.rtti_binfo.
3942 Use a virtual thunk for a ctor vtable with an index
3943 (add_vcall_offset_vtbl_entries_1): Check if binfo has lost a
3944 primary base within a constructor vtable. Only set
3945 BV_VCALL_INDEX when not a constructor vtable. Adjust vcall offset
3946 when primary base has been lost.
3947 * cp-tree.h (BINFO_VIRTUALS): Remove ambiguity from comment.
3949 2001-02-26 Jeffrey Oldham <oldham@codesourcery.com>
3951 * call.c (joust): Ensure more_specialized()'s argument length
3952 parameter has correct value for constructors.
3954 2001-02-26 Nathan Sidwell <nathan@codesourcery.com>
3956 * except.c (call_eh_info): Cleanup generation of cp_eh_info struct.
3958 * decl.c (mark_inlined_fns): Prototype.
3960 2001-02-22 Mark Mitchell <mark@codesourcery.com>
3962 * spew.c (yylex): Correct handling of friends.
3964 2001-02-22 Mark Mitchell <mark@codesourcery.com>
3966 * mangle.c (write_encoding): Pass write_function_type the
3967 FUNCTION_DECL for the function being encoded.
3968 (write_function_type): Pass it along to write_bare_function_type.
3969 (write_bare_function_type): Pass it along to write_method_parms.
3970 (write_method_parms): Don't mangle the compiler-generated
3971 parameters to a constructor or destructor.
3973 2001-02-22 Andreas Jaeger <aj@suse.de>
3975 * optimize.c: Include toplev.h for
3976 note_deferral_of_defined_inline_function prototype.
3978 2001-02-22 Jakub Jelinek <jakub@redhat.com>
3980 * cp-tree.h (struct lang_decl_inlined_fns): New.
3981 (struct lang_decls): Add inlined_fns.
3982 (DECL_INLINED_FNS): New macro.
3983 * optimize.c (struct inline_data): Add inlined_fns.
3984 (declare_return_variable): Use VARRAY_ACTIVE_SIZE macro.
3985 (inlinable_function_p): Likewise, fix typo in comment,
3986 function is not inlinable if it already inlined function currently
3988 (expand_call_inline): Add fn to inlined_fns if necessary.
3989 (optimize_function): Initialize inlined_fns.
3990 Save inlined_fns into DECL_INLINED_FNS after expanding inlines.
3991 * decl.c (mark_inlined_fns): New function.
3992 (lang_mark_tree): Call it.
3994 2001-02-21 Jason Merrill <jason@redhat.com>
3996 * cp-tree.h (struct lang_decl_flags): Remove uninlinable flag.
3997 (DECL_UNINLINABLE): Move to middle-end.
3999 * class.c (clone_function_decl): Set DECL_ABSTRACT on original fn.
4000 * decl.c (duplicate_decls): Preserve DECL_ABSTRACT.
4001 * class.c (build_clone): Set DECL_ABSTRACT_ORIGIN for the clone.
4002 * optimize.c (maybe_clone_body): Set DECL_ABSTRACT_ORIGIN for the
4003 parms and outer BLOCK. note_deferral_of_defined_inline_function.
4005 * method.c (implicitly_declare_fn): Don't set DECL_ARTIFICIAL on
4008 2001-02-19 Mark Mitchell <mark@codesourcery.com>
4010 * decl2.c (set_decl_namespace): Allow explicit instantiations in
4013 2001-02-18 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4015 * optimize.c (expand_call_inline): Don't walk subtrees of type
4018 2001-02-18 Mark Mitchell <mark@codesourcery.com>
4020 * class.c (add_vcall_offset_vtbl_entries_1): Only add one entry
4023 2001-02-18 Jason Merrill <jason@redhat.com>
4025 Do put the VTT parameter in DECL_ARGUMENTS.
4026 * cp-tree.h (struct cp_language_function): Add x_vtt_parm.
4027 (current_vtt_parm): New macro.
4028 (struct lang_decl_flags): Add has_vtt_parm_p, remove vtt_parm.
4029 (DECL_HAS_VTT_PARM_P): New macro.
4030 (DECL_VTT_PARM): Remove.
4031 (FUNCTION_FIRST_USER_PARMTYPE, FUNCTION_FIRST_USER_PARM): New macros.
4032 * decl.c (duplicate_decls): Only copy the operator code if
4034 (start_function): Set current_vtt_parm.
4035 (lang_mark_tree): Don't mark vtt_parm.
4036 * decl2.c (maybe_retrofit_in_chrg): Do add the VTT parm to
4037 DECL_ARGUMENTS. Set DECL_HAS_VTT_PARM_P.
4038 * class.c (build_clone): Maybe remove the VTT parm.
4039 * optimize.c (maybe_clone_body): Set up the VTT parm.
4040 * pt.c (copy_default_args_to_explicit_spec): Preserve the VTT parm.
4041 * call.c (build_over_call): Just allow the VTT arg.
4042 * method.c (make_thunk): Don't set DECL_VTT_PARM.
4043 (do_build_copy_constructor): Use FUNCTION_FIRST_USER_PARM.
4044 (synthesize_method): Use FUNCTION_FIRST_USER_PARMTYPE.
4045 * decl.c (grokdeclarator, copy_args_p, grok_ctor_properties): Likewise.
4046 * error.c (dump_function_decl): Likewise.
4047 * call.c (build_user_type_conversion_1, convert_like_real): Abort
4048 if we try to call a constructor with in-charge or VTT parms.
4049 * method.c (skip_artificial_parms_for): New fn.
4050 * call.c (add_function_candidate, build_over_call): Call it.
4051 * call.c (build_new_method_call): Use current_vtt_parm.
4052 * init.c (expand_virtual_init): Likewise.
4053 * class.c (same_signature_p): No longer static.
4054 * cp-tree.h: Declare it.
4055 * search.c (look_for_overrides_r): Use it.
4057 2001-02-17 Mark Mitchell <mark@codesourcery.com>
4059 * cp-tree.h (new_abi_rtti_p): Remove.
4060 (name_mangling_version): Likewise.
4061 (flag_do_squangling): Likewise.
4062 * class.c (build_rtti_vtbl_entries): Remove old ABI support.
4063 * decl.c (grokfndecl): Likewise.
4064 * decl2.c (name_mangling_version): Remove.
4065 (flag_do_squangling): Likewise.
4066 (lang_f_options): Remove `squangle'.
4067 (unsupported_options): Add `squangle'.
4068 (cxx_decode_option): Issue a warning about uses of
4069 -fname-mangling-version.
4070 (finish_file): Remove old ABI support.
4071 * pt.c (check_explicit_specialization): Likewise.
4072 (tsubst_decl): Likewise.
4073 * rtti.c (init_rtti_processing): Likewise.
4074 (build_headof): Likewise.
4075 (get_tinfo_decl_dynamic): Likewise.
4076 (tinfo_from_decl): Likewise.
4077 (build_dynamic_cast_1): Likewise.
4078 (synthesize_tinfo_var): Likewise.
4079 * init.c (build_new): Allow enumeration types for the array-bounds
4080 in a direct-new-declarator.
4082 * semantics.c (finish_typeof): Resolve OFFSET_REFs.
4084 * pt.c (check_explicit_specialization): Copy TREE_PRIVATE and
4085 TREE_PROTECTED from the template being specialized.
4087 2001-02-17 Jason Merrill <jason@redhat.com>
4089 * decl2.c (build_artificial_parm): Set TREE_READONLY.
4091 * decl.c (bad_specifiers): Allow throw specs on things with
4092 pointer-to-function or -member-function type.
4093 * init.c (build_default_init): Don't use a CONSTRUCTOR to initialize
4096 2001-02-17 Mark Mitchell <mark@codesourcery.com>
4098 * call.c (check_dtor_name): Handle template names correctly.
4100 2001-02-16 Jason Merrill <jason@redhat.com>
4102 * cp-tree.h (DECL_USE_VTT_PARM): Remove.
4103 * decl2.c (maybe_retrofit_in_chrg): Don't create it.
4104 * optimize.c (maybe_clone_body): Don't substitute it.
4105 * call.c (build_new_method_call): Check in_chrg instead.
4106 * init.c (expand_virtual_init): Likewise.
4108 2001-02-16 Gabriel Dos Reis <gdr@codesourcery.com>
4110 * decl.c (check_tag_decl): Make sure a typedef for an anonymous
4111 class-type introduces at least a type-name.
4113 2001-02-16 Jakub Jelinek <jakub@redhat.com>
4115 * call.c (convert_like_real): Create a temporary for non-lvalue.
4117 2001-02-16 Jeffrey Oldham <oldham@codesourcery.com>
4119 * cp-tree.h: Fix typos in comments.
4121 2001-02-16 Jason Merrill <jason@redhat.com>
4123 * optimize.c (remap_block): If we're compiling a clone, pass the
4124 new block to insert_block.
4126 2001-02-16 Mark Mitchell <mark@codesourcery.com>
4128 * semantics.c (finish_asm_stmt): Robustify.
4130 2001-02-15 Mark Mitchell <mark@codesourcery.com>
4132 * pt.c (push_template_decl_real): Don't remangle the name of a
4135 2001-02-15 Jim Meyering <meyering@lucent.com>
4137 * Make-lang.in (c++.install-common): Depend on installdirs.
4138 (c++.install-info): Likewise.
4139 (c++.install-man): Likewise.
4141 2001-02-15 Mark Mitchell <mark@codesourcery.com>
4143 * typeck2.c (build_m_component_ref): Robustify.
4145 2001-02-15 Alexandre Oliva <aoliva@redhat.com>
4147 * friend.c (do_friend): Don't take the nested [template] class
4148 into account when deciding whether to warn about the friend
4149 function not referring to a template function.
4151 2001-02-14 Jakub Jelinek <jakub@redhat.com>
4153 * typeck.c (build_unary_op): Clarify error message.
4155 2001-02-08 Aldy Hernandez <aldyh@redhat.com>
4157 * parse.y (component_constructor_declarator): allow optional
4158 parentheses around constructor class name.
4160 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
4162 * cp-tree.h (setup_vtbl_ptr): Move prototype to semantics.c
4164 * init.c (emit_base_init): Remove incorrect comment about
4166 * method.c (make_thunk): Fix comment alignment.
4168 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
4170 Kill remnants of this is variable.
4171 * cp-tree.h (flag_this_is_variable): Remove.
4172 * decl2.c (flag_this_is_variable): Remove.
4173 * class.c (fixed_type_or_null): Add cdtor parm. Adjust.
4174 (build_vbase_path): The path is non-static, even in a cdtor.
4175 (resolves_to_fixed_type_p): Add additional return value.
4176 * search.c (init_vbase_pointers): Adjust.
4177 * tree.c (lvalue_p_1): Adjust.
4178 * typeck.c (mark_addressable): Adjust.
4180 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
4182 * pt.c (unify): Don't check cv quals of array types.
4184 2001-02-14 Nathan Sidwell <nathan@codesourcery.com>
4186 * tree.c (cp_build_qualified_type_real): Use CP_TYPE_QUALS to
4187 check whether we already have the type.
4189 2001-02-13 Mark Mitchell <mark@codesourcery.com>
4191 * cp-tree.h (CLASSTYPE_DESTRUCTORS): Fix typo in comment.
4192 * call.c (build_op_delete_call): Simplify to remove duplicate
4194 * class.c (clone_function_decl): Don't build the deleting variant
4195 of a non-virtual destructor.
4196 * decl.c (finish_destructor_body): Don't call delete if this is a
4197 non-virtual destructor.
4198 * init.c (build_delete): Explicitly call `operator delete' when
4199 deleting an object with a non-virtual destructor.
4201 2001-02-13 Jason Merrill <jason@redhat.com>
4203 * lang-specs.h: Add more __EXCEPTIONS.
4205 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
4207 * typeck2.c (process_init_constructor): Check
4208 TREE_HAS_CONSTRUCTOR before issuing missing init warning.
4210 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
4212 * pt.c (maybe_adjust_types_for_deduction, DEDUCE_ORDER case):
4213 Remove spurious information in comment. Allow further
4214 adjustments of REFERENCE_TYPE args.
4216 2001-02-12 Nathan Sidwell <nathan@codesourcery.com>
4218 * errfn.c (cp_deprecated): Tweak diagnostic text.
4219 * parse.y (new_initializer): Deprecate initializer lists
4222 2001-02-12 Mark Mitchell <mark@codesourcery.com>
4224 Remove old ABI support.
4226 2001-02-11 Mark Mitchell <mark@codesourcery.com>
4228 * decl2.c (flag_vtable_thunks): Always set it to 1.
4229 (flag_new_abi): Likewise.
4230 * lang-specs.h: Remove conditional on ENABLE_NEW_GXX_ABI.
4232 * Makefile.in (g++spec.o): Fix typo.
4234 2001-02-09 Jason Merrill <jason@redhat.com>
4236 * lang-specs.h: Restore definition of __EXCEPTIONS.
4238 2001-02-08 Jason Merrill <jason@redhat.com>
4240 * search.c (shared_member_p): New function.
4241 (lookup_field_r): Use it.
4242 * cp-tree.h (SHARED_MEMBER_P): Remove.
4244 * method.c (process_overload_item): Handle template-dependent array
4246 * pt.c (type_unification_real): If we end up with undeduced nontype
4249 * decl.c (lookup_name_real): Tweak warning to refer to decls, not
4252 * typeck2.c (friendly_abort): Don't say anything if we have
4253 earlier errors or sorries.
4255 * decl.c (check_tag_decl): Notice attempts to redefine bool and
4256 wchar_t. Ignore if in_system_header.
4258 * decl.c (maybe_push_cleanup_level): New fn...
4259 (start_decl_1): ...split out from here.
4260 * cvt.c (build_up_reference): Use it.
4261 * cp-tree.h: Declare it.
4263 2001-02-07 Mark Mitchell <mark@codesourcery.com>
4265 * lang-specs.h: Use CPLUSPLUS_CPP_SPEC for the preprocessor
4268 2001-02-06 Nathan Sidwell <nathan@codesourcery.com>
4270 * pt.c (lookup_template_class): Make sure it's a primary
4271 template or template_template_parm when called from the parser.
4272 (instantiate_template_class): Add assertion.
4274 2001-02-05 Alexandre Oliva <aoliva@redhat.com>
4276 * method.c (build_mangled_name) [old abi]: Protect flush_repeats()
4277 from error_mark_node.
4279 2001-02-05 Nathan Sidwell <nathan@codesourcery.com>
4281 Fix specification and implementation bugs in V3 ABI
4282 construction vtables.
4283 * cp-tree.h (flag_dump_class_layout): New flag.
4284 (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH_P): Remove.
4285 (BINFO_LOST_PRIMARY_P): New flag.
4286 (SET_BINFO_NEW_VTABLE_MARKED): Adjust asserts.
4287 (BINFO_PRIMARY_MARKED_P): Rename to ...
4288 (BINFO_PRIMARY_P): ... here.
4289 (binfo_via_virtual): New prototype.
4290 * decl2.c (flag_dump_class_layout): New flag.
4291 (cxx_decode_option): Set it. Adjust -fdump-translation-unit to
4292 use `=' as a file name separator.
4293 * init.c (dfs_initialize_vtbl_ptrs): Walk into virtual primary
4295 (build_vtbl_address): If this is a virtual primary base, then
4296 get the vtbl of what it is ultimately primary for.
4297 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Adjust
4298 for BINFO_PRIMARY_P.
4299 (dfs_skip_nonprimary_vbases_markedp): Likewise.
4300 (get_shared_vbase_if_not_primary): Likewise.
4301 (dfs_get_pure_virtuals): Likewise.
4302 (expand_upcast_fixups): Likewise.
4303 (fixup_virtual_upcast_offsets): Likewise.
4304 (dfs_find_vbase_instance): Likewise.
4305 (find_vbase_instance): Likewise.
4306 (binfo_from_vbase): Adjust comment to reflect reality.
4307 (binfo_via_virtual): New function.
4308 * class.c (VTT_TOP_LEVEL_P, VTT_MARKED_BINFO_P): New macros
4309 for binfo walking during VTT construction.
4310 (dfs_mark_primary_bases): Remove.
4311 (force_canonical_binfo_r): New function.
4312 (force_canonical_binfo): New function.
4313 (mark_primary_virtual_base): New function.
4314 (mark_primary_bases): Walk in inheritance graph order, use
4315 mark_primary_virtual_base.
4316 (determine_primary_base): Use some more intermediate variables.
4317 (dfs_find_final_overrider): Don't check for overriding along a
4319 (dfs_modify_vtables): Walk into primary virtual bases too.
4320 (walk_subobject_offsets): Adjust for BINFO_PRIMARY_P.
4321 (build_base_fields): Likewise.
4322 (dfs_set_offset_for_unshared_vbases): Likewise.
4323 (layout_virtual_bases): Likewise.
4324 (end_of_class): Likewise.
4325 (finish_struct_1): Call dump_class_hierarchy, if requested.
4326 (dfs_get_primary_binfo): Use BINFO_TYPE for binfos.
4327 (dump_class_hierarchy_r): Add stream parameter. Emit more information.
4328 (dump_class_hierarchy): Add file parameter. Append to file, if
4330 (finish_vtbls): Adjust accumulate_vtbl_inits call.
4331 Use canonical base for virtual bases.
4332 (build_vtt): Add more comments. Adjust build_vtt_inits call.
4333 (build_vtt_inits): Remove VIRTUAL_VTTS_P parm.
4334 Only set BINFO_VPTR_INDEX on top level. Use VTT_TOP_LEVEL_P,
4335 VTT_MARKED_BINFO_P for binfo walking. Use canonical vbase for
4337 (dfs_build_secondary_vptr_vtt_inits): Extract VTT_TOP_LEVEL_P
4338 from DATA. We want virtual primary bases and all bases via virtual.
4339 Only set BINFO_VPTR_INDEX for top level. Look up from a primary
4340 virtual base when not a construction vtable.
4341 (dfs_ctor_vtable_bases_queue_p): New DFS predicate.
4342 (build_ctor_vtbl_group): Adjust accumulate_vtbl_inits call.
4343 Use canonical bases when processing virtual bases.
4344 (accumulate_vtbl_inits): We're interested in any base via a
4346 (dfs_accumulate_vtbl_inits): If this is a primary virtual base
4347 within a construction vtable, determine what is being overridden.
4348 (build_vtbl_initializer): Add more comments
4349 (add_vcall_offset_vtbl_entries_1): Adjust comment.
4350 (build_rtti_vtbl_entries): Check if the base has lost its
4353 2001-02-05 Mark Mitchell <mark@codesourcery.com>
4355 * Makefile.in (g++spec.o): Adjust use of DRIVER_DEFINES.
4357 Sun Feb 4 15:52:44 2001 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4359 * decl.c (pushdecl): Call abort instead of fatal.
4360 * except.c (decl_is_java_type): Call fatal_error instead of fatal.
4361 * init.c (build_new_1): Likewise.
4362 (build_java_class_ref): Call internal_error and fatal_error, not fatal.
4363 * decl.c (build_typename_type): hash_table_init now returns void.
4364 decl.c (init_decl_processing): Make an error non-fatal.
4366 2001-02-04 Mark Mitchell <mark@codesourcery.com>
4368 * cp-tree.h (CLASSTYPE_INTERFACE_UNKNOWN): Fix formatting.
4370 (CLASSTYPE_INTERFACE_KNOWN): Likewise.
4371 (SET_CLASSTYPE_INTERFACE_UNKNOWN_X): Likewise.
4372 (SET_CLASSTYPE_INTERFACE_UNKNOWN): Likewise.
4373 (SET_CLASSTYPE_INTERFACE_KNOWN): Likewise.
4374 * decl.c (maybe_commonize_var): Use the new name-mangling where
4376 * decl2.c (comdat_linkage): Enhance comments. Make all
4377 compiler-generated things static, if COMDAT is not available.
4378 (get_tinfo_decl): Do not make typeinfo objects that belong in the
4380 (tinfo_base_init): Use the correct mangled name for typeinfo
4381 strings, and push them into the global scope.
4382 (typeinfo_in_lib_p): New function.
4383 (synthesize_tinfo_var): Use it.
4384 (create_real_tinfo_var): Likewise.
4386 2001-02-03 Jakub Jelinek <jakub@redhat.com>
4388 * decl.c (push_class_binding): Use context_for_name_lookup instead
4390 * search.c (context_for_name_lookup): Remove static. Check for NULL
4391 context in the loop.
4392 * cp-tree.h (context_for_name_lookup): Add prototype.
4394 2001-02-02 Jakub Jelinek <jakub@redhat.com>
4396 * cp-tree.h (build_expr_ptr_wrapper, can_free): Remove.
4397 * tree.c (build_expr_ptr_wrapper, can_free, permanent_obstack):
4399 * call.c (convert_class_to_reference, build_user_type_conversion_1,
4400 add_warning): Change build_expr_ptr_wrapper to build_ptr_wrapper.
4402 2001-02-02 Mark Mitchell <mark@codesourcery.com>
4404 * Make-lang.in (g++spec.o): Add DRIVER_DEFINES to the list
4405 of macros used when compiling g++spec.c.
4406 * g++spec.c (lang_specific_driver): Link with the shared
4409 2001-01-29 Joseph S. Myers <jsm28@cam.ac.uk>
4411 * decl2.c (build_expr_from_tree), lex.c (make_pointer_declarator,
4412 make_reference_declarator, make_call_declarator), method.c
4413 (implicitly_declare_fn), parse.y (namespace_using_decl,
4414 notype_unqualified_id, expr_or_declarator, new_type_id,
4415 after_type_declarator, direct_after_type_declarator,
4416 notype_declarator, complex_notype_declarator,
4417 complex_direct_notype_declarator, qualified_id,
4418 notype_qualified_id, overqualified_id, direct_new_declarator,
4419 absdcl, direct_abstract_declarator, conversion_declarator), pt.c
4420 (tsubst), semantics.c (begin_constructor_declarator): Use build_nt
4421 instead of build_parse_node.
4423 2001-01-28 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4425 * cp-tree.h (cp_tree_index): Delete CPTI_MINUS_ONE.
4426 (minus_one_node): Moved to top level gcc directory. Renamed
4427 to integer_minus_one_node.
4429 * init.c (init_init_processing): Don't set minus_one_node.
4430 (build_vec_init): Use integer_minus_one_node.
4432 * rtti.c (get_tinfo_decl_dynamic): Likewise.
4434 2001-01-28 Jakub Jelinek <jakub@redhat.com>
4436 * optimize.c (copy_body_r): If MODIFY_EXPR has both arguments
4437 identical and they would be replaced with constant, remove
4438 MODIFY_EXPR from the tree.
4440 2001-01-27 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4442 * Make-lang.in: Remove all dependencies on defaults.h.
4443 * call.c: Don't include defaults.h.
4445 * decl2.c: Likewise.
4446 * except.c: Likewise.
4450 * typeck.c: Likewise.
4452 2001-01-25 Jakub Jelinek <jakub@redhat.com>
4454 * mangle.c (write_mangled_name, write_encoding): Mangle overloaded
4455 operators even in "C" linkage.
4456 * method.c (set_mangled_name_for_decl): Likewise.
4457 * decl.c (grokfndecl): Call set_mangled_name_for_decl even for
4458 overloaded operators in "C" linkage.
4460 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
4462 * pt.c (tsubst_decl): Remove IN_DECL parameter.
4463 (tsubst_arg_types): Check parameter is not void.
4464 (tsubst): Adjust tsubst_decl call.
4466 2001-01-24 Nathan Sidwell <nathan@codesourcery.com>
4468 * call.c (add_builtin_candidate): Quote std properly, from
4471 2001-01-23 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4473 * pt.c (check_explicit_specialization): Clone constructors and
4476 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
4478 * decl.c (grokdeclarator): Don't presume DECL_LANG_SPECIFIC
4479 indicates anything special about template depth. Make sure we
4480 only count the user visible template classes.
4482 2001-01-23 Nathan Sidwell <nathan@codesourcery.com>
4484 * call.c (build_conv): Typo in comment.
4485 (add_builtin_candidate): Add more explanation.
4486 Remove extra test for ENUMERAL_TYPE in {PRE,POST}INCREMENT_EXPR.
4487 Allow ENUMERAL_TYPEs for relops and eqops. Add both candidates
4488 when we have enumeral types.
4489 (add_builtin_candidates): Add more explanation. Add ENUMERAL_TYPE
4490 candidates for relops and eqops.
4491 (joust): Simplify control flow. Allow a non-template user
4492 function to hide a builtin.
4494 2001-01-22 Nathan Sidwell <nathan@codesourcery.com>
4496 * cp-tree.h (unification_kind_t): Add DEDUCE_ORDER.
4497 (more_specialized): Add deduction parameter.
4498 * call.c (joust): Adjust more_specialized call.
4499 * pt.c (UNIFY_ALLOW_OUTER_MORE_CV_QUAL,
4500 UNIFY_ALLOW_OUTER_LESS_CV_QUAL): New unify flags.
4501 (get_bindings_order): Remove.
4502 (get_bindings_real): Add DEDUCE parameter.
4503 (maybe_adjust_types_for_deduction): Return extra unify flags. Do
4504 REFERENCE_TYPE jig for DEDUCE_ORDER.
4505 (type_unification_real): Deal with DEDUCE_ORDER. Use result of
4506 maybe_adjust_types_for_deduction.
4507 (more_specialized): Add DEDUCE parameter. Call get_bindings_real
4509 (try_one_overload): Use result of maybe_adjust_types_for_deduction.
4510 (check_cv_quals_for_unify): Use new unify qualifier flags.
4511 (unify): Clear new unify qualifier flags.
4512 (get_bindings_real): Add DEDUCE parameter.
4513 (get_bindings): Adjust call to get_bindings_real.
4514 (get_bindings_overload): Likewise.
4515 (most_specialized_instantiation): Adjust call to
4518 2001-01-19 Jason Merrill <jason@redhat.com>
4520 * decl2.c (flag_vtable_thunks): Also depend on ENABLE_NEW_GXX_ABI.
4522 * decl.c (init_decl_processing): Just force -fvtable-thunks on if
4525 2001-01-19 Ute Pelkmann <scope.muc@t-online.de>
4527 * decl2.c (arg_assoc_class): Fix double iteration logic.
4529 2001-01-19 Jason Merrill <jason@redhat.com>
4531 * init.c (build_delete): Always call convert_force to strip cv-quals.
4533 * decl2.c (flag_new_abi): Depend on ENABLE_NEW_GXX_ABI.
4534 * lang-specs.h: Default ABI depends on ENABLE_NEW_GXX_ABI.
4535 * g++spec.c: Don't look at ENABLE_NEW_GXX_ABI.
4537 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
4539 * search.c (get_vbase_1): Count only virtual bases.
4541 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
4543 * class.c (duplicate_tag_error): Robustify flag clearing.
4545 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
4547 * cp-tree.h (lookup_template_class): Add complain parm.
4548 * decl.c (lookup_namespace_name): Adjust call to
4549 lookup_template_class.
4550 (make_typename_type): Likewise.
4551 * semantics.c (finish_template_type): Likewise.
4552 * pt.c (lookup_template_class): Add complain parm. Adjust.
4553 (tsubst_aggr_type): Pass COMPLAIN down to lookup_template_class.
4556 2001-01-19 Nathan Sidwell <nathan@codesourcery.com>
4558 * pt.c (copy_default_args_to_explicit_spec): Preserve
4559 object's CV quals. Reorganize.
4561 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4563 * typeck.c (build_modify_expr): Say `initialization' for
4565 * init.c (build_default_init): Convert to enumeral type, if
4568 2001-01-18 Jakub Jelinek <jakub@redhat.com>
4570 * parse.y (nomods_initdcl0): Properly set things up for
4573 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4575 * pt.c (UNIFY_ALLOW_OUTER_LEVEL): New unify flag.
4576 (type_unification_real): Set it.
4579 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4581 * decl.c (finish_destructor_body): Convert to vbase pointer here.
4583 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4585 * semantics.c (begin_class_definition): Check we're not inside a
4588 2001-01-18 Nathan Sidwell <nathan@codesourcery.com>
4590 * tree.c (walk_tree, TREE_LIST): Don't walk the TREE_PURPOSE of
4593 2001-01-16 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
4595 * typeck.c (build_function_call_real): Call fold on the CALL_EXPR.
4596 * call.c (build_over_call): Add comment.
4598 2001-01-16 Daniel Berlin <dberlin@redhat.com>
4600 * cvt.c (ocp_convert): Handle vector type conversion
4601 * typeck2.c (digest_init): Handle vector type initializations
4603 2001-01-16 Phil Edwards <pme@sources.redhat.com>
4605 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
4608 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
4610 * pt.c (check_nontype_parm): Rename to ...
4611 (invalid_nontype_parm_type_p): ... here.
4612 (process_template_parm): Adjust.
4613 (convert_template_argument): Adjust.
4615 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
4617 * pt.c (check_nontype_parm): New function.
4618 (process_template_parm): Use it.
4619 (convert_template_argument): Use it.
4620 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
4623 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
4625 * tree.c: Add defaults.h
4626 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
4627 * Make-lang.in (cp/tree.o): Add defaults.h.
4629 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
4631 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
4633 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
4635 * g++.1: Change to be ".so man1/gcc.1".
4637 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
4639 * Make-lang.in (c++.info, c++.install-info): Build and install g++
4641 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
4642 ($(srcdir)/cp/g++int.info): New target.
4643 * gxxint.texi: Add info directory entry. Use @@ in email address.
4644 * .cvsignore: Update.
4646 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
4648 * typeck.c (build_c_cast): Do template processing earlier.
4649 Always pedwarn on array casts.
4651 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
4653 * friend.c (make_friend_class): Make sure a templated class is
4654 actually a template.
4656 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4658 * decl2.c (get_guard): Set linkage from guarded decl.
4660 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4662 * call.c (convert_default_arg): Check for unprocessed
4664 * cp-tree.h (replace_defarg): Move to spew.c.
4665 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
4666 spew.c, which is where they really are.
4667 (done_pending_defargs): Declare.
4668 (unprocessed_defarg_fn): Declare.
4669 * decl.c (replace_defarg): Move to spew.c
4670 * parse.y (structsp): Call done_pending_defargs.
4671 * spew.c (defarg_fns): Rearrange list structure.
4672 (defarg_fnsdone): New static variable.
4673 (defarg_depfns): New static variable.
4674 (init_spew): Adjust.
4675 (add_defarg_fn): Store the type in TREE_TYPE.
4676 (do_pending_defargs): Detect and deal with ordering constraints
4678 (done_pending_defargs): New function.
4679 (unprocessed_defarg_fn): New function.
4680 (replace_defarg): Moved from decl.c. Robustify. Don't save
4681 if circularity detected.
4683 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4685 * pt.c (unify): Check array has a domain, before checking
4686 whether it is variable sized.
4688 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4690 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
4691 parameters with pointers to arrays of unknown bound.
4693 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
4695 * parse.y (template_parm_header, template_spec_header): New
4696 reductions. Split out from ...
4697 (template_header): ... here. Use them.
4698 (template_template_parm): Use template_parm_header.
4699 * semantics.c (finish_template_template_parm): Add assert.
4701 2001-01-10 Mark Mitchell <mark@codesourcery.com>
4703 * mangle.c (write_builtin_type): Fix thinko.
4705 * pt.c (copy_default_args_to_explicit_spec_1): New function.
4706 (copy_default_args_to_explicit_spec): Likewise.
4707 (check_explicit_specialization): Use it.
4709 * class.c (finish_struct_1): Remove last argument in call to
4710 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
4711 * decl.c (builtin_function): Likewise.
4712 (build_cp_library_fn): Likewise.
4713 (check_initializer): Likewise.
4714 (make_rtl_for_nonlocal_decl): Likewise.
4715 (cp_finish_decl): Likewise.
4716 (start_function): Likewise.
4717 * decl2.c (finish_anon_union): Likewise.
4718 * friend.c (do_friend): Likewise.
4719 * init.c (build_java_class_ref): Likewise.
4720 * method.c (make_thunk): Likewise.
4721 * pt.c (tsubst_friend_function): Likewise.
4722 * semantics.c (expand_body): Likewise.
4724 2001-01-10 Mark Mitchell <mark@codesourcery.com>
4726 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
4727 looking at DECL_CLONED_FUNCTION for non-functions.
4729 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
4731 * error.c (dump_template_parameter): Use parm to determine how
4732 to print default value.
4734 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
4736 * class.c (duplicate_tag_error): Clear more flags.
4738 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
4740 * call.c (build_new_method_call): Use binfo_for_vbase.
4742 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
4744 * cp-tree.h (flag_cond_mismatch): Don't declare.
4745 * decl2.c (flag_cond_mismatch): Don't define.
4746 (lang_f_options): Remove cond-mismatch.
4747 (unsupported_options): Add cond-mismatch.
4749 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
4751 * class.c (handle_using_decl): Reject using of constructor name
4752 of sourcing class. Allow injecting of a method with same name as
4753 nested class. Fixup error messages.
4755 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
4757 * decl2.c (lang_decode_option): Handle -Wformat=2.
4759 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
4761 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
4762 initialized_in_class.
4763 (DECL_DEFINED_IN_CLASS_P): Rename to ...
4764 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
4765 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
4766 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
4767 * pt.c (check_default_tmpl_args): Adjust for
4768 DECL_INITIALIZED_IN_CLASS_P.
4769 (instantiate_class_template): Likewise.
4770 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
4772 * class.c (finish_struct): Constify saved_filename.
4774 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
4776 * class.c (duplicate_tag_error): Adjust diagnostic.
4777 (finish_struct): Locally set location to start of struct.
4778 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
4780 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
4782 * decl.c (struct binding_level): Adjust class_shadowed comments
4784 (push_class_level_binding): Adjust comments to reflect reality.
4785 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
4786 Don't set TREE_VALUE on the class_shadowed list.
4788 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
4790 * decl2.c (acceptable_java_type): Allow references too.
4791 * init.c (build_java_class_ref): When using the new ABI, search
4792 `class$' and have it mangled with `mangle_decl.'
4793 * mangle.c (write_java_integer_type_codes): New function.
4794 (write_builtin_type): Detect and mangle Java integer and real
4797 2001-01-07 Mark Mitchell <mark@codesourcery.com>
4799 * decl2.c (grokfield): Don't accept `asm' specifiers for
4800 non-static data members.
4802 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4804 * expr.c (cplus_expand_expr): Don't reset `target'.
4806 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
4808 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
4810 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
4812 * parse.y (template_datadef): Check for error_mark_node.
4814 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
4816 * cp-tree.def (DEFAULT_ARG): Make `x' class.
4818 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
4820 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
4821 (record_builtin_type): Make non-static.
4822 (flag_short_double): Don't declare.
4823 (init_decl_processing): Remove the creation of many tree nodes now
4824 in c_common_nodes_and_builtins.
4825 (build_void_list_node): New function.
4826 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
4827 * cp-tree.h (flag_short_wchar): Don't declare.
4829 2001-01-04 Mark Mitchell <mark@codesourcery.com>
4831 * call.c (build_conv): Don't use build1 for USER_CONV.
4832 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
4834 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
4836 * lex.c (lang_init): Call c_common_lang_init.
4838 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
4840 * search.c (lookup_fnfields_here): Remove.
4841 (look_for_overrides_r): Use lookup_fnfields_1.
4842 Ignore functions from using declarations.
4844 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
4846 Implement exceptions specifiers for implicit member functions.
4847 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
4848 * method.c (synthesize_exception_spec): New function.
4849 (locate_dtor, locate_ctor, locate_copy): New functions.
4850 (implicitly_declare_fn): Generate the exception spec too.
4851 * search.c (check_final_overrider): Check artificial functions
4853 * typeck2.c (merge_exception_specifiers): New function.
4855 2001-01-03 Jason Merrill <jason@redhat.com>
4857 * init.c (build_default_init): New fn.
4858 (perform_member_init): Split out from here.
4859 (build_new_1): Use it. Simplify initialization logic.
4860 (build_vec_init): Take an array, rather than a pointer and maxindex.
4861 Speed up simple initializations. Don't clean up if we're assigning.
4862 * cp-tree.h: Adjust.
4863 * decl2.c (do_static_initialization): Remove TREE_VEC case.
4864 * parse.y (new_initializer): Return void_zero_node for ().
4865 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
4866 * typeck2.c (digest_init): Only complain about user-written
4869 2000-12-22 Mike Stump <mrs@wrs.com>
4871 * decl2.c: (max_tinst_depth): Increase to 50.
4873 2001-01-02 Mark Mitchell <mark@codesourcery.com>
4875 * class.c (invalidate_class_lookup_cache): Zero the
4876 previous_class_values.
4877 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
4879 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
4880 * decl.c (free_bindings): New variable.
4881 (push_binding): Don't create a new binding if we have one on the
4883 (pop_binding): Put old bindings on the free list.
4884 (init_decl_processing): Use size_int, not build_int_2.
4885 Register free_bindings as a GC root.
4886 (cp_make_fname_decl): Use size_int, not build_int_2.
4887 (push_inline_template_parms_recursive): Likewise.
4888 (end_template_parm_list): Likewise.
4889 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
4890 (tsubst_template_parms): Use size_int, not build_int_2.
4892 * rtti.c (get_vmi_pseudo_type_info): Likewise.
4894 2001-01-02 Richard Henderson <rth@redhat.com>
4896 * parse.y (asm): Set ASM_INPUT_P.
4898 2001-01-02 Jason Merrill <jason@redhat.com>
4900 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
4903 * typeck.c (cp_truthvalue_conversion): New fn.
4904 * cvt.c (ocp_convert): Use it.
4906 * cp-tree.h: Lose c-common.c decls.
4908 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
4909 * cvt.c (convert_to_void): Use type_unknown_p.
4911 * typeck.c (strip_all_pointer_quals): Also strip quals from
4912 pointer-to-member types.
4914 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
4917 * call.c (build_new_method_call): Do evaluate the object parameter
4918 when accessing a static member.
4919 * typeck.c (build_component_ref): Likewise.
4921 2001-01-02 Andreas Jaeger <aj@suse.de>
4923 * decl.c (cp_missing_noreturn_ok_p): New.
4924 (init_decl_processing): Set lang_missing_noreturn_ok_p.
4926 2000-12-29 Jakub Jelinek <jakub@redhat.com>
4928 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
4930 2000-12-29 Mark Mitchell <mark@codesourcery.com>
4932 * class.c (pushclass): Remove #if 0'd code.
4933 * cp-tree.h (overload_template_name): Remove.
4934 * decl.c (store_bindings): Simplify.
4935 (pop_from_top_level): Likewise.
4936 * pt.c (overload_template_name): Remove.
4937 (instantiate_decl): Don't call push_to_top_level if it's not
4940 2000-12-28 Mark Mitchell <mark@codesourcery.com>
4942 * pt.c (register_local_specialization): Don't return a value.
4943 (lookup_template_class): Use move-to-front heuristic when looking
4944 up template instantiations.
4945 (instantiate_decl): Only push_to_top_level when we're actually
4946 going to instantiate the template.
4948 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
4950 * search.c (binfo_for_vtable): Return least derived class, not
4951 most. Handle secondary vtables.
4953 2000-12-22 Jason Merrill <jason@redhat.com>
4955 * pt.c (more_specialized): Don't optimize len==0.
4956 (fn_type_unification): If we're adding the return type, increase len.
4958 * typeck.c (build_binary_op): Fix pmf comparison logic.
4960 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
4961 DECL_STATIC_FUNCTION_P.
4963 * semantics.c (genrtl_finish_function): Don't try to jump to
4964 return_label unless it exists.
4966 In partial ordering for a call, ignore parms for which we don't have
4968 * call.c (joust): Pass len to more_specialized.
4969 (add_template_candidate_real): Strip 'this', pass len.
4970 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
4971 (get_bindings_order): New fn. Pass len down.
4972 (get_bindings_real): Strip 'this', pass len.
4973 (fn_type_unification): Likewise.
4974 (type_unification_real): Succeed after checking 'len' args.
4975 (most_specialized_instantiation): Lose explicit_args parm.
4976 * class.c (resolve_address_of_overloaded_function): Strip 'this',
4979 2000-12-21 Jason Merrill <jason@redhat.com>
4981 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
4982 DECL_TEMPLATE_RESULT.
4984 * search.c (lookup_field_r): Call lookup_fnfields_1, not
4985 lookup_fnfields_here.
4987 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
4989 * call.c (build_object_call): Also allow conversions that return
4990 reference to pointer to function.
4991 (add_conv_candidate): Handle totype being ref to ptr to fn.
4992 (build_field_call): Also allow members of type reference to function.
4993 Lose support for calling pointer to METHOD_TYPE fields.
4995 * error.c (dump_expr): Handle *_CAST_EXPR.
4997 * typeck2.c (build_scoped_ref): Always convert to the naming class.
4999 * tree.c (break_out_cleanups): Lose.
5000 * cp-tree.h: Remove prototype.
5001 * typeck.c (build_component_ref): Don't break_out_cleanups.
5002 (build_compound_expr): Likewise.
5003 * semantics.c (finish_expr_stmt): Likewise.
5005 2000-12-20 Richard Henderson <rth@redhat.com>
5007 * cp-tree.h: Update declarations.
5008 * decl.c (finish_case_label): Return the new stmt node.
5009 * semantics.c (finish_goto_stmt): Likewise.
5010 (finish_expr_stmt, finish_return_stmt): Likewise.
5011 (finish_break_stmt, finish_continue_stmt): Likewise.
5012 (finish_asm_stmt): Likewise.
5013 * parse.y (already_scoped_stmt): Set STMT_LINENO.
5014 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
5015 (simple_if, simple_stmt): Return the new stmt node.
5018 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
5020 * cp-tree.h: Don't declare warn_long_long.
5022 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5024 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
5027 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5029 * pt.c (unify): Handle when both ARG and PARM are
5030 BOUND_TEMPLATE_TEMPLATE_PARM.
5032 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5034 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
5035 DECL_TEMPLATE_PARM_P.
5037 2000-12-15 Jason Merrill <jason@redhat.com>
5039 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
5041 * init.c (build_new_1): Don't strip quals from type.
5043 * decl.c (pushdecl): Don't check for linkage on a non-decl.
5045 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
5047 * call.c (build_new_function_call): Lose space before paren in
5049 (build_new_method_call): Likewise.
5051 * typeck2.c (build_m_component_ref): Propagate quals from datum.
5053 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5055 * pt.c (check_explicit_specialization): Propagate default
5056 function arguments to explicit specializations.
5058 2000-12-13 DJ Delorie <dj@redhat.com>
5060 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
5063 2000-12-08 Jason Merrill <jason@redhat.com>
5065 * error.c (dump_function_name): Don't let the user see __comp_ctor.
5067 Clean up copy-initialization in overloading code.
5068 * call.c (build_user_type_conversion_1): Die if we are asked to
5069 convert to the same or a base type.
5070 (implicit_conversion): Avoid doing so. Lose reference binding code.
5071 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
5072 direct-initialization. Also do direct-init part of copy-init.
5073 (build_user_type_conversion): Don't provide context to convert_like.
5074 * cvt.c (ocp_convert): build_user_type_conversion will now provide
5075 the constructor call for copy-init.
5077 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
5078 instantiation of a member template.
5079 (do_decl_instantiation): Not here.
5081 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
5083 * class.c (check_field_decls): Don't special case anonymous
5084 fields in error messages.
5085 (note_name_declared_in_class): Use %D on diagnostic.
5087 * tree.c (pod_type_p): Use strip_array_types.
5088 (cp_valid_lang_attribute): Likewise.
5089 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
5090 multiple evaluations.
5091 (cp_has_mutable_p): Use strip_array_types.
5093 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
5095 * cp-tree.h (sufficient_parms_p): Declare new function.
5096 * call.c (sufficient_parms_p): New function, broken out of ...
5097 (add_function_candidate): ... here. Use it.
5098 (add_conv_candidate): Use it.
5099 * decl.c (grok_ctor_properties): Use it.
5101 2000-12-07 Jakub Jelinek <jakub@redhat.com>
5103 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
5105 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
5107 * decl2.c (lang_decode_option): Handle -Wformat-security.
5109 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5111 * pt.c (verify_class_unification): New function.
5112 (get_class_bindings): Use it.
5113 (try_class_unification): Tidy.
5114 (unify): Handle when argument of a template-id is not
5115 template parameter dependent.
5116 (template_args_equal): Handle when TREE_CODE's do not match.
5118 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
5120 * lang-specs.h (c++): When invoking the stand-alone preprocessor
5121 for -save-temps, pass all relevant -Defines to it, and then don't
5122 pass them to cc1plus.
5124 2000-12-05 Will Cohen <wcohen@redhat.com>
5126 * decl.c (finish_case_label): Cleared
5127 more_cleanups_ok in surrounding function scopes.
5128 (define_label): Likewise.
5130 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
5132 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
5133 (get_matching_virtual): Remove.
5134 (look_for_overrides): Declare new function.
5135 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
5137 * class.c (check_for_override): Move base class iteration code
5138 to look_for_overrides.
5139 * search.c (next_baselink): Remove.
5140 (get_virtuals_named_this): Remove.
5141 (get_virtual_destructor): Remove.
5142 (tree_has_any_destructors_p): Remove.
5143 (struct gvnt_info): Remove.
5144 (check_final_overrider): Remove `virtual' from error messages.
5145 (get_matching_virtuals): Remove. Move functionality to ...
5146 (look_for_overrides): ... here, and ...
5147 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
5150 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
5152 * typeck.c (get_delta_difference): If via a virtual base,
5154 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
5157 2000-12-04 Richard Henderson <rth@redhat.com>
5159 * error.c (dump_tree): Use output_add_string not OB_PUTS.
5161 2000-12-04 Jason Merrill <jason@redhat.com>
5163 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
5164 (write_builtin_type): Pass intSI_type_node and the like through
5166 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
5167 Pass intSI_type_node and the like through type_for_mode.
5168 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
5169 * pt.c (tsubst, unify): Likewise.
5170 * tree.c (walk_tree): Likewise.
5171 * error.c (dump_type): Likewise.
5172 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
5174 * Make-lang.in: Tweak top comment for emacs.
5177 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
5179 * class.c (clone_function_decl): Robustify.
5181 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
5183 * decl.c (store_bindings): Only search in the non modified
5184 old_bindings for duplicates.
5186 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
5188 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
5191 * typeck.c (build_static_cast): Remove unused variable.
5193 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
5195 * pt.c: Fix typo in comment.
5197 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
5199 * decl2.c (warn_format): Remove definition.
5200 (lang_decode_option): Handle -Wformat-nonliteral,
5201 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
5203 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
5205 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
5206 (init_decl_processing): Don't create string_type_node,
5207 const_string_type_node, wint_type_node, intmax_type_node,
5208 uintmax_type_node, default_function_type, ptrdiff_type_node and
5209 unsigned_ptrdiff_type_node. Adjust position of call to
5210 c_common_nodes_and_builtins.
5211 (identifier_global_value): New function.
5213 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
5215 * call.c (standard_conversion): Reject pointer to member
5216 conversions from ambiguous, inaccessible or virtual bases.
5217 * typeck.c (build_static_cast): Don't check pointers to members
5220 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
5222 * method.c (do_build_copy_constructor): Preserve cv
5223 qualifications when accessing source object members.
5224 (do_build_assign_ref): Likewise. Remove separate diagnostics for
5227 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
5229 * method.c (do_build_assign_ref): Construct appropriately
5230 CV-qualified base reference. Don't allow const casts in base
5233 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
5235 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
5236 incomplete return type.
5238 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
5240 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
5241 * semantics.c (finish_base_specifier): Accept a _TYPE not a
5244 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
5246 * spew.c (yyerror): Cope if yylval.ttype is NULL.
5248 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
5250 * decl.c (grokdeclarator): Diagnose undefined template contexts.
5252 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
5254 * decl.c (grokdeclarator): Do type access control on friend
5257 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
5259 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
5260 bison parser ickiness.
5261 * pt.c (tsubst_friend_function): Enter namespace scope when
5262 tsubsting the function name.
5263 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
5265 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
5267 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
5268 * cvt.c (cp_convert_to_pointer): Add force parameter.
5269 Allow conversions via virtual base if forced.
5270 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
5271 (ocp_convert): Likewise.
5272 * search.c (binfo_from_vbase): Return the virtual base's binfo.
5273 * typeck.c (get_delta_difference): Adjust handling of virtual
5276 2000-11-26 Mark Mitchell <mark@codesourcery.com>
5278 * tree.c (struct list_hash): Remove.
5279 (list_hash_table): Make it be an htab.
5280 (struct list_proxy): New type.
5281 (list_hash_eq): New function.
5282 (list_hash_pieces): Renamed from ...
5283 (list_hash): ... this.
5284 (list_hash_lookup): Remove.
5285 (list_hash_add): Remove.
5286 (hash_tree_cons): Use the generic hashtable.
5287 (mark_list_hash): Remove.
5288 (init_tree): Create the hashtable.
5290 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
5292 * method.c (build_mangled_C9x_name): Rename to
5293 build_mangled_C99_name. Change C9X references in comments to
5296 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
5298 * parse.y (unary_expr): Move VA_ARG from here ...
5299 (primary): ... to here.
5301 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
5303 * semantics.c (finish_id_expr): If type is error_mark, return
5306 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
5308 * pt.c (lookup_template_class): Simplify loop exit constructs.
5309 Cope when there is no partial instantiation of a template
5312 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
5314 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
5316 2000-11-22 Mark Mitchell <mark@codesourcery.com>
5318 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
5321 * pt.c (do_decl_instantiate): Explicitly clone constructors and
5322 destructors that haven't already been cloned.
5324 2000-11-20 Richard Henderson <rth@redhat.com>
5326 * parse.y (yyparse_1): Rename the parser entry point.
5328 2000-11-20 Alex Samuel <samuel@codesourcery.com>
5330 * mangle.c (write_name): Use <unscoped-name> for names directly in
5332 (write_unscoped_name): Accept names directly in function scope.
5334 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
5336 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
5337 * parse.y (extdef): Add EXPORT reduction.
5338 * spew.c (yylex): Don't skip export here.
5340 2000-11-19 Mark Mitchell <mark@codesourcery.com>
5342 * decl.c (init_decl_processing): Correct name of pure virtual
5343 function under the new ABI.
5344 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
5345 (throw_bad_typeid): Likewise for bad typeid function.
5347 2000-11-18 Mark Mitchell <mark@codesourcery.com>
5349 * decl.c (grokparms): Don't even function types of `void' type,
5351 * mangle.c (write_type): Don't crash when confronted with the
5354 * decl.c (grokparms): Don't create parameters of `void' type.
5356 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
5358 * lex.c (mark_impl_file_chain): Delete.
5359 (init_parse): Remove call to ggc_add_string_root. No need to
5360 ggc_strdup a string constant. Do not add impl_file_chain to GC
5362 (handle_pragma_implementation): No need to ggc_strdup main_filename.
5364 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
5366 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
5368 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
5370 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
5371 * decl.c (grokdeclarator): Don't reject void parms here.
5372 (require_complete_types_for_parms): Simplify, use
5373 complete_type_or_else.
5374 (grokparms): Remove bitrot. Remove funcdef parm.
5375 Deal with ellipsis parm lists here.
5376 * semantics.c (finish_parmlist): Don't append void_list_node
5377 here. Set PARMLIST_ELLIPSIS_P.
5379 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
5381 * typeck2.c (incomplete_type_error): Reorganise to avoid
5382 excessive diagnostics.
5384 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
5386 * lex.c (struct impl_files, internal_filename): Constify a char *.
5388 2000-11-16 Mark Mitchell <mark@codesourcery.com>
5390 * mangle.c (write_special_name_constructor): Don't generate
5391 assembler junk when confronted with an old-style constructor.
5392 (write_special_name_destructor): Likewise.
5393 (mangle_decl_string): Do it here instead.
5395 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
5397 * call.c (op_error): Make error messages clearer.
5399 2000-11-15 Mark Mitchell <mark@codesourcery.com>
5401 * decl.c (wrapup_globals_for_namespace): Don't mark things
5402 TREE_ASM_WRITTEN when they're not.
5404 2000-11-15 Jason Merrill <jason@redhat.com>
5406 * typeck2.c (friendly_abort): Uncount the error before handing
5409 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
5411 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
5413 2000-11-14 Mark Mitchell <mark@codesourcery.com>
5415 * class.c (build_vtbl_initializer): Fix typo in comment.
5416 * typeck.c (expr_sizeof): Don't crash on errors.
5418 2000-11-14 Jim Wilson <wilson@redhat.com>
5420 * lang-specs.h: Add %2 after %(cc1_options).
5422 2000-11-14 Richard Henderson <rth@redhat.com>
5424 * typeck.c (c_sizeof): Be strict about casting result value
5425 back to c_size_type_node.
5426 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
5428 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
5430 * typeck.c (build_unary_op): Use boolean_increment from
5431 c-common.c, moving the relevant code there.
5433 2000-11-11 Jason Merrill <jason@redhat.com>
5435 * typeck.c (mark_addressable): Don't call put_var_into_stack.
5437 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
5440 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5442 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
5443 * lex.c (copy_lang_decl): Likewise.
5445 2000-11-09 Mark Mitchell <mark@codesourcery.com>
5447 * dump.c (cp_dump_tree): Don't dump function bodies here.
5449 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
5450 (dump.o): Update dependency list.
5451 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
5452 (flag_dump_translation_unit): Likewise.
5453 (CP_TYPE_QUALS): Adjust definition.
5454 (DECL_C_BIT_FIELD): Remove.
5455 (SET_DECL_C_BIT_FIELD): Likewise.
5456 (CLEAR_DECL_C_BIT_FIELD): Likewise.
5457 (add_maybe_template): Likewise.
5458 (strip_array_types): Likewise.
5459 (dump_node_to_file): Likewise.
5460 (cp_dump_tree): New function.
5461 * decl.c (init_decl_processing): Set lang_dump_tree.
5462 * decl2.c (flag_dump_translation_unit): Remove.
5463 * dump.c: Move most of it to ../c-dump.c.
5464 (cp_dump_tree): New function.
5465 * pt.c (add_maybe_template): Remove.
5466 * typeck.c (strip_array_types): Likewise.
5468 2000-11-07 Eric Christopher <echristo@redhat.com>
5470 * decl.c (init_decl_processing): Change definition of
5471 __wchar_t to wchar_t. Remove artificial declaration of
5473 * lex.c: Change instances of __wchar_t to wchar_t.
5475 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
5477 * lex.c (do_identifier): Don't lookup_name for operators.
5478 * parse.y (operator): Save looking_for_typename.
5479 (unoperator): Restore it.
5480 * spew.c (frob_opname): Use nth_token for lookahead.
5482 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
5484 * decl.c (grok_op_properties): Always use coerce_new_type and
5486 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
5487 exception specification. Tidy up.
5488 (coerce_delete_type): Preserve exception specification. Tidy up.
5490 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
5492 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
5493 (push_binding_level), error.c (cp_tree_printer), pt.c
5494 (process_partial_specialization, tsubst_template_arg_vector),
5495 search.c (lookup_member): Use memset () instead of bzero ().
5497 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
5499 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
5501 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
5503 * Make-lang.in (c++.distdir): Remove.
5505 2000-11-04 Mark Mitchell <mark@codesourcery.com>
5507 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
5508 declarations from different namespaces to be combined.
5510 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
5512 * decl.c: Include tm_p.h.
5514 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
5516 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
5518 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
5520 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
5521 (build_overload_value), repo.c (open_repo_file), xref.c
5522 (open_xref_file): Use strchr () and strrchr () instead of index ()
5525 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
5527 * call.c (build_over_call): Call fold on the CALL_EXPR.
5529 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
5531 * error.c (dump_template_decl): Separate template hearders with
5534 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
5536 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
5537 TS_* flags with corresponding TFF_*. Adjust prototypes of
5538 functions (which used to take a tree_string_flags) to take an int.
5540 * cp-tree.h (enum tree_string_flags): Remove
5541 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
5542 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
5543 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
5544 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
5545 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
5546 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
5547 (type_as_string, decl_as_string, expr_as_string,
5548 context_as_string): Adjust prototype.
5550 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
5551 instead of TS_PLAIN.
5553 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
5554 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
5557 2000-10-30 Mark Mitchell <mark@codesourcery.com>
5559 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
5560 (linkage_kind): New enumeration.
5561 (decl_linkage): New function.
5562 * decl2.c (comdat_linkage): Extend comment.
5563 * error.c (dump_function_decl): Print the arguments used to
5564 instantiate a template, even when not printing the type of the
5566 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
5567 not TREE_PUBLIC, to test for external linkage.
5568 * tree.c (decl_linkage): New function.
5570 2000-10-28 Mark Mitchell <mark@codesourcery.com>
5572 * pt.c (instantiate_decl): Always instantiate static data members
5573 initialized in-class.
5575 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
5577 * Make-lang.in: Move all build rules here from Makefile.in,
5578 adapt to new context. Wrap all rules that change the current
5579 directory in parentheses. Expunge all references to $(P).
5580 When one command depends on another and they're run all at
5581 once, use && to separate them, not ;. Add OUTPUT_OPTION to
5582 all object-file generation rules. Delete obsolete variables.
5584 * Makefile.in: Delete.
5585 * config-lang.in: Delete outputs= line.
5587 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
5589 * error.c (dump_function_decl): Print no space between
5590 `ptr-operator' the `type-specifier' of the return type.
5591 (dump_type_prefix): Make sure we put space at the appropriate
5594 2000-10-23 Jason Merrill <jason@redhat.com>
5596 * call.c (equal_functions): Also call decls_match for extern "C" fns.
5598 2000-10-22 Jason Merrill <jason@redhat.com>
5600 * call.c (build_conditional_expr): Use ocp_convert to force
5603 2000-10-22 Mark Mitchell <mark@codesourcery.com>
5605 * call.c (standard_conversion): Use RVALUE_CONVs for all
5606 expressions that satisfy lvalue_p, not just those that satisfy
5609 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
5611 * typeck.c (c_sizeof): Return an expression of `size_t' type,
5612 not one with TYPE_IS_SIZETYPE set.
5613 (dubious_conversion_warnings): Remove special-case code.
5615 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
5617 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
5618 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
5619 (dump_type_prefix): Print vector-of-int as 'int vector'.
5620 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
5621 * tree.c (walk_tree): Handle VECTOR_TYPE.
5623 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
5625 2000-10-21 Jason Merrill <jason@redhat.com>
5627 * parse.y (operator): Set got_object from got_scope.
5628 Set looking_for_typename.
5629 * decl.c (lookup_name_real): Clear val after setting from_obj.
5630 Reorganize diagnostic.
5632 2000-10-20 Jason Merrill <jason@redhat.com>
5634 * tree.c (walk_tree): Don't walk into default args.
5636 * error.c (dump_expr): Use host_integerp.
5638 2000-10-20 David Edelsohn <edelsohn@gnu.org>
5640 * typeck2.c (abstract_virtuals_error): Use "because" instead of
5641 "since" in error message.
5643 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5645 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
5647 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
5649 * decl.c (revert_static_member_fn): Fixed typo.
5651 2000-10-19 Mark Mitchell <mark@codesourcery.com>
5653 * class.c (subobject_offset_fn): New type.
5654 (dfs_record_base_offsets): Remove.
5655 (record_base_offsets): Likewise.
5656 (dfs_search_base_offsets): Likewise.
5657 (record_subobject_offset): New function.
5658 (check_subobject_offset): Likewise.
5659 (walk_subobject_offsets): Likewise.
5660 (record_subobject_offsets): Likewise.
5661 (layout_conflict_p): Reimplement.
5662 (layout_nonempty_base_or_field): Correct handling of type
5663 conflicts during layout.
5664 (layout_empty_base): Likewise.
5665 (build_base_field): Adjust to handle new representation of empty
5667 (build_base_fields): Likewise.
5668 (layout_virtual_bases): Likewise.
5669 (splay_tree_compare_integer_csts): New function.
5670 (layout_class_type): Use a splay_tree, rather than a varray, to
5671 represent the offsets of empty bases.
5673 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
5674 * decl.c (select_decl): Don't return declarations that are
5677 2000-10-18 Mark Mitchell <mark@codesourcery.com>
5679 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
5680 (fake_std_node): New macro.
5681 * decl.c (in_std): Rename to ...
5682 (in_fake_std): ... this.
5683 (flag_no_builtin): Remove.
5684 (flag_no_nonansi_builtin): Likewise.
5685 (walk_namespaces_r): Use fake_std_node.
5686 (push_namespace): Use std_identifier.
5687 (pop_namespace): Use in_fake_std.
5688 (lookup_name_real): Use fake_std_node.
5689 (init_decl_processing): When -fhonor-std, create the `std'
5690 namespace. Don't create a dummy fake_std_node in that case.
5691 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
5692 (builtin_function): Put builtins whose names don't begin
5693 with `_' in the std namespace.
5694 * decl2.c (flag_no_builtin): Remove.
5695 (flag_no_nonansi_builtin): Likewise.
5696 (set_decl_namespace): Use fake_std_node.
5697 (validate_nonmember_using_decl): Likewise.
5698 (do_using_directive): Likewise.
5699 (handle_class_head): Likewise.
5700 * dump.c (dequeue_and_dump): Likewise.
5701 * except.c (init_exception_processing): Use std_identifier.
5702 * init.c (build_member_call): Use fake_std_node.
5703 * rtti.c (init_rtti_processing): Use std_identifier.
5705 2000-10-17 Mark Mitchell <mark@codesourcery.com>
5707 * cp-tree.h (back_end_hook): Remove declaration.
5708 * decl2.c (back_end_hook): Remove definition.
5710 * dump.c (dequeue_and_dump): Dump TREE_USED.
5712 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
5714 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
5716 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
5718 * decl.c (WINT_TYPE): Define.
5719 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
5720 c_size_type_node, signed_size_type_node and wint_type_node.
5722 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
5724 * decl2.c (warn_missing_format_attribute): New variable.
5725 (lang_decode_option): Decode -Wmissing-format-attribute.
5727 2000-10-16 Mark Mitchell <mark@codesourcery.com>
5729 * typeck.c (qualify_type): Remove.
5730 (composite_pointer_type): Fix handling of conversions to `cv void*'.
5732 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5734 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
5736 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5738 * Makefile.in (parse.c, parse.h): Create atomically.
5740 2000-10-12 Mark Mitchell <mark@codesourcery.com>
5742 * class.c (current_obstack): Remove.
5743 * decl.c (ggc_p): Remove.
5744 (start_decl): Don't use decl_tree_cons.
5745 (grokdeclarator): Don't use build_decl_list.
5746 (start_function): Don't use decl_tree_cons.
5747 (finish_function): Don't mess with obstacks.
5748 * decl2.c (grok_x_components): Don't use build_decl_list.
5749 * lex.c (make_call_declarator): Don't call decl_tree_cons.
5750 (implicitly_declare_fn): Don't call build_decl_list.
5751 * parse.y (frob_specs): Don't call build_decl_list or
5753 (expr_or_declarator_intern): Don't call decl_tree_cons.
5754 (primary): Don't call build_decl_list.
5755 (fcast_or_absdcl): Likewise.
5756 (typed_declspecs): Don't call decl_tree_cons.
5757 (reserved_declspecs): Don't call build_decl_list.
5758 (declmods): Likewise.
5759 (reserved_typespecquals): Likewise.
5761 (new_type_id): Likewise.
5762 (cv_qualifiers): Likewise.
5763 (after_type_declarator_intern): Likewise.
5764 (notype_declarator_intern): Likewise.
5765 (absdcl_intern): Likewise.
5766 (named_parm): Likewise.
5767 * pt.c (most_specialized_class): Likewise.
5768 * repo.c (temporary_obstack): Make it a structure, not a pointer.
5769 (init_repo): Initialize it.
5770 * search.c (current_obstack): Remove.
5771 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
5773 2000-10-09 Richard Henderson <rth@cygnus.com>
5775 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
5776 (c++ language support bits for libgcc): Remove.
5777 (c++.clean): Remove cplib2.txt cleanup.
5778 * config-lang.in (headers, lib2funcs): Remove.
5780 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
5781 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
5782 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
5783 * inc/new.h, inc/typeinfo: Remove files.
5785 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
5787 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
5789 (init_decl_processing): Initialize intmax_type_node and
5792 2000-10-06 Richard Henderson <rth@cygnus.com>
5794 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
5795 (original_result_rtx): Remove.
5796 * decl.c (save_function_data): Don't clear x_result_rtx.
5797 (mark_lang_function): Don't mark it either.
5798 * expr.c (fixup_result_decl): Remove.
5799 * semantics.c (genrtl_named_return_value): Frob the return decl
5800 before calling emit_local_var.
5801 (genrtl_finish_function): Don't call fixup_result_decl.
5802 Always emit the jump to return_label.
5804 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
5806 * pt.c (lookup_template_class): Set current access for enum.
5807 (tsubst_enum): Set file & line for enum decl.
5809 * spew.c (yylex): Remove unused variable.
5811 2000-10-05 Richard Henderson <rth@cygnus.com>
5813 * semantics.c (genrtl_finish_function): Don't init or check
5814 can_reach_end; remove noreturn and return value checks.
5816 2000-10-05 Tom Tromey <tromey@cygnus.com>
5818 * init.c (build_java_class_ref): Use `build_static_name' with a
5819 suffix, not a prefix, to build the class object's name.
5821 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
5823 * cp-tree.h (access_kind): Fix comment typo.
5824 * decl2.c (grokfield): Fix diagnostic typo.
5825 * semantics.c (finish_template_type): Fix comment typo.
5826 (finish_qualified_object_call_expr): Likewise.
5828 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
5830 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
5833 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
5835 * spew.c (frob_id): New static function.
5836 (frob_opname): Use it.
5839 2000-10-01 Mark Mitchell <mark@codesourcery.com>
5841 * decl.c (lang_mark_false_label_stack): Remove.
5842 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
5844 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
5846 * gxxint.texi: Use @email for formatting email addresses.
5848 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
5850 * error.c: Remove direct obstack manipulation. Replace with
5851 output_buffer-based formatting. Adjust calls to removed macros.
5852 (obstack_chunk_alloc, obstack_chunk_free): Remove.
5853 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
5854 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
5856 2000-09-24 Mark Mitchell <mark@codesourcery.com>
5858 * ir.texi: Move to ../c-tree.texi.
5860 2000-09-20 Jason Merrill <jason@redhat.com>
5862 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
5864 2000-09-21 Andreas Jaeger <aj@suse.de>
5866 * errfn.c: Move declaration of cp_printer and cp_printers to ...
5867 * cp-tree.h: ... here.
5869 * error.c: Remove declaration of cp_printer.
5871 2000-09-20 Mark Mitchell <mark@codesourcery.com>
5873 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
5875 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
5877 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
5880 2000-09-18 Mark Mitchell <mark@codesourcery.com>
5882 * decl.c (start_function): Robustify.
5884 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5886 * cp-tree.h (check_function_format): Accept a `status' parameter.
5888 * call.c, typeck.c: Updates calls to `check_function_format'.
5890 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
5892 * decl2.c (handle_class_head): Always push some scope even
5895 2000-09-16 Mark Mitchell <mark@codesourcery.com>
5897 * cp-tree.h (struct cp_language_function): Remove
5898 x_scope_stmt_stack and name_declared.
5899 (current_scope_stmt_stack): Remove.
5900 (function_name_declared_p): New macro.
5901 (struct lang_decl_flags): Use c_lang_decl as a base class.
5903 (struct lang_decl): Replace saved_tree with context.
5904 (DECL_FRIEND_CONTEXT): Adjust accordingly.
5905 (SET_DECL_FRIEND_CONTEXT): Likewise.
5906 (DECL_VIRTUAL_CONTEXT): Likewise.
5907 (DECL_SAVED_TREE): Remove.
5908 (C_DECLARED_LABEL_FLAG): Likewise.
5909 (cplus_expand_expr_stmt): Don't declare.
5910 (add_decl_stmt): Likewise.
5911 (add_scope_stmt): Likewise.
5912 * decl.c (mark_stmt_tree): Remove.
5913 (case_compare): Likewise.
5914 (finish_case_label): Use c_add_case_label.
5915 (init_decl_processing): Set more language-specific hooks.
5916 (build_enumerator): Fix typo in comment.
5917 (cplus_expand_expr_stmt): Remove.
5918 (mark_lang_function): Use mark_c_language_function.
5919 (lang_mark_tree): Use c_mark_lang_decl.
5920 * decl2.c: Change order of inclusion.
5921 * except.c: Likewise.
5922 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
5923 back on c_expand_expr.
5924 * friend.c: Include expr.h.
5925 * init.c: Change order of inclusion.
5926 * Makefile.in: Update dependencies.
5927 * lex.h (free_lang_decl_chain): Remove.
5928 * optimize.c (maybe_clone_body): Use function_name_declared_p.
5929 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
5931 (instantiate_decl): Use function_name_declared_p.
5932 * semantics.c (lang_expand_expr_stmt): Remove.
5933 (set_current_function_name_declared): Likewise.
5934 (current_function_name_declared): Likewise.
5935 (begin_compound_stmt): Use function_name_declared_p.
5936 (add_decl_stmt): Remove.
5937 (setup_vtbl_ptr): Use function_name_declared_p.
5938 (add_scope_stmt): Remove.
5939 (current_scope_stmt_stack): New function.
5940 (cp_expand_stmt): Don't handle SCOPE_STMTs.
5941 (expand_body): Use function_name_declared_p.
5942 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
5943 * typeck.c: Change order of includes.
5944 (convert_sequence): Remove.
5946 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
5948 * lex.c (reswords): Add _Complex.
5950 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5952 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
5954 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
5956 * init.c (begin_init_stmts): Don't use // comments.
5958 2000-09-12 Jason Merrill <jason@redhat.com>
5960 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
5961 all non-extern arrays.
5963 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
5964 typenames, too. Downgrade complaint to pedwarn.
5965 (xref_tag): Warn about surprising behavior of 'friend struct T'.
5966 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
5967 'class This::Inherited'.
5969 2000-09-12 Mark Mitchell <mark@codesourcery.com>
5971 * decl.c (finish_case_label): Given the LABEL_DECL a
5974 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
5976 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
5977 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
5978 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
5979 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
5980 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
5982 (sorry_for_unsupported_tree, print_scope_operator,
5983 print_left_paren, print_right_paren, print_left_bracket,
5984 print_right_bracket, print_whitespace): Likewise.
5985 (aggr_variety): Rename to class_key_or_enum.
5986 (print_type): Rename to print_type_id.
5987 (print_type_specifier_seq, print_simple_type_specifier,
5988 print_elaborated_type_specifier,
5989 print_rest_of_abstract_declarator,
5990 print_parameter_declaration_clause, print_exception_specification,
5991 print_nested_name_specifier, print_template_id,
5992 typedef_original_name, print_template_argument_list_start,
5993 print_template_argument_list_end): New functions.
5995 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
5997 * ir.texi: Add more documentation.
5999 2000-09-11 Mark Mitchell <mark@codesourcery.com>
6001 * cp-tree.h (struct saved_scope): Remove x_function_parms.
6002 (current_function_parms): Don't define.
6003 (struct cp_language_function): Remove parms_stored.
6004 (current_function_just_assigned_this): Don't define.
6005 (current_function_parms_stored): Likewise.
6006 (static_ctors): Declare.
6007 (static_dtors): Likewise.
6008 (SF_EXPAND): Don't define.
6009 (expand_start_early_try_stmts): Remove declaration.
6010 (store_parm_decls): Likewise.
6011 * decl.c (static_ctors): Don't declare.
6012 (static_dtors): Likewise.
6013 (struct binding_level): Remove this_block.
6014 (poplevel): Remove dead code.
6015 (set_block): Likewise.
6016 (mark_binding_level): Don't mark this_block.
6017 (mark_saved_scope): Don't mark x_function_parms.
6018 (init_decl_processing): Don't add current_function_parms as a GC
6020 (check_function_type): Change prototype.
6021 (start_function): Remove RTL-generation code.
6022 (expand_start_early_try_stmts): Remove.
6023 (store_parm_decls): Give it internal linkage. Remove
6024 RTL-generation code.
6025 (finish_function): Remove RTL-generation code.
6026 * decl2.c (static_ctors): Fix formatting.
6027 (static_dtors): Likewise.
6028 * method.c (use_thunk): Don't call store_parm_decls.
6029 (synthesize_method): Likewise.
6030 * optimize.c (maybe_clone_body): Likewise.
6031 * parse.y (fn.def2): Likewise.
6032 (.set_base_init): Likewise.
6033 (nodecls): Likewise.
6034 * pt.c (instantiate_decl): Likewise.
6035 * rtti.c (synthesize_tinfo_fn): Likewise.
6036 * semantics.c (genrtl_try_block): Simplify.
6037 (expand_body): Use genrtl_start_function and
6038 genrtl_finish_function.
6039 (genrtl_start_function): New function.
6040 (genrtl_finish_function): Likewise.
6042 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
6044 * error.c (cp_tree_printer, case 'P'): Append break.
6046 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
6048 * cp-tree.h (frob_opname): Declare.
6049 * parse.y (saved_scopes): New static variable.
6050 (cp_parse_init): Adjust.
6051 (do_id): If lastiddecl is NULL, do do_identifier.
6052 (operator): Save scope information.
6053 (unoperator): New reduction. Restore scope information.
6054 (operator_name): Append unoperator. Call frob_opname.
6055 * spew.c (frob_opname): Define.
6057 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
6059 * decl.c, rtti.c: Include defaults.h if not already included.
6060 Don't define the *_TYPE_SIZE macros.
6062 2000-09-09 Mark Mitchell <mark@codesourcery.com>
6064 * cp-tree.h (push_switch): Change prototype.
6065 (check_cp_case_value): Remove declaration.
6066 (decl_constant_value): Likewise.
6067 * decl.c (struct cp_switch): Add switch_stmt and cases.
6068 (case_compare): New function.
6069 (push_switch): Set switch_stmt. Initialize cases.
6070 (pop_switch): Clean up cases.
6071 (define_case_label): Rename to ...
6072 (finish_case_label): ... this. Do semantic analysis for case
6074 (start_function): Correct comment.
6075 * decl2.c (check_cp_case_value): Remove.
6076 * expr.c (do_case): Remove.
6077 * pt.c (tsubst_expr): Adjust call to finish_case_label.
6078 * semantics.c (genrtl_do_poplevel): Remove declaration.
6079 (RECHAIN_STMTS): Remove.
6080 (finish_break_stmt): Use build_break_stmt.
6081 (finish_continue_stmt): Use build_continue_stmt.
6082 (finish_switch_cond): Adjust condition here, rater than in
6083 c_expand_start_case.
6084 (finish_case_label): Remove.
6085 * typeck.c (c_expand_return): Remove.
6086 (c_expand_start_case): Likewise.
6088 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
6090 * ir.texi: Document type nodes.
6092 2000-09-06 Mark Mitchell <mark@codesourcery.com>
6094 * cp-tree.h (init_cp_semantics): Declare.
6095 (genrtl_try_block): Don't declare.
6096 (genrtl_handler): Likewise.
6097 (genrtl_catch_block): Likewise.
6098 (genrtl_ctor_stmt): Likewise.
6099 (genrtl_subobject): Likewise.
6100 (genrtl_do_poplevel): Likewise.
6101 (genrtl_named_return_value): Likewise.
6102 * lex.c (init_parse): Call init_cp_semantics.
6103 * semantics.c (genrtl_try_block): Give it internal linkage.
6104 (genrtl_handler): Likewise.
6105 (genrtl_catch_block): Likewise.
6106 (genrtl_ctor_stmt): Likewise.
6107 (genrtl_subobject): Likewise.
6108 (genrtl_do_poplevel): Likewise.
6109 (genrtl_named_return_value): Likewise.
6110 (lang_expand_stmt): Rename to ...
6111 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
6112 (init_cp_semantics): Define.
6114 * decl.c (initialize_local_var): Remove RTL-generating code.
6115 * semantics.c (genrtl_try_block): Fix formatting.
6117 Move statement-tree facilities from C++ to C front-end.
6118 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
6119 (void_zero_node): Remove.
6120 (stmt_tree): Likewise.
6121 (scope_chain): Adjust.
6122 (language_function): Rename to cp_language_function.
6123 (cp_function_chain): Adjust.
6124 (current_stmt_tree): Remove.
6125 (last_tree): Likewise.
6126 (last_expr_type): Likewise.
6127 (struct lang_decl): Adjust.
6128 (STMT_IS_FULL_EXPR_P): Remove.
6130 (begin_stmt_tree): Likewise.
6131 (finish_stmt_tree): Likewise.
6132 (walk_tree_fn): Likewise.
6133 (walk_stmt_tree): Likewise.
6134 * class.c (finish_struct): Replace use of add_tree with add_stmt.
6135 * decl.c (mark_stmt_tree): Adjust type.
6136 (init_decl_processing): Don't build void_zero_node.
6137 (initialize_local_var): Adjust usage of current_stmt_tree.
6138 (finish_enum): Use add_stmt, not add_tree.
6139 (save_function_data): Adjust use of language_function.
6140 (finish_constructor_body): Use add_stmt, not add_tree.
6141 (finish_destructor_body): Likewise.
6142 (push_cp_function_context): Adjust use of language_function.
6143 (pop_cp_function_context): Likewise.
6144 (mark_lang_function): Likewise.
6145 (mark_cp_function_context): Likewise.
6146 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
6147 (build_vec_init): Likewise.
6148 * semantics.c (SET_LAST_STMT): Remove.
6149 (RECHAIN_STMTS): Don't use it.
6150 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
6151 (current_stmt_tree): Define.
6153 (finish_goto_stmt): Use add_stmt, not add_tree.
6154 (finish_expr_stmt): Likewise.
6155 (begin_if_stmt): Likewise.
6156 (finish_then_clause): Likewise.
6157 (begin_while_stmt): Likewise.
6158 (begin_do_stmt): Likewise.
6159 (finish_return_stmt): Likewise.
6160 (begin_for_stmt): Likewise.
6161 (finish_break_stmt): Likewise.
6162 (finish_continue_stmt): Likewise.
6163 (begin_switch_stmt): Likewise.
6164 (finish_case_label): Likewise.
6165 (begin_try_block): Likewise.
6166 (begin_function_try_block): Likewise.
6167 (begin_handler): Likewise.
6168 (begin_catch_block): Likewise.
6169 (begin_compound_stmt): Likewise.
6170 (begin_asm_stmt): Likewise.
6171 (finish_asm_stmt): Likewise.
6172 (finish_label_stmt): Likewise.
6173 (add_decl_stmt): Likewise.
6174 (finish_subobject): Likewise.
6175 (finish_decl_cleanup): Likewise.
6176 (finish_named_return_value): Likewise.
6177 (setup_vtbl_ptr): Likewise.
6178 (add_scope_stmt): Likewise.
6179 (finish_stmt_expr): Likewise.
6180 (prune_unused_decls): Remove.
6181 (begin_stmt_tree): Likewise.
6182 (finish_stmt_tree): Likewise.
6183 (prep_stmt): Adjust use of current_stmt_tree.
6184 (lang_expand_stmt): Likewise.
6185 * tree.c (statement_code_p): Remove.
6186 (cp_statement_code_p): New function.
6187 (walk_stmt_tree): Remove.
6188 (init_tree): Set lang_statement_code_p.
6190 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
6192 Integrated preprocessor.
6194 * Make-lang.in, Makefile.in: Remove all references to input.c,
6195 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
6196 * gxx.gperf, hash.h, input.c: Delete.
6197 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
6198 initialized properly.
6200 * class.c (fixup_pending_inline): Take a tree, not a
6201 struct pending_inline *. All callers changed.
6202 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
6203 RID_PROTECTED entries in ridpointers[] array here.
6204 * decl.c (duplicate_decls): Do not refer to struct
6206 (record_builtin_type, init_decl_processing): Use RID_MAX not
6208 (grokdeclarator): Use C_IS_RESERVED_WORD.
6209 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
6211 (grok_x_components): Do not inspect pending_inlines chain.
6213 * cp-tree.h (struct lang_identifier): Add rid_code entry.
6214 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
6215 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
6216 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
6217 TIME_IDENTIFIER_FILEINFO): Kill.
6219 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
6221 * parse.y: Call do_pending_inlines unconditionally.
6222 reinit_parse_for_method is now snarf_method. fn.defpen is no
6223 longer necessary. Remove unnecessary <itype> annotation on
6224 SCOPE. Do not refer to end_of_file or struct pending_inline.
6225 * semantics.c (begin_inline_definitions): Call
6226 do_pending_inlines unconditionally.
6228 * lex.c: Remove all code now shared with C front end.
6229 Initialize cpplib properly if USE_CPPLIB. Put reserved words
6230 into the get_identifier table. Rewrite pragma handling to
6231 work with the registry. Move code to save tokens for later
6232 processing to spew.c.
6234 * spew.c: Rewrite everything in terms of token streams instead
6235 of text. Move routines here from lex.c / input.c as
6236 appropriate. GC-mark trees hanging off the pending inlines
6239 2000-09-06 Mark Mitchell <mark@codesourcery.com>
6241 * NEWS: Mention that the named return value extension has been
6243 * cp-tree.h (original_result_rtx): Define.
6244 (TREE_REFERENCE_EXPR): Remove.
6245 (DECL_VPARENT): Likewise.
6246 (pushdecl_nonclass_level): Likewise.
6247 (store_return_init): Likewise.
6248 (reinit_lang_specific): Likewise.
6249 (genrtl_named_return_value): Change prototype.
6250 * decl.c (original_result_rtx): Remove.
6251 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
6252 Do not generate RTL for local variables here.
6253 (store_return_init): Remove.
6254 * semantics.c (genrtl_named_return_value): Simplify. Fold in
6256 (finish_named_return_value): Adjust accordingly. Warn that this
6257 extension is deprecated.
6258 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
6260 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
6262 * pt.c (type_unification_real): Replace switch with if.
6263 (unify): Tsubst non-type parms before comparing.
6265 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
6267 * error.c (dump_typename): New function, broken out of ...
6268 (dump_type): ... here. Use it.
6269 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
6271 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
6273 * init.c (build_offset_ref): Deal with namespace scoped
6276 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
6278 * class.c (resolve_address_of_overloaded_function): Add
6279 explanation message.
6280 * decl.c (define_case_label): Reformat explanation.
6281 * decl2.c (finish_static_data_member_decl): Likewise.
6282 (grokfield): Likewise.
6283 * friend.c (do_friend): Likewise.
6285 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
6287 * tree.c (walk_tree): Expose tail recursion.
6288 (walk_stmt_tree): New function.
6289 * cp-tree.h: Prototype walk_stmt_tree.
6290 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
6291 the BLOCKs directly. If a BLOCK has no variables after
6292 pruning, discard it.
6293 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
6294 restore the line number.
6296 2000-09-05 Mark Mitchell <mark@codesourcery.com>
6298 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
6299 (pt.o): Remove dependency on HTAB_H.
6300 * cp-tree.h: Include hashtab.h.
6301 (walk_tree): Change prototype.
6302 (walk_tree_without_duplicates): New function.
6303 * decl.c (check_default_argument): Use it.
6304 * optimize.c (remap_decl): Adjust calls to walk_tree.
6305 (copy_body): Likewise.
6306 (expand_calls_inline): Likewise.
6307 (calls_setjmp_p): Use walk_tree_without_duplicates.
6308 * pt.c: Don't include hashtab.h.
6309 (for_each_template_parm): Use walk_tree_without_duplicates.
6310 * semantics.c (finish-stmt_tree): Likewise.
6311 (expand_body): Likewise.
6312 * tree.c (walk_tree): Add additional parameter.
6313 (walk_tree_without_duplicates): New function.
6314 (count_trees): Use it.
6315 (verify_stmt_tree): Adjust call to walk_tree.
6316 (find_tree): Use walk_tree_without_duplicates.
6317 (no_linkage_check): Likewise.
6318 (break_out_target_exprs): Adjust call to walk_tree.
6319 (cp_unsave): Likewise.
6321 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
6323 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
6324 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
6325 * cp-tree.h (TYPE_BINFO): Adjust comment.
6326 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
6327 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
6328 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6329 (TYPE_TEMPLATE_INFO): Likewise.
6330 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
6331 * class.c (push_nested_class): Likewise.
6332 * decl.c (lookup_name_real): Likewise.
6333 (grokdeclarator): Likewise.
6334 (grok_op_properties): Likewise.
6335 (xref_tag): Likewise.
6336 (xref_basetypes): Likewise.
6337 * decl2.c (constructor_name_full): Likewise.
6338 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
6339 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
6340 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
6341 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6342 (dump_type_suffix): Likewise.
6343 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
6345 (get_aggr_from_typedef): Likewise.
6346 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
6347 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6348 (write_template_parm): Likewise.
6349 (write_template_template_parm): Check tree code instead of
6350 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6351 * method.c (build_overload_nested_name): Add
6352 BOUND_TEMPLATE_TEMPLATE_PARM.
6353 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
6354 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6355 * pt.c (convert_template_argument): Check tree code instead of
6356 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6357 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
6358 (for_each_template_parm): Adjust comment.
6359 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
6360 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6361 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
6362 template_args_equal to compare template template parameter cases.
6363 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6364 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
6366 * tree.c (copy_template_template_parm): Decide whether to create
6367 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
6368 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
6369 (copy_tree_r): Likewise.
6370 * typeck.c (comptypes): Likewise. Check tree code instead of
6371 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
6373 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
6375 * decl.c (finish_function): Move the code for handling functions
6376 marked with the constructor and destructor attributes inside the
6379 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
6381 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
6383 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
6385 * pt.c (lookup_template_class): Remove abort.
6386 * tree.c (get_type_decl): Allow error_mark_node.
6388 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
6390 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
6393 2000-09-03 Mark Mitchell <mark@codesourcery.com>
6395 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
6398 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
6400 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
6401 union tag mismatch error reporting.
6403 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
6405 * call.c (build_scoped_method_call): Check it is not a namespace.
6407 2000-08-30 Jason Merrill <jason@redhat.com>
6409 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
6411 * tree.c (bot_manip): Check TREE_CONSTANT rather than
6412 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
6413 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
6415 * decl.c (start_function): Always call make_function_rtl.
6417 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
6419 * semantics.c (prune_unused_decls): New function.
6420 (finish_stmt_tree): Call it via walk_tree.
6422 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
6424 * class.c (build_secondary_vtable): Constify a char *.
6425 * decl.c (init_decl_processing): Initialize function_id_node,
6426 pretty_function_id_node, and func_id_node.
6427 * input.c (struct input_source): Constify 'str'.
6428 (feed_input): Constify first argument.
6429 * mangle.c (write_identifier): Constify argument.
6430 * pt.c (mangle_class_name_for_template): Constify argument.
6432 2000-08-29 Mark Mitchell <mark@codesourcery.com>
6434 * typeck.c (mark_addressable): Remove code that pokes around in
6437 2000-08-28 Jason Merrill <jason@redhat.com>
6439 * lex.c (file_name_nondirectory): Move to toplev.c.
6441 * cp-tree.h (LOCAL_CLASS_P): New macro.
6442 * class.c (finish_struct_1): Use it.
6444 2000-08-27 Alex Samuel <samuel@codesourcery.com>
6446 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
6447 (write_encoding): Pass another argument to write_name.
6448 (write_name): Add ignore_local_scope parameter. Fix handling of
6450 (write_nested_name): Use write_unqualified_name.
6451 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
6452 (write_template_prefix): Use write_unqualified_name.
6453 (write_component): Remove.
6454 (write_local_name): Add parameter. Use direct local entity to
6455 discriminator calculation.
6456 (write_class_enum_type): Pass another argument to write_name.
6457 (write_template_template_arg): Likewise.
6458 (make_guard_variable): Likewise.
6460 2000-08-27 Jason Merrill <jason@redhat.com>
6462 * decl.c (pushdecl): Matching decls for local externs are found in
6463 the current level. Propagate linkage information from previous
6466 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
6468 * ir.texi (Expressions): Fix typo.
6470 2000-08-25 Greg McGary <greg@mcgary.org>
6472 * tree.c (init_tree): Use ARRAY_SIZE.
6474 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
6476 * error.c (cp_tree_printer): Rework.
6478 2000-08-25 Mark Mitchell <mark@codesourcery.com>
6480 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
6482 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
6483 (cp-demangle.o): Remove target.
6484 (dyn-string.o): Likewise.
6486 * decl.c (grokfndecl): Require that `main' return an `int'.
6487 * mangle.c (write_encoding): Don't mangle return types for
6488 conversion functions.
6490 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
6492 * error.c (tree_formatting_info): New data type.
6493 (tree_being_formatted): New macro.
6494 (tree_formatting_flags): Likewise.
6495 (put_whitespace): Likewise.
6496 (print_tree_identifier): Likewise.
6497 (print_identifier): Likewise.
6498 (cp_tree_printer, print_function_argument_list, print_declaration,
6499 print_expression, print_function_declaration,
6500 print_function_parameter, print_type, print_cv_qualifier): New
6502 (init_error): Initialize lang_printer.
6504 2000-08-24 Jason Merrill <jason@redhat.com>
6506 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
6507 adjustment necessary.
6509 2000-08-24 Greg McGary <greg@mcgary.org>
6511 * cp-tree.h (MAIN_NAME_P): Remove macro.
6513 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
6515 * error.c (print_instantiation_context): Don't forget to flush the
6518 2000-08-23 Jason Merrill <jason@redhat.com>
6520 * typeck.c (build_ptrmemfunc): Save the input pmf.
6522 * method.c (process_modifiers): Use same_type_p.
6524 2000-08-23 Mark Mitchell <mark@codesourcery.com>
6526 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
6527 * mangle.c (write_function_type): Change prototype.
6528 (write_encoding): Don't mangle return types for
6529 constructors or destructors.
6530 (write_type): Adjust call to write_function_type.
6531 * pt.c (instantiate_template): Instantiate alternate entry points
6532 when instantiating the main function.
6534 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
6536 * error.c (cp_print_error_function): Don't use embedded '\n' in
6539 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
6541 * decl.c (init_decl_processing): Remove bogus initialization.
6542 * error.c (lang_print_error_function): Restore here.
6543 (init_error): Initialize print_error_function.
6545 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6547 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
6549 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
6551 * Makefile.in (error.o): Depends on diagnostic.h
6553 * cp-tree.h (problematic_instantiation_changed,
6554 record_last_problematic_instantiation, current_instantiation,
6555 print_instantiation_context): Declare.
6556 (maybe_print_template_context): Remove.
6558 * decl.c (init_decl_processing): Set print_error_function to NULL.
6559 (lang_print_error_function): Remove, since we're using a new
6562 * error.c: #include diagnostic.h
6563 (function_category): New function.
6564 (cp_diagnostic_starter): Likewise.
6565 (cp_diagnostic_finalizer): Likewise.
6566 (cp_print_error_function): Likewise.
6567 (maybe_print_instantiation_context): Likewise.
6568 (print_instantiation_full_context): Likewise.
6569 (print_instantiation_partial_context): Likewise.
6570 (print_instantiation_context): Define.
6571 (init_error): Initialize diagnostic pager and finalizer.
6573 * pt.c (problematic_instantiation_changed): Define.
6574 (record_last_problematic_instantiation): Likewise.
6575 (current_instantiation): Likewise.
6576 (maybe_print_template_context): Remove.
6577 (print_template_context): Likewise.
6578 (current_tinst_level): Make static to reflect Brendan Kehoe's
6579 change of 1995-04-13.
6580 (push_tinst_level): Call print_instantiation_context.
6582 2000-08-21 Nix <nix@esperi.demon.co.uk>
6584 * lang-specs.h: Do not process -o or run the assembler if
6587 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
6589 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
6591 * decl2.c (lang_decode_option): Disable gettext attributes for
6594 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
6596 * lex.c (lang_init_options): Default diagnostic message maximum
6597 length to 80, when line-wrapping.
6599 2000-08-20 Mark Mitchell <mark@codesourcery.com>
6601 * class.c (build_vtbl_initializer): Clear the entire
6602 vtbl_init_data. Start keeping track of the functions for which we
6603 have created vcall offsets here.
6604 (dfs_build_vcall_offset_vtbl_entries): Remove.
6605 (build_vcall_offset_vtbl_entries): Reimplement.
6606 (add_vcall_offset_vtbl_entries_r): New function.
6607 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
6608 computing when vcall offsets are necessary.
6610 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6612 * decl.c (member_function_or_else): Use cp_error ... %T.
6613 (grokdeclarator): Likewise.
6614 (start_method): Likewise.
6615 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
6617 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6619 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
6622 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6624 * cp-tree.h (PTRMEM_OK_P): New macro.
6625 (itf_ptrmem_ok): New enumeration value.
6626 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
6627 argument. Diagnose implicit pointer to member.
6628 (instantiate_type): Don't diagnose implicit pointer to member
6629 here. Pass itf_ptrmem_ok if ok. Adjust calls to
6630 resolve_address_of_overloaded_function.
6631 * init.c (build_offset_ref): Set PTRMEM_OK_P.
6632 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
6633 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
6634 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
6635 (build_unary_op): Deal with single non-static member in
6638 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6640 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
6642 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
6644 * cp-tree.h (enum_name_string): Remove prototype.
6645 (report_case_error): Remove prototype.
6646 * cp/typeck2.c (enum_name_string): Remove.
6647 (report_case_error): Remove.
6648 * error.c (dump_expr): Deal with enum values directly.
6649 Correctly negate integer constant.
6651 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6653 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
6654 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
6655 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
6656 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
6657 (__cxa_vec_new): Use __cxa_vec_new2.
6658 (__cxa_vec_delete): Use __cxa_vec_delete2.
6660 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6662 * vec.cc (__cxa_vec_new): Set "C" linkage.
6663 (__cxa_vec_ctor): Likewise.
6664 (__cxa_vec_cctor): Likewise.
6665 (__cxa_vec_dtor): Likewise.
6666 (__cxa_vec_delete): Likewise.
6667 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
6668 (__cxa_vec_ctor): Likewise.
6669 (__cxa_vec_cctor): Likewise.
6670 (__cxa_vec_dtor): Likewise.
6671 (__cxa_vec_delete): Likewise.
6673 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6675 * class.c (instantiate_type): Reinstate local variable
6676 deleted in previous change.
6678 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
6681 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6683 * cp-tree.h (instantiate_type_flags): New enumeration.
6684 (instantiate_type): Change parameter.
6685 * class.c (instantiate_type): Adjust prototype. Adjust.
6686 * call.c (standard_conversion): Adjust instantiate_type call.
6687 (reference_binding): Likewise.
6688 (build_op_delete_call): Likewise.
6689 (convert_like_real): Likewise.
6690 * cvt.c (cp_convert_to_pointer): Likewise.
6691 (convert_to_reference): Likewise.
6692 * pt.c (convert_nontype_argument): Likewise.
6693 * typeck.c (build_binary_op): Likewise.
6694 (build_ptrmemfunc): Likewise.
6695 (convert_for_assignment): Likewise.
6697 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
6699 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
6700 (current_aggr): Define.
6701 * decl.c (grokdeclarator): Make sure a friend class is an
6702 elaborated type specifier.
6703 * parse.y (current_aggr): Remove static definition.
6704 (cp_parse_init): Adjust.
6705 (structsp): Clear and restore current_aggr.
6706 (component_decl_list): Clear current_aggr.
6708 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
6709 aggregate tag on the typename's context.
6711 * pt.c (tsubst_friend_class): Return error_mark_node, if
6713 (instantiate_class_template): Ignore error_mark_node friend types.
6715 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
6717 * cvt.c (warn_ref_binding): New static function, broken out of ...
6718 (convert_to_reference): ... here. Use it.
6720 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
6722 * parse.y (template_arg): Add rule for template qualified with
6725 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
6727 * decl2.c (add_function): Reorganize.
6728 (arg_assoc): Do not consider function template decls.
6730 2000-08-11 Jason Merrill <jason@redhat.com>
6732 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
6735 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
6737 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
6738 (lookup_nested_tag): Likewise.
6740 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
6743 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
6745 * parse.y (named_complex_class_head_sans_basetype): Remove
6748 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
6750 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
6751 explicit TEMPLATE_ID_EXPR args.
6752 (build_expr_from_tree, case CALL_EXPR): Likewise.
6754 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
6756 * decl.c (check_tag_decl): Diagnose typename's which don't
6759 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
6761 * init.c (build_aggr_init): Reject bogus array initializers
6764 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
6766 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
6768 * cp/tinfo.cc (__dynamic_cast): Likewise.
6769 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
6771 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
6773 * cvt.c (convert_to_pointer_force): Fix error message when
6774 attempting to cast from ambiguous base.
6776 2000-08-08 Jason Merrill <jason@redhat.com>
6778 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
6779 (tsubst_template_arg_vector): Likewise.
6781 * decl2.c (build_anon_union_vars): Choose the largest field; don't
6782 assume that one will be as large as the union.
6784 2000-08-07 Kazu Hirata <kazu@hxi.com>
6786 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
6787 * decl.c (pop_labels): Likewise.
6789 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
6791 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
6793 (__pointer_to_member_type_info): Likewise.
6794 (__base_class_info): Likewise.
6795 (__class_type_info): Likewise.
6796 (__si_class_type_info): Likewise.
6797 (__vmi_class_type_info): Likewise.
6798 * tinfo.cc (__si_class_type_info::__do_find_public_src):
6799 Changed member names to match specifications.
6800 (__vmi_class_type_info::__do_find_public_src): Likewise.
6801 (__si_class_type_info::__do_dyncast): Likewise.
6802 (__vmi_class_type_info::__do_dyncast): Likewise.
6803 (__si_class_type_info::__do_upcast): Likewise.
6804 (__vmi_class_type_info::__do_upcast): Likewise.
6805 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
6806 (__pbase_type_info::__pointer_catch): Likewise.
6807 (__pointer_type_info::__pointer_catch): Likewise.
6808 (__pointer_to_member_type_info::__pointer_catch): Likewise.
6810 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
6812 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
6813 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
6814 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
6816 2000-08-04 Mark Mitchell <mark@codesourcery.com>
6818 * cp-tree.h (add_method): Change prototype.
6819 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
6820 Don't double the size of the method vector in the error case.
6821 (handle_using_decl): Adjust call to add_method.
6822 (add_implicitly_declared_members): Likewise.
6823 (clone_function_decl): Likewise.
6824 * decl2.c (check_classfn): Likewise.
6825 * semantics.c (finish_member_declaration): Likewise.
6827 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
6829 * decl.c (flag_isoc94): New variable.
6831 2000-08-02 Jason Merrill <jason@redhat.com>
6833 * pt.c (do_type_instantiation): Add complain parm; don't complain
6834 if called recursively.
6835 * cp-tree.h, parse.y: Adjust.
6837 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
6839 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
6840 -Wno-strict-prototypes.
6842 * g++spec.c: Adjust type of second argument to
6843 lang_specific_driver, and update code as necessary.
6845 * cp-tree.h: Don't prototype min_precision here.
6846 (my_friendly_assert): Cast expression to void.
6847 * semantics.c (do_poplevel): Initialize scope_stmts.
6849 2000-08-02 Mark Mitchell <mark@codesourcery.com>
6851 * cp-tree.h (DECL_NEEDED_P): Tweak.
6853 2000-07-28 Jason Merrill <jason@redhat.com>
6855 * lang-specs.h: Use %i in rule for .ii files.
6857 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
6859 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
6861 2000-07-30 Mark Mitchell <mark@codesourcery.com>
6863 Allow indirect primary bases.
6864 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
6866 (CLASSTYPE_VFIELD_PARENT): Remove.
6867 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
6868 (BINFO_PRIMARY_BINFO): Remove.
6869 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
6870 (BINFO_VBASE_PRIMARY_P): Likewise.
6871 (BINFO_PRIMARY_BASE_OF): New macro.
6872 (BINFO_INDIRECT_PRIMARY_P): Likewise.
6873 (get_primary_binfo): New function.
6874 * decl.c (lang_mark_tree): Make lang_type::primary_base.
6875 * class.c (vcall_offset_data_s): Rename to ...
6876 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
6877 and add ctor_vtbl_p.
6878 (get_derived_offset): Use get_primary_binfo.
6879 (dfs_mark_primary_bases): Adjust handling of virtual primary
6881 (mark_primary_bases): Likewise.
6882 (set_primary_base): Take a binfo, not an integer, as a
6883 representation of the primary base.
6884 (indirect_primary_base_p): Remove.
6885 (determine_primary_base): Adjust for indirect primary bases.
6886 (dfs_find_final_overrider): Fix typo in coment.
6887 (update_vtable_entry_for_fn): Use get_primary_binfo.
6888 (layout_nonempty_base_or_field): Tweak.
6889 (build_base_fields): Adjust for new primary base semantics.
6890 (dfs_propagate_binfo_offsets): Remove.
6891 (propagate_binfo_offsets): Rewrite.
6892 (dfs_set_offset_for_shared_vbases): Remove.
6893 (layout_virtual_bases): Don't use it.
6894 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
6896 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
6897 CLASSTYPE_VFIELD_PARENT.
6898 (dfs_get_primary_binfo): New function.
6899 (get_primary_binfo): Likewise.
6900 (dump_class_hierarchy_r): Tweak printing of primary bases.
6901 (build_vtbl_initializer): Fix typo in comments. Use
6903 (build_vcall_and_vbase_vtbl_entries): Likewise.
6904 (build_vbaes_offset_vtbl_entries): Likewise.
6905 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
6906 BV_VCALL_INDEX to handle indirect primary bases.
6907 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
6908 (build_rtti_vtbl_entries): Likewise.
6909 * search.c (get_shared_vbase_if_not_primary): Tweak.
6910 (find_vbase_instance): Likewise.
6911 (binfo_for_vtable): Simplify.
6912 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
6913 (make_binfo): Make it have 11 entries.
6915 2000-07-30 Alex Samuel <samuel@codesourcery.com>
6917 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
6918 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
6919 ascertaining primaryness.
6920 (G): Remove template_args.
6921 (decl_is_template_id): New function.
6922 (write_encoding): Use decl_is_template_id.
6923 (write_name): Likewise. Handle type_decls. Get main variant of
6925 (write_nested_name): Likewise.
6926 (write_prefix): Likewise.
6927 (write_template_prefix): Likewise.
6928 (write_special_name_constructor): Remove defunct production from
6930 (write_bare_function_type): Remove comment about absent parameter.
6931 (write_template_template_arg): Add missing grammar production to
6934 2000-07-27 Jason Merrill <jason@redhat.com>
6936 * decl.c (duplicate_decls): If common_type produces a non-typedef
6937 type for a typedef, just use the old type.
6939 2000-07-27 Mark Mitchell <mark@codesourcery.com>
6941 * cp-tree.h (function_depth): Declare.
6942 (verify_stmt_tree): Likewise.
6943 (find_tree): Likewise.
6944 * decl.c (function_depth): Give it external linkage.
6945 * optimize.c (optimize_function): Increment and decrement it.
6946 * tree.c (verify_stmt_tree_r): New function.
6947 (verify_stmt_tree): Likewise.
6948 (find_tree_r): Likewise.
6949 (find_tree): Likewise.
6951 2000-07-27 Jason Merrill <jason@redhat.com>
6953 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
6955 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
6957 2000-07-26 Mark Mitchell <mark@codesourcery.com>
6959 * decl.c (start_cleanup_fn): Mark the function as `inline'.
6960 * decl2.c (get_guard): Call cp_finish_decl, not
6961 rest_of_decl_compilation, for local guards.
6962 * lex.c (do_identifier): Remove unused variable.
6964 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
6966 * parse.y: Add missing ';'.
6968 2000-07-26 Mark Mitchell <mark@codesourcery.com>
6970 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
6973 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
6975 Kill strict_prototype. Backwards compatibility only for
6976 non NO_IMPLICIT_EXTERN_C systems.
6977 * cp-tree.h (flag_strict_prototype): Remove.
6978 (strict_prototype): Remove.
6979 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
6980 * decl.c (maybe_push_to_top_level): Adjust.
6981 (pop_from_top_level): Adjust.
6982 (decls_match): Only allow sloppy parm matching for ancient
6984 (init_decl_processing): Adjust.
6985 (grokdeclarator): Adjust.
6986 * decl2.c (flag_strict_prototype): Remove.
6987 (strict_prototype): Remove.
6988 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
6989 (lang_f_options): Remove "strict-prototype".
6990 (unsupported-options): Add "strict-prototype".
6991 * lex.c (do_identifier): Adjust.
6992 (do_scoped_id): Adjust.
6993 * parse.y (empty_parms): Adjust.
6994 * class.c (push_lang_context): Adjust.
6995 (pop_lang_context): Adjust.
6996 * typeck.c (comp_target_parms): Adjust.
6998 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
7000 * decl.c (poplevel): Deal with anonymous variables at for scope.
7001 (maybe_inject_for_scope_var): Likewise.
7003 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
7005 * decl.c: Remove all signal handling code, now done in toplev.c.
7007 2000-07-23 Mark Mitchell <mark@codesourcery.com>
7009 * decl.c (make_rtl_for_nonlocal_decl): Rework.
7011 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
7014 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
7016 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
7017 Define my_friendly_assert and my_friendly_abort as macros
7018 which may call friendly_abort. Prototype friendly abort, not
7019 my_friendly_abort or my_friendly_assert.
7020 * decl.c (signal_catch): Report the signal caught in the error
7021 message. Call fatal directly.
7022 * typeck2.c (ack, my_friendly_assert): Delete.
7023 (my_friendly_abort): Rename to friendly_abort. Expect file,
7024 line, and function parameters. Report the abort code, then
7025 call fancy_abort. Do not mask an abort if errors have
7028 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
7030 * typeck.c (comp_target_parms): Remove obsolete parameter.
7031 (comp_target_types): Adjust.
7033 2000-07-17 Jason Merrill <jason@redhat.com>
7035 * typeck.c (mark_addressable): Never set TREE_USED.
7036 * call.c (build_call): Don't abort on calls to library functions
7037 that have been declared normally.
7039 * typeck.c (build_binary_op): Fix grammar in warning.
7041 * exception.cc (__eh_free): Fix prototype.
7043 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
7045 * decl.c (pushdecl): Handle seeing an OVERLOAD in
7046 IDENTIFIER_NAMESPACE_VALUE.
7048 2000-07-16 Mark Mitchell <mark@codesourcery.com>
7050 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
7051 * method.c (use_thunk): Correct handling of vcall offsets.
7053 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
7055 * .cvsignore: parse.h and parse.c have no cp- prefix.
7057 2000-07-13 Mark Mitchell <mark@codesourcery.com>
7059 * .cvsignore: New file.
7061 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
7063 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
7065 2000-07-12 Mark Mitchell <mark@codesourcery.com>
7067 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
7069 * parse.h: Likewise.
7071 2000-07-11 Mark Mitchell <mark@codesourcery.com>
7073 * class.c (layout_class_type): Add pointers to virtual bases after
7074 base classes under the old ABI.
7076 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
7078 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
7079 (finish_continue_stmt): Likewise.
7080 (begin_for_stmt): Remove call to note_level_for_for.
7081 (finish_goto_stmt): Change call from build_min_nt
7083 (finish_expr_stmt): Likewise.
7084 (begin_if_stmt): Likewise.
7085 (begin_while_stmt): Likewise.
7086 (finish_while_stmt): Likewise.
7087 (finish_return_stmt): Likewise.
7088 (begin_for_stmt): Likewise.
7089 (finish_for_stmt): Likewise.
7090 (finish_break_stmt): Likewise.
7091 (begin_switch_stmt): Likewise.
7092 (finish_case_label): Likewise.
7093 (genrtl_try_block): Likewise.
7094 (begin_try_block): Likewise.
7095 (begin_handler): Likewise.
7096 (begin_compound_stmt): Likewise.
7097 (finish_asm_stmt): Likewise.
7098 (finish_label_stmt): Likewise.
7099 (add_decl_stmt): Likewise.
7100 (finish_subobject): Likewise.
7101 (finish_decl_cleanup): Likewise.
7102 (finish_named_return_value): Likewise.
7103 (setup_vtbl_ptr): Likewise.
7104 (add_scope_stmt): Likewise.
7105 * decl.c (finish_constructor_body): Likewise.
7106 (finish_destructor_body): Likewise.
7107 * optimize.c (copy_body_r): Likewise.
7108 (initialize_inlined_parameters): Likewise.
7109 (declare_return_variable): Likewise.
7110 (expand_call_inline): Likewise.
7112 2000-07-10 Jakub Jelinek <jakub@redhat.com>
7114 * semantics.c (expand_body): Sync interface information
7115 at the end of function body expansion.
7117 2000-07-09 Jason Merrill <jason@redhat.com>
7119 * init.c (build_new_1): Bail early if the call to new fails.
7121 * decl.c (compute_array_index_type): Check specifically for
7122 an INTEGER_CST, not just TREE_CONSTANT.
7124 * decl.c (duplicate_decls): Don't call duplicate_decls on
7125 the DECL_TEMPLATE_RESULT.
7126 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
7129 * error.c (dump_template_bindings): Don't crash if we had an
7130 invalid argument list.
7132 * typeck.c (c_expand_start_case): Do narrowing here.
7133 * semantics.c (finish_switch_cond): Not here.
7135 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
7137 * parse.y (asm_clobbers): Do string concatenation.
7139 2000-07-09 Mark Mitchell <mark@codesourcery.com>
7141 * decl.c (pushtag): Don't put local classes in template functions
7142 on the local_classes list.
7144 2000-07-04 Scott Snyder <snyder@fnal.gov>
7146 * decl2.c (get_guard): Add missing return for old ABI local
7149 2000-07-09 Mark Mitchell <mark@codesourcery.com>
7151 * cp-tree.h (char_type_p): New function.
7152 * decl.c (init_decl_processing): Don't initialize
7153 signed_wchar_type_node or unsigned_wchar_type_node.
7154 (complete_array_type): Handle brace-enclosed string-constants.
7155 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
7156 * tree.c (char_type_p): New function.
7157 * typeck2.c (digest_init): Use char_type_p.
7159 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
7161 * pt.c (tsubst): Don't layout type, if it's error_mark.
7163 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
7165 * pt.c (instantiate_pending_templates): Reset template level.
7167 2000-07-05 Jason Merrill <jason@redhat.com>
7169 * call.c (joust): Don't complain about `operator char *()' beating
7170 `operator const char *() const'.
7172 2000-07-04 scott snyder <snyder@fnal.gov>
7173 Jason Merrill <jason@redhat.com>
7175 * repo.c (repo_get_id): Handle the case where a class with virtual
7176 bases has a null TYPE_BINFO_VTABLE.
7178 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
7179 Jason Merrill <jason@redhat.com>
7181 * parse.y (member_init): Just pass in the type.
7182 * init.c (expand_member_init): Handle getting a type.
7184 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7185 Jason Merrill <jason@redhat.com>
7187 * decl.c (finish_function): Warn if a function has no return
7189 Suggested by Andrew Koenig.
7190 * typeck.c (check_return_expr): Do set current_function_returns_value
7191 if we got an error_mark_node.
7193 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
7195 * decl2.c (push_decl_namespace): Push the original namespace.
7197 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
7199 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
7200 * semantics.c (begin_class_definition): Clear it.
7202 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
7204 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
7205 (genrtl_expr_stmt): Likewise.
7206 (genrtl_decl_stmt): Likewise.
7207 (genrtl_if_stmt): Likewise.
7208 (genrtl_while_stmt): Likewise.
7209 (genrtl_do_stmt): Likewise.
7210 (genrtl_return_stmt): Likewise.
7211 (genrtl_for_stmt): Likewise.
7212 (genrtl_break_stmt): Likewise.
7213 (genrtl_continue_stmt): Likewise.
7214 (genrtl_scope_stmt): Likewise.
7215 (genrtl_switch_stmt): Likewise.
7216 (genrtl_case_label): Likewise.
7217 (genrtl_begin_compound_stmt): Likewise.
7218 (genrtl_finish_compound_stmt): Likewise.
7219 (genrtl_compound_stmt): Likewise.
7220 (genrtl_asm_stmt): Likewise.
7222 * init.c (begin_init_stmts): Remove call to
7223 genrtl_begin_compound_stmt.
7224 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
7226 * semantics.c (lang_expand_stmt): Changed call to
7227 genrtl_compound_stmt to ignore return value.
7229 2000-07-02 Mark Mitchell <mark@codesourcery.com>
7231 * mangle.c (canonicalize_for_substitution): Return the canonical
7234 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
7236 * typeck.c (commonparms): Remove obstack manipulations.
7238 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
7240 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
7242 * Makefile.in (OBJS): Added ../c-semantics.o.
7243 (OBJDEPS): Likewise.
7245 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
7247 (struct stmt_tree): Added comment.
7248 (current_function_name_declared): Removed.
7249 (stmts_are_full_exprs_p): Likewise.
7250 (genrtl_do_pushlevel): Likewise.
7251 (genrtl_clear_out_block): Likewise.
7252 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
7253 (DECL_ANON_UNION_ELEMS): Likewise.
7254 (emit_local_var): Likewise.
7255 (make_rtl_for_local_static): Likewise.
7256 (do_case): Likewise.
7257 (expand_stmt): Likewise.
7258 (genrtl_decl_cleanup): Likewise.
7259 (c_expand_asm_operands): Likewise.
7260 (c_expand_return): Likewise.
7261 (c_expand_start_case): Likewise.
7263 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
7264 (emit_local_var): Likewise.
7265 (initialize_local_var): Change reference to
7266 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7267 Change reference to stmts_are_full_exprs_p to
7268 current_stmt_tree->stmts_are_full_exprs_p.
7269 (push_cp_function_context): Likewise.
7271 * expect.c (expand_throw): Change reference to
7272 stmts_are_full_exprs_p.
7274 * init.c (build_aggr_init): Change reference to
7275 stmts_are_full_exprs_p.
7276 (build_vec_init): Likewise.
7278 * optimize.c (maybe_clone_body): Change reference to
7279 current_function_name_declared to
7280 cp_function_chain->name_declared.
7282 * pt.c (instantiate_decl): Change reference to
7283 current_function_name_declared to
7284 cp_function_chain->name_declared.
7286 * semantics.c (expand_cond): Moved declaration to c-common.h.
7287 (genrtl_do_pushlevel): Moved to c-semantics.c.
7288 (genrtl_clear_out_block): Likewise.
7289 (genrtl_goto_stmt): Likewise.
7290 (genrtl_expr_stmt): Likewise.
7291 (genrtl_decl_stmt): Likewise.
7292 (gerntl_if_stmt): Likewise.
7293 (genrtl_while_stmt): Likewise.
7294 (genrtl_do_stmt): Likewise.
7295 (genrtl_return_stmt): Likewise.
7296 (genrtl_for_stmt): Likewise.
7297 (genrtl_break_stmt): Likewise.
7298 (genrtl_continue_stmt): Likewise.
7299 (genrtl_scope_stmt): Likewise.
7300 (genrtl_switch_stmt): Likewise.
7301 (genrtl_case_label): Likewise.
7302 (genrtl_begin_compound_stmt): Likewise.
7303 (genrtl_finish_compound_stmt): Likewise.
7304 (genrtl_compound_stmt): Likewise.
7305 (genrtl_asm_stmt): Likewise.
7306 (genrtl_decl_cleanup): Likewise.
7307 (expand_cond): Likewise.
7308 (expand_stmt): Renamed to ...
7309 (lang_expand_stmt): ... this.
7310 (lang_expand_expr_stmt): Initialize.
7311 (set_current_function_name_declared): Likewise.
7312 (stmts_are_full_exprs_p): Likewise.
7313 (current_function_name_declared): Likewise.
7314 (anon_aggr_type_p): Likewise.
7315 (do_poplevel): Change reference to
7316 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
7317 Change reference to stmts_are_full_exprs_p to
7318 current_stmt_tree->stmts_are_full_exprs_p.
7319 (add_tree): Likewise.
7320 (finish_expr_stmt): Likewise.
7321 (prep_stmt): Likewise.
7322 (lang_expand_stmt): Likewise.
7323 (begin_compound_stmt): Change reference to
7324 current_function_name_declared to
7325 cp_function_chain->name_declared and call to
7326 current_function_name_declared().
7327 (setup_vtbl_ptr): Likewise.
7328 (genrtl_do_poplevel): Removed.
7330 2000-06-30 Jason Merrill <jason@redhat.com>
7332 * init.c (init_init_processing): Go back to aligning like
7333 double_type_node for old ABI.
7334 (get_cookie_size): Make cookie larger if we get a type that needs
7336 (build_vec_delete): Call it.
7338 * typeck.c (qualify_type_recursive): New fn.
7339 (composite_pointer_type): Use it.
7340 (build_binary_op): Use composite_pointer_type.
7342 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
7343 Jason Merrill <jason@redhat.com>
7345 * typeck.c (check_return_expr): Don't complain about returning
7346 NULL from operator new if -fcheck-new.
7347 * cp-tree.h: Declare flag_check_new here.
7350 2000-06-28 Alex Samuel <samuel@codesourcery.com>
7352 * mangle.c (find_substitution): Use same_type_p.
7353 (write_encoding): Don't check for substitutions.
7355 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
7357 * parse.y (expr_no_comma_rangle): New non-terminal.
7358 (template_parm): Use it for default parameter case.
7359 (template_arg): Use it.
7360 (expr_no_commas): Remove commented out undefined extensions.
7361 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7362 * parse.h, parse.c: Rebuilt.
7364 2000-06-30 Mark Mitchell <mark@codesourcery.com>
7366 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
7367 (finish_asm_stmt): Do it here, instead.
7369 * cp-tree.h (ridpointers): Don't declare.
7370 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
7371 (record_builtin_java_type): Likewise.
7372 (init_decl_processing): Likewise.
7373 * lex.c: Move inclusion of lex.h.
7374 (ridpointers): Don't define.
7375 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
7377 * lex.h (enum rid): Rename to ...
7378 (enum cp_rid): ... this.
7379 (ridpointers): Don't declare.
7380 * parse.y: Move inclusion of lex.h.
7381 * parse.c: Regenerated.
7382 * spew.c: Move inclusion of lex.h.
7384 * cp-tree.h (struct language_function): Remove temp_name_counter.
7385 (temp_name_counter): Remove.
7386 (get_temp_name): Change prototype.
7387 (get_guard): New function.
7388 (get_guard_cond): Likewise.
7389 (set_guard): Likewise.
7390 * cvt.c (build_up_reference): Adjust call to get_temp_name.
7391 * decl.c (expand_static_init): Use get_guard and friends to
7392 implement guard variables.
7393 * decl2.c (get_temp_name): Assume that the variables created are
7395 (get_sentry): Rename to ...
7396 (get_guard): ... this. Implement new ABI guard variables.
7397 (get_guard_bits): New function.
7398 (get_guard_cond): Likewise.
7399 (set_guard): Likewise.
7400 (start_static_initialization_or_destruction): Use them.
7401 (do_static_initialization): Replace sentry with guard throughout.
7402 (do_static_destruction): Likewise.
7403 * init.c (create_temporary_var): Add comment.
7405 2000-06-28 Alex Samuel <samuel@codesourcery.com>
7407 * mangle.c (find_substitution): Use same_type_p.
7408 (write_encoding): Don't check for substitutions.
7410 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
7412 * parse.y (expr_no_comma_rangle): New non-terminal.
7413 (template_parm): Use it for default parameter case.
7414 (template_arg): Use it.
7415 (expr_no_commas): Remove commented out undefined extensions.
7416 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
7417 * parse.h, parse.c: Rebuilt.
7419 2000-06-29 Mark Mitchell <mark@codesourcery.com>
7421 * cp-tree.h (flag_const_strings): Remove.
7422 (warn_parentheses): Likewise.
7423 (warn_format): Likewise.
7424 (common_type): Likewise.
7425 (default_conversion): Likewise.
7426 (build_binary_op): Likewise.
7427 (cp_build_binary_op): New macro.
7428 * call.c (build_new_op): Use cp_build_binary_op instead of
7430 * class.c (build_vtable_entry_ref): Likewise.
7431 * decl.c (expand_static_init): Likewise.
7432 (compute_array_index_type): Likewise.
7433 (build_enumerator): Likewise.
7434 * decl2.c (delete_sanity): Likewise.
7435 (start_static_initialization_or_destruction): Likewise.
7436 * error.c (dump_type_suffix): Likewise.
7437 * init.c (resolve_offset_ref): Likewise.
7438 (build_new): Likewise.
7439 (build_new_1): Likewise.
7440 (build_vec_delete_1): Likewise.
7441 (build_vec_init): Likewise.
7442 (build_delete): Likewise.
7443 * rtti.c (synthesize_tinfo_fn): Likewise.
7444 (synthesize_tinfo_var): Likewise.
7445 * search.c (expand_upcast_fixups): Likewise.
7446 (fixup_all_virtual_upcast_offsets): Likewise.
7447 * typeck.c (build_array_ref): Likewise.
7448 (get_member_function_from_ptrfunc): Likewise.
7449 (build_binary_op): Add parameter.
7450 (pointer_int_sum): Use cp_build_binary_op.
7451 (pointer_diff): Likewise.
7452 (build_modify_expr): Likewise.
7453 (get_delta_difference): Likewise.
7454 (build_ptrmemfunc): Likewise.
7456 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
7458 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
7459 * decl.c (create_implicit_typedef): Adjust.
7460 * decl2.c (build_artificial_parm): Adjust.
7461 * method.c (implicitly_declare_fn): Adjust.
7462 * pt.c (push_inline_template_parms_recursive): Adjust.
7463 (process_template_parm): Adjust.
7464 (overloaded_template_name): Adjust.
7465 * semantics.c (finish_template_template_parm): Adjust.
7467 2000-06-28 Mark Mitchell <mark@codesourcery.com>
7469 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
7470 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
7471 where to emit thunks.
7472 (build_vtt): Adjust call to build_vtt_inits.
7473 (build_vtt_inits): Add parameter to indicate whether or not
7474 sub-VTTs for virtual bases should be included. Adjust handling of
7475 construction vtables.
7476 (get_matching_base): New function.
7477 (dfs_build_vtt_inits): Rename to ...
7478 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
7479 construction vtables.
7480 (dfs_fixup_binfo_vtbls): Likewise.
7481 (build_ctor_vtbl_groups): Build construction vtables for virtual
7483 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
7484 to build construction vtbls.
7485 (dfs_accumulate_vtbl_inits): Adjust handling of
7486 construction vtables.
7488 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
7491 2000-06-27 Mark Mitchell <mark@codesourcery.com>
7493 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
7495 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
7497 * search.c (hides): Remove.
7498 (is_subobject_of_p): Add most_derived parameter. Use
7500 (lookup_field_queue_p): Adjust.
7501 (lookup_field_r): Adjust.
7503 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
7505 * decl2.c (handle_class_head): Bash typedefs to the type's main
7508 2000-06-25 Mark Mitchell <mark@codesourcery.com>
7510 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
7511 (begin_global_stmt_expr): ... this.
7512 (genrtl_finish_stmt_expr): Rename to ...
7513 (finish_global_stmt_expr): ... this.
7514 * init.c (begin_init_stmts): Adjust calls.
7515 (finish_init_stmts): Likewise.
7516 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
7517 (begin_global_stmt_expr): ... this.
7518 (genrtl_finish_stmt_expr): Rename to ...
7519 (finish_global_stmt_expr): ... this.
7521 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
7523 * search.c (lookup_member): Fix typo in comment.
7525 2000-06-24 Jason Merrill <jason@redhat.com>
7527 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
7528 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
7530 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7532 * parse.y (complex_direct_notype_declarator): Support global_scope.
7533 * Makefile.in: Adjust conflict count.
7535 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
7537 * parse.y (template_arg): Convert TEMPLATE_DECL
7538 that is a template template parameter to
7539 TEMPLATE_TEMPLATE_PARM here.
7541 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
7542 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
7543 (copy_template_template_parm): Adjust prototype.
7544 * decl.c (grokdeclarator): Remove dead code.
7545 * pt.c (process_template_parm): Tidy.
7546 (lookup_template_class): Construct nodes in
7547 copy_template_template_parm.
7548 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
7549 lookup_template_class. Use TYPE_TI_TEMPLATE.
7550 * tree.c (copy_template_template_parm): Add NEWARGS
7552 (mapcar): Adjust call to copy_template_template_parm.
7553 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
7554 * method.c (build_template_template_parm_names): Change error
7555 code to avoid compilation warning.
7557 * gxxint.texi: Document template template parameter
7560 2000-06-21 Alex Samuel <samuel@codesourcery.com>
7562 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
7563 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
7564 (cp-demangle.o): New rule.
7565 (dyn-string.o): Likewise.
7566 * inc/cxxabi.h (__cxa_demangle): New declaration.
7568 2000-06-22 Mark Mitchell <mark@codesourcery.com>
7570 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
7571 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
7572 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
7574 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
7575 (make_thunk): Change prototype.
7576 (emit_thunk): Rename to use_thunk.
7577 (mangle_thunk): Change prototype.
7578 * class.c (get_derived_offset): Simplify.
7579 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
7580 BV_GENERATE_THUNK_WITH_VTABLE_P.
7581 (build_primary_vtable): Simplify.
7582 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
7583 (dfs_find_base): Remove.
7584 (update_vtable_entry_for_fn): Correct bug in finding the base
7585 where a virtual function was first declared. Figure out whether
7586 or not to emit a vcall-thunk with the vtables in which it appears.
7587 Correct logic for deciding whether to use an ordinary thunk, or a
7589 (finish_struct_1): Remove unnecssary code.
7590 (build_vtbl_initializer): Use ssize_int for the running counter of
7592 (build_vtbl_initializer): Only use vcall thunks where necessary.
7593 Mark thunks as needing to be emitted with their vtables, or not.
7594 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
7595 indices. Use size_binop.
7596 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
7597 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
7599 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
7600 (build_vtable_entry): Mark thunks as needing to be emitted with
7601 their vtables, or not.
7602 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
7603 * decl2.c (mark_vtable_entries): Use use_thunk instead of
7605 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
7607 * error.c (dump_expr): Use BV_FN.
7608 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
7610 * method.c (make_thunk): Likewise.
7611 (emit_thunk): Rename to use_thunk. Allow callers to decide
7612 whether or not to actually emit the thunk. Adjust for changes in
7613 representation of vcall offsets.
7614 * search.c (dfs_get_pure_virtuals): Use BV_FN.
7615 * semantics.c (emit_associated_thunks): New function.
7616 (expand_body): Use it.
7617 * ir.texi: Adjust decriptions of thunks.
7619 2000-06-22 Jason Merrill <jason@redhat.com>
7621 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
7622 (tsubst_friend_function): Copy it here.
7624 * decl.c (grok_op_properties): Fix typo.
7626 * decl2.c (delete_sanity): Clarify warning, avoid failure on
7629 * pt.c (check_explicit_specialization): Clarify error.
7631 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
7632 an old OVERLOAD when we're declaring a non-function.
7633 (pushdecl, destroy_local_var): Check for error_mark_node.
7634 (warn_extern_redeclared_static): Also bail early if
7636 (push_overloaded_decl): Ignore an old error_mark_node.
7638 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
7640 * call.c (build_x_va_arg): Check if in a template decl.
7641 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
7643 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
7645 * class.c (push_lang_context): TYPE_NAME gets you to the Java
7647 * decl.c (check_goto): Computed gotos assumed OK.
7649 2000-06-20 Jason Merrill <jason@redhat.com>
7651 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
7652 for which we don't need to look for instantiations.
7654 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
7656 * parse.y (program): Always call finish_translation_unit.
7657 * parse.c, parse.h: Rebuilt.
7659 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
7661 * method.c: Don't include hard-reg-set.h.
7663 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
7665 * rtti.c (get_base_offset): Cope when vbase field is in a base.
7667 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
7669 * call.c (build_conditional_expr): Use VOID_TYPE_P.
7670 * cvt.c (cp_convert_to_pointer): Likewise.
7671 (convert_to_void): Likewise.
7672 * error.c (dump_expr): Likewise.
7673 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
7674 * init.c (build_delete): Likewise.
7675 * method.c (emit_thunk): Likewise.
7676 * optmize.c (declare_return_variable): Likewise.
7677 * rtti.c (get_tinfo_decl_dynamic): Likewise.
7678 (get_typeid): Likewise.
7679 (build_dynamic_cast_1): Likewise.
7680 * typeck.c (composite_pointer_type): Likewise.
7681 (common_type): Likewise.
7682 (build_indirect_ref): Likewise.
7683 (build_binary_op): Likewise.
7684 (build_x_compound_expr): Likewise.
7685 (check_return_expr): Likewise.
7686 * typeck2.c (add_exception_specifier): Likewise.
7688 * mangle.c (write_method_parms): Use direct comparison for end
7691 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
7693 * cp-tree.h (genrtl_try_block): Declare function.
7694 (genrtl_handler): Likewise.
7695 (genrtl_catch_block): Likewise.
7696 (genrtl_ctor_stmt): Likewise.
7697 (genrtl_subobject): Likewise.
7698 (genrtl_decl_cleanup): Likewise.
7699 (genrtl_do_poplevel): Likewise.
7700 (genrtl_do_pushlevel): Likewise.
7701 (genrtl_clear_out_block): Likewise.
7702 (genrtl_goto_stmt): Likewise.
7703 (genrtl_expr_stmt): Likewise.
7704 (genrtl_decl_stmt): Likewise.
7705 (genrtl_if_stmt): Likewise.
7706 (genrtl_while_stmt): Likewise.
7707 (genrtl_do_stmt): Likewise.
7708 (genrtl_return_stmt): Likewise.
7709 (genrtl_for_stmt): Likewise.
7710 (genrtl_break_stmt): Likewise.
7711 (genrtl_continue_stmt): Likewise.
7712 (genrtl_scope_stmt): Likewise.
7713 (genrtl_switch_stmt): Likewise.
7714 (genrtl_case_label): Likewise.
7715 (genrtl_begin_compound_stmt): Likewise.
7716 (genrtl_finish_compound_stmt): Likewise.
7717 (genrtl_compound_stmt): Likewise.
7718 (genrtl_asm_stmt): Likewise.
7719 (genrtl_named_return_value): Likewise.
7720 (genrtl_begin_stmt_expr): Likewise.
7721 (genrtl_finish_stmt_expr): Likewise.
7722 (finish_for_stmt): Removed first argument.
7723 (finish_switch_stmt): Likewise.
7725 * semantics.c (genrtl_try_block): Define function.
7726 (genrtl_handler): Likewise.
7727 (genrtl_catch_block): Likewise.
7728 (genrtl_ctor_stmt): Likewise.
7729 (genrtl_subobject): Likewise.
7730 (genrtl_decl_cleanup): Likewise.
7731 (genrtl_do_poplevel): Likewise.
7732 (genrtl_do_pushlevel): Likewise.
7733 (genrtl_clear_out_block): Likewise.
7734 (genrtl_goto_stmt): Likewise.
7735 (genrtl_expr_stmt): Likewise.
7736 (genrtl_decl_stmt): Likewise.
7737 (genrtl_if_stmt): Likewise.
7738 (genrtl_while_stmt): Likewise.
7739 (genrtl_do_stmt): Likewise.
7740 (genrtl_return_stmt): Likewise.
7741 (genrtl_for_stmt): Likewise.
7742 (genrtl_break_stmt): Likewise.
7743 (genrtl_continue_stmt): Likewise.
7744 (genrtl_scope_stmt): Likewise.
7745 (genrtl_switch_stmt): Likewise.
7746 (genrtl_case_label): Likewise.
7747 (genrtl_begin_compound_stmt): Likewise.
7748 (genrtl_finish_compound_stmt): Likewise.
7749 (genrtl_compound_stmt): Likewise.
7750 (genrtl_asm_stmt): Likewise.
7751 (genrtl_named_return_value): Likewise.
7752 (genrtl_begin_stmt_expr): Likewise.
7753 (genrtl_finish_stmt_expr): Likewise.
7754 (finish_for_stmt): Removed first argument and generate rtl
7756 (finish_switch_stmt): Likewise.
7757 (do_poplevel): Removed generate rtl specific code.
7758 (do_pushlevel): Likewise.
7759 (add_tree): Likewise.
7760 (finish_goto_stmt): Likewise.
7761 (finish_expr_stmt): Likewise.
7762 (begin_if_stmt): Likewise.
7763 (finish_if_stmt_cond): Likewise.
7764 (finish_then_clause): Likewise.
7765 (begin_else_clause): Likewise.
7766 (finish_else_clause): Likewise.
7767 (finish_if_stmt): Likewise.
7768 (clear_out_block): Likewise.
7769 (begin_while_stmt): Likewise.
7770 (finish_while_stmt_cond): Likewise.
7771 (finish_while_stmt): Likewise.
7772 (begin_do_stmt): Likewise.
7773 (finish_do_body): Likewise.
7774 (finish_do_stmt): Likewise.
7775 (finish_return_stmt): Likewise.
7776 (begin_for_stmt): Likewise.
7777 (finish_for_init_stmt): Likewise.
7778 (finish_for_cond): Likewise.
7779 (finish_for_expr): Likewise.
7780 (finish_break_stmt): Likewise.
7781 (finish_continue_stmt): Likewise.
7782 (begin_switch_stmt): Likewise.
7783 (finish_switch_cond): Likewise.
7784 (finish_case_label): Likewise.
7785 (begin_try_block): Likewise.
7786 (begin_function_try_block): Likewise.
7787 (finish_try_block): Likewise.
7788 (finish_cleanup_try_block): Likewise.
7789 (finish_cleanup): Likewise.
7790 (finish_function_try_block): Likewise.
7791 (finish_handler_sequence): Likewise.
7792 (finish_function_handler_sequence): Likewise.
7793 (begin_handler): Likewise.
7794 (finish_handler_parms): Likewise.
7795 (begin_catch_block): Likewise.
7796 (finish_handler): Likewise.
7797 (begin_compound_stmt): Likewise.
7798 (finish_compound_stmt): Likewise.
7799 (finish_asm_stmt): Likewise.
7800 (finish_label_stmt): Likewise.
7801 (finish_label_decl): Likewise.
7802 (finish_subobject): Likewise.
7803 (finish_decl_cleanup): Likewise.
7804 (finish_named_return_value): Likewise.
7805 (begin_stmt_expr): Likewise.
7806 (finish_stmt_expr): Likewise.
7808 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
7809 to call genrtl_expr_stmt when appropriate.
7811 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
7812 begin_compound_expr to call genrtl_begin_stmt_expr and
7813 genrtl_begin_compound_expr when appropriate.
7814 (finish_init_stmts): Changed calls to finish_compound_expr and
7815 finish_stmt_expr to call genrtl_finish_compound_expr and
7816 genrtl_finish_stmt_expr when appropriate.
7817 (expand_default_init): Changed call to finish_expr_stmt to call
7818 genrtl_expr_stmt when appropriate.
7819 (build_vec_init): Likewise.
7821 * parse.y (simple_stmt): Removed first argument from call to
7822 finish_for_stmt. Removed first argument from call to
7825 * parse.c: Regenerated.
7827 * pt.c (tsubst_expr): Removed first argument from call to
7828 finish_for_stmt. Removed first argument from call to
7831 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
7833 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
7834 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
7836 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
7837 (cplus_tree_code_length[]): Likewise.
7838 (cplus_tree_code_name[]): Likewise.
7839 (init_parse): Added call to add_c_tree_codes. Changed
7840 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
7842 2000-06-16 Mark Mitchell <mark@codesourcery.com>
7844 * cp-tree.h (finish_mem_initializers): Declare.
7845 (count_trees): Likewise.
7846 * parse.y (base_init): Use finish_mem_initializers.
7847 * semantics.c (finish_mem_initializers): New function.
7849 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
7850 the number of trees.
7852 (count_trees): Don't use it.
7854 2000-06-15 Jason Merrill <jason@redhat.com>
7856 * tree.c (count_trees): New debugging function.
7858 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
7859 * init.c (build_member_call): Pull out the name of a DECL.
7861 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
7862 * semantics.c (expand_body): Push to TV_INTEGRATION here.
7863 * optimize.c (optimize_function): Not here.
7864 * pt.c (instantiate_decl): Push to TV_PARSE.
7866 2000-06-15 Mark Mitchell <mark@codesourcery.com>
7868 * cp-tree.h (struct language_function): Remove x_base_init_list
7869 and x_member_init_list.
7870 (current_base_init_list): Remove.
7871 (current_member_init_list): Likewise.
7872 (setup_vtbl_ptr): Change prototype.
7873 (emit_base_init): Likewise.
7874 (expand_member_init): Likewise.
7875 (reinit_parse_for_function): Remove.
7876 * decl.c (save_function_data): Don't clear x_base_init_list and
7878 (mark_language_function): Don't mark them.
7879 * init.c (perform_member_init): Tweak comment.
7880 (sort_member_init): Take the list of initializers as an argument.
7881 (sort_base_init): Likewise.
7882 (emit_base_init): Likewise.
7883 (expand_member_init): Return the initializer. Don't use global
7885 * lex.c (reinit_parse_for_function): Remove.
7886 * method.c (build_template_parm_names): Correct substitution.
7887 (do_build_copy_constructor): Don't use current_member_init_list
7888 and current_base_init_list.
7889 (synthesize_method): Likewise.
7890 * parse.y (base_init): Split mem-initializers into
7891 base-initializers and field-initializers.
7892 (member_init_list): Build up the list here.
7893 (member_init): Return the initializer.
7894 (fn.depfn): Don't use reinit_parse_for_function.
7895 * parse.c: Regenerated.
7896 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
7898 (tsubst_expr): Don't use current_member_init_list
7899 and current_base_init_list.
7900 (tsubst_expr_values): Rename to ...
7901 (tsubst_initializer_list): ... this. Use convert_from_reference.
7902 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
7903 and current_base_init_list.
7904 (begin_function_definition): Don't call reinit_parse_for_function.
7906 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
7908 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
7911 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
7913 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
7915 * cp-tree.h (IF_COND): Move to c-common.h.
7916 (THEN_CLAUSE): Likewise.
7917 (ELSE_CLAUSE): Likewise.
7918 (WHILE_COND): Likewise.
7919 (WHILE_BODY): Likewise.
7920 (DO_COND): Likewise.
7921 (DO_BODY): Likewise.
7922 (RETURN_EXPR): Likewise.
7923 (EXPR_STMT_EXPR): Likewise.
7924 (FOR_INIT_STMT): Likewise.
7925 (FOR_COND): Likewise.
7926 (FOR_EXPR): Likewise.
7927 (FOR_BODY): Likewise.
7928 (SWITCH_COND): Likewise.
7929 (SWITCH_BODY): Likewise.
7930 (CASE_LOW): Likewise.
7931 (CASE_HIGH): Likewise.
7932 (GOTO_DESTINATION): Likewise.
7933 (COMPOUND_BODY): Likewise.
7934 (ASM_CV_QUAL): Likewise.
7935 (ASM_STRING): Likewise.
7936 (ASM_OUTPUTS): Likewise.
7937 (ASM_INPUTS): Likewise.
7938 (ASM_CLOBBERS): Likewise.
7939 (DECL_STMT_DECL): Likewise.
7940 (STMT_EXPR_STMT): Likewise.
7941 (LABEL_STMT_LABEL): Likewise.
7942 (SCOPE_BEGIN_P): Likewise.
7943 (SCOPE_END_P): Likewise.
7944 (SCOPE_STMT_BLOCK): Likewise.
7945 (SCOPE_NULLIFIED_P): Likewise.
7946 (SCOPE_NO_CLEANUPS_P): Likewise.
7947 (SCOPE_PARTIAL_P): Likewise.
7948 (ASM_VOLATILE_P): Likewise.
7949 (STMT_LINENO): Likewise.
7950 (STMT_LINENO_FOR_FN_P): Likewise.
7952 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
7953 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
7954 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
7955 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
7956 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
7958 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
7960 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
7961 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
7963 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
7964 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
7965 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
7967 2000-06-14 Mark Mitchell <mark@codesourcery.com>
7969 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
7970 * class.c (dfs_find_final_overrider): Set it appropriately.
7971 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
7972 avoid unneeded secondary vptrs.
7974 2000-06-13 Jakub Jelinek <jakub@redhat.com>
7976 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
7977 (check_bitfield_decl, check_field_decl): Likewise.
7978 (build_vtbl_or_vbase_field, build_base_field): Likewise.
7979 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
7980 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
7981 (xfer_tag, finish_enum): Likewise.
7982 * decl2.c (finish_builtin_type): Likewise.
7983 * init.c (init_init_processing): Likewise.
7984 * pt.c (instantiate_class_template): Likewise.
7985 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
7986 * cp-tree.h (struct lang_type): Add user_align member.
7987 (CLASSTYPE_USER_ALIGN): Define.
7989 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
7991 * Make-lang.in (c++.install-common): Install g++-cross in
7992 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
7993 $(target_alias)-g++ and $(target_alias)-c++.
7995 2000-06-12 Mark Mitchell <mark@codesourcery.com>
7997 * class.c (vcall_offset_data_s): Add last_init and fns.
7998 (overrides): Rename to same_signature_p.
7999 (dfs_find_final_overrider): Adjust accordingly.
8000 (mark_overriders): Likewise.
8001 (warn_hidden): Likewise.
8002 (build_vtbl_initializer): Reorganize machinery for building things
8003 at negative offsets.
8004 (build_vcall_and_vbase_vtbl_entries): Likewise.
8005 (build_vbase_offset_vtbl_entries): Likewise.
8006 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
8007 offset entries. Do not create two entries for functions with the
8009 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
8010 (build_rtti_vtbl_entries): Reorganize machinery for building things
8011 at negative offsets.
8013 * optimize.c (expand_call_inline): Don't recurse into the code
8014 used to initialize the parameters more than once.
8016 2000-06-11 Mark Mitchell <mark@codesourcery.com>
8018 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
8019 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
8020 (find_substitution): Only use the `Sa' substitution for
8021 std::allocator, not instantiations of it.
8022 (write_template_prefix): Move comment. Only use a TREE_LIST to
8023 represent substitutions for a member template.
8024 (write_array_type): Mangle array dimensions correctly.
8025 * optimize.c (maybe_clone_body): Copy more information from the
8027 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
8028 on the regenerated declaration.
8030 2000-06-11 Chip Salzenberg <chip@valinux.com>
8031 Mark Mitchell <mark@codesourcery.com>
8033 * class.c (build_vtable): Clarify comment.
8034 (build_ctor_vtbl_group): Pass the most derived type to
8037 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
8039 * decl2.c (compare_options): Don't needlessly cast away const-ness.
8041 2000-06-10 Mark Mitchell <mark@codesourcery.com>
8043 * decl.c (add_binding): Handle duplicate declarations of external
8046 2000-06-09 Chip Salzenberg <chip@valinux.com>
8047 Mark Mitchell <mark@codesourcery.com>
8049 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
8051 (write_signed_number): New macro.
8052 (write_unsigned_number): Likewise.
8053 (write_source_name): Use them.
8054 (write_number): Handle signed and unsigned values.
8055 (write_integer_cst): Use tree_int_cst_sgn, and use
8056 write_unsigned_number or write_signed_number as appropriate.
8057 (write_discriminator): Use write_unsigned_number or
8058 write_signed_number as appropriate.
8059 (write_template_arg_literal): Likewise.
8060 (write_array_type): Use tree_low_cst.
8061 (write_template_parm): Use write_unsigned_number or
8062 write_signed_number as appropriate.
8063 (write_substitution): Adjust call to write_number.
8064 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
8065 (write_expression): Handle non-type template arguments of
8066 reference type correctly.
8067 (mangle_thunk): Use write_signed_number.
8069 2000-06-09 Chip Salzenberg <chip@valinux.com>
8071 * mangle.c (find_substition): Don't mangle objects with typename
8072 substitutions (e.g. "cin" as "Si").
8074 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
8076 * call.c (add_candidate): Use ggc_alloc_cleared.
8077 * decl.c (lookup_label): Likewise.
8078 * lex.c (retrofit_lang_decl): Likewise.
8080 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
8082 * semantics.c (expand_body): Push to TV_EXPAND.
8083 * optimize.c (optimize_function): Push to TV_INTEGRATION.
8084 * decl.c (start_function): Always call announce_function.
8086 * tinfo2.cc: Just declare abort.
8088 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
8090 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
8091 whenever @ is a symbolic name.
8093 2000-06-08 Jakub Jelinek <jakub@redhat.com>
8095 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
8097 2000-06-07 Mark Mitchell <mark@codesourcery.com>
8099 * decl.c (pushdecl): Look up functions by DECL_NAME, not
8100 DECL_ASSEMBLER_NAME.
8102 2000-06-06 Mark Mitchell <mark@codesourcery.com>
8104 * decl2.c (c_language): Define.
8106 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
8108 * lex.c (lang_init_options): Tweak.
8110 * decl2.c: Remove #inclusion of diagnostic.h
8111 (lang_decode_option): Move diagnostic formatting options to
8114 * lang-options.h: Remove documentation for diagnostic options.
8116 * Makefile.in (lex.o): Depends upon diagnostic.h
8118 2000-06-06 Mark Mitchell <mark@codesourcery.com>
8120 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
8121 the same DECL_RESULT, it's not a redefinition.
8122 * pt.c (tsubst_decl): Remove code to handle illegal
8125 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
8127 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
8129 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
8131 * search.c (maybe_suppress_debug_info): Don't check
8132 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
8134 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
8137 Remember instantiation context in deferred instantiations.
8138 * cp-tree.h (struct tinst_level): Remove.
8139 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
8140 * pt.c (current_tinst_level): Now a tree.
8141 (print_template_context, push_tinst_level, pop_tinst_level,
8142 tinst_for_decl): Adjust.
8143 (reopen_tinst_level): New fn.
8144 (init_pt): Register current_tinst_level as a root.
8145 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
8146 of the pending templates list.
8147 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
8148 * lex.c (extract_interface_info): Adjust.
8149 * decl2.c (warn_if_unknown_interface): Adjust.
8151 2000-06-05 Mark Mitchell <mark@codesourcery.com>
8153 * class.c (indirect_primary_base_p): New function.
8154 (determine_primary_base): Use it.
8156 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
8158 Update new-abi dynamic cast algorithm.
8159 * tinfo.cc (__class_type_info::__dyncast_result): Add
8160 whole_details. Adjust constructor.
8161 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
8162 Avoid unnecessary searching.
8163 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
8165 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8167 * decl.c (init_decl_processing): Don't call record_component_aliases.
8168 * tree.c (build_cplus_array_type_1): Likewise.
8170 2000-06-04 Mark Mitchell <mark@codesourcery.com>
8172 * ir.texi: Correct typo.
8173 * mangle.c (write_expression): Handle non-type template arguments
8174 with reference type.
8175 * method.c (build_overload_value): Likewise.
8176 * pt.c (convert_nontype_argument): Explicitly represent conversion
8177 to a reference with an ADDR_EXPR.
8178 (unify): Always unify arguments in left-to-right order.
8180 2000-06-03 Alex Samuel <samuel@codesourcery.com>
8181 Mark Mitchell <mark@codesourcery.com>
8183 * Make-lang.in (CXX_SRCS): Add mangle.c.
8184 * Makefile.in (CXX_OBJS): Add mangle.o.
8185 (mangle.o): New rule.
8187 * class.c (local_classes): New variable.
8188 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
8189 (get_vtt_name): Use mangle_vtt_name for new ABI.
8190 (init_class_processing): Initialize local_classes.
8191 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
8192 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
8193 (std_identifier): New macro.
8194 (DECL_VOLATILE_MEMFUNC_P): New macro.
8195 (DECL_NAMESPACE_STD_P): Likewise.
8196 (local_classes): Declare.
8197 (get_mostly_instantiated_function_type): Declare.
8198 (init_mangle): Declare.
8199 (mangle_decl): Likewise.
8200 (mangle_type_string): Likewise.
8201 (mangle_type): Likewise.
8202 (mangle_typeinfo_for_type): Likewise.
8203 (mangle_typeinfo_string_for_type): Likewise.
8204 (mangle_vtbl_for_type): Likewise.
8205 (mangle_vtt_for_type): Likewise.
8206 (mangle_ctor_vtbl_for_type): Likewise.
8207 (mangle_thunk): Likewise.
8208 (mangle_conv_op_name_for_type): Likewise.
8209 (mangle_guard_variable): Likewise.
8210 * decl.c (pushtag): Keep track of local classes.
8211 (initialize_predefined_identifiers): Initialize std_identifier.
8212 (init_decl_processing): Use std_identifier.
8213 (start_decl): Don't treat instantiations as specializations.
8214 (grokdeclarator): Likewise.
8215 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
8216 name for fully-instantiated templates.
8217 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
8218 destructors with the new ABI.
8219 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
8220 (grokfield): Use mangle_type for new ABI.
8221 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
8222 (get_sentry): Use mangle_guard_variable for new ABI.
8223 (start_static_initialization_or_destruction): Likewise.
8224 * expr.c (extract_aggr_init): Remove.
8225 (extract_scalar_init): Likewise.
8226 (extract_init): Remove #if 0'd code.
8227 * mangle.c: New function.
8228 * method.c (build_mangled_name): Assert not flag_new_abi.
8229 (build_static_name): Likewise.
8230 (build_decl_overload_real): Likewise.
8231 (build_typename_overload): Likewise.
8232 (build_overload_with_type): Likewise.
8233 (build_overload_name): Likewise.
8234 (get_ctor_vtbl_name): Likewise.
8235 (start_squangling): Likewise.
8236 (get_id_2): Likewise.
8237 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
8238 (init_method): Call init_mangle for new ABI.
8239 (make_thunk): Call mangle_thunk for new ABI.
8240 * operators.def: Correct new ABI manglings for the `%' operator.
8242 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
8243 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
8244 (lookup_template_class): Call mangle_decl for new ABI.
8245 (get_mostly_instantiated_function_type): New function.
8246 (set_mangled_name_for_template_decl): Use it.
8247 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
8248 the new ABI. Use mangle_conv_op_name_for_type for instantiated
8249 conversion op names.
8250 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
8251 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
8252 (tinfo_base_init): Likewise. Mangle typeinfo string name with
8253 mangle_typeinfo_string_for_type.
8255 2000-06-03 Mark Mitchell <mark@codesourcery.com>
8257 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
8258 (INNERMOST_TEMPLATE_ARGS): New macro.
8259 (innermost_args): Remove.
8260 (get_innermost_template_args): New function.
8261 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
8262 * error.c (dump_function_decl): Be caution when using
8263 most_general_template.
8264 * method.c (build_template_parm_names): Use
8265 INNERMOST_TEMPLATE_ARGS.
8266 * pt.c (add_to_template_args): Tidy comment
8267 (get_innermost_template_args): New function.
8268 (check_explicit_specialization): Clear DECL_INITIAL for a new
8270 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
8272 (push_template_decl): Always register specializations of the most
8274 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
8275 (coerce_template_parms): Likewise.
8276 (lookup_template_class): Likewise.
8277 (innermost_args): Remove.
8278 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
8279 (tsubst_decl): Handle tricky specializations. Use
8280 get_innermost_template_args.
8281 (instantiate_template): Simplify handling of partial
8283 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
8284 (most_general_template): Reimplement, in a more straightforward
8286 (regenerate_decl_from_template): Tweak formatting. Use
8287 TMPL_ARGS_DEPTH for clarity.
8288 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
8290 * dump.c (dequeue_and_dump): Dump information about thunks.
8292 2000-06-01 Richard Henderson <rth@cygnus.com>
8294 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
8296 2000-06-01 Richard Henderson <rth@cygnus.com>
8298 * decl2.c (unsupported_options): Fix typo, make const.
8299 (lang_decode_option): Fix bsearch argument order.
8301 2000-06-01 Mark Mitchell <mark@codesourcery.com>
8303 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
8306 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8308 * cp-tree.h (c_get_alias_set): Deleted.
8309 * Makefile.in (decl.o): Include ../expr.h.
8310 * decl.c (expr.h): Include.
8311 (init_decl_processing): Call record_component_aliases for arrays.
8312 (grokdeclarator): Likewise.
8313 Set TREE_ADDRESSABLE for fields that aren't bitfields.
8314 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
8316 2000-05-31 Mark Mitchell <mark@codesourcery.com>
8318 Remove guiding declaration support.
8319 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
8320 (flag_guiding_decls): Remove.
8321 * call.c (build_user_type_conversion_1): Remove support for
8323 (build_new_function_call): Likewise.
8324 (build_new_op): Likewise.
8325 (build_new_method_call): Likewise.
8326 * decl.c (start_function): Likewise.
8327 * friend.c (is_friend): Likewise.
8328 (do_friend): Likewise.
8329 * decl2.c ((flag_dump_translation_unit): Make it const.
8330 (flag_guiding_decls): Remove.
8331 (unsupported_options): New variable
8332 (compare_options): New function.
8333 (lang_decode_option): Use them.
8335 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
8337 * method.c (mangle_expression): Adjust test for legal expression
8340 * pt.c (instantiate_decl): Save and restore the local
8341 specializations list.
8343 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
8345 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
8347 2000-05-30 Mark Mitchell <mark@codesourcery.com>
8349 * call.c (add_template_candidate_real): Handle member template
8350 constructors for classes with virtual bases.
8351 (build_user_type_conversion_1): Use in_charge_arg_for_name.
8352 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
8354 * ir.texi: Update thunk documentation.
8356 * call.c (joust): Fix handling of overloaded builtin operators.
8358 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
8360 * cp-tree.h (DECL_ANTICIPATED): New macro.
8361 Document new use of DECL_LANG_FLAG_7.
8362 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
8363 in the user namespace.
8364 * lex.c (do_identifier): If the identifier's declaration has
8365 DECL_ANTICIPATED on, it has not yet been declared. But do not
8366 replace it with an ordinary implicit declaration.
8368 * tinfo2.cc: Include stdlib.h.
8370 2000-05-29 Mark Mitchell <mark@codesourcery.com>
8372 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
8373 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
8376 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
8378 * decl2.c (lang_decode_option): Use skip_leading_substring instead
8381 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
8383 * operators.def (<?): Duplicated, should have been...
8386 2000-05-27 Alex Samuel <samuel@codesourcery.com>
8387 Mark Mitchell <mark@codesourcery.com>
8389 * cp-tree.h (ansi_opname): Make it a macro.
8390 (ansi_assopname): Likewise.
8391 (struct lang_decl_flags): Add assignment_operator_p.
8392 (struct lang_decl): Add operator_code.
8393 (DECL_VTT_PARM): Adjust.
8394 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
8395 overloaded operator.
8396 (SET_OVERLOADED_OPERATOR_CODE): New macro.
8397 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
8398 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
8399 (opname_tab): Remove.
8400 (assignop_tab): Likewise.
8401 (operator_name_info_t): New type.
8402 (operator_name_info): New variable.
8403 (assignment_operator_name_info): Likewise.
8404 (build_cp_library_fn): Remove declaration.
8405 (push_cp_library_fn): Likewise.
8406 (operator_name_string): Likewise.
8407 (build_decl_overload): Likewise.
8408 * call.c (print_z_candidates): Simplify.
8409 (build_object_call): Adjust usage of ansi_opname. Use
8410 DECL_OVERLOADED_OPERATOR_P.
8411 (op_error): Adjust operator name lookup.
8412 (build_conditional_expr): Adjust usage of ansi_opname.
8413 (build_new_op): Likewise.
8414 (build_op_delete_call): Likewise.
8415 (build_over_call): Likewise.
8416 (joust): Use DECL_OVERLOADED_OPERATOR_P.
8417 * decl.c (duplicate_decls): Copy operator_code.
8418 (init_decl_processing): Adjust parameters to push_cp_library_fn.
8419 (builtin_function): Adjust parameters to build_library_fn_1.
8420 (build_library_fn_1): Accept an overloaded operator code.
8421 (build_library_fn): Pass ERROR_MARK.
8422 (build_cp_library_fn): Accept an overloaded operator code.
8423 (push_cp_library_fn): Likewise.
8424 (grokfndecl): Tweak.
8425 (grokdeclarator): Simplify code to compute names of overloaded
8426 operators. Adjust use of ansi_opname.
8427 (ambi_op_p): Work on tree_codes, not identifiers.
8428 (unary_op_p): Likewise.
8429 (grok_op_properties): Likewise.
8430 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
8431 (lang_mark_tree): Don't try to mark the operator_code.
8432 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
8433 * error.c (dump_decl): Remove special handling for operator
8435 (dump_function_name): Likewise.
8436 (dump_expr): Adjust name lookup of operators.
8437 (op_to_string): Simplify.
8438 (assop_to_string): Likewise.
8439 * init.c (build_new_1): Adjust use of ansi_opname.
8440 * lex.c (opname_tab): Remove.
8441 (assignop_tab): Likewise.
8442 (ansi_opname): Likewise.
8443 (ansi_assopname): Likewise.
8444 (operator_name_string): Likewise.
8445 (reinit_lang_specific): Likewise.
8446 (operator_name_info): New variable.
8447 (assignment_operator_name_info): Likewise.
8448 (init_operators): New function.
8449 (init_parse): Use it.
8450 (do_identifier): Adjust use of ansi_opname.
8451 * method.c (mangle_expression): Don't use ansi_opname for
8453 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
8454 (build_decl_overload): Remove.
8455 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
8456 (do_build_assign_ref): Adjust use of ansi_opname.
8457 (synthesize_method): Likewise.
8458 (implicitly_declare_fn): Likewise.
8459 * operators.def: New file.
8460 * parse.y (operator): Adjust use of ansi_opname.
8461 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
8462 (set_mangled_name_for_template_decl): Don't play games with
8464 (special_function_p): Adjust use of ansi_opname.
8465 * typeck.c (check_return_expr): Likewise.
8466 * Make-lang.in (cc1plus): Depend on operators.def.
8467 * Makefile.in (lex.o): Likewise.
8470 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
8472 * Make-lang.in (cplib2.ready): Eradicate.
8474 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
8476 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
8477 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
8478 (built_min, cp_tree_equal): Likewise.
8480 2000-05-26 Mark Mitchell <mark@codesourcery.com>
8482 * class.c (layout_nonempty_base_or_field): Replace
8483 `record_layout_info' with `record_layout_info_s'.
8485 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
8488 * cp-tree.h (struct language_function): x_named_labels is now
8489 a struct named_label_list*.
8490 * decl.c (struct named_label_use_list): Renamed from...
8491 (struct named_label_list): ...this. New struct.
8492 (push_binding_level): Don't set eh_region.
8493 (note_level_for_eh): New fn.
8494 (pop_label): Take label and old value directly.
8495 (pop_labels): Adjust for new named_labels format.
8496 (lookup_label): Likewise.
8497 (poplevel): Note characteristics of a binding level containing a
8498 named label. Mess with named label lists earlier.
8499 (mark_named_label_lists): New fn.
8500 (mark_lang_function): Call it.
8501 (use_label): New fn, split out from...
8502 (make_label_decl): ...here. Don't call it.
8503 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
8504 check_previous_gotos): New fns, split out from...
8505 (define_label): ...here.
8506 (check_switch_goto): New fn.
8507 (define_case_label): Call it.
8508 (check_goto): New fn.
8509 * semantics.c (finish_goto_stmt): Call it and use_label.
8510 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
8511 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
8513 2000-05-26 Mark Mitchell <mark@codesourcery.com>
8515 * class.c (build_vtable_entry_ref): Correct usage of
8516 get_vtbl_decl_for_binfo.
8518 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
8519 * method.c (implicitly_declare_fn): Not here.
8521 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
8523 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
8524 (CPTI_PTMD_DESC_TYPE): ... here.
8525 (ptmd_desc_type_node): Rename to ...
8526 (ptm_desc_type_node): ... here.
8528 * rtti.c (ptmd_initializer): Rename to ...
8529 (ptm_initializer): ... here.
8530 (sythesize_tinfo_var): Adjust. Deal with pointer to member
8532 (create_tinfo_types): Adjust.
8534 2000-05-25 Mark Mitchell <mark@codesourcery.com>
8536 Finish implementation of VTTs.
8537 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
8538 CPTI_VTT_PARM_IDENTIFIER.
8539 (vtt_parm_identifier): New macro.
8540 (vtt_parm_type): Likewise.
8541 (BINFO_SUBVTT_INDEX): Likewise.
8542 (BINFO_VPTR_INDEX): Likewise.
8543 (struct lang_decl): Add vtt_parm.
8544 (DECL_VTT_PARM): New macro.
8545 (DECL_USE_VTT_PARM): Likewise.
8546 (DECL_NEEDS_VTT_PARM_P): Likewise.
8547 (get_vtt_name): Declare.
8548 (build_artificial_parm): Likewise.
8549 (fixup_all_virtual_upcast_offsets): Likewise.
8550 (expand_indirect_vtbls_init): Remove.
8551 * call.c (build_new_method_call): Pass the vtt to subobject
8552 constructors and destructors.
8553 * class.c (get_vtt_name): Give it external linkage.
8554 (build_clone): Handle the magic VTT parameters for clones.
8555 (clone_function_decl): Fix typo in comment.
8556 (build_vtt): Keep track of the indices in the VTTs where various
8557 entities are stored.
8558 (build_vtt_inits): Likewise.
8559 (dfs_build_vtt_inits): Likewise.
8560 (build_ctor_vtbl_group): Tweak type of construction vtables.
8561 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
8562 primary bases, when building construction vtables.
8563 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
8564 (initialize_predefined_identifiers): Add vtt_parm_identifier.
8565 (init_decl_processing): Initialize vtt_parm_type.
8566 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
8567 (lang_mark_tree): Make vtt_parm.
8568 * decl2.c (build_artificial_parm): New function.
8569 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
8570 (grokclassfn): Use build_artificial_parm.
8571 * init.c (initialize_vtbl_ptrs): Call
8572 fixup_all_virtual_upcast_offsets directly.
8573 (perform_member_init): Use the complete subobject destructor for
8575 (build_vtbl_address): New function.
8576 (expand_virtual_init): Handle VTTs.
8577 * optimize (maybe_clone_body): Likewise.
8578 * search.c (fixup_all_virtual_upcast_offsets): Give it external
8580 (expand_indirect_vtbls_init): Remove.
8581 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
8582 * tree.c (make_binfo): Make them bigger.
8584 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
8586 * inc/cxxabi.h (__pbase_type_info): Define, based on
8587 __pointer_type_info.
8588 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
8589 (__pointer_to_member_type_info): Likewise.
8590 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
8591 (__pointer_to_member_type_info::__is_pointer_p): Remove.
8592 (__pointer_type_info::__do_catch): Rename to ...
8593 (__pbase_type_info::__do_catch): ... here. Adjust.
8594 (__pbase_type_info::__pointer_catch): Implement.
8595 (__pointer_type_info::__pointer_catch): Adjust.
8596 (__pointer_to_member_type_info::__pointer_catch): Adjust.
8598 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
8600 * tinfo.h (__user_type_info::contained_virtual_p): New
8602 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
8604 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
8605 diamond shaped hierarchy. Add early out for mixed diamond and
8606 duplicate shaped hierarchy.
8608 2000-05-24 Mark Mitchell <mark@codesourcery.com>
8610 * cp-tree.h (build_delete): Change prototype.
8611 (build_vec_delete): Likewise.
8612 * call.c (build_scoped_method_call): Use special_function_kind
8613 values to indicate the kind of destruction to be done.
8614 (build_method_call): Likewise.
8615 * decl.c (finish_destructor_body): Likewise.
8616 (maybe_build_cleanup_1): Likewise. Rename to ...
8617 (maybe_build_cleanup): ... this.
8618 * decl2.c (delete_sanity): Use special_function_kind
8619 values to indicate the kind of destruction to be done.
8620 (build_cleanup): Likewise.
8621 * init.c (perform_member_init): Likewise.
8622 (build_vec_delete_1): Likewise.
8623 (build_dtor_call): Simplify.
8624 (build_delete): Use special_function_kind
8625 values to indicate the kind of destruction to be done.
8626 (build_vbase_delete): Likewise.
8627 (build_vec_delete): Likewise.
8629 * init.c (sort_member_init): Fix typo in error message generation
8632 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
8634 * semantics.c (begin_class_definition): make the packed
8635 attribute be sensitive to the "-fpack-struct" command line flag
8637 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
8639 Update new-abi upcast algorithm.
8640 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
8641 prototype and meaning of return value.
8642 (__si_class_type_info::__do_upcast): Likewise.
8643 (__vmi_class_type_info::__do_upcast): Likewise.
8644 * tinfo.cc (__class_type_info::__upcast_result): Replace
8645 whole2dst with part2dst. Adjust ctor.
8646 (__class_type_info::__do_upcast): Adjust call of worker function.
8647 (__class_type_info::__do_upcast): Adjust.
8648 (__si_class_type_info::__do_upcast): Adjust. Use parent's
8650 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
8651 virtual base in diamond hierarchy bug.
8653 2000-05-23 Mark Mitchell <mark@codesourcery.com>
8655 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
8656 and bitfield to tinfo_fn_p.
8657 (DECL_TINFO_FN_P): Adjust.
8658 (SET_DECL_TINFO_FN_P): Likewise.
8659 (DECL_MUTABLE_P): Likewise.
8660 (DECL_C_BIT_FIELD): Likewise.
8661 (SET_DECL_C_BIT_FIELD): Likewise.
8662 (CLEAR_DECL_C_BIT_FIELD): Likewise.
8663 (DECL_UNINLINABLE): Likewise.
8664 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
8665 (handle_using_decl): Remove assertion.
8666 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
8667 to build FIELD_DECLs.
8668 (build_base_field): Likewise.
8669 (layout_class_type): Likewise.
8670 * decl.c (init_decl_processing): Likewise.
8671 (build_ptrmemfunc_type): Likewise.
8672 (grokdeclarator): Likewise.
8673 * decl2.c (grok_x_components): Likewise.
8674 * except.c (call_eh_info): Likewise.
8675 * init.c (init_init_processing): Likewise.
8676 * rtti.c (expand_class_desc): Likewise.
8677 (create_pseudo_type_info): Likewise.
8678 (get_vmi_pseudo_type_info): Likewise.
8679 (create_tinfo_types): Likewise.
8680 * ptree.c (print_lang_decl): Adjust.
8681 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
8682 before checking DECL_MUTABLE_P.
8684 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
8685 parameters for template functions.
8686 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
8687 destructors as well as constructors.
8689 2000-05-22 Mark Mitchell <mark@codesourcery.com>
8691 * class.c (build_ctor_vtbl_group): Set inits.
8692 * optimize.c (maybe_clone_body): Set DECL_INLINE and
8693 DECL_THIS_INLINE appropriately for clones.
8695 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
8696 (DECL_CONV_FN_P): Simplify.
8697 (DECL_OPERATOR): Remove.
8698 (language_to_string): Declare.
8699 * decl.c (duplicate_decls): Fix typo in comment.
8700 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
8701 (grok_op_properties): Use DECL_CONV_FN_P instead of
8702 IDENTIFIER_TYPENAME_P.
8703 * dump.c (dequeue_and_dump): Dump the language linkage of
8705 * error.c (language_to_string): Give it external linkage.
8706 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
8707 (implicitly_declare_fn): Set DECL_LANGUAGE.
8708 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
8709 IDENTIFIER_TYPENAME_P.
8710 (tsubst_decl): Likewise.
8711 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
8712 * semantics.c (finish_member_declaration): Don't mark members of
8713 classes declared in an extern "C" region as extern "C".
8715 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
8717 * decl2.c (qualified_lookup_using_namespace): Look through
8720 * decl.c (push_using_decl): Return the old decl on namespace level.
8722 2000-05-21 Mark Mitchell <mark@codesourcery.com>
8724 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
8725 (VTT_NAME_PREFIX): New macro.
8726 (CTOR_VTBL_NAME_PREFIX): Likewise.
8727 (get_ctor_vtbl_name): New function.
8728 * class.c (get_vtable_name): Simplify.
8729 (get_vtt_name): New function.
8730 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
8731 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
8732 when a virtual base becomes primary.
8733 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
8735 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
8736 additional parameters.
8737 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
8738 (initialize_array): New function.
8739 (build_vtt): Likewise.
8740 (build_vtt_inits): Likewise.
8741 (dfs_build_vtt_inits): Likewise.
8742 (dfs_fixup_binfo_vtbls): Likewise.
8743 (build_ctor_vtbl_group): Likewise.
8744 (initialize_vtable): Use initialize_array.
8745 (accumulate_vtbl_inits): Reimplement to handle construction
8747 (dfs_accumulate_vtbl_inits): Likewise.
8748 (bulid_vtbl_initializer): Adjust parameter name.
8749 * method.c (build_typename_overload): Remove #if 0'd code.
8750 (get_ctor_vtbl_name): New function.
8751 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
8752 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
8754 * cp-tree.h (struct lang_type): Remove search_slot.
8755 (CLASSTYPE_SEARCH_SLOT): Remove.
8756 (emit_base_init): Change prototype.
8757 (initialize_vtbl_ptrs): Likewise.
8758 (expand_indirect_vtbls_init): Likewise.
8759 (clear_search_slots): Remove.
8760 * decl.c (lang_mark_tree): Don't mark search_slot.
8761 * init.c (initialize_vtbl_ptrs): Simplify.
8762 (emit_base_init): Likewise.
8763 * search.c (struct vbase_info): Document decl_ptr.
8764 (convert_pointer_to_single_level): Remove.
8765 (dfs_find_vbases): Remove.
8766 (dfs_init_base_pointers): Simplify.
8767 (dfs_clear_vbase_slots): Remove.
8768 (dfs_vtable_path_unmark): New function.
8769 (init_vbase_pointers): Simplify.
8770 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
8771 (expand_indirect_vtbls_init): Simplify. Don't call
8772 mark_all_temps_used.
8773 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
8774 initialize_vtbl_ptrs.
8776 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
8778 * except.c: Add static prototypes.
8780 2000-05-20 H.J. Lu <hjl@gnu.org>
8782 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
8784 2000-05-19 Mark Mitchell <mark@codesourcery.com>
8786 Don't create a separate copy of virtual bases for the
8787 CLASSTYPE_VBASECLASSES list.
8788 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
8789 (BINFO_FOR_VBASE): Remove.
8790 (CANONICAL_BINFO): Adjust.
8791 (binfo_for_vbase): New function.
8792 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
8793 instead of BINFO_FOR_VBASE.
8794 (build_vbase_pointer): Likewise.
8795 (build_secondary_vtable): Likewise.
8796 (dfs_mark_primary_bases): Likewise.
8797 (mark_primary_bases): Likewise.
8798 (layout_nonempty_base_or_field): Likewise.
8799 (dfs_set_offset_for_shared_vbases): Likewise.
8800 (dfs_set_offset_for_unshared_vbases): Likewise.
8801 (layout_virtual_bases): Likewise. Adjust for changes to the
8802 CLASSTYPE_VBASECLASSES list.
8803 (dump_class_hierarchy_r): Use binfo_for_vbase
8804 instead of BINFO_FOR_VBASE.
8805 (dump_class_hierarchy): Likewise.
8806 (finish_vtbls): Likewise.
8807 (build_vtbl_initializer): Adjust for changes to the
8808 CLASSTYPE_VBASECLASSES list.
8809 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
8810 * decl.c (finish_destructor_body): Adjust for changes to the
8811 CLASSTYPE_VBASECLASSES list.
8812 * init.c (sort_base_init): Use binfo_for_vbase.
8813 (construct_virtual_bases): Adjust for changes to the
8814 CLASSTYPE_VBASECLASSES list.
8815 (expand_member_init): Use binfo_for_vbase.
8816 (build_vbase_delete): Adjust for changes to the
8817 CLASSTYPE_VBASECLASSES list.
8818 * method.c (do_build_copy_constructor): Likewise.
8819 * rtti.c (get_base_offset): Use binfo_for_vbase.
8820 (expand_class_desc): Remove #if 0'd code.
8821 * search.c (struct vbase_info): Remove vbase_types.
8822 (get_base_distance): Use binfo_for_vbase.
8823 (lookup_field_queue_p): Use CANONICAL_BINFO.
8824 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
8825 (get_pure_virtuals): Adjust for changes to the
8826 CLASSTYPE_VBASECLASSES list.
8827 (dfs_find_vbases): Use binfo_for_vbase.
8828 (dfs_init_vbase_pointers): Likewise.
8829 (init_vbase_pointers): Don't initialize vi.vbase_types.
8830 (virtual_context): Use binfo_for_vbase.
8831 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
8832 CLASSTYPE_VBASECLASSES list.
8833 (expand_indirect_vtbls_init): Simplify.
8834 (dfs_get_vbase_types): Don't replicate virtual bases.
8835 (find_vbase_instance): Use binfo_for_vbase.
8836 (binfo_for_vbase): New function.
8837 * typeck.c (get_delta_difference): Use binfo_for_vbase.
8839 2000-05-17 Mark Mitchell <mark@codesourcery.com>
8841 * decl2.c (finish_anon_union): Generalize error messages to handle
8842 anonymous structures.
8843 * init.c (perform_member_init): Remove `name' parameter.
8844 (build_field_list): New function.
8845 (sort_member_init): Handle anonymous union initialization order
8846 correctly. Check for multiple initializations of the same union.
8847 (emit_base_init): Don't look up fields by name here.
8848 (expand_member_init): Record the result of name lookup for future
8850 * typeck.c (build_component_ref): Fix formatting.
8852 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
8854 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
8855 * typeck.c (build_x_compound_expr): Replace warn_unused with
8858 * decl2.c (lang_decode_option): Update -Wall unused flags by
8859 calling set_Wunused.
8861 2000-05-16 Mark Mitchell <mark@codesourcery.com>
8863 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
8864 * init.c (dfs_vtable_path_unmark): Remove.
8865 * search.c (marked_new_vtable_p): Likewise.
8866 (unmarked_new_vtable_p): Likewise.
8867 (dfs_search_slot_nonempty_p): Likewise.
8868 (dfs_mark): Likewise.
8869 (dfs_vtable_path_unmark): Likewise.
8870 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
8871 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
8872 (dfs_init_vbase_pointers): Remove special-case new ABI code.
8873 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
8874 (init_vbase_pointers): Simplify.
8875 (expand_indirect_vtbls_init): Likewise.
8877 * class.c (copy_virtuals): New function.
8878 (build_primary_table): Use it.
8879 (build_secondary_vtable): Likewise.
8880 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
8881 indicate that no vcall offset is required.
8882 (add_virtual_function): Likewise.
8883 (modify_all_vtables): Likewise.
8884 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
8885 (dfs_accumulate_vtbl_inits): Likewise.
8886 (build_vtbl_initializer): Make changes to handle construction
8888 (dfs_build_vcall_offset_vtbl_entries): Likewise.
8889 (build_rtti_vtbl_entries): Likewise.
8890 (build_vtable_entries): Handle a NULL vcall_index.
8892 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
8894 * decl2.c (lang_decode_option): Fix thinko.
8896 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
8898 * except.c (check_handlers): New fn.
8899 * cp-tree.h: Declare it.
8900 * semantics.c (finish_handler_sequence): Call it.
8901 (finish_function_handler_sequence): Likewise.
8902 (finish_handler_parms): Set TREE_TYPE on the handler.
8903 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
8904 * search.c (get_base_distance_recursive): If protect>1, ignore
8906 (get_base_distance): Don't reduce watch_access.
8908 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
8910 * lex.c: #include diagnostic.h.
8911 (lang_init_options): Set default prefixing rules.
8913 * lang-options.h: Add -fdiagnostics-show-location=.
8915 * decl2.c: #include diagnostic.h.
8916 (lang_decode_option): Handle -fdiagnostics-show-location=.
8918 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
8920 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
8921 * vec.cc: Revert my 2000-05-07 change.
8923 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
8925 * class.c (check_field_decls): Complain about non-static data
8926 members with same name as class in class with constructor.
8928 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
8930 * decl.c (grokdeclarator): Allow non-static data members with
8933 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
8935 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
8936 and pending_inline.filename. Update prototypes.
8937 * decl.c (define_label): Constify filename parameter.
8938 * decl2.c (warn_if_unknown_interface): Constify local char *.
8939 * input.c Constify input_source.filename. Don't declare
8940 input_filename or lineno. Constify filename parameter to feed_input.
8941 * lex.c (init_parse): Constify parameter and return value.
8942 (cp_pragma_interface, cp_pragma_implementation): Constify
8944 (reinit_parse_for_method, reinit_parse_for_block,
8945 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
8946 Constify local char *.
8947 * pt.c: Don't declare lineno or input_filename.
8948 (print_template_context, tsubst_friend_function, tsubst_decl,
8949 tsubst, instantiate_decl): Constify local char *.
8950 * semantics.c (expand_body): Constify local char *.
8951 * tree.c (build_srcloc): Constify filename parameter.
8952 * typeck.c (c_expand_asm_operands): Constify filename
8955 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
8957 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
8960 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
8962 * inc/cxxabi.h: Fix typos in comment.
8963 (__base_class_info::__offset): Use a static_cast.
8965 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
8967 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
8968 of std::size_t and std::ptrdiff_t respectively.
8969 * tinfo.cc: Likewise.
8972 2000-05-06 Richard Henderson <rth@cygnus.com>
8974 * typeck.c (build_c_cast): Don't warn integer->pointer size
8975 mismatch for constants.
8977 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
8979 * rtti.c (ptmd_initializer): Set non-public, if class is
8982 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
8983 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8984 __cxa_vec_delete): Likewise.
8985 * tinfo.cc (__dynamic_cast): Likewise.
8986 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
8987 __cxa_vec_delete): Likewise.
8989 2000-05-04 Mark Mitchell <mark@codesourcery.com>
8991 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
8992 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
8993 (lang_decl_flags): Add vcall_offset.
8994 (THUNK_VCALL_OFFSET): Use it.
8995 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
8996 * method.c (make_thunk): Create the lang_decl here, not in
8998 (emit_thunk): Make generic thunks into ordinary functions once
8999 they have been fed to expand_body.
9000 * semantics.c (expand_body): Set current_function_is_thunk here.
9002 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9004 * class.c (update_vtable_entry_for_fn): Prototype.
9006 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
9009 * search.c (dfs_build_inheritance_graph_order): Prototype.
9011 2000-05-04 Mark Mitchell <mark@codesourcery.com>
9013 * cp-tree.h (special_function_kind): Add various kinds of
9015 (special_function_p): New function.
9016 * class.c (overrides): Don't let one kind of destructor override
9018 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
9019 whether or not to instantiate a template.
9020 * tree.c (special_function_p): Define.
9022 2000-05-03 Mark Mitchell <mark@codesourcery.com>
9024 * cp-tree.def (THUNK_DECL): Remove.
9025 * cp-tree.h (DECL_THUNK_P): New macro.
9026 (DECL_NON_THUNK_FUNCTION_P): Likewise.
9027 (DECL_EXTERN_C_FUNCTION_P): Likewise.
9028 (SET_DECL_THUNK_P): Likewise.
9029 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
9030 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
9031 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
9032 * decl.c (decls_match): Use DECL_EXTERN_C_P.
9033 (duplicate_decls): Likewise.
9034 (pushdecl): Likewise. Adjust thunk handling.
9035 (grokfndecl): Use DECL_EXTERN_C_P.
9036 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
9037 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
9038 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
9039 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
9040 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
9041 DECL_NO_STATIC_CHAIN.
9042 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
9043 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
9044 * search.c (covariant_return_p): Remove THUNK_DECL handling.
9047 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
9049 * tree.c (walk_tree): Set lineno.
9051 2000-05-01 Mark Mitchell <mark@codesourcery.com>
9053 * exception.cc: Update license notice.
9055 * new1.cc: Likewise.
9056 * new2.cc: Likewise.
9057 * tinfo.cc: Likewise.
9058 * tinfo2.cc: Likewise.
9060 * inc/cxxabi.h: Likewise.
9061 * inc/exception: Likewise.
9062 * inc/new: Likewise.
9063 * inc/new.h: Likewise.
9064 * inc/typeinfo: Likewise.
9066 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
9068 * tree.c (build_target_expr_with_type): If we already have a
9069 TARGET_EXPR, just return it.
9071 * optimize.c (initialize_inlined_parameters): Don't generate an
9072 EXPR_STMT if we can just use DECL_INITIAL.
9073 * decl.c (emit_local_var): Only make the initialization a
9074 full-expression if stmts_are_full_exprs_p.
9076 2000-05-01 Mark Mitchell <mark@codesourcery.com>
9078 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
9080 * call.c (standard_conversion): Use it.
9081 (direct_reference_binding): Likewise.
9082 (build_over_call): Likewise.
9083 (is_properly_derived_from): Likewise.
9084 (compare_ics): Likewise.
9085 * class.c (resolves_to_fixed_type_p): Likewise.
9086 * optimize.c (declare_return_variable): Likewise.
9087 * pt.c (is_specialization_of): Likewise.
9089 * typeck.c (comp_target_parms): Likeiwse.
9090 (build_static_cast): Likewise.
9091 (build_reinterpret_cast): Likewise.
9092 (build_const_cast): Likewise.
9093 (comp_ptr_ttypes_real): Likewise.
9094 (comp_ptr_ttypes_const): Likewise.
9095 * typeck2.c (process_init_constructor): Likewise.
9097 2000-04-30 Scott Snyder <snyder@fnal.gov>
9099 * decl.c (finish_destructor_body): Use the base destructor when
9100 destroying virtual bases.
9102 2000-04-30 Mark Mitchell <mark@codesourcery.com>
9104 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
9106 * optimize.c (struct inline_data): Add target_exprs field.
9107 (declare_return_variable): When a function returns an aggregate,
9108 use the variable declared in the TARGET_EXPR as the remapped
9110 (expand_call_inline): Update the pending target_exprs stack.
9111 (optimize_function): Initialize the stack.
9113 * decl2.c (finish_file): Fix typo in comment.
9115 * method.c (emit_thunk): Don't try to return a `void' value.
9117 * optimize.c (initialize_inlined_parameters): If the parameter is
9118 addressable, we need to make a new VAR_DECL, even if the
9119 initializer is constant.
9121 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
9123 * decl.c (grok_op_properties): Add an extra check of argtypes.
9125 2000-04-27 Mark Mitchell <mark@codesourcery.com>
9127 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
9129 (initialize_inlined_parameters): Try to avoid creating new
9132 2000-04-27 Alex Samuel <samuel@codesourcery.com>
9134 * lex.c (my_get_run_time): Remove.
9135 (init_filename_times): Use get_run_time instead of my_get_run_time.
9136 (check_newline): Likewise.
9137 (dump_time_statistics): Likewise.
9138 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
9139 of computing elapsed time explicitly.
9141 2000-04-26 Mark Mitchell <mark@codesourcery.com>
9143 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
9144 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
9145 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
9146 before calling decl_constant_value.
9147 * class.c (check_bitfield_decl): Likewise.
9148 * cvt.c (ocp_convert): Likewise.
9149 (convert): Likewise.
9150 * decl.c (compute_array_index_type): Likewise.
9151 (build_enumerator): Likewise.
9152 * decl2.c (check_cp_case_value): Likewise.
9153 * pt.c (convert_nontype_argument): Likewise.
9155 * typeck.c (decay_conversion): Likewise.
9156 (build_compound_expr): Likewise.
9157 (build_reinterpret_cast): Likewise.
9158 (build_c_cast): Likewise.
9159 (convert_for_assignment): Likewise.
9161 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
9163 * decl.c (finish_function): Don't play games with DECL_INLINE.
9165 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
9167 * ir.texi: Correct typo.
9169 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9171 * decl.c (grokdeclarator): Reject VLAs as members.
9173 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
9175 * call.c (standard_conversion): Accept conversion between
9178 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
9180 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
9182 * decl2.c (finish_file): Remove double setup for accounting
9185 2000-04-24 Robert Lipe <robertlipe@usa.net>
9187 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
9189 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
9191 * new.cc (set_new_handler): Needs to be in std::.
9193 2000-04-23 Mark Mitchell <mark@codesourcery.com>
9195 * cp-tree.h (lang_decl): Remove pretty_function_p.
9196 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
9197 language-specific node.
9198 * decl.c (cp_make_fname_decl): Use build_decl, not
9199 build_lang_decl, to build the variables.
9200 (grokvardecl): Don't call build_lang_decl for local variables in
9202 (grokdeclarator): Don't call build_lang_decl for local type
9203 declarations in templates.
9204 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
9205 zero'd memory, rather than calling memset.
9206 * pt.c: Include hashtab.h.
9207 (local_specializations): New variable.
9208 (retrieve_local_specialization): Use it.
9209 (register_local_specialization): Likewise.
9210 (tsubst_decl): Don't assume local variables have
9212 (instantiate_decl): Set up local_specializations.
9213 * Makefile.in (HTAB_H): New variable.
9215 2000-04-23 Richard Henderson <rth@cygnus.com>
9217 * typeck.c (c_expand_asm_operands): Restore the original
9218 contents of the output list.
9220 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
9222 * ir.texi: Document complex number representation.
9224 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
9226 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
9227 (target_incomplete_p): New function.
9228 (tinfo_base_init): Create comdat NTBS name variable.
9229 (ptr_initializer): Add non_public parameter. Calculate it.
9230 (ptmd_initializer): Likewise.
9231 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
9232 (create_real_tinfo_var): Add non_public parameter. Use it.
9233 Push proxy into global namespace.
9234 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
9236 * inc/typeinfo (type_info::before, type_info::operator==):
9237 Compare __name addresses.
9239 * tinfo2.cc: Remove new-abi builtins comment.
9241 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
9243 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
9245 * call.c (joust): Exit early if we get the same function, too.
9247 * decl2.c (key_method): Return NULL_TREE for template classes.
9248 (import_export_class): Don't need to check for template classes.
9250 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
9252 * lex.c: Remove references to cccp.c.
9254 2000-04-18 Mark Mitchell <mark@codesourcery.com>
9256 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
9257 volatile_memfunc. Add destructor_attr. Adjust dummy.
9258 (DECL_DESTRUCTOR_P): Use destructor_attr.
9259 (DECL_CONST_MEMFUNC_P): Reimplement.
9260 (DECL_VOLATILE_MEMFUNC_P): Remove.
9261 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
9262 (overrides): Use DECL_DESTRUCTOR_P.
9263 (check_for_override): Likewise.
9264 * decl.c (start_function): Likewise.
9265 * decl2.c (grokfclassfn): Likewise.
9266 (check_classfn): Likewise.
9267 (grok_function_init): Likewise.
9269 2000-04-17 Mark Mitchell <mark@codesourcery.com>
9271 * decl2.c (grokfield): Issue error on illegal data member
9274 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
9276 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
9278 2000-04-16 Mark Mitchell <mark@codesourcery.com>
9280 * class.c (build_vtable_entry): Don't build thunks for type-info
9283 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
9285 * decl.c (decls_match): Allow a redeclaration of a builtin to
9286 specify args while the builtin did not.
9288 2000-04-15 Mark Mitchell <mark@codesourcery.com>
9290 * cp-tree.def (THUNK_DECL): Add to documentation.
9291 * cp-tree.h (flag_huge_objects): Declare.
9292 * class.c (modify_vtable_entry): Tidy.
9293 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
9294 Calculate delta appropriately for the new ABI.
9295 (dfs_modify_vtables): Use it.
9296 (modify_all_vtables): Fix thinko in code to add overriding copies
9297 of functions to primary vtables.
9298 (build_clone): Fix typo in comment.
9299 (clone_function_decl): Correct order of destructors in vtable.
9300 (build_vbase_offset_vtbl_entries): Adjust comment.
9301 (dfs_vcall_offset_queue_p): Remove.
9302 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
9303 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
9304 (build_vtable_entry): Correct check for pure virtual functions.
9305 Don't declare flag_huge_objects.
9306 * decl.c (flag_huge_objects): Remove declaration.
9307 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
9308 Use int_size_in_bytes.
9309 (emit_thunk): Handle vcall offset thunks.
9311 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
9313 * decl2.c (parse_time, varconst_time): Delete declarations.
9314 (finish_file): Delete LINENO declaration.
9315 START_TIME and THIS_TIME now long.
9317 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
9319 * class.c (build_base_field): Reformat comment.
9321 * inc/cxxabi.h (stddef.h): Comment inclusion.
9322 (__base_class_info::__offset): Comment shift.
9324 2000-04-12 Mark Mitchell <mark@codesourcery.com>
9326 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
9327 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
9328 (cp_push_exception_identifier): New macro.
9329 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
9330 (DECL_BASE_DESTRUCTOR_P): Likewise.
9331 (DECL_DELETING_DESTRUCTOR_P): Likewise.
9332 (get_vtbl_decl_for_binfo): Fix formatting.
9333 (in_charge_arg_for_name): New macro.
9334 (maybe_build_cleanup_and_delete): Remove declaration.
9335 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
9336 (in_charge_arg_for_name): New function.
9337 (build_new_method_call): Use it. Handle cloned destructors.
9338 (build_clone): Don't make the base constructor virtual.
9339 Automatically defer generated functions.
9340 (clone_function_decl): Handle destructors, too.
9341 (clone_constructors_and_destructors): Likewise.
9342 (create_vtable_ptr): Don't create a vtable entry for a cloned
9344 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
9345 (initialize_predefined_identifiers): Update appropriately.
9346 (finish_destructor_body): Simplify.
9347 (maybe_build_cleanup_and_delete): Remove.
9348 * except.c (expand_throw): Handle new-ABI destructors.
9349 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
9350 (build_dtor_call): New function.
9351 (build_delete): Use it. Simplify.
9352 * optimize.c (maybe_clone_body): Handle destructors.
9353 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
9355 * exception.cc (cleanup_fn): New typedef.
9356 (CALL_CLEANUP): New macro.
9357 (cp_eh_info): Use them.
9358 (__cp_push_exception): Likewise.
9359 (__cp_pop_exception): Likewise.
9361 2000-04-11 Mark Mitchell <mark@codesourcery.com>
9363 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
9364 (complete_dtor_identifier): New macro.
9365 (CLASSTYPE_FIRST_CONVERSION): Remove.
9366 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
9367 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
9368 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
9369 (CLASSTYPE_CONSTRUCTORS): Likewise.
9370 (CLASSTYPE_DESTRUCTORS): Likewise.
9371 (lang_decl): Add cloned_function.
9372 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
9373 (DECL_BASE_CONSTRUCTOR_P): Likewise.
9374 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
9375 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
9376 (DECL_CLONED_FUNCTION_P): Likewise.
9377 (DECL_CLONED_FUNCTION): Likewise.
9378 (clone_function_decl): Declare.
9379 (maybe_clone_body): Likewise.
9380 * call.c (build_user_type_conversion_1): Call complete object
9381 constructors in the new ABI.
9382 (build_new_method_call): Don't add in-charge parameters under the
9384 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
9385 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
9386 CLASSTYPE_DESTRUCTOR_SLOT.
9387 (build_clone): New function.
9388 (clone_function_decl): Likewise.
9389 (clone_constructors_and_destructors): Likewise.
9390 (check_bases_and_members): Use it.
9391 * decl.c (iniitialize_predefined_identifiers): Initialize
9392 complete_dtor_identifier.
9393 (finish_function): Don't add extra code to a clone.
9394 (lang_mark_tree): Mark cloned_function.
9395 * decl2.c (mark_used): Don't bother trying to instantiate things
9397 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
9398 * method.c (set_mangled_name_for_decl): Don't treat clones as
9400 (synthesize_method): Sythesize cloned functions, not the clones.
9401 * optimize.c (inline_data): Update comment on ret_label.
9402 (remap_block): Don't assume DECL_INITIAL exists.
9403 (copy_body_r): Allow ret_label to be NULL.
9404 (maybe_clone_body): Define.
9405 * pt.c (tsubst_decl): Handle clones.
9406 (instantiate_clone): New function.
9407 (instantiate_template): Use it.
9408 (set_mangled_name_for_template_decl): Don't treat clones as
9410 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
9411 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
9412 * semantics.c (expand_body): Clone function bodies as necessary.
9414 * optimize.c (remap_decl): Avoid sharing structure for arrays
9415 whose size is only known at run-time.
9416 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
9418 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
9419 to has_in_charge_parm_p.
9420 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
9421 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
9422 (DECL_COPY_CONSTRUCTOR_P): New macro.
9423 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
9424 (build_user_type_conversion_1): Likewise.
9425 (convert_like_real): Likewise.
9426 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
9427 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
9428 (copy_args_p): Likewise.
9429 (grok_ctor_properties): Likewise.
9430 (start_function): Likewise.
9431 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
9432 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
9433 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
9434 * method.c (do_build_copy_constructor): Use
9435 DECL_HAS_IN_CHARGE_PARM_P.
9436 (synthesize_method): Likewise.
9437 * pt.c (instantiate_template): Remove goto.
9438 * tree.c (build_cplus_method_type): Remove mention of obstacks in
9441 * cp-tre.h (finish_function): Change prototype.
9442 * decl.c (end_cleanup_fn): Adjust caller.
9443 (finish_function): Take only one parameter.
9444 * decl2.c (finish_objects): Adjust caller.
9445 (finish_static_storage_duration_function): Likewise.
9446 * method.c (emit_thunk): Likewise.
9447 * parse.y: Likewise.
9448 * parse.c: Regenerated.
9449 * pt.c (instantiate_decl): Likewise.
9450 * rtti.c (synthesize_tinfo_fn): Likewise.
9451 * semantics.c (expand_body): Likewise.
9453 * cp-tree.h (copy_decl): New function.
9454 * class.c (finish_struct_1): Use it.
9455 * lex.c (copy_decl): Define it.
9456 * pt.c (tsubst_decl): Likewise.
9457 * tree.c (copy_template_template_parm): Likewise.
9459 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
9460 has_nonpublic_assign_ref.
9461 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
9462 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
9463 * class.c (finish_struct_methods): Don't set
9464 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
9465 (interface_only): Don't declare.
9466 (interface_unknown): Likewise.
9468 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9470 * tree.h (HAVE_TEMPLATES): Remove definition.
9471 * lang-options.h (-fthis-is-variable): Remove documentation.
9473 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
9475 * class.c (instantiate_type): Handle object-relative template-id.
9477 * semantics.c (finish_expr_stmt): Call convert_to_void here.
9478 * decl.c (cplus_expand_expr_stmt): Not here.
9480 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
9481 Initialize exprtype earlier.
9483 * parse.y (fn.def1): Check for defining types in return types.
9485 * decl.c (check_tag_decl): Notice extra fundamental types.
9486 Diagnose empty decls in classes, too.
9488 * decl.c (grokdeclarator): Don't override an anonymous name if no
9489 declarator was given.
9491 * cvt.c (convert_to_void): Call resolve_offset_ref.
9493 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
9495 * decl2.c (decl_namespace): Handle getting a type.
9497 * typeck.c (build_c_cast): Re-enable warning for cast between
9498 pointer and integer of different size.
9500 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
9502 * inc/cxxabi.h (__pointer_type_info): Add restrict and
9504 (__pointer_type_info::__pointer_catch): New virtual function.
9505 (__pointer_to_member_type_info): Derive from
9506 __pointer_type_info. Adjust.
9507 (__pointer_to_member_type_info::__do_catch): Remove.
9508 (__pointer_to_member_type_info::__is_pointer_p): Declare.
9509 (__pointer_to_member_type_info::__pointer_catch): Declare.
9510 * rtti.c (qualifier_flags): Add restrict flag.
9511 (ptmd_initializer): Reorder members.
9512 (create_tinfo_types): Expand comments. Reorder
9513 ptmd_desc_type_node members.
9514 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
9516 (__pointer_type_info::__do_catch): Move specific code into
9517 __pointer_catch. Call it.
9518 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
9519 specific catch checking. Fix void conversion check.
9520 (__pointer_to_member_type_info::__do_catch): Remove.
9521 (__pointer_to_member_type_info::__pointer_catch): Implement.
9523 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
9525 * lex.c (init_parse): Remove traces of classof and headof.
9526 * decl2.c (flag_operator_names): Default to 1.
9527 (lang_decode_option): Do not set it for -ansi.
9529 2000-04-09 Mark Mitchell <mark@codesourcery.com>
9531 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
9532 (DECL_MAIN_VARIANT): Remove.
9533 * decl.c (duplicate_decls): Don't set it.
9534 (start_function): Likewise.
9535 (lang_mark_tree): Don't mark it.
9536 * decl2.c (defer_fn): Don't use it.
9537 * lex.c (retrofit_lang_decl): Don't set it.
9538 * pt.c (tsubst_decl): Likewise.
9539 * ptree.c (print_lang_decl): Don't print it.
9540 * typeck.c (mark_addressable): Don't use it.
9542 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
9544 * vec.cc: Include <new> and <exception>.
9545 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
9546 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
9548 (__cxa_vec_delete): Catch dtor exceptions.
9550 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
9552 Prepend __ to implementation defined names.
9553 * inc/typeinfo (type_info): Rename _name to __name.
9554 (type_info::type_info): Rename parameter.
9555 (type_info::operator==, type_info::operator!=,
9556 type_info::before): Likewise.
9557 (type_info::is_pointer_p, type_info::is_function_p,
9558 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
9561 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
9562 (__pointer_type_info::__pointer_type_info): Likewise.
9563 (__pointer_type_info::is_pointer_p,
9564 __pointer_type_info::do_catch): Prepend __. Rename parameters.
9565 (__array_type_info::__array_type_info): Rename parameters.
9566 (__function_type_info::__function_type_info): Likewise.
9567 (__function_type_info::is_function_p): Prepend __.
9568 (__enum_type_info::__enum_type_info): Rename parameters.
9569 (__pointer_to_member_type_info::__pointer_to_member_type_info):
9571 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
9573 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
9574 (__class_type_info::__class_type_info): Rename parameters.
9575 (__class_type_info::sub_kind): Prepend __. Adjust member names.
9576 (__class_type_info::upcast_result,
9577 __class_type_info::dyncast_result): Prepend __. Move definition
9579 (__class_type_info::do_upcast, __class_type_info::do_catch,
9580 __class_type_info::find_public_src,
9581 __class_type_info::do_dyncast,
9582 __class_type_info::do_find_public_src): Prepend __. Rename
9584 (__si_class_type_info::__si_class_type_info): Rename parameters.
9585 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
9586 __si_class_type_info::do_find_public_src): Prepent __. Rename
9588 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
9589 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
9590 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
9592 (__dynamic_cast): Rename parameters.
9593 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
9594 type_info::do_catch, type_info::do_upcast): Prepend __.
9595 (contained_p, public_p, virtual_p, contained_public_p,
9596 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
9597 (__class_type_info::do_catch,
9598 __class_type_info::do_upcast): Prepend __. Adjust.
9599 (__class_type_info::__upcast_result,
9600 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
9602 (__class_type_info::find_public_src): Prepend __. Adjust.
9603 (__class_type_info::do_find_public_src,
9604 __si_class_type_info::do_find_public_src,
9605 __vmi_class_type_info::do_find_public_src): Likewise.
9606 (__class_type_info::do_dyncast,
9607 __si_class_type_info::do_dyncast,
9608 __vmi_class_type_info::do_dyncast): Likewise.
9609 (__class_type_info::do_upcast,
9610 __si_class_type_info::do_upcast,
9611 __vmi_class_type_info::do_upcast): Likewise.
9612 (__dynamic_cast): Adjust.
9613 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
9614 (__function_type_info::is_function_p): Likewise.
9615 (__pointer_type_info::do_catch): Likewise. Adjust.
9616 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
9617 (__throw_type_match_rtti_2): Adjust.
9618 (__is_pointer): Adjust.
9620 2000-04-08 Mark Mitchell <mark@codesourcery.com>
9622 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
9623 (complete_ctor_identifier): New macro.
9624 (special_function_kind): Add sfk_copy_constructor and
9625 sfk_assignment_operator.
9626 (LOOKUP_HAS_IN_CHARGE): Remove.
9627 (cons_up_default_function): Rename to ...
9628 (implicitly_declare_fn): ... this.
9629 * call.c (build_new_method_call): Add in-charge parameters for
9631 * class.c (add_implicitly_declared_members): Change parameter name
9632 from cant_have_assignment to cant_have_const_assignment.
9633 Replace calls to cons_up_default_function to implicitly_declare_fn.
9634 * cvt.c (ocp_convert): Use complete_ctor_identifier.
9635 * decl.c (initialize_predefined_identifiers): Initialize it.
9636 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
9638 * init.c (expand_default_init): Don't calculate the in-charge
9640 (build_new_1): Likewise.
9641 * lex.c (cons_up_default_function): Move to method.c.
9642 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
9643 (implicitly_declare_fn): New function.
9644 * typeck.c (build_static_cast): Use complete_ctor_identifier.
9645 (build_modify_expr): Likewise.
9646 * typeck2.c (build_functional_cast): Likewise.
9648 Under the new ABI, constructors don't return `this'.
9649 * cp-tree.h (warn_reorder): Declare.
9650 (special_function_kind): New enum.
9651 (global_base_init_list): Remove declaration.
9652 (emit_base_init): Don't return a value.
9653 (check_base_init): Don't declare.
9654 (is_aggr_typedef): Likewise.
9655 * decl.c (check_special_function_return_type): New function.
9656 (return_types): Remove.
9657 (grokdeclarator): Use check_special_function_return_type.
9658 (start_function): Don't initialize ctor_label under the new ABI.
9659 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
9660 * init.c (begin_init_stmts): Move to top of file.
9661 (finish_init_stmts): Likewise.
9662 (warn_reorder): Don't declare.
9663 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
9665 (check_base_init): Remove.
9666 (is_aggr_typedef): Likewise.
9667 (build_new_1): Don't use the return value of a constructor.
9668 * semantics.c (setup_vtbl_ptr): Don't use the return value
9670 * typeck.c (check_return_expr): Don't magically convert return
9671 statements into `return this' in constructors under the new ABI.
9673 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
9674 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
9675 (base_ctor_identifier): New macro.
9676 (base_dtor_identifier): Likewise.
9677 (deleting_dtor_identifier): Likewise.
9678 * decl.c: Don't include obstack.h.
9679 (obstack_chunk_alloc): Don't define.
9680 (obstack_chunk_free): Likewise.
9681 (struct predefined_identifier): New type.
9682 (initialize_predefined_identifiers): New function.
9683 (init_decl_processing): Use it.
9684 (debug_temp_inits): Remove.
9685 (start_method): Don't call preserve_data.
9686 (hack_incomplete_structures): Update comment.
9687 * init.c (init_init_processing): Don't initialize
9689 (build_offset_rf): Remove dead code.
9690 (build_delete): Use CLASSTYPE_N_BASECLASSES.
9691 * search.c (init_search_processing): Don't initialize
9694 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9696 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
9697 some sign_compare warnings.
9699 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
9701 Rename abi::__vmi_class_type_info members.
9702 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
9703 base_list, detail_masks members to vmi_flags, vmi_base_count,
9704 vmi_bases and vmi_flags_masks respectively.
9705 (__vmi_class_type_info::vmi_flags_masks): Rename
9706 details_unknown_mask to flags_unknown_mask.
9707 * tinfo.cc (__class_type_info::do_upcast): Adjust.
9708 (__vmi_class_type_info::do_find_public_src): Adjust.
9709 (__vmi_class_type_info::do_dyncast): Adjust.
9710 (__vmi_class_type_info::do_upcast): Adjust.
9712 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
9714 * tinfo.cc (convert_to_base): New function.
9715 (get_vbase_offset): Remove. Move into convert_to_base.
9716 (__vmi_class_type_info::do_find_public_src): Adjust.
9717 (__vmi_class_type_info::do_dyncast): Adjust.
9718 (__vmi_class_type_info::do_upcast): Adjust.
9720 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
9722 * tinfo.cc (operator=): Use __builtin_strcmp.
9723 * tinfo2.cc (before): Likewise.
9725 2000-04-06 Mark Mitchell <mark@codesourcery.com>
9727 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
9728 (DECL_SAVED_INLINE): Rename to ...
9729 (DECL_DEFERRED_FN): ... this.
9730 (in_function_p): Remove declaration.
9731 (mark_inline_for_output): Rename to ...
9732 (defer_fn): ... this.
9733 * decl.c (finish_function): Adjust call to mark_inline_for_output.
9734 (in_function_p): Remove definition.
9735 * decl2.c (saved_inlines): Rename to ...
9736 (deferred_fns): ... this.
9737 (saved_inlines_used): Rename to ...
9738 (deferred_fns_used): ... this.
9739 (mark_inline_for_output): Rename to ...
9740 (defer_fn): ... this.
9741 (finish_file): Adjust accordingly.
9742 (init_decl2): Likewise.
9743 * lex.c (cons_up_default_function): Likewise.
9744 * pt.c (mark_decl_instantiated): Likewise.
9745 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
9747 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
9748 * semantics.c (expand_body): Defer more functions.
9750 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
9753 * Make-lang.in (CXX_LIB2FUNCS): Add it.
9755 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
9756 __cxa_vec_delete): Declare.
9758 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
9760 * rtti.c (dfs_class_hint_mark): New static function.
9761 (dfs_class_hint_unmark): New static function.
9762 (class_hint_flags): Use them.
9764 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
9766 * decl2.c: Make flag_honor_std dependent on ENABLE_STD_NAMESPACE.
9768 2000-04-05 Mark Mitchell <mark@codesourcery.com>
9770 * cp-tree.h (instantiate_decl): Change prototype.
9771 * decl2.c (mark_used): Adjust call.
9772 * optimize.c (inlinable_function_p): Adjust handling of templates.
9773 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
9774 (do_type_instantiation): Likewise.
9775 (instantiate_decl): Defer more templates.
9776 (instantiate_pending_templates): Adjust logic to handle inline
9779 * Makefile.in (GGC_H): New variable. Use it throughout in place
9782 * call.c: Don't include obstack.h. Include ggc.h.
9783 (obstack_chunk_alloc): Don't define.
9784 (obstack_chunk_free): Likewise.
9785 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
9786 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
9787 (pop_switch): Free it.
9789 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
9791 * dump.c (dequeue_and_dump): Don't try to print the bit_position
9792 if we don't have a DECL_FIELD_OFFSET.
9794 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
9796 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
9799 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
9801 * cfns.gperf (hash, libc_name_p): Prototype.
9803 * rtti.c (build_dynamic_cast_1): Constification.
9805 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
9807 * semantics.c (deferred_type_access_control): Prototype.
9809 2000-04-04 Mark Mitchell <mark@codesourcery.com>
9811 Correct many new ABI issues regarding vbase and vcall offset
9813 * cp-tree.h (BINFO_VTABLE): Document.
9814 (struct lang_type): Tweak formatting.
9815 (BINFO_PRIMARY_BINFO): Add to documentation.
9816 (CLASSTYPE_VSIZE): Fix typo in comment.
9817 (CLASSTYPE_VBASECLASSES): Update documentation.
9818 (BINFO_VBASE_MARKED): Remove.
9819 (SET_BINFO_VBASE_MARKED): Likewise.
9820 (CLEAR_BINFO_VBASE_MARKED): Likewise.
9821 (BINFO_FIELDS_MARKED): Remove.
9822 (SET_BINFO_FIELDS_MARKED): Likewise.
9823 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
9824 (enum access_kind): New enumeration.
9825 (num_extra_vtbl_entries): Remove declaration.
9826 (size_extra_vtbl_entries): Likewise.
9827 (get_vtbl_decl_for_binfo): New function.
9828 (dfs_vbase_unmark): Remove declaration.
9829 (mark_primary_bases): Likewise.
9830 * class.c (SAME_FN): Remove.
9831 (struct vcall_offset_data_s): Move definition.
9832 (build_vbase_pointer): Use `build', not `build_binary_op', to
9833 access the vbase pointer under the new ABI.
9834 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
9835 (build_primary_vtable): Likewise.
9836 (dfs_mark_primary_bases): Move here from search.c.
9837 (mark_primary_bases): Likewise.
9838 (determine_primary_bases): Under the new ABI, don't make a base
9839 class a primary base just because we don't yet have any virtual
9841 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
9842 (num_vfun_entries): Remove.
9843 (dfs_count_virtuals): Likewise.
9844 (num_extra_vtbl_entries): Likewise.
9845 (size_extra_vtbl_entries): Likewise.
9846 (layout_virtual_bases): Iterate in inheritance graph order under
9848 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
9849 indicate that a vfield is present.
9850 (init_class_processing): Initialize access_public_node, etc., from
9852 (get_vtbl_decl_for_binfo): New function.
9853 (dump_class_hierarchy_r): Likewise.
9854 (dump_class_hierarchy): Use it.
9855 (finish_vtbls): Build the vtbls in inheritance graph order.
9856 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
9857 (initialize_vtable): Use get_vtbl_decl_for_binfo.
9858 (accumulate_vtbl_inits): Add comments explaining why a pre-order
9860 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
9861 where the vptr points, even for primary vtables.
9862 (build_vtbl_initializer): Adjust handling of vbase and vcall
9864 (build_vcall_and_vbase_vtable_entries): New function.
9865 (dfs_build_vbase_offset_vtbl_entries): Remove.
9866 (build_vbase_offset_vtbl_entries): Reimplement.
9867 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
9868 were already handled in a primary base class vtable.
9869 (build_vcall_offset_vtbl_entries): Adjust.
9870 (build_rtti_vtbl_entries): Adjust.
9871 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
9872 * init.c (expand_virtual_init): Simplify.
9873 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
9874 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
9875 * search.c (BINFO_ACCESS): New macro.
9876 (SET_BINFO_ACCESS): Likewise.
9877 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
9878 (access_in_type): Likewise.
9879 (dfs_accessible_p): Likewise.
9880 (protected_accessible_p): Likewise.
9881 (lookup_fnfields_1): Adjust documentation.
9882 (dfs_mark_primary_bases): Move to class.c
9883 (mark_primary_bases): Likewise.
9884 (dfs_vbase_unmark): Remove.
9885 (virtual_context): Use BINFO_FOR_VBASE.
9886 (dfs_get_vbase_types): Simplify.
9887 (dfs_build_inheritance_graph_order): New function.
9888 (get_vbase_types): Use it.
9889 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
9891 * tinfo.cc (get_vbase_offset): New function.
9892 (__vmi_class_type_info::do_find_public_src): Use it.
9893 (__vmi_class_type_info::do_dyncast): Likewise.
9894 (__vmi_class_type_info::do_upcast): Likewise.
9896 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
9898 * lang-specs.h: Pass -fno-show-column to the preprocessor.
9900 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
9902 * rtti.c (class_hint_flags): Rename flags.
9903 (class_initializer): Remove flags.
9904 (synthesize_tinfo_var): Combine offset and flags. Add flags
9905 for __vmi_class_type_info.
9906 (create_tinfo_types): Remove flags from __class_type_info and
9907 __si_class_type_info. Merge flags and offset from
9908 base_class_type_info.
9909 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
9910 (__base_class_info::is_virtual_p): Adjust.
9911 (__base_class_info::is_public_p): Adjust.
9912 (__base_class_info::offset): New accessor.
9913 (__class_type_info::details): Remove member.
9914 (__class_type_info::__class_type_info): Lose details.
9915 (__class_type_info::detail_masks): Remove.
9916 (__si_class_type_info::__si_class_type_info): Lose details.
9917 (__vmi_class_type_info::details): New member.
9918 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
9919 (__vmi_class_type_info::detail_masks): New member.
9920 * tinfo.cc (__class_type_info::do_upcast): Initialize result
9921 with unknown_details_mask.
9922 (__vmi_class_type_info::do_find_public_src): Adjust
9923 (__vmi_class_type_info::do_dyncast): Adjust.
9924 (__vmi_class_type_info::do_upcast): Set result details, if
9926 (__dynamic_cast): Temporarily #if out optimization.
9928 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
9930 * rtti.c (get_tinfo_decl): Mark used.
9931 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
9932 mark as dealt with, if we output it.
9934 2000-03-28 Mark Mitchell <mark@codesourcery.com>
9936 * class.c: Reorganize to put virtual function table initialization
9937 machinery at the end of the file.
9939 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
9941 * class.c (finish_struct): Use bitsize_zero_node.
9942 * pt.c (instantiate_class_template): Likewise.
9944 2000-03-28 Mark Mitchell <mark@codesourcery.com>
9946 Put RTTI entries at negative offsets in new ABI.
9947 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
9948 vbase offset at index -3, not -1.
9949 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
9950 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
9951 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
9952 (build_rtti_vtbl_entries): New function.
9953 (set_rtti_entry): Remove.
9954 (build_primary_vtable): Don't use it.
9955 (build_secondary_vtable): Likewise.
9956 (start_vtable): Remove.
9957 (first_vfun_index): New function.
9958 (set_vindex): Likewise.
9959 (add_virtual_function): Don't call start_vtable. Do call
9961 (set_primary_base): Rename parameter.
9962 (determine_primary_base): Likewise.
9963 (num_vfun_entries): Don't use skip_rtti_stuff.
9964 (num_extra_vtbl_entries): Include RTTI information.
9965 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
9966 (skip_rtti_stuff): Remove.
9967 (dfs_modify_vtables): Don't use it.
9968 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
9969 (layout_nonempty_base_or_field): Update size handling.
9970 (create_vtable_ptr): Tweak.
9971 (layout_class_type): Adjust parameter names.
9972 (finish_struct_1): Simplify.
9973 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
9974 (skip_rtti_stuff): Remove.
9975 (first_vfun_index): New function.
9976 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
9977 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
9978 (marked_vtable_pathp): Declare.
9979 (unmarked_vtable_pathp): Likewise.
9980 * error.c (dump_expr): Use first_vfun_index to calculate vtable
9982 * rtti.c (build_headof): Look for RTTI at negative offsets.
9983 (get_tinfo_decl_dynamic): Likewise.
9984 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
9986 (create_pseudo_type_info): Do it here instead. Adjust so that
9987 vptr points at first virtual function.
9988 * search.c (marked_vtable_pathp): Make it global.
9989 (unmarked_vtable_pathp): Likewise.
9990 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
9991 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
9992 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
9993 (get_pure_virtuals): Likewise.
9994 (expand_upcast_fixups): Likewise.
9995 * tree.c (debug_binfo): Likewise.
9996 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
9999 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10001 * class.c (check_field_decl): Fix typo.
10002 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
10003 (check_methods): Likewise.
10004 (check_field_decls): Likewise.
10005 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
10006 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
10007 Use DECL_RESULT_FLD, not DECL_RESULT.
10008 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
10009 * lex.c (identifier_type): Likewise.
10010 * pt.c (determine_specialization, lookup_template_class): Likewise.
10011 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
10012 (resolve_overloaded_unification, more_specialized): Likewise.
10013 * semantics.c (finish_member_declaration): Likewise.
10014 * typeck.c (build_x_function_call): Likewise.
10016 2000-03-26 Mark Mitchell <mark@codesourcery.com>
10018 * class.c (layout_empty_base): Handle empty bases with non-byte
10020 (build_base_field): Likewise.
10021 (layout_virtual_bases): Likewise.
10023 * class.c (finish_struct_1): Fix typo in this change:
10025 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10027 2000-03-25 Mark Mitchell <mark@codesourcery.com>
10029 * decl.c (grokdeclarator): Count partial specializations when
10030 keeping track of how many template classes have been seen.
10032 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
10034 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10036 * class.c (build_vbase_pointer_fields): layout_field now place_field.
10037 (get_vfield_offset): Use byte_position.
10038 (set_rtti_entry): Set OFFSET to ssizetype zero.
10039 (get_binfo_offset_as_int): Deleted.
10040 (dfs_record_base_offsets): Use tree_low_cst.
10041 (dfs_search_base_offsets): Likewise.
10042 (layout_nonempty_base_or_field): Reflect changes in RLI format
10043 and call byte_position.
10044 (layout_empty_base): Convert offset to ssizetype.
10045 (build_base_field): use rli_size_unit_so_far.
10046 (dfs_propagate_binfo_offsets): Do computation in proper type.
10047 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
10048 (layout_class_type): Reflect changes in RLI names and fields.
10049 (finish_struct_1): Set DECL_FIELD_OFFSET.
10050 * dump.c (dequeue_and_dump): Call bit_position.
10051 * expr.c (cplus_expand_constant): Use byte_position.
10052 * rtti.c (expand_class_desc): Use bitsize_one_node.
10053 * typeck.c (build_component_addr): Use byte_position and don't
10054 special case for zero offset.
10056 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
10058 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
10060 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
10062 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
10065 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10067 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
10069 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
10070 make_typename_type, check_initializer, cp_finish_decl,
10071 xref_tag): Likewise.
10072 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
10073 decl_namespace, arg_assoc_template_arg, arg_assoc,
10074 validate_nonmember_using_decl, do_class_using_decl): Likewise.
10075 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
10076 args_to_string): Likewise.
10077 * friend.c (is_friend): Likewise.
10078 * lex.c (note_got_semicolon, note_list_got_semicolon,
10079 is_global): Likewise.
10080 * method.c (build_overload_nested_name, build_overload_value,
10081 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
10082 * parse.y (typename_sub, typename_sub1): Likewise.
10083 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
10084 process_partial_specialization, convert_template_argument,
10085 template_args_equal, add_pending_template, lookup_template_class,
10086 for_each_template_parm_r, maybe_fold_nontype_arg,
10087 tsubst, instantiate_template, type_unification_real, unify,
10088 instantiate_pending_templates, set_mangled_name_for_template_decl):
10090 * repo.c (repo_get_id, repo_template_used): Likewise.
10091 * search.c (lookup_field_1): Likewise.
10092 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
10093 * xref.c (classname): Likewise.
10095 2000-03-22 Mark Mitchell <mark@codesourcery.com>
10097 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
10098 (CANONICAL_BINFO): New macro.
10099 (BINFO_NEW_VTABLE_MARKED): Use it.
10100 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
10101 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
10102 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
10104 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10105 (build_secondary_vtable): Likewise.
10106 (dfs_finish_vtbls): Likewise.
10107 (dfs_accumulate_vtbl_inits): Likewise.
10108 (accumulate_vtbl_inits): New function.
10109 (finish_vtbls): Make sure that virtual bases come after
10110 non-virtual bases in the vtable group.
10111 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
10112 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10113 * search.c (struct vbase_info): Move definition.
10114 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10115 (unmarked_new_vtable_p): Likewise.
10116 (dfs_mark_vtable_path): Remove.
10117 (dfs_mark_new_vtable): Remove.
10118 (dfs_unmark_new_vtable): Likewise.
10119 (dfs_clear_search_slot): Likewise.
10120 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
10121 (dfs_clear_vbase_slots): Likewise.
10122 (init_vbase_pointers): LIkewise.
10124 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
10126 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
10127 SIZETYPE to a non-SIZETYPE.
10129 2000-03-21 Mark Mitchell <mark@codesourcery.com>
10131 * class.c (layout_virtual_bases): Adjust names in conditionally
10134 * class.c (record_base_offsets): New function.
10135 (layout_conflict_p): Likewise.
10136 (layout_nonempty_base_or_field): Use it.
10137 (layout_empty_base): New function.
10138 (build_base_field): Use it.
10139 (build_base_fields): Update comment.
10140 (layout_virtual_bases): Fold in a little code form
10141 layout_basetypes. Use layout_empty_base.
10142 (layout_basetypes): Remove.
10143 (end_of_class): New function.
10144 (layout_class_type): Use it. Adjust.
10146 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
10147 (fntype_p): Remove.
10148 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
10150 (dfs_skip_nonprimary_vbases_markedp): Likewise.
10151 * typeck.c (fntype_p): Remove.
10153 * cp-tree.h (TI_SPEC_INFO): Remove.
10154 (CLASSTYPE_TI_SPEC_INFO): Likewise.
10155 * pt.c (process_partial_specialization): Likewise.
10157 * class.c (build_base_field): Fix thinko in computation of binfo
10160 * tree.c (mark_local_for_remap_p): Mark variables declared in
10161 TARGET_EXPRs as well.
10163 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
10165 * typeck.c (require_complete_type, complete_type,
10166 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
10167 build_array_ref, convert_arguments, pointer_diff,
10168 build_x_unary_op, build_unary_op, build_c_cast,
10169 build_modify_expr): Use COMPLETE_TYPE_P etc.
10170 * call.c (is_complete, convert_like_real,
10171 build_new_method_call): Likewise.
10172 * class.c (build_vbase_pointer_fields, check_bases,
10173 build_base_field, finish_struct_1, pushclass): Likewise.
10174 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
10175 * decl.c (maybe_process_template_type_declaration, pushtag,
10176 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
10177 layout_var_decl, check_initializer, cp_finish_decl,
10178 grokdeclarator, require_complete_types_for_parms,
10179 grok_op_properties, xref_tag, xref_basetypes,
10180 check_function_type): Likewise.
10181 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
10182 * friend.c (do_friend): Likewise.
10183 * init.c (build_offset_ref): Likewise.
10184 * parse.y (structsp): Likewise.
10185 * pt.c (maybe_process_partial_specialization,
10186 tsubst_friend_function, instantiate_class_template, tsubst,
10187 do_type_instantiation, instantiate_pending_templates): Likewise.
10188 * repo.c (repo_get_id): Likewise.
10189 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
10190 synthesize_tinfo_var, emit_support_tinfos): Likewise.
10191 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
10192 * semantics.c (begin_class_definition): Likewise.
10193 * tree.c (build_cplus_method_type): Likewise.
10194 * typeck2.c (digest_init, build_functional_cast,
10195 add_exception_specifier): Likewise.
10196 * parse.h, parse.c: Regenerated.
10198 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
10200 * inc/cxxabi.h: New header file. Define new-abi entry points.
10201 (__pointer_type_info::target): Rename member to ...
10202 (__pointer_type_info::type): ... here.
10203 (__base_class_info::type): Rename member to ...
10204 (__base_class_info::base): ... here.
10205 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
10206 * cp-tree.h (CPTI_ABI): New global tree enumeration.
10207 (abi_node): New global tree node.
10208 * decl.c (abi_node): Document.
10209 (init_decl_processing): Initialize abi_node.
10210 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
10211 (get_vmi_pseudo_type_info): Likewise.
10212 (create_tinfo_types): Likewise.
10213 (emit_support_tinfos): Likewise.
10214 * tinfo.h (cxxabi.h): Include for new-abi.
10215 Move rtti class definitions to new header file.
10216 * tinfo.cc (abi): Use the namespace.
10217 (std): Move new abi rtti classes from here ...
10218 (__cxxabiv1): ... to here.
10219 * tinfo2.cc (cxxabi.h): Include for new-abi.
10220 Move rtti class definitions to new header file.
10221 (std): Move new abi rtti classes from here ...
10222 (__cxxabiv1): ... to here.
10223 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
10226 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
10227 Jason Merrill <jason@casey.cygnus.com>
10229 * method.c (build_overload_int): Use host_integerp.
10231 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
10233 * init.c (build_offset_ref): Handle the case of a templated member
10236 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10238 * except.c (expand_exception_blocks): Clear catch_clauses_last.
10240 2000-03-18 Mark Mitchell <mark@codesourcery.com>
10242 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
10243 * class.c (check_bitfield_decl): Turn illegal bitfields into
10245 (dfs_propagate_binfo_offsets): Adjust for new size_binop
10247 (dfs_offset_for_unshared_vbases): Likewise.
10248 * cvt.c (cp_convert_to_pointer): Convert NULL to a
10249 pointer-to-member correctly under the new ABI.
10250 * expr.c (cplus_expand_constant): Don't use cp_convert when
10251 turning an offset into a pointer-to-member.
10252 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
10253 when dereferencing them under the new ABI.
10254 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
10255 of pointers-to-members under the new ABI.
10257 * class.c (check_bitfield_decl): Remove restriction on really long
10259 (layout_class_type): Implement new ABI handling of bitfields
10260 longer than their types.
10262 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10264 * parse.y (extdefs): Call ggc_collect.
10265 * parse.c: Regenerated.
10267 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
10269 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
10270 (note_name_declared_in_class): Use OVL_CURRENT to get at a
10271 potential overload.
10273 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10275 * class.c (build_vbase_path): Use integer_zerop.
10276 (build_vtable_entry): Use tree_low_cst.
10277 (get_vfield_offset): Use bit_position.
10278 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
10280 (check_bitfield_decl): Set DECL_SIZE using convert.
10281 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
10282 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
10284 (finish_struct_1): Use bit_position.
10285 (dump_class_hierarchy): Use tree_low_cst.
10286 * cp-tree.h (min_precision): Add declaration.
10287 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
10288 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
10289 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
10290 * expr.c (cplus_expand_constant): Use bit_position.
10291 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
10292 * rtti.c (get_base_offset): Use bit_position.
10293 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
10294 host_integerp, and tree_low_cst.
10295 (pointer_int_sum): Use integer_zerop.
10296 (build_component_addr): Use bit_position.
10298 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
10300 * typeck.c (require_complete_type): Don't assume size_zero_node.
10301 (complete_type_or_else): Likewise.
10303 2000-03-16 Steven Grady <grady@digitaldeck.com>
10304 Jason Merrill <jason@casey.cygnus.com>
10306 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
10308 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
10310 * decl2.c (grokfield): Bail out if type is error_mark_node.
10312 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
10314 * tinfo2.cc (__ptr_to_member_data): Rename to ...
10315 (__pointer_to_member_data): ... here. Adjust.
10316 * rtti.c (create_tinfo_types): Adjust.
10318 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
10320 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
10321 * decl.c (ref_desc_type_node): Undocument.
10322 * rtti.c (ptr_ref_initializer): Rename to ...
10323 (ptr_initializer): ... here. Adjust comments.
10324 (ptmd_initializer): Fix comment thinko.
10325 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
10326 (create_tinfo_types): Remove ref_desc_type_node init.
10327 * tinfo2.cc (__reference_type_info): Remove.
10329 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
10331 * decl.c (cp_finish_decl): Remove obsolete comment.
10333 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
10335 2000-03-14 Mark Mitchell <mark@codesourcery.com>
10337 * cp-tree.h: Tweak documentation.
10338 * class.c (build_vbase_pointer_fields): Layout the fields, too.
10339 (avoid_overlap): Remove.
10340 (get_binfo_offset_as_int): New function.
10341 (dfs_serach_base_offsets): Likewise.
10342 (layout_nonempty_base_or_field): Likewise.
10343 (build_base_field): Layout fields here. Avoid placing two objects
10344 of the same type at the same address, under the new ABI.
10345 (build_base_fields): Adjust accordingly.
10346 (create_vtable_ptr): Return the new field, but don't attach it to
10348 (remove_base_field): Remove.
10349 (remove_base_fields): Remove.
10350 (layout_basetypes): Adjust accordingly.
10351 (layout_class_type): Call layout_field for each field, rather than
10352 just making a wholesale call to layout_type.
10354 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
10356 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
10358 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
10360 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
10362 * except.c (dtor_nothrow): New fn.
10363 (do_pop_exception): Use it. Take type parm.
10364 (push_eh_cleanup): Take type parm.
10365 (expand_start_catch_block): Pass it.
10366 (build_eh_type_type_ref): Accept null type.
10368 2000-03-12 Mark Mitchell <mark@codesourcery.com>
10370 * cp-tree.h (revert_static_member_fn): Change prototype.
10371 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
10372 (grok_op_properties): Likewise.
10373 (start_function): Likewise.
10374 (revert_static_member_fn): Simplify.
10375 * pt.c (check_explicit_specialization): Adjust call to
10376 revert_static_member_fn.
10378 2000-03-11 Mark Mitchell <mark@codesourcery.com>
10380 * cp-tree.h (scope_kind): New type.
10381 (tmpl_spec_kind): Likewise.
10382 (declare_pseudo_global_level): Remove.
10383 (pseudo_global_level_p): Rename to template_parm_scope_p.
10384 (pushlevel): Remove declaration.
10385 (begin_scope): New function.
10386 (finish_scope): Likewise.
10387 (current_tmpl_spec_kind): Likewise.
10388 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
10389 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
10390 Add template_spec_p.
10391 (toplevel_bindings_p): Adjust.
10392 (declare_pseudo_global_level): Remove.
10393 (pseudo_global_level_p): Rename to template_parm_scope_p.
10394 (current_tmpl_spec_kind): New function.
10395 (begin_scope): Likewise.
10396 (finish_scope): Likewise.
10397 (maybe_push_to_top_level): Adjust.
10398 (maybe_process_template_type_declaration): Likewise.
10399 (pushtag): Likewise.
10400 (pushdecl_nonclass_level): Likewise.
10401 (lookup_tag): Likewise.
10402 (grokfndecl): Handle member template specializations. Share
10403 constructor and non-constructor code.
10404 * decl2.c (check_classfn): Handle member template specializations.
10405 * pt.c (begin_template_parm_list): Use begin_scope.
10406 (begin_specialization): Likewise.
10407 (end_specialization): Likewise.
10408 (check_explicit_specialization): Use current_tmpl_spec_kind.
10409 Handle member template specializations.
10410 (end_template_decl): Use finish_scope. Remove call to
10412 (push_template_decl_real): Remove bogus error message.
10413 (tsubst_decl): Fix typo in code contained in comment.
10414 (instantiate_template): Handle member template specializations.
10415 (most_general_template): Likewise.
10417 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
10419 * lex.c (whitespace_cr): Compress consecutive calls to warning().
10420 (do_identifier): Ditto for error().
10422 * pt.c (convert_nontype_argument): Ditto for cp_error().
10423 (convert_template_argument): Ditto for cp_pedwarn().
10425 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
10427 * exception.cc (__check_null_eh_spec): New fn.
10428 * except.c (expand_end_eh_spec): Call it if the spec is throw().
10430 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
10432 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
10433 * except.c (expand_end_eh_spec): Add the return type.
10434 * rtti.c (throw_bad_cast): Add the parmtypes.
10435 (throw_bad_typeid): Likewise.
10437 * semantics.c (expand_stmt): Only leave out rtl for unused
10438 artificials, and set DECL_IGNORED_P on them as well.
10439 * decl.c (wrapup_globals_for_namespace): Likewise.
10441 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
10443 * decl.c (maybe_commonize_var): Skip all artificial decls.
10444 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
10446 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
10448 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
10449 * cp-tree.h: Declare flag_enforce_eh_specs.
10450 * decl.c (store_parm_decls, finish_function): Check it.
10452 C library functions don't throw.
10453 * Makefile.in (cfns.h): New target.
10454 (except.o): Depend on it.
10455 * Make-lang.in (cc1plus): Depend on cfns.gperf.
10456 * cfns.gperf: New file.
10457 * cfns.h: Generated.
10458 * except.c: Include it.
10459 (nothrow_libfn_p): New fn.
10460 * decl.c (grokfndecl): Use it.
10461 * cp-tree.h: Declare it.
10463 * decl.c (push_overloaded_decl_1, auto_function,
10464 define_function): Lose.
10465 (build_library_fn_1): New static fn.
10466 (builtin_function): Use it.
10467 (get_atexit_node): Use build_library_fn_ptr.
10468 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
10469 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
10470 push_void_library_fn, push_throw_library_fn): New fns.
10471 * cp-tree.h: Declare them.
10472 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
10473 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
10474 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
10475 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
10476 * rtti.c (build_runtime_decl): Lose.
10477 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
10478 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
10479 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
10481 * call.c (build_call): Remove result_type parm.
10482 Call mark_used on unused artificial fns.
10483 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
10485 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
10487 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
10489 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
10490 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
10491 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
10492 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
10493 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
10494 expand_generic_desc): Likewise.
10496 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
10498 * exception.cc (__cp_pop_exception): Cleanup the original object.
10500 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
10502 * decl.c (grok_op_properties): Merge conversion to void warning
10503 with other silly op warnings.
10505 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
10507 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
10508 array CONSTRUCTOR elements. Don't use expr_tree_cons.
10510 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
10512 * decl.c (cp_make_fname_decl): New function.
10513 (wrapup_globals_for_namespace): Don't emit unused static vars.
10514 (init_decl_processing): Remove comment about use of
10515 array_domain_type. Set make_fname_decl.
10516 (cp_finish_decl): Remove __FUNCTION__ nadgering.
10517 * semantics.c (begin_compound_stmt): Remove
10518 current_function_name_declared flagging.
10519 (expand_stmt): Don't emit unused local statics.
10520 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
10523 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
10525 * typeck.c (convert_for_assignment): Don't look at array
10527 * call.c (convert_like_real): Likewise.
10529 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
10531 Add initial support for '\uNNNN' specifier.
10532 * lex.c (read_ucs): New fn.
10533 (readescape, skip_white_space): Call it.
10534 (is_extended_char, is_extended_char_1): New fns.
10535 (utf8_extend_token): New fn, #if 0'd out.
10536 (real_yylex): Treat extended chars like letters.
10538 * search.c (note_debug_info_needed): Walk the bases even if we
10539 weren't deferring the type itself.
10541 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
10543 * decl2.c (finish_objects): Constify a char*.
10545 * method.c (emit_thunk): Likewise.
10547 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
10549 * typeck.c (dubious_conversion_warnings): Look through
10552 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10554 * class.c (dfs_modify_vtables): I is now unsigned.
10555 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
10556 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
10557 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
10558 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
10559 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
10560 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
10561 Call integer_all_onesp.
10562 * typeck2.c (process_init_constructor): Use compare_tree_int.
10564 * lang-specs.h (as): Don't call if -syntax-only.
10566 2000-03-06 Mark Mitchell <mark@codesourcery.com>
10568 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
10569 RTL_EXPR_HAS_NO_SCOPE after all.
10571 2000-03-05 Mark Mitchell <mark@codesourcery.com>
10573 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
10574 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
10575 RTL_EXPR_HAS_NO_SCOPE.
10577 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
10580 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
10582 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
10584 * call.c (convert_like): Macrofy.
10585 (convert_like_with_context): New macro.
10586 (convert_like_real): Renamed from convert_like. Add calling
10587 context parameters, for diagnostics. Add recursive flag. Call
10588 dubious_conversion_warnings for outer conversion.
10589 (build_user_type_conversion): Use convert_like_with_context.
10590 (build_over_call): Likewise. Don't warn about dubious
10591 conversions here. Adjust convert_default_arg calls.
10592 (convert_default_arg): Add context parameters for diagnostics.
10593 Pass through to convert_like_with_context.
10594 * cp-tree.h (convert_default_arg): Add context parameters.
10595 (dubious_conversion_warnings): Prototype new function.
10596 * typeck.c (convert_arguments): Adjust convert_default_arg call.
10597 (dubious_conversion_warnings): New function, broken
10598 out of convert_for_assignment.
10599 (convert_for_assignment): Adjust.
10601 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
10603 * decl2.c (key_method): Break out from...
10604 (import_export_vtable, import_export_class): ...here.
10606 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
10607 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
10609 * search.c (note_debug_info_needed, dfs_debug_mark,
10610 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
10611 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
10613 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
10615 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
10618 2000-03-02 Mark Mitchell <mark@codesourcery.com>
10620 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
10621 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
10622 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
10623 (lang_type): Split gets_new into has_new and has_array_new.
10624 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10625 (TYPE_GETS_NEW): Split into ...
10626 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
10627 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
10628 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
10629 (build_op_new_call): Don't declare.
10630 (build_new_1): Likewise.
10631 * call.c (build_op_new_call): Remove.
10632 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
10633 instead of TYPE_NEEDS_DESTRUCTOR.
10634 (finish_struct_bits): Likewise.
10635 (add_implicitly_declared_members): Likewise.
10636 (check_field_decl): Likewise.
10637 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
10638 correctly under the new ABI.
10639 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
10640 instead of TYPE_NEEDS_DESTRUCTOR.
10641 (initialize_local_var): Likewise.
10642 (destroy_local_var): Likewise.
10643 (cp_finish_decl): Likewise.
10644 (register_dtor_fn): Likewise.
10645 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
10646 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
10647 TYPE_VEC_DELETE_TAKES_SIZE here.
10648 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
10649 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
10650 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10651 (finish_destructor_body): Likewise.
10652 (maybe_build_cleanup_1): Likewise.
10653 * decl2.c (do_static_destruction): Likewise.
10654 * init.c (build_new_1): Make it static.
10655 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10656 (expand_cleanup_for_base): Likewise.
10657 (get_cookie_size): New function.
10658 (build_new_1): Handle array-new cookies correctly under the new
10660 (build_vec_delete_1): Likewise.
10661 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10662 (build_delete): Likewise.
10663 (build_vec_delete): Handle array-new cookies correctly under the new
10665 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10666 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
10667 TYPE_HAS_ARRAY_NEW_OPERATOR.
10668 * ptree.c (print_lang_type): Check them.
10669 * search.c (context_for_name_lookup): Fix typo in comment.
10670 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
10671 * tree.c (break_out_cleanups): Likewise.
10672 (build_cplus_array_test_1): Likewise.
10673 (cp_build_qualified_type_real): Likewise.
10674 * typeck.c (complete_type): Likewise.
10676 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
10677 the command-line, not the end.
10679 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
10681 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
10683 2000-03-02 Tom Tromey <tromey@cygnus.com>
10685 * cp-tree.h (build_java_class_ref): Declare.
10686 * init.c (build_java_class_ref): No longer static.
10687 * except.c (expand_throw): Generate a Java-style `throw' if the
10688 thrown object is a "Java" object.
10689 (initialize_handler_parm): Generate a Java-style lookup of
10690 exception info if the caught object is a "Java" object.
10691 (catch_language, catch_language_init): New globals.
10692 (decl_is_java_type): New function.
10693 (expand_start_catch_block): Don't call push_eh_info() or
10694 push_eh_cleanup() when handling a Java-style "catch". Pass Java
10695 class reference to build_catch_block.
10697 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10699 * typeck.c (comptypes): Treat sizetype like its language equivalent.
10701 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
10703 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
10704 to merge reference/pointer code and fix incorrect warnings.
10706 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
10708 * search.c (protected_accessible_p): Use context_for_name_lookup.
10710 * init.c (construct_virtual_bases): Fix thinko.
10711 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
10713 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
10715 * decl.c (current_function_decl): Move to toplev.c.
10717 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
10719 * pt.c (fn_type_unification): Unify return type, whenever
10721 (get_bindings_real): Only pass return type when necessary.
10722 Remove explicit return type check.
10723 * class.c (resolve_address_of_overloaded_function): Pass desired
10724 return type to fn_type_unification.
10726 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10728 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
10730 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
10732 * rtti.c (expand_class_desc): Likewise.
10733 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
10734 (THUNK_VCALL_OFFSET): Likewise.
10735 (THUNK_DELTA): Reflect changes in ../tree.h.
10737 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
10739 * search.c (protected_accessible_p): Also allow the access if
10740 the member is public in DERIVED. Lose TYPE parm.
10741 (friend_accessible_p): Lose TYPE parm.
10742 (accessible_p): Adjust.
10744 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10746 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
10747 on things that are not sizes; ssize_binop deleted.
10748 Call size_diffop when appropriate.
10749 (dfs_build_vcall_offset_vtbl_entries): Likewise.
10750 (build_primary_vtable, build_secondary_vtable): Likewise.
10751 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
10752 Variable I is HOST_WIDE_INT.
10753 (get_vfield_offset): Pass proper types to size_binop.
10754 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
10755 (finish_struct_1): Likewise.
10756 (skip_rtti_stuff): Arg N is now pointer to signed.
10757 (layout_class_type): Use size_zero_node.
10758 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
10759 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
10760 * decl.c (complete_arry_type): Pass proper types to size_binop.
10761 (xref_basetypes): BINFO_OFFSET is sizetype.
10762 * error.c (dump_expr): Don't use size_binop non-sizes.
10763 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
10764 * init.c (construct_virtual_bases): Fix type error.
10765 (build_vec_delete_1): Pass proper type to size_binop and don't
10767 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
10768 * rtti.c (get_base_offset): Pass proper type to size_binop.
10769 * search.c (dfs_find_vbases): Fix type error.
10770 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
10771 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
10772 * tree.c (debug_binfo): Variable N is signed.
10773 Use HOST_WIDE_INT_PRINT_DEC.
10774 * typeck.c (comptypes): sizetype is same as equivalent integer type.
10775 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
10776 size_one_node and size_zero_node.
10777 (c_alignof): Use size_one_node.
10778 (build_component_addr): Pass proper types to size_binop.
10779 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
10781 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
10783 Implement class scope using-declarations for functions.
10784 * class.c (handle_using_decl): Call add_method for used functions.
10785 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
10786 (add_method): Used functions are hidden by local functions.
10787 (check_bases_and_members): Handle using-decls before finalizing
10788 CLASSTYPE_METHOD_VEC.
10789 * call.c (add_function_candidate): Add ctype parm; if non-zero,
10790 override the type of 'this' accordingly.
10791 (add_template_candidate, add_template_candidate_real): Add ctype parm.
10792 (convert_class_to_reference, build_user_type_conversion_1,
10793 build_new_function_call, build_object_call, build_new_op,
10794 build_new_method_call): Pass ctype parm.
10796 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
10798 * call.c (convert_class_to_reference, build_user_type_conversion_1,
10799 build_new_function_call, build_object_call, build_new_op,
10800 build_new_method_call, build_op_delete_call): Don't get basetype_path
10802 * typeck.c (build_component_ref): Likewise.
10803 * init.c (build_offset_ref): Likewise.
10804 (resolve_offset_ref): Don't call enforce_access.
10805 Call build_scoped_ref.
10806 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
10807 would cause an error or if -pedantic.
10808 * class.c (alter_access): Lose binfo parm.
10810 2000-02-26 Mark Mitchell <mark@codesourcery.com>
10812 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
10815 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
10817 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
10818 pseudo_type_info creation into the std namespace
10820 2000-02-26 Mark Mitchell <mark@codesourcery.com>
10822 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
10823 (import_export_class): Remove declaration.
10824 * decl2.c (import_export_class): Make it static.
10825 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
10826 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
10827 EXPR_WITH_FILE_LOCATION.
10828 * lex.c (check_newline): Tweak filename/lineno setting.
10829 * semantics.c (begin_while_stmt): Fix typo in comment.
10831 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10833 * lang-options.h (-fmessage-length=): Add missing option.
10835 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
10837 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
10839 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
10841 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
10843 * optimize.c (expand_call_inline): Emit the return label before
10844 evaluating the return value.
10846 2000-02-24 Mark Mitchell <mark@codesourcery.com>
10848 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
10849 than duplicating functionality here.
10850 * optimize.c: Include input.h.
10851 (expand_call_inline): Use push_srcloc and pop_srcloc.
10852 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
10853 * parse.c: Regenerated.
10854 * Makefile.in (lex.o): Depend on input.h.
10855 (optimize.o): Likewise.
10857 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
10859 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
10860 function type, rather than ICE.
10862 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
10864 * decl.c (grokdeclarator): Call decl_type_access_control.
10865 * parse.y (parse_end_decl): Don't call decl_type_access_control if
10868 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
10870 * decl.c (decls_match): Remove obsolete static member nadgering.
10872 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
10874 * decl.c (grokdeclarator): Change ANSI to ISO.
10875 * lex.c (consume_string, readescape, do_identifier): Likewise.
10876 (parse_float, real_yylex): Likewise.
10877 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
10878 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
10879 new_type_id, maybe_label_decls, simple_stmt,
10880 for.init.statement): Likewise.
10881 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
10882 * semantics.c (finish_named_return_value): Likewise.
10883 * parse.c: Regenerate.
10885 2000-02-21 Mark Mitchell <mark@codesourcery.com>
10887 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
10888 (CPTI_CLASS_STAR_TYPE): Remove.
10889 (vtable_index_type): Likewise.
10890 (class_star_type_node): Remove.
10891 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
10892 (build_binary_op_nodefault): Remove.
10893 * call.c (build_new_op): Use build_binary_op instead of
10894 build_binary_op_nodefault.
10895 * decl.c (init_decl_processing): Remove class_star_type_node
10896 initialization. Make delta_type_node ptrdiff_type_node under the
10897 new ABI. Initialize vtable_index_type.
10898 (build_ptrmemfunc_type): Build different structures for the new
10900 (build_enumerator): Use build_binary_op instead of
10901 build_binary_op_nodefault.
10902 * method.c (build_overload_value): Mangle pointers-to-members
10903 appropriately under the new ABI.
10904 * typeck.c (build_array_ref): Use build_binary_op instead of
10905 build_binary_op_nodefault.
10906 (get_member_function_from_ptrfunc): Adjust for the new ABI.
10907 (build_binary_op_nodefault): Rename to ...
10908 (build_binary_op): ... this. Remove old version. Adjust for
10909 pointer-to-member comparisons under the new ABI.
10910 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
10911 (build_ptrmemfunc): Adjust for the new ABI.
10912 (expand_ptrmemfunc_cst): Likewise.
10913 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
10914 (pfn_from_ptrmemfunc): Adjust for the new ABI.
10916 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
10918 * call.c (build_object_call): Compress consecutive calls to
10920 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
10921 (build_op_delete_call): Adjust message formatting.
10923 * class.c (check_bases): Compress consecutive calls to
10925 (finish_struct_anon): Say 'ISO C++'.
10927 * decl.c (start_decl): Same here.
10928 (grok_reference_init): Likewise.
10929 (grokfndecl): Correct message formatting.
10930 (grokfndecl): Improve diagnostic.
10931 (check_static_variable_definition): Likewise. Say 'ISO C++'
10932 (compute_array_index_type): Say 'ISO C++'
10933 (create_array_type_for_decl): Compress consecutive calls to
10935 (grokdeclarator): Say 'ISO C++'
10936 (grok_op_properties): Likewise.
10938 * decl2.c (delete_sanity): Clairify diagnostic.
10939 (check_member_template): Same here.
10940 (grok_function_init): Use consistent terminology.
10942 * expr.c (do_case): Say 'ISO C++'
10944 * friend.c (do_friend): Compress consecutive calls to warning.
10946 2000-02-20 Mark Mitchell <mark@codesourcery.com>
10948 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
10949 * class.c (build_secondary_vtable): Reorganize. Don't create a
10950 new vtable under the new ABI.
10951 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
10952 computing the size.
10953 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
10954 the initializing elements.
10955 (initialize_vtable): New function.
10956 (dfs_finish_vtbls): Use it.
10957 (dfs_accumulate_vtbl_inits): New function.
10958 (finish_vtbls): Merge primary and secondary vtables under the new
10960 (finish_struct_1): Remove redundant call to layout_vtable_decl.
10961 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
10964 * class.c (build_vtable): New function, split out from ...
10965 (get_vtable_decl): ... here, and ...
10966 (build_secondary_vtable): ... here.
10968 * pt.c (tsubst_decl): Fix formatting.
10970 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
10972 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
10973 (avoid_overlap, build_base_field): Likewise.
10974 (build_base_field, build_base_fields, is_empty_class):
10975 Test DECL_SIZE with integer_zero.
10976 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
10977 * cp-tree.h (struct lang_type): New field size_unit.
10978 (CLASSTYPE_SIZE_UNIT): New macro.
10979 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
10980 (cp_finish_decl): Delete -Wlarger-than processing.
10981 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
10982 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
10983 * tree.c (make_binfo): binfo vector is one entry longer.
10984 (walk_tree): Walk DECL_SIZE_UNIT.
10986 2000-02-19 Mark Mitchell <mark@codesourcery.com>
10988 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
10990 (build_vtable_entry): Don't assume all vtable entries are
10992 (build_vtbl_initializer): Adjust accordingly.
10993 (get_vtable_decl): Fix formatting.
10995 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
10997 * semantics.c (deferred_type_access_control): Walk the entire
10999 (save_type_access_control): Rename from
11000 initial_deferred_type_access_control. Just remember the value.
11001 (decl_type_access_control): New fn.
11002 (begin_function_definition): Use deferred_type_access_control, after
11003 we've started the function. Set type_lookups to error_mark_node.
11004 * parse.y (frob_specs, fn.def1): Adjust.
11005 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
11006 (parse_end_decl, parse_bitfield0, parse_method): New fns.
11007 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
11008 (after_type_component_declarator0): Likewise.
11009 (after_type_component_declarator): Likewise.
11010 (notype_component_declarator): Likewise.
11011 * cp-tree.h: Adjust.
11013 * decl.c (redeclaration_error_message): Allow redeclaration of
11014 namespace-scope decls.
11016 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
11018 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
11020 2000-02-17 Mark Mitchell <mark@codesourcery.com>
11022 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
11023 * decl2.c (grokclassfn): Likewise.
11025 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
11027 * decl2.c (lang_decode_option): Don't set default message length
11029 * lex.c (lang_init_options): Set it here.
11031 2000-02-16 Mark Mitchell <mark@codesourcery.com>
11033 Make DECL_CONTEXT mean the class in which a member function was
11034 declared, even for a virtual function.
11035 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
11036 (DECL_FRIEND_CONTEXT): New macro.
11037 (DECL_REAL_CONTEXT): Remove.
11038 (SET_DECL_FRIEND_CONTEXT): Likewise.
11039 (DECL_VIRTUAL_CONTEXT): Adjust.
11040 (DECL_CLASS_SCOPE_P): Use TYPE_P.
11041 (add_friends): Remove.
11042 (hack_decl_function_context): Likewise.
11043 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
11045 (build_over_call): Fix indentation. Use DECL_CONTEXT
11046 instead of DECL_CLASS_CONTEXT.
11047 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
11048 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
11049 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11050 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
11051 (build_base_field): Likewise.
11052 (finish_struct_1): Likewise.
11053 (build_self_reference): Likewise.
11054 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
11056 (pushtag): Use decl_function_context, not
11057 hack_decl_function_context.
11058 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11059 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
11060 (pushdecl): Remove bogus code.
11061 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
11062 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11063 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11064 Use decl_function_context, nothack_decl_function_context.
11065 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
11066 (grokdeclarator): Likewise. Use decl_function_context, not
11067 hack_decl_function_context.
11068 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
11069 (start_function): Use DECL_FRIEND_CONTEXT, not
11070 DECL_CLASS_CONTEXT. Use decl_function_context, not
11071 hack_decl_function_context.
11072 (finish_function): Use decl_function_context, not
11073 hack_decl_function_context.
11074 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
11075 DECL_CLASS_CONTEXT.
11076 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
11077 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
11078 (grokfield): Likewise.
11079 (finish_builtin_type): Likewise.
11080 (finish_vtable_vardec): Use decl_function_context, not
11081 hack_decl_function_context.
11082 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11083 (start_static_initialization_or_destruction): Likewise.
11084 (finish_static_initialization_or_destruction): Likewise.
11085 (mark_used): Adjust logic for deciding when to synthesize methods.
11086 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
11088 * error.c (dump_function_decl): Use DECL_CONTEXT, not
11089 DECL_CLASS_CONTEXT.
11090 * friend.c (is_friend): Likewise.
11091 (add_friends): Remove.
11092 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
11093 * lex.c (begin_definition_of_inclass_inline): Use
11094 decl_function_context, not hack_decl_function_context.
11095 (process_next_inline): Likewise.
11096 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
11097 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
11098 DECL_CLASSS_CONTEXT.
11099 (hack_identifier): Likewise.
11100 (synthesize_method): Use decl_function_context, not
11101 hack_decl_function_context.
11102 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
11104 (is_member_template): Use decl_function_context, not
11105 hack_decl_function_context. Use DECL_CONTEXT, not
11106 DECL_CLASS_CONTEXT.
11107 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
11108 DECL_CLASS_CONTEXT.
11109 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
11111 (push_template_decl_real): Likewise.
11112 (instantiate_class_template): Don't call add_friends.
11113 (tsubst_default_argument): Use DECL_CONTEXT, not
11115 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
11116 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11117 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
11118 DECL_CLASS_CONTEXT.
11119 * repo.c (repo_inline_used): Likewise.
11120 * search.c (current_scope): Adjust for new _CONTEXT macros.
11121 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
11123 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
11124 (lookup_fnfields_here):Likewise.
11125 (check_final_overrider): Likewise.
11126 (init_vbase_pointers): Likewise.
11127 (virtual_context): Likewise.
11128 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
11129 (expand_body): Use decl_function_context, not
11130 hack_decl_function_context.
11131 * tree.c (hack_decl_function_context): Remove.
11132 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
11133 DECL_CLASS_CONTEXT.
11134 * typeck2.c (error_not_base_type): Likewise.
11136 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
11138 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
11140 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11142 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
11144 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
11146 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
11148 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
11150 * decl2.c (lang_decode_option): Enable automatic line wrapping.
11152 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
11154 * parse.y (frob_specs): Split out...
11155 (parse_decl): From here.
11156 (fn.def2): Call initial_deferred_type_access_control.
11157 (after_type_component_declarator0): Call frob_specs.
11158 (notype_component_declarator0): Likewise.
11159 * search.c (friend_accessible_p): Nested classes are friends of their
11162 2000-02-10 Mark Mitchell <mark@codesourcery.com>
11164 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
11165 used to create an implicit temporary.
11167 * class.c (dfs_modify_vtables): Tweak calculation of functions to
11170 2000-02-08 Nathan Sidwell <nathan@acm.org>
11172 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
11173 strip array element qualifiers too.
11175 2000-02-07 Mark Mitchell <mark@codesourcery.com>
11177 * decl.c (store_parm_decls): Don't build cleanups for parameters
11178 while processing_template_decl.
11180 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
11182 * cp-tree.h (struct saved_scope): Add incomplete field.
11183 (namespace_scope_incomplete): New macro.
11184 * decl.c (pushdecl): Use it.
11185 (hack_incomplete_structures): Use it. See through artificial
11187 (mark_saved_scope): Mark it.
11189 Implement access control for nested types.
11190 * search.c (type_access_control): New fn.
11191 (accessible_p): Now we do perform access control for types.
11192 * semantics.c (deferred_type_access_control): New fn.
11193 (initial_deferred_type_access_control): New fn.
11194 (begin_function_definition): Call it. Add lookups parm.
11195 * decl.c (struct binding_level): Add this_class field.
11196 (pushlevel_class): Set it.
11197 (mark_binding_level): Mark it.
11198 (lookup_name_real): Use it. Call type_access_control.
11199 (mark_saved_scope): Mark lookups field.
11200 * cp-tree.h (flagged_type_tree): Add lookups field.
11201 (struct saved_scope): Add lookups field.
11202 (type_lookups): New macro.
11203 * parse.y (declmods): Now <ftype>.
11204 (parse_decl): Add lookups parm. Call
11205 initial_deferred_type_access_control.
11206 (lang_extdef): Clear type_lookups.
11207 (typed_declspecs, declmods, typespec): Set lookups field.
11208 (initdcl): Call deferred_type_access_control.
11209 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
11210 component_decl_1, named_parm): Adjust.
11211 * friend.c (is_friend): Nested classes are friends of their
11214 * class.c (currently_open_derived_class): New fn.
11215 * method.c (hack_identifier): Use it.
11217 * lex.c (do_identifier): Remove obsolete code.
11219 * parse.y (typed_typespecs): Propagate new_type_flag properly.
11221 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
11223 * tinfo.h: Remove apostrophes from C++ comment (xgettext
11224 thinks this file is plain C).
11226 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11228 * Makefile.in (call.o): Depend on $(EXPR_H).
11230 * call.c: Include "expr.h".
11232 * class.c (dump_class_hierarchy): Add prototype.
11234 * search.c (dfs_get_pure_virtuals): Likewise.
11236 2000-02-1 Ulrich Drepper <drepper@redhat.com>
11238 * parse.y (simple_stmt): Allow :: token in asm parameter list.
11239 * parse.c: Rebuilt.
11241 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
11243 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
11244 Store it in DECL_FCONTEXT.
11245 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
11247 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
11249 * tinfo.h (old abi): #include "tconfig.h".
11250 * tinfo.cc (convert_to_base): Move into old abi section.
11252 2000-01-31 Mark Mitchell <mark@codesourcery.com>
11254 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
11255 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
11256 (BINFO_PRIMARY_BINFO): New macro.
11257 (BF_DELTA): Rename to ...
11258 (BV_DELTA): ... this.
11259 (BF_VCALL_INDEX): Rename to ...
11260 (BV_VCALL_INDEX): ... this.
11261 (BF_FN): Rename to ...
11263 * class.c (build_vbase_path): Adjust for changes to reverse_path.
11264 (set_rtti_entry): Rename BF_ macros to BV_ variants.
11265 (modify_vtable_entry): Simplify.
11266 (add_virtual_function): Rename BF_ macros to BV_ variants.
11267 (build_vtable_initializer): Likewise.
11268 (get_class_offset_1): Remove.
11269 (dfs_get_class_offset): Likewise.
11270 (get_class_offset): Likewise.
11271 (dfs_find_final_overrider): New function.
11272 (find_final_overrider): Likewise.
11273 (modify_one_vtable): Remove.
11274 (dfs_find_base): New function.
11275 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
11276 find_final_overrider.
11277 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
11279 (dfs_fixup_vtable_deltas): Remove.
11280 (override_one_vtable): Remove.
11281 (merge_overrides): Likewise.
11282 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
11283 unreal chilren of virtual bases.
11284 (finish_struct_1): Don't use merge_overrides. Don't use
11285 dfs_fixup_vtable_deltas.
11286 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
11289 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
11290 Jason Merrill <jason@yorick.cygnus.com>
11292 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
11294 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
11296 * exception.cc (__throw_bad_typeid): Add missing std::.
11298 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11300 * cp-tree.h (make_thunk): PROTO -> PARAMS.
11302 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
11304 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
11306 Runtime support for new-abi rtti.
11307 * inc/typeinfo (type_info::operator!=): Define in class.
11308 (type_info::before, type_info::name, type_info::operator==,
11309 type_info::operator!=): Define new ABI implementations.
11310 (type_info::is_pointer_p, type_info::is_function_p): Declare
11311 new virtual functions.
11312 (type_info::do_catch, type_info::do_upcast): Likewise.
11314 * tinfo.h (__base_class_info): Define new class.
11315 (__class_type_info): Likewise.
11316 (__si_class_type_info): Likewise.
11317 (__vmi_class_type_info): Likewise.
11318 (__dynamic_cast): Prototype.
11320 * tinfo.cc: Conditionalize old and new rtti mechanisms.
11321 (type_info::is_pointer_p): Define new function.
11322 (type_info::is_function_p): Likewise.
11323 (type_info::do_catch): Likewise.
11324 (type_info::do_upcast): Likewise.
11325 (vtable_prefix): New structure for vtable access.
11326 (adjust_pointer): Define new template function.
11327 (contained_p, public_p, virtual_p, contained_public_p,
11328 contained_nonpublic_p, contained_nonvirtual_p): Define new
11330 (nonvirtual_base_type): New local variable.
11331 (__class_type_info::~__class_type_info): Define.
11332 (__si_class_type_info::~__si_class_type_info): Likewise.
11333 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
11334 (__class_type_info::do_catch): Define new function.
11335 (__class_type_info::do_upcast): Likewise.
11336 (__class_type_info::find_public_src): Likewise.
11337 (__class_type_info::do_find_public_src): Likewise.
11338 (__si_class_type_info::do_find_public_src): Likewise.
11339 (__vmi_class_type_info::do_find_public_src): Likewise.
11340 (__class_type_info::do_dyncast): Likewise.
11341 (__si_class_type_info::do_dyncast): Likewise.
11342 (__vmi_class_type_info::do_dyncast): Likewise.
11343 (__class_type_info::do_upcast): Likewise.
11344 (__si_class_type_info::do_upcast): Likewise.
11345 (__vmi_class_type_info::do_upcast): Likewise.
11346 (__dynamic_cast): Likewise.
11348 * tinfo2.cc (__fundamental_type_info): Define new class.
11349 (__pointer_type_info): Likewise.
11350 (__reference_type_info): Likewise.
11351 (__array_type_info): Likewise.
11352 (__function_type_info): Likewise.
11353 (__enum_type_info): Likewise.
11354 (__ptr_to_member_type_info): Likewise.
11355 (__fundamental_type_info::~__fundamental_type_info): Define.
11356 (__pointer_type_info::~__pointer_type_info): Likewise.
11357 (__reference_type_info::~__reference_type_info): Likewise.
11358 (__array_type_info::~__array_type_info): Likewise.
11359 (__function_type_info::~__function_type_info): Likewise.
11360 (__enum_type_info::~__enum_type_info): Likewise.
11361 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
11362 (__pointer_type_info::do_catch): Define new function.
11363 (__ptr_to_member_type_info::do_catch): Define new function.
11365 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
11366 (__is_pointer): Likewise.
11368 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
11370 2000-01-30 Mark Mitchell <mark@codesourcery.com>
11372 * cp/class.c (build_vtable): Rename to build_primary_vtable.
11373 (prepare_fresh_vtable): Rename to build_secondary_vtable.
11374 (make_new_vtable): New function.
11375 (modify_vtable_entry): Handle generation of new vtables correctly.
11376 (modify_one_vtable): Remove unused parameter.
11377 (dfs_fixup_vtable_deltas): Likewise.
11378 (override_one_vtable): Use build_secondary_vtable.
11379 (finish_struct_1): Use build_primary_vtable and
11380 build_secondary_vtable.
11382 2000-01-28 Ulrich Drepper <drepper@redhat.com>
11384 * cp/decl.c: Adjust variable names, comments, help strings.
11386 2000-01-29 Nathan Sidwell <nathan@acm.org>
11388 * new2.cc (operator delete[]): Use operator delete, don't assume
11391 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
11393 * class.c (build_vtbl_initializer): Add argument to
11394 build_vtable_entry call.
11396 2000-01-27 Mark Mitchell <mark@codesourcery.com>
11398 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
11399 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
11400 (BF_DELTA): New macro.
11401 (BF_VCALL_INDEX): Likewise.
11403 (THUNK_VCALL_OFFSET): Likewise.
11404 (make_thunk): Change prototype.
11405 * class.c (build_vtable_entry): Integrate
11406 build_vtable_entry_for_fn. Handle vcall indices.
11407 (build_vtable_entry_for_fn): Remove.
11408 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
11409 BF_VCALL_INDEX, BF_FN.
11410 (modify_vtable_entry): Integrate common code from
11411 modify_one_vtable and dfs_fixup_vtable_deltas.
11412 (add_virtual_function): Set BF_VCALL_INDEX.
11413 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
11415 (modify_one_vtable): Simplify.
11416 (dfs_fixup_vtable_deltas): Likewise.
11417 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
11418 * method.c (make_thunk): Handle vcall indices.
11420 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
11422 Compiler side new abi rtti (not enabled).
11423 * cp-tree.h (new_abi_rtti_p): New macro.
11424 (emit_support_tinfos): Prototype new function.
11425 (tinfo_decl_p): Likewise.
11426 (emit_tinfo_decl): Likwise.
11427 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
11429 (doing_runtime): New local static.
11430 (init_rtti_processing): Add new-abi initializer.
11431 (get_tinfo_decl): Add new-abi logic.
11432 (tinfo_from_decl): Likewise.
11433 (build_dynamic_cast_1): Likewise.
11434 (qualifier_flags): New static function.
11435 (tinfo_base_init): Likewise.
11436 (generic_initializer): Likewise.
11437 (ptr_ref_initializer): Likewise.
11438 (ptmd_initializer): Likewise.
11439 (class_hint_flags): Likewise.
11440 (class_initializer): Likewise.
11441 (synthesize_tinfo_var): Likewise.
11442 (create_real_tinfo_var): Likewise.
11443 (create_pseudo_type_info): Likewise.
11444 (get_vmi_pseudo_type_info): Likewise.
11445 (create_tinfo_types): Likewise.
11446 (emit_support_tinfos): New global function.
11447 (tinfo_decl_p): New global predicate.
11448 (emit_tinfo_decl): New global function.
11449 * class.c (set_rtti_entry): Generalize for old and new rtti.
11450 (build_vtbl_initializer): Likewise.
11451 * decl2.c (finish_file): Likewise.
11453 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
11455 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
11456 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
11458 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
11460 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
11463 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
11465 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
11467 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
11469 * optimize.c (calls_setjmp_r): Supply new argument
11470 to special_function_p.
11472 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11474 * call.c: PROTO -> PARAMS.
11475 * class.c: Likewise.
11476 * cp-tree.h: Likewise.
11478 * decl.c: Likewise.
11479 * decl.h: Likewise.
11480 * decl2.c: Likewise.
11481 * dump.c: Likewise.
11482 * errfn.c: Likewise.
11483 * error.c: Likewise.
11484 * except.c: Likewise.
11485 * expr.c: Likewise.
11486 * init.c: Likewise.
11487 * input.c: Likewise.
11490 * method.c: Likewise.
11491 * optimize.c: Likewise.
11492 * parse.y: Likewise.
11494 * repo.c: Likewise.
11495 * rtti.c: Likewise.
11496 * search.c: Likewise.
11497 * semantics.c: Likewise.
11498 * spew.c: Likewise.
11499 * tree.c: Likewise.
11500 * typeck.c: Likewise.
11501 * typeck2.c: Likewise.
11502 * xref.c: Likewise.
11504 2000-01-25 Richard Henderson <rth@cygnus.com>
11506 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
11508 2000-01-25 Mark Mitchell <mark@codesourcery.com>
11510 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
11511 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
11512 (struct vcall_offset_data_s): New type.
11513 (dfs_vcall_offset_queue_p): New function.
11514 (dfs_build_vcall_offset_vtbl_entries): Likewise.
11515 (build_vcall_offset_vtbl_entries): Likewise.
11516 (layout_vtable_decl): Likewise.
11517 (num_vfun_entries): Likewise.
11518 (num_extra_vtbl_entries): Add the entries for vcall offsets.
11519 (build_vtbl_initializer): Likewise.
11520 (dfs_finish_vtabls): Use layout_vtable_decl.
11521 (modify_one_vtables): Always duplicate vtables under the new ABI.
11522 (finish_struct_1): Use layout_vtable_decl.
11524 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11526 * decl.c (member_function_or_else): Change third arg from a format
11527 specifier to an `enum overload_flags'. Callers changed.
11529 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
11531 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
11532 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
11533 build_const_cast, get_delta_difference, check_return_expr): Avoid
11534 ANSI string concatenation usage.
11536 2000-01-24 Mark Mitchell <mark@codesourcery.com>
11538 * class.c (layout_class_type): Put the fields required to make a
11539 class non-empty at the end, not the beginning, of the TYPE_FIELDs
11542 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
11544 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
11547 * decl2.c (mark_used): Do instantiate inlines that have been
11548 explicitly instantiated.
11550 2000-01-24 Richard Henderson <rth@cygnus.com>
11552 * call.c (build_over_call): Use expand_tree_builtin.
11553 * typeck.c (build_function_call_real): Likewise.
11554 (build_binary_op_nodefault): Handle unordered compares.
11556 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
11558 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
11559 cp_tree_index values.
11560 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
11561 New global node #defines for them.
11562 * rtti.c (call_void_fn): Replace with ...
11563 (build_runtime_decl): ... new static function.
11564 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
11565 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
11566 (build_dynamic_cast_1): Always produce correctly typed result.
11567 Explicitly produce type_info addresses. Use dynamic_cast_node.
11568 * exception.cc (__throw_bad_cast): Return `void *'.
11569 (__throw_bad_typeid): Return `const type_info &'.
11571 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
11573 * cp-tree.h (get_vtable_decl): Prototype new function.
11574 * class.c (get_vtable_decl): New function. Broken out from ...
11575 (build_vtable): ... here. Use it.
11576 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
11577 by get_vtable_decl.
11579 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
11581 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
11582 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
11583 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
11584 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
11585 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
11586 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
11587 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
11588 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
11589 (CPTI_TINFO_VAR_ID): New enumeration.
11590 (__tp_desc_type_node, __access_mode_type_node,
11591 __bltn_desc_type_node, __user_desc_type_node,
11592 __class_desc_type_node, __ptr_desc_type_node,
11593 __attr_desc_type_node, __func_desc_type_node,
11594 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
11595 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
11596 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
11597 enum_desc_type_node, class_desc_type_node,
11598 si_class_desc_type_node, vmi_class_desc_type_node,
11599 ptmd_desc_type_node, base_desc_type_node): New #defines.
11600 (tinfo_fn_id, tinfo_fn_type): Rename to ...
11601 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
11602 (tinfo_var_id): New enumeration.
11603 (DECL_TINFO_FN_P): Augment comment.
11604 * decl.c (cp_global_trees): Adjust documentation.
11605 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
11606 tinfo_decl_type and tinfo_var_id.
11607 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
11608 (build_typeid): Remove unused variable.
11609 (get_tinfo_var): Use tinfo_var_id.
11610 (tinfo_name): New static function.
11611 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
11612 (tinfo_from_decl): Likewise.
11613 (get_base_offset): New static function, broken out of
11615 (expand_si_desc): Use tinfo_name.
11616 (expand_class_desc): Likewise. Lose local static variable.
11617 Use base_desc_type_node. Use get_base_offset.
11618 (expand_ptr_desc): Use tinfo_name.
11619 (expand_attr_desc): Likewise.
11620 (expand_generic_desc): Likewise.
11622 * tinfo.cc (__GXX_ABI_VERSION): Test value and existence.
11623 * tinfo.h (__GXX_ABI_VERSION): Test value and existence.
11625 2000-01-23 Mark Mitchell <mark@codesourcery.com>
11627 * cp-tree.h (__eprintf): Remove declaration.
11628 * tree.c (__eprintf): Remove definition.
11630 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
11631 Mark Mitchell <mark@codesourcery.com>
11633 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
11634 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
11636 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
11638 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
11640 2000-01-23 Mark Mitchell <mark@codesourcery.com>
11642 * cp-tree.h (register_dtor_fn): New function.
11643 * decl.c (destroy_local_static): Rename to ...
11644 (register_dtor_fn): ... this. Give it external linkage.
11645 (expand_static_init): Use it.
11646 * decl2.c (do_static_initialization): Likewise, if using
11648 (do_static_destruction): Check that __cxa_atexit is not in use.
11649 (finish_file): Don't call do_static_destruction if using
11652 * typeck.c (convert_arguments): Restore two-message error
11655 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
11657 Remap dynamic cast hint values to be consistent across ABIs.
11658 * search.c (dynamic_cast_base_recurse): Remap generated value.
11659 (get_dynamic_cast_base_type): Adjust documentation.
11660 * tinfo.h (__user_type_info::dyncast): Likewise.
11661 (__user_type_info::find_public_subobj): Remap BOFF meaning.
11662 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
11663 (__class_type_info::do_dyncast): Likewise.
11664 (__class_type_info::do_find_public_subobj): Likewise.
11665 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
11667 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
11669 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
11671 * typeck2.c (incomplete_type_error): Restore previous
11672 cp_error and cp_error_at call sequence.
11674 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
11676 * class.c (dump_class_hierarchy): Make format agree with argument;
11677 cast pointer to unsigned long and print with %lx.
11679 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
11681 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
11683 * typeck.c (composite_pointer_type, common_type,
11684 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
11685 build_function_call_real, convert_arguments,
11686 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
11687 build_unary_op, mark_addressable, build_compound_expr,
11688 build_static_cast, build_reinterpret_cast, build_const_cast,
11689 build_c_cast, build_modify_expr, get_delta_difference,
11690 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
11691 'ISO C++'. Fusion consecutive calls to diagnostic message routines
11693 * typeck2.c (readonly_error, abstract_virtuals_error,
11694 process_init_constructor, check_for_new_type): Likewise.
11696 2000-01-19 Mark Mitchell <mark@codesourcery.com>
11698 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
11701 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
11703 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
11704 (build_x_typeid): Likewise.
11705 (get_tinfo_fn): Likewise.
11706 (get_tinfo_fn_unused): Rename to ...
11707 (get_tinfo_decl): ... here.
11708 * rtti.c (build_headof): Replace logic error with assertion.
11709 (get_tinfo_fn_dynamic): Rename to ...
11710 (get_tinfo_decl_dynamic): ... here. Make static. Use
11711 complete_type_or_else.
11712 (build_x_typeid): Move into ...
11713 (build_typeid): ... here. Adjust call to
11714 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
11715 throw_bad_typeid expression.
11716 (get_tinfo_fn_unused): Rename to ...
11717 (get_tinfo_decl): ... here. Adjust comment.
11718 (get_tinfo_fn): Delete.
11719 (tinfo_from_decl): New static function.
11720 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
11721 (get_typeid): Use complete_type_or_else.
11722 (build_dynamic_cast_1): Adjust calls to
11723 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
11724 * parse.y (primary): Adjust call to build_typeid.
11725 * except.c (build_eh_type_type_ref): Adjust call to
11726 get_tinfo_decl. Mark as used.
11727 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
11728 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
11729 * parse.c: Regenerated.
11731 2000-01-17 Mark Mitchell <mark@codesourcery.com>
11733 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
11734 calling convention.
11735 (resolves_to_fixed_type_p): Document calling convention.
11736 * rtti.c (build_x_typeid): Initialize NONNULL.
11738 * cp-tree.h (build_shared_int_cst): New function.
11739 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
11740 * class.c (modify_vtable_entry): Likewise.
11741 (add_virtual_function): Split out code to generated shared
11742 INTEGER_CSTs to build_share_int_cst.
11743 (modify_all_vtables): Handle all the overridden functions here.
11744 Add overridden functions from non-primary virtual bases to the
11746 (finish_struct_1): Adjust call to modify_all_vtables. Add
11747 overridden functions from non-primary bases to the vtable.
11748 * tree.c (build_shared_int_cst): New function.
11750 * cp-tree.h (scratchalloc): Remove.
11751 (build_scratch_list): Likewise.
11752 * call.c (convert_class_to_reference): Replace build_scratch_list
11753 and build_expr_list with build_tree_list.
11754 (add_candidate): Replace scratchalloc with expralloc. Note memory
11756 (build_user_type_conversion_1): Replace build_scratch_list
11757 and build_expr_list with build_tree_list.
11758 (build_new_op): Likewise.
11759 (build_op_delete_call): Likewise.
11760 (convert_like): Likewise.
11761 * cvt.c (ocp_convert): Likewise.
11762 * decl.c (start_decl): Likewise.
11763 (start_function): Likewise.
11764 (finish_destructor_body): Likewise.
11765 (maybe_build_cleanup_1): Likewise.
11766 * decl2.c (reparse_decl_as_expr): Likewise.
11767 * init.c (perform_member_init): Likewise.
11768 (expand_cleanup_for_base): Likewise.
11769 (build_builtin_delete_call): Likewise.
11770 (build_new_1): Likewise.
11771 (build_delete): Likewise.
11772 * method.c (do_build_assign_ref): Likewise.
11773 * parse.y (already_scoped_stmt): Likewise.
11774 (nontrivial_exprlist): Likewise.
11775 (net_initializer): Likewise.
11776 (initlist): Likewise.
11777 * parse.c: Regenerated.
11778 * rtti.c (build_x_typeid): Likewise.
11779 (build_dynamic_cast_1): Likewise.
11780 * typeck.c (build_x_compound_expr): Likewise.
11781 (build_static_cast): Likewise.
11782 (build_modify_expr): Likewise.
11784 * cp-tree.h (DECL_VINDEX): Add documentation.
11785 * class.c (build_vtable_entry): Likewise.
11786 (start_vtable): Add comment.
11787 (add_virtual_function): Replace pending_hard_virtuals with
11788 overridden_virtuals and pending_virtuals with new_virtuals.
11789 Replace redundant assignments with assertions.
11790 (check_for_override): Add comment.
11791 (check_bases_and_members): Replace pending_hard_virtuals with
11792 overridden_virtuals and pending_virtuals with new_virtuals.
11793 (create_vtbl_ptr): Likewise.
11794 (layout_class_type): Likewise.
11795 (finish_struct_1): Likewise. Add comments.
11797 2000-01-16 Mark Mitchell <mark@codesourcery.com>
11799 * class.c (finish_struct_1): Replace redundant code with
11802 * cp-tree.h (flag_new_abi): Move.
11803 (flag_use_cxa_atexit): Likewise.
11804 (flag_honor_std): Likewise.
11805 (flag_rtti): Likewise.
11806 (vbase_offsets_in_vtable_p): Define.
11807 (vptrs_present_everywhere_p): Likewise.
11808 (TYPE_CONTAINS_VPTR_P): Likewise.
11809 (dfs_walk_real): Declare.
11810 * class.c (build_vbase_pointer_fields): Check
11811 vbase_offsets_in_vtable_p.
11812 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
11814 (build_vbase_offset_vtbl_entries): Simplify.
11815 (build_vbase_offset_vtbl_entries): Adjust.
11816 (build_vbase_pointer): Add ability to look up vbase offsets in
11818 (start_vtable): New function.
11819 (add_virtual_function): Use it.
11820 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
11821 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
11822 (build_vtbl_initializer): Take the type of the complete object as
11823 input. Use it to correctly calculate vbase offsets.
11824 (dfs_finish_vtbls): Pass the complete type to
11825 build_vtbl_initializer.
11826 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
11827 (create_vtable_ptr): Create a vtable even if there are no
11828 new virtual functions, under the new ABI.
11829 (finish_struct_1): Likewise.
11830 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
11831 * decl.c (exapnd_static_init): Remove call to
11832 preserve_initializer.
11833 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
11835 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
11836 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
11837 (construct_virtual_bases): Don't initialize virtual base pointers
11839 (build_aggr_init): Clean up comment.
11840 (expand_aggr_init_1): Likewise.
11841 * rtti.c (expand_class_desc): Store the virtual function table
11842 index where the vbase offset lives in the offset field.
11843 * search.c (dfs_walk_real): Make it global.
11844 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
11845 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
11847 * tinfo.h (USItype): Make it signed under the new ABI.
11848 * tinfo.cc (convert_to_base): New function. Encapsulate base
11849 conversion logic here.
11850 (__class_type_info::do_upcast): Use it.
11851 (__class_type_info::do_dyncast): Likewise.
11852 (__class_type_info::do_find_public_subobj): Likewise.
11854 * init.c (construct_virtual_bases): Don't look up the addresses of
11855 virtual bases at run-time.
11857 * class.c (build_vbase_pointer): Relocate.
11858 (build_vbase_pointer_fields): Likewise.
11859 (dfs_build_vbase_offset_vtbl_entries): Likewise.
11860 (build_vbase_offset_vtbl_entries): Likewise.
11862 * decl.c (init_decl_processing): Complain if -fnew-abi
11863 -fno-vtable-thunks is used.
11865 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
11868 2000-01-15 Mark Mitchell <mark@codesourcery.com>
11870 * cp-tree.h (num_extra_vtbl_entries): New function.
11871 (size_extra_vtbl_entries): Likewise.
11872 (dfs_vtable_path_unmark): Likewise.
11873 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
11874 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
11875 * class.c (num_extra_vtbl_entries): New function.
11876 (size_extra_vtbl_entries): Likewise.
11877 (dfs_build_vbase_offset_vtbl_entries): New function.
11878 (build_vbase_offset_vtbl_entries): Likewise.
11879 (build_vtbl_initializer): Use it.
11880 (finish_struct_1): Adjust vtable sizes (using
11881 num_extra_vtbl_entries).
11882 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
11883 THUNK_DECL is non-NULL before expanding it.
11884 * init.c (expand_virtual_init): Adjust the vtable pointer by
11885 size_extra_vtbl_entries before storing it.
11886 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
11887 Handle TREE_LIST parameters here, not in the dfs_* functions.
11888 (dfs_unmarked_real_bases_queue_p): Adjust.
11889 (dfs_marked_real_bases_queue_p): Likewise.
11890 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
11891 (dfs_vtable_path_marked_real_bases_queue_p): New function.
11892 (dfs_vtable_path_unmark): Likewise.
11894 2000-01-14 Mark Mitchell <mark@codesourcery.com>
11896 * optimize.c (copy_body_r): Clear the operand three of a
11897 TARGET_EXPR when copying it.
11899 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
11901 * method.c (build_decl_overload_real): Check whether we are in ::
11902 before returning __builtin_new/delete.
11904 2000-01-13 Mark Mitchell <mark@codesourcery.com>
11906 * pt.c (tsubst_friend_function): Improve comment.
11907 (instantiate_decl): Avoid crashing when a "nested" function is
11908 instantiated from the top level.
11910 * dump.c (dqeueue_and_dump): Dump
11911 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
11913 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11915 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
11917 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
11919 * g++spec.c (lang_specific_driver): Add -fnew-abi if
11920 ENABLE_NEW_GXX_ABI defined.
11921 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
11922 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
11923 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
11925 2000-01-12 Mark Mitchell <mark@codesourcery.com>
11927 * decl.c (start_cleanup_fn): Call pushdecl.
11929 * call.c (convert_class_to_reference): Fix typos.
11930 (build_conditional_expr): Handle errors gracefully.
11931 * class.c (push_nested_class): Likewise.
11932 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
11933 (DECL_THIS_EXTERN): Use it.
11934 (DECL_THIS_STATIC): Likewise.
11935 * cvt.c (convert_to_void): Handle errors gracefully.
11936 (build_expr_type_conversion): Likewise.
11937 * decl.c (maybe_push_decl): Likewise.
11938 (start_decl_1): Likewise.
11939 (require_complete_types_for_parms): Likewise.
11940 * parse.y (structsp): Likewise.
11941 (base_class): Likewise.
11942 * parse.c: Regenerated.
11943 * pt.c (finish_member_template_decl): Likewise.
11944 * typeck.c (decay_conversion): Likewise.
11946 * cp-tree.h (dfs_skip_vbases): New function.
11947 (find_vbase_instance): Likewise.
11948 * class.c (determine_primary_base): Allow a nearly empty base to
11949 serve as a primary base class under the new ABI.
11950 (get_class_offset_1): Rename to ...
11951 (dfs_get_class_offset): ... this. Simplify. Don't issue error
11953 (get_class_offset): Use it. Issue error messages here.
11954 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
11955 find the right copies of virtual bases.
11956 (fixup_vtable_deltas1): Rename to ...
11957 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
11958 bases as primary bases.
11959 (fixup_vtable_deltas): Remove.
11960 (override_one_vtable): Handle virtual bases as primary bases.
11961 (merge_overrides): Likewise.
11962 (finish_struct_1): Likewise.
11963 (dump_class_hierarchy): Dump primary-ness of bases as well.
11964 * search.c (mark_primary_bases): Use a pre-order traversal to
11965 handle primary virtual bases.
11966 (dfs_skip_vbases): New fiunction.
11967 (expand_upcast_fixups): Adjust to handle primary virtual bases.
11968 (fixup_virtual_upcast_offsets): Likewise.
11969 (fixup_all_virtual_upcast_offsets): Likewise.
11970 (dfs_find_vbase_instances): New function.
11971 (find_vbase_instance): Likewise.
11973 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
11975 * lex.c (DIR_SEPARATOR): Delete macro.
11977 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
11979 * decl2.c (lang_decode_option): Handle automatic line wrapping
11982 2000-01-11 Mark Mitchell <mark@codesourcery.com>
11984 * friend.c (do_friend): Don't resolve scopes when processing
11985 template declarations, even if the qualifying scope doesn't
11986 involve template parameters.
11988 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
11990 * class.c (dfs_modify_vtables_queue_p): Remove.
11991 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
11992 and dfs_marked_real_bases_queue_p instead of
11993 dfs_modify_vtables_queue_p.
11995 * class.c (build_vbase_path): Simplify.
11996 (dfs_propagate_binfo_offsets): New function.
11997 (propagate_binfo_offsets): Use it.
11998 (remove_base_field): Simplify.
11999 (dfs_set_offset_for_vbases): Remove.
12000 (dfs_set_offset_for_shared_vbases): New function.
12001 (dfs_set_offset_for_unshared_vbases): Likewise.
12002 (layout_virtual_bases): Use them.
12003 (layout_basetypes): Don't call propagate_binfo_offsets.
12004 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
12007 * class.c (build_base_field): New function, split out from ...
12008 (build_base_fields): ... here. Use it. Allocate primary bases
12009 first, under the new ABI.
12010 (get_vtable_entry): Remove.
12011 (remove_base_field): New function, split out from ...
12012 (remove_base_fields): ... here. Adjust since primary bases come
12013 first under the new ABI.
12015 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
12016 (initialize_vtbl_ptrs): New function.
12017 (expand_indirect_vtbls_init): Change prototype.
12018 (convert_pointer_to_vbase): Declare.
12019 * init.c (expand_direct_vtbls_init): Remove.
12020 (dfs_initialize_vtbl_ptrs): New function.
12021 (initialize_vtbl_ptrs): Likewise.
12022 (emit_base_init): Use initialize_vtbl_ptrs.
12023 * search.c (convert_pointer_to_vbase): Make it global.
12024 (expand_indirect_vtbls_init): Remove vtable initialization code.
12025 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
12027 * class.c (dfs_finish_vtbls): New function.
12028 (finish_vtbls): Use it.
12029 (dump_class_hierarchy): New function.
12031 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
12032 (BINFO_VBASE_PRIMARY_P): New macro.
12033 (BINFO_VIRTUALS): Add to documentation.
12034 (SET_BINFO_PRIMARY_MARKED_P): Remove.
12035 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12036 (dfs_mark_primary_bases_queue_p): Likewise.
12037 (dfs_unmarked_real_bases_queue_p): New function.
12038 (dfs_marked_real_bases_queue_p): Likewise.
12039 * search.c (dfs_mark_primary_bases): Adjust.
12040 (mark_primary_bases): Likewise.
12041 (get_shared_vbase_if_not_primary): New function.
12042 (dfs_unmarked_real_bases_queue_p): Likewise.
12043 (dfs_marked_real_bases_queue_p): Likewise.
12044 (dfs_get_pure_virtuals): Simplify.
12045 (get_pure_virtuals): Likewise.
12047 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12049 * lex.c: Include tm_p.h.
12051 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
12053 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
12055 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
12057 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
12058 * pt.c (instantiate_decl): Defer comdat templates that might not be
12061 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
12062 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
12063 (finish_file): Likewise.
12065 * decl2.c (import_export_class): Undo 12/14 change.
12067 * error.c (dump_decl): operator new, not operatornew.
12069 * class.c (field_decl_cmp): A nontype is "greater" than a type.
12070 * search.c (lookup_field_1): Look for the last field with the
12073 2000-01-05 Nathan Sidwell <nathan@acm.org>
12075 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
12078 2000-01-05 Nathan Sidwell <nathan@acm.org>
12080 * typeck.c (build_static_cast): Don't strip target qualifiers
12081 when casting from a class.
12083 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
12085 * class.c (warn_hidden): Initialize variable `fndecl'.
12087 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
12089 * decl.c (flag_isoc9x): New variable to be able to use code in
12090 c-common.c. For now always zero.
12092 2000-01-03 Mark Mitchell <mark@codesourcery.com>
12094 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
12095 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
12096 or unshare_base_binfos for virtual bases here.
12097 * search.c (dfs_get_vbase_types): Do it here.
12098 (get_vbase_types): Adjust.
12100 2000-01-02 Mark Mitchell <mark@codesourcery.com>
12102 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
12103 (BINFO_PRIMARY_MARKED_P): Use flag 5.
12104 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12105 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12106 (unmark_primary_bases): Remove declaration.
12107 (unmarkedp): Declare.
12108 (dfs_vbase_unmark): Likewise.
12109 * class.c (determine_primary_base): Return immediately if there
12110 are no base classes. Call mark_primary_bases here.
12111 (modify_all_direct_vtables): Remove.
12112 (modify_all_indirect_vtables): Remove.
12113 (dfs_modify_vtables_queue_p): New function.
12114 (dfs_modify_vtables): New function.
12115 (modify_all_vtables): Use them.
12116 (build_base_fields): Build FIELD_DECLs for primary virtual base
12118 (create_vtable_ptr): Don't call determine_primary_base here.
12119 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
12120 (dfs_set_offset_for_vbases): ... this.
12121 (layout_virtual_bases): Use it.
12122 (layout_class_type): Call determine_primary_base here.
12123 * search.c (unmarkedp): Make it global.
12124 (shared_marked_p): Simplify.
12125 (shared_unmarked_p): Likewise.
12126 (dfs_primary_bases_queue_p): Remove.
12127 (dfs_unmark_primary_bases): Likewise.
12128 (unmark_primary_bases): Likewise.
12129 (mark_primary_bases): Simplify.
12130 (get_pure_virtuals): Don't call mark_primary_bases here.
12131 (dfs_vbase_unmark): New function.
12132 (get_vbase_types): Simplify.
12134 * class.c (struct base_info): Remove.
12135 (determine_primary_base): Take has_virtual_p rather than a
12136 base_info as input. Don't calculate max_has_virtual.
12137 (finish_struct_bits): Remove max_has_virtual argument.
12138 (create_vtable_ptr): Remove max_has_virtual_p argument.
12139 (layout_virtual_bases): Remove max argument.
12140 (layout_basetypes): Likewise.
12141 (layout_class_type): Remove max_has_virtual_p argument.
12142 (finish_struct_1): Remove max_has_virtual.
12144 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
12145 (layout_basetypes): Remove.
12146 * class.c (propagate_binfo_offsets): Moved here from tree.c.
12147 Update to handle primary virtual bases.
12148 (remove_base_fields): New function, split out from
12150 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
12151 (layout_virtual_bases): New function, split out from
12152 layout_basetypes. Update to handle primary virtual bases.
12153 (layout_basetypes): Moved here from tree.c. Use
12154 remove_base_fields and layout_virtual_bases.
12155 * search.c (dfs_mark_primary_bases_queue_p): New function.
12156 (mark_primary_bases): Use it.
12157 * tree.c (CEIL): Remove.
12158 (propagate_binfo_offsets): Remove.
12159 (layout_basetypes): Remove.
12161 2000-01-01 Mark Mitchell <mark@codesourcery.com>
12163 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
12164 (BINFO_PRIMARY_MARKED_P): New macro.
12165 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
12166 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
12167 (mark_primary_bases): New function.
12168 (unmark_primary_bases): Likewise.
12169 * search.c (get_abstract_virtuals_1): Remove.
12170 (dfs_mark_primary_bases): New function.
12171 (mark_primary_bases): Likewise.
12172 (dfs_unmark_primary_bases): Likewise.
12173 (unmark_primary_bases): Likewise.
12174 (dfs_get_pure_virtuals): Likewise.
12176 2000-01-01 Mark Mitchell <mark@codesourcery.com>
12178 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
12179 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
12180 (modify_one_vtable): Adjust.
12181 (fixup_vtable_deltas1): Likewise.
12182 (override_one_vtable): Likewise.
12183 * search.c (get_abstract_virtuals_1): Likewise.
12184 (get_pure_virtuals): Likewise.
12185 (expand_upcast_fixups): Likewise.
12186 * tree.c (debug_binfo): Likewise.
12188 * class.c (build_vtable): Don't return a value. Don't rebuild
12189 vtables for bases that have already been handled.
12190 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
12191 already been handled.
12192 (modify_one_vtable): Adjust accordingly.
12193 (fixup_vtable_deltas1): Likewise.
12194 (finish_struct_1): Likewise.
12196 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
12198 * call.c (build_new_method_call): Also check destructors.