1 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
3 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
4 incomplete return type.
6 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
8 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
9 * semantics.c (finish_base_specifier): Accept a _TYPE not a
12 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
14 * spew.c (yyerror): Cope if yylval.ttype is NULL.
16 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
18 * decl.c (grokdeclarator): Diagnose undefined template contexts.
20 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
22 * decl.c (grokdeclarator): Do type access control on friend
25 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
27 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
28 bison parser ickiness.
29 * pt.c (tsubst_friend_function): Enter namespace scope when
30 tsubsting the function name.
31 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
33 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
35 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
36 * cvt.c (cp_convert_to_pointer): Add force parameter.
37 Allow conversions via virtual base if forced.
38 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
39 (ocp_convert): Likewise.
40 * search.c (binfo_from_vbase): Return the virtual base's binfo.
41 * typeck.c (get_delta_difference): Adjust handling of virtual
44 2000-11-26 Mark Mitchell <mark@codesourcery.com>
46 * tree.c (struct list_hash): Remove.
47 (list_hash_table): Make it be an htab.
48 (struct list_proxy): New type.
49 (list_hash_eq): New function.
50 (list_hash_pieces): Renamed from ...
51 (list_hash): ... this.
52 (list_hash_lookup): Remove.
53 (list_hash_add): Remove.
54 (hash_tree_cons): Use the generic hashtable.
55 (mark_list_hash): Remove.
56 (init_tree): Create the hashtable.
58 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
60 * method.c (build_mangled_C9x_name): Rename to
61 build_mangled_C99_name. Change C9X references in comments to
64 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
66 * parse.y (unary_expr): Move VA_ARG from here ...
67 (primary): ... to here.
69 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
71 * semantics.c (finish_id_expr): If type is error_mark, return
74 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
76 * pt.c (lookup_template_class): Simplify loop exit constructs.
77 Cope when there is no partial instantiation of a template
80 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
82 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
84 2000-11-22 Mark Mitchell <mark@codesourcery.com>
86 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
89 * pt.c (do_decl_instantiate): Explicitly clone constructors and
90 destructors that haven't already been cloned.
92 2000-11-20 Richard Henderson <rth@redhat.com>
94 * parse.y (yyparse_1): Rename the parser entry point.
96 2000-11-20 Alex Samuel <samuel@codesourcery.com>
98 * mangle.c (write_name): Use <unscoped-name> for names directly in
100 (write_unscoped_name): Accept names directly in function scope.
102 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
104 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
105 * parse.y (extdef): Add EXPORT reduction.
106 * spew.c (yylex): Don't skip export here.
108 2000-11-19 Mark Mitchell <mark@codesourcery.com>
110 * decl.c (init_decl_processing): Correct name of pure virtual
111 function under the new ABI.
112 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
113 (throw_bad_typeid): Likewise for bad typeid function.
115 2000-11-18 Mark Mitchell <mark@codesourcery.com>
117 * decl.c (grokparms): Don't even function types of `void' type,
119 * mangle.c (write_type): Don't crash when confronted with the
122 * decl.c (grokparms): Don't create parameters of `void' type.
124 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
126 * lex.c (mark_impl_file_chain): Delete.
127 (init_parse): Remove call to ggc_add_string_root. No need to
128 ggc_strdup a string constant. Do not add impl_file_chain to GC
130 (handle_pragma_implementation): No need to ggc_strdup main_filename.
132 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
134 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
136 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
138 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
139 * decl.c (grokdeclarator): Don't reject void parms here.
140 (require_complete_types_for_parms): Simplify, use
141 complete_type_or_else.
142 (grokparms): Remove bitrot. Remove funcdef parm.
143 Deal with ellipsis parm lists here.
144 * semantics.c (finish_parmlist): Don't append void_list_node
145 here. Set PARMLIST_ELLIPSIS_P.
147 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
149 * typeck2.c (incomplete_type_error): Reorganise to avoid
150 excessive diagnostics.
152 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
154 * lex.c (struct impl_files, internal_filename): Constify a char *.
156 2000-11-16 Mark Mitchell <mark@codesourcery.com>
158 * mangle.c (write_special_name_constructor): Don't generate
159 assembler junk when confronted with an old-style constructor.
160 (write_special_name_destructor): Likewise.
161 (mangle_decl_string): Do it here instead.
163 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
165 * call.c (op_error): Make error messages clearer.
167 2000-11-15 Mark Mitchell <mark@codesourcery.com>
169 * decl.c (wrapup_globals_for_namespace): Don't mark things
170 TREE_ASM_WRITTEN when they're not.
172 2000-11-15 Jason Merrill <jason@redhat.com>
174 * typeck2.c (friendly_abort): Uncount the error before handing
177 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
179 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
181 2000-11-14 Mark Mitchell <mark@codesourcery.com>
183 * class.c (build_vtbl_initializer): Fix typo in comment.
184 * typeck.c (expr_sizeof): Don't crash on errors.
186 2000-11-14 Jim Wilson <wilson@redhat.com>
188 * lang-specs.h: Add %2 after %(cc1_options).
190 2000-11-14 Richard Henderson <rth@redhat.com>
192 * typeck.c (c_sizeof): Be strict about casting result value
193 back to c_size_type_node.
194 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
196 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
198 * typeck.c (build_unary_op): Use boolean_increment from
199 c-common.c, moving the relevant code there.
201 2000-11-11 Jason Merrill <jason@redhat.com>
203 * typeck.c (mark_addressable): Don't call put_var_into_stack.
205 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
208 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
210 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
211 * lex.c (copy_lang_decl): Likewise.
213 2000-11-09 Mark Mitchell <mark@codesourcery.com>
215 * dump.c (cp_dump_tree): Don't dump function bodies here.
217 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
218 (dump.o): Update dependency list.
219 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
220 (flag_dump_translation_unit): Likewise.
221 (CP_TYPE_QUALS): Adjust definition.
222 (DECL_C_BIT_FIELD): Remove.
223 (SET_DECL_C_BIT_FIELD): Likewise.
224 (CLEAR_DECL_C_BIT_FIELD): Likewise.
225 (add_maybe_template): Likewise.
226 (strip_array_types): Likewise.
227 (dump_node_to_file): Likewise.
228 (cp_dump_tree): New function.
229 * decl.c (init_decl_processing): Set lang_dump_tree.
230 * decl2.c (flag_dump_translation_unit): Remove.
231 * dump.c: Move most of it to ../c-dump.c.
232 (cp_dump_tree): New function.
233 * pt.c (add_maybe_template): Remove.
234 * typeck.c (strip_array_types): Likewise.
236 2000-11-07 Eric Christopher <echristo@redhat.com>
238 * decl.c (init_decl_processing): Change definition of
239 __wchar_t to wchar_t. Remove artificial declaration of
241 * lex.c: Change instances of __wchar_t to wchar_t.
243 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
245 * lex.c (do_identifier): Don't lookup_name for operators.
246 * parse.y (operator): Save looking_for_typename.
247 (unoperator): Restore it.
248 * spew.c (frob_opname): Use nth_token for lookahead.
250 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
252 * decl.c (grok_op_properties): Always use coerce_new_type and
254 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
255 exception specification. Tidy up.
256 (coerce_delete_type): Preserve exception specification. Tidy up.
258 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
260 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
261 (push_binding_level), error.c (cp_tree_printer), pt.c
262 (process_partial_specialization, tsubst_template_arg_vector),
263 search.c (lookup_member): Use memset () instead of bzero ().
265 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
267 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
269 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
271 * Make-lang.in (c++.distdir): Remove.
273 2000-11-04 Mark Mitchell <mark@codesourcery.com>
275 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
276 declarations from different namespaces to be combined.
278 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
280 * decl.c: Include tm_p.h.
282 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
284 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
286 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
288 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
289 (build_overload_value), repo.c (open_repo_file), xref.c
290 (open_xref_file): Use strchr () and strrchr () instead of index ()
293 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
295 * call.c (build_over_call): Call fold on the CALL_EXPR.
297 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
299 * error.c (dump_template_decl): Separate template hearders with
302 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
304 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
305 TS_* flags with corresponding TFF_*. Adjust prototypes of
306 functions (which used to take a tree_string_flags) to take an int.
308 * cp-tree.h (enum tree_string_flags): Remove
309 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
310 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
311 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
312 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
313 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
314 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
315 (type_as_string, decl_as_string, expr_as_string,
316 context_as_string): Adjust prototype.
318 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
321 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
322 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
325 2000-10-30 Mark Mitchell <mark@codesourcery.com>
327 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
328 (linkage_kind): New enumeration.
329 (decl_linkage): New function.
330 * decl2.c (comdat_linkage): Extend comment.
331 * error.c (dump_function_decl): Print the arguments used to
332 instantiate a template, even when not printing the type of the
334 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
335 not TREE_PUBLIC, to test for external linkage.
336 * tree.c (decl_linkage): New function.
338 2000-10-28 Mark Mitchell <mark@codesourcery.com>
340 * pt.c (instantiate_decl): Always instantiate static data members
341 initialized in-class.
343 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
345 * Make-lang.in: Move all build rules here from Makefile.in,
346 adapt to new context. Wrap all rules that change the current
347 directory in parentheses. Expunge all references to $(P).
348 When one command depends on another and they're run all at
349 once, use && to separate them, not ;. Add OUTPUT_OPTION to
350 all object-file generation rules. Delete obsolete variables.
352 * Makefile.in: Delete.
353 * config-lang.in: Delete outputs= line.
355 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
357 * error.c (dump_function_decl): Print no space between
358 `ptr-operator' the `type-specifier' of the return type.
359 (dump_type_prefix): Make sure we put space at the appropriate
362 2000-10-23 Jason Merrill <jason@redhat.com>
364 * call.c (equal_functions): Also call decls_match for extern "C" fns.
366 2000-10-22 Jason Merrill <jason@redhat.com>
368 * call.c (build_conditional_expr): Use ocp_convert to force
371 2000-10-22 Mark Mitchell <mark@codesourcery.com>
373 * call.c (standard_conversion): Use RVALUE_CONVs for all
374 expressions that satisfy lvalue_p, not just those that satisfy
377 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
379 * typeck.c (c_sizeof): Return an expression of `size_t' type,
380 not one with TYPE_IS_SIZETYPE set.
381 (dubious_conversion_warnings): Remove special-case code.
383 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
385 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
386 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
387 (dump_type_prefix): Print vector-of-int as 'int vector'.
388 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
389 * tree.c (walk_tree): Handle VECTOR_TYPE.
391 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
393 2000-10-21 Jason Merrill <jason@redhat.com>
395 * parse.y (operator): Set got_object from got_scope.
396 Set looking_for_typename.
397 * decl.c (lookup_name_real): Clear val after setting from_obj.
398 Reorganize diagnostic.
400 2000-10-20 Jason Merrill <jason@redhat.com>
402 * tree.c (walk_tree): Don't walk into default args.
404 * error.c (dump_expr): Use host_integerp.
406 2000-10-20 David Edelsohn <edelsohn@gnu.org>
408 * typeck2.c (abstract_virtuals_error): Use "because" instead of
409 "since" in error message.
411 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
413 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
415 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
417 * decl.c (revert_static_member_fn): Fixed typo.
419 2000-10-19 Mark Mitchell <mark@codesourcery.com>
421 * class.c (subobject_offset_fn): New type.
422 (dfs_record_base_offsets): Remove.
423 (record_base_offsets): Likewise.
424 (dfs_search_base_offsets): Likewise.
425 (record_subobject_offset): New function.
426 (check_subobject_offset): Likewise.
427 (walk_subobject_offsets): Likewise.
428 (record_subobject_offsets): Likewise.
429 (layout_conflict_p): Reimplement.
430 (layout_nonempty_base_or_field): Correct handling of type
431 conflicts during layout.
432 (layout_empty_base): Likewise.
433 (build_base_field): Adjust to handle new representation of empty
435 (build_base_fields): Likewise.
436 (layout_virtual_bases): Likewise.
437 (splay_tree_compare_integer_csts): New function.
438 (layout_class_type): Use a splay_tree, rather than a varray, to
439 represent the offsets of empty bases.
441 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
442 * decl.c (select_decl): Don't return declarations that are
445 2000-10-18 Mark Mitchell <mark@codesourcery.com>
447 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
448 (fake_std_node): New macro.
449 * decl.c (in_std): Rename to ...
450 (in_fake_std): ... this.
451 (flag_no_builtin): Remove.
452 (flag_no_nonansi_builtin): Likewise.
453 (walk_namespaces_r): Use fake_std_node.
454 (push_namespace): Use std_identifier.
455 (pop_namespace): Use in_fake_std.
456 (lookup_name_real): Use fake_std_node.
457 (init_decl_processing): When -fhonor-std, create the `std'
458 namespace. Don't create a dummy fake_std_node in that case.
459 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
460 (builtin_function): Put builtins whose names don't begin
461 with `_' in the std namespace.
462 * decl2.c (flag_no_builtin): Remove.
463 (flag_no_nonansi_builtin): Likewise.
464 (set_decl_namespace): Use fake_std_node.
465 (validate_nonmember_using_decl): Likewise.
466 (do_using_directive): Likewise.
467 (handle_class_head): Likewise.
468 * dump.c (dequeue_and_dump): Likewise.
469 * except.c (init_exception_processing): Use std_identifier.
470 * init.c (build_member_call): Use fake_std_node.
471 * rtti.c (init_rtti_processing): Use std_identifier.
473 2000-10-17 Mark Mitchell <mark@codesourcery.com>
475 * cp-tree.h (back_end_hook): Remove declaration.
476 * decl2.c (back_end_hook): Remove definition.
478 * dump.c (dequeue_and_dump): Dump TREE_USED.
480 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
482 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
484 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
486 * decl.c (WINT_TYPE): Define.
487 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
488 c_size_type_node, signed_size_type_node and wint_type_node.
490 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
492 * decl2.c (warn_missing_format_attribute): New variable.
493 (lang_decode_option): Decode -Wmissing-format-attribute.
495 2000-10-16 Mark Mitchell <mark@codesourcery.com>
497 * typeck.c (qualify_type): Remove.
498 (composite_pointer_type): Fix handling of conversions to `cv void*'.
500 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
502 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
504 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
506 * Makefile.in (parse.c, parse.h): Create atomically.
508 2000-10-12 Mark Mitchell <mark@codesourcery.com>
510 * class.c (current_obstack): Remove.
511 * decl.c (ggc_p): Remove.
512 (start_decl): Don't use decl_tree_cons.
513 (grokdeclarator): Don't use build_decl_list.
514 (start_function): Don't use decl_tree_cons.
515 (finish_function): Don't mess with obstacks.
516 * decl2.c (grok_x_components): Don't use build_decl_list.
517 * lex.c (make_call_declarator): Don't call decl_tree_cons.
518 (implicitly_declare_fn): Don't call build_decl_list.
519 * parse.y (frob_specs): Don't call build_decl_list or
521 (expr_or_declarator_intern): Don't call decl_tree_cons.
522 (primary): Don't call build_decl_list.
523 (fcast_or_absdcl): Likewise.
524 (typed_declspecs): Don't call decl_tree_cons.
525 (reserved_declspecs): Don't call build_decl_list.
526 (declmods): Likewise.
527 (reserved_typespecquals): Likewise.
529 (new_type_id): Likewise.
530 (cv_qualifiers): Likewise.
531 (after_type_declarator_intern): Likewise.
532 (notype_declarator_intern): Likewise.
533 (absdcl_intern): Likewise.
534 (named_parm): Likewise.
535 * pt.c (most_specialized_class): Likewise.
536 * repo.c (temporary_obstack): Make it a structure, not a pointer.
537 (init_repo): Initialize it.
538 * search.c (current_obstack): Remove.
539 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
541 2000-10-09 Richard Henderson <rth@cygnus.com>
543 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
544 (c++ language support bits for libgcc): Remove.
545 (c++.clean): Remove cplib2.txt cleanup.
546 * config-lang.in (headers, lib2funcs): Remove.
548 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
549 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
550 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
551 * inc/new.h, inc/typeinfo: Remove files.
553 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
555 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
557 (init_decl_processing): Initialize intmax_type_node and
560 2000-10-06 Richard Henderson <rth@cygnus.com>
562 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
563 (original_result_rtx): Remove.
564 * decl.c (save_function_data): Don't clear x_result_rtx.
565 (mark_lang_function): Don't mark it either.
566 * expr.c (fixup_result_decl): Remove.
567 * semantics.c (genrtl_named_return_value): Frob the return decl
568 before calling emit_local_var.
569 (genrtl_finish_function): Don't call fixup_result_decl.
570 Always emit the jump to return_label.
572 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
574 * pt.c (lookup_template_class): Set current access for enum.
575 (tsubst_enum): Set file & line for enum decl.
577 * spew.c (yylex): Remove unused variable.
579 2000-10-05 Richard Henderson <rth@cygnus.com>
581 * semantics.c (genrtl_finish_function): Don't init or check
582 can_reach_end; remove noreturn and return value checks.
584 2000-10-05 Tom Tromey <tromey@cygnus.com>
586 * init.c (build_java_class_ref): Use `build_static_name' with a
587 suffix, not a prefix, to build the class object's name.
589 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
591 * cp-tree.h (access_kind): Fix comment typo.
592 * decl2.c (grokfield): Fix diagnostic typo.
593 * semantics.c (finish_template_type): Fix comment typo.
594 (finish_qualified_object_call_expr): Likewise.
596 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
598 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
601 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
603 * spew.c (frob_id): New static function.
604 (frob_opname): Use it.
607 2000-10-01 Mark Mitchell <mark@codesourcery.com>
609 * decl.c (lang_mark_false_label_stack): Remove.
610 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
612 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
614 * gxxint.texi: Use @email for formatting email addresses.
616 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
618 * error.c: Remove direct obstack manipulation. Replace with
619 output_buffer-based formatting. Adjust calls to removed macros.
620 (obstack_chunk_alloc, obstack_chunk_free): Remove.
621 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
622 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
624 2000-09-24 Mark Mitchell <mark@codesourcery.com>
626 * ir.texi: Move to ../c-tree.texi.
628 2000-09-20 Jason Merrill <jason@redhat.com>
630 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
632 2000-09-21 Andreas Jaeger <aj@suse.de>
634 * errfn.c: Move declaration of cp_printer and cp_printers to ...
635 * cp-tree.h: ... here.
637 * error.c: Remove declaration of cp_printer.
639 2000-09-20 Mark Mitchell <mark@codesourcery.com>
641 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
643 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
645 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
648 2000-09-18 Mark Mitchell <mark@codesourcery.com>
650 * decl.c (start_function): Robustify.
652 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
654 * cp-tree.h (check_function_format): Accept a `status' parameter.
656 * call.c, typeck.c: Updates calls to `check_function_format'.
658 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
660 * decl2.c (handle_class_head): Always push some scope even
663 2000-09-16 Mark Mitchell <mark@codesourcery.com>
665 * cp-tree.h (struct cp_language_function): Remove
666 x_scope_stmt_stack and name_declared.
667 (current_scope_stmt_stack): Remove.
668 (function_name_declared_p): New macro.
669 (struct lang_decl_flags): Use c_lang_decl as a base class.
671 (struct lang_decl): Replace saved_tree with context.
672 (DECL_FRIEND_CONTEXT): Adjust accordingly.
673 (SET_DECL_FRIEND_CONTEXT): Likewise.
674 (DECL_VIRTUAL_CONTEXT): Likewise.
675 (DECL_SAVED_TREE): Remove.
676 (C_DECLARED_LABEL_FLAG): Likewise.
677 (cplus_expand_expr_stmt): Don't declare.
678 (add_decl_stmt): Likewise.
679 (add_scope_stmt): Likewise.
680 * decl.c (mark_stmt_tree): Remove.
681 (case_compare): Likewise.
682 (finish_case_label): Use c_add_case_label.
683 (init_decl_processing): Set more language-specific hooks.
684 (build_enumerator): Fix typo in comment.
685 (cplus_expand_expr_stmt): Remove.
686 (mark_lang_function): Use mark_c_language_function.
687 (lang_mark_tree): Use c_mark_lang_decl.
688 * decl2.c: Change order of inclusion.
689 * except.c: Likewise.
690 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
691 back on c_expand_expr.
692 * friend.c: Include expr.h.
693 * init.c: Change order of inclusion.
694 * Makefile.in: Update dependencies.
695 * lex.h (free_lang_decl_chain): Remove.
696 * optimize.c (maybe_clone_body): Use function_name_declared_p.
697 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
699 (instantiate_decl): Use function_name_declared_p.
700 * semantics.c (lang_expand_expr_stmt): Remove.
701 (set_current_function_name_declared): Likewise.
702 (current_function_name_declared): Likewise.
703 (begin_compound_stmt): Use function_name_declared_p.
704 (add_decl_stmt): Remove.
705 (setup_vtbl_ptr): Use function_name_declared_p.
706 (add_scope_stmt): Remove.
707 (current_scope_stmt_stack): New function.
708 (cp_expand_stmt): Don't handle SCOPE_STMTs.
709 (expand_body): Use function_name_declared_p.
710 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
711 * typeck.c: Change order of includes.
712 (convert_sequence): Remove.
714 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
716 * lex.c (reswords): Add _Complex.
718 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
720 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
722 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
724 * init.c (begin_init_stmts): Don't use // comments.
726 2000-09-12 Jason Merrill <jason@redhat.com>
728 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
729 all non-extern arrays.
731 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
732 typenames, too. Downgrade complaint to pedwarn.
733 (xref_tag): Warn about surprising behavior of 'friend struct T'.
734 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
735 'class This::Inherited'.
737 2000-09-12 Mark Mitchell <mark@codesourcery.com>
739 * decl.c (finish_case_label): Given the LABEL_DECL a
742 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
744 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
745 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
746 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
747 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
748 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
750 (sorry_for_unsupported_tree, print_scope_operator,
751 print_left_paren, print_right_paren, print_left_bracket,
752 print_right_bracket, print_whitespace): Likewise.
753 (aggr_variety): Rename to class_key_or_enum.
754 (print_type): Rename to print_type_id.
755 (print_type_specifier_seq, print_simple_type_specifier,
756 print_elaborated_type_specifier,
757 print_rest_of_abstract_declarator,
758 print_parameter_declaration_clause, print_exception_specification,
759 print_nested_name_specifier, print_template_id,
760 typedef_original_name, print_template_argument_list_start,
761 print_template_argument_list_end): New functions.
763 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
765 * ir.texi: Add more documentation.
767 2000-09-11 Mark Mitchell <mark@codesourcery.com>
769 * cp-tree.h (struct saved_scope): Remove x_function_parms.
770 (current_function_parms): Don't define.
771 (struct cp_language_function): Remove parms_stored.
772 (current_function_just_assigned_this): Don't define.
773 (current_function_parms_stored): Likewise.
774 (static_ctors): Declare.
775 (static_dtors): Likewise.
776 (SF_EXPAND): Don't define.
777 (expand_start_early_try_stmts): Remove declaration.
778 (store_parm_decls): Likewise.
779 * decl.c (static_ctors): Don't declare.
780 (static_dtors): Likewise.
781 (struct binding_level): Remove this_block.
782 (poplevel): Remove dead code.
783 (set_block): Likewise.
784 (mark_binding_level): Don't mark this_block.
785 (mark_saved_scope): Don't mark x_function_parms.
786 (init_decl_processing): Don't add current_function_parms as a GC
788 (check_function_type): Change prototype.
789 (start_function): Remove RTL-generation code.
790 (expand_start_early_try_stmts): Remove.
791 (store_parm_decls): Give it internal linkage. Remove
793 (finish_function): Remove RTL-generation code.
794 * decl2.c (static_ctors): Fix formatting.
795 (static_dtors): Likewise.
796 * method.c (use_thunk): Don't call store_parm_decls.
797 (synthesize_method): Likewise.
798 * optimize.c (maybe_clone_body): Likewise.
799 * parse.y (fn.def2): Likewise.
800 (.set_base_init): Likewise.
802 * pt.c (instantiate_decl): Likewise.
803 * rtti.c (synthesize_tinfo_fn): Likewise.
804 * semantics.c (genrtl_try_block): Simplify.
805 (expand_body): Use genrtl_start_function and
806 genrtl_finish_function.
807 (genrtl_start_function): New function.
808 (genrtl_finish_function): Likewise.
810 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
812 * error.c (cp_tree_printer, case 'P'): Append break.
814 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
816 * cp-tree.h (frob_opname): Declare.
817 * parse.y (saved_scopes): New static variable.
818 (cp_parse_init): Adjust.
819 (do_id): If lastiddecl is NULL, do do_identifier.
820 (operator): Save scope information.
821 (unoperator): New reduction. Restore scope information.
822 (operator_name): Append unoperator. Call frob_opname.
823 * spew.c (frob_opname): Define.
825 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
827 * decl.c, rtti.c: Include defaults.h if not already included.
828 Don't define the *_TYPE_SIZE macros.
830 2000-09-09 Mark Mitchell <mark@codesourcery.com>
832 * cp-tree.h (push_switch): Change prototype.
833 (check_cp_case_value): Remove declaration.
834 (decl_constant_value): Likewise.
835 * decl.c (struct cp_switch): Add switch_stmt and cases.
836 (case_compare): New function.
837 (push_switch): Set switch_stmt. Initialize cases.
838 (pop_switch): Clean up cases.
839 (define_case_label): Rename to ...
840 (finish_case_label): ... this. Do semantic analysis for case
842 (start_function): Correct comment.
843 * decl2.c (check_cp_case_value): Remove.
844 * expr.c (do_case): Remove.
845 * pt.c (tsubst_expr): Adjust call to finish_case_label.
846 * semantics.c (genrtl_do_poplevel): Remove declaration.
847 (RECHAIN_STMTS): Remove.
848 (finish_break_stmt): Use build_break_stmt.
849 (finish_continue_stmt): Use build_continue_stmt.
850 (finish_switch_cond): Adjust condition here, rater than in
852 (finish_case_label): Remove.
853 * typeck.c (c_expand_return): Remove.
854 (c_expand_start_case): Likewise.
856 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
858 * ir.texi: Document type nodes.
860 2000-09-06 Mark Mitchell <mark@codesourcery.com>
862 * cp-tree.h (init_cp_semantics): Declare.
863 (genrtl_try_block): Don't declare.
864 (genrtl_handler): Likewise.
865 (genrtl_catch_block): Likewise.
866 (genrtl_ctor_stmt): Likewise.
867 (genrtl_subobject): Likewise.
868 (genrtl_do_poplevel): Likewise.
869 (genrtl_named_return_value): Likewise.
870 * lex.c (init_parse): Call init_cp_semantics.
871 * semantics.c (genrtl_try_block): Give it internal linkage.
872 (genrtl_handler): Likewise.
873 (genrtl_catch_block): Likewise.
874 (genrtl_ctor_stmt): Likewise.
875 (genrtl_subobject): Likewise.
876 (genrtl_do_poplevel): Likewise.
877 (genrtl_named_return_value): Likewise.
878 (lang_expand_stmt): Rename to ...
879 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
880 (init_cp_semantics): Define.
882 * decl.c (initialize_local_var): Remove RTL-generating code.
883 * semantics.c (genrtl_try_block): Fix formatting.
885 Move statement-tree facilities from C++ to C front-end.
886 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
887 (void_zero_node): Remove.
888 (stmt_tree): Likewise.
889 (scope_chain): Adjust.
890 (language_function): Rename to cp_language_function.
891 (cp_function_chain): Adjust.
892 (current_stmt_tree): Remove.
893 (last_tree): Likewise.
894 (last_expr_type): Likewise.
895 (struct lang_decl): Adjust.
896 (STMT_IS_FULL_EXPR_P): Remove.
898 (begin_stmt_tree): Likewise.
899 (finish_stmt_tree): Likewise.
900 (walk_tree_fn): Likewise.
901 (walk_stmt_tree): Likewise.
902 * class.c (finish_struct): Replace use of add_tree with add_stmt.
903 * decl.c (mark_stmt_tree): Adjust type.
904 (init_decl_processing): Don't build void_zero_node.
905 (initialize_local_var): Adjust usage of current_stmt_tree.
906 (finish_enum): Use add_stmt, not add_tree.
907 (save_function_data): Adjust use of language_function.
908 (finish_constructor_body): Use add_stmt, not add_tree.
909 (finish_destructor_body): Likewise.
910 (push_cp_function_context): Adjust use of language_function.
911 (pop_cp_function_context): Likewise.
912 (mark_lang_function): Likewise.
913 (mark_cp_function_context): Likewise.
914 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
915 (build_vec_init): Likewise.
916 * semantics.c (SET_LAST_STMT): Remove.
917 (RECHAIN_STMTS): Don't use it.
918 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
919 (current_stmt_tree): Define.
921 (finish_goto_stmt): Use add_stmt, not add_tree.
922 (finish_expr_stmt): Likewise.
923 (begin_if_stmt): Likewise.
924 (finish_then_clause): Likewise.
925 (begin_while_stmt): Likewise.
926 (begin_do_stmt): Likewise.
927 (finish_return_stmt): Likewise.
928 (begin_for_stmt): Likewise.
929 (finish_break_stmt): Likewise.
930 (finish_continue_stmt): Likewise.
931 (begin_switch_stmt): Likewise.
932 (finish_case_label): Likewise.
933 (begin_try_block): Likewise.
934 (begin_function_try_block): Likewise.
935 (begin_handler): Likewise.
936 (begin_catch_block): Likewise.
937 (begin_compound_stmt): Likewise.
938 (begin_asm_stmt): Likewise.
939 (finish_asm_stmt): Likewise.
940 (finish_label_stmt): Likewise.
941 (add_decl_stmt): Likewise.
942 (finish_subobject): Likewise.
943 (finish_decl_cleanup): Likewise.
944 (finish_named_return_value): Likewise.
945 (setup_vtbl_ptr): Likewise.
946 (add_scope_stmt): Likewise.
947 (finish_stmt_expr): Likewise.
948 (prune_unused_decls): Remove.
949 (begin_stmt_tree): Likewise.
950 (finish_stmt_tree): Likewise.
951 (prep_stmt): Adjust use of current_stmt_tree.
952 (lang_expand_stmt): Likewise.
953 * tree.c (statement_code_p): Remove.
954 (cp_statement_code_p): New function.
955 (walk_stmt_tree): Remove.
956 (init_tree): Set lang_statement_code_p.
958 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
960 Integrated preprocessor.
962 * Make-lang.in, Makefile.in: Remove all references to input.c,
963 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
964 * gxx.gperf, hash.h, input.c: Delete.
965 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
966 initialized properly.
968 * class.c (fixup_pending_inline): Take a tree, not a
969 struct pending_inline *. All callers changed.
970 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
971 RID_PROTECTED entries in ridpointers[] array here.
972 * decl.c (duplicate_decls): Do not refer to struct
974 (record_builtin_type, init_decl_processing): Use RID_MAX not
976 (grokdeclarator): Use C_IS_RESERVED_WORD.
977 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
979 (grok_x_components): Do not inspect pending_inlines chain.
981 * cp-tree.h (struct lang_identifier): Add rid_code entry.
982 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
983 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
984 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
985 TIME_IDENTIFIER_FILEINFO): Kill.
987 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
989 * parse.y: Call do_pending_inlines unconditionally.
990 reinit_parse_for_method is now snarf_method. fn.defpen is no
991 longer necessary. Remove unnecessary <itype> annotation on
992 SCOPE. Do not refer to end_of_file or struct pending_inline.
993 * semantics.c (begin_inline_definitions): Call
994 do_pending_inlines unconditionally.
996 * lex.c: Remove all code now shared with C front end.
997 Initialize cpplib properly if USE_CPPLIB. Put reserved words
998 into the get_identifier table. Rewrite pragma handling to
999 work with the registry. Move code to save tokens for later
1000 processing to spew.c.
1002 * spew.c: Rewrite everything in terms of token streams instead
1003 of text. Move routines here from lex.c / input.c as
1004 appropriate. GC-mark trees hanging off the pending inlines
1007 2000-09-06 Mark Mitchell <mark@codesourcery.com>
1009 * NEWS: Mention that the named return value extension has been
1011 * cp-tree.h (original_result_rtx): Define.
1012 (TREE_REFERENCE_EXPR): Remove.
1013 (DECL_VPARENT): Likewise.
1014 (pushdecl_nonclass_level): Likewise.
1015 (store_return_init): Likewise.
1016 (reinit_lang_specific): Likewise.
1017 (genrtl_named_return_value): Change prototype.
1018 * decl.c (original_result_rtx): Remove.
1019 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
1020 Do not generate RTL for local variables here.
1021 (store_return_init): Remove.
1022 * semantics.c (genrtl_named_return_value): Simplify. Fold in
1024 (finish_named_return_value): Adjust accordingly. Warn that this
1025 extension is deprecated.
1026 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
1028 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
1030 * pt.c (type_unification_real): Replace switch with if.
1031 (unify): Tsubst non-type parms before comparing.
1033 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
1035 * error.c (dump_typename): New function, broken out of ...
1036 (dump_type): ... here. Use it.
1037 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
1039 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
1041 * init.c (build_offset_ref): Deal with namespace scoped
1044 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
1046 * class.c (resolve_address_of_overloaded_function): Add
1047 explanation message.
1048 * decl.c (define_case_label): Reformat explanation.
1049 * decl2.c (finish_static_data_member_decl): Likewise.
1050 (grokfield): Likewise.
1051 * friend.c (do_friend): Likewise.
1053 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
1055 * tree.c (walk_tree): Expose tail recursion.
1056 (walk_stmt_tree): New function.
1057 * cp-tree.h: Prototype walk_stmt_tree.
1058 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
1059 the BLOCKs directly. If a BLOCK has no variables after
1060 pruning, discard it.
1061 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
1062 restore the line number.
1064 2000-09-05 Mark Mitchell <mark@codesourcery.com>
1066 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
1067 (pt.o): Remove dependency on HTAB_H.
1068 * cp-tree.h: Include hashtab.h.
1069 (walk_tree): Change prototype.
1070 (walk_tree_without_duplicates): New function.
1071 * decl.c (check_default_argument): Use it.
1072 * optimize.c (remap_decl): Adjust calls to walk_tree.
1073 (copy_body): Likewise.
1074 (expand_calls_inline): Likewise.
1075 (calls_setjmp_p): Use walk_tree_without_duplicates.
1076 * pt.c: Don't include hashtab.h.
1077 (for_each_template_parm): Use walk_tree_without_duplicates.
1078 * semantics.c (finish-stmt_tree): Likewise.
1079 (expand_body): Likewise.
1080 * tree.c (walk_tree): Add additional parameter.
1081 (walk_tree_without_duplicates): New function.
1082 (count_trees): Use it.
1083 (verify_stmt_tree): Adjust call to walk_tree.
1084 (find_tree): Use walk_tree_without_duplicates.
1085 (no_linkage_check): Likewise.
1086 (break_out_target_exprs): Adjust call to walk_tree.
1087 (cp_unsave): Likewise.
1089 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1091 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
1092 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1093 * cp-tree.h (TYPE_BINFO): Adjust comment.
1094 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
1095 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
1096 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
1097 (TYPE_TEMPLATE_INFO): Likewise.
1098 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
1099 * class.c (push_nested_class): Likewise.
1100 * decl.c (lookup_name_real): Likewise.
1101 (grokdeclarator): Likewise.
1102 (grok_op_properties): Likewise.
1103 (xref_tag): Likewise.
1104 (xref_basetypes): Likewise.
1105 * decl2.c (constructor_name_full): Likewise.
1106 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
1107 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
1108 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
1109 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1110 (dump_type_suffix): Likewise.
1111 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
1113 (get_aggr_from_typedef): Likewise.
1114 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
1115 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1116 (write_template_parm): Likewise.
1117 (write_template_template_parm): Check tree code instead of
1118 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1119 * method.c (build_overload_nested_name): Add
1120 BOUND_TEMPLATE_TEMPLATE_PARM.
1121 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
1122 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1123 * pt.c (convert_template_argument): Check tree code instead of
1124 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1125 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
1126 (for_each_template_parm): Adjust comment.
1127 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
1128 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1129 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
1130 template_args_equal to compare template template parameter cases.
1131 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1132 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
1134 * tree.c (copy_template_template_parm): Decide whether to create
1135 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
1136 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1137 (copy_tree_r): Likewise.
1138 * typeck.c (comptypes): Likewise. Check tree code instead of
1139 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1141 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
1143 * decl.c (finish_function): Move the code for handling functions
1144 marked with the constructor and destructor attributes inside the
1147 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
1149 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
1151 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
1153 * pt.c (lookup_template_class): Remove abort.
1154 * tree.c (get_type_decl): Allow error_mark_node.
1156 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
1158 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
1161 2000-09-03 Mark Mitchell <mark@codesourcery.com>
1163 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
1166 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
1168 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
1169 union tag mismatch error reporting.
1171 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
1173 * call.c (build_scoped_method_call): Check it is not a namespace.
1175 2000-08-30 Jason Merrill <jason@redhat.com>
1177 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
1179 * tree.c (bot_manip): Check TREE_CONSTANT rather than
1180 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
1181 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
1183 * decl.c (start_function): Always call make_function_rtl.
1185 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
1187 * semantics.c (prune_unused_decls): New function.
1188 (finish_stmt_tree): Call it via walk_tree.
1190 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
1192 * class.c (build_secondary_vtable): Constify a char *.
1193 * decl.c (init_decl_processing): Initialize function_id_node,
1194 pretty_function_id_node, and func_id_node.
1195 * input.c (struct input_source): Constify 'str'.
1196 (feed_input): Constify first argument.
1197 * mangle.c (write_identifier): Constify argument.
1198 * pt.c (mangle_class_name_for_template): Constify argument.
1200 2000-08-29 Mark Mitchell <mark@codesourcery.com>
1202 * typeck.c (mark_addressable): Remove code that pokes around in
1205 2000-08-28 Jason Merrill <jason@redhat.com>
1207 * lex.c (file_name_nondirectory): Move to toplev.c.
1209 * cp-tree.h (LOCAL_CLASS_P): New macro.
1210 * class.c (finish_struct_1): Use it.
1212 2000-08-27 Alex Samuel <samuel@codesourcery.com>
1214 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
1215 (write_encoding): Pass another argument to write_name.
1216 (write_name): Add ignore_local_scope parameter. Fix handling of
1218 (write_nested_name): Use write_unqualified_name.
1219 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
1220 (write_template_prefix): Use write_unqualified_name.
1221 (write_component): Remove.
1222 (write_local_name): Add parameter. Use direct local entity to
1223 discriminator calculation.
1224 (write_class_enum_type): Pass another argument to write_name.
1225 (write_template_template_arg): Likewise.
1226 (make_guard_variable): Likewise.
1228 2000-08-27 Jason Merrill <jason@redhat.com>
1230 * decl.c (pushdecl): Matching decls for local externs are found in
1231 the current level. Propagate linkage information from previous
1234 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
1236 * ir.texi (Expressions): Fix typo.
1238 2000-08-25 Greg McGary <greg@mcgary.org>
1240 * tree.c (init_tree): Use ARRAY_SIZE.
1242 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
1244 * error.c (cp_tree_printer): Rework.
1246 2000-08-25 Mark Mitchell <mark@codesourcery.com>
1248 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
1250 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
1251 (cp-demangle.o): Remove target.
1252 (dyn-string.o): Likewise.
1254 * decl.c (grokfndecl): Require that `main' return an `int'.
1255 * mangle.c (write_encoding): Don't mangle return types for
1256 conversion functions.
1258 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
1260 * error.c (tree_formatting_info): New data type.
1261 (tree_being_formatted): New macro.
1262 (tree_formatting_flags): Likewise.
1263 (put_whitespace): Likewise.
1264 (print_tree_identifier): Likewise.
1265 (print_identifier): Likewise.
1266 (cp_tree_printer, print_function_argument_list, print_declaration,
1267 print_expression, print_function_declaration,
1268 print_function_parameter, print_type, print_cv_qualifier): New
1270 (init_error): Initialize lang_printer.
1272 2000-08-24 Jason Merrill <jason@redhat.com>
1274 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
1275 adjustment necessary.
1277 2000-08-24 Greg McGary <greg@mcgary.org>
1279 * cp-tree.h (MAIN_NAME_P): Remove macro.
1281 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
1283 * error.c (print_instantiation_context): Don't forget to flush the
1286 2000-08-23 Jason Merrill <jason@redhat.com>
1288 * typeck.c (build_ptrmemfunc): Save the input pmf.
1290 * method.c (process_modifiers): Use same_type_p.
1292 2000-08-23 Mark Mitchell <mark@codesourcery.com>
1294 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
1295 * mangle.c (write_function_type): Change prototype.
1296 (write_encoding): Don't mangle return types for
1297 constructors or destructors.
1298 (write_type): Adjust call to write_function_type.
1299 * pt.c (instantiate_template): Instantiate alternate entry points
1300 when instantiating the main function.
1302 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
1304 * error.c (cp_print_error_function): Don't use embedded '\n' in
1307 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
1309 * decl.c (init_decl_processing): Remove bogus initialization.
1310 * error.c (lang_print_error_function): Restore here.
1311 (init_error): Initialize print_error_function.
1313 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1315 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
1317 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
1319 * Makefile.in (error.o): Depends on diagnostic.h
1321 * cp-tree.h (problematic_instantiation_changed,
1322 record_last_problematic_instantiation, current_instantiation,
1323 print_instantiation_context): Declare.
1324 (maybe_print_template_context): Remove.
1326 * decl.c (init_decl_processing): Set print_error_function to NULL.
1327 (lang_print_error_function): Remove, since we're using a new
1330 * error.c: #include diagnostic.h
1331 (function_category): New function.
1332 (cp_diagnostic_starter): Likewise.
1333 (cp_diagnostic_finalizer): Likewise.
1334 (cp_print_error_function): Likewise.
1335 (maybe_print_instantiation_context): Likewise.
1336 (print_instantiation_full_context): Likewise.
1337 (print_instantiation_partial_context): Likewise.
1338 (print_instantiation_context): Define.
1339 (init_error): Initialize diagnostic pager and finalizer.
1341 * pt.c (problematic_instantiation_changed): Define.
1342 (record_last_problematic_instantiation): Likewise.
1343 (current_instantiation): Likewise.
1344 (maybe_print_template_context): Remove.
1345 (print_template_context): Likewise.
1346 (current_tinst_level): Make static to reflect Brendan Kehoe's
1347 change of 1995-04-13.
1348 (push_tinst_level): Call print_instantiation_context.
1350 2000-08-21 Nix <nix@esperi.demon.co.uk>
1352 * lang-specs.h: Do not process -o or run the assembler if
1355 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
1357 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
1359 * decl2.c (lang_decode_option): Disable gettext attributes for
1362 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
1364 * lex.c (lang_init_options): Default diagnostic message maximum
1365 length to 80, when line-wrapping.
1367 2000-08-20 Mark Mitchell <mark@codesourcery.com>
1369 * class.c (build_vtbl_initializer): Clear the entire
1370 vtbl_init_data. Start keeping track of the functions for which we
1371 have created vcall offsets here.
1372 (dfs_build_vcall_offset_vtbl_entries): Remove.
1373 (build_vcall_offset_vtbl_entries): Reimplement.
1374 (add_vcall_offset_vtbl_entries_r): New function.
1375 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
1376 computing when vcall offsets are necessary.
1378 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
1380 * decl.c (member_function_or_else): Use cp_error ... %T.
1381 (grokdeclarator): Likewise.
1382 (start_method): Likewise.
1383 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
1385 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
1387 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
1390 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
1392 * cp-tree.h (PTRMEM_OK_P): New macro.
1393 (itf_ptrmem_ok): New enumeration value.
1394 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
1395 argument. Diagnose implicit pointer to member.
1396 (instantiate_type): Don't diagnose implicit pointer to member
1397 here. Pass itf_ptrmem_ok if ok. Adjust calls to
1398 resolve_address_of_overloaded_function.
1399 * init.c (build_offset_ref): Set PTRMEM_OK_P.
1400 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
1401 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
1402 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
1403 (build_unary_op): Deal with single non-static member in
1406 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
1408 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
1410 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
1412 * cp-tree.h (enum_name_string): Remove prototype.
1413 (report_case_error): Remove prototype.
1414 * cp/typeck2.c (enum_name_string): Remove.
1415 (report_case_error): Remove.
1416 * error.c (dump_expr): Deal with enum values directly.
1417 Correctly negate integer constant.
1419 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
1421 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
1422 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
1423 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
1424 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
1425 (__cxa_vec_new): Use __cxa_vec_new2.
1426 (__cxa_vec_delete): Use __cxa_vec_delete2.
1428 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
1430 * vec.cc (__cxa_vec_new): Set "C" linkage.
1431 (__cxa_vec_ctor): Likewise.
1432 (__cxa_vec_cctor): Likewise.
1433 (__cxa_vec_dtor): Likewise.
1434 (__cxa_vec_delete): Likewise.
1435 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
1436 (__cxa_vec_ctor): Likewise.
1437 (__cxa_vec_cctor): Likewise.
1438 (__cxa_vec_dtor): Likewise.
1439 (__cxa_vec_delete): Likewise.
1441 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
1443 * class.c (instantiate_type): Reinstate local variable
1444 deleted in previous change.
1446 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
1449 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
1451 * cp-tree.h (instantiate_type_flags): New enumeration.
1452 (instantiate_type): Change parameter.
1453 * class.c (instantiate_type): Adjust prototype. Adjust.
1454 * call.c (standard_conversion): Adjust instantiate_type call.
1455 (reference_binding): Likewise.
1456 (build_op_delete_call): Likewise.
1457 (convert_like_real): Likewise.
1458 * cvt.c (cp_convert_to_pointer): Likewise.
1459 (convert_to_reference): Likewise.
1460 * pt.c (convert_nontype_argument): Likewise.
1461 * typeck.c (build_binary_op): Likewise.
1462 (build_ptrmemfunc): Likewise.
1463 (convert_for_assignment): Likewise.
1465 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
1467 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
1468 (current_aggr): Define.
1469 * decl.c (grokdeclarator): Make sure a friend class is an
1470 elaborated type specifier.
1471 * parse.y (current_aggr): Remove static definition.
1472 (cp_parse_init): Adjust.
1473 (structsp): Clear and restore current_aggr.
1474 (component_decl_list): Clear current_aggr.
1476 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
1477 aggregate tag on the typename's context.
1479 * pt.c (tsubst_friend_class): Return error_mark_node, if
1481 (instantiate_class_template): Ignore error_mark_node friend types.
1483 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
1485 * cvt.c (warn_ref_binding): New static function, broken out of ...
1486 (convert_to_reference): ... here. Use it.
1488 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
1490 * parse.y (template_arg): Add rule for template qualified with
1493 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1495 * decl2.c (add_function): Reorganize.
1496 (arg_assoc): Do not consider function template decls.
1498 2000-08-11 Jason Merrill <jason@redhat.com>
1500 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
1503 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
1505 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
1506 (lookup_nested_tag): Likewise.
1508 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
1511 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
1513 * parse.y (named_complex_class_head_sans_basetype): Remove
1516 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
1518 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
1519 explicit TEMPLATE_ID_EXPR args.
1520 (build_expr_from_tree, case CALL_EXPR): Likewise.
1522 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
1524 * decl.c (check_tag_decl): Diagnose typename's which don't
1527 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
1529 * init.c (build_aggr_init): Reject bogus array initializers
1532 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
1534 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
1536 * cp/tinfo.cc (__dynamic_cast): Likewise.
1537 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
1539 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
1541 * cvt.c (convert_to_pointer_force): Fix error message when
1542 attempting to cast from ambiguous base.
1544 2000-08-08 Jason Merrill <jason@redhat.com>
1546 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
1547 (tsubst_template_arg_vector): Likewise.
1549 * decl2.c (build_anon_union_vars): Choose the largest field; don't
1550 assume that one will be as large as the union.
1552 2000-08-07 Kazu Hirata <kazu@hxi.com>
1554 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
1555 * decl.c (pop_labels): Likewise.
1557 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
1559 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
1561 (__pointer_to_member_type_info): Likewise.
1562 (__base_class_info): Likewise.
1563 (__class_type_info): Likewise.
1564 (__si_class_type_info): Likewise.
1565 (__vmi_class_type_info): Likewise.
1566 * tinfo.cc (__si_class_type_info::__do_find_public_src):
1567 Changed member names to match specifications.
1568 (__vmi_class_type_info::__do_find_public_src): Likewise.
1569 (__si_class_type_info::__do_dyncast): Likewise.
1570 (__vmi_class_type_info::__do_dyncast): Likewise.
1571 (__si_class_type_info::__do_upcast): Likewise.
1572 (__vmi_class_type_info::__do_upcast): Likewise.
1573 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
1574 (__pbase_type_info::__pointer_catch): Likewise.
1575 (__pointer_type_info::__pointer_catch): Likewise.
1576 (__pointer_to_member_type_info::__pointer_catch): Likewise.
1578 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
1580 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
1581 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
1582 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
1584 2000-08-04 Mark Mitchell <mark@codesourcery.com>
1586 * cp-tree.h (add_method): Change prototype.
1587 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
1588 Don't double the size of the method vector in the error case.
1589 (handle_using_decl): Adjust call to add_method.
1590 (add_implicitly_declared_members): Likewise.
1591 (clone_function_decl): Likewise.
1592 * decl2.c (check_classfn): Likewise.
1593 * semantics.c (finish_member_declaration): Likewise.
1595 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
1597 * decl.c (flag_isoc94): New variable.
1599 2000-08-02 Jason Merrill <jason@redhat.com>
1601 * pt.c (do_type_instantiation): Add complain parm; don't complain
1602 if called recursively.
1603 * cp-tree.h, parse.y: Adjust.
1605 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
1607 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
1608 -Wno-strict-prototypes.
1610 * g++spec.c: Adjust type of second argument to
1611 lang_specific_driver, and update code as necessary.
1613 * cp-tree.h: Don't prototype min_precision here.
1614 (my_friendly_assert): Cast expression to void.
1615 * semantics.c (do_poplevel): Initialize scope_stmts.
1617 2000-08-02 Mark Mitchell <mark@codesourcery.com>
1619 * cp-tree.h (DECL_NEEDED_P): Tweak.
1621 2000-07-28 Jason Merrill <jason@redhat.com>
1623 * lang-specs.h: Use %i in rule for .ii files.
1625 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
1627 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
1629 2000-07-30 Mark Mitchell <mark@codesourcery.com>
1631 Allow indirect primary bases.
1632 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
1634 (CLASSTYPE_VFIELD_PARENT): Remove.
1635 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
1636 (BINFO_PRIMARY_BINFO): Remove.
1637 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
1638 (BINFO_VBASE_PRIMARY_P): Likewise.
1639 (BINFO_PRIMARY_BASE_OF): New macro.
1640 (BINFO_INDIRECT_PRIMARY_P): Likewise.
1641 (get_primary_binfo): New function.
1642 * decl.c (lang_mark_tree): Make lang_type::primary_base.
1643 * class.c (vcall_offset_data_s): Rename to ...
1644 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
1645 and add ctor_vtbl_p.
1646 (get_derived_offset): Use get_primary_binfo.
1647 (dfs_mark_primary_bases): Adjust handling of virtual primary
1649 (mark_primary_bases): Likewise.
1650 (set_primary_base): Take a binfo, not an integer, as a
1651 representation of the primary base.
1652 (indirect_primary_base_p): Remove.
1653 (determine_primary_base): Adjust for indirect primary bases.
1654 (dfs_find_final_overrider): Fix typo in coment.
1655 (update_vtable_entry_for_fn): Use get_primary_binfo.
1656 (layout_nonempty_base_or_field): Tweak.
1657 (build_base_fields): Adjust for new primary base semantics.
1658 (dfs_propagate_binfo_offsets): Remove.
1659 (propagate_binfo_offsets): Rewrite.
1660 (dfs_set_offset_for_shared_vbases): Remove.
1661 (layout_virtual_bases): Don't use it.
1662 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
1664 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
1665 CLASSTYPE_VFIELD_PARENT.
1666 (dfs_get_primary_binfo): New function.
1667 (get_primary_binfo): Likewise.
1668 (dump_class_hierarchy_r): Tweak printing of primary bases.
1669 (build_vtbl_initializer): Fix typo in comments. Use
1671 (build_vcall_and_vbase_vtbl_entries): Likewise.
1672 (build_vbaes_offset_vtbl_entries): Likewise.
1673 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
1674 BV_VCALL_INDEX to handle indirect primary bases.
1675 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
1676 (build_rtti_vtbl_entries): Likewise.
1677 * search.c (get_shared_vbase_if_not_primary): Tweak.
1678 (find_vbase_instance): Likewise.
1679 (binfo_for_vtable): Simplify.
1680 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
1681 (make_binfo): Make it have 11 entries.
1683 2000-07-30 Alex Samuel <samuel@codesourcery.com>
1685 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
1686 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
1687 ascertaining primaryness.
1688 (G): Remove template_args.
1689 (decl_is_template_id): New function.
1690 (write_encoding): Use decl_is_template_id.
1691 (write_name): Likewise. Handle type_decls. Get main variant of
1693 (write_nested_name): Likewise.
1694 (write_prefix): Likewise.
1695 (write_template_prefix): Likewise.
1696 (write_special_name_constructor): Remove defunct production from
1698 (write_bare_function_type): Remove comment about absent parameter.
1699 (write_template_template_arg): Add missing grammar production to
1702 2000-07-27 Jason Merrill <jason@redhat.com>
1704 * decl.c (duplicate_decls): If common_type produces a non-typedef
1705 type for a typedef, just use the old type.
1707 2000-07-27 Mark Mitchell <mark@codesourcery.com>
1709 * cp-tree.h (function_depth): Declare.
1710 (verify_stmt_tree): Likewise.
1711 (find_tree): Likewise.
1712 * decl.c (function_depth): Give it external linkage.
1713 * optimize.c (optimize_function): Increment and decrement it.
1714 * tree.c (verify_stmt_tree_r): New function.
1715 (verify_stmt_tree): Likewise.
1716 (find_tree_r): Likewise.
1717 (find_tree): Likewise.
1719 2000-07-27 Jason Merrill <jason@redhat.com>
1721 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
1723 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
1725 2000-07-26 Mark Mitchell <mark@codesourcery.com>
1727 * decl.c (start_cleanup_fn): Mark the function as `inline'.
1728 * decl2.c (get_guard): Call cp_finish_decl, not
1729 rest_of_decl_compilation, for local guards.
1730 * lex.c (do_identifier): Remove unused variable.
1732 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
1734 * parse.y: Add missing ';'.
1736 2000-07-26 Mark Mitchell <mark@codesourcery.com>
1738 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
1741 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
1743 Kill strict_prototype. Backwards compatibility only for
1744 non NO_IMPLICIT_EXTERN_C systems.
1745 * cp-tree.h (flag_strict_prototype): Remove.
1746 (strict_prototype): Remove.
1747 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
1748 * decl.c (maybe_push_to_top_level): Adjust.
1749 (pop_from_top_level): Adjust.
1750 (decls_match): Only allow sloppy parm matching for ancient
1752 (init_decl_processing): Adjust.
1753 (grokdeclarator): Adjust.
1754 * decl2.c (flag_strict_prototype): Remove.
1755 (strict_prototype): Remove.
1756 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
1757 (lang_f_options): Remove "strict-prototype".
1758 (unsupported-options): Add "strict-prototype".
1759 * lex.c (do_identifier): Adjust.
1760 (do_scoped_id): Adjust.
1761 * parse.y (empty_parms): Adjust.
1762 * class.c (push_lang_context): Adjust.
1763 (pop_lang_context): Adjust.
1764 * typeck.c (comp_target_parms): Adjust.
1766 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
1768 * decl.c (poplevel): Deal with anonymous variables at for scope.
1769 (maybe_inject_for_scope_var): Likewise.
1771 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
1773 * decl.c: Remove all signal handling code, now done in toplev.c.
1775 2000-07-23 Mark Mitchell <mark@codesourcery.com>
1777 * decl.c (make_rtl_for_nonlocal_decl): Rework.
1779 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
1782 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
1784 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
1785 Define my_friendly_assert and my_friendly_abort as macros
1786 which may call friendly_abort. Prototype friendly abort, not
1787 my_friendly_abort or my_friendly_assert.
1788 * decl.c (signal_catch): Report the signal caught in the error
1789 message. Call fatal directly.
1790 * typeck2.c (ack, my_friendly_assert): Delete.
1791 (my_friendly_abort): Rename to friendly_abort. Expect file,
1792 line, and function parameters. Report the abort code, then
1793 call fancy_abort. Do not mask an abort if errors have
1796 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
1798 * typeck.c (comp_target_parms): Remove obsolete parameter.
1799 (comp_target_types): Adjust.
1801 2000-07-17 Jason Merrill <jason@redhat.com>
1803 * typeck.c (mark_addressable): Never set TREE_USED.
1804 * call.c (build_call): Don't abort on calls to library functions
1805 that have been declared normally.
1807 * typeck.c (build_binary_op): Fix grammar in warning.
1809 * exception.cc (__eh_free): Fix prototype.
1811 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
1813 * decl.c (pushdecl): Handle seeing an OVERLOAD in
1814 IDENTIFIER_NAMESPACE_VALUE.
1816 2000-07-16 Mark Mitchell <mark@codesourcery.com>
1818 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
1819 * method.c (use_thunk): Correct handling of vcall offsets.
1821 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
1823 * .cvsignore: parse.h and parse.c have no cp- prefix.
1825 2000-07-13 Mark Mitchell <mark@codesourcery.com>
1827 * .cvsignore: New file.
1829 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
1831 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
1833 2000-07-12 Mark Mitchell <mark@codesourcery.com>
1835 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
1837 * parse.h: Likewise.
1839 2000-07-11 Mark Mitchell <mark@codesourcery.com>
1841 * class.c (layout_class_type): Add pointers to virtual bases after
1842 base classes under the old ABI.
1844 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
1846 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
1847 (finish_continue_stmt): Likewise.
1848 (begin_for_stmt): Remove call to note_level_for_for.
1849 (finish_goto_stmt): Change call from build_min_nt
1851 (finish_expr_stmt): Likewise.
1852 (begin_if_stmt): Likewise.
1853 (begin_while_stmt): Likewise.
1854 (finish_while_stmt): Likewise.
1855 (finish_return_stmt): Likewise.
1856 (begin_for_stmt): Likewise.
1857 (finish_for_stmt): Likewise.
1858 (finish_break_stmt): Likewise.
1859 (begin_switch_stmt): Likewise.
1860 (finish_case_label): Likewise.
1861 (genrtl_try_block): Likewise.
1862 (begin_try_block): Likewise.
1863 (begin_handler): Likewise.
1864 (begin_compound_stmt): Likewise.
1865 (finish_asm_stmt): Likewise.
1866 (finish_label_stmt): Likewise.
1867 (add_decl_stmt): Likewise.
1868 (finish_subobject): Likewise.
1869 (finish_decl_cleanup): Likewise.
1870 (finish_named_return_value): Likewise.
1871 (setup_vtbl_ptr): Likewise.
1872 (add_scope_stmt): Likewise.
1873 * decl.c (finish_constructor_body): Likewise.
1874 (finish_destructor_body): Likewise.
1875 * optimize.c (copy_body_r): Likewise.
1876 (initialize_inlined_parameters): Likewise.
1877 (declare_return_variable): Likewise.
1878 (expand_call_inline): Likewise.
1880 2000-07-10 Jakub Jelinek <jakub@redhat.com>
1882 * semantics.c (expand_body): Sync interface information
1883 at the end of function body expansion.
1885 2000-07-09 Jason Merrill <jason@redhat.com>
1887 * init.c (build_new_1): Bail early if the call to new fails.
1889 * decl.c (compute_array_index_type): Check specifically for
1890 an INTEGER_CST, not just TREE_CONSTANT.
1892 * decl.c (duplicate_decls): Don't call duplicate_decls on
1893 the DECL_TEMPLATE_RESULT.
1894 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
1897 * error.c (dump_template_bindings): Don't crash if we had an
1898 invalid argument list.
1900 * typeck.c (c_expand_start_case): Do narrowing here.
1901 * semantics.c (finish_switch_cond): Not here.
1903 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
1905 * parse.y (asm_clobbers): Do string concatenation.
1907 2000-07-09 Mark Mitchell <mark@codesourcery.com>
1909 * decl.c (pushtag): Don't put local classes in template functions
1910 on the local_classes list.
1912 2000-07-04 Scott Snyder <snyder@fnal.gov>
1914 * decl2.c (get_guard): Add missing return for old ABI local
1917 2000-07-09 Mark Mitchell <mark@codesourcery.com>
1919 * cp-tree.h (char_type_p): New function.
1920 * decl.c (init_decl_processing): Don't initialize
1921 signed_wchar_type_node or unsigned_wchar_type_node.
1922 (complete_array_type): Handle brace-enclosed string-constants.
1923 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
1924 * tree.c (char_type_p): New function.
1925 * typeck2.c (digest_init): Use char_type_p.
1927 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
1929 * pt.c (tsubst): Don't layout type, if it's error_mark.
1931 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
1933 * pt.c (instantiate_pending_templates): Reset template level.
1935 2000-07-05 Jason Merrill <jason@redhat.com>
1937 * call.c (joust): Don't complain about `operator char *()' beating
1938 `operator const char *() const'.
1940 2000-07-04 scott snyder <snyder@fnal.gov>
1941 Jason Merrill <jason@redhat.com>
1943 * repo.c (repo_get_id): Handle the case where a class with virtual
1944 bases has a null TYPE_BINFO_VTABLE.
1946 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
1947 Jason Merrill <jason@redhat.com>
1949 * parse.y (member_init): Just pass in the type.
1950 * init.c (expand_member_init): Handle getting a type.
1952 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
1953 Jason Merrill <jason@redhat.com>
1955 * decl.c (finish_function): Warn if a function has no return
1957 Suggested by Andrew Koenig.
1958 * typeck.c (check_return_expr): Do set current_function_returns_value
1959 if we got an error_mark_node.
1961 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
1963 * decl2.c (push_decl_namespace): Push the original namespace.
1965 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
1967 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
1968 * semantics.c (begin_class_definition): Clear it.
1970 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
1972 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
1973 (genrtl_expr_stmt): Likewise.
1974 (genrtl_decl_stmt): Likewise.
1975 (genrtl_if_stmt): Likewise.
1976 (genrtl_while_stmt): Likewise.
1977 (genrtl_do_stmt): Likewise.
1978 (genrtl_return_stmt): Likewise.
1979 (genrtl_for_stmt): Likewise.
1980 (genrtl_break_stmt): Likewise.
1981 (genrtl_continue_stmt): Likewise.
1982 (genrtl_scope_stmt): Likewise.
1983 (genrtl_switch_stmt): Likewise.
1984 (genrtl_case_label): Likewise.
1985 (genrtl_begin_compound_stmt): Likewise.
1986 (genrtl_finish_compound_stmt): Likewise.
1987 (genrtl_compound_stmt): Likewise.
1988 (genrtl_asm_stmt): Likewise.
1990 * init.c (begin_init_stmts): Remove call to
1991 genrtl_begin_compound_stmt.
1992 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
1994 * semantics.c (lang_expand_stmt): Changed call to
1995 genrtl_compound_stmt to ignore return value.
1997 2000-07-02 Mark Mitchell <mark@codesourcery.com>
1999 * mangle.c (canonicalize_for_substitution): Return the canonical
2002 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
2004 * typeck.c (commonparms): Remove obstack manipulations.
2006 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
2008 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
2010 * Makefile.in (OBJS): Added ../c-semantics.o.
2011 (OBJDEPS): Likewise.
2013 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
2015 (struct stmt_tree): Added comment.
2016 (current_function_name_declared): Removed.
2017 (stmts_are_full_exprs_p): Likewise.
2018 (genrtl_do_pushlevel): Likewise.
2019 (genrtl_clear_out_block): Likewise.
2020 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
2021 (DECL_ANON_UNION_ELEMS): Likewise.
2022 (emit_local_var): Likewise.
2023 (make_rtl_for_local_static): Likewise.
2024 (do_case): Likewise.
2025 (expand_stmt): Likewise.
2026 (genrtl_decl_cleanup): Likewise.
2027 (c_expand_asm_operands): Likewise.
2028 (c_expand_return): Likewise.
2029 (c_expand_start_case): Likewise.
2031 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
2032 (emit_local_var): Likewise.
2033 (initialize_local_var): Change reference to
2034 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
2035 Change reference to stmts_are_full_exprs_p to
2036 current_stmt_tree->stmts_are_full_exprs_p.
2037 (push_cp_function_context): Likewise.
2039 * expect.c (expand_throw): Change reference to
2040 stmts_are_full_exprs_p.
2042 * init.c (build_aggr_init): Change reference to
2043 stmts_are_full_exprs_p.
2044 (build_vec_init): Likewise.
2046 * optimize.c (maybe_clone_body): Change reference to
2047 current_function_name_declared to
2048 cp_function_chain->name_declared.
2050 * pt.c (instantiate_decl): Change reference to
2051 current_function_name_declared to
2052 cp_function_chain->name_declared.
2054 * semantics.c (expand_cond): Moved declaration to c-common.h.
2055 (genrtl_do_pushlevel): Moved to c-semantics.c.
2056 (genrtl_clear_out_block): Likewise.
2057 (genrtl_goto_stmt): Likewise.
2058 (genrtl_expr_stmt): Likewise.
2059 (genrtl_decl_stmt): Likewise.
2060 (gerntl_if_stmt): Likewise.
2061 (genrtl_while_stmt): Likewise.
2062 (genrtl_do_stmt): Likewise.
2063 (genrtl_return_stmt): Likewise.
2064 (genrtl_for_stmt): Likewise.
2065 (genrtl_break_stmt): Likewise.
2066 (genrtl_continue_stmt): Likewise.
2067 (genrtl_scope_stmt): Likewise.
2068 (genrtl_switch_stmt): Likewise.
2069 (genrtl_case_label): Likewise.
2070 (genrtl_begin_compound_stmt): Likewise.
2071 (genrtl_finish_compound_stmt): Likewise.
2072 (genrtl_compound_stmt): Likewise.
2073 (genrtl_asm_stmt): Likewise.
2074 (genrtl_decl_cleanup): Likewise.
2075 (expand_cond): Likewise.
2076 (expand_stmt): Renamed to ...
2077 (lang_expand_stmt): ... this.
2078 (lang_expand_expr_stmt): Initialize.
2079 (set_current_function_name_declared): Likewise.
2080 (stmts_are_full_exprs_p): Likewise.
2081 (current_function_name_declared): Likewise.
2082 (anon_aggr_type_p): Likewise.
2083 (do_poplevel): Change reference to
2084 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
2085 Change reference to stmts_are_full_exprs_p to
2086 current_stmt_tree->stmts_are_full_exprs_p.
2087 (add_tree): Likewise.
2088 (finish_expr_stmt): Likewise.
2089 (prep_stmt): Likewise.
2090 (lang_expand_stmt): Likewise.
2091 (begin_compound_stmt): Change reference to
2092 current_function_name_declared to
2093 cp_function_chain->name_declared and call to
2094 current_function_name_declared().
2095 (setup_vtbl_ptr): Likewise.
2096 (genrtl_do_poplevel): Removed.
2098 2000-06-30 Jason Merrill <jason@redhat.com>
2100 * init.c (init_init_processing): Go back to aligning like
2101 double_type_node for old ABI.
2102 (get_cookie_size): Make cookie larger if we get a type that needs
2104 (build_vec_delete): Call it.
2106 * typeck.c (qualify_type_recursive): New fn.
2107 (composite_pointer_type): Use it.
2108 (build_binary_op): Use composite_pointer_type.
2110 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
2111 Jason Merrill <jason@redhat.com>
2113 * typeck.c (check_return_expr): Don't complain about returning
2114 NULL from operator new if -fcheck-new.
2115 * cp-tree.h: Declare flag_check_new here.
2118 2000-06-28 Alex Samuel <samuel@codesourcery.com>
2120 * mangle.c (find_substitution): Use same_type_p.
2121 (write_encoding): Don't check for substitutions.
2123 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
2125 * parse.y (expr_no_comma_rangle): New non-terminal.
2126 (template_parm): Use it for default parameter case.
2127 (template_arg): Use it.
2128 (expr_no_commas): Remove commented out undefined extensions.
2129 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
2130 * parse.h, parse.c: Rebuilt.
2132 2000-06-30 Mark Mitchell <mark@codesourcery.com>
2134 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
2135 (finish_asm_stmt): Do it here, instead.
2137 * cp-tree.h (ridpointers): Don't declare.
2138 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
2139 (record_builtin_java_type): Likewise.
2140 (init_decl_processing): Likewise.
2141 * lex.c: Move inclusion of lex.h.
2142 (ridpointers): Don't define.
2143 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
2145 * lex.h (enum rid): Rename to ...
2146 (enum cp_rid): ... this.
2147 (ridpointers): Don't declare.
2148 * parse.y: Move inclusion of lex.h.
2149 * parse.c: Regenerated.
2150 * spew.c: Move inclusion of lex.h.
2152 * cp-tree.h (struct language_function): Remove temp_name_counter.
2153 (temp_name_counter): Remove.
2154 (get_temp_name): Change prototype.
2155 (get_guard): New function.
2156 (get_guard_cond): Likewise.
2157 (set_guard): Likewise.
2158 * cvt.c (build_up_reference): Adjust call to get_temp_name.
2159 * decl.c (expand_static_init): Use get_guard and friends to
2160 implement guard variables.
2161 * decl2.c (get_temp_name): Assume that the variables created are
2163 (get_sentry): Rename to ...
2164 (get_guard): ... this. Implement new ABI guard variables.
2165 (get_guard_bits): New function.
2166 (get_guard_cond): Likewise.
2167 (set_guard): Likewise.
2168 (start_static_initialization_or_destruction): Use them.
2169 (do_static_initialization): Replace sentry with guard throughout.
2170 (do_static_destruction): Likewise.
2171 * init.c (create_temporary_var): Add comment.
2173 2000-06-28 Alex Samuel <samuel@codesourcery.com>
2175 * mangle.c (find_substitution): Use same_type_p.
2176 (write_encoding): Don't check for substitutions.
2178 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
2180 * parse.y (expr_no_comma_rangle): New non-terminal.
2181 (template_parm): Use it for default parameter case.
2182 (template_arg): Use it.
2183 (expr_no_commas): Remove commented out undefined extensions.
2184 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
2185 * parse.h, parse.c: Rebuilt.
2187 2000-06-29 Mark Mitchell <mark@codesourcery.com>
2189 * cp-tree.h (flag_const_strings): Remove.
2190 (warn_parentheses): Likewise.
2191 (warn_format): Likewise.
2192 (common_type): Likewise.
2193 (default_conversion): Likewise.
2194 (build_binary_op): Likewise.
2195 (cp_build_binary_op): New macro.
2196 * call.c (build_new_op): Use cp_build_binary_op instead of
2198 * class.c (build_vtable_entry_ref): Likewise.
2199 * decl.c (expand_static_init): Likewise.
2200 (compute_array_index_type): Likewise.
2201 (build_enumerator): Likewise.
2202 * decl2.c (delete_sanity): Likewise.
2203 (start_static_initialization_or_destruction): Likewise.
2204 * error.c (dump_type_suffix): Likewise.
2205 * init.c (resolve_offset_ref): Likewise.
2206 (build_new): Likewise.
2207 (build_new_1): Likewise.
2208 (build_vec_delete_1): Likewise.
2209 (build_vec_init): Likewise.
2210 (build_delete): Likewise.
2211 * rtti.c (synthesize_tinfo_fn): Likewise.
2212 (synthesize_tinfo_var): Likewise.
2213 * search.c (expand_upcast_fixups): Likewise.
2214 (fixup_all_virtual_upcast_offsets): Likewise.
2215 * typeck.c (build_array_ref): Likewise.
2216 (get_member_function_from_ptrfunc): Likewise.
2217 (build_binary_op): Add parameter.
2218 (pointer_int_sum): Use cp_build_binary_op.
2219 (pointer_diff): Likewise.
2220 (build_modify_expr): Likewise.
2221 (get_delta_difference): Likewise.
2222 (build_ptrmemfunc): Likewise.
2224 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
2226 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
2227 * decl.c (create_implicit_typedef): Adjust.
2228 * decl2.c (build_artificial_parm): Adjust.
2229 * method.c (implicitly_declare_fn): Adjust.
2230 * pt.c (push_inline_template_parms_recursive): Adjust.
2231 (process_template_parm): Adjust.
2232 (overloaded_template_name): Adjust.
2233 * semantics.c (finish_template_template_parm): Adjust.
2235 2000-06-28 Mark Mitchell <mark@codesourcery.com>
2237 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
2238 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
2239 where to emit thunks.
2240 (build_vtt): Adjust call to build_vtt_inits.
2241 (build_vtt_inits): Add parameter to indicate whether or not
2242 sub-VTTs for virtual bases should be included. Adjust handling of
2243 construction vtables.
2244 (get_matching_base): New function.
2245 (dfs_build_vtt_inits): Rename to ...
2246 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
2247 construction vtables.
2248 (dfs_fixup_binfo_vtbls): Likewise.
2249 (build_ctor_vtbl_groups): Build construction vtables for virtual
2251 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
2252 to build construction vtbls.
2253 (dfs_accumulate_vtbl_inits): Adjust handling of
2254 construction vtables.
2256 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
2259 2000-06-27 Mark Mitchell <mark@codesourcery.com>
2261 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
2263 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
2265 * search.c (hides): Remove.
2266 (is_subobject_of_p): Add most_derived parameter. Use
2268 (lookup_field_queue_p): Adjust.
2269 (lookup_field_r): Adjust.
2271 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
2273 * decl2.c (handle_class_head): Bash typedefs to the type's main
2276 2000-06-25 Mark Mitchell <mark@codesourcery.com>
2278 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
2279 (begin_global_stmt_expr): ... this.
2280 (genrtl_finish_stmt_expr): Rename to ...
2281 (finish_global_stmt_expr): ... this.
2282 * init.c (begin_init_stmts): Adjust calls.
2283 (finish_init_stmts): Likewise.
2284 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
2285 (begin_global_stmt_expr): ... this.
2286 (genrtl_finish_stmt_expr): Rename to ...
2287 (finish_global_stmt_expr): ... this.
2289 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2291 * search.c (lookup_member): Fix typo in comment.
2293 2000-06-24 Jason Merrill <jason@redhat.com>
2295 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
2296 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
2298 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2300 * parse.y (complex_direct_notype_declarator): Support global_scope.
2301 * Makefile.in: Adjust conflict count.
2303 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
2305 * parse.y (template_arg): Convert TEMPLATE_DECL
2306 that is a template template paramter to
2307 TEMPLATE_TEMPLATE_PARM here.
2309 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
2310 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
2311 (copy_template_template_parm): Adjust prototype.
2312 * decl.c (grokdeclarator): Remove dead code.
2313 * pt.c (process_template_parm): Tidy.
2314 (lookup_template_class): Construct nodes in
2315 copy_template_template_parm.
2316 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
2317 lookup_template_class. Use TYPE_TI_TEMPLATE.
2318 * tree.c (copy_template_template_parm): Add NEWARGS
2320 (mapcar): Adjust call to copy_template_template_parm.
2321 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
2322 * method.c (build_template_template_parm_names): Change error
2323 code to avoid compilation warning.
2325 * gxxint.texi: Document template template parameter
2328 2000-06-21 Alex Samuel <samuel@codesourcery.com>
2330 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
2331 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
2332 (cp-demangle.o): New rule.
2333 (dyn-string.o): Likewise.
2334 * inc/cxxabi.h (__cxa_demangle): New declaration.
2336 2000-06-22 Mark Mitchell <mark@codesourcery.com>
2338 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
2339 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
2340 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
2342 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
2343 (make_thunk): Change prototype.
2344 (emit_thunk): Rename to use_thunk.
2345 (mangle_thunk): Change prototype.
2346 * class.c (get_derived_offset): Simplify.
2347 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
2348 BV_GENERATE_THUNK_WITH_VTABLE_P.
2349 (build_primary_vtable): Simplify.
2350 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
2351 (dfs_find_base): Remove.
2352 (update_vtable_entry_for_fn): Correct bug in finding the base
2353 where a virtual function was first declared. Figure out whether
2354 or not to emit a vcall-thunk with the vtables in which it appears.
2355 Correct logic for deciding whether to use an ordinary thunk, or a
2357 (finish_struct_1): Remove unnecssary code.
2358 (build_vtbl_initializer): Use ssize_int for the running counter of
2360 (build_vtbl_initializer): Only use vcall thunks where necessary.
2361 Mark thunks as needing to be emitted with their vtables, or not.
2362 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
2363 indices. Use size_binop.
2364 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
2365 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
2367 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
2368 (build_vtable_entry): Mark thunks as needing to be emitted with
2369 their vtables, or not.
2370 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
2371 * decl2.c (mark_vtable_entries): Use use_thunk instead of
2373 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
2375 * error.c (dump_expr): Use BV_FN.
2376 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
2378 * method.c (make_thunk): Likewise.
2379 (emit_thunk): Rename to use_thunk. Allow callers to decide
2380 whether or not to actually emit the thunk. Adjust for changes in
2381 representation of vcall offsets.
2382 * search.c (dfs_get_pure_virtuals): Use BV_FN.
2383 * semantics.c (emit_associated_thunks): New function.
2384 (expand_body): Use it.
2385 * ir.texi: Adjust decriptions of thunks.
2387 2000-06-22 Jason Merrill <jason@redhat.com>
2389 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
2390 (tsubst_friend_function): Copy it here.
2392 * decl.c (grok_op_properties): Fix typo.
2394 * decl2.c (delete_sanity): Clarify warning, avoid failure on
2397 * pt.c (check_explicit_specialization): Clarify error.
2399 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
2400 an old OVERLOAD when we're declaring a non-function.
2401 (pushdecl, destroy_local_var): Check for error_mark_node.
2402 (warn_extern_redeclared_static): Also bail early if
2404 (push_overloaded_decl): Ignore an old error_mark_node.
2406 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
2408 * call.c (build_x_va_arg): Check if in a template decl.
2409 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
2411 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
2413 * class.c (push_lang_context): TYPE_NAME gets you to the Java
2415 * decl.c (check_goto): Computed gotos assumed OK.
2417 2000-06-20 Jason Merrill <jason@redhat.com>
2419 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
2420 for which we don't need to look for instantiations.
2422 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
2424 * parse.y (program): Always call finish_translation_unit.
2425 * parse.c, parse.h: Rebuilt.
2427 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
2429 * method.c: Don't include hard-reg-set.h.
2431 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
2433 * rtti.c (get_base_offset): Cope when vbase field is in a base.
2435 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
2437 * call.c (build_conditional_expr): Use VOID_TYPE_P.
2438 * cvt.c (cp_convert_to_pointer): Likewise.
2439 (convert_to_void): Likewise.
2440 * error.c (dump_expr): Likewise.
2441 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
2442 * init.c (build_delete): Likewise.
2443 * method.c (emit_thunk): Likewise.
2444 * optmize.c (declare_return_variable): Likewise.
2445 * rtti.c (get_tinfo_decl_dynamic): Likewise.
2446 (get_typeid): Likewise.
2447 (build_dynamic_cast_1): Likewise.
2448 * typeck.c (composite_pointer_type): Likewise.
2449 (common_type): Likewise.
2450 (build_indirect_ref): Likewise.
2451 (build_binary_op): Likewise.
2452 (build_x_compound_expr): Likewise.
2453 (check_return_expr): Likewise.
2454 * typeck2.c (add_exception_specifier): Likewise.
2456 * mangle.c (write_method_parms): Use direct comparison for end
2459 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
2461 * cp-tree.h (genrtl_try_block): Declare function.
2462 (genrtl_handler): Likewise.
2463 (genrtl_catch_block): Likewise.
2464 (genrtl_ctor_stmt): Likewise.
2465 (genrtl_subobject): Likewise.
2466 (genrtl_decl_cleanup): Likewise.
2467 (genrtl_do_poplevel): Likewise.
2468 (genrtl_do_pushlevel): Likewise.
2469 (genrtl_clear_out_block): Likewise.
2470 (genrtl_goto_stmt): Likewise.
2471 (genrtl_expr_stmt): Likewise.
2472 (genrtl_decl_stmt): Likewise.
2473 (genrtl_if_stmt): Likewise.
2474 (genrtl_while_stmt): Likewise.
2475 (genrtl_do_stmt): Likewise.
2476 (genrtl_return_stmt): Likewise.
2477 (genrtl_for_stmt): Likewise.
2478 (genrtl_break_stmt): Likewise.
2479 (genrtl_continue_stmt): Likewise.
2480 (genrtl_scope_stmt): Likewise.
2481 (genrtl_switch_stmt): Likewise.
2482 (genrtl_case_label): Likewise.
2483 (genrtl_begin_compound_stmt): Likewise.
2484 (genrtl_finish_compound_stmt): Likewise.
2485 (genrtl_compound_stmt): Likewise.
2486 (genrtl_asm_stmt): Likewise.
2487 (genrtl_named_return_value): Likewise.
2488 (genrtl_begin_stmt_expr): Likewise.
2489 (genrtl_finish_stmt_expr): Likewise.
2490 (finish_for_stmt): Removed first argument.
2491 (finish_switch_stmt): Likewise.
2493 * semantics.c (genrtl_try_block): Define function.
2494 (genrtl_handler): Likewise.
2495 (genrtl_catch_block): Likewise.
2496 (genrtl_ctor_stmt): Likewise.
2497 (genrtl_subobject): Likewise.
2498 (genrtl_decl_cleanup): Likewise.
2499 (genrtl_do_poplevel): Likewise.
2500 (genrtl_do_pushlevel): Likewise.
2501 (genrtl_clear_out_block): Likewise.
2502 (genrtl_goto_stmt): Likewise.
2503 (genrtl_expr_stmt): Likewise.
2504 (genrtl_decl_stmt): Likewise.
2505 (genrtl_if_stmt): Likewise.
2506 (genrtl_while_stmt): Likewise.
2507 (genrtl_do_stmt): Likewise.
2508 (genrtl_return_stmt): Likewise.
2509 (genrtl_for_stmt): Likewise.
2510 (genrtl_break_stmt): Likewise.
2511 (genrtl_continue_stmt): Likewise.
2512 (genrtl_scope_stmt): Likewise.
2513 (genrtl_switch_stmt): Likewise.
2514 (genrtl_case_label): Likewise.
2515 (genrtl_begin_compound_stmt): Likewise.
2516 (genrtl_finish_compound_stmt): Likewise.
2517 (genrtl_compound_stmt): Likewise.
2518 (genrtl_asm_stmt): Likewise.
2519 (genrtl_named_return_value): Likewise.
2520 (genrtl_begin_stmt_expr): Likewise.
2521 (genrtl_finish_stmt_expr): Likewise.
2522 (finish_for_stmt): Removed first argument and generate rtl
2524 (finish_switch_stmt): Likewise.
2525 (do_poplevel): Removed generate rtl specific code.
2526 (do_pushlevel): Likewise.
2527 (add_tree): Likewise.
2528 (finish_goto_stmt): Likewise.
2529 (finish_expr_stmt): Likewise.
2530 (begin_if_stmt): Likewise.
2531 (finish_if_stmt_cond): Likewise.
2532 (finish_then_clause): Likewise.
2533 (begin_else_clause): Likewise.
2534 (finish_else_clause): Likewise.
2535 (finish_if_stmt): Likewise.
2536 (clear_out_block): Likewise.
2537 (begin_while_stmt): Likewise.
2538 (finish_while_stmt_cond): Likewise.
2539 (finish_while_stmt): Likewise.
2540 (begin_do_stmt): Likewise.
2541 (finish_do_body): Likewise.
2542 (finish_do_stmt): Likewise.
2543 (finish_return_stmt): Likewise.
2544 (begin_for_stmt): Likewise.
2545 (finish_for_init_stmt): Likewise.
2546 (finish_for_cond): Likewise.
2547 (finish_for_expr): Likewise.
2548 (finish_break_stmt): Likewise.
2549 (finish_continue_stmt): Likewise.
2550 (begin_switch_stmt): Likewise.
2551 (finish_switch_cond): Likewise.
2552 (finish_case_label): Likewise.
2553 (begin_try_block): Likewise.
2554 (begin_function_try_block): Likewise.
2555 (finish_try_block): Likewise.
2556 (finish_cleanup_try_block): Likewise.
2557 (finish_cleanup): Likewise.
2558 (finish_function_try_block): Likewise.
2559 (finish_handler_sequence): Likewise.
2560 (finish_function_handler_sequence): Likewise.
2561 (begin_handler): Likewise.
2562 (finish_handler_parms): Likewise.
2563 (begin_catch_block): Likewise.
2564 (finish_handler): Likewise.
2565 (begin_compound_stmt): Likewise.
2566 (finish_compound_stmt): Likewise.
2567 (finish_asm_stmt): Likewise.
2568 (finish_label_stmt): Likewise.
2569 (finish_label_decl): Likewise.
2570 (finish_subobject): Likewise.
2571 (finish_decl_cleanup): Likewise.
2572 (finish_named_return_value): Likewise.
2573 (begin_stmt_expr): Likewise.
2574 (finish_stmt_expr): Likewise.
2576 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
2577 to call genrtl_expr_stmt when appropriate.
2579 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
2580 begin_compound_expr to call genrtl_begin_stmt_expr and
2581 genrtl_begin_compound_expr when appropriate.
2582 (finish_init_stmts): Changed calls to finish_compound_expr and
2583 finish_stmt_expr to call genrtl_finish_compound_expr and
2584 genrtl_finish_stmt_expr when appropriate.
2585 (expand_default_init): Changed call to finish_expr_stmt to call
2586 genrtl_expr_stmt when appropriate.
2587 (build_vec_init): Likewise.
2589 * parse.y (simple_stmt): Removed first argument from call to
2590 finish_for_stmt. Removed first argument from call to
2593 * parse.c: Regenerated.
2595 * pt.c (tsubst_expr): Removed first argument from call to
2596 finish_for_stmt. Removed first argument from call to
2599 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
2601 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
2602 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
2604 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
2605 (cplus_tree_code_length[]): Likewise.
2606 (cplus_tree_code_name[]): Likewise.
2607 (init_parse): Added call to add_c_tree_codes. Changed
2608 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
2610 2000-06-16 Mark Mitchell <mark@codesourcery.com>
2612 * cp-tree.h (finish_mem_initializers): Declare.
2613 (count_trees): Likewise.
2614 * parse.y (base_init): Use finish_mem_initializers.
2615 * semantics.c (finish_mem_initializers): New function.
2617 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
2618 the number of trees.
2620 (count_trees): Don't use it.
2622 2000-06-15 Jason Merrill <jason@redhat.com>
2624 * tree.c (count_trees): New debugging function.
2626 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
2627 * init.c (build_member_call): Pull out the name of a DECL.
2629 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
2630 * semantics.c (expand_body): Push to TV_INTEGRATION here.
2631 * optimize.c (optimize_function): Not here.
2632 * pt.c (instantiate_decl): Push to TV_PARSE.
2634 2000-06-15 Mark Mitchell <mark@codesourcery.com>
2636 * cp-tree.h (struct language_function): Remove x_base_init_list
2637 and x_member_init_list.
2638 (current_base_init_list): Remove.
2639 (current_member_init_list): Likewise.
2640 (setup_vtbl_ptr): Change prototype.
2641 (emit_base_init): Likewise.
2642 (expand_member_init): Likewise.
2643 (reinit_parse_for_function): Remove.
2644 * decl.c (save_function_data): Don't clear x_base_init_list and
2646 (mark_language_function): Don't mark them.
2647 * init.c (perform_member_init): Tweak comment.
2648 (sort_member_init): Take the list of initializers as an argument.
2649 (sort_base_init): Likewise.
2650 (emit_base_init): Likewise.
2651 (expand_member_init): Return the initializer. Don't use global
2653 * lex.c (reinit_parse_for_function): Remove.
2654 * method.c (build_template_parm_names): Correct substitution.
2655 (do_build_copy_constructor): Don't use current_member_init_list
2656 and current_base_init_list.
2657 (synthesize_method): Likewise.
2658 * parse.y (base_init): Split mem-initializers into
2659 base-initializers and field-initializers.
2660 (member_init_list): Build up the list here.
2661 (member_init): Return the initializer.
2662 (fn.depfn): Don't use reinit_parse_for_function.
2663 * parse.c: Regenerated.
2664 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
2666 (tsubst_expr): Don't use current_member_init_list
2667 and current_base_init_list.
2668 (tsubst_expr_values): Rename to ...
2669 (tsubst_initializer_list): ... this. Use convert_from_reference.
2670 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
2671 and current_base_init_list.
2672 (begin_function_definition): Don't call reinit_parse_for_function.
2674 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
2676 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
2679 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
2681 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
2683 * cp-tree.h (IF_COND): Move to c-common.h.
2684 (THEN_CLAUSE): Likewise.
2685 (ELSE_CLAUSE): Likewise.
2686 (WHILE_COND): Likewise.
2687 (WHILE_BODY): Likewise.
2688 (DO_COND): Likewise.
2689 (DO_BODY): Likewise.
2690 (RETURN_EXPR): Likewise.
2691 (EXPR_STMT_EXPR): Likewise.
2692 (FOR_INIT_STMT): Likewise.
2693 (FOR_COND): Likewise.
2694 (FOR_EXPR): Likewise.
2695 (FOR_BODY): Likewise.
2696 (SWITCH_COND): Likewise.
2697 (SWITCH_BODY): Likewise.
2698 (CASE_LOW): Likewise.
2699 (CASE_HIGH): Likewise.
2700 (GOTO_DESTINATION): Likewise.
2701 (COMPOUND_BODY): Likewise.
2702 (ASM_CV_QUAL): Likewise.
2703 (ASM_STRING): Likewise.
2704 (ASM_OUTPUTS): Likewise.
2705 (ASM_INPUTS): Likewise.
2706 (ASM_CLOBBERS): Likewise.
2707 (DECL_STMT_DECL): Likewise.
2708 (STMT_EXPR_STMT): Likewise.
2709 (LABEL_STMT_LABEL): Likewise.
2710 (SCOPE_BEGIN_P): Likewise.
2711 (SCOPE_END_P): Likewise.
2712 (SCOPE_STMT_BLOCK): Likewise.
2713 (SCOPE_NULLIFIED_P): Likewise.
2714 (SCOPE_NO_CLEANUPS_P): Likewise.
2715 (SCOPE_PARTIAL_P): Likewise.
2716 (ASM_VOLATILE_P): Likewise.
2717 (STMT_LINENO): Likewise.
2718 (STMT_LINENO_FOR_FN_P): Likewise.
2720 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
2721 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
2722 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
2723 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
2724 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
2726 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
2728 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
2729 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
2731 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
2732 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
2733 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
2735 2000-06-14 Mark Mitchell <mark@codesourcery.com>
2737 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
2738 * class.c (dfs_find_final_overrider): Set it appropriately.
2739 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
2740 avoid unneeded secondary vptrs.
2742 2000-06-13 Jakub Jelinek <jakub@redhat.com>
2744 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
2745 (check_bitfield_decl, check_field_decl): Likewise.
2746 (build_vtbl_or_vbase_field, build_base_field): Likewise.
2747 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
2748 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
2749 (xfer_tag, finish_enum): Likewise.
2750 * decl2.c (finish_builtin_type): Likewise.
2751 * init.c (init_init_processing): Likewise.
2752 * pt.c (instantiate_class_template): Likewise.
2753 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
2754 * cp-tree.h (struct lang_type): Add user_align member.
2755 (CLASSTYPE_USER_ALIGN): Define.
2757 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
2759 * Make-lang.in (c++.install-common): Install g++-cross in
2760 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
2761 $(target_alias)-g++ and $(target_alias)-c++.
2763 2000-06-12 Mark Mitchell <mark@codesourcery.com>
2765 * class.c (vcall_offset_data_s): Add last_init and fns.
2766 (overrides): Rename to same_signature_p.
2767 (dfs_find_final_overrider): Adjust accordingly.
2768 (mark_overriders): Likewise.
2769 (warn_hidden): Likewise.
2770 (build_vtbl_initializer): Reorganize machinery for building things
2771 at negative offsets.
2772 (build_vcall_and_vbase_vtbl_entries): Likewise.
2773 (build_vbase_offset_vtbl_entries): Likewise.
2774 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
2775 offset entries. Do not create two entries for functions with the
2777 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
2778 (build_rtti_vtbl_entries): Reorganize machinery for building things
2779 at negative offsets.
2781 * optimize.c (expand_call_inline): Don't recurse into the code
2782 used to initialize the parameters more than once.
2784 2000-06-11 Mark Mitchell <mark@codesourcery.com>
2786 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
2787 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
2788 (find_substitution): Only use the `Sa' substitution for
2789 std::allocator, not instantiations of it.
2790 (write_template_prefix): Move comment. Only use a TREE_LIST to
2791 represent substitutions for a member template.
2792 (write_array_type): Mangle array dimensions correctly.
2793 * optimize.c (maybe_clone_body): Copy more information from the
2795 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
2796 on the regenerated declaration.
2798 2000-06-11 Chip Salzenberg <chip@valinux.com>
2799 Mark Mitchell <mark@codesourcery.com>
2801 * class.c (build_vtable): Clarify comment.
2802 (build_ctor_vtbl_group): Pass the most derived type to
2805 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
2807 * decl2.c (compare_options): Don't needlessly cast away const-ness.
2809 2000-06-10 Mark Mitchell <mark@codesourcery.com>
2811 * decl.c (add_binding): Handle duplicate declarations of external
2814 2000-06-09 Chip Salzenberg <chip@valinux.com>
2815 Mark Mitchell <mark@codesourcery.com>
2817 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
2819 (write_signed_number): New macro.
2820 (write_unsigned_number): Likewise.
2821 (write_source_name): Use them.
2822 (write_number): Handle signed and unsigned values.
2823 (write_integer_cst): Use tree_int_cst_sgn, and use
2824 write_unsigned_number or write_signed_number as appropriate.
2825 (write_discriminator): Use write_unsigned_number or
2826 write_signed_number as appropriate.
2827 (write_template_arg_literal): Likewise.
2828 (write_array_type): Use tree_low_cst.
2829 (write_template_parm): Use write_unsigned_number or
2830 write_signed_number as appropriate.
2831 (write_substitution): Adjust call to write_number.
2832 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
2833 (write_expression): Handle non-type template arguments of
2834 reference type correctly.
2835 (mangle_thunk): Use write_signed_number.
2837 2000-06-09 Chip Salzenberg <chip@valinux.com>
2839 * mangle.c (find_substition): Don't mangle objects with typename
2840 substitutions (e.g. "cin" as "Si").
2842 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
2844 * call.c (add_candidate): Use ggc_alloc_cleared.
2845 * decl.c (lookup_label): Likewise.
2846 * lex.c (retrofit_lang_decl): Likewise.
2848 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
2850 * semantics.c (expand_body): Push to TV_EXPAND.
2851 * optimize.c (optimize_function): Push to TV_INTEGRATION.
2852 * decl.c (start_function): Always call announce_function.
2854 * tinfo2.cc: Just declare abort.
2856 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
2858 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
2859 whenever @ is a symbolic name.
2861 2000-06-08 Jakub Jelinek <jakub@redhat.com>
2863 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
2865 2000-06-07 Mark Mitchell <mark@codesourcery.com>
2867 * decl.c (pushdecl): Look up functions by DECL_NAME, not
2868 DECL_ASSEMBLER_NAME.
2870 2000-06-06 Mark Mitchell <mark@codesourcery.com>
2872 * decl2.c (c_language): Define.
2874 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
2876 * lex.c (lang_init_options): Tweak.
2878 * decl2.c: Remove #inclusion of diagnostic.h
2879 (lang_decode_option): Move diagnostic formatting options to
2882 * lang-options.h: Remove documentation for diagnostic options.
2884 * Makefile.in (lex.o): Depends upon diagnostic.h
2886 2000-06-06 Mark Mitchell <mark@codesourcery.com>
2888 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
2889 the same DECL_RESULT, it's not a redefinition.
2890 * pt.c (tsubst_decl): Remove code to handle illegal
2893 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
2895 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
2897 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
2899 * search.c (maybe_suppress_debug_info): Don't check
2900 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
2902 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
2905 Remember instantiation context in deferred instantiations.
2906 * cp-tree.h (struct tinst_level): Remove.
2907 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
2908 * pt.c (current_tinst_level): Now a tree.
2909 (print_template_context, push_tinst_level, pop_tinst_level,
2910 tinst_for_decl): Adjust.
2911 (reopen_tinst_level): New fn.
2912 (init_pt): Register current_tinst_level as a root.
2913 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
2914 of the pending templates list.
2915 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
2916 * lex.c (extract_interface_info): Adjust.
2917 * decl2.c (warn_if_unknown_interface): Adjust.
2919 2000-06-05 Mark Mitchell <mark@codesourcery.com>
2921 * class.c (indirect_primary_base_p): New function.
2922 (determine_primary_base): Use it.
2924 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
2926 Update new-abi dynamic cast algorithm.
2927 * tinfo.cc (__class_type_info::__dyncast_result): Add
2928 whole_details. Adjust constructor.
2929 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
2930 Avoid unnecessary searching.
2931 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
2933 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
2935 * decl.c (init_decl_processing): Don't call record_component_aliases.
2936 * tree.c (build_cplus_array_type_1): Likewise.
2938 2000-06-04 Mark Mitchell <mark@codesourcery.com>
2940 * ir.texi: Correct typo.
2941 * mangle.c (write_expression): Handle non-type template arguments
2942 with reference type.
2943 * method.c (build_overload_value): Likewise.
2944 * pt.c (convert_nontype_argument): Explicitly represent conversion
2945 to a reference with an ADDR_EXPR.
2946 (unify): Always unify arguments in left-to-right order.
2948 2000-06-03 Alex Samuel <samuel@codesourcery.com>
2949 Mark Mitchell <mark@codesourcery.com>
2951 * Make-lang.in (CXX_SRCS): Add mangle.c.
2952 * Makefile.in (CXX_OBJS): Add mangle.o.
2953 (mangle.o): New rule.
2955 * class.c (local_classes): New variable.
2956 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
2957 (get_vtt_name): Use mangle_vtt_name for new ABI.
2958 (init_class_processing): Initialize local_classes.
2959 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
2960 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
2961 (std_identifier): New macro.
2962 (DECL_VOLATILE_MEMFUNC_P): New macro.
2963 (DECL_NAMESPACE_STD_P): Likewise.
2964 (local_classes): Declare.
2965 (get_mostly_instantiated_function_type): Declare.
2966 (init_mangle): Declare.
2967 (mangle_decl): Likewise.
2968 (mangle_type_string): Likewise.
2969 (mangle_type): Likewise.
2970 (mangle_typeinfo_for_type): Likewise.
2971 (mangle_typeinfo_string_for_type): Likewise.
2972 (mangle_vtbl_for_type): Likewise.
2973 (mangle_vtt_for_type): Likewise.
2974 (mangle_ctor_vtbl_for_type): Likewise.
2975 (mangle_thunk): Likewise.
2976 (mangle_conv_op_name_for_type): Likewise.
2977 (mangle_guard_variable): Likewise.
2978 * decl.c (pushtag): Keep track of local classes.
2979 (initialize_predefined_identifiers): Initialize std_identifier.
2980 (init_decl_processing): Use std_identifier.
2981 (start_decl): Don't treat instantiations as specializations.
2982 (grokdeclarator): Likewise.
2983 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
2984 name for fully-instantiated templates.
2985 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
2986 destructors with the new ABI.
2987 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
2988 (grokfield): Use mangle_type for new ABI.
2989 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
2990 (get_sentry): Use mangle_guard_variable for new ABI.
2991 (start_static_initialization_or_destruction): Likewise.
2992 * expr.c (extract_aggr_init): Remove.
2993 (extract_scalar_init): Likewise.
2994 (extract_init): Remove #if 0'd code.
2995 * mangle.c: New function.
2996 * method.c (build_mangled_name): Assert not flag_new_abi.
2997 (build_static_name): Likewise.
2998 (build_decl_overload_real): Likewise.
2999 (build_typename_overload): Likewise.
3000 (build_overload_with_type): Likewise.
3001 (build_overload_name): Likewise.
3002 (get_ctor_vtbl_name): Likewise.
3003 (start_squangling): Likewise.
3004 (get_id_2): Likewise.
3005 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
3006 (init_method): Call init_mangle for new ABI.
3007 (make_thunk): Call mangle_thunk for new ABI.
3008 * operators.def: Correct new ABI manglings for the `%' operator.
3010 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
3011 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
3012 (lookup_template_class): Call mangle_decl for new ABI.
3013 (get_mostly_instantiated_function_type): New function.
3014 (set_mangled_name_for_template_decl): Use it.
3015 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
3016 the new ABI. Use mangle_conv_op_name_for_type for instantiated
3017 conversion op names.
3018 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
3019 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
3020 (tinfo_base_init): Likewise. Mangle typeinfo string name with
3021 mangle_typeinfo_string_for_type.
3023 2000-06-03 Mark Mitchell <mark@codesourcery.com>
3025 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
3026 (INNERMOST_TEMPLATE_ARGS): New macro.
3027 (innermost_args): Remove.
3028 (get_innermost_template_args): New function.
3029 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
3030 * error.c (dump_function_decl): Be caution when using
3031 most_general_template.
3032 * method.c (build_template_parm_names): Use
3033 INNERMOST_TEMPLATE_ARGS.
3034 * pt.c (add_to_template_args): Tidy comment
3035 (get_innermost_template_args): New function.
3036 (check_explicit_specialization): Clear DECL_INITIAL for a new
3038 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
3040 (push_template_decl): Always register specializations of the most
3042 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
3043 (coerce_template_parms): Likewise.
3044 (lookup_template_class): Likewise.
3045 (innermost_args): Remove.
3046 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
3047 (tsubst_decl): Handle tricky specializations. Use
3048 get_innermost_template_args.
3049 (instantiate_template): Simplify handling of partial
3051 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
3052 (most_general_template): Reimplement, in a more straightforward
3054 (regenerate_decl_from_template): Tweak formatting. Use
3055 TMPL_ARGS_DEPTH for clarity.
3056 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
3058 * dump.c (dequeue_and_dump): Dump information about thunks.
3060 2000-06-01 Richard Henderson <rth@cygnus.com>
3062 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
3064 2000-06-01 Richard Henderson <rth@cygnus.com>
3066 * decl2.c (unsupported_options): Fix typo, make const.
3067 (lang_decode_option): Fix bsearch argument order.
3069 2000-06-01 Mark Mitchell <mark@codesourcery.com>
3071 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
3074 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3076 * cp-tree.h (c_get_alias_set): Deleted.
3077 * Makefile.in (decl.o): Include ../expr.h.
3078 * decl.c (expr.h): Include.
3079 (init_decl_processing): Call record_component_aliases for arrays.
3080 (grokdeclarator): Likewise.
3081 Set TREE_ADDRESSABLE for fields that aren't bitfields.
3082 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
3084 2000-05-31 Mark Mitchell <mark@codesourcery.com>
3086 Remove guiding declaration support.
3087 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
3088 (flag_guiding_decls): Remove.
3089 * call.c (build_user_type_conversion_1): Remove support for
3091 (build_new_function_call): Likewise.
3092 (build_new_op): Likewise.
3093 (build_new_method_call): Likewise.
3094 * decl.c (start_function): Likewise.
3095 * friend.c (is_friend): Likewise.
3096 (do_friend): Likewise.
3097 * decl2.c ((flag_dump_translation_unit): Make it const.
3098 (flag_guiding_decls): Remove.
3099 (unsupported_options): New variable
3100 (compare_options): New function.
3101 (lang_decode_option): Use them.
3103 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
3105 * method.c (mangle_expression): Adjust test for legal expression
3108 * pt.c (instantiate_decl): Save and restore the local
3109 specializations list.
3111 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
3113 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
3115 2000-05-30 Mark Mitchell <mark@codesourcery.com>
3117 * call.c (add_template_candidate_real): Handle member template
3118 constructors for classes with virtual bases.
3119 (build_user_type_conversion_1): Use in_charge_arg_for_name.
3120 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
3122 * ir.texi: Update thunk documentation.
3124 * call.c (joust): Fix handling of overloaded builtin operators.
3126 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
3128 * cp-tree.h (DECL_ANTICIPATED): New macro.
3129 Document new use of DECL_LANG_FLAG_7.
3130 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
3131 in the user namespace.
3132 * lex.c (do_identifier): If the identifier's declaration has
3133 DECL_ANTICIPATED on, it has not yet been declared. But do not
3134 replace it with an ordinary implicit declaration.
3136 * tinfo2.cc: Include stdlib.h.
3138 2000-05-29 Mark Mitchell <mark@codesourcery.com>
3140 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
3141 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
3144 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
3146 * decl2.c (lang_decode_option): Use skip_leading_substring instead
3149 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
3151 * operators.def (<?): Duplicated, should have been...
3154 2000-05-27 Alex Samuel <samuel@codesourcery.com>
3155 Mark Mitchell <mark@codesourcery.com>
3157 * cp-tree.h (ansi_opname): Make it a macro.
3158 (ansi_assopname): Likewise.
3159 (struct lang_decl_flags): Add assignment_operator_p.
3160 (struct lang_decl): Add operator_code.
3161 (DECL_VTT_PARM): Adjust.
3162 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
3163 overloaded operator.
3164 (SET_OVERLOADED_OPERATOR_CODE): New macro.
3165 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
3166 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
3167 (opname_tab): Remove.
3168 (assignop_tab): Likewise.
3169 (operator_name_info_t): New type.
3170 (operator_name_info): New variable.
3171 (assignment_operator_name_info): Likewise.
3172 (build_cp_library_fn): Remove declaration.
3173 (push_cp_library_fn): Likewise.
3174 (operator_name_string): Likewise.
3175 (build_decl_overload): Likewise.
3176 * call.c (print_z_candidates): Simplify.
3177 (build_object_call): Adjust usage of ansi_opname. Use
3178 DECL_OVERLOADED_OPERATOR_P.
3179 (op_error): Adjust operator name lookup.
3180 (build_conditional_expr): Adjust usage of ansi_opname.
3181 (build_new_op): Likewise.
3182 (build_op_delete_call): Likewise.
3183 (build_over_call): Likewise.
3184 (joust): Use DECL_OVERLOADED_OPERATOR_P.
3185 * decl.c (duplicate_decls): Copy operator_code.
3186 (init_decl_processing): Adjust parameters to push_cp_library_fn.
3187 (builtin_function): Adjust parameters to build_library_fn_1.
3188 (build_library_fn_1): Accept an overloaded operator code.
3189 (build_library_fn): Pass ERROR_MARK.
3190 (build_cp_library_fn): Accept an overloaded operator code.
3191 (push_cp_library_fn): Likewise.
3192 (grokfndecl): Tweak.
3193 (grokdeclarator): Simplify code to compute names of overloaded
3194 operators. Adjust use of ansi_opname.
3195 (ambi_op_p): Work on tree_codes, not identifiers.
3196 (unary_op_p): Likewise.
3197 (grok_op_properties): Likewise.
3198 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
3199 (lang_mark_tree): Don't try to mark the operator_code.
3200 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
3201 * error.c (dump_decl): Remove special handling for operator
3203 (dump_function_name): Likewise.
3204 (dump_expr): Adjust name lookup of operators.
3205 (op_to_string): Simplify.
3206 (assop_to_string): Likewise.
3207 * init.c (build_new_1): Adjust use of ansi_opname.
3208 * lex.c (opname_tab): Remove.
3209 (assignop_tab): Likewise.
3210 (ansi_opname): Likewise.
3211 (ansi_assopname): Likewise.
3212 (operator_name_string): Likewise.
3213 (reinit_lang_specific): Likewise.
3214 (operator_name_info): New variable.
3215 (assignment_operator_name_info): Likewise.
3216 (init_operators): New function.
3217 (init_parse): Use it.
3218 (do_identifier): Adjust use of ansi_opname.
3219 * method.c (mangle_expression): Don't use ansi_opname for
3221 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
3222 (build_decl_overload): Remove.
3223 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
3224 (do_build_assign_ref): Adjust use of ansi_opname.
3225 (synthesize_method): Likewise.
3226 (implicitly_declare_fn): Likewise.
3227 * operators.def: New file.
3228 * parse.y (operator): Adjust use of ansi_opname.
3229 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
3230 (set_mangled_name_for_template_decl): Don't play games with
3232 (special_function_p): Adjust use of ansi_opname.
3233 * typeck.c (check_return_expr): Likewise.
3234 * Make-lang.in (cc1plus): Depend on operators.def.
3235 * Makefile.in (lex.o): Likewise.
3238 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
3240 * Make-lang.in (cplib2.ready): Eradicate.
3242 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3244 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
3245 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
3246 (built_min, cp_tree_equal): Likewise.
3248 2000-05-26 Mark Mitchell <mark@codesourcery.com>
3250 * class.c (layout_nonempty_base_or_field): Replace
3251 `record_layout_info' with `record_layout_info_s'.
3253 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
3256 * cp-tree.h (struct language_function): x_named_labels is now
3257 a struct named_label_list*.
3258 * decl.c (struct named_label_use_list): Renamed from...
3259 (struct named_label_list): ...this. New struct.
3260 (push_binding_level): Don't set eh_region.
3261 (note_level_for_eh): New fn.
3262 (pop_label): Take label and old value directly.
3263 (pop_labels): Adjust for new named_labels format.
3264 (lookup_label): Likewise.
3265 (poplevel): Note characteristics of a binding level containing a
3266 named label. Mess with named label lists earlier.
3267 (mark_named_label_lists): New fn.
3268 (mark_lang_function): Call it.
3269 (use_label): New fn, split out from...
3270 (make_label_decl): ...here. Don't call it.
3271 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
3272 check_previous_gotos): New fns, split out from...
3273 (define_label): ...here.
3274 (check_switch_goto): New fn.
3275 (define_case_label): Call it.
3276 (check_goto): New fn.
3277 * semantics.c (finish_goto_stmt): Call it and use_label.
3278 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
3279 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
3281 2000-05-26 Mark Mitchell <mark@codesourcery.com>
3283 * class.c (build_vtable_entry_ref): Correct usage of
3284 get_vtbl_decl_for_binfo.
3286 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
3287 * method.c (implicitly_declare_fn): Not here.
3289 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
3291 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
3292 (CPTI_PTMD_DESC_TYPE): ... here.
3293 (ptmd_desc_type_node): Rename to ...
3294 (ptm_desc_type_node): ... here.
3296 * rtti.c (ptmd_initializer): Rename to ...
3297 (ptm_initializer): ... here.
3298 (sythesize_tinfo_var): Adjust. Deal with pointer to member
3300 (create_tinfo_types): Adjust.
3302 2000-05-25 Mark Mitchell <mark@codesourcery.com>
3304 Finish implementation of VTTs.
3305 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
3306 CPTI_VTT_PARM_IDENTIFIER.
3307 (vtt_parm_identifier): New macro.
3308 (vtt_parm_type): Likewise.
3309 (BINFO_SUBVTT_INDEX): Likewise.
3310 (BINFO_VPTR_INDEX): Likewise.
3311 (struct lang_decl): Add vtt_parm.
3312 (DECL_VTT_PARM): New macro.
3313 (DECL_USE_VTT_PARM): Likewise.
3314 (DECL_NEEDS_VTT_PARM_P): Likewise.
3315 (get_vtt_name): Declare.
3316 (build_artifical_parm): Likewise.
3317 (fixup_all_virtual_upcast_offsets): Likewise.
3318 (expand_indirect_vtbls_init): Remove.
3319 * call.c (build_new_method_call): Pass the vtt to subobject
3320 constructors and destructors.
3321 * class.c (get_vtt_name): Give it external linkage.
3322 (build_clone): Handle the magic VTT parameters for clones.
3323 (clone_function_decl): Fix typo in comment.
3324 (build_vtt): Keep track of the indices in the VTTs where various
3325 entities are stored.
3326 (build_vtt_inits): Likewise.
3327 (dfs_build_vtt_inits): Likewise.
3328 (build_ctor_vtbl_group): Tweak type of construction vtables.
3329 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
3330 primary bases, when building construction vtables.
3331 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
3332 (initialize_predefined_identifiers): Add vtt_parm_identifier.
3333 (init_decl_processing): Initialize vtt_parm_type.
3334 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
3335 (lang_mark_tree): Make vtt_parm.
3336 * decl2.c (build_artificial_parm): New function.
3337 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
3338 (grokclassfn): Use build_artificial_parm.
3339 * init.c (initialize_vtbl_ptrs): Call
3340 fixup_all_virtual_upcast_offsets directly.
3341 (perform_member_init): Use the complete subobject destructor for
3343 (build_vtbl_address): New function.
3344 (expand_virtual_init): Handle VTTs.
3345 * optimize (maybe_clone_body): Likewise.
3346 * search.c (fixup_all_virtual_upcast_offsets): Give it external
3348 (expand_indirect_vtbls_init): Remove.
3349 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
3350 * tree.c (make_binfo): Make them bigger.
3352 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
3354 * inc/cxxabi.h (__pbase_type_info): Define, based on
3355 __pointer_type_info.
3356 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
3357 (__pointer_to_member_type_info): Likewise.
3358 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
3359 (__pointer_to_member_type_info::__is_pointer_p): Remove.
3360 (__pointer_type_info::__do_catch): Rename to ...
3361 (__pbase_type_info::__do_catch): ... here. Adjust.
3362 (__pbase_type_info::__pointer_catch): Implement.
3363 (__pointer_type_info::__pointer_catch): Adjust.
3364 (__pointer_to_member_type_info::__pointer_catch): Adjust.
3366 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
3368 * tinfo.h (__user_type_info::contained_virtual_p): New
3370 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
3372 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
3373 diamond shaped heirarchy. Add early out for mixed diamond and
3374 duplicate shaped heirarchy.
3376 2000-05-24 Mark Mitchell <mark@codesourcery.com>
3378 * cp-tree.h (build_delete): Change prototype.
3379 (build_vec_delete): Likewise.
3380 * call.c (build_scoped_method_call): Use special_function_kind
3381 values to indicate the kind of destruction to be done.
3382 (build_method_call): Likewise.
3383 * decl.c (finish_destructor_body): Likewise.
3384 (maybe_build_cleanup_1): Likewise. Rename to ...
3385 (maybe_build_cleanup): ... this.
3386 * decl2.c (delete_sanity): Use special_function_kind
3387 values to indicate the kind of destruction to be done.
3388 (build_cleanup): Likewise.
3389 * init.c (perform_member_init): Likewise.
3390 (build_vec_delete_1): Likewise.
3391 (build_dtor_call): Simplify.
3392 (build_delete): Use special_function_kind
3393 values to indicate the kind of destruction to be done.
3394 (build_vbase_delete): Likewise.
3395 (build_vec_delete): Likewise.
3397 * init.c (sort_member_init): Fix typo in error message generation
3400 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
3402 * semantics.c (begin_class_definition): make the packed
3403 attribute be sensitive to the "-fpack-struct" command line flag
3405 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
3407 Update new-abi upcast algorithm.
3408 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
3409 prototype and meaning of return value.
3410 (__si_class_type_info::__do_upcast): Likewise.
3411 (__vmi_class_type_info::__do_upcast): Likewise.
3412 * tinfo.cc (__class_type_info::__upcast_result): Replace
3413 whole2dst with part2dst. Adjust ctor.
3414 (__class_type_info::__do_upcast): Adjust call of worker function.
3415 (__class_type_info::__do_upcast): Adjust.
3416 (__si_class_type_info::__do_upcast): Adjust. Use parent's
3418 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
3419 virtual base in diamond heirarchy bug.
3421 2000-05-23 Mark Mitchell <mark@codesourcery.com>
3423 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
3424 and bitfield to tinfo_fn_p.
3425 (DECL_TINFO_FN_P): Adjust.
3426 (SET_DECL_TINFO_FN_P): Likewise.
3427 (DECL_MUTABLE_P): Likewise.
3428 (DECL_C_BIT_FIELD): Likewise.
3429 (SET_DECL_C_BIT_FIELD): Likewise.
3430 (CLEAR_DECL_C_BIT_FIELD): Likewise.
3431 (DECL_UNINLINABLE): Likewise.
3432 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
3433 (handle_using_decl): Remove assertion.
3434 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
3435 to build FIELD_DECLs.
3436 (build_base_field): Likewise.
3437 (layout_class_type): Likewise.
3438 * decl.c (init_decl_processing): Likewise.
3439 (build_ptrmemfunc_type): Likewise.
3440 (grokdeclarator): Likewise.
3441 * decl2.c (grok_x_components): Likewise.
3442 * except.c (call_eh_info): Likewise.
3443 * init.c (init_init_processing): Likewise.
3444 * rtti.c (expand_class_desc): Likewise.
3445 (create_pseudo_type_info): Likewise.
3446 (get_vmi_pseudo_type_info): Likewise.
3447 (create_tinfo_types): Likewise.
3448 * ptree.c (print_lang_decl): Adjust.
3449 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
3450 before checking DECL_MUTABLE_P.
3452 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
3453 parameters for template functions.
3454 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
3455 destructors as well as constructors.
3457 2000-05-22 Mark Mitchell <mark@codesourcery.com>
3459 * class.c (build_ctor_vtbl_group): Set inits.
3460 * optimize.c (maybe_clone_body): Set DECL_INLINE and
3461 DECL_THIS_INLINE appropriately for clones.
3463 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
3464 (DECL_CONV_FN_P): Simplify.
3465 (DECL_OPERATOR): Remove.
3466 (language_to_string): Declare.
3467 * decl.c (duplicate_decls): Fix typo in comment.
3468 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
3469 (grok_op_properties): Use DECL_CONV_FN_P instead of
3470 IDENTIFIER_TYPENAME_P.
3471 * dump.c (dequeue_and_dump): Dump the language linkage of
3473 * error.c (language_to_string): Give it external linkage.
3474 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
3475 (implicitly_declare_fn): Set DECL_LANGUAGE.
3476 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
3477 IDENTIFIER_TYPENAME_P.
3478 (tsubst_decl): Likewise.
3479 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
3480 * semantics.c (finish_member_declaration): Don't mark members of
3481 classes declared in an extern "C" region as extern "C".
3483 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3485 * decl2.c (qualified_lookup_using_namespace): Look through
3488 * decl.c (push_using_decl): Return the old decl on namespace level.
3490 2000-05-21 Mark Mitchell <mark@codesourcery.com>
3492 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
3493 (VTT_NAME_PREFIX): New macro.
3494 (CTOR_VTBL_NAME_PREFIX): Likewise.
3495 (get_ctor_vtbl_name): New function.
3496 * class.c (get_vtable_name): Simplify.
3497 (get_vtt_name): New function.
3498 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
3499 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
3500 when a virtual base becomes primary.
3501 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
3503 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
3504 additional parameters.
3505 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
3506 (initialize_array): New function.
3507 (build_vtt): Likewise.
3508 (build_vtt_inits): Likewise.
3509 (dfs_build_vtt_inits): Likewise.
3510 (dfs_fixup_binfo_vtbls): Likewise.
3511 (build_ctor_vtbl_group): Likewise.
3512 (initialize_vtable): Use initialize_array.
3513 (accumulate_vtbl_inits): Reimplement to handle construction
3515 (dfs_accumulate_vtbl_inits): Likewise.
3516 (bulid_vtbl_initializer): Adjust parameter name.
3517 * method.c (build_typename_overload): Remove #if 0'd code.
3518 (get_ctor_vtbl_name): New function.
3519 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
3520 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
3522 * cp-tree.h (struct lang_type): Remove search_slot.
3523 (CLASSTYPE_SEARCH_SLOT): Remove.
3524 (emit_base_init): Change prototype.
3525 (initialize_vtbl_ptrs): Likewise.
3526 (expand_indirect_vtbls_init): Likewise.
3527 (clear_search_slots): Remove.
3528 * decl.c (lang_mark_tree): Don't mark search_slot.
3529 * init.c (initialize_vtbl_ptrs): Simplify.
3530 (emit_base_init): Likewise.
3531 * search.c (struct vbase_info): Document decl_ptr.
3532 (convert_pointer_to_single_level): Remove.
3533 (dfs_find_vbases): Remove.
3534 (dfs_init_base_pointers): Simplify.
3535 (dfs_clear_vbase_slots): Remove.
3536 (dfs_vtable_path_unmark): New function.
3537 (init_vbase_pointers): Simplify.
3538 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
3539 (expand_indirect_vtbls_init): Simplify. Don't call
3540 mark_all_temps_used.
3541 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
3542 initialize_vtbl_ptrs.
3544 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
3546 * except.c: Add static prototypes.
3548 2000-05-20 H.J. Lu <hjl@gnu.org>
3550 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
3552 2000-05-19 Mark Mitchell <mark@codesourcery.com>
3554 Don't create a separate copy of virtual bases for the
3555 CLASSTYPE_VBASECLASSES list.
3556 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
3557 (BINFO_FOR_VBASE): Remove.
3558 (CANONICAL_BINFO): Adjust.
3559 (binfo_for_vbase): New function.
3560 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
3561 instead of BINFO_FOR_VBASE.
3562 (build_vbase_pointer): Likewise.
3563 (build_secondary_vtable): Likewise.
3564 (dfs_mark_primary_bases): Likewise.
3565 (mark_primary_bases): Likewise.
3566 (layout_nonempty_base_or_field): Likewise.
3567 (dfs_set_offset_for_shared_vbases): Likewise.
3568 (dfs_set_offset_for_unshared_vbases): Likewise.
3569 (layout_virtual_bases): Likewise. Adjust for changes to the
3570 CLASSTYPE_VBASECLASSES list.
3571 (dump_class_hierarchy_r): Use binfo_for_vbase
3572 instead of BINFO_FOR_VBASE.
3573 (dump_class_hierarchy): Likewise.
3574 (finish_vtbls): Likewise.
3575 (build_vtbl_initializer): Adjust for changes to the
3576 CLASSTYPE_VBASECLASSES list.
3577 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
3578 * decl.c (finish_destructor_body): Adjust for changes to the
3579 CLASSTYPE_VBASECLASSES list.
3580 * init.c (sort_base_init): Use binfo_for_vbase.
3581 (construct_virtual_bases): Adjust for changes to the
3582 CLASSTYPE_VBASECLASSES list.
3583 (expand_member_init): Use binfo_for_vbase.
3584 (build_vbase_delete): Adjust for changes to the
3585 CLASSTYPE_VBASECLASSES list.
3586 * method.c (do_build_copy_constructor): Likewise.
3587 * rtti.c (get_base_offset): Use binfo_for_vbase.
3588 (expand_class_desc): Remove #if 0'd code.
3589 * search.c (struct vbase_info): Remove vbase_types.
3590 (get_base_distance): Use binfo_for_vbase.
3591 (lookup_field_queue_p): Use CANONICAL_BINFO.
3592 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
3593 (get_pure_virtuals): Adjust for changes to the
3594 CLASSTYPE_VBASECLASSES list.
3595 (dfs_find_vbases): Use binfo_for_vbase.
3596 (dfs_init_vbase_pointers): Likewise.
3597 (init_vbase_pointers): Don't initialize vi.vbase_types.
3598 (virtual_context): Use binfo_for_vbase.
3599 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
3600 CLASSTYPE_VBASECLASSES list.
3601 (expand_indirect_vtbls_init): Simplify.
3602 (dfs_get_vbase_types): Don't replicate virtual bases.
3603 (find_vbase_instance): Use binfo_for_vbase.
3604 (binfo_for_vbase): New function.
3605 * typeck.c (get_delta_difference): Use binfo_for_vbase.
3607 2000-05-17 Mark Mitchell <mark@codesourcery.com>
3609 * decl2.c (finish_anon_union): Generalize error messages to handle
3610 anonymous structures.
3611 * init.c (perform_member_init): Remove `name' parameter.
3612 (build_field_list): New function.
3613 (sort_member_init): Handle anonymous union initialization order
3614 correctly. Check for multiple initializations of the same union.
3615 (emit_base_init): Don't look up fields by name here.
3616 (expand_member_init): Record the result of name lookup for future
3618 * typeck.c (build_component_ref): Fix formatting.
3620 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
3622 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
3623 * typeck.c (build_x_compound_expr): Replace warn_unused with
3626 * decl2.c (lang_decode_option): Update -Wall unused flags by
3627 calling set_Wunused.
3629 2000-05-16 Mark Mitchell <mark@codesourcery.com>
3631 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
3632 * init.c (dfs_vtable_path_unmark): Remove.
3633 * search.c (marked_new_vtable_p): Likewise.
3634 (unmarked_new_vtable_p): Likewise.
3635 (dfs_search_slot_nonempty_p): Likewise.
3636 (dfs_mark): Likewise.
3637 (dfs_vtable_path_unmark): Likewise.
3638 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
3639 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
3640 (dfs_init_vbase_pointers): Remove special-case new ABI code.
3641 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
3642 (init_vbase_pointers): Simplify.
3643 (expand_indirect_vtbls_init): Likewise.
3645 * class.c (copy_virtuals): New function.
3646 (build_primary_table): Use it.
3647 (build_secondary_vtable): Likewise.
3648 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
3649 indicate that no vcall offset is required.
3650 (add_virtual_function): Likewise.
3651 (modify_all_vtables): Likewise.
3652 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
3653 (dfs_accumulate_vtbl_inits): Likewise.
3654 (build_vtbl_initializer): Make changes to handle construction
3656 (dfs_build_vcall_offset_vtbl_entries): Likewise.
3657 (build_rtti_vtbl_entries): Likewise.
3658 (build_vtable_entries): Handle a NULL vcall_index.
3660 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
3662 * decl2.c (lang_decode_option): Fix thinko.
3664 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
3666 * except.c (check_handlers): New fn.
3667 * cp-tree.h: Declare it.
3668 * semantics.c (finish_handler_sequence): Call it.
3669 (finish_function_handler_sequence): Likewise.
3670 (finish_handler_parms): Set TREE_TYPE on the handler.
3671 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
3672 * search.c (get_base_distance_recursive): If protect>1, ignore
3674 (get_base_distance): Don't reduce watch_access.
3676 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
3678 * lex.c: #include diagnostic.h.
3679 (lang_init_options): Set default prefixing rules.
3681 * lang-options.h: Add -fdiagnostics-show-location=.
3683 * decl2.c: #include diagnostic.h.
3684 (lang_decode_option): Handle -fdiagnostics-show-location=.
3686 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
3688 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
3689 * vec.cc: Revert my 2000-05-07 change.
3691 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
3693 * class.c (check_field_decls): Complain about non-static data
3694 members with same name as class in class with constructor.
3696 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
3698 * decl.c (grokdeclarator): Allow non-static data members with
3701 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
3703 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
3704 and pending_inline.filename. Update prototypes.
3705 * decl.c (define_label): Constify filename parameter.
3706 * decl2.c (warn_if_unknown_interface): Constify local char *.
3707 * input.c Constify input_source.filename. Don't declare
3708 input_filename or lineno. Constify filename parameter to feed_input.
3709 * lex.c (init_parse): Constify parameter and return value.
3710 (cp_pragma_interface, cp_pragma_implementation): Constify
3712 (reinit_parse_for_method, reinit_parse_for_block,
3713 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
3714 Constify local char *.
3715 * pt.c: Don't declare lineno or input_filename.
3716 (print_template_context, tsubst_friend_function, tsubst_decl,
3717 tsubst, instantiate_decl): Constify local char *.
3718 * semantics.c (expand_body): Constify local char *.
3719 * tree.c (build_srcloc): Constify filename parameter.
3720 * typeck.c (c_expand_asm_operands): Constify filename
3723 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
3725 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
3728 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
3730 * inc/cxxabi.h: Fix typos in comment.
3731 (__base_class_info::__offset): Use a static_cast.
3733 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
3735 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
3736 of std::size_t and std::ptrdiff_t respectively.
3737 * tinfo.cc: Likewise.
3740 2000-05-06 Richard Henderson <rth@cygnus.com>
3742 * typeck.c (build_c_cast): Don't warn integer->pointer size
3743 mismatch for constants.
3745 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
3747 * rtti.c (ptmd_initializer): Set non-public, if class is
3750 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
3751 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3752 __cxa_vec_delete): Likewise.
3753 * tinfo.cc (__dynamic_cast): Likewise.
3754 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
3755 __cxa_vec_delete): Likewise.
3757 2000-05-04 Mark Mitchell <mark@codesourcery.com>
3759 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
3760 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
3761 (lang_decl_flags): Add vcall_offset.
3762 (THUNK_VCALL_OFFSET): Use it.
3763 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
3764 * method.c (make_thunk): Create the lang_decl here, not in
3766 (emit_thunk): Make generic thunks into ordinary functions once
3767 they have been fed to expand_body.
3768 * semantics.c (expand_body): Set current_function_is_thunk here.
3770 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3772 * class.c (update_vtable_entry_for_fn): Prototype.
3774 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
3777 * search.c (dfs_build_inheritance_graph_order): Prototype.
3779 2000-05-04 Mark Mitchell <mark@codesourcery.com>
3781 * cp-tree.h (special_function_kind): Add various kinds of
3783 (special_function_p): New function.
3784 * class.c (overrides): Don't let one kind of destructor override
3786 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
3787 whether or not to instantiate a template.
3788 * tree.c (special_function_p): Define.
3790 2000-05-03 Mark Mitchell <mark@codesourcery.com>
3792 * cp-tree.def (THUNK_DECL): Remove.
3793 * cp-tree.h (DECL_THUNK_P): New macro.
3794 (DECL_NON_THUNK_FUNCTION_P): Likewise.
3795 (DECL_EXTERN_C_FUNCTION_P): Likewise.
3796 (SET_DECL_THUNK_P): Likewise.
3797 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
3798 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
3799 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
3800 * decl.c (decls_match): Use DECL_EXTERN_C_P.
3801 (duplicate_decls): Likewise.
3802 (pushdecl): Likewise. Adjust thunk handling.
3803 (grokfndecl): Use DECL_EXTERN_C_P.
3804 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
3805 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
3806 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
3807 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
3808 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
3809 DECL_NO_STATIC_CHAIN.
3810 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
3811 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
3812 * search.c (covariant_return_p): Remove THUNK_DECL handling.
3815 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
3817 * tree.c (walk_tree): Set lineno.
3819 2000-05-01 Mark Mitchell <mark@codesourcery.com>
3821 * exception.cc: Update license notice.
3823 * new1.cc: Likewise.
3824 * new2.cc: Likewise.
3825 * tinfo.cc: Likewise.
3826 * tinfo2.cc: Likewise.
3828 * inc/cxxabi.h: Likewise.
3829 * inc/exception: Likewise.
3830 * inc/new: Likewise.
3831 * inc/new.h: Likewise.
3832 * inc/typeinfo: Likewise.
3834 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
3836 * tree.c (build_target_expr_with_type): If we already have a
3837 TARGET_EXPR, just return it.
3839 * optimize.c (initialize_inlined_parameters): Don't generate an
3840 EXPR_STMT if we can just use DECL_INITIAL.
3841 * decl.c (emit_local_var): Only make the initialization a
3842 full-expression if stmts_are_full_exprs_p.
3844 2000-05-01 Mark Mitchell <mark@codesourcery.com>
3846 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
3848 * call.c (standard_conversion): Use it.
3849 (direct_reference_binding): Likewise.
3850 (build_over_call): Likewise.
3851 (is_properly_derived_from): Likewise.
3852 (compare_ics): Likewise.
3853 * class.c (resolves_to_fixed_type_p): Likewise.
3854 * optimize.c (declare_return_variable): Likewise.
3855 * pt.c (is_specialization_of): Likewise.
3857 * typeck.c (comp_target_parms): Likeiwse.
3858 (build_static_cast): Likewise.
3859 (build_reinterpret_cast): Likewise.
3860 (build_const_cast): Likewise.
3861 (comp_ptr_ttypes_real): Likewise.
3862 (comp_ptr_ttypes_const): Likewise.
3863 * typeck2.c (process_init_constructor): Likewise.
3865 2000-04-30 Scott Snyder <snyder@fnal.gov>
3867 * decl.c (finish_destructor_body): Use the base destructor when
3868 destroying virtual bases.
3870 2000-04-30 Mark Mitchell <mark@codesourcery.com>
3872 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
3874 * optimize.c (struct inline_data): Add target_exprs field.
3875 (declare_return_variable): When a function returns an aggregate,
3876 use the variable declared in the TARGET_EXPR as the remapped
3878 (expand_call_inline): Update the pending target_exprs stack.
3879 (optimize_function): Initialize the stack.
3881 * decl2.c (finish_file): Fix typo in comment.
3883 * method.c (emit_thunk): Don't try to return a `void' value.
3885 * optimize.c (initialize_inlined_parameters): If the parameter is
3886 addressable, we need to make a new VAR_DECL, even if the
3887 initializer is constant.
3889 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
3891 * decl.c (grok_op_properties): Add an extra check of argtypes.
3893 2000-04-27 Mark Mitchell <mark@codesourcery.com>
3895 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
3897 (initialize_inlined_parameters): Try to avoid creating new
3900 2000-04-27 Alex Samuel <samuel@codesourcery.com>
3902 * lex.c (my_get_run_time): Remove.
3903 (init_filename_times): Use get_run_time instead of my_get_run_time.
3904 (check_newline): Likewise.
3905 (dump_time_statistics): Likewise.
3906 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
3907 of computing elapsed time explicitly.
3909 2000-04-26 Mark Mitchell <mark@codesourcery.com>
3911 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
3912 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
3913 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
3914 before calling decl_constant_value.
3915 * class.c (check_bitfield_decl): Likewise.
3916 * cvt.c (ocp_convert): Likewise.
3917 (convert): Likewise.
3918 * decl.c (compute_array_index_type): Likewise.
3919 (build_enumerator): Likewise.
3920 * decl2.c (check_cp_case_value): Likewise.
3921 * pt.c (convert_nontype_argument): Likewise.
3923 * typeck.c (decay_conversion): Likewise.
3924 (build_compound_expr): Likewise.
3925 (build_reinterpret_cast): Likewise.
3926 (build_c_cast): Likewise.
3927 (convert_for_assignment): Likewise.
3929 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
3931 * decl.c (finish_function): Don't play games with DECL_INLINE.
3933 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
3935 * ir.texi: Correct typo.
3937 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
3939 * decl.c (grokdeclarator): Reject VLAs as members.
3941 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
3943 * call.c (standard_conversion): Accept conversion between
3946 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
3948 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
3950 * decl2.c (finish_file): Remove double setup for accounting
3953 2000-04-24 Robert Lipe <robertlipe@usa.net>
3955 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
3957 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
3959 * new.cc (set_new_handler): Needs to be in std::.
3961 2000-04-23 Mark Mitchell <mark@codesourcery.com>
3963 * cp-tree.h (lang_decl): Remove pretty_function_p.
3964 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
3965 language-specific node.
3966 * decl.c (cp_make_fname_decl): Use build_decl, not
3967 build_lang_decl, to build the variables.
3968 (grokvardecl): Don't call build_lang_decl for local variables in
3970 (grokdeclarator): Don't call build_lang_decl for local type
3971 declarations in templates.
3972 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
3973 zero'd memory, rather than calling memset.
3974 * pt.c: Include hashtab.h.
3975 (local_specializations): New variable.
3976 (retrieve_local_specialization): Use it.
3977 (register_local_specialization): Likewise.
3978 (tsubst_decl): Don't assume local variables have
3980 (instantiate_decl): Set up local_specializations.
3981 * Makefile.in (HTAB_H): New variable.
3983 2000-04-23 Richard Henderson <rth@cygnus.com>
3985 * typeck.c (c_expand_asm_operands): Restore the original
3986 contents of the output list.
3988 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
3990 * ir.texi: Document complex number representation.
3992 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
3994 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
3995 (target_incomplete_p): New function.
3996 (tinfo_base_init): Create comdat NTBS name variable.
3997 (ptr_initializer): Add non_public parameter. Calculate it.
3998 (ptmd_initializer): Likewise.
3999 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
4000 (create_real_tinfo_var): Add non_public parameter. Use it.
4001 Push proxy into global namespace.
4002 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
4004 * inc/typeinfo (type_info::before, type_info::operator==):
4005 Compare __name addresses.
4007 * tinfo2.cc: Remove new-abi builtins comment.
4009 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
4011 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
4013 * call.c (joust): Exit early if we get the same function, too.
4015 * decl2.c (key_method): Return NULL_TREE for template classes.
4016 (import_export_class): Don't need to check for template classes.
4018 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
4020 * lex.c: Remove references to cccp.c.
4022 2000-04-18 Mark Mitchell <mark@codesourcery.com>
4024 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
4025 volatile_memfunc. Add destructor_attr. Adjust dummy.
4026 (DECL_DESTRUCTOR_P): Use destructor_attr.
4027 (DECL_CONST_MEMFUNC_P): Reimplement.
4028 (DECL_VOLATILE_MEMFUNC_P): Remove.
4029 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
4030 (overrides): Use DECL_DESTRUCTOR_P.
4031 (check_for_override): Likewise.
4032 * decl.c (start_function): Likewise.
4033 * decl2.c (grokfclassfn): Likewise.
4034 (check_classfn): Likewise.
4035 (grok_function_init): Likewise.
4037 2000-04-17 Mark Mitchell <mark@codesourcery.com>
4039 * decl2.c (grokfield): Issue error on illegal data member
4042 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
4044 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
4046 2000-04-16 Mark Mitchell <mark@codesourcery.com>
4048 * class.c (build_vtable_entry): Don't build thunks for type-info
4051 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
4053 * decl.c (decls_match): Allow a redeclaration of a builtin to
4054 specify args while the builtin did not.
4056 2000-04-15 Mark Mitchell <mark@codesourcery.com>
4058 * cp-tree.def (THUNK_DECL): Add to documentation.
4059 * cp-tree.h (flag_huge_objects): Declare.
4060 * class.c (modify_vtable_entry): Tidy.
4061 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
4062 Calculate delta appropriately for the new ABI.
4063 (dfs_modify_vtables): Use it.
4064 (modify_all_vtables): Fix thinko in code to add overriding copies
4065 of functions to primary vtables.
4066 (build_clone): Fix typo in comment.
4067 (clone_function_decl): Correct order of destructors in vtable.
4068 (build_vbase_offset_vtbl_entries): Adjust comment.
4069 (dfs_vcall_offset_queue_p): Remove.
4070 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
4071 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
4072 (build_vtable_entry): Correct check for pure virtual functions.
4073 Don't declare flag_huge_objects.
4074 * decl.c (flag_huge_objects): Remove declaration.
4075 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
4076 Use int_size_in_bytes.
4077 (emit_thunk): Handle vcall offset thunks.
4079 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4081 * decl2.c (parse_time, varconst_time): Delete declarations.
4082 (finish_file): Delete LINENO declaration.
4083 START_TIME and THIS_TIME now long.
4085 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
4087 * class.c (build_base_field): Reformat comment.
4089 * inc/cxxabi.h (stddef.h): Comment inclusion.
4090 (__base_class_info::__offset): Comment shift.
4092 2000-04-12 Mark Mitchell <mark@codesourcery.com>
4094 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
4095 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
4096 (cp_push_exception_identifier): New macro.
4097 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
4098 (DECL_BASE_DESTRUCTOR_P): Likewise.
4099 (DECL_DELETING_DESTRUCTOR_P): Likewise.
4100 (get_vtbl_decl_for_binfo): Fix formatting.
4101 (in_charge_arg_for_name): New macro.
4102 (maybe_build_cleanup_and_delete): Remove declaration.
4103 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
4104 (in_charge_arg_for_name): New function.
4105 (build_new_method_call): Use it. Handle cloned destructors.
4106 (build_clone): Don't make the base constructor virtual.
4107 Automatically defer generated functions.
4108 (clone_function_decl): Handle destructors, too.
4109 (clone_constructors_and_destructors): Likewise.
4110 (create_vtable_ptr): Don't create a vtable entry for a cloned
4112 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
4113 (initialize_predefined_identifiers): Update appropriately.
4114 (finish_destructor_body): Simplify.
4115 (maybe_build_cleanup_and_delete): Remove.
4116 * except.c (expand_throw): Handle new-ABI destructors.
4117 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
4118 (build_dtor_call): New function.
4119 (build_delete): Use it. Simplify.
4120 * optimize.c (maybe_clone_body): Handle destructors.
4121 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
4123 * exception.cc (cleanup_fn): New typedef.
4124 (CALL_CLEANUP): New macro.
4125 (cp_eh_info): Use them.
4126 (__cp_push_exception): Likewise.
4127 (__cp_pop_exception): Likewise.
4129 2000-04-11 Mark Mitchell <mark@codesourcery.com>
4131 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
4132 (complete_dtor_identifier): New macro.
4133 (CLASSTYPE_FIRST_CONVERSION): Remove.
4134 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
4135 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
4136 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
4137 (CLASSTYPE_CONSTRUCTORS): Likewise.
4138 (CLASSTYPE_DESTRUCTORS): Likewise.
4139 (lang_decl): Add cloned_function.
4140 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
4141 (DECL_BASE_CONSTRUCTOR_P): Likewise.
4142 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
4143 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
4144 (DECL_CLONED_FUNCTION_P): Likewise.
4145 (DECL_CLONED_FUNCTION): Likewise.
4146 (clone_function_decl): Declare.
4147 (maybe_clone_body): Likewise.
4148 * call.c (build_user_type_conversion_1): Call complete object
4149 constructors in the new ABI.
4150 (build_new_method_call): Don't add in-charge parameters under the
4152 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
4153 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
4154 CLASSTYPE_DESTRUCTOR_SLOT.
4155 (build_clone): New function.
4156 (clone_function_decl): Likewise.
4157 (clone_constructors_and_destructors): Likewise.
4158 (check_bases_and_members): Use it.
4159 * decl.c (iniitialize_predefined_identifiers): Initialize
4160 complete_dtor_identifier.
4161 (finish_function): Don't add extra code to a clone.
4162 (lang_mark_tree): Mark cloned_function.
4163 * decl2.c (mark_used): Don't bother trying to instantiate things
4165 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
4166 * method.c (set_mangled_name_for_decl): Don't treat clones as
4168 (synthesize_method): Sythesize cloned functions, not the clones.
4169 * optimize.c (inline_data): Update comment on ret_label.
4170 (remap_block): Don't assume DECL_INITIAL exists.
4171 (copy_body_r): Allow ret_label to be NULL.
4172 (maybe_clone_body): Define.
4173 * pt.c (tsubst_decl): Handle clones.
4174 (instantiate_clone): New function.
4175 (instantiate_template): Use it.
4176 (set_mangled_name_for_template_decl): Don't treat clones as
4178 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
4179 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
4180 * semantics.c (expand_body): Clone function bodies as necessary.
4182 * optimize.c (remap_decl): Avoid sharing structure for arrays
4183 whose size is only known at run-time.
4184 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
4186 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
4187 to has_in_charge_parm_p.
4188 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
4189 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
4190 (DECL_COPY_CONSTRUCTOR_P): New macro.
4191 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
4192 (build_user_type_conversion_1): Likewise.
4193 (convert_like_real): Likewise.
4194 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
4195 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
4196 (copy_args_p): Likewise.
4197 (grok_ctor_properties): Likewise.
4198 (start_function): Likewise.
4199 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
4200 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
4201 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
4202 * method.c (do_build_copy_constructor): Use
4203 DECL_HAS_IN_CHARGE_PARM_P.
4204 (synthesize_method): Likewise.
4205 * pt.c (instantiate_template): Remove goto.
4206 * tree.c (build_cplus_method_type): Remove mention of obstacks in
4209 * cp-tre.h (finish_function): Change prototype.
4210 * decl.c (end_cleanup_fn): Adjust caller.
4211 (finish_function): Take only one parameter.
4212 * decl2.c (finish_objects): Adjust caller.
4213 (finish_static_storage_duration_function): Likewise.
4214 * method.c (emit_thunk): Likewise.
4215 * parse.y: Likewise.
4216 * parse.c: Regenerated.
4217 * pt.c (instantiate_decl): Likewise.
4218 * rtti.c (synthesize_tinfo_fn): Likewise.
4219 * semantics.c (expand_body): Likewise.
4221 * cp-tree.h (copy_decl): New function.
4222 * class.c (finish_struct_1): Use it.
4223 * lex.c (copy_decl): Define it.
4224 * pt.c (tsubst_decl): Likewise.
4225 * tree.c (copy_template_template_parm): Likewise.
4227 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
4228 has_nonpublic_assign_ref.
4229 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
4230 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
4231 * class.c (finish_struct_methods): Don't set
4232 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
4233 (interface_only): Don't declare.
4234 (interface_unknown): Likewise.
4236 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4238 * tree.h (HAVE_TEMPLATES): Remove definition.
4239 * lang-options.h (-fthis-is-variable): Remove documentation.
4241 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
4243 * class.c (instantiate_type): Handle object-relative template-id.
4245 * semantics.c (finish_expr_stmt): Call convert_to_void here.
4246 * decl.c (cplus_expand_expr_stmt): Not here.
4248 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
4249 Initialize exprtype earlier.
4251 * parse.y (fn.def1): Check for defining types in return types.
4253 * decl.c (check_tag_decl): Notice extra fundamental types.
4254 Diagnose empty decls in classes, too.
4256 * decl.c (grokdeclarator): Don't override an anonymous name if no
4257 declarator was given.
4259 * cvt.c (convert_to_void): Call resolve_offset_ref.
4261 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
4263 * decl2.c (decl_namespace): Handle getting a type.
4265 * typeck.c (build_c_cast): Re-enable warning for cast between
4266 pointer and integer of different size.
4268 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
4270 * inc/cxxabi.h (__pointer_type_info): Add restrict and
4272 (__pointer_type_info::__pointer_catch): New virtual function.
4273 (__pointer_to_member_type_info): Derive from
4274 __pointer_type_info. Adjust.
4275 (__pointer_to_member_type_info::__do_catch): Remove.
4276 (__pointer_to_member_type_info::__is_pointer_p): Declare.
4277 (__pointer_to_member_type_info::__pointer_catch): Declare.
4278 * rtti.c (qualifier_flags): Add restrict flag.
4279 (ptmd_initializer): Reorder members.
4280 (create_tinfo_types): Expand comments. Reorder
4281 ptmd_desc_type_node members.
4282 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
4284 (__pointer_type_info::__do_catch): Move specific code into
4285 __pointer_catch. Call it.
4286 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
4287 specific catch checking. Fix void conversion check.
4288 (__pointer_to_member_type_info::__do_catch): Remove.
4289 (__pointer_to_member_type_info::__pointer_catch): Implement.
4291 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4293 * lex.c (init_parse): Remove traces of classof and headof.
4294 * decl2.c (flag_operator_names): Default to 1.
4295 (lang_decode_option): Do not set it for -ansi.
4297 2000-04-09 Mark Mitchell <mark@codesourcery.com>
4299 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
4300 (DECL_MAIN_VARIANT): Remove.
4301 * decl.c (duplicate_decls): Don't set it.
4302 (start_function): Likewise.
4303 (lang_mark_tree): Don't mark it.
4304 * decl2.c (defer_fn): Don't use it.
4305 * lex.c (retrofit_lang_decl): Don't set it.
4306 * pt.c (tsubst_decl): Likewise.
4307 * ptree.c (print_lang_decl): Don't print it.
4308 * typeck.c (mark_addressable): Don't use it.
4310 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
4312 * vec.cc: Include <new> and <exception>.
4313 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
4314 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
4316 (__cxa_vec_delete): Catch dtor exceptions.
4318 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
4320 Prepend __ to implementation defined names.
4321 * inc/typeinfo (type_info): Rename _name to __name.
4322 (type_info::type_info): Rename parameter.
4323 (type_info::operator==, type_info::operator!=,
4324 type_info::before): Likewise.
4325 (type_info::is_pointer_p, type_info::is_function_p,
4326 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
4329 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
4330 (__pointer_type_info::__pointer_type_info): Likewise.
4331 (__pointer_type_info::is_pointer_p,
4332 __pointer_type_info::do_catch): Prepend __. Rename parameters.
4333 (__array_type_info::__array_type_info): Rename parameters.
4334 (__function_type_info::__function_type_info): Likewise.
4335 (__function_type_info::is_function_p): Prepend __.
4336 (__enum_type_info::__enum_type_info): Rename parameters.
4337 (__pointer_to_member_type_info::__pointer_to_member_type_info):
4339 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
4341 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
4342 (__class_type_info::__class_type_info): Rename parameters.
4343 (__class_type_info::sub_kind): Prepend __. Adjust member names.
4344 (__class_type_info::upcast_result,
4345 __class_type_info::dyncast_result): Prepend __. Move definition
4347 (__class_type_info::do_upcast, __class_type_info::do_catch,
4348 __class_type_info::find_public_src,
4349 __class_type_info::do_dyncast,
4350 __class_type_info::do_find_public_src): Prepend __. Rename
4352 (__si_class_type_info::__si_class_type_info): Rename parameters.
4353 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
4354 __si_class_type_info::do_find_public_src): Prepent __. Rename
4356 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
4357 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
4358 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
4360 (__dynamic_cast): Rename parameters.
4361 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
4362 type_info::do_catch, type_info::do_upcast): Prepend __.
4363 (contained_p, public_p, virtual_p, contained_public_p,
4364 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
4365 (__class_type_info::do_catch,
4366 __class_type_info::do_upcast): Prepend __. Adjust.
4367 (__class_type_info::__upcast_result,
4368 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
4370 (__class_type_info::find_public_src): Prepend __. Adjust.
4371 (__class_type_info::do_find_public_src,
4372 __si_class_type_info::do_find_public_src,
4373 __vmi_class_type_info::do_find_public_src): Likewise.
4374 (__class_type_info::do_dyncast,
4375 __si_class_type_info::do_dyncast,
4376 __vmi_class_type_info::do_dyncast): Likewise.
4377 (__class_type_info::do_upcast,
4378 __si_class_type_info::do_upcast,
4379 __vmi_class_type_info::do_upcast): Likewise.
4380 (__dynamic_cast): Adjust.
4381 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
4382 (__function_type_info::is_function_p): Likewise.
4383 (__pointer_type_info::do_catch): Likewise. Adjust.
4384 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
4385 (__throw_type_match_rtti_2): Adjust.
4386 (__is_pointer): Adjust.
4388 2000-04-08 Mark Mitchell <mark@codesourcery.com>
4390 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
4391 (complete_ctor_identifier): New macro.
4392 (special_function_kind): Add sfk_copy_constructor and
4393 sfk_assignment_operator.
4394 (LOOKUP_HAS_IN_CHARGE): Remove.
4395 (cons_up_default_function): Rename to ...
4396 (implicitly_declare_fn): ... this.
4397 * call.c (build_new_method_call): Add in-charge parameters for
4399 * class.c (add_implicitly_declared_members): Change parameter name
4400 from cant_have_assignment to cant_have_const_assignment.
4401 Replace calls to cons_up_default_function to implicitly_declare_fn.
4402 * cvt.c (ocp_convert): Use complete_ctor_identifier.
4403 * decl.c (initialize_predefined_identifiers): Initialize it.
4404 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
4406 * init.c (expand_default_init): Don't calculate the in-charge
4408 (build_new_1): Likewise.
4409 * lex.c (cons_up_default_function): Move to method.c.
4410 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
4411 (implicitly_declare_fn): New function.
4412 * typeck.c (build_static_cast): Use complete_ctor_identifier.
4413 (build_modify_expr): Likewise.
4414 * typeck2.c (build_functional_cast): Likewise.
4416 Under the new ABI, constructors don't return `this'.
4417 * cp-tree.h (warn_reorder): Declare.
4418 (special_function_kind): New enum.
4419 (global_base_init_list): Remove declaration.
4420 (emit_base_init): Don't return a value.
4421 (check_base_init): Don't declare.
4422 (is_aggr_typedef): Likewise.
4423 * decl.c (check_special_function_return_type): New function.
4424 (return_types): Remove.
4425 (grokdeclarator): Use check_special_function_return_type.
4426 (start_function): Don't initialize ctor_label under the new ABI.
4427 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
4428 * init.c (begin_init_stmts): Move to top of file.
4429 (finish_init_stmts): Likewise.
4430 (warn_reorder): Don't declare.
4431 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
4433 (check_base_init): Remove.
4434 (is_aggr_typedef): Likewise.
4435 (build_new_1): Don't use the return value of a constructor.
4436 * semantics.c (setup_vtbl_ptr): Don't use the return value
4438 * typeck.c (check_return_expr): Don't magically convert return
4439 statements into `return this' in constructors under the new ABI.
4441 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
4442 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
4443 (base_ctor_identifier): New macro.
4444 (base_dtor_identifier): Likewise.
4445 (deleting_dtor_identifier): Likewise.
4446 * decl.c: Don't include obstack.h.
4447 (obstack_chunk_alloc): Don't define.
4448 (obstack_chunk_free): Likewise.
4449 (struct predefined_identifier): New type.
4450 (initialize_predefined_identifiers): New function.
4451 (init_decl_processing): Use it.
4452 (debug_temp_inits): Remove.
4453 (start_method): Don't call preserve_data.
4454 (hack_incomplete_structures): Update comment.
4455 * init.c (init_init_processing): Don't initialize
4457 (build_offset_rf): Remove dead code.
4458 (build_delete): Use CLASSTYPE_N_BASECLASSES.
4459 * search.c (init_search_processing): Don't initialize
4462 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4464 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
4465 some sign_compare warnings.
4467 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
4469 Rename abi::__vmi_class_type_info members.
4470 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
4471 base_list, detail_masks members to vmi_flags, vmi_base_count,
4472 vmi_bases and vmi_flags_masks respectively.
4473 (__vmi_class_type_info::vmi_flags_masks): Rename
4474 details_unknown_mask to flags_unknown_mask.
4475 * tinfo.cc (__class_type_info::do_upcast): Adjust.
4476 (__vmi_class_type_info::do_find_public_src): Adjust.
4477 (__vmi_class_type_info::do_dyncast): Adjust.
4478 (__vmi_class_type_info::do_upcast): Adjust.
4480 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
4482 * tinfo.cc (convert_to_base): New function.
4483 (get_vbase_offset): Remove. Move into convert_to_base.
4484 (__vmi_class_type_info::do_find_public_src): Adjust.
4485 (__vmi_class_type_info::do_dyncast): Adjust.
4486 (__vmi_class_type_info::do_upcast): Adjust.
4488 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
4490 * tinfo.cc (operator=): Use __builtin_strcmp.
4491 * tinfo2.cc (before): Likewise.
4493 2000-04-06 Mark Mitchell <mark@codesourcery.com>
4495 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
4496 (DECL_SAVED_INLINE): Rename to ...
4497 (DECL_DEFERRED_FN): ... this.
4498 (in_function_p): Remove declaration.
4499 (mark_inline_for_output): Rename to ...
4500 (defer_fn): ... this.
4501 * decl.c (finish_function): Adjust call to mark_inline_for_output.
4502 (in_function_p): Remove definition.
4503 * decl2.c (saved_inlines): Rename to ...
4504 (deferred_fns): ... this.
4505 (saved_inlines_used): Rename to ...
4506 (deferred_fns_used): ... this.
4507 (mark_inline_for_output): Rename to ...
4508 (defer_fn): ... this.
4509 (finish_file): Adjust accordingly.
4510 (init_decl2): Likewise.
4511 * lex.c (cons_up_default_function): Likewise.
4512 * pt.c (mark_decl_instantiated): Likewise.
4513 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
4515 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
4516 * semantics.c (expand_body): Defer more functions.
4518 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
4521 * Make-lang.in (CXX_LIB2FUNCS): Add it.
4523 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4524 __cxa_vec_delete): Declare.
4526 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
4528 * rtti.c (dfs_class_hint_mark): New static function.
4529 (dfs_class_hint_unmark): New static function.
4530 (class_hint_flags): Use them.
4532 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
4534 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
4536 2000-04-05 Mark Mitchell <mark@codesourcery.com>
4538 * cp-tree.h (instantiate_decl): Change prototype.
4539 * decl2.c (mark_used): Adjust call.
4540 * optimize.c (inlinable_function_p): Adjust handling of templates.
4541 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
4542 (do_type_instantiation): Likewise.
4543 (instantiate_decl): Defer more templates.
4544 (instantiate_pending_templates): Adjust logic to handle inline
4547 * Makefile.in (GGC_H): New variable. Use it throughout in place
4550 * call.c: Don't include obstack.h. Include ggc.h.
4551 (obstack_chunk_alloc): Don't define.
4552 (obstack_chunk_free): Likewise.
4553 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
4554 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
4555 (pop_switch): Free it.
4557 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
4559 * dump.c (dequeue_and_dump): Don't try to print the bit_position
4560 if we don't have a DECL_FIELD_OFFSET.
4562 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
4564 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
4567 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4569 * cfns.gperf (hash, libc_name_p): Prototype.
4571 * rtti.c (build_dynamic_cast_1): Constification.
4573 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
4575 * semantics.c (deferred_type_access_control): Prototype.
4577 2000-04-04 Mark Mitchell <mark@codesourcery.com>
4579 Correct many new ABI issues regarding vbase and vcall offset
4581 * cp-tree.h (BINFO_VTABLE): Document.
4582 (struct lang_type): Tweak formatting.
4583 (BINFO_PRIMARY_BINFO): Add to documentation.
4584 (CLASSTYPE_VSIZE): Fix typo in comment.
4585 (CLASSTYPE_VBASECLASSES): Update documentation.
4586 (BINFO_VBASE_MARKED): Remove.
4587 (SET_BINFO_VBASE_MARKED): Likewise.
4588 (CLEAR_BINFO_VBASE_MARKED): Likewise.
4589 (BINFO_FIELDS_MARKED): Remove.
4590 (SET_BINFO_FIELDS_MARKED): Likewise.
4591 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
4592 (enum access_kind): New enumeration.
4593 (num_extra_vtbl_entries): Remove declaration.
4594 (size_extra_vtbl_entries): Likewise.
4595 (get_vtbl_decl_for_binfo): New function.
4596 (dfs_vbase_unmark): Remove declaration.
4597 (mark_primary_bases): Likewise.
4598 * class.c (SAME_FN): Remove.
4599 (struct vcall_offset_data_s): Move definition.
4600 (build_vbase_pointer): Use `build', not `build_binary_op', to
4601 access the vbase pointer under the new ABI.
4602 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
4603 (build_primary_vtable): Likewise.
4604 (dfs_mark_primary_bases): Move here from search.c.
4605 (mark_primary_bases): Likewise.
4606 (determine_primary_bases): Under the new ABI, don't make a base
4607 class a primary base just because we don't yet have any virtual
4609 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
4610 (num_vfun_entries): Remove.
4611 (dfs_count_virtuals): Likewise.
4612 (num_extra_vtbl_entries): Likewise.
4613 (size_extra_vtbl_entries): Likewise.
4614 (layout_virtual_bases): Iterate in inheritance graph order under
4616 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
4617 indicate that a vfield is present.
4618 (init_class_processing): Initialize access_public_node, etc., from
4620 (get_vtbl_decl_for_binfo): New function.
4621 (dump_class_hierarchy_r): Likewise.
4622 (dump_class_hierarchy): Use it.
4623 (finish_vtbls): Build the vtbls in inheritance graph order.
4624 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
4625 (initialize_vtable): Use get_vtbl_decl_for_binfo.
4626 (accumulate_vtbl_inits): Add comments explaining why a pre-order
4628 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
4629 where the vptr points, even for primary vtables.
4630 (build_vtbl_initializer): Adjust handling of vbase and vcall
4632 (build_vcall_and_vbase_vtable_entries): New function.
4633 (dfs_build_vbase_offset_vtbl_entries): Remove.
4634 (build_vbase_offset_vtbl_entries): Reimplement.
4635 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
4636 were already handled in a primary base class vtable.
4637 (build_vcall_offset_vtbl_entries): Adjust.
4638 (build_rtti_vtbl_entries): Adjust.
4639 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
4640 * init.c (expand_virtual_init): Simplify.
4641 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
4642 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
4643 * search.c (BINFO_ACCESS): New macro.
4644 (SET_BINFO_ACCESS): Likewise.
4645 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
4646 (access_in_type): Likewise.
4647 (dfs_accessible_p): Likewise.
4648 (protected_accessible_p): Likewise.
4649 (lookup_fnfields_1): Adjust documentation.
4650 (dfs_mark_primary_bases): Move to class.c
4651 (mark_primary_bases): Likewise.
4652 (dfs_vbase_unmark): Remove.
4653 (virtual_context): Use BINFO_FOR_VBASE.
4654 (dfs_get_vbase_types): Simplify.
4655 (dfs_build_inheritance_graph_order): New function.
4656 (get_vbase_types): Use it.
4657 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
4659 * tinfo.cc (get_vbase_offset): New function.
4660 (__vmi_class_type_info::do_find_public_src): Use it.
4661 (__vmi_class_type_info::do_dyncast): Likewise.
4662 (__vmi_class_type_info::do_upcast): Likewise.
4664 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
4666 * lang-specs.h: Pass -fno-show-column to the preprocessor.
4668 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
4670 * rtti.c (class_hint_flags): Rename flags.
4671 (class_initializer): Remove flags.
4672 (synthesize_tinfo_var): Combine offset and flags. Add flags
4673 for __vmi_class_type_info.
4674 (create_tinfo_types): Remove flags from __class_type_info and
4675 __si_class_type_info. Merge flags and offset from
4676 base_class_type_info.
4677 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
4678 (__base_class_info::is_virtual_p): Adjust.
4679 (__base_class_info::is_public_p): Adjust.
4680 (__base_class_info::offset): New accessor.
4681 (__class_type_info::details): Remove member.
4682 (__class_type_info::__class_type_info): Lose details.
4683 (__class_type_info::detail_masks): Remove.
4684 (__si_class_type_info::__si_class_type_info): Lose details.
4685 (__vmi_class_type_info::details): New member.
4686 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
4687 (__vmi_class_type_info::detail_masks): New member.
4688 * tinfo.cc (__class_type_info::do_upcast): Initialize result
4689 with unknown_details_mask.
4690 (__vmi_class_type_info::do_find_public_src): Adjust
4691 (__vmi_class_type_info::do_dyncast): Adjust.
4692 (__vmi_class_type_info::do_upcast): Set result details, if
4694 (__dynamic_cast): Temporarily #if out optimization.
4696 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
4698 * rtti.c (get_tinfo_decl): Mark used.
4699 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
4700 mark as dealt with, if we output it.
4702 2000-03-28 Mark Mitchell <mark@codesourcery.com>
4704 * class.c: Reorganize to put virtual function table initialization
4705 machinery at the end of the file.
4707 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
4709 * class.c (finish_struct): Use bitsize_zero_node.
4710 * pt.c (instantiate_class_template): Likewise.
4712 2000-03-28 Mark Mitchell <mark@codesourcery.com>
4714 Put RTTI entries at negative offsets in new ABI.
4715 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
4716 vbase offset at index -3, not -1.
4717 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
4718 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
4719 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
4720 (build_rtti_vtbl_entries): New function.
4721 (set_rtti_entry): Remove.
4722 (build_primary_vtable): Don't use it.
4723 (build_secondary_vtable): Likewise.
4724 (start_vtable): Remove.
4725 (first_vfun_index): New function.
4726 (set_vindex): Likewise.
4727 (add_virtual_function): Don't call start_vtable. Do call
4729 (set_primary_base): Rename parameter.
4730 (determine_primary_base): Likewise.
4731 (num_vfun_entries): Don't use skip_rtti_stuff.
4732 (num_extra_vtbl_entries): Include RTTI information.
4733 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
4734 (skip_rtti_stuff): Remove.
4735 (dfs_modify_vtables): Don't use it.
4736 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
4737 (layout_nonempty_base_or_field): Update size handling.
4738 (create_vtable_ptr): Tweak.
4739 (layout_class_type): Adjust parameter names.
4740 (finish_struct_1): Simplify.
4741 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
4742 (skip_rtti_stuff): Remove.
4743 (first_vfun_index): New function.
4744 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
4745 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
4746 (marked_vtable_pathp): Declare.
4747 (unmarked_vtable_pathp): Likewise.
4748 * error.c (dump_expr): Use first_vfun_index to calculate vtable
4750 * rtti.c (build_headof): Look for RTTI at negative offsets.
4751 (get_tinfo_decl_dynamic): Likewise.
4752 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
4754 (create_pseudo_type_info): Do it here instead. Adjust so that
4755 vptr points at first virtual function.
4756 * search.c (marked_vtable_pathp): Make it global.
4757 (unmarked_vtable_pathp): Likewise.
4758 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
4759 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
4760 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
4761 (get_pure_virtuals): Likewise.
4762 (expand_upcast_fixups): Likewise.
4763 * tree.c (debug_binfo): Likewise.
4764 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
4767 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4769 * class.c (check_field_decl): Fix typo.
4770 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
4771 (check_methods): Likewise.
4772 (check_field_decls): Likewise.
4773 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
4774 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
4775 Use DECL_RESULT_FLD, not DECL_RESULT.
4776 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
4777 * lex.c (identifier_type): Likewise.
4778 * pt.c (determine_specialization, lookup_template_class): Likewise.
4779 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
4780 (resolve_overloaded_unification, more_specialized): Likewise.
4781 * semantics.c (finish_member_declaration): Likewise.
4782 * typeck.c (build_x_function_call): Likewise.
4784 2000-03-26 Mark Mitchell <mark@codesourcery.com>
4786 * class.c (layout_empty_base): Handle empty bases with non-byte
4788 (build_base_field): Likewise.
4789 (layout_virtual_bases): Likewise.
4791 * class.c (finish_struct_1): Fix typo in this change:
4793 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4795 2000-03-25 Mark Mitchell <mark@codesourcery.com>
4797 * decl.c (grokdeclarator): Count partial specializations when
4798 keeping track of how many template classes have been seen.
4800 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
4802 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4804 * class.c (build_vbase_pointer_fields): layout_field now place_field.
4805 (get_vfield_offset): Use byte_position.
4806 (set_rtti_entry): Set OFFSET to ssizetype zero.
4807 (get_binfo_offset_as_int): Deleted.
4808 (dfs_record_base_offsets): Use tree_low_cst.
4809 (dfs_search_base_offsets): Likewise.
4810 (layout_nonempty_base_or_field): Reflect changes in RLI format
4811 and call byte_position.
4812 (layout_empty_base): Convert offset to ssizetype.
4813 (build_base_field): use rli_size_unit_so_far.
4814 (dfs_propagate_binfo_offsets): Do computation in proper type.
4815 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
4816 (layout_class_type): Reflect changes in RLI names and fields.
4817 (finish_struct_1): Set DECL_FIELD_OFFSET.
4818 * dump.c (dequeue_and_dump): Call bit_position.
4819 * expr.c (cplus_expand_constant): Use byte_position.
4820 * rtti.c (expand_class_desc): Use bitsize_one_node.
4821 * typeck.c (build_component_addr): Use byte_position and don't
4822 special case for zero offset.
4824 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
4826 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
4828 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
4830 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
4833 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
4835 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
4837 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
4838 make_typename_type, check_initializer, cp_finish_decl,
4839 xref_tag): Likewise.
4840 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
4841 decl_namespace, arg_assoc_template_arg, arg_assoc,
4842 validate_nonmember_using_decl, do_class_using_decl): Likewise.
4843 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
4844 args_to_string): Likewise.
4845 * friend.c (is_friend): Likewise.
4846 * lex.c (note_got_semicolon, note_list_got_semicolon,
4847 is_global): Likewise.
4848 * method.c (build_overload_nested_name, build_overload_value,
4849 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
4850 * parse.y (typename_sub, typename_sub1): Likewise.
4851 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
4852 process_partial_specialization, convert_template_argument,
4853 template_args_equal, add_pending_template, lookup_template_class,
4854 for_each_template_parm_r, maybe_fold_nontype_arg,
4855 tsubst, instantiate_template, type_unification_real, unify,
4856 instantiate_pending_templates, set_mangled_name_for_template_decl):
4858 * repo.c (repo_get_id, repo_template_used): Likewise.
4859 * search.c (lookup_field_1): Likewise.
4860 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
4861 * xref.c (classname): Likewise.
4863 2000-03-22 Mark Mitchell <mark@codesourcery.com>
4865 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
4866 (CANONICAL_BINFO): New macro.
4867 (BINFO_NEW_VTABLE_MARKED): Use it.
4868 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
4869 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
4870 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
4872 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4873 (build_secondary_vtable): Likewise.
4874 (dfs_finish_vtbls): Likewise.
4875 (dfs_accumulate_vtbl_inits): Likewise.
4876 (accumulate_vtbl_inits): New function.
4877 (finish_vtbls): Make sure that virtual bases come after
4878 non-virtual bases in the vtable group.
4879 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
4880 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4881 * search.c (struct vbase_info): Move definition.
4882 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4883 (unmarked_new_vtable_p): Likewise.
4884 (dfs_mark_vtable_path): Remove.
4885 (dfs_mark_new_vtable): Remove.
4886 (dfs_unmark_new_vtable): Likewise.
4887 (dfs_clear_search_slot): Likewise.
4888 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
4889 (dfs_clear_vbase_slots): Likewise.
4890 (init_vbase_pointers): LIkewise.
4892 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
4894 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
4895 SIZETYPE to a non-SIZETYPE.
4897 2000-03-21 Mark Mitchell <mark@codesourcery.com>
4899 * class.c (layout_virtual_bases): Adjust names in conditionally
4902 * class.c (record_base_offsets): New function.
4903 (layout_conflict_p): Likewise.
4904 (layout_nonempty_base_or_field): Use it.
4905 (layout_empty_base): New function.
4906 (build_base_field): Use it.
4907 (build_base_fields): Update comment.
4908 (layout_virtual_bases): Fold in a little code form
4909 layout_basetypes. Use layout_empty_base.
4910 (layout_basetypes): Remove.
4911 (end_of_class): New function.
4912 (layout_class_type): Use it. Adjust.
4914 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
4916 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
4918 (dfs_skip_nonprimary_vbases_markedp): Likewise.
4919 * typeck.c (fntype_p): Remove.
4921 * cp-tree.h (TI_SPEC_INFO): Remove.
4922 (CLASSTYPE_TI_SPEC_INFO): Likewise.
4923 * pt.c (process_partial_specialization): Likewise.
4925 * class.c (build_base_field): Fix thinko in computation of binfo
4928 * tree.c (mark_local_for_remap_p): Mark variables declared in
4929 TARGET_EXPRs as well.
4931 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
4933 * typeck.c (require_complete_type, complete_type,
4934 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
4935 build_array_ref, convert_arguments, pointer_diff,
4936 build_x_unary_op, build_unary_op, build_c_cast,
4937 build_modify_expr): Use COMPLETE_TYPE_P etc.
4938 * call.c (is_complete, convert_like_real,
4939 build_new_method_call): Likewise.
4940 * class.c (build_vbase_pointer_fields, check_bases,
4941 build_base_field, finish_struct_1, pushclass): Likewise.
4942 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
4943 * decl.c (maybe_process_template_type_declaration, pushtag,
4944 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
4945 layout_var_decl, check_initializer, cp_finish_decl,
4946 grokdeclarator, require_complete_types_for_parms,
4947 grok_op_properties, xref_tag, xref_basetypes,
4948 check_function_type): Likewise.
4949 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
4950 * friend.c (do_friend): Likewise.
4951 * init.c (build_offset_ref): Likewise.
4952 * parse.y (structsp): Likewise.
4953 * pt.c (maybe_process_partial_specialization,
4954 tsubst_friend_function, instantiate_class_template, tsubst,
4955 do_type_instantiation, instantiate_pending_templates): Likewise.
4956 * repo.c (repo_get_id): Likewise.
4957 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
4958 synthesize_tinfo_var, emit_support_tinfos): Likewise.
4959 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
4960 * semantics.c (begin_class_definition): Likewise.
4961 * tree.c (build_cplus_method_type): Likewise.
4962 * typeck2.c (digest_init, build_functional_cast,
4963 add_exception_specifier): Likewise.
4964 * parse.h, parse.c: Regenerated.
4966 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
4968 * inc/cxxabi.h: New header file. Define new-abi entry points.
4969 (__pointer_type_info::target): Rename member to ...
4970 (__pointer_type_info::type): ... here.
4971 (__base_class_info::type): Rename member to ...
4972 (__base_class_info::base): ... here.
4973 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
4974 * cp-tree.h (CPTI_ABI): New global tree enumeration.
4975 (abi_node): New global tree node.
4976 * decl.c (abi_node): Document.
4977 (init_decl_processing): Initialize abi_node.
4978 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
4979 (get_vmi_pseudo_type_info): Likewise.
4980 (create_tinfo_types): Likewise.
4981 (emit_support_tinfos): Likewise.
4982 * tinfo.h (cxxabi.h): Include for new-abi.
4983 Move rtti class definitions to new header file.
4984 * tinfo.cc (abi): Use the namespace.
4985 (std): Move new abi rtti classes from here ...
4986 (__cxxabiv1): ... to here.
4987 * tinfo2.cc (cxxabi.h): Include for new-abi.
4988 Move rtti class definitions to new header file.
4989 (std): Move new abi rtti classes from here ...
4990 (__cxxabiv1): ... to here.
4991 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
4994 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
4995 Jason Merrill <jason@casey.cygnus.com>
4997 * method.c (build_overload_int): Use host_integerp.
4999 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5001 * init.c (build_offset_ref): Handle the case of a templated member
5004 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5006 * except.c (expand_exception_blocks): Clear catch_clauses_last.
5008 2000-03-18 Mark Mitchell <mark@codesourcery.com>
5010 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
5011 * class.c (check_bitfield_decl): Turn illegal bitfields into
5013 (dfs_propagate_binfo_offsets): Adjust for new size_binop
5015 (dfs_offset_for_unshared_vbases): Likewise.
5016 * cvt.c (cp_convert_to_pointer): Convert NULL to a
5017 pointer-to-member correctly under the new ABI.
5018 * expr.c (cplus_expand_constant): Don't use cp_convert when
5019 turning an offset into a pointer-to-member.
5020 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
5021 when dereferencing them under the new ABI.
5022 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
5023 of pointers-to-members under the new ABI.
5025 * class.c (check_bitfield_decl): Remove restriction on really long
5027 (layout_class_type): Implement new ABI handling of bitfields
5028 longer than their types.
5030 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5032 * parse.y (extdefs): Call ggc_collect.
5033 * parse.c: Regenerated.
5035 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
5037 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
5038 (note_name_declared_in_class): Use OVL_CURRENT to get at a
5041 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5043 * class.c (build_vbase_path): Use integer_zerop.
5044 (build_vtable_entry): Use tree_low_cst.
5045 (get_vfield_offset): Use bit_position.
5046 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
5048 (check_bitfield_decl): Set DECL_SIZE using convert.
5049 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
5050 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
5052 (finish_struct_1): Use bit_position.
5053 (dump_class_hierarchy): Use tree_low_cst.
5054 * cp-tree.h (min_precision): Add declaration.
5055 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
5056 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
5057 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
5058 * expr.c (cplus_expand_constant): Use bit_position.
5059 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
5060 * rtti.c (get_base_offset): Use bit_position.
5061 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
5062 host_integerp, and tree_low_cst.
5063 (pointer_int_sum): Use integer_zerop.
5064 (build_component_addr): Use bit_position.
5066 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
5068 * typeck.c (require_complete_type): Don't assume size_zero_node.
5069 (complete_type_or_else): Likewise.
5071 2000-03-16 Steven Grady <grady@digitaldeck.com>
5072 Jason Merrill <jason@casey.cygnus.com>
5074 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
5076 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
5078 * decl2.c (grokfield): Bail out if type is error_mark_node.
5080 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
5082 * tinfo2.cc (__ptr_to_member_data): Rename to ...
5083 (__pointer_to_member_data): ... here. Adjust.
5084 * rtti.c (create_tinfo_types): Adjust.
5086 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
5088 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
5089 * decl.c (ref_desc_type_node): Undocument.
5090 * rtti.c (ptr_ref_initializer): Rename to ...
5091 (ptr_initializer): ... here. Adjust comments.
5092 (ptmd_initializer): Fix comment thinko.
5093 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
5094 (create_tinfo_types): Remove ref_desc_type_node init.
5095 * tinfo2.cc (__reference_type_info): Remove.
5097 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
5099 * decl.c (cp_finish_decl): Remove obsolete comment.
5101 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
5103 2000-03-14 Mark Mitchell <mark@codesourcery.com>
5105 * cp-tree.h: Tweak documentation.
5106 * class.c (build_vbase_pointer_fields): Layout the fields, too.
5107 (avoid_overlap): Remove.
5108 (get_binfo_offset_as_int): New function.
5109 (dfs_serach_base_offsets): Likewise.
5110 (layout_nonempty_base_or_field): Likewise.
5111 (build_base_field): Layout fields here. Avoid placing two objects
5112 of the same type at the same address, under the new ABI.
5113 (build_base_fields): Adjust accordingly.
5114 (create_vtable_ptr): Return the new field, but don't attach it to
5116 (remove_base_field): Remove.
5117 (remove_base_fields): Remove.
5118 (layout_basetypes): Adjust accordingly.
5119 (layout_class_type): Call layout_field for each field, rather than
5120 just making a wholesale call to layout_type.
5122 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
5124 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
5126 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
5128 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
5130 * except.c (dtor_nothrow): New fn.
5131 (do_pop_exception): Use it. Take type parm.
5132 (push_eh_cleanup): Take type parm.
5133 (expand_start_catch_block): Pass it.
5134 (build_eh_type_type_ref): Accept null type.
5136 2000-03-12 Mark Mitchell <mark@codesourcery.com>
5138 * cp-tree.h (revert_static_member_fn): Change prototype.
5139 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
5140 (grok_op_properties): Likewise.
5141 (start_function): Likewise.
5142 (revert_static_member_fn): Simplify.
5143 * pt.c (check_explicit_specialization): Adjust call to
5144 revert_static_member_fn.
5146 2000-03-11 Mark Mitchell <mark@codesourcery.com>
5148 * cp-tree.h (scope_kind): New type.
5149 (tmpl_spec_kind): Likewise.
5150 (declare_pseudo_global_level): Remove.
5151 (pseudo_global_level_p): Rename to template_parm_scope_p.
5152 (pushlevel): Remove declaration.
5153 (begin_scope): New function.
5154 (finish_scope): Likewise.
5155 (current_tmpl_spec_kind): Likewise.
5156 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
5157 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
5158 Add template_spec_p.
5159 (toplevel_bindings_p): Adjust.
5160 (declare_pseudo_global_level): Remove.
5161 (pseudo_global_level_p): Rename to template_parm_scope_p.
5162 (current_tmpl_spec_kind): New function.
5163 (begin_scope): Likewise.
5164 (finish_scope): Likewise.
5165 (maybe_push_to_top_level): Adjust.
5166 (maybe_process_template_type_declaration): Likewise.
5167 (pushtag): Likewise.
5168 (pushdecl_nonclass_level): Likewise.
5169 (lookup_tag): Likewise.
5170 (grokfndecl): Handle member template specializations. Share
5171 constructor and non-constructor code.
5172 * decl2.c (check_classfn): Handle member template specializations.
5173 * pt.c (begin_template_parm_list): Use begin_scope.
5174 (begin_specialization): Likewise.
5175 (end_specialization): Likewise.
5176 (check_explicit_specialization): Use current_tmpl_spec_kind.
5177 Handle member template specializations.
5178 (end_template_decl): Use finish_scope. Remove call to
5180 (push_template_decl_real): Remove bogus error message.
5181 (tsubst_decl): Fix typo in code contained in comment.
5182 (instantiate_template): Handle member template specializations.
5183 (most_general_template): Likewise.
5185 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
5187 * lex.c (whitespace_cr): Compress consecutive calls to warning().
5188 (do_identifier): Ditto for error().
5190 * pt.c (convert_nontype_argument): Ditto for cp_error().
5191 (convert_template_argument): Ditto for cp_pedwarn().
5193 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
5195 * exception.cc (__check_null_eh_spec): New fn.
5196 * except.c (expand_end_eh_spec): Call it if the spec is throw().
5198 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
5200 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
5201 * except.c (expand_end_eh_spec): Add the return type.
5202 * rtti.c (throw_bad_cast): Add the parmtypes.
5203 (throw_bad_typeid): Likewise.
5205 * semantics.c (expand_stmt): Only leave out rtl for unused
5206 artificials, and set DECL_IGNORED_P on them as well.
5207 * decl.c (wrapup_globals_for_namespace): Likewise.
5209 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
5211 * decl.c (maybe_commonize_var): Skip all artificial decls.
5212 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
5214 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
5216 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
5217 * cp-tree.h: Declare flag_enforce_eh_specs.
5218 * decl.c (store_parm_decls, finish_function): Check it.
5220 C library functions don't throw.
5221 * Makefile.in (cfns.h): New target.
5222 (except.o): Depend on it.
5223 * Make-lang.in (cc1plus): Depend on cfns.gperf.
5224 * cfns.gperf: New file.
5225 * cfns.h: Generated.
5226 * except.c: Include it.
5227 (nothrow_libfn_p): New fn.
5228 * decl.c (grokfndecl): Use it.
5229 * cp-tree.h: Declare it.
5231 * decl.c (push_overloaded_decl_1, auto_function,
5232 define_function): Lose.
5233 (build_library_fn_1): New static fn.
5234 (builtin_function): Use it.
5235 (get_atexit_node): Use build_library_fn_ptr.
5236 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
5237 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
5238 push_void_library_fn, push_throw_library_fn): New fns.
5239 * cp-tree.h: Declare them.
5240 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
5241 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
5242 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
5243 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
5244 * rtti.c (build_runtime_decl): Lose.
5245 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
5246 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
5247 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
5249 * call.c (build_call): Remove result_type parm.
5250 Call mark_used on unused artificial fns.
5251 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
5253 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
5255 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
5257 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
5258 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
5259 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
5260 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
5261 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5262 expand_generic_desc): Likewise.
5264 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
5266 * exception.cc (__cp_pop_exception): Cleanup the original object.
5268 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
5270 * decl.c (grok_op_properties): Merge conversion to void warning
5271 with other silly op warnings.
5273 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
5275 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
5276 array CONSTRUCTOR elements. Don't use expr_tree_cons.
5278 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
5280 * decl.c (cp_make_fname_decl): New function.
5281 (wrapup_globals_for_namespace): Don't emit unused static vars.
5282 (init_decl_processing): Remove comment about use of
5283 array_domain_type. Set make_fname_decl.
5284 (cp_finish_decl): Remove __FUNCTION__ nadgering.
5285 * semantics.c (begin_compound_stmt): Remove
5286 current_function_name_declared flagging.
5287 (expand_stmt): Don't emit unused local statics.
5288 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
5291 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
5293 * typeck.c (convert_for_assignment): Don't look at array
5295 * call.c (convert_like_real): Likewise.
5297 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
5299 Add initial support for '\uNNNN' specifier.
5300 * lex.c (read_ucs): New fn.
5301 (readescape, skip_white_space): Call it.
5302 (is_extended_char, is_extended_char_1): New fns.
5303 (utf8_extend_token): New fn, #if 0'd out.
5304 (real_yylex): Treat extended chars like letters.
5306 * search.c (note_debug_info_needed): Walk the bases even if we
5307 weren't deferring the type itself.
5309 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5311 * decl2.c (finish_objects): Constify a char*.
5313 * method.c (emit_thunk): Likewise.
5315 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
5317 * typeck.c (dubious_conversion_warnings): Look through
5320 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5322 * class.c (dfs_modify_vtables): I is now unsigned.
5323 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
5324 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
5325 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
5326 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
5327 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
5328 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
5329 Call integer_all_onesp.
5330 * typeck2.c (process_init_constructor): Use compare_tree_int.
5332 * lang-specs.h (as): Don't call if -syntax-only.
5334 2000-03-06 Mark Mitchell <mark@codesourcery.com>
5336 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
5337 RTL_EXPR_HAS_NO_SCOPE after all.
5339 2000-03-05 Mark Mitchell <mark@codesourcery.com>
5341 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
5342 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
5343 RTL_EXPR_HAS_NO_SCOPE.
5345 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
5348 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
5350 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
5352 * call.c (convert_like): Macrofy.
5353 (convert_like_with_context): New macro.
5354 (convert_like_real): Renamed from convert_like. Add calling
5355 context parameters, for diagnostics. Add recursive flag. Call
5356 dubious_conversion_warnings for outer conversion.
5357 (build_user_type_conversion): Use convert_like_with_context.
5358 (build_over_call): Likewise. Don't warn about dubious
5359 conversions here. Adjust convert_default_arg calls.
5360 (convert_default_arg): Add context parameters for diagnostics.
5361 Pass throught to convert_like_with_context.
5362 * cp-tree.h (convert_default_arg): Add context parameters.
5363 (dubious_conversion_warnings): Prototype new function.
5364 * typeck.c (convert_arguments): Adjust convert_default_arg call.
5365 (dubious_conversion_warnings): New function, broken
5366 out of convert_for_assignment.
5367 (convert_for_assignment): Adjust.
5369 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
5371 * decl2.c (key_method): Break out from...
5372 (import_export_vtable, import_export_class): ...here.
5374 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
5375 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
5377 * search.c (note_debug_info_needed, dfs_debug_mark,
5378 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
5379 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
5381 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
5383 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
5386 2000-03-02 Mark Mitchell <mark@codesourcery.com>
5388 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
5389 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
5390 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
5391 (lang_type): Split gets_new into has_new and has_array_new.
5392 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5393 (TYPE_GETS_NEW): Split into ...
5394 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
5395 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
5396 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
5397 (build_op_new_call): Don't declare.
5398 (build_new_1): Likewise.
5399 * call.c (build_op_new_call): Remove.
5400 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
5401 instead of TYPE_NEEDS_DESTRUCTOR.
5402 (finish_struct_bits): Likewise.
5403 (add_implicitly_declared_members): Likewise.
5404 (check_field_decl): Likewise.
5405 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
5406 correctly under the new ABI.
5407 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
5408 instead of TYPE_NEEDS_DESTRUCTOR.
5409 (initialize_local_var): Likewise.
5410 (destroy_local_var): Likewise.
5411 (cp_finish_decl): Likewise.
5412 (register_dtor_fn): Likewise.
5413 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
5414 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
5415 TYPE_VEC_DELETE_TAKES_SIZE here.
5416 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
5417 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
5418 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5419 (finish_destructor_body): Likewise.
5420 (maybe_build_cleanup_1): Likewise.
5421 * decl2.c (do_static_destruction): Likewise.
5422 * init.c (build_new_1): Make it static.
5423 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5424 (expand_cleanup_for_base): Likewise.
5425 (get_cookie_size): New function.
5426 (build_new_1): Handle array-new cookies correctly under the new
5428 (build_vec_delete_1): Likewise.
5429 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5430 (build_delete): Likewise.
5431 (build_vec_delete): Handle array-new cookies correctly under the new
5433 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5434 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
5435 TYPE_HAS_ARRAY_NEW_OPERATOR.
5436 * ptree.c (print_lang_type): Check them.
5437 * search.c (context_for_name_lookup): Fix typo in comment.
5438 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
5439 * tree.c (break_out_cleanups): Likewise.
5440 (build_cplus_array_test_1): Likewise.
5441 (cp_build_qualified_type_real): Likewise.
5442 * typeck.c (complete_type): Likewise.
5444 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
5445 the command-line, not the end.
5447 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
5449 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
5451 2000-03-02 Tom Tromey <tromey@cygnus.com>
5453 * cp-tree.h (build_java_class_ref): Declare.
5454 * init.c (build_java_class_ref): No longer static.
5455 * except.c (expand_throw): Generate a Java-style `throw' if the
5456 thrown object is a "Java" object.
5457 (initialize_handler_parm): Generate a Java-style lookup of
5458 exception info if the caught object is a "Java" object.
5459 (catch_language, catch_language_init): New globals.
5460 (decl_is_java_type): New function.
5461 (expand_start_catch_block): Don't call push_eh_info() or
5462 push_eh_cleanup() when handling a Java-style "catch". Pass Java
5463 class reference to build_catch_block.
5465 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5467 * typeck.c (comptypes): Treat sizetype like its language equivalent.
5469 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
5471 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
5472 to merge reference/pointer code and fix incorrect warnings.
5474 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
5476 * search.c (protected_accessible_p): Use context_for_name_lookup.
5478 * init.c (construct_virtual_bases): Fix thinko.
5479 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
5481 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
5483 * decl.c (current_function_decl): Move to toplev.c.
5485 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
5487 * pt.c (fn_type_unification): Unify return type, whenever
5489 (get_bindings_real): Only pass return type when necessary.
5490 Remove explicit return type check.
5491 * class.c (resolve_address_of_overloaded_function): Pass desired
5492 return type to fn_type_unification.
5494 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5496 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
5498 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
5500 * rtti.c (expand_class_desc): Likewise.
5501 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
5502 (THUNK_VCALL_OFFSET): Likewise.
5503 (THUNK_DELTA): Reflect changes in ../tree.h.
5505 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
5507 * search.c (protected_accessible_p): Also allow the access if
5508 the member is public in DERIVED. Lose TYPE parm.
5509 (friend_accessible_p): Lose TYPE parm.
5510 (accessible_p): Adjust.
5512 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5514 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
5515 on things that are not sizes; ssize_binop deleted.
5516 Call size_diffop when appropriate.
5517 (dfs_build_vcall_offset_vtbl_entries): Likewise.
5518 (build_primary_vtable, build_secondary_vtable): Likewise.
5519 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
5520 Variable I is HOST_WIDE_INT.
5521 (get_vfield_offset): Pass proper types to size_binop.
5522 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
5523 (finish_struct_1): Likewise.
5524 (skip_rtti_stuff): Arg N is now pointer to signed.
5525 (layout_class_type): Use size_zero_node.
5526 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
5527 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
5528 * decl.c (complete_arry_type): Pass proper types to size_binop.
5529 (xref_basetypes): BINFO_OFFSET is sizetype.
5530 * error.c (dump_expr): Don't use size_binop non-sizes.
5531 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
5532 * init.c (construct_virtual_bases): Fix type error.
5533 (build_vec_delete_1): Pass proper type to size_binop and don't
5535 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
5536 * rtti.c (get_base_offset): Pass proper type to size_binop.
5537 * search.c (dfs_find_vbases): Fix type error.
5538 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
5539 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
5540 * tree.c (debug_binfo): Variable N is signed.
5541 Use HOST_WIDE_INT_PRINT_DEC.
5542 * typeck.c (comptypes): sizetype is same as equivalent integer type.
5543 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
5544 size_one_node and size_zero_node.
5545 (c_alignof): Use size_one_node.
5546 (build_component_addr): Pass proper types to size_binop.
5547 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
5549 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
5551 Implement class scope using-declarations for functions.
5552 * class.c (handle_using_decl): Call add_method for used functions.
5553 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
5554 (add_method): Used functions are hidden by local functions.
5555 (check_bases_and_members): Handle using-decls before finalizing
5556 CLASSTYPE_METHOD_VEC.
5557 * call.c (add_function_candidate): Add ctype parm; if non-zero,
5558 override the type of 'this' accordingly.
5559 (add_template_candidate, add_template_candidate_real): Add ctype parm.
5560 (convert_class_to_reference, build_user_type_conversion_1,
5561 build_new_function_call, build_object_call, build_new_op,
5562 build_new_method_call): Pass ctype parm.
5564 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
5566 * call.c (convert_class_to_reference, build_user_type_conversion_1,
5567 build_new_function_call, build_object_call, build_new_op,
5568 build_new_method_call, build_op_delete_call): Don't get basetype_path
5570 * typeck.c (build_component_ref): Likewise.
5571 * init.c (build_offset_ref): Likewise.
5572 (resolve_offset_ref): Don't call enforce_access.
5573 Call build_scoped_ref.
5574 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
5575 would cause an error or if -pedantic.
5576 * class.c (alter_access): Lose binfo parm.
5578 2000-02-26 Mark Mitchell <mark@codesourcery.com>
5580 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
5583 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
5585 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
5586 pseudo_type_info creation into the std namespace
5588 2000-02-26 Mark Mitchell <mark@codesourcery.com>
5590 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
5591 (import_export_class): Remove declaration.
5592 * decl2.c (import_export_class): Make it static.
5593 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
5594 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
5595 EXPR_WITH_FILE_LOCATION.
5596 * lex.c (check_newline): Tweak filename/lineno setting.
5597 * semantics.c (begin_while_stmt): Fix typo in comment.
5599 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5601 * lang-options.h (-fmessage-length=): Add missing option.
5603 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
5605 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
5607 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
5609 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
5611 * optimize.c (expand_call_inline): Emit the return label before
5612 evaluating the return value.
5614 2000-02-24 Mark Mitchell <mark@codesourcery.com>
5616 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
5617 than duplicating functionality here.
5618 * optimize.c: Include input.h.
5619 (expand_call_inline): Use push_srcloc and pop_srcloc.
5620 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
5621 * parse.c: Regenerated.
5622 * Makefile.in (lex.o): Depend on input.h.
5623 (optimize.o): Likewise.
5625 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
5627 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
5628 function type, rather than ICE.
5630 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
5632 * decl.c (grokdeclarator): Call decl_type_access_control.
5633 * parse.y (parse_end_decl): Don't call decl_type_access_control if
5636 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
5638 * decl.c (decls_match): Remove obsolete static member nadgering.
5640 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5642 * decl.c (grokdeclarator): Change ANSI to ISO.
5643 * lex.c (consume_string, readescape, do_identifier): Likewise.
5644 (parse_float, real_yylex): Likewise.
5645 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
5646 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
5647 new_type_id, maybe_label_decls, simple_stmt,
5648 for.init.statement): Likewise.
5649 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
5650 * semantics.c (finish_named_return_value): Likewise.
5651 * parse.c: Regenerate.
5653 2000-02-21 Mark Mitchell <mark@codesourcery.com>
5655 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
5656 (CPTI_CLASS_STAR_TYPE): Remove.
5657 (vtable_index_type): Likewise.
5658 (class_star_type_node): Remove.
5659 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
5660 (build_binary_op_nodefault): Remove.
5661 * call.c (build_new_op): Use build_binary_op instead of
5662 build_binary_op_nodefault.
5663 * decl.c (init_decl_processing): Remove class_star_type_node
5664 initialization. Make delta_type_node ptrdiff_type_node under the
5665 new ABI. Initialize vtable_index_type.
5666 (build_ptrmemfunc_type): Build different structures for the new
5668 (build_enumerator): Use build_binary_op instead of
5669 build_binary_op_nodefault.
5670 * method.c (build_overload_value): Mangle pointers-to-members
5671 appropriately under the new ABI.
5672 * typeck.c (build_array_ref): Use build_binary_op instead of
5673 build_binary_op_nodefault.
5674 (get_member_function_from_ptrfunc): Adjust for the new ABI.
5675 (build_binary_op_nodefault): Rename to ...
5676 (build_binary_op): ... this. Remove old version. Adjust for
5677 pointer-to-member comparisons under the new ABI.
5678 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
5679 (build_ptrmemfunc): Adjust for the new ABI.
5680 (expand_ptrmemfunc_cst): Likewise.
5681 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
5682 (pfn_from_ptrmemfunc): Adjust for the new ABI.
5684 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
5686 * call.c (build_object_call): Compress consecutive calls to
5688 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
5689 (build_op_delete_call): Adjust message formatting.
5691 * class.c (check_bases): Compress consecutive calls to
5693 (finish_struct_anon): Say 'ISO C++'.
5695 * decl.c (start_decl): Same here.
5696 (grok_reference_init): Likewise.
5697 (grokfndecl): Correct message formatting.
5698 (grokfndecl): Improve diagnostic.
5699 (check_static_variable_definition): Likewise. Say 'ISO C++'
5700 (compute_array_index_type): Say 'ISO C++'
5701 (create_array_type_for_decl): Compress consecutive calls to
5703 (grokdeclarator): Say 'ISO C++'
5704 (grok_op_properties): Likewise.
5706 * decl2.c (delete_sanity): Clairify diagnostic.
5707 (check_member_template): Same here.
5708 (grok_function_init): Use consistent terminology.
5710 * expr.c (do_case): Say 'ISO C++'
5712 * friend.c (do_friend): Compress consecutive calls to warning.
5714 2000-02-20 Mark Mitchell <mark@codesourcery.com>
5716 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
5717 * class.c (build_secondary_vtable): Reorganize. Don't create a
5718 new vtable under the new ABI.
5719 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
5721 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
5722 the initializing elements.
5723 (initialize_vtable): New function.
5724 (dfs_finish_vtbls): Use it.
5725 (dfs_accumulate_vtbl_inits): New function.
5726 (finish_vtbls): Merge primary and secondary vtables under the new
5728 (finish_struct_1): Remove redundant call to layout_vtable_decl.
5729 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
5732 * class.c (build_vtable): New function, split out from ...
5733 (get_vtable_decl): ... here, and ...
5734 (build_secondary_vtable): ... here.
5736 * pt.c (tsubst_decl): Fix formatting.
5738 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5740 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
5741 (avoid_overlap, build_base_field): Likewise.
5742 (build_base_field, build_base_fields, is_empty_class):
5743 Test DECL_SIZE with integer_zero.
5744 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
5745 * cp-tree.h (struct lang_type): New field size_unit.
5746 (CLASSTYPE_SIZE_UNIT): New macro.
5747 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
5748 (cp_finish_decl): Delete -Wlarger-than processing.
5749 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
5750 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
5751 * tree.c (make_binfo): binfo vector is one entry longer.
5752 (walk_tree): Walk DECL_SIZE_UNIT.
5754 2000-02-19 Mark Mitchell <mark@codesourcery.com>
5756 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
5758 (build_vtable_entry): Don't assume all vtable entries are
5760 (build_vtbl_initializer): Adjust accordingly.
5761 (get_vtable_decl): Fix formatting.
5763 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
5765 * semantics.c (deferred_type_access_control): Walk the entire
5767 (save_type_access_control): Rename from
5768 initial_deferred_type_access_control. Just remember the value.
5769 (decl_type_access_control): New fn.
5770 (begin_function_definition): Use deferred_type_access_control, after
5771 we've started the function. Set type_lookups to error_mark_node.
5772 * parse.y (frob_specs, fn.def1): Adjust.
5773 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
5774 (parse_end_decl, parse_bitfield0, parse_method): New fns.
5775 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
5776 (after_type_component_declarator0): Likewise.
5777 (after_type_component_declarator): Likewise.
5778 (notype_component_declarator): Likewise.
5779 * cp-tree.h: Adjust.
5781 * decl.c (redeclaration_error_message): Allow redeclaration of
5782 namespace-scope decls.
5784 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
5786 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
5788 2000-02-17 Mark Mitchell <mark@codesourcery.com>
5790 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
5791 * decl2.c (grokclassfn): Likewise.
5793 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
5795 * decl2.c (lang_decode_option): Don't set default message length
5797 * lex.c (lang_init_options): Set it here.
5799 2000-02-16 Mark Mitchell <mark@codesourcery.com>
5801 Make DECL_CONTEXT mean the class in which a member function was
5802 declared, even for a virtual function.
5803 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
5804 (DECL_FRIEND_CONTEXT): New macro.
5805 (DECL_REAL_CONTEXT): Remove.
5806 (SET_DECL_FRIEND_CONTEXT): Likewise.
5807 (DECL_VIRTUAL_CONTEXT): Adjust.
5808 (DECL_CLASS_SCOPE_P): Use TYPE_P.
5809 (add_friends): Remove.
5810 (hack_decl_function_context): Likewise.
5811 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
5813 (build_over_call): Fix indentation. Use DECL_CONTEXT
5814 instead of DECL_CLASS_CONTEXT.
5815 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
5816 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
5817 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5818 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
5819 (build_base_field): Likewise.
5820 (finish_struct_1): Likewise.
5821 (build_self_reference): Likewise.
5822 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
5824 (pushtag): Use decl_function_context, not
5825 hack_decl_function_context.
5826 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
5827 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
5828 (pushdecl): Remove bogus code.
5829 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
5830 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
5831 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5832 Use decl_function_context, nothack_decl_function_context.
5833 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
5834 (grokdeclarator): Likewise. Use decl_function_context, not
5835 hack_decl_function_context.
5836 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
5837 (start_function): Use DECL_FRIEND_CONTEXT, not
5838 DECL_CLASS_CONTEXT. Use decl_function_context, not
5839 hack_decl_function_context.
5840 (finish_function): Use decl_function_context, not
5841 hack_decl_function_context.
5842 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
5844 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
5845 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
5846 (grokfield): Likewise.
5847 (finish_builtin_type): Likewise.
5848 (finish_vtable_vardec): Use decl_function_context, not
5849 hack_decl_function_context.
5850 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5851 (start_static_initialization_or_destruction): Likewise.
5852 (finish_static_initialization_or_destruction): Likewise.
5853 (mark_used): Adjust logic for deciding when to synthesize methods.
5854 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
5856 * error.c (dump_function_decl): Use DECL_CONTEXT, not
5858 * friend.c (is_friend): Likewise.
5859 (add_friends): Remove.
5860 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
5861 * lex.c (begin_definition_of_inclass_inline): Use
5862 decl_function_context, not hack_decl_function_context.
5863 (process_next_inline): Likewise.
5864 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
5865 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
5866 DECL_CLASSS_CONTEXT.
5867 (hack_identifier): Likewise.
5868 (synthesize_method): Use decl_function_context, not
5869 hack_decl_function_context.
5870 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
5872 (is_member_template): Use decl_function_context, not
5873 hack_decl_function_context. Use DECL_CONTEXT, not
5875 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
5877 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
5879 (push_template_decl_real): Likewise.
5880 (instantiate_class_template): Don't call add_friends.
5881 (tsubst_default_argument): Use DECL_CONTEXT, not
5883 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
5884 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5885 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
5887 * repo.c (repo_inline_used): Likewise.
5888 * search.c (current_scope): Adjust for new _CONTEXT macros.
5889 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
5891 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
5892 (lookup_fnfields_here):Likewise.
5893 (check_final_overrider): Likewise.
5894 (init_vbase_pointers): Likewise.
5895 (virtual_context): Likewise.
5896 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
5897 (expand_body): Use decl_function_context, not
5898 hack_decl_function_context.
5899 * tree.c (hack_decl_function_context): Remove.
5900 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
5902 * typeck2.c (error_not_base_type): Likewise.
5904 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
5906 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
5908 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5910 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
5912 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
5914 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
5916 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
5918 * decl2.c (lang_decode_option): Enable automatic line wrapping.
5920 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
5922 * parse.y (frob_specs): Split out...
5923 (parse_decl): From here.
5924 (fn.def2): Call initial_deferred_type_access_control.
5925 (after_type_component_declarator0): Call frob_specs.
5926 (notype_component_declarator0): Likewise.
5927 * search.c (friend_accessible_p): Nested classes are friends of their
5930 2000-02-10 Mark Mitchell <mark@codesourcery.com>
5932 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
5933 used to create an implicit temporary.
5935 * class.c (dfs_modify_vtables): Tweak calculation of functions to
5938 2000-02-08 Nathan Sidwell <nathan@acm.org>
5940 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
5941 strip array element qualifiers too.
5943 2000-02-07 Mark Mitchell <mark@codesourcery.com>
5945 * decl.c (store_parm_decls): Don't build cleanups for parameters
5946 while processing_template_decl.
5948 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
5950 * cp-tree.h (struct saved_scope): Add incomplete field.
5951 (namespace_scope_incomplete): New macro.
5952 * decl.c (pushdecl): Use it.
5953 (hack_incomplete_structures): Use it. See through artificial
5955 (mark_saved_scope): Mark it.
5957 Implement access control for nested types.
5958 * search.c (type_access_control): New fn.
5959 (accessible_p): Now we do perform access control for types.
5960 * semantics.c (deferred_type_access_control): New fn.
5961 (initial_deferred_type_access_control): New fn.
5962 (begin_function_definition): Call it. Add lookups parm.
5963 * decl.c (struct binding_level): Add this_class field.
5964 (pushlevel_class): Set it.
5965 (mark_binding_level): Mark it.
5966 (lookup_name_real): Use it. Call type_access_control.
5967 (mark_saved_scope): Mark lookups field.
5968 * cp-tree.h (flagged_type_tree): Add lookups field.
5969 (struct saved_scope): Add lookups field.
5970 (type_lookups): New macro.
5971 * parse.y (declmods): Now <ftype>.
5972 (parse_decl): Add lookups parm. Call
5973 initial_deferred_type_access_control.
5974 (lang_extdef): Clear type_lookups.
5975 (typed_declspecs, declmods, typespec): Set lookups field.
5976 (initdcl): Call deferred_type_access_control.
5977 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
5978 component_decl_1, named_parm): Adjust.
5979 * friend.c (is_friend): Nested classes are friends of their
5982 * class.c (currently_open_derived_class): New fn.
5983 * method.c (hack_identifier): Use it.
5985 * lex.c (do_identifier): Remove obsolete code.
5987 * parse.y (typed_typespecs): Propagate new_type_flag properly.
5989 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
5991 * tinfo.h: Remove apostrophes from C++ comment (xgettext
5992 thinks this file is plain C).
5994 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5996 * Makefile.in (call.o): Depend on $(EXPR_H).
5998 * call.c: Include "expr.h".
6000 * class.c (dump_class_hierarchy): Add prototype.
6002 * search.c (dfs_get_pure_virtuals): Likewise.
6004 2000-02-1 Ulrich Drepper <drepper@redhat.com>
6006 * parse.y (simple_stmt): Allow :: token in asm parameter list.
6009 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
6011 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
6012 Store it in DECL_FCONTEXT.
6013 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
6015 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
6017 * tinfo.h (old abi): #include "tconfig.h".
6018 * tinfo.cc (convert_to_base): Move into old abi section.
6020 2000-01-31 Mark Mitchell <mark@codesourcery.com>
6022 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
6023 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
6024 (BINFO_PRIMARY_BINFO): New macro.
6025 (BF_DELTA): Rename to ...
6026 (BV_DELTA): ... this.
6027 (BF_VCALL_INDEX): Rename to ...
6028 (BV_VCALL_INDEX): ... this.
6029 (BF_FN): Rename to ...
6031 * class.c (build_vbase_path): Adjust for changes to reverse_path.
6032 (set_rtti_entry): Rename BF_ macros to BV_ variants.
6033 (modify_vtable_entry): Simplify.
6034 (add_virtual_function): Rename BF_ macros to BV_ variants.
6035 (build_vtable_initializer): Likewise.
6036 (get_class_offset_1): Remove.
6037 (dfs_get_class_offset): Likewise.
6038 (get_class_offset): Likewise.
6039 (dfs_find_final_overrider): New function.
6040 (find_final_overrider): Likewise.
6041 (modify_one_vtable): Remove.
6042 (dfs_find_base): New function.
6043 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
6044 find_final_overrider.
6045 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
6047 (dfs_fixup_vtable_deltas): Remove.
6048 (override_one_vtable): Remove.
6049 (merge_overrides): Likewise.
6050 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
6051 unreal chilren of virtual bases.
6052 (finish_struct_1): Don't use merge_overrides. Don't use
6053 dfs_fixup_vtable_deltas.
6054 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
6057 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
6058 Jason Merrill <jason@yorick.cygnus.com>
6060 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
6062 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
6064 * exception.cc (__throw_bad_typeid): Add missing std::.
6066 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6068 * cp-tree.h (make_thunk): PROTO -> PARAMS.
6070 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
6072 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
6074 Runtime support for new-abi rtti.
6075 * inc/typeinfo (type_info::operator!=): Define in class.
6076 (type_info::before, type_info::name, type_info::operator==,
6077 type_info::operator!=): Define new ABI implementations.
6078 (type_info::is_pointer_p, type_info::is_function_p): Declare
6079 new virtual functions.
6080 (type_info::do_catch, type_info::do_upcast): Likewise.
6082 * tinfo.h (__base_class_info): Define new class.
6083 (__class_type_info): Likewise.
6084 (__si_class_type_info): Likewise.
6085 (__vmi_class_type_info): Likewise.
6086 (__dynamic_cast): Prototype.
6088 * tinfo.cc: Conditionalize old and new rtti mechanisms.
6089 (type_info::is_pointer_p): Define new function.
6090 (type_info::is_function_p): Likewise.
6091 (type_info::do_catch): Likewise.
6092 (type_info::do_upcast): Likewise.
6093 (vtable_prefix): New structure for vtable access.
6094 (adjust_pointer): Define new template function.
6095 (contained_p, public_p, virtual_p, contained_public_p,
6096 contained_nonpublic_p, contained_nonvirtual_p): Define new
6098 (nonvirtual_base_type): New local variable.
6099 (__class_type_info::~__class_type_info): Define.
6100 (__si_class_type_info::~__si_class_type_info): Likewise.
6101 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
6102 (__class_type_info::do_catch): Define new function.
6103 (__class_type_info::do_upcast): Likewise.
6104 (__class_type_info::find_public_src): Likewise.
6105 (__class_type_info::do_find_public_src): Likewise.
6106 (__si_class_type_info::do_find_public_src): Likewise.
6107 (__vmi_class_type_info::do_find_public_src): Likewise.
6108 (__class_type_info::do_dyncast): Likewise.
6109 (__si_class_type_info::do_dyncast): Likewise.
6110 (__vmi_class_type_info::do_dyncast): Likewise.
6111 (__class_type_info::do_upcast): Likewise.
6112 (__si_class_type_info::do_upcast): Likewise.
6113 (__vmi_class_type_info::do_upcast): Likewise.
6114 (__dynamic_cast): Likewise.
6116 * tinfo2.cc (__fundamental_type_info): Define new class.
6117 (__pointer_type_info): Likewise.
6118 (__reference_type_info): Likewise.
6119 (__array_type_info): Likewise.
6120 (__function_type_info): Likewise.
6121 (__enum_type_info): Likewise.
6122 (__ptr_to_member_type_info): Likewise.
6123 (__fundamental_type_info::~__fundamental_type_info): Define.
6124 (__pointer_type_info::~__pointer_type_info): Likewise.
6125 (__reference_type_info::~__reference_type_info): Likewise.
6126 (__array_type_info::~__array_type_info): Likewise.
6127 (__function_type_info::~__function_type_info): Likewise.
6128 (__enum_type_info::~__enum_type_info): Likewise.
6129 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
6130 (__pointer_type_info::do_catch): Define new function.
6131 (__ptr_to_member_type_info::do_catch): Define new function.
6133 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
6134 (__is_pointer): Likewise.
6136 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
6138 2000-01-30 Mark Mitchell <mark@codesourcery.com>
6140 * cp/class.c (build_vtable): Rename to build_primary_vtable.
6141 (prepare_fresh_vtable): Rename to build_secondary_vtable.
6142 (make_new_vtable): New function.
6143 (modify_vtable_entry): Handle generation of new vtables correctly.
6144 (modify_one_vtable): Remove unused parameter.
6145 (dfs_fixup_vtable_deltas): Likewise.
6146 (override_one_vtable): Use build_secondary_vtable.
6147 (finish_struct_1): Use build_primary_vtable and
6148 build_secondary_vtable.
6150 2000-01-28 Ulrich Drepper <drepper@redhat.com>
6152 * cp/decl.c: Adjust variable names, comments, help strings.
6154 2000-01-29 Nathan Sidwell <nathan@acm.org>
6156 * new2.cc (operator delete[]): Use operator delete, don't assume
6159 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
6161 * class.c (build_vtbl_initializer): Add argument to
6162 build_vtable_entry call.
6164 2000-01-27 Mark Mitchell <mark@codesourcery.com>
6166 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
6167 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
6168 (BF_DELTA): New macro.
6169 (BF_VCALL_INDEX): Likewise.
6171 (THUNK_VCALL_OFFSET): Likewise.
6172 (make_thunk): Change prototype.
6173 * class.c (build_vtable_entry): Integrate
6174 build_vtable_entry_for_fn. Handle vcall indices.
6175 (build_vtable_entry_for_fn): Remove.
6176 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
6177 BF_VCALL_INDEX, BF_FN.
6178 (modify_vtable_entry): Integrate common code from
6179 modify_one_vtable and dfs_fixup_vtable_deltas.
6180 (add_virtual_function): Set BF_VCALL_INDEX.
6181 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
6183 (modify_one_vtable): Simplify.
6184 (dfs_fixup_vtable_deltas): Likewise.
6185 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
6186 * method.c (make_thunk): Handle vcall indices.
6188 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
6190 Compiler side new abi rtti (not enabled).
6191 * cp-tree.h (new_abi_rtti_p): New macro.
6192 (emit_support_tinfos): Prototype new function.
6193 (tinfo_decl_p): Likewise.
6194 (emit_tinfo_decl): Likwise.
6195 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
6197 (doing_runtime): New local static.
6198 (init_rtti_processing): Add new-abi initializer.
6199 (get_tinfo_decl): Add new-abi logic.
6200 (tinfo_from_decl): Likewise.
6201 (build_dynamic_cast_1): Likewise.
6202 (qualifier_flags): New static function.
6203 (tinfo_base_init): Likewise.
6204 (generic_initializer): Likewise.
6205 (ptr_ref_initializer): Likewise.
6206 (ptmd_initializer): Likewise.
6207 (class_hint_flags): Likewise.
6208 (class_initializer): Likewise.
6209 (synthesize_tinfo_var): Likewise.
6210 (create_real_tinfo_var): Likewise.
6211 (create_pseudo_type_info): Likewise.
6212 (get_vmi_pseudo_type_info): Likewise.
6213 (create_tinfo_types): Likewise.
6214 (emit_support_tinfos): New global function.
6215 (tinfo_decl_p): New global predicate.
6216 (emit_tinfo_decl): New global function.
6217 * class.c (set_rtti_entry): Generalize for old and new rtti.
6218 (build_vtbl_initializer): Likewise.
6219 * decl2.c (finish_file): Likewise.
6221 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
6223 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
6224 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
6226 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
6228 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
6231 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
6233 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
6235 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
6237 * optimize.c (calls_setjmp_r): Supply new argument
6238 to special_function_p.
6240 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6242 * call.c: PROTO -> PARAMS.
6243 * class.c: Likewise.
6244 * cp-tree.h: Likewise.
6248 * decl2.c: Likewise.
6250 * errfn.c: Likewise.
6251 * error.c: Likewise.
6252 * except.c: Likewise.
6255 * input.c: Likewise.
6258 * method.c: Likewise.
6259 * optimize.c: Likewise.
6260 * parse.y: Likewise.
6264 * search.c: Likewise.
6265 * semantics.c: Likewise.
6268 * typeck.c: Likewise.
6269 * typeck2.c: Likewise.
6272 2000-01-25 Richard Henderson <rth@cygnus.com>
6274 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
6276 2000-01-25 Mark Mitchell <mark@codesourcery.com>
6278 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
6279 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
6280 (struct vcall_offset_data_s): New type.
6281 (dfs_vcall_offset_queue_p): New function.
6282 (dfs_build_vcall_offset_vtbl_entries): Likewise.
6283 (build_vcall_offset_vtbl_entries): Likewise.
6284 (layout_vtable_decl): Likewise.
6285 (num_vfun_entries): Likewise.
6286 (num_extra_vtbl_entries): Add the entries for vcall offsets.
6287 (build_vtbl_initializer): Likewise.
6288 (dfs_finish_vtabls): Use layout_vtable_decl.
6289 (modify_one_vtables): Always duplicate vtables under the new ABI.
6290 (finish_struct_1): Use layout_vtable_decl.
6292 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6294 * decl.c (member_function_or_else): Change third arg from a format
6295 specifier to an `enum overload_flags'. Callers changed.
6297 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
6299 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
6300 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
6301 build_const_cast, get_delta_difference, check_return_expr): Avoid
6302 ANSI string concatenation usage.
6304 2000-01-24 Mark Mitchell <mark@codesourcery.com>
6306 * class.c (layout_class_type): Put the fields required to make a
6307 class non-empty at the end, not the beginning, of the TYPE_FIELDs
6310 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
6312 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
6315 * decl2.c (mark_used): Do instantiate inlines that have been
6316 explicitly instantiated.
6318 2000-01-24 Richard Henderson <rth@cygnus.com>
6320 * call.c (build_over_call): Use expand_tree_builtin.
6321 * typeck.c (build_function_call_real): Likewise.
6322 (build_binary_op_nodefault): Handle unordered compares.
6324 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
6326 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
6327 cp_tree_index values.
6328 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
6329 New global node #defines for them.
6330 * rtti.c (call_void_fn): Replace with ...
6331 (build_runtime_decl): ... new static function.
6332 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
6333 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
6334 (build_dynamic_cast_1): Always produce correctly typed result.
6335 Explicitly produce type_info addresses. Use dynamic_cast_node.
6336 * exception.cc (__throw_bad_cast): Return `void *'.
6337 (__throw_bad_typeid): Return `const type_info &'.
6339 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
6341 * cp-tree.h (get_vtable_decl): Prototype new function.
6342 * class.c (get_vtable_decl): New function. Broken out from ...
6343 (build_vtable): ... here. Use it.
6344 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
6347 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
6349 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
6350 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
6351 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
6352 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
6353 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
6354 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
6355 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
6356 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
6357 (CPTI_TINFO_VAR_ID): New enumeration.
6358 (__tp_desc_type_node, __access_mode_type_node,
6359 __bltn_desc_type_node, __user_desc_type_node,
6360 __class_desc_type_node, __ptr_desc_type_node,
6361 __attr_desc_type_node, __func_desc_type_node,
6362 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
6363 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
6364 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
6365 enum_desc_type_node, class_desc_type_node,
6366 si_class_desc_type_node, vmi_class_desc_type_node,
6367 ptmd_desc_type_node, base_desc_type_node): New #defines.
6368 (tinfo_fn_id, tinfo_fn_type): Rename to ...
6369 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
6370 (tinfo_var_id): New enumeration.
6371 (DECL_TINFO_FN_P): Augment comment.
6372 * decl.c (cp_global_trees): Adjust documentation.
6373 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
6374 tinfo_decl_type and tinfo_var_id.
6375 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
6376 (build_typeid): Remove unused variable.
6377 (get_tinfo_var): Use tinfo_var_id.
6378 (tinfo_name): New static function.
6379 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
6380 (tinfo_from_decl): Likewise.
6381 (get_base_offset): New static function, broken out of
6383 (expand_si_desc): Use tinfo_name.
6384 (expand_class_desc): Likewise. Lose local static variable.
6385 Use base_desc_type_node. Use get_base_offset.
6386 (expand_ptr_desc): Use tinfo_name.
6387 (expand_attr_desc): Likewise.
6388 (expand_generic_desc): Likewise.
6390 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
6391 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
6393 2000-01-23 Mark Mitchell <mark@codesourcery.com>
6395 * cp-tree.h (__eprintf): Remove declaration.
6396 * tree.c (__eprintf): Remove definition.
6398 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
6399 Mark Mitchell <mark@codesourcery.com>
6401 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
6402 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
6404 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
6406 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
6408 2000-01-23 Mark Mitchell <mark@codesourcery.com>
6410 * cp-tree.h (register_dtor_fn): New function.
6411 * decl.c (destroy_local_static): Rename to ...
6412 (register_dtor_fn): ... this. Give it external linkage.
6413 (expand_static_init): Use it.
6414 * decl2.c (do_static_initialization): Likewise, if using
6416 (do_static_destruction): Check that __cxa_atexit is not in use.
6417 (finish_file): Don't call do_static_destruction if using
6420 * typeck.c (convert_arguments): Restore two-message error
6423 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
6425 Remap dynamic cast hint values to be consistent across ABIs.
6426 * search.c (dynamic_cast_base_recurse): Remap generated value.
6427 (get_dynamic_cast_base_type): Adjust documentation.
6428 * tinfo.h (__user_type_info::dyncast): Likewise.
6429 (__user_type_info::find_public_subobj): Remap BOFF meaning.
6430 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
6431 (__class_type_info::do_dyncast): Likewise.
6432 (__class_type_info::do_find_public_subobj): Likewise.
6433 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
6435 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
6437 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
6439 * typeck2.c (incomplete_type_error): Restore previous
6440 cp_error and cp_error_at call sequence.
6442 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
6444 * class.c (dump_class_hierarchy): Make format agree with argument;
6445 cast pointer to unsigned long and print with %lx.
6447 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
6449 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
6451 * typeck.c (composite_pointer_type, common_type,
6452 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
6453 build_function_call_real, convert_arguments,
6454 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
6455 build_unary_op, mark_addressable, build_compound_expr,
6456 build_static_cast, build_reinterpret_cast, build_const_cast,
6457 build_c_cast, build_modify_expr, get_delta_difference,
6458 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
6459 'ISO C++'. Fusion consecutive calls to diagnotic message routines
6461 * typeck2.c (readonly_error, abstract_virtuals_error,
6462 process_init_constructor, check_for_new_type): Likewise.
6464 2000-01-19 Mark Mitchell <mark@codesourcery.com>
6466 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
6469 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
6471 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
6472 (build_x_typeid): Likewise.
6473 (get_tinfo_fn): Likewise.
6474 (get_tinfo_fn_unused): Rename to ...
6475 (get_tinfo_decl): ... here.
6476 * rtti.c (build_headof): Replace logic error with assertion.
6477 (get_tinfo_fn_dynamic): Rename to ...
6478 (get_tinfo_decl_dynamic): ... here. Make static. Use
6479 complete_type_or_else.
6480 (build_x_typeid): Move into ...
6481 (build_typeid): ... here. Adjust call to
6482 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
6483 throw_bad_typeid expression.
6484 (get_tinfo_fn_unused): Rename to ...
6485 (get_tinfo_decl): ... here. Adjust comment.
6486 (get_tinfo_fn): Delete.
6487 (tinfo_from_decl): New static function.
6488 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
6489 (get_typeid): Use complete_type_or_else.
6490 (build_dynamic_cast_1): Adjust calls to
6491 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
6492 * parse.y (primary): Adjust call to build_typeid.
6493 * except.c (build_eh_type_type_ref): Adjust call to
6494 get_tinfo_decl. Mark as used.
6495 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
6496 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
6497 * parse.c: Regenerated.
6499 2000-01-17 Mark Mitchell <mark@codesourcery.com>
6501 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
6503 (resolves_to_fixed_type_p): Document calling convention.
6504 * rtti.c (build_x_typeid): Initialize NONNULL.
6506 * cp-tree.h (build_shared_int_cst): New function.
6507 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
6508 * class.c (modify_vtable_entry): Likewise.
6509 (add_virtual_function): Split out code to generated shared
6510 INTEGER_CSTs to build_share_int_cst.
6511 (modify_all_vtables): Handle all the overridden functions here.
6512 Add overridden functions from non-primary virtual bases to the
6514 (finish_struct_1): Adjust call to modify_all_vtables. Add
6515 overridden functions from non-primary bases to the vtable.
6516 * tree.c (build_shared_int_cst): New function.
6518 * cp-tree.h (scratchalloc): Remove.
6519 (build_scratch_list): Likewise.
6520 * call.c (convert_class_to_reference): Replace build_scratch_list
6521 and build_expr_list with build_tree_list.
6522 (add_candidate): Replace scratchalloc with expralloc. Note memory
6524 (build_user_type_conversion_1): Replace build_scratch_list
6525 and build_expr_list with build_tree_list.
6526 (build_new_op): Likewise.
6527 (build_op_delete_call): Likewise.
6528 (convert_like): Likewise.
6529 * cvt.c (ocp_convert): Likewise.
6530 * decl.c (start_decl): Likewise.
6531 (start_function): Likewise.
6532 (finish_destructor_body): Likewise.
6533 (maybe_build_cleanup_1): Likewise.
6534 * decl2.c (reparse_decl_as_expr): Likewise.
6535 * init.c (perform_member_init): Likewise.
6536 (expand_cleanup_for_base): Likewise.
6537 (build_builtin_delete_call): Likewise.
6538 (build_new_1): Likewise.
6539 (build_delete): Likewise.
6540 * method.c (do_build_assign_ref): Likewise.
6541 * parse.y (already_scoped_stmt): Likewise.
6542 (nontrivial_exprlist): Likewise.
6543 (net_initializer): Likewise.
6544 (initlist): Likewise.
6545 * parse.c: Regenerated.
6546 * rtti.c (build_x_typeid): Likewise.
6547 (build_dynamic_cast_1): Likewise.
6548 * typeck.c (build_x_compound_expr): Likewise.
6549 (build_static_cast): Likewise.
6550 (build_modify_expr): Likewise.
6552 * cp-tree.h (DECL_VINDEX): Add documentation.
6553 * class.c (build_vtable_entry): Likewise.
6554 (start_vtable): Add comment.
6555 (add_virtual_function): Replace pending_hard_virtuals with
6556 overridden_virtuals and pending_virtuals with new_virtuals.
6557 Replace redundant assignments with assertions.
6558 (check_for_override): Add comment.
6559 (check_bases_and_members): Replace pending_hard_virtuals with
6560 overridden_virtuals and pending_virtuals with new_virtuals.
6561 (create_vtbl_ptr): Likewise.
6562 (layout_class_type): Likewise.
6563 (finish_struct_1): Likewise. Add comments.
6565 2000-01-16 Mark Mitchell <mark@codesourcery.com>
6567 * class.c (finish_struct_1): Replace redundant code with
6570 * cp-tree.h (flag_new_abi): Move.
6571 (flag_use_cxa_atexit): Likewise.
6572 (flag_honor_std): Likewise.
6573 (flag_rtti): Likewise.
6574 (vbase_offsets_in_vtable_p): Define.
6575 (vptrs_present_everywhere_p): Likewise.
6576 (TYPE_CONTAINS_VPTR_P): Likewise.
6577 (dfs_walk_real): Declare.
6578 * class.c (build_vbase_pointer_fields): Check
6579 vbase_offsets_in_vtable_p.
6580 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
6582 (build_vbase_offset_vtbl_entries): Simplify.
6583 (build_vbase_offset_vtbl_entries): Adjust.
6584 (build_vbase_pointer): Add ability to look up vbase offsets in
6586 (start_vtable): New function.
6587 (add_virtual_function): Use it.
6588 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
6589 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
6590 (build_vtbl_initializer): Take the type of the complete object as
6591 input. Use it to correctly calculate vbase offsets.
6592 (dfs_finish_vtbls): Pass the complete type to
6593 build_vtbl_initializer.
6594 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
6595 (create_vtable_ptr): Create a vtable even if there are no
6596 new virtual functions, under the new ABI.
6597 (finish_struct_1): Likewise.
6598 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
6599 * decl.c (exapnd_static_init): Remove call to
6600 preserve_initializer.
6601 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
6603 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
6604 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
6605 (construct_virtual_bases): Don't initialize virtual base pointers
6607 (build_aggr_init): Clean up comment.
6608 (expand_aggr_init_1): Likewise.
6609 * rtti.c (expand_class_desc): Store the virtual function table
6610 index where the vbase offset lives in the offset field.
6611 * search.c (dfs_walk_real): Make it global.
6612 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
6613 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
6615 * tinfo.h (USItype): Make it signed under the new ABI.
6616 * tinfo.cc (convert_to_base): New function. Encapsulate base
6617 conversion logic here.
6618 (__class_type_info::do_upcast): Use it.
6619 (__class_type_info::do_dyncast): Likewise.
6620 (__class_type_info::do_find_public_subobj): Likewise.
6622 * init.c (construct_virtual_bases): Don't look up the addresses of
6623 virtual bases at run-time.
6625 * class.c (build_vbase_pointer): Relocate.
6626 (build_vbase_pointer_fields): Likewise.
6627 (dfs_build_vbase_offset_vtbl_entries): Likewise.
6628 (build_vbase_offset_vtbl_entries): Likewise.
6630 * decl.c (init_decl_processing): Complain if -fnew-abi
6631 -fno-vtable-thunks is used.
6633 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
6636 2000-01-15 Mark Mitchell <mark@codesourcery.com>
6638 * cp-tree.h (num_extra_vtbl_entries): New function.
6639 (size_extra_vtbl_entries): Likewise.
6640 (dfs_vtable_path_unmark): Likewise.
6641 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
6642 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
6643 * class.c (num_extra_vtbl_entries): New function.
6644 (size_extra_vtbl_entries): Likewise.
6645 (dfs_build_vbase_offset_vtbl_entries): New function.
6646 (build_vbase_offset_vtbl_entries): Likewise.
6647 (build_vtbl_initializer): Use it.
6648 (finish_struct_1): Adjust vtable sizes (using
6649 num_extra_vtbl_entries).
6650 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
6651 THUNK_DECL is non-NULL before expanding it.
6652 * init.c (expand_virtual_init): Adjust the vtable pointer by
6653 size_extra_vtbl_entries before storing it.
6654 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
6655 Handle TREE_LIST parameters here, not in the dfs_* functions.
6656 (dfs_unmarked_real_bases_queue_p): Adjust.
6657 (dfs_marked_real_bases_queue_p): Likewise.
6658 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
6659 (dfs_vtable_path_marked_real_bases_queue_p): New function.
6660 (dfs_vtable_path_unmark): Likewise.
6662 2000-01-14 Mark Mitchell <mark@codesourcery.com>
6664 * optimize.c (copy_body_r): Clear the operand three of a
6665 TARGET_EXPR when copying it.
6667 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6669 * method.c (build_decl_overload_real): Check whether we are in ::
6670 before returning __builtin_new/delete.
6672 2000-01-13 Mark Mitchell <mark@codesourcery.com>
6674 * pt.c (tsubst_friend_function): Improve comment.
6675 (instantiate_decl): Avoid crashing when a "nested" function is
6676 instantiated from the top level.
6678 * dump.c (dqeueue_and_dump): Dump
6679 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
6681 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6683 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
6685 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
6687 * g++spec.c (lang_specific_driver): Add -fnew-abi if
6688 ENABLE_NEW_GXX_ABI defined.
6689 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
6690 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
6691 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
6693 2000-01-12 Mark Mitchell <mark@codesourcery.com>
6695 * decl.c (start_cleanup_fn): Call pushdecl.
6697 * call.c (convert_class_to_reference): Fix typos.
6698 (build_conditional_expr): Handle errors gracefully.
6699 * class.c (push_nested_class): Likewise.
6700 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
6701 (DECL_THIS_EXTERN): Use it.
6702 (DECL_THIS_STATIC): Likewise.
6703 * cvt.c (convert_to_void): Handle errors gracefully.
6704 (build_expr_type_conversion): Likewise.
6705 * decl.c (maybe_push_decl): Likewise.
6706 (start_decl_1): Likewise.
6707 (require_complete_types_for_parms): Likewise.
6708 * parse.y (structsp): Likewise.
6709 (base_class): Likewise.
6710 * parse.c: Regenerated.
6711 * pt.c (finish_member_template_decl): Likewise.
6712 * typeck.c (decay_conversion): Likewise.
6714 * cp-tree.h (dfs_skip_vbases): New function.
6715 (find_vbase_instance): Likewise.
6716 * class.c (determine_primary_base): Allow a nearly empty base to
6717 serve as a primary base class under the new ABI.
6718 (get_class_offset_1): Rename to ...
6719 (dfs_get_class_offset): ... this. Simplify. Don't issue error
6721 (get_class_offset): Use it. Issue error messages here.
6722 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
6723 find the right copies of virtual bases.
6724 (fixup_vtable_deltas1): Rename to ...
6725 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
6726 bases as primary bases.
6727 (fixup_vtable_deltas): Remove.
6728 (override_one_vtable): Handle virtual bases as primary bases.
6729 (merge_overrides): Likewise.
6730 (finish_struct_1): Likewise.
6731 (dump_class_hierarchy): Dump primary-ness of bases as well.
6732 * search.c (mark_primary_bases): Use a pre-order traversal to
6733 handle primary virtual bases.
6734 (dfs_skip_vbases): New fiunction.
6735 (expand_upcast_fixups): Adjust to handle primary virtual bases.
6736 (fixup_virtual_upcast_offsets): Likewise.
6737 (fixup_all_virtual_upcast_offsets): Likewise.
6738 (dfs_find_vbase_instances): New function.
6739 (find_vbase_instance): Likewise.
6741 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
6743 * lex.c (DIR_SEPARATOR): Delete macro.
6745 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
6747 * decl2.c (lang_decode_option): Handle automatic line wrapping
6750 2000-01-11 Mark Mitchell <mark@codesourcery.com>
6752 * friend.c (do_friend): Don't resolve scopes when processing
6753 template declarations, even if the qualifying scope doesn't
6754 involve template parameters.
6756 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
6758 * class.c (dfs_modify_vtables_queue_p): Remove.
6759 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
6760 and dfs_marked_real_bases_queue_p instead of
6761 dfs_modify_vtables_queue_p.
6763 * class.c (build_vbase_path): Simplify.
6764 (dfs_propagate_binfo_offsets): New function.
6765 (propagate_binfo_offsets): Use it.
6766 (remove_base_field): Simplify.
6767 (dfs_set_offset_for_vbases): Remove.
6768 (dfs_set_offset_for_shared_vbases): New function.
6769 (dfs_set_offset_for_unshared_vbases): Likewise.
6770 (layout_virtual_bases): Use them.
6771 (layout_basetypes): Don't call propagate_binfo_offsets.
6772 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
6775 * class.c (build_base_field): New function, split out from ...
6776 (build_base_fields): ... here. Use it. Allocate primary bases
6777 first, under the new ABI.
6778 (get_vtable_entry): Remove.
6779 (remove_base_field): New function, split out from ...
6780 (remove_base_fields): ... here. Adjust since primary bases come
6781 first under the new ABI.
6783 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
6784 (initialize_vtbl_ptrs): New function.
6785 (expand_indirect_vtbls_init): Change prototype.
6786 (convert_pointer_to_vbase): Declare.
6787 * init.c (expand_direct_vtbls_init): Remove.
6788 (dfs_initialize_vtbl_ptrs): New function.
6789 (initialize_vtbl_ptrs): Likewise.
6790 (emit_base_init): Use initialize_vtbl_ptrs.
6791 * search.c (convert_pointer_to_vbase): Make it global.
6792 (expand_indirect_vtbls_init): Remove vtable initialization code.
6793 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
6795 * class.c (dfs_finish_vtbls): New function.
6796 (finish_vtbls): Use it.
6797 (dump_class_hierarchy): New function.
6799 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
6800 (BINFO_VBASE_PRIMARY_P): New macro.
6801 (BINFO_VIRTUALS): Add to documentation.
6802 (SET_BINFO_PRIMARY_MARKED_P): Remove.
6803 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
6804 (dfs_mark_primary_bases_queue_p): Likewise.
6805 (dfs_unmarked_real_bases_queue_p): New function.
6806 (dfs_marked_real_bases_queue_p): Likewise.
6807 * search.c (dfs_mark_primary_bases): Adjust.
6808 (mark_primary_bases): Likewise.
6809 (get_shared_vbase_if_not_primary): New function.
6810 (dfs_unmarked_real_bases_queue_p): Likewise.
6811 (dfs_marked_real_bases_queue_p): Likewise.
6812 (dfs_get_pure_virtuals): Simplify.
6813 (get_pure_virtuals): Likewise.
6815 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6817 * lex.c: Include tm_p.h.
6819 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
6821 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
6823 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
6825 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
6826 * pt.c (instantiate_decl): Defer comdat templates that might not be
6829 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
6830 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
6831 (finish_file): Likewise.
6833 * decl2.c (import_export_class): Undo 12/14 change.
6835 * error.c (dump_decl): operator new, not operatornew.
6837 * class.c (field_decl_cmp): A nontype is "greater" than a type.
6838 * search.c (lookup_field_1): Look for the last field with the
6841 2000-01-05 Nathan Sidwell <nathan@acm.org>
6843 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
6846 2000-01-05 Nathan Sidwell <nathan@acm.org>
6848 * typeck.c (build_static_cast): Don't strip target qualifiers
6849 when casting from a class.
6851 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6853 * class.c (warn_hidden): Initialize variable `fndecl'.
6855 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
6857 * decl.c (flag_isoc9x): New variable to be able to use code in
6858 c-common.c. For now always zero.
6860 2000-01-03 Mark Mitchell <mark@codesourcery.com>
6862 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
6863 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
6864 or unshare_base_binfos for virtual bases here.
6865 * search.c (dfs_get_vbase_types): Do it here.
6866 (get_vbase_types): Adjust.
6868 2000-01-02 Mark Mitchell <mark@codesourcery.com>
6870 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
6871 (BINFO_PRIMARY_MARKED_P): Use flag 5.
6872 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
6873 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
6874 (unmark_primary_bases): Remove declaration.
6875 (unmarkedp): Declare.
6876 (dfs_vbase_unmark): Likewise.
6877 * class.c (determine_primary_base): Return immediately if there
6878 are no base classes. Call mark_primary_bases here.
6879 (modify_all_direct_vtables): Remove.
6880 (modify_all_indirect_vtables): Remove.
6881 (dfs_modify_vtables_queue_p): New function.
6882 (dfs_modify_vtables): New function.
6883 (modify_all_vtables): Use them.
6884 (build_base_fields): Build FIELD_DECLs for primary virtual base
6886 (create_vtable_ptr): Don't call determine_primary_base here.
6887 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
6888 (dfs_set_offset_for_vbases): ... this.
6889 (layout_virtual_bases): Use it.
6890 (layout_class_type): Call determine_primary_base here.
6891 * search.c (unmarkedp): Make it global.
6892 (shared_marked_p): Simplify.
6893 (shared_unmarked_p): Likewise.
6894 (dfs_primary_bases_queue_p): Remove.
6895 (dfs_unmark_primary_bases): Likewise.
6896 (unmark_primary_bases): Likewise.
6897 (mark_primary_bases): Simplify.
6898 (get_pure_virtuals): Don't call mark_primary_bases here.
6899 (dfs_vbase_unmark): New function.
6900 (get_vbase_types): Simplify.
6902 * class.c (struct base_info): Remove.
6903 (determine_primary_base): Take has_virtual_p rather than a
6904 base_info as input. Don't calculate max_has_virtual.
6905 (finish_struct_bits): Remove max_has_virtual argument.
6906 (create_vtable_ptr): Remove max_has_virtual_p argument.
6907 (layout_virtual_bases): Remove max argument.
6908 (layout_basetypes): Likewise.
6909 (layout_class_type): Remove max_has_virtual_p argument.
6910 (finish_struct_1): Remove max_has_virtual.
6912 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
6913 (layout_basetypes): Remove.
6914 * class.c (propagate_binfo_offsets): Moved here from tree.c.
6915 Update to handle primary virtual bases.
6916 (remove_base_fields): New function, split out from
6918 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
6919 (layout_virtual_bases): New function, split out from
6920 layout_basetypes. Update to handle primary virtual bases.
6921 (layout_basetypes): Moved here from tree.c. Use
6922 remove_base_fields and layout_virtual_bases.
6923 * search.c (dfs_mark_primary_bases_queue_p): New function.
6924 (mark_primary_bases): Use it.
6925 * tree.c (CEIL): Remove.
6926 (propagate_binfo_offsets): Remove.
6927 (layout_basetypes): Remove.
6929 2000-01-01 Mark Mitchell <mark@codesourcery.com>
6931 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
6932 (BINFO_PRIMARY_MARKED_P): New macro.
6933 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
6934 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
6935 (mark_primary_bases): New function.
6936 (unmark_primary_bases): Likewise.
6937 * search.c (get_abstract_virtuals_1): Remove.
6938 (dfs_mark_primary_bases): New function.
6939 (mark_primary_bases): Likewise.
6940 (dfs_unmark_primary_bases): Likewise.
6941 (unmark_primary_bases): Likewise.
6942 (dfs_get_pure_virtuals): Likewise.
6944 2000-01-01 Mark Mitchell <mark@codesourcery.com>
6946 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
6947 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
6948 (modify_one_vtable): Adjust.
6949 (fixup_vtable_deltas1): Likewise.
6950 (override_one_vtable): Likewise.
6951 * search.c (get_abstract_virtuals_1): Likewise.
6952 (get_pure_virtuals): Likewise.
6953 (expand_upcast_fixups): Likewise.
6954 * tree.c (debug_binfo): Likewise.
6956 * class.c (build_vtable): Don't return a value. Don't rebuild
6957 vtables for bases that have already been handled.
6958 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
6959 already been handled.
6960 (modify_one_vtable): Adjust accordingly.
6961 (fixup_vtable_deltas1): Likewise.
6962 (finish_struct_1): Likewise.
6964 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6966 * call.c (build_new_method_call): Also check destructors.