1 2001-01-16 Phil Edwards <pme@sources.redhat.com>
3 * g++spec.c: Don't add libraries needlessly if -fsyntax-only
6 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
8 * pt.c (check_nontype_parm): Rename to ...
9 (invalid_nontype_parm_type_p): ... here.
10 (process_template_parm): Adjust.
11 (convert_template_argument): Adjust.
13 2001-01-15 Nathan Sidwell <nathan@codesourcery.com>
15 * pt.c (check_nontype_parm): New function.
16 (process_template_parm): Use it.
17 (convert_template_argument): Use it.
18 (convert_nontype_argument, RECORD_TYPE): Assert it's a ptr to
21 2001-01-14 Jeffrey Oldham <oldham@codesourcery.com>
23 * tree.c: Add defaults.h
24 (cp_valid_lang_attribute): Incorporate SUPPORTS_INIT_PRIORITY.
25 * Make-lang.in (cp/tree.o): Add defaults.h.
27 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
29 * Make-lang.in (CXX_C_OBJS): Add c-format.o.
31 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
33 * g++.1: Change to be ".so man1/gcc.1".
35 2001-01-13 Joseph S. Myers <jsm28@cam.ac.uk>
37 * Make-lang.in (c++.info, c++.install-info): Build and install g++
39 (c++.uninstall, c++.maintainer-clean): Remove g++ internals info.
40 ($(srcdir)/cp/g++int.info): New target.
41 * gxxint.texi: Add info directory entry. Use @@ in email address.
44 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
46 * typeck.c (build_c_cast): Do template processing earlier.
47 Always pedwarn on array casts.
49 2001-01-12 Nathan Sidwell <nathan@codesourcery.com>
51 * friend.c (make_friend_class): Make sure a templated class is
54 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
56 * decl2.c (get_guard): Set linkage from guarded decl.
58 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
60 * call.c (convert_default_arg): Check for unprocessed
62 * cp-tree.h (replace_defarg): Move to spew.c.
63 (maybe_snarf_defarg, add_defarg_fn, do_pending_defargs): Move to
64 spew.c, which is where they really are.
65 (done_pending_defargs): Declare.
66 (unprocessed_defarg_fn): Declare.
67 * decl.c (replace_defarg): Move to spew.c
68 * parse.y (structsp): Call done_pending_defargs.
69 * spew.c (defarg_fns): Rearrange list structure.
70 (defarg_fnsdone): New static variable.
71 (defarg_depfns): New static variable.
73 (add_defarg_fn): Store the type in TREE_TYPE.
74 (do_pending_defargs): Detect and deal with ordering constraints
76 (done_pending_defargs): New function.
77 (unprocessed_defarg_fn): New function.
78 (replace_defarg): Moved from decl.c. Robustify. Don't save
79 if circularity detected.
81 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
83 * pt.c (unify): Check array has a domain, before checking
84 whether it is variable sized.
86 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
88 * decl.c (grokparms): Unobfuscate and get correct diagnostic for
89 parameters with pointers to arrays of unknown bound.
91 2001-01-11 Nathan Sidwell <nathan@codesourcery.com>
93 * parse.y (template_parm_header, template_spec_header): New
94 reductions. Split out from ...
95 (template_header): ... here. Use them.
96 (template_template_parm): Use template_parm_header.
97 * semantics.c (finish_template_template_parm): Add assert.
99 2001-01-10 Mark Mitchell <mark@codesourcery.com>
101 * mangle.c (write_builtin_type): Fix thinko.
103 * pt.c (copy_default_args_to_explicit_spec_1): New function.
104 (copy_default_args_to_explicit_spec): Likewise.
105 (check_explicit_specialization): Use it.
107 * class.c (finish_struct_1): Remove last argument in call to
108 make_decl_rtl; use make_function_rtl instead of make_decl_rtl.
109 * decl.c (builtin_function): Likewise.
110 (build_cp_library_fn): Likewise.
111 (check_initializer): Likewise.
112 (make_rtl_for_nonlocal_decl): Likewise.
113 (cp_finish_decl): Likewise.
114 (start_function): Likewise.
115 * decl2.c (finish_anon_union): Likewise.
116 * friend.c (do_friend): Likewise.
117 * init.c (build_java_class_ref): Likewise.
118 * method.c (make_thunk): Likewise.
119 * pt.c (tsubst_friend_function): Likewise.
120 * semantics.c (expand_body): Likewise.
122 2001-01-10 Mark Mitchell <mark@codesourcery.com>
124 * cp-tree.h (DECL_CLONED_FUNCTION_P): Avoid wild reads by not
125 looking at DECL_CLONED_FUNCTION for non-functions.
127 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
129 * error.c (dump_template_parameter): Use parm to determine how
130 to print default value.
132 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
134 * class.c (duplicate_tag_error): Clear more flags.
136 2001-01-10 Nathan Sidwell <nathan@codesourcery.com>
138 * call.c (build_new_method_call): Use binfo_for_vbase.
140 2001-01-10 Joseph S. Myers <jsm28@cam.ac.uk>
142 * cp-tree.h (flag_cond_mismatch): Don't declare.
143 * decl2.c (flag_cond_mismatch): Don't define.
144 (lang_f_options): Remove cond-mismatch.
145 (unsupported_options): Add cond-mismatch.
147 2001-01-09 Nathan Sidwell <nathan@codesourcery.com>
149 * class.c (handle_using_decl): Reject using of constructor name
150 of sourcing class. Allow injecting of a method with same name as
151 nested class. Fixup error messages.
153 2001-01-09 Joseph S. Myers <jsm28@cam.ac.uk>
155 * decl2.c (lang_decode_option): Handle -Wformat=2.
157 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
159 * cp-tree.h (lang_decl_flags): Rename defined_in_class to
160 initialized_in_class.
161 (DECL_DEFINED_IN_CLASS_P): Rename to ...
162 (DECL_INITIALIZED_IN_CLASS_P): ... here, to reflect true meaning.
163 * decl.c (duplicate_decls): Preseve DECL_INITIALIZED_IN_CLASS_P.
164 (cp_finish_decl): Adjust for DECL_INITIALIZED_IN_CLASS_P.
165 * pt.c (check_default_tmpl_args): Adjust for
166 DECL_INITIALIZED_IN_CLASS_P.
167 (instantiate_class_template): Likewise.
168 (instantiate_decl): Check DECL_INITIALIZED_IN_CLASS_P.
170 * class.c (finish_struct): Constify saved_filename.
172 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
174 * class.c (duplicate_tag_error): Adjust diagnostic.
175 (finish_struct): Locally set location to start of struct.
176 * decl.c (fixup_anonymous_aggr): Use cp_error_at.
178 2001-01-08 Nathan Sidwell <nathan@codesourcery.com>
180 * decl.c (struct binding_level): Adjust class_shadowed comments
182 (push_class_level_binding): Ajust comments to reflect reality.
183 Set IDENTIFIER_CLASS_VALUE when replacing an existing binding.
184 Don't set TREE_VALUE on the class_shadowed list.
186 2001-01-07 Alexandre Petit-Bianco <apbianco@cygnus.com>
188 * decl2.c (acceptable_java_type): Allow references too.
189 * init.c (build_java_class_ref): When using the new ABI, search
190 `class$' and have it mangled with `mangle_decl.'
191 * mangle.c (write_java_integer_type_codes): New function.
192 (write_builtin_type): Detect and mangle Java integer and real
195 2001-01-07 Mark Mitchell <mark@codesourcery.com>
197 * decl2.c (grokfield): Don't accept `asm' specifiers for
198 non-static data members.
200 2001-01-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
202 * expr.c (cplus_expand_expr): Don't reset `target'.
204 2001-01-07 Neil Booth <neil@daikokuya.demon.co.uk>
206 * cp/decl2.c (cxx_post_options): Call cpp_post_options.
208 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
210 * parse.y (template_datadef): Check for error_mark_node.
212 2001-01-05 Nathan Sidwell <nathan@codesourcery.com>
214 * cp-tree.def (DEFAULT_ARG): Make `x' class.
216 2001-01-04 Joseph S. Myers <jsm28@cam.ac.uk>
218 * decl.c (SIZE_TYPE, PTRDIFF_TYPE, WCHAR_TYPE): Don't define.
219 (record_builtin_type): Make non-static.
220 (flag_short_double): Don't declare.
221 (init_decl_processing): Remove the creation of many tree nodes now
222 in c_common_nodes_and_builtins.
223 (build_void_list_node): New function.
224 * decl2.c (flag_short_double, flag_short_wchar): Don't define.
225 * cp-tree.h (flag_short_wchar): Don't declare.
227 2001-01-04 Mark Mitchell <mark@codesourcery.com>
229 * call.c (build_conv): Don't use build1 for USER_CONV.
230 * pt.c (tsubst_copy): Or for PREINCREMENT_EXPR and similar nodes.
232 2001-01-03 Joseph S. Myers <jsm28@cam.ac.uk>
234 * lex.c (lang_init): Call c_common_lang_init.
236 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
238 * search.c (lookup_fnfields_here): Remove.
239 (look_for_overrides_r): Use lookup_fnfields_1.
240 Ignore functions from using declarations.
242 2001-01-03 Nathan Sidwell <nathan@codesourcery.com>
244 Implement exceptions specifiers for implicit member functions.
245 * cp-tree.h (merge_exceptions_specifiers): Declare new function.
246 * method.c (synthesize_exception_spec): New function.
247 (locate_dtor, locate_ctor, locate_copy): New functions.
248 (implicitly_declare_fn): Generate the exception spec too.
249 * search.c (check_final_overrider): Check artificial functions
251 * typeck2.c (merge_exception_specifiers): New function.
253 2001-01-03 Jason Merrill <jason@redhat.com>
255 * init.c (build_default_init): New fn.
256 (perform_member_init): Split out from here.
257 (build_new_1): Use it. Simplify initialization logic.
258 (build_vec_init): Take an array, rather than a pointer and maxindex.
259 Speed up simple initializations. Don't clean up if we're assigning.
261 * decl2.c (do_static_initialization): Remove TREE_VEC case.
262 * parse.y (new_initializer): Return void_zero_node for ().
263 * typeck.c (build_modify_expr): Handle getting a CONSTRUCTOR.
264 * typeck2.c (digest_init): Only complain about user-written
267 2000-12-22 Mike Stump <mrs@wrs.com>
269 * decl2.c: (max_tinst_depth): Increase to 50.
271 2001-01-02 Mark Mitchell <mark@codesourcery.com>
273 * class.c (invalidate_class_lookup_cache): Zero the
274 previous_class_values.
275 * cp-tree.h (TMPL_PARMS_DEPTH): Use TREE_INT_CST_LOW, not
277 (CLASSTYPE_TEMPLATE_LEVEL): Likewise.
278 * decl.c (free_bindings): New variable.
279 (push_binding): Don't create a new binding if we have one on the
281 (pop_binding): Put old bindings on the free list.
282 (init_decl_processing): Use size_int, not build_int_2.
283 Register free_bindings as a GC root.
284 (cp_make_fname_decl): Use size_int, not build_int_2.
285 (push_inline_template_parms_recursive): Likewise.
286 (end_template_parm_list): Likewise.
287 (for_each_tempalte_parm): Do not use walk_tree_without_duplicates.
288 (tsubst_template_parms): Use size_int, not build_int_2.
290 * rtti.c (get_vmi_pseudo_type_info): Likewise.
292 2001-01-02 Richard Henderson <rth@redhat.com>
294 * parse.y (asm): Set ASM_INPUT_P.
296 2001-01-02 Jason Merrill <jason@redhat.com>
298 * tree.c (cp_valid_lang_attribute): Don't set CLASSTYPE_COM_INTERFACE
301 * typeck.c (cp_truthvalue_conversion): New fn.
302 * cvt.c (ocp_convert): Use it.
304 * cp-tree.h: Lose c-common.c decls.
306 * typeck.c (build_unary_op): Restore old &a.f diagnostic code.
307 * cvt.c (convert_to_void): Use type_unknown_p.
309 * typeck.c (strip_all_pointer_quals): Also strip quals from
310 pointer-to-member types.
312 * Make-lang.in (cp/TAGS): Use --no-globals. Ignore parse.c, and treat
315 * call.c (build_new_method_call): Do evaluate the object parameter
316 when accessing a static member.
317 * typeck.c (build_component_ref): Likewise.
319 2001-01-02 Andreas Jaeger <aj@suse.de>
321 * decl.c (cp_missing_noreturn_ok_p): New.
322 (init_decl_processing): Set lang_missing_noreturn_ok_p.
324 2000-12-29 Jakub Jelinek <jakub@redhat.com>
326 * decl.c (init_decl_processing): Fix sign of wchar_type_node.
328 2000-12-29 Mark Mitchell <mark@codesourcery.com>
330 * class.c (pushclass): Remove #if 0'd code.
331 * cp-tree.h (overload_template_name): Remove.
332 * decl.c (store_bindings): Simplify.
333 (pop_from_top_level): Likewise.
334 * pt.c (overload_template_name): Remove.
335 (instantiate_decl): Don't call push_to_top_level if it's not
338 2000-12-28 Mark Mitchell <mark@codesourcery.com>
340 * pt.c (register_local_specialization): Don't return a value.
341 (lookup_template_class): Use move-to-front heuristic when looking
342 up template instantiations.
343 (instantiate_decl): Only push_to_top_level when we're actually
344 going to instantiate the template.
346 2000-12-29 Hans-Peter Nilsson <hp@bitrange.com>
348 * search.c (binfo_for_vtable): Return least derived class, not
349 most. Handle secondary vtables.
351 2000-12-22 Jason Merrill <jason@redhat.com>
353 * pt.c (more_specialized): Don't optimize len==0.
354 (fn_type_unification): If we're adding the return type, increase len.
356 * typeck.c (build_binary_op): Fix pmf comparison logic.
358 * call.c (joust): Use DECL_NONSTATIC_MEMBER_FUNCTION_P, not
359 DECL_STATIC_FUNCTION_P.
361 * semantics.c (genrtl_finish_function): Don't try to jump to
362 return_label unless it exists.
364 In partial ordering for a call, ignore parms for which we don't have
366 * call.c (joust): Pass len to more_specialized.
367 (add_template_candidate_real): Strip 'this', pass len.
368 * pt.c (more_specialized): Pass len down. Lose explicit_args parm.
369 (get_bindings_order): New fn. Pass len down.
370 (get_bindings_real): Strip 'this', pass len.
371 (fn_type_unification): Likewise.
372 (type_unification_real): Succeed after checking 'len' args.
373 (most_specialized_instantiation): Lose explicit_args parm.
374 * class.c (resolve_address_of_overloaded_function): Strip 'this',
377 2000-12-21 Jason Merrill <jason@redhat.com>
379 * pt.c (tsubst_decl): A FUNCTION_DECL has DECL_RESULT, not
380 DECL_TEMPLATE_RESULT.
382 * search.c (lookup_field_r): Call lookup_fnfields_1, not
383 lookup_fnfields_here.
385 * parse.y (typename_sub2): Return the TYPE_DECL, not the type.
387 * call.c (build_object_call): Also allow conversions that return
388 reference to pointer to function.
389 (add_conv_candidate): Handle totype being ref to ptr to fn.
390 (build_field_call): Also allow members of type reference to function.
391 Lose support for calling pointer to METHOD_TYPE fields.
393 * error.c (dump_expr): Handle *_CAST_EXPR.
395 * typeck2.c (build_scoped_ref): Always convert to the naming class.
397 * tree.c (break_out_cleanups): Lose.
398 * cp-tree.h: Remove prototype.
399 * typeck.c (build_component_ref): Don't break_out_cleanups.
400 (build_compound_expr): Likewise.
401 * semantics.c (finish_expr_stmt): Likewise.
403 2000-12-20 Richard Henderson <rth@redhat.com>
405 * cp-tree.h: Update declarations.
406 * decl.c (finish_case_label): Return the new stmt node.
407 * semantics.c (finish_goto_stmt): Likewise.
408 (finish_expr_stmt, finish_return_stmt): Likewise.
409 (finish_break_stmt, finish_continue_stmt): Likewise.
410 (finish_asm_stmt): Likewise.
411 * parse.y (already_scoped_stmt): Set STMT_LINENO.
412 (compstmt, implicitly_scoped_stmt, stmt): Likewise.
413 (simple_if, simple_stmt): Return the new stmt node.
416 2000-12-18 Joseph S. Myers <jsm28@cam.ac.uk>
418 * cp-tree.h: Don't declare warn_long_long.
420 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
422 * tree.c (no_linkage_helper): Use CLASS_TYPE_P instead of
425 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
427 * pt.c (unify): Handle when both ARG and PARM are
428 BOUND_TEMPLATE_TEMPLATE_PARM.
430 2000-12-15 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
432 * pt.c (reduce_template_parm_level): Set DECL_ARTIFICIAL and
433 DECL_TEMPLATE_PARM_P.
435 2000-12-15 Jason Merrill <jason@redhat.com>
437 * init.c (build_new_1): Reorganize. Now with 100% fewer SAVE_EXPRs!
439 * init.c (build_new_1): Don't strip quals from type.
441 * decl.c (pushdecl): Don't check for linkage on a non-decl.
443 * call.c (build_op_delete_call): See through ARRAY_TYPEs.
445 * call.c (build_new_function_call): Lose space before paren in
447 (build_new_method_call): Likewise.
449 * typeck2.c (build_m_component_ref): Propagate quals from datum.
451 2000-12-14 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
453 * pt.c (check_explicit_specialization): Propagate default
454 function arguments to explicit specializations.
456 2000-12-13 DJ Delorie <dj@redhat.com>
458 * typeck.c (build_binary_op): Do signed/unsigned warnings for >?
461 2000-12-08 Jason Merrill <jason@redhat.com>
463 * error.c (dump_function_name): Don't let the user see __comp_ctor.
465 Clean up copy-initialization in overloading code.
466 * call.c (build_user_type_conversion_1): Die if we are asked to
467 convert to the same or a base type.
468 (implicit_conversion): Avoid doing so. Lose reference binding code.
469 (convert_like_real): Treat BASE_CONV and RVALUE_CONV as implicit
470 direct-initialization. Also do direct-init part of copy-init.
471 (build_user_type_conversion): Don't provide context to convert_like.
472 * cvt.c (ocp_convert): build_user_type_conversion will now provide
473 the constructor call for copy-init.
475 * pt.c (tsubst_decl): Call clone_function_decl here if this is an
476 instantiation of a member template.
477 (do_decl_instantiation): Not here.
479 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
481 * class.c (check_field_decls): Don't special case anonymous
482 fields in error messages.
483 (note_name_declared_in_class): Use %D on diagnostic.
485 * tree.c (pod_type_p): Use strip_array_types.
486 (cp_valid_lang_attribute): Likewise.
487 * typeck.c (cp_type_quals): Strip arrays separately, to avoid
488 multiple evaluations.
489 (cp_has_mutable_p): Use strip_array_types.
491 2000-12-07 Nathan Sidwell <nathan@codesourcery.com>
493 * cp-tree.h (sufficient_parms_p): Declare new function.
494 * call.c (sufficient_parms_p): New function, broken out of ...
495 (add_function_candidate): ... here. Use it.
496 (add_conv_candidate): Use it.
497 * decl.c (grok_ctor_properties): Use it.
499 2000-12-07 Jakub Jelinek <jakub@redhat.com>
501 * optimize.c (copy_body_r): Set STMT_IS_FULL_EXPR_P on EXPR_STMT.
503 2000-12-07 Joseph S. Myers <jsm28@cam.ac.uk>
505 * decl2.c (lang_decode_option): Handle -Wformat-security.
507 2000-12-06 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
509 * pt.c (verify_class_unification): New function.
510 (get_class_bindings): Use it.
511 (try_class_unification): Tidy.
512 (unify): Handle when argument of a template-id is not
513 template parameter dependent.
514 (template_args_equal): Handle when TREE_CODE's do not match.
516 2000-12-06 Alexandre Oliva <aoliva@redhat.com>
518 * lang-specs.h (c++): When invoking the stand-alone preprocessor
519 for -save-temps, pass all relevant -Defines to it, and then don't
520 pass them to cc1plus.
522 2000-12-05 Will Cohen <wcohen@redhat.com>
524 * decl.c (finish_case_label): Cleared
525 more_cleanups_ok in surrounding function scopes.
526 (define_label): Likewise.
528 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
530 * cp-tree.h (IDENTIFIER_VIRTUAL_P): Document.
531 (get_matching_virtual): Remove.
532 (look_for_overrides): Declare new function.
533 * decl.c (grokfndecl): Don't set IDENTIFIER_VIRTUAL_P or
535 * class.c (check_for_override): Move base class iteration code
536 to look_for_overrides.
537 * search.c (next_baselink): Remove.
538 (get_virtuals_named_this): Remove.
539 (get_virtual_destructor): Remove.
540 (tree_has_any_destructors_p): Remove.
541 (struct gvnt_info): Remove.
542 (check_final_overrider): Remove `virtual' from error messages.
543 (get_matching_virtuals): Remove. Move functionality to ...
544 (look_for_overrides): ... here, and ...
545 (look_for_overrides_r): ... here. Set DECL_VIRTUAL_P, if found
548 2000-12-05 Nathan Sidwell <nathan@codesourcery.com>
550 * typeck.c (get_delta_difference): If via a virtual base,
552 * cvt.c (cp_convert_to_pointer): If via a virtual base, do no
555 2000-12-04 Richard Henderson <rth@redhat.com>
557 * error.c (dump_tree): Use output_add_string not OB_PUTS.
559 2000-12-04 Jason Merrill <jason@redhat.com>
561 * mangle.c (write_type): Mangle VECTOR_TYPE with "U8__vector".
562 (write_builtin_type): Pass intSI_type_node and the like through
564 * method.c (process_overload_item): Mangle VECTOR_TYPEs with 'o'.
565 Pass intSI_type_node and the like through type_for_mode.
566 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE like COMPLEX_TYPE.
567 * pt.c (tsubst, unify): Likewise.
568 * tree.c (walk_tree): Likewise.
569 * error.c (dump_type): Likewise.
570 (dump_type_prefix, dump_type_suffix): Don't bother with VECTOR_TYPE.
572 * Make-lang.in: Tweak top comment for emacs.
575 * except.c (expand_throw): Use push_throw_library_fn for _Jv_Throw.
577 * class.c (clone_function_decl): Robustify.
579 2000-12-04 Michael Matz <matzmich@cs.tu-berlin.de>
581 * decl.c (store_bindings): Only search in the non modified
582 old_bindings for duplicates.
584 2000-12-04 Nathan Sidwell <nathan@codesourcery.com>
586 * error.c (dump_function_decl): Use DECL_VIRTUAL_P, not
589 * typeck.c (build_static_cast): Remove unused variable.
591 2000-12-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
593 * pt.c: Fix typo in comment.
595 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
597 * decl2.c (warn_format): Remove definition.
598 (lang_decode_option): Handle -Wformat-nonliteral,
599 -Wno-format-extra-args and -Wno-format-y2k. Use set_Wformat.
601 2000-12-01 Joseph S. Myers <jsm28@cam.ac.uk>
603 * decl.c (WINT_TYPE, INTMAX_TYPE, UINTMAX_TYPE): Don't define.
604 (init_decl_processing): Don't create string_type_node,
605 const_string_type_node, wint_type_node, intmax_type_node,
606 uintmax_type_node, default_function_type, ptrdiff_type_node and
607 unsigned_ptrdiff_type_node. Adjust position of call to
608 c_common_nodes_and_builtins.
609 (identifier_global_value): New function.
611 2000-12-01 Nathan Sidwell <nathan@codesourcery.com>
613 * call.c (standard_conversion): Reject pointer to member
614 conversions from ambiguous, inaccessible or virtual bases.
615 * typeck.c (build_static_cast): Don't check pointers to members
618 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
620 * method.c (do_build_copy_constructor): Preserve cv
621 qualifications when accessing source object members.
622 (do_build_assign_ref): Likewise. Remove separate diagnostics for
625 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
627 * method.c (do_build_assign_ref): Construct appropriately
628 CV-qualified base reference. Don't allow const casts in base
631 2000-11-30 Nathan Sidwell <nathan@codesourcery.com>
633 * call.c (build_over_call): Use VOID_TYPE_P. Don't die on
634 incomplete return type.
636 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
638 * parse.y (base_class.1): Produce a _TYPE not a _DECL.
639 * semantics.c (finish_base_specifier): Accept a _TYPE not a
642 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
644 * spew.c (yyerror): Cope if yylval.ttype is NULL.
646 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
648 * decl.c (grokdeclarator): Diagnose undefined template contexts.
650 2000-11-28 Nathan Sidwell <nathan@codesourcery.com>
652 * decl.c (grokdeclarator): Do type access control on friend
655 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
657 * decl.c (grokfndecl): Undo COMPONENT_REF damage caused by
658 bison parser ickiness.
659 * pt.c (tsubst_friend_function): Enter namespace scope when
660 tsubsting the function name.
661 * cp-tree.h (DECL_TI_TEMPLATE): Update comment to reflect reality.
663 2000-11-27 Nathan Sidwell <nathan@codesourcery.com>
665 * cp-tree.h (binfo_from_vbase): Return the virtual base's binfo.
666 * cvt.c (cp_convert_to_pointer): Add force parameter.
667 Allow conversions via virtual base if forced.
668 (convert_to_pointer_force): Adjust call to cp_convert_to_pointer.
669 (ocp_convert): Likewise.
670 * search.c (binfo_from_vbase): Return the virtual base's binfo.
671 * typeck.c (get_delta_difference): Adjust handling of virtual
674 2000-11-26 Mark Mitchell <mark@codesourcery.com>
676 * tree.c (struct list_hash): Remove.
677 (list_hash_table): Make it be an htab.
678 (struct list_proxy): New type.
679 (list_hash_eq): New function.
680 (list_hash_pieces): Renamed from ...
681 (list_hash): ... this.
682 (list_hash_lookup): Remove.
683 (list_hash_add): Remove.
684 (hash_tree_cons): Use the generic hashtable.
685 (mark_list_hash): Remove.
686 (init_tree): Create the hashtable.
688 2000-11-25 Joseph S. Myers <jsm28@cam.ac.uk>
690 * method.c (build_mangled_C9x_name): Rename to
691 build_mangled_C99_name. Change C9X references in comments to
694 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
696 * parse.y (unary_expr): Move VA_ARG from here ...
697 (primary): ... to here.
699 2000-11-24 Nathan Sidwell <nathan@codesourcery.com>
701 * semantics.c (finish_id_expr): If type is error_mark, return
704 2000-11-23 Nathan Sidwell <nathan@codesourcery.com>
706 * pt.c (lookup_template_class): Simplify loop exit constructs.
707 Cope when there is no partial instantiation of a template
710 Thu Nov 23 02:16:47 2000 J"orn Rennecke <amylaar@redhat.com>
712 * Make-lang.in (g++spec.o, cxxmain.o): Depend on $(CONFIG_H).
714 2000-11-22 Mark Mitchell <mark@codesourcery.com>
716 * mangle.c (mangle_conv_op_name_for_type): Don't use `__op'
719 * pt.c (do_decl_instantiate): Explicitly clone constructors and
720 destructors that haven't already been cloned.
722 2000-11-20 Richard Henderson <rth@redhat.com>
724 * parse.y (yyparse_1): Rename the parser entry point.
726 2000-11-20 Alex Samuel <samuel@codesourcery.com>
728 * mangle.c (write_name): Use <unscoped-name> for names directly in
730 (write_unscoped_name): Accept names directly in function scope.
732 2000-11-20 Nathan Sidwell <nathan@codesourcery.com>
734 * lex.c (rid_to_yy, RID_EXPORT): Make unique keyword.
735 * parse.y (extdef): Add EXPORT reduction.
736 * spew.c (yylex): Don't skip export here.
738 2000-11-19 Mark Mitchell <mark@codesourcery.com>
740 * decl.c (init_decl_processing): Correct name of pure virtual
741 function under the new ABI.
742 * rtti.c (throw_bad_cast): Likewise, for bad cast function.
743 (throw_bad_typeid): Likewise for bad typeid function.
745 2000-11-18 Mark Mitchell <mark@codesourcery.com>
747 * decl.c (grokparms): Don't even function types of `void' type,
749 * mangle.c (write_type): Don't crash when confronted with the
752 * decl.c (grokparms): Don't create parameters of `void' type.
754 2000-11-17 Zack Weinberg <zack@wolery.stanford.edu>
756 * lex.c (mark_impl_file_chain): Delete.
757 (init_parse): Remove call to ggc_add_string_root. No need to
758 ggc_strdup a string constant. Do not add impl_file_chain to GC
760 (handle_pragma_implementation): No need to ggc_strdup main_filename.
762 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
764 * pt.c (tsubst_expr, DECL_STMT): Instantiate decl's type.
766 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
768 * cp-tree.h (PARMLIST_ELLIPSIS_P): New macro.
769 * decl.c (grokdeclarator): Don't reject void parms here.
770 (require_complete_types_for_parms): Simplify, use
771 complete_type_or_else.
772 (grokparms): Remove bitrot. Remove funcdef parm.
773 Deal with ellipsis parm lists here.
774 * semantics.c (finish_parmlist): Don't append void_list_node
775 here. Set PARMLIST_ELLIPSIS_P.
777 2000-11-17 Nathan Sidwell <nathan@codesourcery.com>
779 * typeck2.c (incomplete_type_error): Reorganise to avoid
780 excessive diagnostics.
782 2000-11-16 Zack Weinberg <zack@wolery.stanford.edu>
784 * lex.c (struct impl_files, internal_filename): Constify a char *.
786 2000-11-16 Mark Mitchell <mark@codesourcery.com>
788 * mangle.c (write_special_name_constructor): Don't generate
789 assembler junk when confronted with an old-style constructor.
790 (write_special_name_destructor): Likewise.
791 (mangle_decl_string): Do it here instead.
793 2000-11-16 Nathan Sidwell <nathan@codesourcery.com>
795 * call.c (op_error): Make error messages clearer.
797 2000-11-15 Mark Mitchell <mark@codesourcery.com>
799 * decl.c (wrapup_globals_for_namespace): Don't mark things
800 TREE_ASM_WRITTEN when they're not.
802 2000-11-15 Jason Merrill <jason@redhat.com>
804 * typeck2.c (friendly_abort): Uncount the error before handing
807 2000-11-15 Nathan Sidwell <nathan@codesourcery.com>
809 * typeck.c (lookup_anon_field): Cope with qv qualifiers.
811 2000-11-14 Mark Mitchell <mark@codesourcery.com>
813 * class.c (build_vtbl_initializer): Fix typo in comment.
814 * typeck.c (expr_sizeof): Don't crash on errors.
816 2000-11-14 Jim Wilson <wilson@redhat.com>
818 * lang-specs.h: Add %2 after %(cc1_options).
820 2000-11-14 Richard Henderson <rth@redhat.com>
822 * typeck.c (c_sizeof): Be strict about casting result value
823 back to c_size_type_node.
824 (expr_sizeof, c_sizeof_nowarn, c_alignof): Likewise.
826 2000-11-13 Joseph S. Myers <jsm28@cam.ac.uk>
828 * typeck.c (build_unary_op): Use boolean_increment from
829 c-common.c, moving the relevant code there.
831 2000-11-11 Jason Merrill <jason@redhat.com>
833 * typeck.c (mark_addressable): Don't call put_var_into_stack.
835 * decl.c (maybe_commonize_var): Set DECL_UNINLINABLE for statics
838 2000-11-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
840 * decl.c (grokdeclarator, save_function_data): Use memcpy, not bcopy.
841 * lex.c (copy_lang_decl): Likewise.
843 2000-11-09 Mark Mitchell <mark@codesourcery.com>
845 * dump.c (cp_dump_tree): Don't dump function bodies here.
847 * Make-lang.in (CXX_C_OBJS): Add c-dump.o.
848 (dump.o): Update dependency list.
849 * cp-tree.h (DECL_MAYBE_TEMPLATE): Remove.
850 (flag_dump_translation_unit): Likewise.
851 (CP_TYPE_QUALS): Adjust definition.
852 (DECL_C_BIT_FIELD): Remove.
853 (SET_DECL_C_BIT_FIELD): Likewise.
854 (CLEAR_DECL_C_BIT_FIELD): Likewise.
855 (add_maybe_template): Likewise.
856 (strip_array_types): Likewise.
857 (dump_node_to_file): Likewise.
858 (cp_dump_tree): New function.
859 * decl.c (init_decl_processing): Set lang_dump_tree.
860 * decl2.c (flag_dump_translation_unit): Remove.
861 * dump.c: Move most of it to ../c-dump.c.
862 (cp_dump_tree): New function.
863 * pt.c (add_maybe_template): Remove.
864 * typeck.c (strip_array_types): Likewise.
866 2000-11-07 Eric Christopher <echristo@redhat.com>
868 * decl.c (init_decl_processing): Change definition of
869 __wchar_t to wchar_t. Remove artificial declaration of
871 * lex.c: Change instances of __wchar_t to wchar_t.
873 2000-11-09 Nathan Sidwell <nathan@codesourcery.com>
875 * lex.c (do_identifier): Don't lookup_name for operators.
876 * parse.y (operator): Save looking_for_typename.
877 (unoperator): Restore it.
878 * spew.c (frob_opname): Use nth_token for lookahead.
880 2000-11-08 Nathan Sidwell <nathan@codesourcery.com>
882 * decl.c (grok_op_properties): Always use coerce_new_type and
884 * decl2.c (coerce_new_type): Use c_size_type_node. Preserve
885 exception specification. Tidy up.
886 (coerce_delete_type): Preserve exception specification. Tidy up.
888 2000-11-07 Joseph S. Myers <jsm28@cam.ac.uk>
890 * class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
891 (push_binding_level), error.c (cp_tree_printer), pt.c
892 (process_partial_specialization, tsubst_template_arg_vector),
893 search.c (lookup_member): Use memset () instead of bzero ().
895 2000-11-07 Nathan Sidwell <nathan@codesourcery.com>
897 * decl.c (build_ptrmemfunc_type): Allow error_mark_node.
899 2000-11-05 Joseph S. Myers <jsm28@cam.ac.uk>
901 * Make-lang.in (c++.distdir): Remove.
903 2000-11-04 Mark Mitchell <mark@codesourcery.com>
905 * decl2.c (do_nonmember_using_decl): Allow `extern "C"'
906 declarations from different namespaces to be combined.
908 2000-11-03 Zack Weinberg <zack@wolery.stanford.edu>
910 * decl.c: Include tm_p.h.
912 2000-11-03 Joseph S. Myers <jsm28@cam.ac.uk>
914 * tree.c (cp_tree_equal): Use memcmp () instead of bcmp ().
916 2000-11-02 Joseph S. Myers <jsm28@cam.ac.uk>
918 * dump.c (dequeue_and_dump), lex.c (interface_strcmp), method.c
919 (build_overload_value), repo.c (open_repo_file), xref.c
920 (open_xref_file): Use strchr () and strrchr () instead of index ()
923 2000-11-01 Bernd Schmidt <bernds@redhat.co.uk>
925 * call.c (build_over_call): Call fold on the CALL_EXPR.
927 2000-11-01 Gabriel Dos Reis <gdr@codesourcery.com>
929 * error.c (dump_template_decl): Separate template hearders with
932 2000-10-31 Gabriel Dos Reis <gdr@codesourcery.com>
934 * error.c: Move TFF_ macros into cp-tree.h. Throughout, replace
935 TS_* flags with corresponding TFF_*. Adjust prototypes of
936 functions (which used to take a tree_string_flags) to take an int.
938 * cp-tree.h (enum tree_string_flags): Remove
939 (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE, TFF_CLASS_SCOPE,
940 TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPEDEF, TFF_DECL_SPECIFIERS,
941 TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
942 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
943 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS,
944 TFF_TEMPLATE_NAME, TFF_EXPR_IN_PARENS, TFF_SCOPE): New macros.
945 (type_as_string, decl_as_string, expr_as_string,
946 context_as_string): Adjust prototype.
948 * class.c (dump_class_hierarchy_r): Use TFF_PLAIN_IDENTIFIER
951 * pt.c (mangle_class_name_for_template): Use TFF_CHASE_TYPEDEF
952 instead of TF_CHASE_TYPEDEFS. Use TFF_PLAIN_IDENTIFIER instead of
955 2000-10-30 Mark Mitchell <mark@codesourcery.com>
957 * cp-tree.h (DECL_EXTERNAL_LINKAGE_P): New macro.
958 (linkage_kind): New enumeration.
959 (decl_linkage): New function.
960 * decl2.c (comdat_linkage): Extend comment.
961 * error.c (dump_function_decl): Print the arguments used to
962 instantiate a template, even when not printing the type of the
964 * pt.c (convert_nontype_argument): Use DECL_EXTERNAL_LINKAGE_P,
965 not TREE_PUBLIC, to test for external linkage.
966 * tree.c (decl_linkage): New function.
968 2000-10-28 Mark Mitchell <mark@codesourcery.com>
970 * pt.c (instantiate_decl): Always instantiate static data members
971 initialized in-class.
973 2000-10-27 Zack Weinberg <zack@wolery.stanford.edu>
975 * Make-lang.in: Move all build rules here from Makefile.in,
976 adapt to new context. Wrap all rules that change the current
977 directory in parentheses. Expunge all references to $(P).
978 When one command depends on another and they're run all at
979 once, use && to separate them, not ;. Add OUTPUT_OPTION to
980 all object-file generation rules. Delete obsolete variables.
982 * Makefile.in: Delete.
983 * config-lang.in: Delete outputs= line.
985 2000-10-26 Gabriel Dos Reis <gdr@codesourcery.com>
987 * error.c (dump_function_decl): Print no space between
988 `ptr-operator' the `type-specifier' of the return type.
989 (dump_type_prefix): Make sure we put space at the appropriate
992 2000-10-23 Jason Merrill <jason@redhat.com>
994 * call.c (equal_functions): Also call decls_match for extern "C" fns.
996 2000-10-22 Jason Merrill <jason@redhat.com>
998 * call.c (build_conditional_expr): Use ocp_convert to force
1001 2000-10-22 Mark Mitchell <mark@codesourcery.com>
1003 * call.c (standard_conversion): Use RVALUE_CONVs for all
1004 expressions that satisfy lvalue_p, not just those that satisfy
1007 * optimize.c (copy_body_r): Don't treat CALL_EXPRs specially.
1009 * typeck.c (c_sizeof): Return an expression of `size_t' type,
1010 not one with TYPE_IS_SIZETYPE set.
1011 (dubious_conversion_warnings): Remove special-case code.
1013 2000-10-21 Geoffrey Keating <geoffk@cygnus.com>
1015 * decl2.c (arg_assoc_type): Handle VECTOR_TYPE.
1016 * error.c (dump_type): Handle VECTOR_TYPE like POINTER_TYPE.
1017 (dump_type_prefix): Print vector-of-int as 'int vector'.
1018 (dump_type_suffix): Handle VECTOR_TYPE like POINTER_TYPE.
1019 * tree.c (walk_tree): Handle VECTOR_TYPE.
1021 * decl.c (init_decl_processing): Call MD_INIT_BUILTINS.
1023 2000-10-21 Jason Merrill <jason@redhat.com>
1025 * parse.y (operator): Set got_object from got_scope.
1026 Set looking_for_typename.
1027 * decl.c (lookup_name_real): Clear val after setting from_obj.
1028 Reorganize diagnostic.
1030 2000-10-20 Jason Merrill <jason@redhat.com>
1032 * tree.c (walk_tree): Don't walk into default args.
1034 * error.c (dump_expr): Use host_integerp.
1036 2000-10-20 David Edelsohn <edelsohn@gnu.org>
1038 * typeck2.c (abstract_virtuals_error): Use "because" instead of
1039 "since" in error message.
1041 Fri Oct 20 13:54:59 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1043 * typeck.c (dubious_conversion_warning): Suppress if TYPE_IS_SIZETYPE.
1045 2000-10-20 Jeffrey Oldham <oldham@codesourcery.com>
1047 * decl.c (revert_static_member_fn): Fixed typo.
1049 2000-10-19 Mark Mitchell <mark@codesourcery.com>
1051 * class.c (subobject_offset_fn): New type.
1052 (dfs_record_base_offsets): Remove.
1053 (record_base_offsets): Likewise.
1054 (dfs_search_base_offsets): Likewise.
1055 (record_subobject_offset): New function.
1056 (check_subobject_offset): Likewise.
1057 (walk_subobject_offsets): Likewise.
1058 (record_subobject_offsets): Likewise.
1059 (layout_conflict_p): Reimplement.
1060 (layout_nonempty_base_or_field): Correct handling of type
1061 conflicts during layout.
1062 (layout_empty_base): Likewise.
1063 (build_base_field): Adjust to handle new representation of empty
1065 (build_base_fields): Likewise.
1066 (layout_virtual_bases): Likewise.
1067 (splay_tree_compare_integer_csts): New function.
1068 (layout_class_type): Use a splay_tree, rather than a varray, to
1069 represent the offsets of empty bases.
1071 * cp-tree.h (DECL_ANTICIPATED): Don't require a FUNCTION_DECL.
1072 * decl.c (select_decl): Don't return declarations that are
1075 2000-10-18 Mark Mitchell <mark@codesourcery.com>
1077 * cp-tree.h (cp_tree_index): Add CPTI_FAKE_STD.
1078 (fake_std_node): New macro.
1079 * decl.c (in_std): Rename to ...
1080 (in_fake_std): ... this.
1081 (flag_no_builtin): Remove.
1082 (flag_no_nonansi_builtin): Likewise.
1083 (walk_namespaces_r): Use fake_std_node.
1084 (push_namespace): Use std_identifier.
1085 (pop_namespace): Use in_fake_std.
1086 (lookup_name_real): Use fake_std_node.
1087 (init_decl_processing): When -fhonor-std, create the `std'
1088 namespace. Don't create a dummy fake_std_node in that case.
1089 Adjust call to c_common_nodes_and_builtins. Use std_identifier.
1090 (builtin_function): Put builtins whose names don't begin
1091 with `_' in the std namespace.
1092 * decl2.c (flag_no_builtin): Remove.
1093 (flag_no_nonansi_builtin): Likewise.
1094 (set_decl_namespace): Use fake_std_node.
1095 (validate_nonmember_using_decl): Likewise.
1096 (do_using_directive): Likewise.
1097 (handle_class_head): Likewise.
1098 * dump.c (dequeue_and_dump): Likewise.
1099 * except.c (init_exception_processing): Use std_identifier.
1100 * init.c (build_member_call): Use fake_std_node.
1101 * rtti.c (init_rtti_processing): Use std_identifier.
1103 2000-10-17 Mark Mitchell <mark@codesourcery.com>
1105 * cp-tree.h (back_end_hook): Remove declaration.
1106 * decl2.c (back_end_hook): Remove definition.
1108 * dump.c (dequeue_and_dump): Dump TREE_USED.
1110 Tue Oct 17 20:19:06 2000 Brad Lucier <lucier@math.purdue.edu>
1112 * spew.c (snarf_defarg): Cast 2nd arg to obstack_blank to (int).
1114 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
1116 * decl.c (WINT_TYPE): Define.
1117 (init_decl_processing): Create types unsigned_ptrdiff_type_node,
1118 c_size_type_node, signed_size_type_node and wint_type_node.
1120 2000-10-17 Joseph S. Myers <jsm28@cam.ac.uk>
1122 * decl2.c (warn_missing_format_attribute): New variable.
1123 (lang_decode_option): Decode -Wmissing-format-attribute.
1125 2000-10-16 Mark Mitchell <mark@codesourcery.com>
1127 * typeck.c (qualify_type): Remove.
1128 (composite_pointer_type): Fix handling of conversions to `cv void*'.
1130 2000-10-14 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1132 * Makefile.in (parse.c, parse.h): Fix think-o in last patch.
1134 2000-10-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1136 * Makefile.in (parse.c, parse.h): Create atomically.
1138 2000-10-12 Mark Mitchell <mark@codesourcery.com>
1140 * class.c (current_obstack): Remove.
1141 * decl.c (ggc_p): Remove.
1142 (start_decl): Don't use decl_tree_cons.
1143 (grokdeclarator): Don't use build_decl_list.
1144 (start_function): Don't use decl_tree_cons.
1145 (finish_function): Don't mess with obstacks.
1146 * decl2.c (grok_x_components): Don't use build_decl_list.
1147 * lex.c (make_call_declarator): Don't call decl_tree_cons.
1148 (implicitly_declare_fn): Don't call build_decl_list.
1149 * parse.y (frob_specs): Don't call build_decl_list or
1151 (expr_or_declarator_intern): Don't call decl_tree_cons.
1152 (primary): Don't call build_decl_list.
1153 (fcast_or_absdcl): Likewise.
1154 (typed_declspecs): Don't call decl_tree_cons.
1155 (reserved_declspecs): Don't call build_decl_list.
1156 (declmods): Likewise.
1157 (reserved_typespecquals): Likewise.
1159 (new_type_id): Likewise.
1160 (cv_qualifiers): Likewise.
1161 (after_type_declarator_intern): Likewise.
1162 (notype_declarator_intern): Likewise.
1163 (absdcl_intern): Likewise.
1164 (named_parm): Likewise.
1165 * pt.c (most_specialized_class): Likewise.
1166 * repo.c (temporary_obstack): Make it a structure, not a pointer.
1167 (init_repo): Initialize it.
1168 * search.c (current_obstack): Remove.
1169 * typeck2.c (add_exception_specifier): Don't call build_decl_list.
1171 2000-10-09 Richard Henderson <rth@cygnus.com>
1173 * Make-lang.in (CXX_EXTRA_HEADERS): Remove.
1174 (c++ language support bits for libgcc): Remove.
1175 (c++.clean): Remove cplib2.txt cleanup.
1176 * config-lang.in (headers, lib2funcs): Remove.
1178 * exception.cc, new.cc, new1.cc, new2.cc: Remove files.
1179 * tinfo.cc, tinfo.h, tinfo2.cc, vec.cc: Remove files.
1180 * inc/cxxabi.h, inc/exception, inc/new: Remove files.
1181 * inc/new.h, inc/typeinfo: Remove files.
1183 2000-10-08 Joseph S. Myers <jsm28@cam.ac.uk>
1185 * decl.c (INTMAX_TYPE, UINTMAX_TYPE): Define if not already
1187 (init_decl_processing): Initialize intmax_type_node and
1190 2000-10-06 Richard Henderson <rth@cygnus.com>
1192 * cp-tree.h (struct cp_language_function): Remove x_result_rtx.
1193 (original_result_rtx): Remove.
1194 * decl.c (save_function_data): Don't clear x_result_rtx.
1195 (mark_lang_function): Don't mark it either.
1196 * expr.c (fixup_result_decl): Remove.
1197 * semantics.c (genrtl_named_return_value): Frob the return decl
1198 before calling emit_local_var.
1199 (genrtl_finish_function): Don't call fixup_result_decl.
1200 Always emit the jump to return_label.
1202 2000-10-06 Nathan Sidwell <nathan@codesourcery.com>
1204 * pt.c (lookup_template_class): Set current access for enum.
1205 (tsubst_enum): Set file & line for enum decl.
1207 * spew.c (yylex): Remove unused variable.
1209 2000-10-05 Richard Henderson <rth@cygnus.com>
1211 * semantics.c (genrtl_finish_function): Don't init or check
1212 can_reach_end; remove noreturn and return value checks.
1214 2000-10-05 Tom Tromey <tromey@cygnus.com>
1216 * init.c (build_java_class_ref): Use `build_static_name' with a
1217 suffix, not a prefix, to build the class object's name.
1219 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
1221 * cp-tree.h (access_kind): Fix comment typo.
1222 * decl2.c (grokfield): Fix diagnostic typo.
1223 * semantics.c (finish_template_type): Fix comment typo.
1224 (finish_qualified_object_call_expr): Likewise.
1226 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
1228 * pt.c (tsubst_expr, DECL_STMT case): Don't process if
1231 2000-10-05 Nathan Sidwell <nathan@codesourcery.com>
1233 * spew.c (frob_id): New static function.
1234 (frob_opname): Use it.
1237 2000-10-01 Mark Mitchell <mark@codesourcery.com>
1239 * decl.c (lang_mark_false_label_stack): Remove.
1240 * lex.c (cp_mang_lang_type): Use ggc_alloc_cleared.
1242 2000-09-30 Joseph S. Myers <jsm28@cam.ac.uk>
1244 * gxxint.texi: Use @email for formatting email addresses.
1246 2000-09-29 Gabriel Dos Reis <gdr@codesourcery.com>
1248 * error.c: Remove direct obstack manipulation. Replace with
1249 output_buffer-based formatting. Adjust calls to removed macros.
1250 (obstack_chunk_alloc, obstack_chunk_free): Remove.
1251 (OB_INIT, OB_PUTC, OB_PUTC2, OB_PUTS, OB_PUTID, OB_PUTCP,
1252 OB_FINISH, OB_PUTI, OB_END_TEMPLATE): Likewise.
1254 2000-09-24 Mark Mitchell <mark@codesourcery.com>
1256 * ir.texi: Move to ../c-tree.texi.
1258 2000-09-20 Jason Merrill <jason@redhat.com>
1260 * decl2.c (get_guard): Check DECL_FUNCTION_SCOPE_P.
1262 2000-09-21 Andreas Jaeger <aj@suse.de>
1264 * errfn.c: Move declaration of cp_printer and cp_printers to ...
1265 * cp-tree.h: ... here.
1267 * error.c: Remove declaration of cp_printer.
1269 2000-09-20 Mark Mitchell <mark@codesourcery.com>
1271 * tree.c (mark_local_for_remap_r): Handle CASE_LABELs.
1273 2000-09-20 Hans-Peter Nilsson <hp@axis.com>
1275 * except.c: Delete #if 0:d EXCEPTION_SECTION_ASM_OP-default and
1278 2000-09-18 Mark Mitchell <mark@codesourcery.com>
1280 * decl.c (start_function): Robustify.
1282 2000-09-18 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
1284 * cp-tree.h (check_function_format): Accept a `status' parameter.
1286 * call.c, typeck.c: Updates calls to `check_function_format'.
1288 2000-09-17 Geoffrey Keating <geoffk@cygnus.com>
1290 * decl2.c (handle_class_head): Always push some scope even
1293 2000-09-16 Mark Mitchell <mark@codesourcery.com>
1295 * cp-tree.h (struct cp_language_function): Remove
1296 x_scope_stmt_stack and name_declared.
1297 (current_scope_stmt_stack): Remove.
1298 (function_name_declared_p): New macro.
1299 (struct lang_decl_flags): Use c_lang_decl as a base class.
1301 (struct lang_decl): Replace saved_tree with context.
1302 (DECL_FRIEND_CONTEXT): Adjust accordingly.
1303 (SET_DECL_FRIEND_CONTEXT): Likewise.
1304 (DECL_VIRTUAL_CONTEXT): Likewise.
1305 (DECL_SAVED_TREE): Remove.
1306 (C_DECLARED_LABEL_FLAG): Likewise.
1307 (cplus_expand_expr_stmt): Don't declare.
1308 (add_decl_stmt): Likewise.
1309 (add_scope_stmt): Likewise.
1310 * decl.c (mark_stmt_tree): Remove.
1311 (case_compare): Likewise.
1312 (finish_case_label): Use c_add_case_label.
1313 (init_decl_processing): Set more language-specific hooks.
1314 (build_enumerator): Fix typo in comment.
1315 (cplus_expand_expr_stmt): Remove.
1316 (mark_lang_function): Use mark_c_language_function.
1317 (lang_mark_tree): Use c_mark_lang_decl.
1318 * decl2.c: Change order of inclusion.
1319 * except.c: Likewise.
1320 * expr.c (cplus_expand_expr): Remove handling of STMT_EXPR. Fall
1321 back on c_expand_expr.
1322 * friend.c: Include expr.h.
1323 * init.c: Change order of inclusion.
1324 * Makefile.in: Update dependencies.
1325 * lex.h (free_lang_decl_chain): Remove.
1326 * optimize.c (maybe_clone_body): Use function_name_declared_p.
1327 * pt.c (build_template_decl): Don't copy DECL_VIRTUAL_CONTEXT if
1329 (instantiate_decl): Use function_name_declared_p.
1330 * semantics.c (lang_expand_expr_stmt): Remove.
1331 (set_current_function_name_declared): Likewise.
1332 (current_function_name_declared): Likewise.
1333 (begin_compound_stmt): Use function_name_declared_p.
1334 (add_decl_stmt): Remove.
1335 (setup_vtbl_ptr): Use function_name_declared_p.
1336 (add_scope_stmt): Remove.
1337 (current_scope_stmt_stack): New function.
1338 (cp_expand_stmt): Don't handle SCOPE_STMTs.
1339 (expand_body): Use function_name_declared_p.
1340 * tree.c (cp_statement_code_p): Don't include SCOPE_STMT.
1341 * typeck.c: Change order of includes.
1342 (convert_sequence): Remove.
1344 2000-09-14 Joseph S. Myers <jsm28@cam.ac.uk>
1346 * lex.c (reswords): Add _Complex.
1348 Thu Sep 14 12:10:45 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
1350 * Make-lang.in (cplib2.txt): Depend on cp/Makefile.
1352 2000-09-13 J. David Anglin <dave@hiauly1.hia.nrc.ca>
1354 * init.c (begin_init_stmts): Don't use // comments.
1356 2000-09-12 Jason Merrill <jason@redhat.com>
1358 * decl.c (maybe_deduce_size_from_array_init): Set do_default for
1359 all non-extern arrays.
1361 * decl.c (grokdeclarator): Complain about 'friend T' for implicit
1362 typenames, too. Downgrade complaint to pedwarn.
1363 (xref_tag): Warn about surprising behavior of 'friend struct T'.
1364 * decl2.c (handle_class_head): Generate a TYPENAME_TYPE for
1365 'class This::Inherited'.
1367 2000-09-12 Mark Mitchell <mark@codesourcery.com>
1369 * decl.c (finish_case_label): Given the LABEL_DECL a
1372 2000-09-12 Gabriel Dos Reis <gdr@codesourcery.com>
1374 * error.c (TFF_PLAIN_IDENTIFIER, TFF_NAMESPACE_SCOPE,
1375 TFF_CLASS_SCOPE, TFF_CHASE_NAMESPACE_ALIAS, TFF_CHASE_TYPDEF,
1376 TFF_DECL_SPECIFIERS, TFF_CLASS_KEY_OR_ENUM, TFF_RETURN_TYPE,
1377 TFF_FUNCTION_DEFAULT_ARGUMENTS, TFF_EXCEPTION_SPECIFICATION,
1378 TFF_TEMPLATE_HEADER, TFF_TEMPLATE_DEFAULT_ARGUMENTS, TFF_SCOPE):
1380 (sorry_for_unsupported_tree, print_scope_operator,
1381 print_left_paren, print_right_paren, print_left_bracket,
1382 print_right_bracket, print_whitespace): Likewise.
1383 (aggr_variety): Rename to class_key_or_enum.
1384 (print_type): Rename to print_type_id.
1385 (print_type_specifier_seq, print_simple_type_specifier,
1386 print_elaborated_type_specifier,
1387 print_rest_of_abstract_declarator,
1388 print_parameter_declaration_clause, print_exception_specification,
1389 print_nested_name_specifier, print_template_id,
1390 typedef_original_name, print_template_argument_list_start,
1391 print_template_argument_list_end): New functions.
1393 2000-09-11 Gabriel Dos Reis <gdr@codesourcery.com>
1395 * ir.texi: Add more documentation.
1397 2000-09-11 Mark Mitchell <mark@codesourcery.com>
1399 * cp-tree.h (struct saved_scope): Remove x_function_parms.
1400 (current_function_parms): Don't define.
1401 (struct cp_language_function): Remove parms_stored.
1402 (current_function_just_assigned_this): Don't define.
1403 (current_function_parms_stored): Likewise.
1404 (static_ctors): Declare.
1405 (static_dtors): Likewise.
1406 (SF_EXPAND): Don't define.
1407 (expand_start_early_try_stmts): Remove declaration.
1408 (store_parm_decls): Likewise.
1409 * decl.c (static_ctors): Don't declare.
1410 (static_dtors): Likewise.
1411 (struct binding_level): Remove this_block.
1412 (poplevel): Remove dead code.
1413 (set_block): Likewise.
1414 (mark_binding_level): Don't mark this_block.
1415 (mark_saved_scope): Don't mark x_function_parms.
1416 (init_decl_processing): Don't add current_function_parms as a GC
1418 (check_function_type): Change prototype.
1419 (start_function): Remove RTL-generation code.
1420 (expand_start_early_try_stmts): Remove.
1421 (store_parm_decls): Give it internal linkage. Remove
1422 RTL-generation code.
1423 (finish_function): Remove RTL-generation code.
1424 * decl2.c (static_ctors): Fix formatting.
1425 (static_dtors): Likewise.
1426 * method.c (use_thunk): Don't call store_parm_decls.
1427 (synthesize_method): Likewise.
1428 * optimize.c (maybe_clone_body): Likewise.
1429 * parse.y (fn.def2): Likewise.
1430 (.set_base_init): Likewise.
1431 (nodecls): Likewise.
1432 * pt.c (instantiate_decl): Likewise.
1433 * rtti.c (synthesize_tinfo_fn): Likewise.
1434 * semantics.c (genrtl_try_block): Simplify.
1435 (expand_body): Use genrtl_start_function and
1436 genrtl_finish_function.
1437 (genrtl_start_function): New function.
1438 (genrtl_finish_function): Likewise.
1440 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
1442 * error.c (cp_tree_printer, case 'P'): Append break.
1444 2000-09-11 Nathan Sidwell <nathan@codesourcery.com>
1446 * cp-tree.h (frob_opname): Declare.
1447 * parse.y (saved_scopes): New static variable.
1448 (cp_parse_init): Adjust.
1449 (do_id): If lastiddecl is NULL, do do_identifier.
1450 (operator): Save scope information.
1451 (unoperator): New reduction. Restore scope information.
1452 (operator_name): Append unoperator. Call frob_opname.
1453 * spew.c (frob_opname): Define.
1455 2000-09-10 Zack Weinberg <zack@wolery.cumb.org>
1457 * decl.c, rtti.c: Include defaults.h if not already included.
1458 Don't define the *_TYPE_SIZE macros.
1460 2000-09-09 Mark Mitchell <mark@codesourcery.com>
1462 * cp-tree.h (push_switch): Change prototype.
1463 (check_cp_case_value): Remove declaration.
1464 (decl_constant_value): Likewise.
1465 * decl.c (struct cp_switch): Add switch_stmt and cases.
1466 (case_compare): New function.
1467 (push_switch): Set switch_stmt. Initialize cases.
1468 (pop_switch): Clean up cases.
1469 (define_case_label): Rename to ...
1470 (finish_case_label): ... this. Do semantic analysis for case
1472 (start_function): Correct comment.
1473 * decl2.c (check_cp_case_value): Remove.
1474 * expr.c (do_case): Remove.
1475 * pt.c (tsubst_expr): Adjust call to finish_case_label.
1476 * semantics.c (genrtl_do_poplevel): Remove declaration.
1477 (RECHAIN_STMTS): Remove.
1478 (finish_break_stmt): Use build_break_stmt.
1479 (finish_continue_stmt): Use build_continue_stmt.
1480 (finish_switch_cond): Adjust condition here, rater than in
1481 c_expand_start_case.
1482 (finish_case_label): Remove.
1483 * typeck.c (c_expand_return): Remove.
1484 (c_expand_start_case): Likewise.
1486 2000-09-07 Gabriel Dos Reis <gdr@codesourcery.com>
1488 * ir.texi: Document type nodes.
1490 2000-09-06 Mark Mitchell <mark@codesourcery.com>
1492 * cp-tree.h (init_cp_semantics): Declare.
1493 (genrtl_try_block): Don't declare.
1494 (genrtl_handler): Likewise.
1495 (genrtl_catch_block): Likewise.
1496 (genrtl_ctor_stmt): Likewise.
1497 (genrtl_subobject): Likewise.
1498 (genrtl_do_poplevel): Likewise.
1499 (genrtl_named_return_value): Likewise.
1500 * lex.c (init_parse): Call init_cp_semantics.
1501 * semantics.c (genrtl_try_block): Give it internal linkage.
1502 (genrtl_handler): Likewise.
1503 (genrtl_catch_block): Likewise.
1504 (genrtl_ctor_stmt): Likewise.
1505 (genrtl_subobject): Likewise.
1506 (genrtl_do_poplevel): Likewise.
1507 (genrtl_named_return_value): Likewise.
1508 (lang_expand_stmt): Rename to ...
1509 (cp_expand_stmt): ... this. Only handle C++-specific nodes.
1510 (init_cp_semantics): Define.
1512 * decl.c (initialize_local_var): Remove RTL-generating code.
1513 * semantics.c (genrtl_try_block): Fix formatting.
1515 Move statement-tree facilities from C++ to C front-end.
1516 * cp-tree.h (cp_tree_index): Remove CPTI_VOID_ZERO.
1517 (void_zero_node): Remove.
1518 (stmt_tree): Likewise.
1519 (scope_chain): Adjust.
1520 (language_function): Rename to cp_language_function.
1521 (cp_function_chain): Adjust.
1522 (current_stmt_tree): Remove.
1523 (last_tree): Likewise.
1524 (last_expr_type): Likewise.
1525 (struct lang_decl): Adjust.
1526 (STMT_IS_FULL_EXPR_P): Remove.
1528 (begin_stmt_tree): Likewise.
1529 (finish_stmt_tree): Likewise.
1530 (walk_tree_fn): Likewise.
1531 (walk_stmt_tree): Likewise.
1532 * class.c (finish_struct): Replace use of add_tree with add_stmt.
1533 * decl.c (mark_stmt_tree): Adjust type.
1534 (init_decl_processing): Don't build void_zero_node.
1535 (initialize_local_var): Adjust usage of current_stmt_tree.
1536 (finish_enum): Use add_stmt, not add_tree.
1537 (save_function_data): Adjust use of language_function.
1538 (finish_constructor_body): Use add_stmt, not add_tree.
1539 (finish_destructor_body): Likewise.
1540 (push_cp_function_context): Adjust use of language_function.
1541 (pop_cp_function_context): Likewise.
1542 (mark_lang_function): Likewise.
1543 (mark_cp_function_context): Likewise.
1544 * init.c (build_aggr_init): Adjust use of current_stmt_tree.
1545 (build_vec_init): Likewise.
1546 * semantics.c (SET_LAST_STMT): Remove.
1547 (RECHAIN_STMTS): Don't use it.
1548 (stmts_are_full_exprs_p): Adjust use of current_stmt_tree.
1549 (current_stmt_tree): Define.
1551 (finish_goto_stmt): Use add_stmt, not add_tree.
1552 (finish_expr_stmt): Likewise.
1553 (begin_if_stmt): Likewise.
1554 (finish_then_clause): Likewise.
1555 (begin_while_stmt): Likewise.
1556 (begin_do_stmt): Likewise.
1557 (finish_return_stmt): Likewise.
1558 (begin_for_stmt): Likewise.
1559 (finish_break_stmt): Likewise.
1560 (finish_continue_stmt): Likewise.
1561 (begin_switch_stmt): Likewise.
1562 (finish_case_label): Likewise.
1563 (begin_try_block): Likewise.
1564 (begin_function_try_block): Likewise.
1565 (begin_handler): Likewise.
1566 (begin_catch_block): Likewise.
1567 (begin_compound_stmt): Likewise.
1568 (begin_asm_stmt): Likewise.
1569 (finish_asm_stmt): Likewise.
1570 (finish_label_stmt): Likewise.
1571 (add_decl_stmt): Likewise.
1572 (finish_subobject): Likewise.
1573 (finish_decl_cleanup): Likewise.
1574 (finish_named_return_value): Likewise.
1575 (setup_vtbl_ptr): Likewise.
1576 (add_scope_stmt): Likewise.
1577 (finish_stmt_expr): Likewise.
1578 (prune_unused_decls): Remove.
1579 (begin_stmt_tree): Likewise.
1580 (finish_stmt_tree): Likewise.
1581 (prep_stmt): Adjust use of current_stmt_tree.
1582 (lang_expand_stmt): Likewise.
1583 * tree.c (statement_code_p): Remove.
1584 (cp_statement_code_p): New function.
1585 (walk_stmt_tree): Remove.
1586 (init_tree): Set lang_statement_code_p.
1588 2000-09-06 Zack Weinberg <zack@wolery.cumb.org>
1590 Integrated preprocessor.
1592 * Make-lang.in, Makefile.in: Remove all references to input.c,
1593 gxx.gperf, and hash.h. Add ../c-lex.o to C_OBJS.
1594 * gxx.gperf, hash.h, input.c: Delete.
1595 * lang-specs.h: Pass -lang-c++ to cc1plus so cpplib is
1596 initialized properly.
1598 * class.c (fixup_pending_inline): Take a tree, not a
1599 struct pending_inline *. All callers changed.
1600 (init_class_processing): Set RID_PUBLIC, RID_PRIVATE,
1601 RID_PROTECTED entries in ridpointers[] array here.
1602 * decl.c (duplicate_decls): Do not refer to struct
1604 (record_builtin_type, init_decl_processing): Use RID_MAX not
1606 (grokdeclarator): Use C_IS_RESERVED_WORD.
1607 * decl2.c (lang_decode_option): Ignore -lang-c++ for sake of
1609 (grok_x_components): Do not inspect pending_inlines chain.
1611 * cp-tree.h (struct lang_identifier): Add rid_code entry.
1612 (C_IS_RESERVED_WORD, C_RID_CODE, C_RID_YYCODE): New.
1613 (flag_no_gnu_keywords, flag_operator_names, rid_to_yy): Declare.
1614 (DEFARG_LENGTH, struct pending_inline, TIME_IDENTIFIER_TIME,
1615 TIME_IDENTIFIER_FILEINFO): Kill.
1617 * lex.h: Expunge cp_rid. Rewrite RIDBIT macros to use just a
1619 * parse.y: Call do_pending_inlines unconditionally.
1620 reinit_parse_for_method is now snarf_method. fn.defpen is no
1621 longer necessary. Remove unnecessary <itype> annotation on
1622 SCOPE. Do not refer to end_of_file or struct pending_inline.
1623 * semantics.c (begin_inline_definitions): Call
1624 do_pending_inlines unconditionally.
1626 * lex.c: Remove all code now shared with C front end.
1627 Initialize cpplib properly if USE_CPPLIB. Put reserved words
1628 into the get_identifier table. Rewrite pragma handling to
1629 work with the registry. Move code to save tokens for later
1630 processing to spew.c.
1632 * spew.c: Rewrite everything in terms of token streams instead
1633 of text. Move routines here from lex.c / input.c as
1634 appropriate. GC-mark trees hanging off the pending inlines
1637 2000-09-06 Mark Mitchell <mark@codesourcery.com>
1639 * NEWS: Mention that the named return value extension has been
1641 * cp-tree.h (original_result_rtx): Define.
1642 (TREE_REFERENCE_EXPR): Remove.
1643 (DECL_VPARENT): Likewise.
1644 (pushdecl_nonclass_level): Likewise.
1645 (store_return_init): Likewise.
1646 (reinit_lang_specific): Likewise.
1647 (genrtl_named_return_value): Change prototype.
1648 * decl.c (original_result_rtx): Remove.
1649 (cp_finish_decl): Don't build DECL_STMTs for RESULT_DECLs.
1650 Do not generate RTL for local variables here.
1651 (store_return_init): Remove.
1652 * semantics.c (genrtl_named_return_value): Simplify. Fold in
1654 (finish_named_return_value): Adjust accordingly. Warn that this
1655 extension is deprecated.
1656 (lang_expand_stmt): Adjust call to genrtl_named_return_value.
1658 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
1660 * pt.c (type_unification_real): Replace switch with if.
1661 (unify): Tsubst non-type parms before comparing.
1663 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
1665 * error.c (dump_typename): New function, broken out of ...
1666 (dump_type): ... here. Use it.
1667 * typeck.c (same_type_p): Use cp_tree_equal for TYPENAME_TYPE.
1669 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
1671 * init.c (build_offset_ref): Deal with namespace scoped
1674 2000-09-06 Nathan Sidwell <nathan@codesourcery.com>
1676 * class.c (resolve_address_of_overloaded_function): Add
1677 explanation message.
1678 * decl.c (define_case_label): Reformat explanation.
1679 * decl2.c (finish_static_data_member_decl): Likewise.
1680 (grokfield): Likewise.
1681 * friend.c (do_friend): Likewise.
1683 2000-09-05 Zack Weinberg <zack@wolery.cumb.org>
1685 * tree.c (walk_tree): Expose tail recursion.
1686 (walk_stmt_tree): New function.
1687 * cp-tree.h: Prototype walk_stmt_tree.
1688 * semantics.c (prune_unused_decls): Operate on SCOPE_STMTs not
1689 the BLOCKs directly. If a BLOCK has no variables after
1690 pruning, discard it.
1691 (finish_stmt_tree): Use walk_stmt_tree. No need to save and
1692 restore the line number.
1694 2000-09-05 Mark Mitchell <mark@codesourcery.com>
1696 * Makefile.in (CXX_TREE_H): Add dependency on HTAB_H.
1697 (pt.o): Remove dependency on HTAB_H.
1698 * cp-tree.h: Include hashtab.h.
1699 (walk_tree): Change prototype.
1700 (walk_tree_without_duplicates): New function.
1701 * decl.c (check_default_argument): Use it.
1702 * optimize.c (remap_decl): Adjust calls to walk_tree.
1703 (copy_body): Likewise.
1704 (expand_calls_inline): Likewise.
1705 (calls_setjmp_p): Use walk_tree_without_duplicates.
1706 * pt.c: Don't include hashtab.h.
1707 (for_each_template_parm): Use walk_tree_without_duplicates.
1708 * semantics.c (finish-stmt_tree): Likewise.
1709 (expand_body): Likewise.
1710 * tree.c (walk_tree): Add additional parameter.
1711 (walk_tree_without_duplicates): New function.
1712 (count_trees): Use it.
1713 (verify_stmt_tree): Adjust call to walk_tree.
1714 (find_tree): Use walk_tree_without_duplicates.
1715 (no_linkage_check): Likewise.
1716 (break_out_target_exprs): Adjust call to walk_tree.
1717 (cp_unsave): Likewise.
1719 2000-09-04 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
1721 * cp-tree.def (BOUND_TEMPLATE_TEMPLATE_PARM): New tree code.
1722 (TEMPLATE_TEMPLATE_PARM): Adjust comment.
1723 * cp-tree.h (TYPE_BINFO): Adjust comment.
1724 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO): Likewise.
1725 (TEMPLATE_TYPE_PARM_INDEX): Likewise.
1726 (IS_AGGR_TYPE): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
1727 (TYPE_TEMPLATE_INFO): Likewise.
1728 (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): Likewise.
1729 * class.c (push_nested_class): Likewise.
1730 * decl.c (lookup_name_real): Likewise.
1731 (grokdeclarator): Likewise.
1732 (grok_op_properties): Likewise.
1733 (xref_tag): Likewise.
1734 (xref_basetypes): Likewise.
1735 * decl2.c (constructor_name_full): Likewise.
1736 (arg_assoc_template_arg): Add TEMPLATE_TEMPLATE_PARM case.
1737 (arg_assoc_type): Use BOUND_TEMPLATE_TEMPLATE_PARM instead.
1738 * error.c (dump_type): Split TEMPLATE_TEMPLATE_PARM case.
1739 (dump_type_prefix): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1740 (dump_type_suffix): Likewise.
1741 * init.c (is_aggr_type): Use BOUND_TEMPLATE_TEMPLATE_PARM
1743 (get_aggr_from_typedef): Likewise.
1744 * mangle.c (write_type): Split TEMPLATE_TEMPLATE_PARM case.
1745 (write_expression): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1746 (write_template_parm): Likewise.
1747 (write_template_template_parm): Check tree code instead of
1748 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1749 * method.c (build_overload_nested_name): Add
1750 BOUND_TEMPLATE_TEMPLATE_PARM.
1751 (process_overload_item): Split TEMPLATE_TEMPLATE_PARM case.
1752 * parse.y (bad_parm): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1753 * pt.c (convert_template_argument): Check tree code instead of
1754 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1755 (for_each_template_parm_r): Split TEMPLATE_TEMPLATE_PARM case.
1756 (for_each_template_parm): Adjust comment.
1757 (tsubst): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize.
1758 (tsubst_copy): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1759 (unify): Add BOUND_TEMPLATE_TEMPLATE_PARM. Reorganize. Use
1760 template_args_equal to compare template template parameter cases.
1761 * ptree.c (print_lang_type): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1762 * search.c (lookup_field_1): Use BOUND_TEMPLATE_TEMPLATE_PARM
1764 * tree.c (copy_template_template_parm): Decide whether to create
1765 a TEMPLATE_TEMPLATE_PARM or BOUND_TEMPLATE_TEMPLATE_PARM node.
1766 (walk_tree): Add BOUND_TEMPLATE_TEMPLATE_PARM.
1767 (copy_tree_r): Likewise.
1768 * typeck.c (comptypes): Likewise. Check tree code instead of
1769 using TEMPLATE_TEMPLATE_PARM_TEMPLATE_INFO.
1771 2000-09-04 Mark Elbrecht <snowball3@bigfoot.com>
1773 * decl.c (finish_function): Move the code for handling functions
1774 marked with the constructor and destructor attributes inside the
1777 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
1779 * init.c (resolve_offset_ref): Deal with TEMPLATE_ID_EXPR.
1781 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
1783 * pt.c (lookup_template_class): Remove abort.
1784 * tree.c (get_type_decl): Allow error_mark_node.
1786 2000-09-04 Nathan Sidwell <nathan@codesourcery.com>
1788 * decl2.c (arg_assoc): Deal with COMPONENT_REFs inside
1791 2000-09-03 Mark Mitchell <mark@codesourcery.com>
1793 * operators.def (ALIGNOF_EXPR, MAX_EXPR, MIN_EXPR): Change
1796 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
1798 * parse.y (named_class_head): Check for TYPENAME_TYPE. Simplify
1799 union tag mismatch error reporting.
1801 2000-09-01 Nathan Sidwell <nathan@codesourcery.com>
1803 * call.c (build_scoped_method_call): Check it is not a namespace.
1805 2000-08-30 Jason Merrill <jason@redhat.com>
1807 * cp-tree.h (LOCAL_CLASS_P): Use decl_function_context.
1809 * tree.c (bot_manip): Check TREE_CONSTANT rather than
1810 !TREE_SIDE_EFFECTS. Call break_out_target_exprs and
1811 build_target_expr_with_type for the non-AGGR_INIT_EXPR case.
1813 * decl.c (start_function): Always call make_function_rtl.
1815 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
1817 * semantics.c (prune_unused_decls): New function.
1818 (finish_stmt_tree): Call it via walk_tree.
1820 2000-08-29 Zack Weinberg <zack@wolery.cumb.org>
1822 * class.c (build_secondary_vtable): Constify a char *.
1823 * decl.c (init_decl_processing): Initialize function_id_node,
1824 pretty_function_id_node, and func_id_node.
1825 * input.c (struct input_source): Constify 'str'.
1826 (feed_input): Constify first argument.
1827 * mangle.c (write_identifier): Constify argument.
1828 * pt.c (mangle_class_name_for_template): Constify argument.
1830 2000-08-29 Mark Mitchell <mark@codesourcery.com>
1832 * typeck.c (mark_addressable): Remove code that pokes around in
1835 2000-08-28 Jason Merrill <jason@redhat.com>
1837 * lex.c (file_name_nondirectory): Move to toplev.c.
1839 * cp-tree.h (LOCAL_CLASS_P): New macro.
1840 * class.c (finish_struct_1): Use it.
1842 2000-08-27 Alex Samuel <samuel@codesourcery.com>
1844 * mangle.c (CLASSTYPE_TEMPLATE_ID_P): Remove unexplained voodoo.
1845 (write_encoding): Pass another argument to write_name.
1846 (write_name): Add ignore_local_scope parameter. Fix handling of
1848 (write_nested_name): Use write_unqualified_name.
1849 (write_prefix): Likewise. Skip out on FUNCTION_DECLs.
1850 (write_template_prefix): Use write_unqualified_name.
1851 (write_component): Remove.
1852 (write_local_name): Add parameter. Use direct local entity to
1853 discriminator calculation.
1854 (write_class_enum_type): Pass another argument to write_name.
1855 (write_template_template_arg): Likewise.
1856 (make_guard_variable): Likewise.
1858 2000-08-27 Jason Merrill <jason@redhat.com>
1860 * decl.c (pushdecl): Matching decls for local externs are found in
1861 the current level. Propagate linkage information from previous
1864 2000-08-26 Gabriel Dos Reis <gdr@codesourcery.com>
1866 * ir.texi (Expressions): Fix typo.
1868 2000-08-25 Greg McGary <greg@mcgary.org>
1870 * tree.c (init_tree): Use ARRAY_SIZE.
1872 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
1874 * error.c (cp_tree_printer): Rework.
1876 2000-08-25 Mark Mitchell <mark@codesourcery.com>
1878 * Make-lang.in (CXX_LIB2FUNCS): Remove cp-demangle.o and
1880 (CXX_LIB2SRCS): Remove cp-demangle.c and dyn-string.c.
1881 (cp-demangle.o): Remove target.
1882 (dyn-string.o): Likewise.
1884 * decl.c (grokfndecl): Require that `main' return an `int'.
1885 * mangle.c (write_encoding): Don't mangle return types for
1886 conversion functions.
1888 2000-08-25 Gabriel Dos Reis <gdr@codesourcery.com>
1890 * error.c (tree_formatting_info): New data type.
1891 (tree_being_formatted): New macro.
1892 (tree_formatting_flags): Likewise.
1893 (put_whitespace): Likewise.
1894 (print_tree_identifier): Likewise.
1895 (print_identifier): Likewise.
1896 (cp_tree_printer, print_function_argument_list, print_declaration,
1897 print_expression, print_function_declaration,
1898 print_function_parameter, print_type, print_cv_qualifier): New
1900 (init_error): Initialize lang_printer.
1902 2000-08-24 Jason Merrill <jason@redhat.com>
1904 * typeck.c (build_ptrmemfunc): Just reinterpret if there's no
1905 adjustment necessary.
1907 2000-08-24 Greg McGary <greg@mcgary.org>
1909 * cp-tree.h (MAIN_NAME_P): Remove macro.
1911 2000-08-24 Gabriel Dos Reis <gdr@codesourcery.com>
1913 * error.c (print_instantiation_context): Don't forget to flush the
1916 2000-08-23 Jason Merrill <jason@redhat.com>
1918 * typeck.c (build_ptrmemfunc): Save the input pmf.
1920 * method.c (process_modifiers): Use same_type_p.
1922 2000-08-23 Mark Mitchell <mark@codesourcery.com>
1924 * cp-tree.h (DECL_CLONED_FUNCTION_P): Check DECL_LANG_SPECIFIC.
1925 * mangle.c (write_function_type): Change prototype.
1926 (write_encoding): Don't mangle return types for
1927 constructors or destructors.
1928 (write_type): Adjust call to write_function_type.
1929 * pt.c (instantiate_template): Instantiate alternate entry points
1930 when instantiating the main function.
1932 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
1934 * error.c (cp_print_error_function): Don't use embedded '\n' in
1937 2000-08-23 Gabriel Dos Reis <gdr@codesourcery.com>
1939 * decl.c (init_decl_processing): Remove bogus initialization.
1940 * error.c (lang_print_error_function): Restore here.
1941 (init_error): Initialize print_error_function.
1943 2000-08-22 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
1945 * decl2.c (arg_assoc): Revert my 2000-08-11 change.
1947 2000-08-22 Gabriel Dos Reis <gdr@codesourcery.com>
1949 * Makefile.in (error.o): Depends on diagnostic.h
1951 * cp-tree.h (problematic_instantiation_changed,
1952 record_last_problematic_instantiation, current_instantiation,
1953 print_instantiation_context): Declare.
1954 (maybe_print_template_context): Remove.
1956 * decl.c (init_decl_processing): Set print_error_function to NULL.
1957 (lang_print_error_function): Remove, since we're using a new
1960 * error.c: #include diagnostic.h
1961 (function_category): New function.
1962 (cp_diagnostic_starter): Likewise.
1963 (cp_diagnostic_finalizer): Likewise.
1964 (cp_print_error_function): Likewise.
1965 (maybe_print_instantiation_context): Likewise.
1966 (print_instantiation_full_context): Likewise.
1967 (print_instantiation_partial_context): Likewise.
1968 (print_instantiation_context): Define.
1969 (init_error): Initialize diagnostic pager and finalizer.
1971 * pt.c (problematic_instantiation_changed): Define.
1972 (record_last_problematic_instantiation): Likewise.
1973 (current_instantiation): Likewise.
1974 (maybe_print_template_context): Remove.
1975 (print_template_context): Likewise.
1976 (current_tinst_level): Make static to reflect Brendan Kehoe's
1977 change of 1995-04-13.
1978 (push_tinst_level): Call print_instantiation_context.
1980 2000-08-21 Nix <nix@esperi.demon.co.uk>
1982 * lang-specs.h: Do not process -o or run the assembler if
1985 2000-08-21 Joseph S. Myers <jsm28@cam.ac.uk>
1987 * decl.c (flag_hosted, flag_noniso_default_format_attributes): New
1989 * decl2.c (lang_decode_option): Disable gettext attributes for
1992 2000-08-21 Gabriel Dos Reis <gdr@codesourcery.com>
1994 * lex.c (lang_init_options): Default diagnostic message maximum
1995 length to 80, when line-wrapping.
1997 2000-08-20 Mark Mitchell <mark@codesourcery.com>
1999 * class.c (build_vtbl_initializer): Clear the entire
2000 vtbl_init_data. Start keeping track of the functions for which we
2001 have created vcall offsets here.
2002 (dfs_build_vcall_offset_vtbl_entries): Remove.
2003 (build_vcall_offset_vtbl_entries): Reimplement.
2004 (add_vcall_offset_vtbl_entries_r): New function.
2005 (add_vcall_offset_vtbl_entries_1): Likewise. Tweak logic for
2006 computing when vcall offsets are necessary.
2008 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
2010 * decl.c (member_function_or_else): Use cp_error ... %T.
2011 (grokdeclarator): Likewise.
2012 (start_method): Likewise.
2013 * friend.c (make_friend_class): Use cp_pedwarn ... %T.
2015 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
2017 * decl2.c (grokfield): Set CLASSTYPE_GOT_SEMICOLON on class
2020 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
2022 * cp-tree.h (PTRMEM_OK_P): New macro.
2023 (itf_ptrmem_ok): New enumeration value.
2024 * class.c (resolve_address_of_overloaded_function): Add PTRMEM
2025 argument. Diagnose implicit pointer to member.
2026 (instantiate_type): Don't diagnose implicit pointer to member
2027 here. Pass itf_ptrmem_ok if ok. Adjust calls to
2028 resolve_address_of_overloaded_function.
2029 * init.c (build_offset_ref): Set PTRMEM_OK_P.
2030 (resolve_offset_ref): Don't diagnose implicit pointer to member here.
2031 * semantics.c (finish_parenthesized_expr): Clear OFFSET_REFs here.
2032 * typeck.c (build_x_unary_op): Calculate PTRMEM_OK_P.
2033 (build_unary_op): Deal with single non-static member in
2036 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
2038 * decl2.c (arg_assoc_type): Cope with TYPENAME_TYPE.
2040 2000-08-18 Nathan Sidwell <nathan@codesourcery.com>
2042 * cp-tree.h (enum_name_string): Remove prototype.
2043 (report_case_error): Remove prototype.
2044 * cp/typeck2.c (enum_name_string): Remove.
2045 (report_case_error): Remove.
2046 * error.c (dump_expr): Deal with enum values directly.
2047 Correctly negate integer constant.
2049 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
2051 * inc/cxxabi.h (__cxa_vec_new2, __cxa_vec_new3): Declare.
2052 (__cxa_vec_delete2, __cxa_vec_delete3): Declare.
2053 * vec.cc (__cxa_vec_new2, __cxa_vec_new3): Implement.
2054 (__cxa_vec_delete2, __cxa_vec_delete3): Implement.
2055 (__cxa_vec_new): Use __cxa_vec_new2.
2056 (__cxa_vec_delete): Use __cxa_vec_delete2.
2058 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
2060 * vec.cc (__cxa_vec_new): Set "C" linkage.
2061 (__cxa_vec_ctor): Likewise.
2062 (__cxa_vec_cctor): Likewise.
2063 (__cxa_vec_dtor): Likewise.
2064 (__cxa_vec_delete): Likewise.
2065 * inc/cxxabi.h (__cxa_vec_new): Set "C" linkage.
2066 (__cxa_vec_ctor): Likewise.
2067 (__cxa_vec_cctor): Likewise.
2068 (__cxa_vec_dtor): Likewise.
2069 (__cxa_vec_delete): Likewise.
2071 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
2073 * class.c (instantiate_type): Reinstate local variable
2074 deleted in previous change.
2076 * cvt.c (cp_convert_to_pointer): Pass itf_complain, not
2079 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
2081 * cp-tree.h (instantiate_type_flags): New enumeration.
2082 (instantiate_type): Change parameter.
2083 * class.c (instantiate_type): Adjust prototype. Adjust.
2084 * call.c (standard_conversion): Adjust instantiate_type call.
2085 (reference_binding): Likewise.
2086 (build_op_delete_call): Likewise.
2087 (convert_like_real): Likewise.
2088 * cvt.c (cp_convert_to_pointer): Likewise.
2089 (convert_to_reference): Likewise.
2090 * pt.c (convert_nontype_argument): Likewise.
2091 * typeck.c (build_binary_op): Likewise.
2092 (build_ptrmemfunc): Likewise.
2093 (convert_for_assignment): Likewise.
2095 2000-08-17 Nathan Sidwell <nathan@codesourcery.com>
2097 * cp-tree.h (CPTR_AGGR_TAG): New global tree node.
2098 (current_aggr): Define.
2099 * decl.c (grokdeclarator): Make sure a friend class is an
2100 elaborated type specifier.
2101 * parse.y (current_aggr): Remove static definition.
2102 (cp_parse_init): Adjust.
2103 (structsp): Clear and restore current_aggr.
2104 (component_decl_list): Clear current_aggr.
2106 * error.c (dump_type, case TYPENAME_TYPE): Don't emit the
2107 aggregate tag on the typename's context.
2109 * pt.c (tsubst_friend_class): Return error_mark_node, if
2111 (instantiate_class_template): Ignore error_mark_node friend types.
2113 2000-08-14 Nathan Sidwell <nathan@codesourcery.com>
2115 * cvt.c (warn_ref_binding): New static function, broken out of ...
2116 (convert_to_reference): ... here. Use it.
2118 2000-08-11 Kriang Lerdsuwanakij <lerdsuwa@scf-fs.usc.edu>
2120 * parse.y (template_arg): Add rule for template qualified with
2123 2000-08-11 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2125 * decl2.c (add_function): Reorganize.
2126 (arg_assoc): Do not consider function template decls.
2128 2000-08-11 Jason Merrill <jason@redhat.com>
2130 * decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
2133 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
2135 * cp-tree.h (resolve_scope_to_name): Remove unused prototype.
2136 (lookup_nested_tag): Likewise.
2138 * decl2.c (grokfield): Fix comment to reflect many types of _DECLs
2141 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
2143 * parse.y (named_complex_class_head_sans_basetype): Remove
2146 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
2148 * decl2.c (build_expr_from_tree, case METHOD_CALL_EXPR): Build
2149 explicit TEMPLATE_ID_EXPR args.
2150 (build_expr_from_tree, case CALL_EXPR): Likewise.
2152 2000-08-11 Nathan Sidwell <nathan@codesourcery.com>
2154 * decl.c (check_tag_decl): Diagnose typename's which don't
2157 2000-08-10 Nathan Sidwell <nathan@codesourcery.com>
2159 * init.c (build_aggr_init): Reject bogus array initializers
2162 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
2164 * rtti.c (build_dynamic_cast_1): Set "C" linkage for new abi
2166 * cp/tinfo.cc (__dynamic_cast): Likewise.
2167 * cp/inc/cxxabi.h (__dynamic_cast): Likewise.
2169 2000-08-09 Nathan Sidwell <nathan@codesourcery.com>
2171 * cvt.c (convert_to_pointer_force): Fix error message when
2172 attempting to cast from ambiguous base.
2174 2000-08-08 Jason Merrill <jason@redhat.com>
2176 * pt.c (tsubst_aggr_type): Bail if creating the argvec fails.
2177 (tsubst_template_arg_vector): Likewise.
2179 * decl2.c (build_anon_union_vars): Choose the largest field; don't
2180 assume that one will be as large as the union.
2182 2000-08-07 Kazu Hirata <kazu@hxi.com>
2184 * cp-tree.h (CLASSTYPE_HAS_PRIMARY_BASE_P): Fix a comment typo.
2185 * decl.c (pop_labels): Likewise.
2187 2000-08-04 Jeffrey Oldham <oldham@codesourcery.com>
2189 * inc/cxxabi.h (__pbase_type_info): Changed member names to match
2191 (__pointer_to_member_type_info): Likewise.
2192 (__base_class_info): Likewise.
2193 (__class_type_info): Likewise.
2194 (__si_class_type_info): Likewise.
2195 (__vmi_class_type_info): Likewise.
2196 * tinfo.cc (__si_class_type_info::__do_find_public_src):
2197 Changed member names to match specifications.
2198 (__vmi_class_type_info::__do_find_public_src): Likewise.
2199 (__si_class_type_info::__do_dyncast): Likewise.
2200 (__vmi_class_type_info::__do_dyncast): Likewise.
2201 (__si_class_type_info::__do_upcast): Likewise.
2202 (__vmi_class_type_info::__do_upcast): Likewise.
2203 * tinfo2.cc (__pbase_type_info::__do_catch): Likewise.
2204 (__pbase_type_info::__pointer_catch): Likewise.
2205 (__pointer_type_info::__pointer_catch): Likewise.
2206 (__pointer_to_member_type_info::__pointer_catch): Likewise.
2208 2000-08-04 Zack Weinberg <zack@wolery.cumb.org>
2210 * Make-lang.in (cc1plus): Depend on $(BACKEND), not stamp-objlist.
2211 * Makefile.in: Add C_OBJS, BACKEND; delete OBJS, OBJDEPS.
2212 (cc1plus): Link with $(BACKEND) and $(C_OBJS).
2214 2000-08-04 Mark Mitchell <mark@codesourcery.com>
2216 * cp-tree.h (add_method): Change prototype.
2217 * class.c (add_method): Remove FIELDS parameter. Add ERROR_P.
2218 Don't double the size of the method vector in the error case.
2219 (handle_using_decl): Adjust call to add_method.
2220 (add_implicitly_declared_members): Likewise.
2221 (clone_function_decl): Likewise.
2222 * decl2.c (check_classfn): Likewise.
2223 * semantics.c (finish_member_declaration): Likewise.
2225 2000-08-04 Joseph S. Myers <jsm28@cam.ac.uk>
2227 * decl.c (flag_isoc94): New variable.
2229 2000-08-02 Jason Merrill <jason@redhat.com>
2231 * pt.c (do_type_instantiation): Add complain parm; don't complain
2232 if called recursively.
2233 * cp-tree.h, parse.y: Adjust.
2235 2000-08-02 Zack Weinberg <zack@wolery.cumb.org>
2237 * decl2.c: Silently ignore -Wstrict-prototypes; warn about
2238 -Wno-strict-prototypes.
2240 * g++spec.c: Adjust type of second argument to
2241 lang_specific_driver, and update code as necessary.
2243 * cp-tree.h: Don't prototype min_precision here.
2244 (my_friendly_assert): Cast expression to void.
2245 * semantics.c (do_poplevel): Initialize scope_stmts.
2247 2000-08-02 Mark Mitchell <mark@codesourcery.com>
2249 * cp-tree.h (DECL_NEEDED_P): Tweak.
2251 2000-07-28 Jason Merrill <jason@redhat.com>
2253 * lang-specs.h: Use %i in rule for .ii files.
2255 2000-07-31 Zack Weinberg <zack@wolery.cumb.org>
2257 * lang-specs.h: Rename cpp to cpp0 and/or tradcpp to tradcpp0.
2259 2000-07-30 Mark Mitchell <mark@codesourcery.com>
2261 Allow indirect primary bases.
2262 * cp-tree.h (struct lang_type): Remove vfield_parent. Add
2264 (CLASSTYPE_VFIELD_PARENT): Remove.
2265 (CLASSTYPE_PRIMARY_BINFO): Reimplement.
2266 (BINFO_PRIMARY_BINFO): Remove.
2267 (CLASSTYPE_HAS_PRIMARY_BASE_P): Reimplement.
2268 (BINFO_VBASE_PRIMARY_P): Likewise.
2269 (BINFO_PRIMARY_BASE_OF): New macro.
2270 (BINFO_INDIRECT_PRIMARY_P): Likewise.
2271 (get_primary_binfo): New function.
2272 * decl.c (lang_mark_tree): Make lang_type::primary_base.
2273 * class.c (vcall_offset_data_s): Rename to ...
2274 (vtbl_init_data_s): ... this. Rename primary_p to primary_vtbl_p,
2275 and add ctor_vtbl_p.
2276 (get_derived_offset): Use get_primary_binfo.
2277 (dfs_mark_primary_bases): Adjust handling of virtual primary
2279 (mark_primary_bases): Likewise.
2280 (set_primary_base): Take a binfo, not an integer, as a
2281 representation of the primary base.
2282 (indirect_primary_base_p): Remove.
2283 (determine_primary_base): Adjust for indirect primary bases.
2284 (dfs_find_final_overrider): Fix typo in coment.
2285 (update_vtable_entry_for_fn): Use get_primary_binfo.
2286 (layout_nonempty_base_or_field): Tweak.
2287 (build_base_fields): Adjust for new primary base semantics.
2288 (dfs_propagate_binfo_offsets): Remove.
2289 (propagate_binfo_offsets): Rewrite.
2290 (dfs_set_offset_for_shared_vbases): Remove.
2291 (layout_virtual_bases): Don't use it.
2292 (layout_class_type): Set CLASSTYPE_SIZE correctly under the new
2294 (finish_struct_1): Set CLASSTYPE_PRIMARY_BINFO, not
2295 CLASSTYPE_VFIELD_PARENT.
2296 (dfs_get_primary_binfo): New function.
2297 (get_primary_binfo): Likewise.
2298 (dump_class_hierarchy_r): Tweak printing of primary bases.
2299 (build_vtbl_initializer): Fix typo in comments. Use
2301 (build_vcall_and_vbase_vtbl_entries): Likewise.
2302 (build_vbaes_offset_vtbl_entries): Likewise.
2303 (dfs_build_vcall_offset_vtbl_entries): Adjust setting of
2304 BV_VCALL_INDEX to handle indirect primary bases.
2305 (build_vcall_offset_vtbl_entries): Use vtbl_init_data.
2306 (build_rtti_vtbl_entries): Likewise.
2307 * search.c (get_shared_vbase_if_not_primary): Tweak.
2308 (find_vbase_instance): Likewise.
2309 (binfo_for_vtable): Simplify.
2310 * tree.c (unshare_base_binfos): Clear BINFO_PRIMARY_BASE_OF.
2311 (make_binfo): Make it have 11 entries.
2313 2000-07-30 Alex Samuel <samuel@codesourcery.com>
2315 * mangle.c (DECL_TEMPLATE_ID_P): Remove.
2316 (CLASSTYEP_TEMPLATE_ID_P): Check template info, and context when
2317 ascertaining primaryness.
2318 (G): Remove template_args.
2319 (decl_is_template_id): New function.
2320 (write_encoding): Use decl_is_template_id.
2321 (write_name): Likewise. Handle type_decls. Get main variant of
2323 (write_nested_name): Likewise.
2324 (write_prefix): Likewise.
2325 (write_template_prefix): Likewise.
2326 (write_special_name_constructor): Remove defunct production from
2328 (write_bare_function_type): Remove comment about absent parameter.
2329 (write_template_template_arg): Add missing grammar production to
2332 2000-07-27 Jason Merrill <jason@redhat.com>
2334 * decl.c (duplicate_decls): If common_type produces a non-typedef
2335 type for a typedef, just use the old type.
2337 2000-07-27 Mark Mitchell <mark@codesourcery.com>
2339 * cp-tree.h (function_depth): Declare.
2340 (verify_stmt_tree): Likewise.
2341 (find_tree): Likewise.
2342 * decl.c (function_depth): Give it external linkage.
2343 * optimize.c (optimize_function): Increment and decrement it.
2344 * tree.c (verify_stmt_tree_r): New function.
2345 (verify_stmt_tree): Likewise.
2346 (find_tree_r): Likewise.
2347 (find_tree): Likewise.
2349 2000-07-27 Jason Merrill <jason@redhat.com>
2351 * pt.c (for_each_template_parm_r, case RECORD_TYPE): Use
2353 * cp-tree.h (TYPE_TEMPLATE_INFO): Check for TYPE_LANG_SPECIFIC.
2355 2000-07-26 Mark Mitchell <mark@codesourcery.com>
2357 * decl.c (start_cleanup_fn): Mark the function as `inline'.
2358 * decl2.c (get_guard): Call cp_finish_decl, not
2359 rest_of_decl_compilation, for local guards.
2360 * lex.c (do_identifier): Remove unused variable.
2362 Wed Jul 26 15:05:51 CEST 2000 Marc Espie <espie@cvs.openbsd.org>
2364 * parse.y: Add missing ';'.
2366 2000-07-26 Mark Mitchell <mark@codesourcery.com>
2368 * parse.y (empty_parms): Use `()', not `(...)', when in the scope
2371 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
2373 Kill strict_prototype. Backwards compatibility only for
2374 non NO_IMPLICIT_EXTERN_C systems.
2375 * cp-tree.h (flag_strict_prototype): Remove.
2376 (strict_prototype): Remove.
2377 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
2378 * decl.c (maybe_push_to_top_level): Adjust.
2379 (pop_from_top_level): Adjust.
2380 (decls_match): Only allow sloppy parm matching for ancient
2382 (init_decl_processing): Adjust.
2383 (grokdeclarator): Adjust.
2384 * decl2.c (flag_strict_prototype): Remove.
2385 (strict_prototype): Remove.
2386 (strict_prototypes_lang_c, strict_prototypes_lang_cplusplus): Remove.
2387 (lang_f_options): Remove "strict-prototype".
2388 (unsupported-options): Add "strict-prototype".
2389 * lex.c (do_identifier): Adjust.
2390 (do_scoped_id): Adjust.
2391 * parse.y (empty_parms): Adjust.
2392 * class.c (push_lang_context): Adjust.
2393 (pop_lang_context): Adjust.
2394 * typeck.c (comp_target_parms): Adjust.
2396 2000-07-25 Nathan Sidwell <nathan@codesourcery.com>
2398 * decl.c (poplevel): Deal with anonymous variables at for scope.
2399 (maybe_inject_for_scope_var): Likewise.
2401 2000-07-25 Zack Weinberg <zack@wolery.cumb.org>
2403 * decl.c: Remove all signal handling code, now done in toplev.c.
2405 2000-07-23 Mark Mitchell <mark@codesourcery.com>
2407 * decl.c (make_rtl_for_nonlocal_decl): Rework.
2409 * pt.c (lookup_template_class): Ensure that TYPE_CONTEXT is set
2412 2000-07-20 Zack Weinberg <zack@wolery.cumb.org>
2414 * cp-tree.h: Use __FUNCTION__ not __PRETTY_FUNCTION__.
2415 Define my_friendly_assert and my_friendly_abort as macros
2416 which may call friendly_abort. Prototype friendly abort, not
2417 my_friendly_abort or my_friendly_assert.
2418 * decl.c (signal_catch): Report the signal caught in the error
2419 message. Call fatal directly.
2420 * typeck2.c (ack, my_friendly_assert): Delete.
2421 (my_friendly_abort): Rename to friendly_abort. Expect file,
2422 line, and function parameters. Report the abort code, then
2423 call fancy_abort. Do not mask an abort if errors have
2426 2000-07-18 Nathan Sidwell <nathan@codesourcery.com>
2428 * typeck.c (comp_target_parms): Remove obsolete parameter.
2429 (comp_target_types): Adjust.
2431 2000-07-17 Jason Merrill <jason@redhat.com>
2433 * typeck.c (mark_addressable): Never set TREE_USED.
2434 * call.c (build_call): Don't abort on calls to library functions
2435 that have been declared normally.
2437 * typeck.c (build_binary_op): Fix grammar in warning.
2439 * exception.cc (__eh_free): Fix prototype.
2441 * decl2.c (finish_decl_parsing): Handle TEMPLATE_ID_EXPR.
2443 * decl.c (pushdecl): Handle seeing an OVERLOAD in
2444 IDENTIFIER_NAMESPACE_VALUE.
2446 2000-07-16 Mark Mitchell <mark@codesourcery.com>
2448 * cp-tree.h (THUNK_VCALL_OFFSET): Update documentation.
2449 * method.c (use_thunk): Correct handling of vcall offsets.
2451 2000-07-14 Zack Weinberg <zack@wolery.cumb.org>
2453 * .cvsignore: parse.h and parse.c have no cp- prefix.
2455 2000-07-13 Mark Mitchell <mark@codesourcery.com>
2457 * .cvsignore: New file.
2459 2000-07-13 Zack Weinberg <zack@wolery.cumb.org>
2461 * lang-specs.h: Use the new named specs. Remove unnecessary braces.
2463 2000-07-12 Mark Mitchell <mark@codesourcery.com>
2465 * Makefile.in ($(PARSE_H)): Depend directly on parse.y.
2467 * parse.h: Likewise.
2469 2000-07-11 Mark Mitchell <mark@codesourcery.com>
2471 * class.c (layout_class_type): Add pointers to virtual bases after
2472 base classes under the old ABI.
2474 2000-07-10 Benjamin Chelf <chelf@codesourcery.com>
2476 * semantics.c (finish_for_stmt): Remove call to emit_line_note.
2477 (finish_continue_stmt): Likewise.
2478 (begin_for_stmt): Remove call to note_level_for_for.
2479 (finish_goto_stmt): Change call from build_min_nt
2481 (finish_expr_stmt): Likewise.
2482 (begin_if_stmt): Likewise.
2483 (begin_while_stmt): Likewise.
2484 (finish_while_stmt): Likewise.
2485 (finish_return_stmt): Likewise.
2486 (begin_for_stmt): Likewise.
2487 (finish_for_stmt): Likewise.
2488 (finish_break_stmt): Likewise.
2489 (begin_switch_stmt): Likewise.
2490 (finish_case_label): Likewise.
2491 (genrtl_try_block): Likewise.
2492 (begin_try_block): Likewise.
2493 (begin_handler): Likewise.
2494 (begin_compound_stmt): Likewise.
2495 (finish_asm_stmt): Likewise.
2496 (finish_label_stmt): Likewise.
2497 (add_decl_stmt): Likewise.
2498 (finish_subobject): Likewise.
2499 (finish_decl_cleanup): Likewise.
2500 (finish_named_return_value): Likewise.
2501 (setup_vtbl_ptr): Likewise.
2502 (add_scope_stmt): Likewise.
2503 * decl.c (finish_constructor_body): Likewise.
2504 (finish_destructor_body): Likewise.
2505 * optimize.c (copy_body_r): Likewise.
2506 (initialize_inlined_parameters): Likewise.
2507 (declare_return_variable): Likewise.
2508 (expand_call_inline): Likewise.
2510 2000-07-10 Jakub Jelinek <jakub@redhat.com>
2512 * semantics.c (expand_body): Sync interface information
2513 at the end of function body expansion.
2515 2000-07-09 Jason Merrill <jason@redhat.com>
2517 * init.c (build_new_1): Bail early if the call to new fails.
2519 * decl.c (compute_array_index_type): Check specifically for
2520 an INTEGER_CST, not just TREE_CONSTANT.
2522 * decl.c (duplicate_decls): Don't call duplicate_decls on
2523 the DECL_TEMPLATE_RESULT.
2524 (decls_match): Return 0 if the DECL_TEMPLATE_RESULTs have different
2527 * error.c (dump_template_bindings): Don't crash if we had an
2528 invalid argument list.
2530 * typeck.c (c_expand_start_case): Do narrowing here.
2531 * semantics.c (finish_switch_cond): Not here.
2533 2000-07-09 Hidvegi Zoli <hzoli@austin.ibm.com>
2535 * parse.y (asm_clobbers): Do string concatenation.
2537 2000-07-09 Mark Mitchell <mark@codesourcery.com>
2539 * decl.c (pushtag): Don't put local classes in template functions
2540 on the local_classes list.
2542 2000-07-04 Scott Snyder <snyder@fnal.gov>
2544 * decl2.c (get_guard): Add missing return for old ABI local
2547 2000-07-09 Mark Mitchell <mark@codesourcery.com>
2549 * cp-tree.h (char_type_p): New function.
2550 * decl.c (init_decl_processing): Don't initialize
2551 signed_wchar_type_node or unsigned_wchar_type_node.
2552 (complete_array_type): Handle brace-enclosed string-constants.
2553 * rtti.c (emit_support_tinfos): Remove #if 0'd code.
2554 * tree.c (char_type_p): New function.
2555 * typeck2.c (digest_init): Use char_type_p.
2557 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
2559 * pt.c (tsubst): Don't layout type, if it's error_mark.
2561 2000-07-06 Nathan Sidwell <nathan@codesourcery.com>
2563 * pt.c (instantiate_pending_templates): Reset template level.
2565 2000-07-05 Jason Merrill <jason@redhat.com>
2567 * call.c (joust): Don't complain about `operator char *()' beating
2568 `operator const char *() const'.
2570 2000-07-04 scott snyder <snyder@fnal.gov>
2571 Jason Merrill <jason@redhat.com>
2573 * repo.c (repo_get_id): Handle the case where a class with virtual
2574 bases has a null TYPE_BINFO_VTABLE.
2576 2000-07-04 Kevin Buhr <buhr@stat.wisc.edu>
2577 Jason Merrill <jason@redhat.com>
2579 * parse.y (member_init): Just pass in the type.
2580 * init.c (expand_member_init): Handle getting a type.
2582 2000-07-04 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2583 Jason Merrill <jason@redhat.com>
2585 * decl.c (finish_function): Warn if a function has no return
2587 Suggested by Andrew Koenig.
2588 * typeck.c (check_return_expr): Do set current_function_returns_value
2589 if we got an error_mark_node.
2591 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
2593 * decl2.c (push_decl_namespace): Push the original namespace.
2595 2000-07-03 Nathan Sidwell <nathan@codesourcery.com>
2597 * pt.c (instantiate_class_template): Set CLASSTYPE_VBASECLASSES.
2598 * semantics.c (begin_class_definition): Clear it.
2600 2000-07-02 Benjamin Chelf <chelf@codesourcery.com>
2602 * cp-tree.h (genrtl_goto_stmt): Remove declaration.
2603 (genrtl_expr_stmt): Likewise.
2604 (genrtl_decl_stmt): Likewise.
2605 (genrtl_if_stmt): Likewise.
2606 (genrtl_while_stmt): Likewise.
2607 (genrtl_do_stmt): Likewise.
2608 (genrtl_return_stmt): Likewise.
2609 (genrtl_for_stmt): Likewise.
2610 (genrtl_break_stmt): Likewise.
2611 (genrtl_continue_stmt): Likewise.
2612 (genrtl_scope_stmt): Likewise.
2613 (genrtl_switch_stmt): Likewise.
2614 (genrtl_case_label): Likewise.
2615 (genrtl_begin_compound_stmt): Likewise.
2616 (genrtl_finish_compound_stmt): Likewise.
2617 (genrtl_compound_stmt): Likewise.
2618 (genrtl_asm_stmt): Likewise.
2620 * init.c (begin_init_stmts): Remove call to
2621 genrtl_begin_compound_stmt.
2622 (finish_init_stmts): Remove call to genrtl_finish_compound_stmt.
2624 * semantics.c (lang_expand_stmt): Changed call to
2625 genrtl_compound_stmt to ignore return value.
2627 2000-07-02 Mark Mitchell <mark@codesourcery.com>
2629 * mangle.c (canonicalize_for_substitution): Return the canonical
2632 * decl.c (duplicate_decls): Preserve DECL_ORIGINAL_TYPE for a
2634 * typeck.c (commonparms): Remove obstack manipulations.
2636 2000-07-01 Benjamin Chelf <chelf@codesourcery.com>
2638 * Make-lang.in (cc1plus$(exeext)): Added c-semantics.o.
2640 * Makefile.in (OBJS): Added ../c-semantics.o.
2641 (OBJDEPS): Likewise.
2643 * cp-tree.h (TREE_LANG_FLAG_?): Moved common documentation to
2645 (struct stmt_tree): Added comment.
2646 (current_function_name_declared): Removed.
2647 (stmts_are_full_exprs_p): Likewise.
2648 (genrtl_do_pushlevel): Likewise.
2649 (genrtl_clear_out_block): Likewise.
2650 (COMPOUND_STMT_NO_SCOPE): Moved to ../c-common.h.
2651 (DECL_ANON_UNION_ELEMS): Likewise.
2652 (emit_local_var): Likewise.
2653 (make_rtl_for_local_static): Likewise.
2654 (do_case): Likewise.
2655 (expand_stmt): Likewise.
2656 (genrtl_decl_cleanup): Likewise.
2657 (c_expand_asm_operands): Likewise.
2658 (c_expand_return): Likewise.
2659 (c_expand_start_case): Likewise.
2661 * decl.c (make_rtl_for_local_static): Moved to c-semantics.c.
2662 (emit_local_var): Likewise.
2663 (initialize_local_var): Change reference to
2664 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
2665 Change reference to stmts_are_full_exprs_p to
2666 current_stmt_tree->stmts_are_full_exprs_p.
2667 (push_cp_function_context): Likewise.
2669 * expect.c (expand_throw): Change reference to
2670 stmts_are_full_exprs_p.
2672 * init.c (build_aggr_init): Change reference to
2673 stmts_are_full_exprs_p.
2674 (build_vec_init): Likewise.
2676 * optimize.c (maybe_clone_body): Change reference to
2677 current_function_name_declared to
2678 cp_function_chain->name_declared.
2680 * pt.c (instantiate_decl): Change reference to
2681 current_function_name_declared to
2682 cp_function_chain->name_declared.
2684 * semantics.c (expand_cond): Moved declaration to c-common.h.
2685 (genrtl_do_pushlevel): Moved to c-semantics.c.
2686 (genrtl_clear_out_block): Likewise.
2687 (genrtl_goto_stmt): Likewise.
2688 (genrtl_expr_stmt): Likewise.
2689 (genrtl_decl_stmt): Likewise.
2690 (gerntl_if_stmt): Likewise.
2691 (genrtl_while_stmt): Likewise.
2692 (genrtl_do_stmt): Likewise.
2693 (genrtl_return_stmt): Likewise.
2694 (genrtl_for_stmt): Likewise.
2695 (genrtl_break_stmt): Likewise.
2696 (genrtl_continue_stmt): Likewise.
2697 (genrtl_scope_stmt): Likewise.
2698 (genrtl_switch_stmt): Likewise.
2699 (genrtl_case_label): Likewise.
2700 (genrtl_begin_compound_stmt): Likewise.
2701 (genrtl_finish_compound_stmt): Likewise.
2702 (genrtl_compound_stmt): Likewise.
2703 (genrtl_asm_stmt): Likewise.
2704 (genrtl_decl_cleanup): Likewise.
2705 (expand_cond): Likewise.
2706 (expand_stmt): Renamed to ...
2707 (lang_expand_stmt): ... this.
2708 (lang_expand_expr_stmt): Initialize.
2709 (set_current_function_name_declared): Likewise.
2710 (stmts_are_full_exprs_p): Likewise.
2711 (current_function_name_declared): Likewise.
2712 (anon_aggr_type_p): Likewise.
2713 (do_poplevel): Change reference to
2714 stmts_are_full_exprs_p to call to stmts_are_full_exprs_p().
2715 Change reference to stmts_are_full_exprs_p to
2716 current_stmt_tree->stmts_are_full_exprs_p.
2717 (add_tree): Likewise.
2718 (finish_expr_stmt): Likewise.
2719 (prep_stmt): Likewise.
2720 (lang_expand_stmt): Likewise.
2721 (begin_compound_stmt): Change reference to
2722 current_function_name_declared to
2723 cp_function_chain->name_declared and call to
2724 current_function_name_declared().
2725 (setup_vtbl_ptr): Likewise.
2726 (genrtl_do_poplevel): Removed.
2728 2000-06-30 Jason Merrill <jason@redhat.com>
2730 * init.c (init_init_processing): Go back to aligning like
2731 double_type_node for old ABI.
2732 (get_cookie_size): Make cookie larger if we get a type that needs
2734 (build_vec_delete): Call it.
2736 * typeck.c (qualify_type_recursive): New fn.
2737 (composite_pointer_type): Use it.
2738 (build_binary_op): Use composite_pointer_type.
2740 2000-06-24 Carlos O'Ryan <coryan@cs.wustl.edu>
2741 Jason Merrill <jason@redhat.com>
2743 * typeck.c (check_return_expr): Don't complain about returning
2744 NULL from operator new if -fcheck-new.
2745 * cp-tree.h: Declare flag_check_new here.
2748 2000-06-28 Alex Samuel <samuel@codesourcery.com>
2750 * mangle.c (find_substitution): Use same_type_p.
2751 (write_encoding): Don't check for substitutions.
2753 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
2755 * parse.y (expr_no_comma_rangle): New non-terminal.
2756 (template_parm): Use it for default parameter case.
2757 (template_arg): Use it.
2758 (expr_no_commas): Remove commented out undefined extensions.
2759 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
2760 * parse.h, parse.c: Rebuilt.
2762 2000-06-30 Mark Mitchell <mark@codesourcery.com>
2764 * semantics.c (genrtl_asm_stmt): Don't decay input operands here.
2765 (finish_asm_stmt): Do it here, instead.
2767 * cp-tree.h (ridpointers): Don't declare.
2768 * decl.c (record_builtin_type): Use CP_RID_MAX instead of RID_MAX.
2769 (record_builtin_java_type): Likewise.
2770 (init_decl_processing): Likewise.
2771 * lex.c: Move inclusion of lex.h.
2772 (ridpointers): Don't define.
2773 (init_parse): Initialize ripdointers. Use CP_RID_MAX instead of
2775 * lex.h (enum rid): Rename to ...
2776 (enum cp_rid): ... this.
2777 (ridpointers): Don't declare.
2778 * parse.y: Move inclusion of lex.h.
2779 * parse.c: Regenerated.
2780 * spew.c: Move inclusion of lex.h.
2782 * cp-tree.h (struct language_function): Remove temp_name_counter.
2783 (temp_name_counter): Remove.
2784 (get_temp_name): Change prototype.
2785 (get_guard): New function.
2786 (get_guard_cond): Likewise.
2787 (set_guard): Likewise.
2788 * cvt.c (build_up_reference): Adjust call to get_temp_name.
2789 * decl.c (expand_static_init): Use get_guard and friends to
2790 implement guard variables.
2791 * decl2.c (get_temp_name): Assume that the variables created are
2793 (get_sentry): Rename to ...
2794 (get_guard): ... this. Implement new ABI guard variables.
2795 (get_guard_bits): New function.
2796 (get_guard_cond): Likewise.
2797 (set_guard): Likewise.
2798 (start_static_initialization_or_destruction): Use them.
2799 (do_static_initialization): Replace sentry with guard throughout.
2800 (do_static_destruction): Likewise.
2801 * init.c (create_temporary_var): Add comment.
2803 2000-06-28 Alex Samuel <samuel@codesourcery.com>
2805 * mangle.c (find_substitution): Use same_type_p.
2806 (write_encoding): Don't check for substitutions.
2808 2000-06-30 Nathan Sidwell <nathan@codesourcery.com>
2810 * parse.y (expr_no_comma_rangle): New non-terminal.
2811 (template_parm): Use it for default parameter case.
2812 (template_arg): Use it.
2813 (expr_no_commas): Remove commented out undefined extensions.
2814 * Makefile.in (CONFLICTS): Adjust to 33 s/r & 48 r/r.
2815 * parse.h, parse.c: Rebuilt.
2817 2000-06-29 Mark Mitchell <mark@codesourcery.com>
2819 * cp-tree.h (flag_const_strings): Remove.
2820 (warn_parentheses): Likewise.
2821 (warn_format): Likewise.
2822 (common_type): Likewise.
2823 (default_conversion): Likewise.
2824 (build_binary_op): Likewise.
2825 (cp_build_binary_op): New macro.
2826 * call.c (build_new_op): Use cp_build_binary_op instead of
2828 * class.c (build_vtable_entry_ref): Likewise.
2829 * decl.c (expand_static_init): Likewise.
2830 (compute_array_index_type): Likewise.
2831 (build_enumerator): Likewise.
2832 * decl2.c (delete_sanity): Likewise.
2833 (start_static_initialization_or_destruction): Likewise.
2834 * error.c (dump_type_suffix): Likewise.
2835 * init.c (resolve_offset_ref): Likewise.
2836 (build_new): Likewise.
2837 (build_new_1): Likewise.
2838 (build_vec_delete_1): Likewise.
2839 (build_vec_init): Likewise.
2840 (build_delete): Likewise.
2841 * rtti.c (synthesize_tinfo_fn): Likewise.
2842 (synthesize_tinfo_var): Likewise.
2843 * search.c (expand_upcast_fixups): Likewise.
2844 (fixup_all_virtual_upcast_offsets): Likewise.
2845 * typeck.c (build_array_ref): Likewise.
2846 (get_member_function_from_ptrfunc): Likewise.
2847 (build_binary_op): Add parameter.
2848 (pointer_int_sum): Use cp_build_binary_op.
2849 (pointer_diff): Likewise.
2850 (build_modify_expr): Likewise.
2851 (get_delta_difference): Likewise.
2852 (build_ptrmemfunc): Likewise.
2854 2000-06-29 Nathan Sidwell <nathan@codesourcery.com>
2856 * cp-tree.h (SET_DECL_ARTIFICIAL): Remove.
2857 * decl.c (create_implicit_typedef): Adjust.
2858 * decl2.c (build_artificial_parm): Adjust.
2859 * method.c (implicitly_declare_fn): Adjust.
2860 * pt.c (push_inline_template_parms_recursive): Adjust.
2861 (process_template_parm): Adjust.
2862 (overloaded_template_name): Adjust.
2863 * semantics.c (finish_template_template_parm): Adjust.
2865 2000-06-28 Mark Mitchell <mark@codesourcery.com>
2867 * cp-tree.h (CLEAR_BINFO_NEW_VTABLE_MARKED): Remove.
2868 * class.c (update_vtable_entry_for_fn): Correct logic for deciding
2869 where to emit thunks.
2870 (build_vtt): Adjust call to build_vtt_inits.
2871 (build_vtt_inits): Add parameter to indicate whether or not
2872 sub-VTTs for virtual bases should be included. Adjust handling of
2873 construction vtables.
2874 (get_matching_base): New function.
2875 (dfs_build_vtt_inits): Rename to ...
2876 (dfs_build_secondary_vptr_vtt_inits): Adjust handling of
2877 construction vtables.
2878 (dfs_fixup_binfo_vtbls): Likewise.
2879 (build_ctor_vtbl_groups): Build construction vtables for virtual
2881 (accumulate_vtbl_inits): Tweak logic for deciding whether or not
2882 to build construction vtbls.
2883 (dfs_accumulate_vtbl_inits): Adjust handling of
2884 construction vtables.
2886 * pt.c (tsubst, case TEMPLATE_TEMPLATE_PARM): Handle cv-qualified
2889 2000-06-27 Mark Mitchell <mark@codesourcery.com>
2891 * decl.c (grokfndecl): Set DECL_CONTEXT for static functions too.
2893 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
2895 * search.c (hides): Remove.
2896 (is_subobject_of_p): Add most_derived parameter. Use
2898 (lookup_field_queue_p): Adjust.
2899 (lookup_field_r): Adjust.
2901 2000-06-26 Nathan Sidwell <nathan@codesourcery.com>
2903 * decl2.c (handle_class_head): Bash typedefs to the type's main
2906 2000-06-25 Mark Mitchell <mark@codesourcery.com>
2908 * cp-tree.h (genrtl_begin_stmt_expr): Rename to ...
2909 (begin_global_stmt_expr): ... this.
2910 (genrtl_finish_stmt_expr): Rename to ...
2911 (finish_global_stmt_expr): ... this.
2912 * init.c (begin_init_stmts): Adjust calls.
2913 (finish_init_stmts): Likewise.
2914 * semantics.c (genrtl_begin_stmt_expr): Rename to ...
2915 (begin_global_stmt_expr): ... this.
2916 (genrtl_finish_stmt_expr): Rename to ...
2917 (finish_global_stmt_expr): ... this.
2919 2000-06-25 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
2921 * search.c (lookup_member): Fix typo in comment.
2923 2000-06-24 Jason Merrill <jason@redhat.com>
2925 * decl.c (pushdecl): Don't set DECL_CONTEXT from current_namespace.
2926 (push_namespace): Set DECL_CONTEXT for a new NAMESPACE_DECL.
2928 2000-06-24 Martin v. Löwis <loewis@informatik.hu-berlin.de>
2930 * parse.y (complex_direct_notype_declarator): Support global_scope.
2931 * Makefile.in: Adjust conflict count.
2933 2000-06-23 Kriang Lerdsuwanakij <lerdsuwa@scf.usc.edu>
2935 * parse.y (template_arg): Convert TEMPLATE_DECL
2936 that is a template template paramter to
2937 TEMPLATE_TEMPLATE_PARM here.
2939 * cp-tree.def (TEMPLATE_TEMPLATE_PARM): Adjust comment.
2940 * cp-tree.h (TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL): New macro.
2941 (copy_template_template_parm): Adjust prototype.
2942 * decl.c (grokdeclarator): Remove dead code.
2943 * pt.c (process_template_parm): Tidy.
2944 (lookup_template_class): Construct nodes in
2945 copy_template_template_parm.
2946 (tsubst): Pass TEMPLATE_DECL rather than IDENTIFIER_NODE to
2947 lookup_template_class. Use TYPE_TI_TEMPLATE.
2948 * tree.c (copy_template_template_parm): Add NEWARGS
2950 (mapcar): Adjust call to copy_template_template_parm.
2951 * typeck.c (comptypes): Use TEMPLATE_TEMPLATE_PARM_TEMPLATE_DECL.
2952 * method.c (build_template_template_parm_names): Change error
2953 code to avoid compilation warning.
2955 * gxxint.texi: Document template template parameter
2958 2000-06-21 Alex Samuel <samuel@codesourcery.com>
2960 * Make-lang.in (CXX_LIB2FUNCS): Add cp-demangle.o and dyn-string.o.
2961 (CXX_LIB2SRCS): Add cp-demangle.c and dyn-string.c.
2962 (cp-demangle.o): New rule.
2963 (dyn-string.o): Likewise.
2964 * inc/cxxabi.h (__cxa_demangle): New declaration.
2966 2000-06-22 Mark Mitchell <mark@codesourcery.com>
2968 * cp-tree.h (BV_USE_VCALL_INDEX_P): New macro.
2969 (BV_GENERATE_THUNK_WITH_VTABLE_P): Likewise.
2970 (lang_decl_flags): Add generate_with_vtable_p. Make vcall_offset
2972 (THUNK_GENERATE_WITH_VTABLE_P): New macro.
2973 (make_thunk): Change prototype.
2974 (emit_thunk): Rename to use_thunk.
2975 (mangle_thunk): Change prototype.
2976 * class.c (get_derived_offset): Simplify.
2977 (copy_virtuals): Clear BV_USE_VCALL_INDEX_P and
2978 BV_GENERATE_THUNK_WITH_VTABLE_P.
2979 (build_primary_vtable): Simplify.
2980 (add_virtual_function): Use BV_FN, rather than TREE_VALUE.
2981 (dfs_find_base): Remove.
2982 (update_vtable_entry_for_fn): Correct bug in finding the base
2983 where a virtual function was first declared. Figure out whether
2984 or not to emit a vcall-thunk with the vtables in which it appears.
2985 Correct logic for deciding whether to use an ordinary thunk, or a
2987 (finish_struct_1): Remove unnecssary code.
2988 (build_vtbl_initializer): Use ssize_int for the running counter of
2990 (build_vtbl_initializer): Only use vcall thunks where necessary.
2991 Mark thunks as needing to be emitted with their vtables, or not.
2992 (build_vbase_offset_vtbl_entries): Adjust for use of ssize_int in
2993 indices. Use size_binop.
2994 (dfs_build_vcall_offset_vtbl_entries): Don't rely on
2995 BINFO_PRIMARY_MARKED_P here. Use BV_FN consistently. Use
2997 (build_rtti_vtbl_entries): Adjust call to build_vtable_entry.
2998 (build_vtable_entry): Mark thunks as needing to be emitted with
2999 their vtables, or not.
3000 * decl.c (lang_mark_tree): Mark the vcall_offset in a thunk.
3001 * decl2.c (mark_vtable_entries): Use use_thunk instead of
3003 * dump.c (dequeue_and_dump): Remove dead code. Dump new thunk
3005 * error.c (dump_expr): Use BV_FN.
3006 * mangle.c (mangle_thunk): Adjust now that vcall_offset is a tree,
3008 * method.c (make_thunk): Likewise.
3009 (emit_thunk): Rename to use_thunk. Allow callers to decide
3010 whether or not to actually emit the thunk. Adjust for changes in
3011 representation of vcall offsets.
3012 * search.c (dfs_get_pure_virtuals): Use BV_FN.
3013 * semantics.c (emit_associated_thunks): New function.
3014 (expand_body): Use it.
3015 * ir.texi: Adjust decriptions of thunks.
3017 2000-06-22 Jason Merrill <jason@redhat.com>
3019 * pt.c (tsubst_decl, case FUNCTION_DECL): Clear DECL_SAVED_TREE.
3020 (tsubst_friend_function): Copy it here.
3022 * decl.c (grok_op_properties): Fix typo.
3024 * decl2.c (delete_sanity): Clarify warning, avoid failure on
3027 * pt.c (check_explicit_specialization): Clarify error.
3029 * decl.c (pushdecl): Also pull out one of the FUNCTION_DECLs from
3030 an old OVERLOAD when we're declaring a non-function.
3031 (pushdecl, destroy_local_var): Check for error_mark_node.
3032 (warn_extern_redeclared_static): Also bail early if
3034 (push_overloaded_decl): Ignore an old error_mark_node.
3036 2000-06-22 Nathan Sidwell <nathan@codesourcery.com>
3038 * call.c (build_x_va_arg): Check if in a template decl.
3039 * pt.c (tsubst_copy, case VA_ARG_EXPR): Use build_x_va_arg.
3041 2000-06-20 Alexandre Petit-Bianco <apbianco@cygnus.com>
3043 * class.c (push_lang_context): TYPE_NAME gets you to the Java
3045 * decl.c (check_goto): Computed gotos assumed OK.
3047 2000-06-20 Jason Merrill <jason@redhat.com>
3049 * pt.c (tsubst_decl, case TYPE_DECL): Fix test for TYPE_DECLs
3050 for which we don't need to look for instantiations.
3052 2000-06-21 Nathan Sidwell <nathan@codesourcery.com>
3054 * parse.y (program): Always call finish_translation_unit.
3055 * parse.c, parse.h: Rebuilt.
3057 2000-06-20 Zack Weinberg <zack@wolery.cumb.org>
3059 * method.c: Don't include hard-reg-set.h.
3061 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
3063 * rtti.c (get_base_offset): Cope when vbase field is in a base.
3065 2000-06-20 Nathan Sidwell <nathan@codesourcery.com>
3067 * call.c (build_conditional_expr): Use VOID_TYPE_P.
3068 * cvt.c (cp_convert_to_pointer): Likewise.
3069 (convert_to_void): Likewise.
3070 * error.c (dump_expr): Likewise.
3071 * except.c (complete_ptr_ref_or_void_ptr_p): Likewise.
3072 * init.c (build_delete): Likewise.
3073 * method.c (emit_thunk): Likewise.
3074 * optmize.c (declare_return_variable): Likewise.
3075 * rtti.c (get_tinfo_decl_dynamic): Likewise.
3076 (get_typeid): Likewise.
3077 (build_dynamic_cast_1): Likewise.
3078 * typeck.c (composite_pointer_type): Likewise.
3079 (common_type): Likewise.
3080 (build_indirect_ref): Likewise.
3081 (build_binary_op): Likewise.
3082 (build_x_compound_expr): Likewise.
3083 (check_return_expr): Likewise.
3084 * typeck2.c (add_exception_specifier): Likewise.
3086 * mangle.c (write_method_parms): Use direct comparison for end
3089 2000-06-19 Benjamin Chelf <chelf@codesourcery.com>
3091 * cp-tree.h (genrtl_try_block): Declare function.
3092 (genrtl_handler): Likewise.
3093 (genrtl_catch_block): Likewise.
3094 (genrtl_ctor_stmt): Likewise.
3095 (genrtl_subobject): Likewise.
3096 (genrtl_decl_cleanup): Likewise.
3097 (genrtl_do_poplevel): Likewise.
3098 (genrtl_do_pushlevel): Likewise.
3099 (genrtl_clear_out_block): Likewise.
3100 (genrtl_goto_stmt): Likewise.
3101 (genrtl_expr_stmt): Likewise.
3102 (genrtl_decl_stmt): Likewise.
3103 (genrtl_if_stmt): Likewise.
3104 (genrtl_while_stmt): Likewise.
3105 (genrtl_do_stmt): Likewise.
3106 (genrtl_return_stmt): Likewise.
3107 (genrtl_for_stmt): Likewise.
3108 (genrtl_break_stmt): Likewise.
3109 (genrtl_continue_stmt): Likewise.
3110 (genrtl_scope_stmt): Likewise.
3111 (genrtl_switch_stmt): Likewise.
3112 (genrtl_case_label): Likewise.
3113 (genrtl_begin_compound_stmt): Likewise.
3114 (genrtl_finish_compound_stmt): Likewise.
3115 (genrtl_compound_stmt): Likewise.
3116 (genrtl_asm_stmt): Likewise.
3117 (genrtl_named_return_value): Likewise.
3118 (genrtl_begin_stmt_expr): Likewise.
3119 (genrtl_finish_stmt_expr): Likewise.
3120 (finish_for_stmt): Removed first argument.
3121 (finish_switch_stmt): Likewise.
3123 * semantics.c (genrtl_try_block): Define function.
3124 (genrtl_handler): Likewise.
3125 (genrtl_catch_block): Likewise.
3126 (genrtl_ctor_stmt): Likewise.
3127 (genrtl_subobject): Likewise.
3128 (genrtl_decl_cleanup): Likewise.
3129 (genrtl_do_poplevel): Likewise.
3130 (genrtl_do_pushlevel): Likewise.
3131 (genrtl_clear_out_block): Likewise.
3132 (genrtl_goto_stmt): Likewise.
3133 (genrtl_expr_stmt): Likewise.
3134 (genrtl_decl_stmt): Likewise.
3135 (genrtl_if_stmt): Likewise.
3136 (genrtl_while_stmt): Likewise.
3137 (genrtl_do_stmt): Likewise.
3138 (genrtl_return_stmt): Likewise.
3139 (genrtl_for_stmt): Likewise.
3140 (genrtl_break_stmt): Likewise.
3141 (genrtl_continue_stmt): Likewise.
3142 (genrtl_scope_stmt): Likewise.
3143 (genrtl_switch_stmt): Likewise.
3144 (genrtl_case_label): Likewise.
3145 (genrtl_begin_compound_stmt): Likewise.
3146 (genrtl_finish_compound_stmt): Likewise.
3147 (genrtl_compound_stmt): Likewise.
3148 (genrtl_asm_stmt): Likewise.
3149 (genrtl_named_return_value): Likewise.
3150 (genrtl_begin_stmt_expr): Likewise.
3151 (genrtl_finish_stmt_expr): Likewise.
3152 (finish_for_stmt): Removed first argument and generate rtl
3154 (finish_switch_stmt): Likewise.
3155 (do_poplevel): Removed generate rtl specific code.
3156 (do_pushlevel): Likewise.
3157 (add_tree): Likewise.
3158 (finish_goto_stmt): Likewise.
3159 (finish_expr_stmt): Likewise.
3160 (begin_if_stmt): Likewise.
3161 (finish_if_stmt_cond): Likewise.
3162 (finish_then_clause): Likewise.
3163 (begin_else_clause): Likewise.
3164 (finish_else_clause): Likewise.
3165 (finish_if_stmt): Likewise.
3166 (clear_out_block): Likewise.
3167 (begin_while_stmt): Likewise.
3168 (finish_while_stmt_cond): Likewise.
3169 (finish_while_stmt): Likewise.
3170 (begin_do_stmt): Likewise.
3171 (finish_do_body): Likewise.
3172 (finish_do_stmt): Likewise.
3173 (finish_return_stmt): Likewise.
3174 (begin_for_stmt): Likewise.
3175 (finish_for_init_stmt): Likewise.
3176 (finish_for_cond): Likewise.
3177 (finish_for_expr): Likewise.
3178 (finish_break_stmt): Likewise.
3179 (finish_continue_stmt): Likewise.
3180 (begin_switch_stmt): Likewise.
3181 (finish_switch_cond): Likewise.
3182 (finish_case_label): Likewise.
3183 (begin_try_block): Likewise.
3184 (begin_function_try_block): Likewise.
3185 (finish_try_block): Likewise.
3186 (finish_cleanup_try_block): Likewise.
3187 (finish_cleanup): Likewise.
3188 (finish_function_try_block): Likewise.
3189 (finish_handler_sequence): Likewise.
3190 (finish_function_handler_sequence): Likewise.
3191 (begin_handler): Likewise.
3192 (finish_handler_parms): Likewise.
3193 (begin_catch_block): Likewise.
3194 (finish_handler): Likewise.
3195 (begin_compound_stmt): Likewise.
3196 (finish_compound_stmt): Likewise.
3197 (finish_asm_stmt): Likewise.
3198 (finish_label_stmt): Likewise.
3199 (finish_label_decl): Likewise.
3200 (finish_subobject): Likewise.
3201 (finish_decl_cleanup): Likewise.
3202 (finish_named_return_value): Likewise.
3203 (begin_stmt_expr): Likewise.
3204 (finish_stmt_expr): Likewise.
3206 * decl.c (initialize_local_var): Changed call to finish_expr_stmt
3207 to call genrtl_expr_stmt when appropriate.
3209 * init.c (begin_init_stmts): Changed calls to begin_stmt_expr and
3210 begin_compound_expr to call genrtl_begin_stmt_expr and
3211 genrtl_begin_compound_expr when appropriate.
3212 (finish_init_stmts): Changed calls to finish_compound_expr and
3213 finish_stmt_expr to call genrtl_finish_compound_expr and
3214 genrtl_finish_stmt_expr when appropriate.
3215 (expand_default_init): Changed call to finish_expr_stmt to call
3216 genrtl_expr_stmt when appropriate.
3217 (build_vec_init): Likewise.
3219 * parse.y (simple_stmt): Removed first argument from call to
3220 finish_for_stmt. Removed first argument from call to
3223 * parse.c: Regenerated.
3225 * pt.c (tsubst_expr): Removed first argument from call to
3226 finish_for_stmt. Removed first argument from call to
3229 2000-06-16 Benjamin Chelf <chelf@codesourcery.com>
3231 * cp-tree.h (enum cplus_tree_code): Changed __DUMMY to
3232 CP_DUMMY_TREE_CODE. Remove #include "c-common.def".
3234 * lex.c (cplus_tree_code_type[]): Removed #include "c-common.def".
3235 (cplus_tree_code_length[]): Likewise.
3236 (cplus_tree_code_name[]): Likewise.
3237 (init_parse): Added call to add_c_tree_codes. Changed
3238 LAST_AND_UNUSED_TREE_CODE to LAST_C_TREE_CODE.
3240 2000-06-16 Mark Mitchell <mark@codesourcery.com>
3242 * cp-tree.h (finish_mem_initializers): Declare.
3243 (count_trees): Likewise.
3244 * parse.y (base_init): Use finish_mem_initializers.
3245 * semantics.c (finish_mem_initializers): New function.
3247 * tree.c (count_trees_r): Prototype. Use DATA parameter to store
3248 the number of trees.
3250 (count_trees): Don't use it.
3252 2000-06-15 Jason Merrill <jason@redhat.com>
3254 * tree.c (count_trees): New debugging function.
3256 * typeck.c (build_x_function_call): Use DECL_FUNCTION_TEMPLATE_P.
3257 * init.c (build_member_call): Pull out the name of a DECL.
3259 * Makefile.in (semantics.o, pt.o): Depend on TIMEVAR_H.
3260 * semantics.c (expand_body): Push to TV_INTEGRATION here.
3261 * optimize.c (optimize_function): Not here.
3262 * pt.c (instantiate_decl): Push to TV_PARSE.
3264 2000-06-15 Mark Mitchell <mark@codesourcery.com>
3266 * cp-tree.h (struct language_function): Remove x_base_init_list
3267 and x_member_init_list.
3268 (current_base_init_list): Remove.
3269 (current_member_init_list): Likewise.
3270 (setup_vtbl_ptr): Change prototype.
3271 (emit_base_init): Likewise.
3272 (expand_member_init): Likewise.
3273 (reinit_parse_for_function): Remove.
3274 * decl.c (save_function_data): Don't clear x_base_init_list and
3276 (mark_language_function): Don't mark them.
3277 * init.c (perform_member_init): Tweak comment.
3278 (sort_member_init): Take the list of initializers as an argument.
3279 (sort_base_init): Likewise.
3280 (emit_base_init): Likewise.
3281 (expand_member_init): Return the initializer. Don't use global
3283 * lex.c (reinit_parse_for_function): Remove.
3284 * method.c (build_template_parm_names): Correct substitution.
3285 (do_build_copy_constructor): Don't use current_member_init_list
3286 and current_base_init_list.
3287 (synthesize_method): Likewise.
3288 * parse.y (base_init): Split mem-initializers into
3289 base-initializers and field-initializers.
3290 (member_init_list): Build up the list here.
3291 (member_init): Return the initializer.
3292 (fn.depfn): Don't use reinit_parse_for_function.
3293 * parse.c: Regenerated.
3294 * pt.c (convert_nontype_argument): Don't make an ADDR_EXPR of the
3296 (tsubst_expr): Don't use current_member_init_list
3297 and current_base_init_list.
3298 (tsubst_expr_values): Rename to ...
3299 (tsubst_initializer_list): ... this. Use convert_from_reference.
3300 * semantics.c (setup_vtbl_ptr): Don't use current_member_init_list
3301 and current_base_init_list.
3302 (begin_function_definition): Don't call reinit_parse_for_function.
3304 * dump.c (dequeue_and_dump): Use TREE_VEC_LENGTH with vectors.
3306 * error.c (dump_expr): Handle ADDR_EXPRs with REFERENCE_TYPE
3309 * cp-tree.h (DECL_PENDING_INLINE_P): Relax checking.
3311 2000-06-14 Benjamin Chelf <chelf@codesourcery.com>
3313 * cp-tree.h (IF_COND): Move to c-common.h.
3314 (THEN_CLAUSE): Likewise.
3315 (ELSE_CLAUSE): Likewise.
3316 (WHILE_COND): Likewise.
3317 (WHILE_BODY): Likewise.
3318 (DO_COND): Likewise.
3319 (DO_BODY): Likewise.
3320 (RETURN_EXPR): Likewise.
3321 (EXPR_STMT_EXPR): Likewise.
3322 (FOR_INIT_STMT): Likewise.
3323 (FOR_COND): Likewise.
3324 (FOR_EXPR): Likewise.
3325 (FOR_BODY): Likewise.
3326 (SWITCH_COND): Likewise.
3327 (SWITCH_BODY): Likewise.
3328 (CASE_LOW): Likewise.
3329 (CASE_HIGH): Likewise.
3330 (GOTO_DESTINATION): Likewise.
3331 (COMPOUND_BODY): Likewise.
3332 (ASM_CV_QUAL): Likewise.
3333 (ASM_STRING): Likewise.
3334 (ASM_OUTPUTS): Likewise.
3335 (ASM_INPUTS): Likewise.
3336 (ASM_CLOBBERS): Likewise.
3337 (DECL_STMT_DECL): Likewise.
3338 (STMT_EXPR_STMT): Likewise.
3339 (LABEL_STMT_LABEL): Likewise.
3340 (SCOPE_BEGIN_P): Likewise.
3341 (SCOPE_END_P): Likewise.
3342 (SCOPE_STMT_BLOCK): Likewise.
3343 (SCOPE_NULLIFIED_P): Likewise.
3344 (SCOPE_NO_CLEANUPS_P): Likewise.
3345 (SCOPE_PARTIAL_P): Likewise.
3346 (ASM_VOLATILE_P): Likewise.
3347 (STMT_LINENO): Likewise.
3348 (STMT_LINENO_FOR_FN_P): Likewise.
3350 * cp-tree.def: Removed SRCLOC, SIZEOF_EXPR, ARROW_EXPR,
3351 ALIGNOF_EXPR, EXPR_STMT, COMPOUND_STMT, DECL_STMT, IF_STMT,
3352 FOR_STMT, WHILE_STMT, DO_STMT, RETURN_STMT, BREAK_STMT,
3353 CONTINUE_STMT, SWITCH_STMT, GOTO_STMT, LABEL_STMT, ASM_STMT,
3354 SCOPE_STMT, CASE_LABEL, STMT_EXPR.
3356 * Makefile.in (CXX_TREE_H): Added $(srcdir)/../c-common.def.
3358 * Make-lang.in (CXX_SRCS): Added $(srcdir)/c-common.def.
3359 (cc1plus$(exeext)): Added $(srcdir)/c-common.def.
3361 * lex.c (cplus_tree_code_type[]): Added '#include "c-common.def"'.
3362 (cplus_tree_code_length[]): Added '#include "c-common.def"'.
3363 (cplus_tree_code_name[]): Added '#include "c-common.def"'.
3365 2000-06-14 Mark Mitchell <mark@codesourcery.com>
3367 * cp-tree.h (BINFO_OVERRIDE_ALONG_VIRTUAL_PATH): New macro.
3368 * class.c (dfs_find_final_overrider): Set it appropriately.
3369 (dfs_built_vtt_inits): Check BINFO_OVERRIDE_ALONG_VIRTUAL_PATH to
3370 avoid unneeded secondary vptrs.
3372 2000-06-13 Jakub Jelinek <jakub@redhat.com>
3374 * class.c (build_secondary_vtable): Set DECL_USER_ALIGN.
3375 (check_bitfield_decl, check_field_decl): Likewise.
3376 (build_vtbl_or_vbase_field, build_base_field): Likewise.
3377 (layout_class_type): Set DECL_USER_ALIGN resp. CLASSTYPE_USER_ALIGN.
3378 * decl.c (record_unknown_type): Set TYPE_USER_ALIGN.
3379 (xfer_tag, finish_enum): Likewise.
3380 * decl2.c (finish_builtin_type): Likewise.
3381 * init.c (init_init_processing): Likewise.
3382 * pt.c (instantiate_class_template): Likewise.
3383 * rtti.c (get_tinfo_decl, synthesize_tinfo_fn): Set DECL_USER_ALIGN.
3384 * cp-tree.h (struct lang_type): Add user_align member.
3385 (CLASSTYPE_USER_ALIGN): Define.
3387 Tue Jun 13 15:48:03 2000 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
3389 * Make-lang.in (c++.install-common): Install g++-cross in
3390 $(gcc_tooldir)/bin as g++ and c++; g++ in $(bindir) as
3391 $(target_alias)-g++ and $(target_alias)-c++.
3393 2000-06-12 Mark Mitchell <mark@codesourcery.com>
3395 * class.c (vcall_offset_data_s): Add last_init and fns.
3396 (overrides): Rename to same_signature_p.
3397 (dfs_find_final_overrider): Adjust accordingly.
3398 (mark_overriders): Likewise.
3399 (warn_hidden): Likewise.
3400 (build_vtbl_initializer): Reorganize machinery for building things
3401 at negative offsets.
3402 (build_vcall_and_vbase_vtbl_entries): Likewise.
3403 (build_vbase_offset_vtbl_entries): Likewise.
3404 (dfs_build_vcall_offset_vtbl_entries): Correct order of vcall
3405 offset entries. Do not create two entries for functions with the
3407 (build_vcall_offset_vtbl_entries): Initialize vod->fns.
3408 (build_rtti_vtbl_entries): Reorganize machinery for building things
3409 at negative offsets.
3411 * optimize.c (expand_call_inline): Don't recurse into the code
3412 used to initialize the parameters more than once.
3414 2000-06-11 Mark Mitchell <mark@codesourcery.com>
3416 * mangle.c (NESTED_TEMPLATE_MATCH): Fix typo in comment.
3417 (is_std_substitution): Don't check CLASSTYPE_USE_TEMPLATE here.
3418 (find_substitution): Only use the `Sa' substitution for
3419 std::allocator, not instantiations of it.
3420 (write_template_prefix): Move comment. Only use a TREE_LIST to
3421 represent substitutions for a member template.
3422 (write_array_type): Mangle array dimensions correctly.
3423 * optimize.c (maybe_clone_body): Copy more information from the
3425 * pt.c (regenerate_decl_from_template): Preserve DECL_USE_TEMPLATE
3426 on the regenerated declaration.
3428 2000-06-11 Chip Salzenberg <chip@valinux.com>
3429 Mark Mitchell <mark@codesourcery.com>
3431 * class.c (build_vtable): Clarify comment.
3432 (build_ctor_vtbl_group): Pass the most derived type to
3435 2000-06-11 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
3437 * decl2.c (compare_options): Don't needlessly cast away const-ness.
3439 2000-06-10 Mark Mitchell <mark@codesourcery.com>
3441 * decl.c (add_binding): Handle duplicate declarations of external
3444 2000-06-09 Chip Salzenberg <chip@valinux.com>
3445 Mark Mitchell <mark@codesourcery.com>
3447 * mangle.c (write_number): Take an unsigned HOST_WIDE_INT as an
3449 (write_signed_number): New macro.
3450 (write_unsigned_number): Likewise.
3451 (write_source_name): Use them.
3452 (write_number): Handle signed and unsigned values.
3453 (write_integer_cst): Use tree_int_cst_sgn, and use
3454 write_unsigned_number or write_signed_number as appropriate.
3455 (write_discriminator): Use write_unsigned_number or
3456 write_signed_number as appropriate.
3457 (write_template_arg_literal): Likewise.
3458 (write_array_type): Use tree_low_cst.
3459 (write_template_parm): Use write_unsigned_number or
3460 write_signed_number as appropriate.
3461 (write_substitution): Adjust call to write_number.
3462 (write_type): Get the TYPE_MAIN_VARIANT before mangling it.
3463 (write_expression): Handle non-type template arguments of
3464 reference type correctly.
3465 (mangle_thunk): Use write_signed_number.
3467 2000-06-09 Chip Salzenberg <chip@valinux.com>
3469 * mangle.c (find_substition): Don't mangle objects with typename
3470 substitutions (e.g. "cin" as "Si").
3472 2000-06-09 Zack Weinberg <zack@wolery.cumb.org>
3474 * call.c (add_candidate): Use ggc_alloc_cleared.
3475 * decl.c (lookup_label): Likewise.
3476 * lex.c (retrofit_lang_decl): Likewise.
3478 2000-06-09 Jason Merrill <jason@casey.soma.redhat.com>
3480 * semantics.c (expand_body): Push to TV_EXPAND.
3481 * optimize.c (optimize_function): Push to TV_INTEGRATION.
3482 * decl.c (start_function): Always call announce_function.
3484 * tinfo2.cc: Just declare abort.
3486 2000-06-09 Gabriel Dos Reis <gdr@codesourcery.com>
3488 * lex.c (DEF_OPERATOR): Say `operator@' -not- `operator @'
3489 whenever @ is a symbolic name.
3491 2000-06-08 Jakub Jelinek <jakub@redhat.com>
3493 * method.c (make_thunk): Clear DECL_VTT_PARM in thunk.
3495 2000-06-07 Mark Mitchell <mark@codesourcery.com>
3497 * decl.c (pushdecl): Look up functions by DECL_NAME, not
3498 DECL_ASSEMBLER_NAME.
3500 2000-06-06 Mark Mitchell <mark@codesourcery.com>
3502 * decl2.c (c_language): Define.
3504 2000-06-06 Gabriel Dos Reis <gdr@codesourcery.com>
3506 * lex.c (lang_init_options): Tweak.
3508 * decl2.c: Remove #inclusion of diagnostic.h
3509 (lang_decode_option): Move diagnostic formatting options to
3512 * lang-options.h: Remove documentation for diagnostic options.
3514 * Makefile.in (lex.o): Depends upon diagnostic.h
3516 2000-06-06 Mark Mitchell <mark@codesourcery.com>
3518 * decl.c (redeclaration_error_message): If two TEMPLATE_DECLs have
3519 the same DECL_RESULT, it's not a redefinition.
3520 * pt.c (tsubst_decl): Remove code to handle illegal
3523 2000-06-06 Nathan Sidwell <nathan@codesourcery.com>
3525 * exception.cc: (__eh_alloc, __eh_free): Moved to libgcc2.c
3527 2000-06-05 Jason Merrill <jason@casey.soma.redhat.com>
3529 * search.c (maybe_suppress_debug_info): Don't check
3530 CLASSTYPE_INTERFACE_ONLY if CLASSTYPE_INTERFACE_KNOWN isn't set.
3532 * pt.c (mark_decl_instantiated): Do SET_DECL_EXPLICIT_INSTANTIATION
3535 Remember instantiation context in deferred instantiations.
3536 * cp-tree.h (struct tinst_level): Remove.
3537 (TINST_DECL, TINST_LINE, TINST_FILE): New macros.
3538 * pt.c (current_tinst_level): Now a tree.
3539 (print_template_context, push_tinst_level, pop_tinst_level,
3540 tinst_for_decl): Adjust.
3541 (reopen_tinst_level): New fn.
3542 (init_pt): Register current_tinst_level as a root.
3543 (add_pending_template): Put current_tinst_level in TREE_PURPOSE
3544 of the pending templates list.
3545 (instantiate_pending_templates): Adjust. Call reopen_tinst_level.
3546 * lex.c (extract_interface_info): Adjust.
3547 * decl2.c (warn_if_unknown_interface): Adjust.
3549 2000-06-05 Mark Mitchell <mark@codesourcery.com>
3551 * class.c (indirect_primary_base_p): New function.
3552 (determine_primary_base): Use it.
3554 2000-06-05 Nathan Sidwell <nathan@codesourcery.com>
3556 Update new-abi dynamic cast algorithm.
3557 * tinfo.cc (__class_type_info::__dyncast_result): Add
3558 whole_details. Adjust constructor.
3559 (__vmi_class_type_info::__do_dyncast): Adjust for vmi_flags.
3560 Avoid unnecessary searching.
3561 (__dynamic_cast): Adjust for __dyncast_result::whole_details.
3563 Mon Jun 5 06:48:55 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3565 * decl.c (init_decl_processing): Don't call record_component_aliases.
3566 * tree.c (build_cplus_array_type_1): Likewise.
3568 2000-06-04 Mark Mitchell <mark@codesourcery.com>
3570 * ir.texi: Correct typo.
3571 * mangle.c (write_expression): Handle non-type template arguments
3572 with reference type.
3573 * method.c (build_overload_value): Likewise.
3574 * pt.c (convert_nontype_argument): Explicitly represent conversion
3575 to a reference with an ADDR_EXPR.
3576 (unify): Always unify arguments in left-to-right order.
3578 2000-06-03 Alex Samuel <samuel@codesourcery.com>
3579 Mark Mitchell <mark@codesourcery.com>
3581 * Make-lang.in (CXX_SRCS): Add mangle.c.
3582 * Makefile.in (CXX_OBJS): Add mangle.o.
3583 (mangle.o): New rule.
3585 * class.c (local_classes): New variable.
3586 * class.c (get_vtable_name): Use mangle_vtable_for_type for new ABI.
3587 (get_vtt_name): Use mangle_vtt_name for new ABI.
3588 (init_class_processing): Initialize local_classes.
3589 (build_ctor_vtbl_group): Use mangle_ctor_vtbl_for_type for new ABI.
3590 * cp-tree.h (cp_tree_index): Add CPTI_STD_IDENTIFIER.
3591 (std_identifier): New macro.
3592 (DECL_VOLATILE_MEMFUNC_P): New macro.
3593 (DECL_NAMESPACE_STD_P): Likewise.
3594 (local_classes): Declare.
3595 (get_mostly_instantiated_function_type): Declare.
3596 (init_mangle): Declare.
3597 (mangle_decl): Likewise.
3598 (mangle_type_string): Likewise.
3599 (mangle_type): Likewise.
3600 (mangle_typeinfo_for_type): Likewise.
3601 (mangle_typeinfo_string_for_type): Likewise.
3602 (mangle_vtbl_for_type): Likewise.
3603 (mangle_vtt_for_type): Likewise.
3604 (mangle_ctor_vtbl_for_type): Likewise.
3605 (mangle_thunk): Likewise.
3606 (mangle_conv_op_name_for_type): Likewise.
3607 (mangle_guard_variable): Likewise.
3608 * decl.c (pushtag): Keep track of local classes.
3609 (initialize_predefined_identifiers): Initialize std_identifier.
3610 (init_decl_processing): Use std_identifier.
3611 (start_decl): Don't treat instantiations as specializations.
3612 (grokdeclarator): Likewise.
3613 (grokvardecl): Call mangle_decl for new ABI. Only set mangled
3614 name for fully-instantiated templates.
3615 * decl2.c (grokclassfn): Use set_mangled_name_for_decl for
3616 destructors with the new ABI.
3617 (finish_static_data_member_decl): Use mangle_decl under the new ABI.
3618 (grokfield): Use mangle_type for new ABI.
3619 (grokoptypename): Use mangle_conv_op_for_type for new ABI.
3620 (get_sentry): Use mangle_guard_variable for new ABI.
3621 (start_static_initialization_or_destruction): Likewise.
3622 * expr.c (extract_aggr_init): Remove.
3623 (extract_scalar_init): Likewise.
3624 (extract_init): Remove #if 0'd code.
3625 * mangle.c: New function.
3626 * method.c (build_mangled_name): Assert not flag_new_abi.
3627 (build_static_name): Likewise.
3628 (build_decl_overload_real): Likewise.
3629 (build_typename_overload): Likewise.
3630 (build_overload_with_type): Likewise.
3631 (build_overload_name): Likewise.
3632 (get_ctor_vtbl_name): Likewise.
3633 (start_squangling): Likewise.
3634 (get_id_2): Likewise.
3635 (set_mangled_name_for_decl): Call mangle_decl for new ABI.
3636 (init_method): Call init_mangle for new ABI.
3637 (make_thunk): Call mangle_thunk for new ABI.
3638 * operators.def: Correct new ABI manglings for the `%' operator.
3640 * pt.c (build_template_decl): Copy DECL_OVERLOADED_OPERATOR_P and
3641 DECL_ASSIGNMENT_OPERATOR_P to the TEMPLATE_DECL.
3642 (lookup_template_class): Call mangle_decl for new ABI.
3643 (get_mostly_instantiated_function_type): New function.
3644 (set_mangled_name_for_template_decl): Use it.
3645 (tsubst_decl): Use set_mangled_name_for_decl for destructors with
3646 the new ABI. Use mangle_conv_op_name_for_type for instantiated
3647 conversion op names.
3648 * rtti.c (tinfo_name): Call mangle_type_string for new ABI.
3649 (get_tinfo_decl): Call mangle_typeinfo_for_type for new ABI.
3650 (tinfo_base_init): Likewise. Mangle typeinfo string name with
3651 mangle_typeinfo_string_for_type.
3653 2000-06-03 Mark Mitchell <mark@codesourcery.com>
3655 * cp-tree.h (TMPL_ARGS_LEVEL): Clarify comment.
3656 (INNERMOST_TEMPLATE_ARGS): New macro.
3657 (innermost_args): Remove.
3658 (get_innermost_template_args): New function.
3659 * decl2.c (arg_assoc_class): Use INNERMOST_TEMPLATE_ARGS.
3660 * error.c (dump_function_decl): Be caution when using
3661 most_general_template.
3662 * method.c (build_template_parm_names): Use
3663 INNERMOST_TEMPLATE_ARGS.
3664 * pt.c (add_to_template_args): Tidy comment
3665 (get_innermost_template_args): New function.
3666 (check_explicit_specialization): Clear DECL_INITIAL for a new
3668 (process_partial_specialization): Use INNERMOST_TEMPLATE_ARGS.
3670 (push_template_decl): Always register specializations of the most
3672 (convert_template_argument): Use INNERMOST_TEMPLATE_ARGS.
3673 (coerce_template_parms): Likewise.
3674 (lookup_template_class): Likewise.
3675 (innermost_args): Remove.
3676 (tsubst_decl): Use INNERMOST_TEMPLATE_ARGS.
3677 (tsubst_decl): Handle tricky specializations. Use
3678 get_innermost_template_args.
3679 (instantiate_template): Simplify handling of partial
3681 (get_class_bindings): Use INNERMOST_TEMPLATE_ARGS.
3682 (most_general_template): Reimplement, in a more straightforward
3684 (regenerate_decl_from_template): Tweak formatting. Use
3685 TMPL_ARGS_DEPTH for clarity.
3686 (set_mangled_name_for_template_decl): Use INNERMOST_ARGS.
3688 * dump.c (dequeue_and_dump): Dump information about thunks.
3690 2000-06-01 Richard Henderson <rth@cygnus.com>
3692 * decl.c (init_decl_processing): Set lang_get_alias_set first thing.
3694 2000-06-01 Richard Henderson <rth@cygnus.com>
3696 * decl2.c (unsupported_options): Fix typo, make const.
3697 (lang_decode_option): Fix bsearch argument order.
3699 2000-06-01 Mark Mitchell <mark@codesourcery.com>
3701 * init.c (resolve_offset_ref): Remove check for TREE_ADDRESSABLE
3704 Wed May 31 14:09:00 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3706 * cp-tree.h (c_get_alias_set): Deleted.
3707 * Makefile.in (decl.o): Include ../expr.h.
3708 * decl.c (expr.h): Include.
3709 (init_decl_processing): Call record_component_aliases for arrays.
3710 (grokdeclarator): Likewise.
3711 Set TREE_ADDRESSABLE for fields that aren't bitfields.
3712 * tree.c (build_cplus_array_type_1): Call record_component_aliases.
3714 2000-05-31 Mark Mitchell <mark@codesourcery.com>
3716 Remove guiding declaration support.
3717 * cp/cp-tree.h (flag_dump_translation_unit): Make it const.
3718 (flag_guiding_decls): Remove.
3719 * call.c (build_user_type_conversion_1): Remove support for
3721 (build_new_function_call): Likewise.
3722 (build_new_op): Likewise.
3723 (build_new_method_call): Likewise.
3724 * decl.c (start_function): Likewise.
3725 * friend.c (is_friend): Likewise.
3726 (do_friend): Likewise.
3727 * decl2.c ((flag_dump_translation_unit): Make it const.
3728 (flag_guiding_decls): Remove.
3729 (unsupported_options): New variable
3730 (compare_options): New function.
3731 (lang_decode_option): Use them.
3733 * decl.c (build_cp_library_fn): Set DECL_CONTEXT.
3735 * method.c (mangle_expression): Adjust test for legal expression
3738 * pt.c (instantiate_decl): Save and restore the local
3739 specializations list.
3741 2000-05-30 Jason Merrill <jason@decepticon.cygnus.com>
3743 * decl.c (grok_reference_init): Pass LOOKUP_ONLYCONVERTING.
3745 2000-05-30 Mark Mitchell <mark@codesourcery.com>
3747 * call.c (add_template_candidate_real): Handle member template
3748 constructors for classes with virtual bases.
3749 (build_user_type_conversion_1): Use in_charge_arg_for_name.
3750 (build_new_method_call): Use DECL_NONSTATIC_MEMBER_FUNCTION_P.
3752 * ir.texi: Update thunk documentation.
3754 * call.c (joust): Fix handling of overloaded builtin operators.
3756 2000-05-30 Zack Weinberg <zack@wolery.cumb.org>
3758 * cp-tree.h (DECL_ANTICIPATED): New macro.
3759 Document new use of DECL_LANG_FLAG_7.
3760 * decl.c (builtin_function): Set DECL_ANTICIPATED on builtins
3761 in the user namespace.
3762 * lex.c (do_identifier): If the identifier's declaration has
3763 DECL_ANTICIPATED on, it has not yet been declared. But do not
3764 replace it with an ordinary implicit declaration.
3766 * tinfo2.cc: Include stdlib.h.
3768 2000-05-29 Mark Mitchell <mark@codesourcery.com>
3770 * cp-tree.h (CLASSTYPE_ALIGN_UNIT): New macro.
3771 * class.c (layout_empty_base): Use CLASSTYPE_ALIGN_UNIT, not
3774 2000-05-28 Gabriel Dos Reis <gdr@codesourcery.com>
3776 * decl2.c (lang_decode_option): Use skip_leading_substring instead
3779 2000-05-28 Alexandre Oliva <aoliva@cygnus.com>
3781 * operators.def (<?): Duplicated, should have been...
3784 2000-05-27 Alex Samuel <samuel@codesourcery.com>
3785 Mark Mitchell <mark@codesourcery.com>
3787 * cp-tree.h (ansi_opname): Make it a macro.
3788 (ansi_assopname): Likewise.
3789 (struct lang_decl_flags): Add assignment_operator_p.
3790 (struct lang_decl): Add operator_code.
3791 (DECL_VTT_PARM): Adjust.
3792 (DECL_OVERLOADED_OPERATOR_P): Return the operator_code for an
3793 overloaded operator.
3794 (SET_OVERLOADED_OPERATOR_CODE): New macro.
3795 (DECL_ASSIGNMENT_OPERATOR_P): New macro.
3796 (DECL_ARRAY_DELETE_OPERATOR_P): Adjust.
3797 (opname_tab): Remove.
3798 (assignop_tab): Likewise.
3799 (operator_name_info_t): New type.
3800 (operator_name_info): New variable.
3801 (assignment_operator_name_info): Likewise.
3802 (build_cp_library_fn): Remove declaration.
3803 (push_cp_library_fn): Likewise.
3804 (operator_name_string): Likewise.
3805 (build_decl_overload): Likewise.
3806 * call.c (print_z_candidates): Simplify.
3807 (build_object_call): Adjust usage of ansi_opname. Use
3808 DECL_OVERLOADED_OPERATOR_P.
3809 (op_error): Adjust operator name lookup.
3810 (build_conditional_expr): Adjust usage of ansi_opname.
3811 (build_new_op): Likewise.
3812 (build_op_delete_call): Likewise.
3813 (build_over_call): Likewise.
3814 (joust): Use DECL_OVERLOADED_OPERATOR_P.
3815 * decl.c (duplicate_decls): Copy operator_code.
3816 (init_decl_processing): Adjust parameters to push_cp_library_fn.
3817 (builtin_function): Adjust parameters to build_library_fn_1.
3818 (build_library_fn_1): Accept an overloaded operator code.
3819 (build_library_fn): Pass ERROR_MARK.
3820 (build_cp_library_fn): Accept an overloaded operator code.
3821 (push_cp_library_fn): Likewise.
3822 (grokfndecl): Tweak.
3823 (grokdeclarator): Simplify code to compute names of overloaded
3824 operators. Adjust use of ansi_opname.
3825 (ambi_op_p): Work on tree_codes, not identifiers.
3826 (unary_op_p): Likewise.
3827 (grok_op_properties): Likewise.
3828 (start_function): Use DECL_OVERLOADED_OPERATOR_P.
3829 (lang_mark_tree): Don't try to mark the operator_code.
3830 * decl2.c (grok_function_init): Use DECL_OVERLOADED_OPERATOR_P.
3831 * error.c (dump_decl): Remove special handling for operator
3833 (dump_function_name): Likewise.
3834 (dump_expr): Adjust name lookup of operators.
3835 (op_to_string): Simplify.
3836 (assop_to_string): Likewise.
3837 * init.c (build_new_1): Adjust use of ansi_opname.
3838 * lex.c (opname_tab): Remove.
3839 (assignop_tab): Likewise.
3840 (ansi_opname): Likewise.
3841 (ansi_assopname): Likewise.
3842 (operator_name_string): Likewise.
3843 (reinit_lang_specific): Likewise.
3844 (operator_name_info): New variable.
3845 (assignment_operator_name_info): Likewise.
3846 (init_operators): New function.
3847 (init_parse): Use it.
3848 (do_identifier): Adjust use of ansi_opname.
3849 * method.c (mangle_expression): Don't use ansi_opname for
3851 (build_decl_overload_real): Use DECL_OVERLOADED_OPERATOR_P.
3852 (build_decl_overload): Remove.
3853 (build_typename_overload): Use OPERATOR_TYPENAME_FORMAT directly.
3854 (do_build_assign_ref): Adjust use of ansi_opname.
3855 (synthesize_method): Likewise.
3856 (implicitly_declare_fn): Likewise.
3857 * operators.def: New file.
3858 * parse.y (operator): Adjust use of ansi_opname.
3859 * pt.c (tsubst_decl): Use IDENTIFIER_OPNAME_P.
3860 (set_mangled_name_for_template_decl): Don't play games with
3862 (special_function_p): Adjust use of ansi_opname.
3863 * typeck.c (check_return_expr): Likewise.
3864 * Make-lang.in (cc1plus): Depend on operators.def.
3865 * Makefile.in (lex.o): Likewise.
3868 2000-05-27 Zack Weinberg <zack@wolery.cumb.org>
3870 * Make-lang.in (cplib2.ready): Eradicate.
3872 Sat May 27 11:25:46 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
3874 * method.c (mangle_expression): Use TREE_CODE_LENGTH.
3875 * tree.c (break_out_calls, build_min_nt): Use TREE_CODE_LENGTH.
3876 (built_min, cp_tree_equal): Likewise.
3878 2000-05-26 Mark Mitchell <mark@codesourcery.com>
3880 * class.c (layout_nonempty_base_or_field): Replace
3881 `record_layout_info' with `record_layout_info_s'.
3883 2000-05-26 Jason Merrill <jason@casey.soma.redhat.com>
3886 * cp-tree.h (struct language_function): x_named_labels is now
3887 a struct named_label_list*.
3888 * decl.c (struct named_label_use_list): Renamed from...
3889 (struct named_label_list): ...this. New struct.
3890 (push_binding_level): Don't set eh_region.
3891 (note_level_for_eh): New fn.
3892 (pop_label): Take label and old value directly.
3893 (pop_labels): Adjust for new named_labels format.
3894 (lookup_label): Likewise.
3895 (poplevel): Note characteristics of a binding level containing a
3896 named label. Mess with named label lists earlier.
3897 (mark_named_label_lists): New fn.
3898 (mark_lang_function): Call it.
3899 (use_label): New fn, split out from...
3900 (make_label_decl): ...here. Don't call it.
3901 (decl_jump_unsafe, check_previous_goto, check_previous_goto_1,
3902 check_previous_gotos): New fns, split out from...
3903 (define_label): ...here.
3904 (check_switch_goto): New fn.
3905 (define_case_label): Call it.
3906 (check_goto): New fn.
3907 * semantics.c (finish_goto_stmt): Call it and use_label.
3908 (begin_compound_stmt): If we're a try block, call note_level_for_eh.
3909 (expand_stmt): Never pass 1 as DONT_JUMP_IN to expand_end_bindings.
3911 2000-05-26 Mark Mitchell <mark@codesourcery.com>
3913 * class.c (build_vtable_entry_ref): Correct usage of
3914 get_vtbl_decl_for_binfo.
3916 * decl2.c (grokclassfn): Set DECL_LANGUAGE here.
3917 * method.c (implicitly_declare_fn): Not here.
3919 2000-05-26 Nathan Sidwell <nathan@codesourcery.com>
3921 * cp-tree.h (CPTI_PTMD_DESC_TYPE): Rename to ...
3922 (CPTI_PTMD_DESC_TYPE): ... here.
3923 (ptmd_desc_type_node): Rename to ...
3924 (ptm_desc_type_node): ... here.
3926 * rtti.c (ptmd_initializer): Rename to ...
3927 (ptm_initializer): ... here.
3928 (sythesize_tinfo_var): Adjust. Deal with pointer to member
3930 (create_tinfo_types): Adjust.
3932 2000-05-25 Mark Mitchell <mark@codesourcery.com>
3934 Finish implementation of VTTs.
3935 * cp-tree.h (cp_tree_index): Add CPTI_VTT_PARM_TYPE and
3936 CPTI_VTT_PARM_IDENTIFIER.
3937 (vtt_parm_identifier): New macro.
3938 (vtt_parm_type): Likewise.
3939 (BINFO_SUBVTT_INDEX): Likewise.
3940 (BINFO_VPTR_INDEX): Likewise.
3941 (struct lang_decl): Add vtt_parm.
3942 (DECL_VTT_PARM): New macro.
3943 (DECL_USE_VTT_PARM): Likewise.
3944 (DECL_NEEDS_VTT_PARM_P): Likewise.
3945 (get_vtt_name): Declare.
3946 (build_artifical_parm): Likewise.
3947 (fixup_all_virtual_upcast_offsets): Likewise.
3948 (expand_indirect_vtbls_init): Remove.
3949 * call.c (build_new_method_call): Pass the vtt to subobject
3950 constructors and destructors.
3951 * class.c (get_vtt_name): Give it external linkage.
3952 (build_clone): Handle the magic VTT parameters for clones.
3953 (clone_function_decl): Fix typo in comment.
3954 (build_vtt): Keep track of the indices in the VTTs where various
3955 entities are stored.
3956 (build_vtt_inits): Likewise.
3957 (dfs_build_vtt_inits): Likewise.
3958 (build_ctor_vtbl_group): Tweak type of construction vtables.
3959 (dfs_accumulate_vtbl_inits): Build vtables for all bases, even
3960 primary bases, when building construction vtables.
3961 * decl.c (duplicate_decls): Handle DECL_VTT_PARM.
3962 (initialize_predefined_identifiers): Add vtt_parm_identifier.
3963 (init_decl_processing): Initialize vtt_parm_type.
3964 (grokfndecl): Use DECL_OVERLOADED_OPERATOR_P.
3965 (lang_mark_tree): Make vtt_parm.
3966 * decl2.c (build_artificial_parm): New function.
3967 (maybe_retrofit_in_chrg): Use it. Add VTT parameters.
3968 (grokclassfn): Use build_artificial_parm.
3969 * init.c (initialize_vtbl_ptrs): Call
3970 fixup_all_virtual_upcast_offsets directly.
3971 (perform_member_init): Use the complete subobject destructor for
3973 (build_vtbl_address): New function.
3974 (expand_virtual_init): Handle VTTs.
3975 * optimize (maybe_clone_body): Likewise.
3976 * search.c (fixup_all_virtual_upcast_offsets): Give it external
3978 (expand_indirect_vtbls_init): Remove.
3979 * semantics.c (setup_vtbl_ptr): Fix typos in comment.
3980 * tree.c (make_binfo): Make them bigger.
3982 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
3984 * inc/cxxabi.h (__pbase_type_info): Define, based on
3985 __pointer_type_info.
3986 (__pointer_type_info): Derive from __pbase_type_info. Adjust.
3987 (__pointer_to_member_type_info): Likewise.
3988 * tinfo2.cc (__pbase_type_info::~__pbase_type_info): Implement.
3989 (__pointer_to_member_type_info::__is_pointer_p): Remove.
3990 (__pointer_type_info::__do_catch): Rename to ...
3991 (__pbase_type_info::__do_catch): ... here. Adjust.
3992 (__pbase_type_info::__pointer_catch): Implement.
3993 (__pointer_type_info::__pointer_catch): Adjust.
3994 (__pointer_to_member_type_info::__pointer_catch): Adjust.
3996 2000-05-25 Nathan Sidwell <nathan@codesourcery.com>
3998 * tinfo.h (__user_type_info::contained_virtual_p): New
4000 * tinfo.cc (__user_type_info::do_upcast): Fix bug with diamond
4002 (__vmi_class_type_info::__do_upcast): Fix bug with NULL pointer to
4003 diamond shaped heirarchy. Add early out for mixed diamond and
4004 duplicate shaped heirarchy.
4006 2000-05-24 Mark Mitchell <mark@codesourcery.com>
4008 * cp-tree.h (build_delete): Change prototype.
4009 (build_vec_delete): Likewise.
4010 * call.c (build_scoped_method_call): Use special_function_kind
4011 values to indicate the kind of destruction to be done.
4012 (build_method_call): Likewise.
4013 * decl.c (finish_destructor_body): Likewise.
4014 (maybe_build_cleanup_1): Likewise. Rename to ...
4015 (maybe_build_cleanup): ... this.
4016 * decl2.c (delete_sanity): Use special_function_kind
4017 values to indicate the kind of destruction to be done.
4018 (build_cleanup): Likewise.
4019 * init.c (perform_member_init): Likewise.
4020 (build_vec_delete_1): Likewise.
4021 (build_dtor_call): Simplify.
4022 (build_delete): Use special_function_kind
4023 values to indicate the kind of destruction to be done.
4024 (build_vbase_delete): Likewise.
4025 (build_vec_delete): Likewise.
4027 * init.c (sort_member_init): Fix typo in error message generation
4030 Mon May 15 11:46:29 2000 Donald Lindsay <dlindsay@cygnus.com>
4032 * semantics.c (begin_class_definition): make the packed
4033 attribute be sensitive to the "-fpack-struct" command line flag
4035 2000-05-24 Nathan Sidwell <nathan@codesourcery.com>
4037 Update new-abi upcast algorithm.
4038 * inc/cxxabi.h (__class_type_info::__do_upcast): Change
4039 prototype and meaning of return value.
4040 (__si_class_type_info::__do_upcast): Likewise.
4041 (__vmi_class_type_info::__do_upcast): Likewise.
4042 * tinfo.cc (__class_type_info::__upcast_result): Replace
4043 whole2dst with part2dst. Adjust ctor.
4044 (__class_type_info::__do_upcast): Adjust call of worker function.
4045 (__class_type_info::__do_upcast): Adjust.
4046 (__si_class_type_info::__do_upcast): Adjust. Use parent's
4048 (__vmi_class_type_info::__do_upcast): Likewise. Fix private
4049 virtual base in diamond heirarchy bug.
4051 2000-05-23 Mark Mitchell <mark@codesourcery.com>
4053 * cp-tree.h (lang_decl_flags): Rename mutable_flag to uninlinable
4054 and bitfield to tinfo_fn_p.
4055 (DECL_TINFO_FN_P): Adjust.
4056 (SET_DECL_TINFO_FN_P): Likewise.
4057 (DECL_MUTABLE_P): Likewise.
4058 (DECL_C_BIT_FIELD): Likewise.
4059 (SET_DECL_C_BIT_FIELD): Likewise.
4060 (CLEAR_DECL_C_BIT_FIELD): Likewise.
4061 (DECL_UNINLINABLE): Likewise.
4062 * class.c (alter_access): Call retrofit_lang_decl if ncessary.
4063 (handle_using_decl): Remove assertion.
4064 (build_vtbl_or_vbase_field): Use build_decl, not build_lang_decl,
4065 to build FIELD_DECLs.
4066 (build_base_field): Likewise.
4067 (layout_class_type): Likewise.
4068 * decl.c (init_decl_processing): Likewise.
4069 (build_ptrmemfunc_type): Likewise.
4070 (grokdeclarator): Likewise.
4071 * decl2.c (grok_x_components): Likewise.
4072 * except.c (call_eh_info): Likewise.
4073 * init.c (init_init_processing): Likewise.
4074 * rtti.c (expand_class_desc): Likewise.
4075 (create_pseudo_type_info): Likewise.
4076 (get_vmi_pseudo_type_info): Likewise.
4077 (create_tinfo_types): Likewise.
4078 * ptree.c (print_lang_decl): Adjust.
4079 * typeck.c (build_component_ref): Don't check DECL_LANG_SPECIFIC
4080 before checking DECL_MUTABLE_P.
4082 * decl2.c (maybe_retrofit_in_chrg): Don't create in-charge
4083 parameters for template functions.
4084 * pt.c (tsubst_decl): Make sure we call maybe_retrofit_in_chrg for
4085 destructors as well as constructors.
4087 2000-05-22 Mark Mitchell <mark@codesourcery.com>
4089 * class.c (build_ctor_vtbl_group): Set inits.
4090 * optimize.c (maybe_clone_body): Set DECL_INLINE and
4091 DECL_THIS_INLINE appropriately for clones.
4093 * cp-tree.h (IDENTIFIER_TYPENAME_P): Use a flag, not strncmp.
4094 (DECL_CONV_FN_P): Simplify.
4095 (DECL_OPERATOR): Remove.
4096 (language_to_string): Declare.
4097 * decl.c (duplicate_decls): Fix typo in comment.
4098 (grokdeclarator): Adjust use of IDENTIFIER_TYPENAME_P.
4099 (grok_op_properties): Use DECL_CONV_FN_P instead of
4100 IDENTIFIER_TYPENAME_P.
4101 * dump.c (dequeue_and_dump): Dump the language linkage of
4103 * error.c (language_to_string): Give it external linkage.
4104 * method.c (build_typename_overload): Set IDENTIFIER_TYPENAME_P.
4105 (implicitly_declare_fn): Set DECL_LANGUAGE.
4106 * pt.c (check_explicit_specialization): Use DECL_CONV_FN_P, not
4107 IDENTIFIER_TYPENAME_P.
4108 (tsubst_decl): Likewise.
4109 (tsubst_copy): Adjust use of IDENTIFIER_TYPENAME_P.
4110 * semantics.c (finish_member_declaration): Don't mark members of
4111 classes declared in an extern "C" region as extern "C".
4113 2000-05-22 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4115 * decl2.c (qualified_lookup_using_namespace): Look through
4118 * decl.c (push_using_decl): Return the old decl on namespace level.
4120 2000-05-21 Mark Mitchell <mark@codesourcery.com>
4122 * cp-tree.h (SET_BINFO_NEW_VTABLE_MARKED): Add sanity checks.
4123 (VTT_NAME_PREFIX): New macro.
4124 (CTOR_VTBL_NAME_PREFIX): Likewise.
4125 (get_ctor_vtbl_name): New function.
4126 * class.c (get_vtable_name): Simplify.
4127 (get_vtt_name): New function.
4128 (get_vtable_decl): Don't set IDENTIFIER_GLOBAL_VALUE.
4129 (dfs_mark_primary_bases): Update the CLASSTYPE_VBASECLASSES list
4130 when a virtual base becomes primary.
4131 (finish_struct_1): Set CLASSTYPE_VFIELDS a little earlier. Build
4133 (finish_vtbls): Adjust calls to accumulate_vtbl_inits to pass in
4134 additional parameters.
4135 (dfs_finish_vtbls): Don't clear BINFO_NEW_VTABLE_MARKED.
4136 (initialize_array): New function.
4137 (build_vtt): Likewise.
4138 (build_vtt_inits): Likewise.
4139 (dfs_build_vtt_inits): Likewise.
4140 (dfs_fixup_binfo_vtbls): Likewise.
4141 (build_ctor_vtbl_group): Likewise.
4142 (initialize_vtable): Use initialize_array.
4143 (accumulate_vtbl_inits): Reimplement to handle construction
4145 (dfs_accumulate_vtbl_inits): Likewise.
4146 (bulid_vtbl_initializer): Adjust parameter name.
4147 * method.c (build_typename_overload): Remove #if 0'd code.
4148 (get_ctor_vtbl_name): New function.
4149 * search.c (dfs_walk_real): Use BINFO_N_BASETYPES.
4150 (init_vbase_pointers): Don't mess with the TREE_CHAIN of a binfo.
4152 * cp-tree.h (struct lang_type): Remove search_slot.
4153 (CLASSTYPE_SEARCH_SLOT): Remove.
4154 (emit_base_init): Change prototype.
4155 (initialize_vtbl_ptrs): Likewise.
4156 (expand_indirect_vtbls_init): Likewise.
4157 (clear_search_slots): Remove.
4158 * decl.c (lang_mark_tree): Don't mark search_slot.
4159 * init.c (initialize_vtbl_ptrs): Simplify.
4160 (emit_base_init): Likewise.
4161 * search.c (struct vbase_info): Document decl_ptr.
4162 (convert_pointer_to_single_level): Remove.
4163 (dfs_find_vbases): Remove.
4164 (dfs_init_base_pointers): Simplify.
4165 (dfs_clear_vbase_slots): Remove.
4166 (dfs_vtable_path_unmark): New function.
4167 (init_vbase_pointers): Simplify.
4168 (expand_upcast_fixups): Don't rely on CLASSTYPE_SEARCH_SLOT.
4169 (expand_indirect_vtbls_init): Simplify. Don't call
4170 mark_all_temps_used.
4171 * semantics.c (setup_vtbl_ptr): Adjust calls to emit_base_init and
4172 initialize_vtbl_ptrs.
4174 2000-05-20 Zack Weinberg <zack@wolery.cumb.org>
4176 * except.c: Add static prototypes.
4178 2000-05-20 H.J. Lu <hjl@gnu.org>
4180 * Make-lang.in (cplib2.ready): Also depend on cc1plus$(exeext).
4182 2000-05-19 Mark Mitchell <mark@codesourcery.com>
4184 Don't create a separate copy of virtual bases for the
4185 CLASSTYPE_VBASECLASSES list.
4186 * cp-tree.h (CLASSTYPE_VBASECLASSES): Change documentation.
4187 (BINFO_FOR_VBASE): Remove.
4188 (CANONICAL_BINFO): Adjust.
4189 (binfo_for_vbase): New function.
4190 * class.c (build_vbase_pointer_fields): Use binfo_for_vbase
4191 instead of BINFO_FOR_VBASE.
4192 (build_vbase_pointer): Likewise.
4193 (build_secondary_vtable): Likewise.
4194 (dfs_mark_primary_bases): Likewise.
4195 (mark_primary_bases): Likewise.
4196 (layout_nonempty_base_or_field): Likewise.
4197 (dfs_set_offset_for_shared_vbases): Likewise.
4198 (dfs_set_offset_for_unshared_vbases): Likewise.
4199 (layout_virtual_bases): Likewise. Adjust for changes to the
4200 CLASSTYPE_VBASECLASSES list.
4201 (dump_class_hierarchy_r): Use binfo_for_vbase
4202 instead of BINFO_FOR_VBASE.
4203 (dump_class_hierarchy): Likewise.
4204 (finish_vtbls): Likewise.
4205 (build_vtbl_initializer): Adjust for changes to the
4206 CLASSTYPE_VBASECLASSES list.
4207 (build_vbase_offset_vtbl_entries): Use binfo_for_vbase.
4208 * decl.c (finish_destructor_body): Adjust for changes to the
4209 CLASSTYPE_VBASECLASSES list.
4210 * init.c (sort_base_init): Use binfo_for_vbase.
4211 (construct_virtual_bases): Adjust for changes to the
4212 CLASSTYPE_VBASECLASSES list.
4213 (expand_member_init): Use binfo_for_vbase.
4214 (build_vbase_delete): Adjust for changes to the
4215 CLASSTYPE_VBASECLASSES list.
4216 * method.c (do_build_copy_constructor): Likewise.
4217 * rtti.c (get_base_offset): Use binfo_for_vbase.
4218 (expand_class_desc): Remove #if 0'd code.
4219 * search.c (struct vbase_info): Remove vbase_types.
4220 (get_base_distance): Use binfo_for_vbase.
4221 (lookup_field_queue_p): Use CANONICAL_BINFO.
4222 (get_shared_vbase_if_not_primary): Use binfo_for_vbase.
4223 (get_pure_virtuals): Adjust for changes to the
4224 CLASSTYPE_VBASECLASSES list.
4225 (dfs_find_vbases): Use binfo_for_vbase.
4226 (dfs_init_vbase_pointers): Likewise.
4227 (init_vbase_pointers): Don't initialize vi.vbase_types.
4228 (virtual_context): Use binfo_for_vbase.
4229 (fixup_all_virtual_upcast_offsets): Adjust for changes to the
4230 CLASSTYPE_VBASECLASSES list.
4231 (expand_indirect_vtbls_init): Simplify.
4232 (dfs_get_vbase_types): Don't replicate virtual bases.
4233 (find_vbase_instance): Use binfo_for_vbase.
4234 (binfo_for_vbase): New function.
4235 * typeck.c (get_delta_difference): Use binfo_for_vbase.
4237 2000-05-17 Mark Mitchell <mark@codesourcery.com>
4239 * decl2.c (finish_anon_union): Generalize error messages to handle
4240 anonymous structures.
4241 * init.c (perform_member_init): Remove `name' parameter.
4242 (build_field_list): New function.
4243 (sort_member_init): Handle anonymous union initialization order
4244 correctly. Check for multiple initializations of the same union.
4245 (emit_base_init): Don't look up fields by name here.
4246 (expand_member_init): Record the result of name lookup for future
4248 * typeck.c (build_component_ref): Fix formatting.
4250 Wed May 17 17:27:44 2000 Andrew Cagney <cagney@b1.cygnus.com>
4252 * decl.c (pop_label): Replace warn_unused with warn_unused_label.
4253 * typeck.c (build_x_compound_expr): Replace warn_unused with
4256 * decl2.c (lang_decode_option): Update -Wall unused flags by
4257 calling set_Wunused.
4259 2000-05-16 Mark Mitchell <mark@codesourcery.com>
4261 * cp-treeh (BINFO_NEW_VTABLE_MARKED): Update documentation.
4262 * init.c (dfs_vtable_path_unmark): Remove.
4263 * search.c (marked_new_vtable_p): Likewise.
4264 (unmarked_new_vtable_p): Likewise.
4265 (dfs_search_slot_nonempty_p): Likewise.
4266 (dfs_mark): Likewise.
4267 (dfs_vtable_path_unmark): Likewise.
4268 (dfs_find_vbases): Don't set BINFO_NEW_VTABLE_MARKED.
4269 (dfs_int_vbase_pointers): Don't clear BINFO_VTABLE_PATH_MARKED.
4270 (dfs_init_vbase_pointers): Remove special-case new ABI code.
4271 (dfs_clear_vbase_slots): Don't clear BINFO_NEW_VTABLE_MARKED.
4272 (init_vbase_pointers): Simplify.
4273 (expand_indirect_vtbls_init): Likewise.
4275 * class.c (copy_virtuals): New function.
4276 (build_primary_table): Use it.
4277 (build_secondary_vtable): Likewise.
4278 (modify_vtable_entry): Use NULL_TREE, not integer_zero_node, to
4279 indicate that no vcall offset is required.
4280 (add_virtual_function): Likewise.
4281 (modify_all_vtables): Likewise.
4282 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
4283 (dfs_accumulate_vtbl_inits): Likewise.
4284 (build_vtbl_initializer): Make changes to handle construction
4286 (dfs_build_vcall_offset_vtbl_entries): Likewise.
4287 (build_rtti_vtbl_entries): Likewise.
4288 (build_vtable_entries): Handle a NULL vcall_index.
4290 2000-05-15 Gabriel Dos Reis <gdr@codesourcery.com>
4292 * decl2.c (lang_decode_option): Fix thinko.
4294 2000-05-14 Jason Merrill <jason@casey.cygnus.com>
4296 * except.c (check_handlers): New fn.
4297 * cp-tree.h: Declare it.
4298 * semantics.c (finish_handler_sequence): Call it.
4299 (finish_function_handler_sequence): Likewise.
4300 (finish_handler_parms): Set TREE_TYPE on the handler.
4301 * cp-tree.h (PUBLICLY_UNIQUELY_DERIVED_P): New macro.
4302 * search.c (get_base_distance_recursive): If protect>1, ignore
4304 (get_base_distance): Don't reduce watch_access.
4306 2000-05-13 Gabriel Dos Reis <gdr@codesourcery.com>
4308 * lex.c: #include diagnostic.h.
4309 (lang_init_options): Set default prefixing rules.
4311 * lang-options.h: Add -fdiagnostics-show-location=.
4313 * decl2.c: #include diagnostic.h.
4314 (lang_decode_option): Handle -fdiagnostics-show-location=.
4316 2000-05-12 Nathan Sidwell <nathan@codesourcery.com>
4318 * tinfo.cc: Revert my 2000-05-08 and 2000-05-07 changes.
4319 * vec.cc: Revert my 2000-05-07 change.
4321 2000-05-11 Jason Merrill <jason@casey.cygnus.com>
4323 * class.c (check_field_decls): Complain about non-static data
4324 members with same name as class in class with constructor.
4326 2000-05-10 Jason Merrill <jason@casey.cygnus.com>
4328 * decl.c (grokdeclarator): Allow non-static data members with
4331 2000-05-09 Zack Weinberg <zack@wolery.cumb.org>
4333 * cp-tree.h: Constify tree_srcloc.filename, tinst_level.file,
4334 and pending_inline.filename. Update prototypes.
4335 * decl.c (define_label): Constify filename parameter.
4336 * decl2.c (warn_if_unknown_interface): Constify local char *.
4337 * input.c Constify input_source.filename. Don't declare
4338 input_filename or lineno. Constify filename parameter to feed_input.
4339 * lex.c (init_parse): Constify parameter and return value.
4340 (cp_pragma_interface, cp_pragma_implementation): Constify
4342 (reinit_parse_for_method, reinit_parse_for_block,
4343 reinit_parse_for_expr, feed_defarg, handle_cp_pragma):
4344 Constify local char *.
4345 * pt.c: Don't declare lineno or input_filename.
4346 (print_template_context, tsubst_friend_function, tsubst_decl,
4347 tsubst, instantiate_decl): Constify local char *.
4348 * semantics.c (expand_body): Constify local char *.
4349 * tree.c (build_srcloc): Constify filename parameter.
4350 * typeck.c (c_expand_asm_operands): Constify filename
4353 2000-05-08 Nathan Sidwell <nathan@codesourcery.com>
4355 * tinfo.cc (__dynamic_cast): Use a reinterpret_cast. Fix
4358 2000-05-08 Branko Cibej <branko.cibej@hermes.si>
4360 * inc/cxxabi.h: Fix typos in comment.
4361 (__base_class_info::__offset): Use a static_cast.
4363 2000-05-07 Nathan Sidwell <nathan@codesourcery.com>
4365 * inc/cxxabi.h: Use __SIZE_TYPE_ and __PTRDIFF_TYPE__ in place
4366 of std::size_t and std::ptrdiff_t respectively.
4367 * tinfo.cc: Likewise.
4370 2000-05-06 Richard Henderson <rth@cygnus.com>
4372 * typeck.c (build_c_cast): Don't warn integer->pointer size
4373 mismatch for constants.
4375 2000-05-06 Nathan Sidwell <nathan@codesourcery.com>
4377 * rtti.c (ptmd_initializer): Set non-public, if class is
4380 * inc/cxxabi.h (__dynamic_cast): Explicitly say extern "C++".
4381 (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4382 __cxa_vec_delete): Likewise.
4383 * tinfo.cc (__dynamic_cast): Likewise.
4384 * vec.cc (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
4385 __cxa_vec_delete): Likewise.
4387 2000-05-04 Mark Mitchell <mark@codesourcery.com>
4389 * cp-tree.h (DELTA_FROM_VTABLE_ENTRY): Remove.
4390 (SET_FNADDR_FROM_VTABLE_ENTRY): Likewise.
4391 (lang_decl_flags): Add vcall_offset.
4392 (THUNK_VCALL_OFFSET): Use it.
4393 * decl.c (lang_mark_tree): Don't mark DECL_ACCESS for a thunk.
4394 * method.c (make_thunk): Create the lang_decl here, not in
4396 (emit_thunk): Make generic thunks into ordinary functions once
4397 they have been fed to expand_body.
4398 * semantics.c (expand_body): Set current_function_is_thunk here.
4400 2000-05-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
4402 * class.c (update_vtable_entry_for_fn): Prototype.
4404 * pt.c (tsubst_decl): Initialize variables `argvec', `gen_tmpl'
4407 * search.c (dfs_build_inheritance_graph_order): Prototype.
4409 2000-05-04 Mark Mitchell <mark@codesourcery.com>
4411 * cp-tree.h (special_function_kind): Add various kinds of
4413 (special_function_p): New function.
4414 * class.c (overrides): Don't let one kind of destructor override
4416 * decl2.c (mark_used): Use DECL_NON_THUNK_FUNCTION_P when deciding
4417 whether or not to instantiate a template.
4418 * tree.c (special_function_p): Define.
4420 2000-05-03 Mark Mitchell <mark@codesourcery.com>
4422 * cp-tree.def (THUNK_DECL): Remove.
4423 * cp-tree.h (DECL_THUNK_P): New macro.
4424 (DECL_NON_THUNK_FUNCTION_P): Likewise.
4425 (DECL_EXTERN_C_FUNCTION_P): Likewise.
4426 (SET_DECL_THUNK_P): Likewise.
4427 (DELTA_FROM_VTABLE_ENTRY): Use DECL_THUNK_P.
4428 (FNADDR_FROM_VTABLE_ENTRY): Likewise.
4429 (DECL_MAIN_P): Use DECL_EXTERN_C_FUNCTION_P.
4430 * decl.c (decls_match): Use DECL_EXTERN_C_P.
4431 (duplicate_decls): Likewise.
4432 (pushdecl): Likewise. Adjust thunk handling.
4433 (grokfndecl): Use DECL_EXTERN_C_P.
4434 * decl2.c (mark_vtable_entries): Use DECL_THUNK_P.
4435 * dump.c (dequeue_and_dump): Remove THUNK_DECL handling.
4436 * except.c (nothrow_libfn_p): Use DECL_EXTERN_C_P.
4437 * expr.c (cplus_expand_expr): Remove THUNK_DECL handling.
4438 * method.c (make_thunk): Use SET_DECL_THUNK_P. Set
4439 DECL_NO_STATIC_CHAIN.
4440 (emit_thunk): Don't play games with TREE_CODE on thunks. Don't
4441 set DECL_DESTRUCTOR_P or DECL_CONSTRUCTOR_P on a thunk.
4442 * search.c (covariant_return_p): Remove THUNK_DECL handling.
4445 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
4447 * tree.c (walk_tree): Set lineno.
4449 2000-05-01 Mark Mitchell <mark@codesourcery.com>
4451 * exception.cc: Update license notice.
4453 * new1.cc: Likewise.
4454 * new2.cc: Likewise.
4455 * tinfo.cc: Likewise.
4456 * tinfo2.cc: Likewise.
4458 * inc/cxxabi.h: Likewise.
4459 * inc/exception: Likewise.
4460 * inc/new: Likewise.
4461 * inc/new.h: Likewise.
4462 * inc/typeinfo: Likewise.
4464 2000-05-01 Jason Merrill <jason@casey.cygnus.com>
4466 * tree.c (build_target_expr_with_type): If we already have a
4467 TARGET_EXPR, just return it.
4469 * optimize.c (initialize_inlined_parameters): Don't generate an
4470 EXPR_STMT if we can just use DECL_INITIAL.
4471 * decl.c (emit_local_var): Only make the initialization a
4472 full-expression if stmts_are_full_exprs_p.
4474 2000-05-01 Mark Mitchell <mark@codesourcery.com>
4476 * cp-tree.h (same_type_ignoring_top_level_qualifiers_p): New
4478 * call.c (standard_conversion): Use it.
4479 (direct_reference_binding): Likewise.
4480 (build_over_call): Likewise.
4481 (is_properly_derived_from): Likewise.
4482 (compare_ics): Likewise.
4483 * class.c (resolves_to_fixed_type_p): Likewise.
4484 * optimize.c (declare_return_variable): Likewise.
4485 * pt.c (is_specialization_of): Likewise.
4487 * typeck.c (comp_target_parms): Likeiwse.
4488 (build_static_cast): Likewise.
4489 (build_reinterpret_cast): Likewise.
4490 (build_const_cast): Likewise.
4491 (comp_ptr_ttypes_real): Likewise.
4492 (comp_ptr_ttypes_const): Likewise.
4493 * typeck2.c (process_init_constructor): Likewise.
4495 2000-04-30 Scott Snyder <snyder@fnal.gov>
4497 * decl.c (finish_destructor_body): Use the base destructor when
4498 destroying virtual bases.
4500 2000-04-30 Mark Mitchell <mark@codesourcery.com>
4502 * expr.c (cplus_expand_expr): Preserve temporaries when expanding
4504 * optimize.c (struct inline_data): Add target_exprs field.
4505 (declare_return_variable): When a function returns an aggregate,
4506 use the variable declared in the TARGET_EXPR as the remapped
4508 (expand_call_inline): Update the pending target_exprs stack.
4509 (optimize_function): Initialize the stack.
4511 * decl2.c (finish_file): Fix typo in comment.
4513 * method.c (emit_thunk): Don't try to return a `void' value.
4515 * optimize.c (initialize_inlined_parameters): If the parameter is
4516 addressable, we need to make a new VAR_DECL, even if the
4517 initializer is constant.
4519 2000-04-28 Cosmin Truta <cosmint@cs.ubbcluj.ro>
4521 * decl.c (grok_op_properties): Add an extra check of argtypes.
4523 2000-04-27 Mark Mitchell <mark@codesourcery.com>
4525 * optimize.c (copy_body_r): Use STRIP_TYPE_NOPS when copying
4527 (initialize_inlined_parameters): Try to avoid creating new
4530 2000-04-27 Alex Samuel <samuel@codesourcery.com>
4532 * lex.c (my_get_run_time): Remove.
4533 (init_filename_times): Use get_run_time instead of my_get_run_time.
4534 (check_newline): Likewise.
4535 (dump_time_statistics): Likewise.
4536 * decl2.c (finish_file): Push and pop timevar TV_VARCONST instead
4537 of computing elapsed time explicitly.
4539 2000-04-26 Mark Mitchell <mark@codesourcery.com>
4541 * cp-tree.h (TREE_READONLY_DECL_P): Use DECL_P.
4542 * init.c (decl_constant_value): Check TREE_READONLY_DECL_P.
4543 * call.c (convert_like_real): Don't test TREE_READONLY_DECL_P
4544 before calling decl_constant_value.
4545 * class.c (check_bitfield_decl): Likewise.
4546 * cvt.c (ocp_convert): Likewise.
4547 (convert): Likewise.
4548 * decl.c (compute_array_index_type): Likewise.
4549 (build_enumerator): Likewise.
4550 * decl2.c (check_cp_case_value): Likewise.
4551 * pt.c (convert_nontype_argument): Likewise.
4553 * typeck.c (decay_conversion): Likewise.
4554 (build_compound_expr): Likewise.
4555 (build_reinterpret_cast): Likewise.
4556 (build_c_cast): Likewise.
4557 (convert_for_assignment): Likewise.
4559 2000-04-26 Jason Merrill <jason@casey.cygnus.com>
4561 * decl.c (finish_function): Don't play games with DECL_INLINE.
4563 2000-04-25 Gabriel Dos Reis <dosreis@cmla.ens-cachan.fr>
4565 * ir.texi: Correct typo.
4567 2000-04-25 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4569 * decl.c (grokdeclarator): Reject VLAs as members.
4571 2000-04-24 Gabriel Dos Reis <gdr@codesourcery.com>
4573 * call.c (standard_conversion): Accept conversion between
4576 * cvt.c (ocp_convert): Handle conversion to COMPLEX_TYPE.
4578 2000-04-24 Zack Weinberg <zack@wolery.cumb.org>
4580 * decl2.c (finish_file): Remove double setup for accounting
4583 2000-04-24 Robert Lipe <robertlipe@usa.net>
4585 * cp-tree.h (lang_type): Member `language' now ENUM_BITFIELD.
4587 2000-04-23 Benjamin Kosnik <bkoz@cygnus.com>
4589 * new.cc (set_new_handler): Needs to be in std::.
4591 2000-04-23 Mark Mitchell <mark@codesourcery.com>
4593 * cp-tree.h (lang_decl): Remove pretty_function_p.
4594 (DECL_PRETTY_FUNCTION_P): Use TREE_LANG_FLAG_0, not a bit in the
4595 language-specific node.
4596 * decl.c (cp_make_fname_decl): Use build_decl, not
4597 build_lang_decl, to build the variables.
4598 (grokvardecl): Don't call build_lang_decl for local variables in
4600 (grokdeclarator): Don't call build_lang_decl for local type
4601 declarations in templates.
4602 * lex.c (retrofit_lang_decl): Use ggc_alloc_obj to allocated
4603 zero'd memory, rather than calling memset.
4604 * pt.c: Include hashtab.h.
4605 (local_specializations): New variable.
4606 (retrieve_local_specialization): Use it.
4607 (register_local_specialization): Likewise.
4608 (tsubst_decl): Don't assume local variables have
4610 (instantiate_decl): Set up local_specializations.
4611 * Makefile.in (HTAB_H): New variable.
4613 2000-04-23 Richard Henderson <rth@cygnus.com>
4615 * typeck.c (c_expand_asm_operands): Restore the original
4616 contents of the output list.
4618 2000-04-22 Gabriel Dos Reis <gdr@codesourcery.com>
4620 * ir.texi: Document complex number representation.
4622 2000-04-20 Nathan Sidwell <nathan@codesourcery.com>
4624 * rtti.c (init_rtti_processing): Set tinfo_var_id in new-abi.
4625 (target_incomplete_p): New function.
4626 (tinfo_base_init): Create comdat NTBS name variable.
4627 (ptr_initializer): Add non_public parameter. Calculate it.
4628 (ptmd_initializer): Likewise.
4629 (synthesize_tinfo_var): Adjust. Emit incomplete class tinfo.
4630 (create_real_tinfo_var): Add non_public parameter. Use it.
4631 Push proxy into global namespace.
4632 * inc/cxxabi.h (__pointer_type_info::incomplete_class_mask):
4634 * inc/typeinfo (type_info::before, type_info::operator==):
4635 Compare __name addresses.
4637 * tinfo2.cc: Remove new-abi builtins comment.
4639 2000-04-20 Jason Merrill <jason@casey.cygnus.com>
4641 * typeck.c (build_x_function_call): Resolve an OFFSET_REF.
4643 * call.c (joust): Exit early if we get the same function, too.
4645 * decl2.c (key_method): Return NULL_TREE for template classes.
4646 (import_export_class): Don't need to check for template classes.
4648 2000-04-18 Zack Weinberg <zack@wolery.cumb.org>
4650 * lex.c: Remove references to cccp.c.
4652 2000-04-18 Mark Mitchell <mark@codesourcery.com>
4654 * cp-tree.h (lang_decl_flags): Remove const_memfunc and
4655 volatile_memfunc. Add destructor_attr. Adjust dummy.
4656 (DECL_DESTRUCTOR_P): Use destructor_attr.
4657 (DECL_CONST_MEMFUNC_P): Reimplement.
4658 (DECL_VOLATILE_MEMFUNC_P): Remove.
4659 * class.c (finish_struct_methods): Use CLASSTYPE_DESTRUCTORS.
4660 (overrides): Use DECL_DESTRUCTOR_P.
4661 (check_for_override): Likewise.
4662 * decl.c (start_function): Likewise.
4663 * decl2.c (grokfclassfn): Likewise.
4664 (check_classfn): Likewise.
4665 (grok_function_init): Likewise.
4667 2000-04-17 Mark Mitchell <mark@codesourcery.com>
4669 * decl2.c (grokfield): Issue error on illegal data member
4672 Mon Apr 17 17:11:16 2000 Mark P Mitchell <mark@codesourcery.com>
4674 * method.c (make_thunk): Set DECL_CONTEXT for a THUNK_DECL.
4676 2000-04-16 Mark Mitchell <mark@codesourcery.com>
4678 * class.c (build_vtable_entry): Don't build thunks for type-info
4681 2000-04-16 Jason Merrill <jason@casey.cygnus.com>
4683 * decl.c (decls_match): Allow a redeclaration of a builtin to
4684 specify args while the builtin did not.
4686 2000-04-15 Mark Mitchell <mark@codesourcery.com>
4688 * cp-tree.def (THUNK_DECL): Add to documentation.
4689 * cp-tree.h (flag_huge_objects): Declare.
4690 * class.c (modify_vtable_entry): Tidy.
4691 (update_vtable_entry_for_fn): Split out from dfs_modify_vtables.
4692 Calculate delta appropriately for the new ABI.
4693 (dfs_modify_vtables): Use it.
4694 (modify_all_vtables): Fix thinko in code to add overriding copies
4695 of functions to primary vtables.
4696 (build_clone): Fix typo in comment.
4697 (clone_function_decl): Correct order of destructors in vtable.
4698 (build_vbase_offset_vtbl_entries): Adjust comment.
4699 (dfs_vcall_offset_queue_p): Remove.
4700 (dfs_build_vcall_offset_vtbl_entries): Update BV_VCALL_INDEX.
4701 (build_vcall_offset_vtbl_entries): Juse use dfs_skip_vbases.
4702 (build_vtable_entry): Correct check for pure virtual functions.
4703 Don't declare flag_huge_objects.
4704 * decl.c (flag_huge_objects): Remove declaration.
4705 * method.c (make_thunk): Tweak mangling for vcall offset thunks.
4706 Use int_size_in_bytes.
4707 (emit_thunk): Handle vcall offset thunks.
4709 Sat Apr 15 16:00:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
4711 * decl2.c (parse_time, varconst_time): Delete declarations.
4712 (finish_file): Delete LINENO declaration.
4713 START_TIME and THIS_TIME now long.
4715 2000-04-13 Nathan Sidwell <nathan@codesourcery.com>
4717 * class.c (build_base_field): Reformat comment.
4719 * inc/cxxabi.h (stddef.h): Comment inclusion.
4720 (__base_class_info::__offset): Comment shift.
4722 2000-04-12 Mark Mitchell <mark@codesourcery.com>
4724 * cp-tree.h (IDENTIFIER_CTOR_OR_DTOR_P): New macro.
4725 (cp_tree_index): Add CPTI_PUSH_EXCEPTION_IDENTIFIER.
4726 (cp_push_exception_identifier): New macro.
4727 (DECL_COMPLETE_DESTRUCTOR_P): New macro.
4728 (DECL_BASE_DESTRUCTOR_P): Likewise.
4729 (DECL_DELETING_DESTRUCTOR_P): Likewise.
4730 (get_vtbl_decl_for_binfo): Fix formatting.
4731 (in_charge_arg_for_name): New macro.
4732 (maybe_build_cleanup_and_delete): Remove declaration.
4733 * call.c (build_field_call): Use IDENTIFIER_CTOR_OR_DTOR_P.
4734 (in_charge_arg_for_name): New function.
4735 (build_new_method_call): Use it. Handle cloned destructors.
4736 (build_clone): Don't make the base constructor virtual.
4737 Automatically defer generated functions.
4738 (clone_function_decl): Handle destructors, too.
4739 (clone_constructors_and_destructors): Likewise.
4740 (create_vtable_ptr): Don't create a vtable entry for a cloned
4742 * decl.c (predefined_identifier): Add ctor_or_dtor_p.
4743 (initialize_predefined_identifiers): Update appropriately.
4744 (finish_destructor_body): Simplify.
4745 (maybe_build_cleanup_and_delete): Remove.
4746 * except.c (expand_throw): Handle new-ABI destructors.
4747 * init.c (expand_cleanup_for_base): Use base_dtor_identifier.
4748 (build_dtor_call): New function.
4749 (build_delete): Use it. Simplify.
4750 * optimize.c (maybe_clone_body): Handle destructors.
4751 * search.c (lookup_field_queue_p): Use IDENTIFIER_CTOR_OR_DTOR_P.
4753 * exception.cc (cleanup_fn): New typedef.
4754 (CALL_CLEANUP): New macro.
4755 (cp_eh_info): Use them.
4756 (__cp_push_exception): Likewise.
4757 (__cp_pop_exception): Likewise.
4759 2000-04-11 Mark Mitchell <mark@codesourcery.com>
4761 * cp-tree.h (cp_tree_index): Add CPTI_DTOR_IDENTIFIER.
4762 (complete_dtor_identifier): New macro.
4763 (CLASSTYPE_FIRST_CONVERSION): Remove.
4764 (CLASSTYPE_CONSTRUCTOR_SLOT): New macro.
4765 (CLASSTYPE_DESTRUCTOR_SLOT): Likewise.
4766 (CLASSTYPE_FIRST_CONVERSION_SLOT): Likewise.
4767 (CLASSTYPE_CONSTRUCTORS): Likewise.
4768 (CLASSTYPE_DESTRUCTORS): Likewise.
4769 (lang_decl): Add cloned_function.
4770 (DECL_COMPLETE_CONSTRUCTOR_P): New macro.
4771 (DECL_BASE_CONSTRUCTOR_P): Likewise.
4772 (DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P): Likewise.
4773 (DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P): Likewise.
4774 (DECL_CLONED_FUNCTION_P): Likewise.
4775 (DECL_CLONED_FUNCTION): Likewise.
4776 (clone_function_decl): Declare.
4777 (maybe_clone_body): Likewise.
4778 * call.c (build_user_type_conversion_1): Call complete object
4779 constructors in the new ABI.
4780 (build_new_method_call): Don't add in-charge parameters under the
4782 * class.c (add_method): Use DECL_MAYBE_IN_CHARGE_CONSTRUCTOR_P,
4783 DECL_MAYBE_IN_CHARGE_DESTRUCTOR_P, CLASSTYPE_CONSTRUCTOR_SLOT, and
4784 CLASSTYPE_DESTRUCTOR_SLOT.
4785 (build_clone): New function.
4786 (clone_function_decl): Likewise.
4787 (clone_constructors_and_destructors): Likewise.
4788 (check_bases_and_members): Use it.
4789 * decl.c (iniitialize_predefined_identifiers): Initialize
4790 complete_dtor_identifier.
4791 (finish_function): Don't add extra code to a clone.
4792 (lang_mark_tree): Mark cloned_function.
4793 * decl2.c (mark_used): Don't bother trying to instantiate things
4795 * dump.c (dequeue_and_dump): Don't dump CP_DECL_CONTEXT twice.
4796 * method.c (set_mangled_name_for_decl): Don't treat clones as
4798 (synthesize_method): Sythesize cloned functions, not the clones.
4799 * optimize.c (inline_data): Update comment on ret_label.
4800 (remap_block): Don't assume DECL_INITIAL exists.
4801 (copy_body_r): Allow ret_label to be NULL.
4802 (maybe_clone_body): Define.
4803 * pt.c (tsubst_decl): Handle clones.
4804 (instantiate_clone): New function.
4805 (instantiate_template): Use it.
4806 (set_mangled_name_for_template_decl): Don't treat clones as
4808 * search.c (lookup_fnfields_1): Use CLASSTYPE_CONSTRUCTOR_SLOT,
4809 CLASSTYPE_DESTRUCTOR_SLOT, and CLASSTYPE_FIRST_CONVERSION_SLOT.
4810 * semantics.c (expand_body): Clone function bodies as necessary.
4812 * optimize.c (remap_decl): Avoid sharing structure for arrays
4813 whose size is only known at run-time.
4814 * tree.c (copy_tree_r): Don't copy PARM_DECLs.
4816 * cp-tree.h (lang_decl_flags): Rename constructor_for_vbase_attr
4817 to has_in_charge_parm_p.
4818 (DECL_CONSTRUCTOR_FOR_VBASE_P): Rename to ...
4819 (DECL_HAS_IN_CHARGE_PARM_P): ... this.
4820 (DECL_COPY_CONSTRUCTOR_P): New macro.
4821 * call.c (add_function_candidate): Use DECL_HAS_IN_CHARGE_PARM_P.
4822 (build_user_type_conversion_1): Likewise.
4823 (convert_like_real): Likewise.
4824 (build_over_call): Likeiwse. Use DECL_COPY_CONSTRUCTOR_P.
4825 * decl.c (grokdeclarator): Use DECL_HAS_IN_CHARGE_PARM_P.
4826 (copy_args_p): Likewise.
4827 (grok_ctor_properties): Likewise.
4828 (start_function): Likewise.
4829 * decl2.c (maybe_retrofit_in_charge): Likewise. Set it.
4830 * error.c (dump_function_decl): Use DECL_HAS_IN_CHARGE_PARM_P.
4831 * init.c (emit_base_init): Use DECL_COPY_CONSTRUCTOR_P.
4832 * method.c (do_build_copy_constructor): Use
4833 DECL_HAS_IN_CHARGE_PARM_P.
4834 (synthesize_method): Likewise.
4835 * pt.c (instantiate_template): Remove goto.
4836 * tree.c (build_cplus_method_type): Remove mention of obstacks in
4839 * cp-tre.h (finish_function): Change prototype.
4840 * decl.c (end_cleanup_fn): Adjust caller.
4841 (finish_function): Take only one parameter.
4842 * decl2.c (finish_objects): Adjust caller.
4843 (finish_static_storage_duration_function): Likewise.
4844 * method.c (emit_thunk): Likewise.
4845 * parse.y: Likewise.
4846 * parse.c: Regenerated.
4847 * pt.c (instantiate_decl): Likewise.
4848 * rtti.c (synthesize_tinfo_fn): Likewise.
4849 * semantics.c (expand_body): Likewise.
4851 * cp-tree.h (copy_decl): New function.
4852 * class.c (finish_struct_1): Use it.
4853 * lex.c (copy_decl): Define it.
4854 * pt.c (tsubst_decl): Likewise.
4855 * tree.c (copy_template_template_parm): Likewise.
4857 * cp-tree.h (lang_type): Remove has_nonpublic_ctor and
4858 has_nonpublic_assign_ref.
4859 (TYPE_HAS_NONPUBLIC_CTOR): Don't declare.
4860 (TYPE_HAS_NONPUBLIC_ASSIGN_REF): Likewise.
4861 * class.c (finish_struct_methods): Don't set
4862 TYPE_HAS_NONPUBLIC_CTOR or TYPE_HAS_NONPUBLIC_ASSIGN_REF.
4863 (interface_only): Don't declare.
4864 (interface_unknown): Likewise.
4866 2000-04-11 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4868 * tree.h (HAVE_TEMPLATES): Remove definition.
4869 * lang-options.h (-fthis-is-variable): Remove documentation.
4871 2000-04-10 Jason Merrill <jason@casey.cygnus.com>
4873 * class.c (instantiate_type): Handle object-relative template-id.
4875 * semantics.c (finish_expr_stmt): Call convert_to_void here.
4876 * decl.c (cplus_expand_expr_stmt): Not here.
4878 * rtti.c (build_dynamic_cast_1): Call non_lvalue.
4879 Initialize exprtype earlier.
4881 * parse.y (fn.def1): Check for defining types in return types.
4883 * decl.c (check_tag_decl): Notice extra fundamental types.
4884 Diagnose empty decls in classes, too.
4886 * decl.c (grokdeclarator): Don't override an anonymous name if no
4887 declarator was given.
4889 * cvt.c (convert_to_void): Call resolve_offset_ref.
4891 * typeck.c (build_x_function_call): Abort if we get an OFFSET_REF.
4893 * decl2.c (decl_namespace): Handle getting a type.
4895 * typeck.c (build_c_cast): Re-enable warning for cast between
4896 pointer and integer of different size.
4898 2000-04-10 Nathan Sidwell <nathan@codesourcery.com>
4900 * inc/cxxabi.h (__pointer_type_info): Add restrict and
4902 (__pointer_type_info::__pointer_catch): New virtual function.
4903 (__pointer_to_member_type_info): Derive from
4904 __pointer_type_info. Adjust.
4905 (__pointer_to_member_type_info::__do_catch): Remove.
4906 (__pointer_to_member_type_info::__is_pointer_p): Declare.
4907 (__pointer_to_member_type_info::__pointer_catch): Declare.
4908 * rtti.c (qualifier_flags): Add restrict flag.
4909 (ptmd_initializer): Reorder members.
4910 (create_tinfo_types): Expand comments. Reorder
4911 ptmd_desc_type_node members.
4912 * tinfo2.cc (__pointer_to_member_type_info::__is_pointer_p):
4914 (__pointer_type_info::__do_catch): Move specific code into
4915 __pointer_catch. Call it.
4916 (__pointer_type_info::__pointer_catch): Non-pointer-to-member
4917 specific catch checking. Fix void conversion check.
4918 (__pointer_to_member_type_info::__do_catch): Remove.
4919 (__pointer_to_member_type_info::__pointer_catch): Implement.
4921 2000-04-10 Martin v. Löwis <loewis@informatik.hu-berlin.de>
4923 * lex.c (init_parse): Remove traces of classof and headof.
4924 * decl2.c (flag_operator_names): Default to 1.
4925 (lang_decode_option): Do not set it for -ansi.
4927 2000-04-09 Mark Mitchell <mark@codesourcery.com>
4929 * cp-tree.h (struct lang_decl): Remove main_decl_variant.
4930 (DECL_MAIN_VARIANT): Remove.
4931 * decl.c (duplicate_decls): Don't set it.
4932 (start_function): Likewise.
4933 (lang_mark_tree): Don't mark it.
4934 * decl2.c (defer_fn): Don't use it.
4935 * lex.c (retrofit_lang_decl): Don't set it.
4936 * pt.c (tsubst_decl): Likewise.
4937 * ptree.c (print_lang_decl): Don't print it.
4938 * typeck.c (mark_addressable): Don't use it.
4940 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
4942 * vec.cc: Include <new> and <exception>.
4943 (__cxa_vec_ctor): Use __cxa_vec_dtor for cleanup.
4944 (__cxa_vec_dtor): Catch dtor exceptions, and rethrow or
4946 (__cxa_vec_delete): Catch dtor exceptions.
4948 2000-04-09 Nathan Sidwell <nathan@codesourcery.com>
4950 Prepend __ to implementation defined names.
4951 * inc/typeinfo (type_info): Rename _name to __name.
4952 (type_info::type_info): Rename parameter.
4953 (type_info::operator==, type_info::operator!=,
4954 type_info::before): Likewise.
4955 (type_info::is_pointer_p, type_info::is_function_p,
4956 type_info::do_catch, type_info::do_upcast): Prepend __. Rename
4959 (__fundamental_type_info::__fundamental_type_info) Rename parameters.
4960 (__pointer_type_info::__pointer_type_info): Likewise.
4961 (__pointer_type_info::is_pointer_p,
4962 __pointer_type_info::do_catch): Prepend __. Rename parameters.
4963 (__array_type_info::__array_type_info): Rename parameters.
4964 (__function_type_info::__function_type_info): Likewise.
4965 (__function_type_info::is_function_p): Prepend __.
4966 (__enum_type_info::__enum_type_info): Rename parameters.
4967 (__pointer_to_member_type_info::__pointer_to_member_type_info):
4969 (__pointer_to_member_type_info::do_catch): Prepend __. Rename
4971 (__base_class_info::is_virtual_p, is_public_p, offset): Prepend __.
4972 (__class_type_info::__class_type_info): Rename parameters.
4973 (__class_type_info::sub_kind): Prepend __. Adjust member names.
4974 (__class_type_info::upcast_result,
4975 __class_type_info::dyncast_result): Prepend __. Move definition
4977 (__class_type_info::do_upcast, __class_type_info::do_catch,
4978 __class_type_info::find_public_src,
4979 __class_type_info::do_dyncast,
4980 __class_type_info::do_find_public_src): Prepend __. Rename
4982 (__si_class_type_info::__si_class_type_info): Rename parameters.
4983 (__si_class_type_info::do_upcast, __si_class_type_info::do_dyncast,
4984 __si_class_type_info::do_find_public_src): Prepent __. Rename
4986 (__vmi_class_type_info::__vmi_class_type_info): Rename parameters.
4987 (__vmi_class_type_info::do_upcast, __vmi_class_type_info::do_dyncast,
4988 __vmi_class_type_info::do_find_public_src): Prepent __. Rename
4990 (__dynamic_cast): Rename parameters.
4991 * tinfo.cc (type_info::is_pointer_p, type_info::is_function_p,
4992 type_info::do_catch, type_info::do_upcast): Prepend __.
4993 (contained_p, public_p, virtual_p, contained_public_p,
4994 contained_nonpublic_p, contained_nonvirtual_p): Adjust.
4995 (__class_type_info::do_catch,
4996 __class_type_info::do_upcast): Prepend __. Adjust.
4997 (__class_type_info::__upcast_result,
4998 __class_type_info::__dyncast_result): Move from inc/cxxabi.h.
5000 (__class_type_info::find_public_src): Prepend __. Adjust.
5001 (__class_type_info::do_find_public_src,
5002 __si_class_type_info::do_find_public_src,
5003 __vmi_class_type_info::do_find_public_src): Likewise.
5004 (__class_type_info::do_dyncast,
5005 __si_class_type_info::do_dyncast,
5006 __vmi_class_type_info::do_dyncast): Likewise.
5007 (__class_type_info::do_upcast,
5008 __si_class_type_info::do_upcast,
5009 __vmi_class_type_info::do_upcast): Likewise.
5010 (__dynamic_cast): Adjust.
5011 * tinfo2.cc (__pointer_type_info::is_pointer_p): Prepend __.
5012 (__function_type_info::is_function_p): Likewise.
5013 (__pointer_type_info::do_catch): Likewise. Adjust.
5014 (__pointer_to_member_type_info::do_catch): Likewise. Adjust.
5015 (__throw_type_match_rtti_2): Adjust.
5016 (__is_pointer): Adjust.
5018 2000-04-08 Mark Mitchell <mark@codesourcery.com>
5020 * cp-tree.h (cp_tree_index): Add CPTI_COMPLETE_CTOR_IDENTIFIER.
5021 (complete_ctor_identifier): New macro.
5022 (special_function_kind): Add sfk_copy_constructor and
5023 sfk_assignment_operator.
5024 (LOOKUP_HAS_IN_CHARGE): Remove.
5025 (cons_up_default_function): Rename to ...
5026 (implicitly_declare_fn): ... this.
5027 * call.c (build_new_method_call): Add in-charge parameters for
5029 * class.c (add_implicitly_declared_members): Change parameter name
5030 from cant_have_assignment to cant_have_const_assignment.
5031 Replace calls to cons_up_default_function to implicitly_declare_fn.
5032 * cvt.c (ocp_convert): Use complete_ctor_identifier.
5033 * decl.c (initialize_predefined_identifiers): Initialize it.
5034 (start_function): Use DECL_CONSTRUCTOR_FOR_VBASE_P instead of
5036 * init.c (expand_default_init): Don't calculate the in-charge
5038 (build_new_1): Likewise.
5039 * lex.c (cons_up_default_function): Move to method.c.
5040 * method.c (synthesize_method): Use DECL_DESTRUCTOR_P.
5041 (implicitly_declare_fn): New function.
5042 * typeck.c (build_static_cast): Use complete_ctor_identifier.
5043 (build_modify_expr): Likewise.
5044 * typeck2.c (build_functional_cast): Likewise.
5046 Under the new ABI, constructors don't return `this'.
5047 * cp-tree.h (warn_reorder): Declare.
5048 (special_function_kind): New enum.
5049 (global_base_init_list): Remove declaration.
5050 (emit_base_init): Don't return a value.
5051 (check_base_init): Don't declare.
5052 (is_aggr_typedef): Likewise.
5053 * decl.c (check_special_function_return_type): New function.
5054 (return_types): Remove.
5055 (grokdeclarator): Use check_special_function_return_type.
5056 (start_function): Don't initialize ctor_label under the new ABI.
5057 (finish_construtor_body): Don't create a corresponding LABEL_STMT.
5058 * init.c (begin_init_stmts): Move to top of file.
5059 (finish_init_stmts): Likewise.
5060 (warn_reorder): Don't declare.
5061 (emit_base_init): Don't create a STMT_EXPR here. Don't return a
5063 (check_base_init): Remove.
5064 (is_aggr_typedef): Likewise.
5065 (build_new_1): Don't use the return value of a constructor.
5066 * semantics.c (setup_vtbl_ptr): Don't use the return value
5068 * typeck.c (check_return_expr): Don't magically convert return
5069 statements into `return this' in constructors under the new ABI.
5071 * cp-tree.h (cp_tree_index): Add CPTI_BASE_CTOR_IDENTIFIER,
5072 CPTI_BASE_DTOR_IDENTIFIER, and CPTI_DELETING_DTOR_IDENTIFIER.
5073 (base_ctor_identifier): New macro.
5074 (base_dtor_identifier): Likewise.
5075 (deleting_dtor_identifier): Likewise.
5076 * decl.c: Don't include obstack.h.
5077 (obstack_chunk_alloc): Don't define.
5078 (obstack_chunk_free): Likewise.
5079 (struct predefined_identifier): New type.
5080 (initialize_predefined_identifiers): New function.
5081 (init_decl_processing): Use it.
5082 (debug_temp_inits): Remove.
5083 (start_method): Don't call preserve_data.
5084 (hack_incomplete_structures): Update comment.
5085 * init.c (init_init_processing): Don't initialize
5087 (build_offset_rf): Remove dead code.
5088 (build_delete): Use CLASSTYPE_N_BASECLASSES.
5089 * search.c (init_search_processing): Don't initialize
5092 2000-04-08 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5094 * typeck.c (build_binary_op): Call `tree_expr_nonnegative_p' to elide
5095 some sign_compare warnings.
5097 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
5099 Rename abi::__vmi_class_type_info members.
5100 * inc/cxxabi.h (__vmi_class_type_info): Rename details, n_bases,
5101 base_list, detail_masks members to vmi_flags, vmi_base_count,
5102 vmi_bases and vmi_flags_masks respectively.
5103 (__vmi_class_type_info::vmi_flags_masks): Rename
5104 details_unknown_mask to flags_unknown_mask.
5105 * tinfo.cc (__class_type_info::do_upcast): Adjust.
5106 (__vmi_class_type_info::do_find_public_src): Adjust.
5107 (__vmi_class_type_info::do_dyncast): Adjust.
5108 (__vmi_class_type_info::do_upcast): Adjust.
5110 2000-04-07 Nathan Sidwell <nathan@codesourcery.com>
5112 * tinfo.cc (convert_to_base): New function.
5113 (get_vbase_offset): Remove. Move into convert_to_base.
5114 (__vmi_class_type_info::do_find_public_src): Adjust.
5115 (__vmi_class_type_info::do_dyncast): Adjust.
5116 (__vmi_class_type_info::do_upcast): Adjust.
5118 2000-04-06 Jason Merrill <jason@yorick.cygnus.com>
5120 * tinfo.cc (operator=): Use __builtin_strcmp.
5121 * tinfo2.cc (before): Likewise.
5123 2000-04-06 Mark Mitchell <mark@codesourcery.com>
5125 * cp-tree.h (lang_decl_flags): Rename saved_inline to deferred.
5126 (DECL_SAVED_INLINE): Rename to ...
5127 (DECL_DEFERRED_FN): ... this.
5128 (in_function_p): Remove declaration.
5129 (mark_inline_for_output): Rename to ...
5130 (defer_fn): ... this.
5131 * decl.c (finish_function): Adjust call to mark_inline_for_output.
5132 (in_function_p): Remove definition.
5133 * decl2.c (saved_inlines): Rename to ...
5134 (deferred_fns): ... this.
5135 (saved_inlines_used): Rename to ...
5136 (deferred_fns_used): ... this.
5137 (mark_inline_for_output): Rename to ...
5138 (defer_fn): ... this.
5139 (finish_file): Adjust accordingly.
5140 (init_decl2): Likewise.
5141 * lex.c (cons_up_default_function): Likewise.
5142 * pt.c (mark_decl_instantiated): Likewise.
5143 (instantiate_decl): Don't set DECL_DEFER_OUTPUT under any
5145 * rtti.c (get_tinfo_decl): Adjust call to mark_inline_for_output.
5146 * semantics.c (expand_body): Defer more functions.
5148 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
5151 * Make-lang.in (CXX_LIB2FUNCS): Add it.
5153 * inc/cxxabi.h (__cxa_vec_new, __cxa_vec_ctor, __cxa_vec_dtor,
5154 __cxa_vec_delete): Declare.
5156 2000-04-06 Nathan Sidwell <nathan@codesourcery.com>
5158 * rtti.c (dfs_class_hint_mark): New static function.
5159 (dfs_class_hint_unmark): New static function.
5160 (class_hint_flags): Use them.
5162 2000-04-05 Benjamin Kosnik <bkoz@cygnus.com>
5164 * decl2.c: Make flag_honor_std dependant on ENABLE_STD_NAMESPACE.
5166 2000-04-05 Mark Mitchell <mark@codesourcery.com>
5168 * cp-tree.h (instantiate_decl): Change prototype.
5169 * decl2.c (mark_used): Adjust call.
5170 * optimize.c (inlinable_function_p): Adjust handling of templates.
5171 * pt.c (do_decl_instantiation): Adjust call to instantiate_decl.
5172 (do_type_instantiation): Likewise.
5173 (instantiate_decl): Defer more templates.
5174 (instantiate_pending_templates): Adjust logic to handle inline
5177 * Makefile.in (GGC_H): New variable. Use it throughout in place
5180 * call.c: Don't include obstack.h. Include ggc.h.
5181 (obstack_chunk_alloc): Don't define.
5182 (obstack_chunk_free): Likewise.
5183 (add_candidate): Allocate the z_candidate with ggc_alloc_obj.
5184 * decl.c (push_switch): Use xmalloc to allocate the cp_switch.
5185 (pop_switch): Free it.
5187 * decl2.c (grokclassfn): Set TREE_READONLY for PARM_DECLs.
5189 * dump.c (dequeue_and_dump): Don't try to print the bit_position
5190 if we don't have a DECL_FIELD_OFFSET.
5192 Wed Apr 5 15:12:18 MET DST 2000 Jan Hubicka <jh@suse.cz>
5194 * optimize.c (calls_setjmp_r): Use setjmp_call_p instead of
5197 2000-04-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5199 * cfns.gperf (hash, libc_name_p): Prototype.
5201 * rtti.c (build_dynamic_cast_1): Constification.
5203 * search.c (dfs_debug_unmarkedp, dfs_debug_mark): Unhide prototypes.
5205 * semantics.c (deferred_type_access_control): Prototype.
5207 2000-04-04 Mark Mitchell <mark@codesourcery.com>
5209 Correct many new ABI issues regarding vbase and vcall offset
5211 * cp-tree.h (BINFO_VTABLE): Document.
5212 (struct lang_type): Tweak formatting.
5213 (BINFO_PRIMARY_BINFO): Add to documentation.
5214 (CLASSTYPE_VSIZE): Fix typo in comment.
5215 (CLASSTYPE_VBASECLASSES): Update documentation.
5216 (BINFO_VBASE_MARKED): Remove.
5217 (SET_BINFO_VBASE_MARKED): Likewise.
5218 (CLEAR_BINFO_VBASE_MARKED): Likewise.
5219 (BINFO_FIELDS_MARKED): Remove.
5220 (SET_BINFO_FIELDS_MARKED): Likewise.
5221 (CLEAR_BINFO_FIELDS_MARKED): Likewise.
5222 (enum access_kind): New enumeration.
5223 (num_extra_vtbl_entries): Remove declaration.
5224 (size_extra_vtbl_entries): Likewise.
5225 (get_vtbl_decl_for_binfo): New function.
5226 (dfs_vbase_unmark): Remove declaration.
5227 (mark_primary_bases): Likewise.
5228 * class.c (SAME_FN): Remove.
5229 (struct vcall_offset_data_s): Move definition.
5230 (build_vbase_pointer): Use `build', not `build_binary_op', to
5231 access the vbase pointer under the new ABI.
5232 (build_vtable_entry_ref): Use get_vtbl_decl_for_binfo.
5233 (build_primary_vtable): Likewise.
5234 (dfs_mark_primary_bases): Move here from search.c.
5235 (mark_primary_bases): Likewise.
5236 (determine_primary_bases): Under the new ABI, don't make a base
5237 class a primary base just because we don't yet have any virtual
5239 (layout_vtable_decl): Use get_vtbl_decl_for_binfo.
5240 (num_vfun_entries): Remove.
5241 (dfs_count_virtuals): Likewise.
5242 (num_extra_vtbl_entries): Likewise.
5243 (size_extra_vtbl_entries): Likewise.
5244 (layout_virtual_bases): Iterate in inheritance graph order under
5246 (finish_struct_1): Use TYPE_VFIELD, not CLASSTYPE_VSIZE, to
5247 indicate that a vfield is present.
5248 (init_class_processing): Initialize access_public_node, etc., from
5250 (get_vtbl_decl_for_binfo): New function.
5251 (dump_class_hierarchy_r): Likewise.
5252 (dump_class_hierarchy): Use it.
5253 (finish_vtbls): Build the vtbls in inheritance graph order.
5254 (dfs_finish_vtbls): Adjust call to build_vtbl_initializer.
5255 (initialize_vtable): Use get_vtbl_decl_for_binfo.
5256 (accumulate_vtbl_inits): Add comments explaining why a pre-order
5258 (dfs_accumulate_vtbl_inits): Set BINFO_VTABLE to the location
5259 where the vptr points, even for primary vtables.
5260 (build_vtbl_initializer): Adjust handling of vbase and vcall
5262 (build_vcall_and_vbase_vtable_entries): New function.
5263 (dfs_build_vbase_offset_vtbl_entries): Remove.
5264 (build_vbase_offset_vtbl_entries): Reimplement.
5265 (dfs_build_vcall_offset_vtbl_entries): Don't include virtuals that
5266 were already handled in a primary base class vtable.
5267 (build_vcall_offset_vtbl_entries): Adjust.
5268 (build_rtti_vtbl_entries): Adjust.
5269 * decl2.c (output_vtable_inherit): Use get_vtbl_decl_for_binfo.
5270 * init.c (expand_virtual_init): Simplify.
5271 * repo.c (repo_get_id): Use get_vtbl_decl_for_binfo.
5272 * rtti.c (create_pseudo_type_info): Adjust calculation of vptr.
5273 * search.c (BINFO_ACCESS): New macro.
5274 (SET_BINFO_ACCESS): Likewise.
5275 (dfs_access_in_type): Manipulate access_kinds, not access nodes.
5276 (access_in_type): Likewise.
5277 (dfs_accessible_p): Likewise.
5278 (protected_accessible_p): Likewise.
5279 (lookup_fnfields_1): Adjust documentation.
5280 (dfs_mark_primary_bases): Move to class.c
5281 (mark_primary_bases): Likewise.
5282 (dfs_vbase_unmark): Remove.
5283 (virtual_context): Use BINFO_FOR_VBASE.
5284 (dfs_get_vbase_types): Simplify.
5285 (dfs_build_inheritance_graph_order): New function.
5286 (get_vbase_types): Use it.
5287 * tree.c (debug_binfo): Use get_vtbl_decl_for_binfo.
5289 * tinfo.cc (get_vbase_offset): New function.
5290 (__vmi_class_type_info::do_find_public_src): Use it.
5291 (__vmi_class_type_info::do_dyncast): Likewise.
5292 (__vmi_class_type_info::do_upcast): Likewise.
5294 2000-04-03 Zack Weinberg <zack@wolery.cumb.org>
5296 * lang-specs.h: Pass -fno-show-column to the preprocessor.
5298 2000-03-30 Nathan Sidwell <nathan@codesourcery.com>
5300 * rtti.c (class_hint_flags): Rename flags.
5301 (class_initializer): Remove flags.
5302 (synthesize_tinfo_var): Combine offset and flags. Add flags
5303 for __vmi_class_type_info.
5304 (create_tinfo_types): Remove flags from __class_type_info and
5305 __si_class_type_info. Merge flags and offset from
5306 base_class_type_info.
5307 * inc/cxxabi.h (__base_class_info): Merge offset and vmi_flags.
5308 (__base_class_info::is_virtual_p): Adjust.
5309 (__base_class_info::is_public_p): Adjust.
5310 (__base_class_info::offset): New accessor.
5311 (__class_type_info::details): Remove member.
5312 (__class_type_info::__class_type_info): Lose details.
5313 (__class_type_info::detail_masks): Remove.
5314 (__si_class_type_info::__si_class_type_info): Lose details.
5315 (__vmi_class_type_info::details): New member.
5316 (__vmi_class_type_info::__vmi_class_type_info): Adjust.
5317 (__vmi_class_type_info::detail_masks): New member.
5318 * tinfo.cc (__class_type_info::do_upcast): Initialize result
5319 with unknown_details_mask.
5320 (__vmi_class_type_info::do_find_public_src): Adjust
5321 (__vmi_class_type_info::do_dyncast): Adjust.
5322 (__vmi_class_type_info::do_upcast): Set result details, if
5324 (__dynamic_cast): Temporarily #if out optimization.
5326 2000-03-29 Nathan Sidwell <nathan@codesourcery.com>
5328 * rtti.c (get_tinfo_decl): Mark used.
5329 (emit_tinfo_decl): Don't optimize polymorphic type_info. Only
5330 mark as dealt with, if we output it.
5332 2000-03-28 Mark Mitchell <mark@codesourcery.com>
5334 * class.c: Reorganize to put virtual function table initialization
5335 machinery at the end of the file.
5337 2000-03-28 Jason Merrill <jason@casey.cygnus.com>
5339 * class.c (finish_struct): Use bitsize_zero_node.
5340 * pt.c (instantiate_class_template): Likewise.
5342 2000-03-28 Mark Mitchell <mark@codesourcery.com>
5344 Put RTTI entries at negative offsets in new ABI.
5345 * class.c (dfs_build_vbase_offset_vtbl_entries): Put the first
5346 vbase offset at index -3, not -1.
5347 (build_vtabe_offset_vtbl_entries): Use unmarked_vtable_pathp, not
5348 dfs_vtable_path_unmarked_real_bases_queue_p to walk bases.
5349 (dfs_build_vcall_offset_vtbl_entries): Don't use skip_rtti_stuff.
5350 (build_rtti_vtbl_entries): New function.
5351 (set_rtti_entry): Remove.
5352 (build_primary_vtable): Don't use it.
5353 (build_secondary_vtable): Likewise.
5354 (start_vtable): Remove.
5355 (first_vfun_index): New function.
5356 (set_vindex): Likewise.
5357 (add_virtual_function): Don't call start_vtable. Do call
5359 (set_primary_base): Rename parameter.
5360 (determine_primary_base): Likewise.
5361 (num_vfun_entries): Don't use skip_rtti_stuff.
5362 (num_extra_vtbl_entries): Include RTTI information.
5363 (build_vtbl_initializer): Use build_rtti_vtbl_entries.
5364 (skip_rtti_stuff): Remove.
5365 (dfs_modify_vtables): Don't use it.
5366 (modify_all_vtables): Don't use start_vtable. Do use set_vindex.
5367 (layout_nonempty_base_or_field): Update size handling.
5368 (create_vtable_ptr): Tweak.
5369 (layout_class_type): Adjust parameter names.
5370 (finish_struct_1): Simplify.
5371 * cp-tree.h (CLASSTYPE_VSIZE): Tweak documentation.
5372 (skip_rtti_stuff): Remove.
5373 (first_vfun_index): New function.
5374 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
5375 (dfs_vtable_path_marked_real_bases_queue_p): Remove.
5376 (marked_vtable_pathp): Declare.
5377 (unmarked_vtable_pathp): Likewise.
5378 * error.c (dump_expr): Use first_vfun_index to calculate vtable
5380 * rtti.c (build_headof): Look for RTTI at negative offsets.
5381 (get_tinfo_decl_dynamic): Likewise.
5382 (tinfo_base_init): Don't take the address of the TINFO_VTABLE_DECL
5384 (create_pseudo_type_info): Do it here instead. Adjust so that
5385 vptr points at first virtual function.
5386 * search.c (marked_vtable_pathp): Make it global.
5387 (unmarked_vtable_pathp): Likewise.
5388 (dfs_vtable_path_unmarked_real_bases_queue_p): Remove.
5389 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
5390 (dfs_get_pure_virtuals): Don't use skip_rtti_stuff.
5391 (get_pure_virtuals): Likewise.
5392 (expand_upcast_fixups): Likewise.
5393 * tree.c (debug_binfo): Likewise.
5394 * tinfo.cc (__dynamic_cast): Look for vtable_prefix at appropriate
5397 Sun Mar 26 20:15:26 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5399 * class.c (check_field_decl): Fix typo.
5400 (build_vtbl_or_vbase_field): Don't clear DECL_SAVED_INSNS.
5401 (check_methods): Likewise.
5402 (check_field_decls): Likewise.
5403 Use DECL_CONTEXT, not DECL_FIELD_CONTEXT.
5404 * cp-tree.h (DECL_SHADOWED_FOR_VAR, DECL_TEMPLATE_RESULT):
5405 Use DECL_RESULT_FLD, not DECL_RESULT.
5406 * decl.c (xref_tag): Use DECL_TEMPLATE_RESULT.
5407 * lex.c (identifier_type): Likewise.
5408 * pt.c (determine_specialization, lookup_template_class): Likewise.
5409 (tsubst_friend_function, tsubst_decl, instantiate_template): Likewise.
5410 (resolve_overloaded_unification, more_specialized): Likewise.
5411 * semantics.c (finish_member_declaration): Likewise.
5412 * typeck.c (build_x_function_call): Likewise.
5414 2000-03-26 Mark Mitchell <mark@codesourcery.com>
5416 * class.c (layout_empty_base): Handle empty bases with non-byte
5418 (build_base_field): Likewise.
5419 (layout_virtual_bases): Likewise.
5421 * class.c (finish_struct_1): Fix typo in this change:
5423 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5425 2000-03-25 Mark Mitchell <mark@codesourcery.com>
5427 * decl.c (grokdeclarator): Count partial specializations when
5428 keeping track of how many template classes have been seen.
5430 * dump.c (dequeue_and_dump): Dump DECL_TEMPLATE_RESULT.
5432 Sat Mar 25 09:12:10 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5434 * class.c (build_vbase_pointer_fields): layout_field now place_field.
5435 (get_vfield_offset): Use byte_position.
5436 (set_rtti_entry): Set OFFSET to ssizetype zero.
5437 (get_binfo_offset_as_int): Deleted.
5438 (dfs_record_base_offsets): Use tree_low_cst.
5439 (dfs_search_base_offsets): Likewise.
5440 (layout_nonempty_base_or_field): Reflect changes in RLI format
5441 and call byte_position.
5442 (layout_empty_base): Convert offset to ssizetype.
5443 (build_base_field): use rli_size_unit_so_far.
5444 (dfs_propagate_binfo_offsets): Do computation in proper type.
5445 (layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
5446 (layout_class_type): Reflect changes in RLI names and fields.
5447 (finish_struct_1): Set DECL_FIELD_OFFSET.
5448 * dump.c (dequeue_and_dump): Call bit_position.
5449 * expr.c (cplus_expand_constant): Use byte_position.
5450 * rtti.c (expand_class_desc): Use bitsize_one_node.
5451 * typeck.c (build_component_addr): Use byte_position and don't
5452 special case for zero offset.
5454 2000-03-24 Nathan Sidwell <nathan@codesourcery.com>
5456 * decl.c (vtype_decl_p): Use TYPE_POLYMORPHIC_P.
5458 * rtti.c (get_tinfo_decl): Set comdat linkage on new-abi
5460 (emit_tinfo_decl): Only emit polymorphic tinfo's when emitting
5463 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5465 * call.c (check_dtor_name, build_new_method_call): Use TYPE_P and
5467 * decl.c (push_class_binding, poplevel, pushtag, lookup_namespace_name,
5468 make_typename_type, check_initializer, cp_finish_decl,
5469 xref_tag): Likewise.
5470 * decl2.c (grokfield, build_expr_from_tree, build_expr_from_tree,
5471 decl_namespace, arg_assoc_template_arg, arg_assoc,
5472 validate_nonmember_using_decl, do_class_using_decl): Likewise.
5473 * error.c (dump_template_argument, dump_expr, cp_file_of, cp_line_of,
5474 args_to_string): Likewise.
5475 * friend.c (is_friend): Likewise.
5476 * lex.c (note_got_semicolon, note_list_got_semicolon,
5477 is_global): Likewise.
5478 * method.c (build_overload_nested_name, build_overload_value,
5479 build_qualified_name, build_qualified_name, hack_identifier): Likewise.
5480 * parse.y (typename_sub, typename_sub1): Likewise.
5481 * pt.c (push_inline_template_parms_recursive, check_template_shadow,
5482 process_partial_specialization, convert_template_argument,
5483 template_args_equal, add_pending_template, lookup_template_class,
5484 for_each_template_parm_r, maybe_fold_nontype_arg,
5485 tsubst, instantiate_template, type_unification_real, unify,
5486 instantiate_pending_templates, set_mangled_name_for_template_decl):
5488 * repo.c (repo_get_id, repo_template_used): Likewise.
5489 * search.c (lookup_field_1): Likewise.
5490 * tree.c (walk_tree, get_type_decl, cp_tree_equal, member_p): Likewise.
5491 * xref.c (classname): Likewise.
5493 2000-03-22 Mark Mitchell <mark@codesourcery.com>
5495 * cp-tree.h (BINFO_FOR_VBASE): Adjust documentation.
5496 (CANONICAL_BINFO): New macro.
5497 (BINFO_NEW_VTABLE_MARKED): Use it.
5498 (SET_BINFO_NEW_VTABLE_MARKED): Likewise.
5499 (CLEAR_BINFO_NEW_VTABLE_MARKED): Likewise.
5500 * class.c (dfs_build_vbase_offset_vtbl_entries): Use BINFO_TYPE,
5502 (build_primary_vtable): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5503 (build_secondary_vtable): Likewise.
5504 (dfs_finish_vtbls): Likewise.
5505 (dfs_accumulate_vtbl_inits): Likewise.
5506 (accumulate_vtbl_inits): New function.
5507 (finish_vtbls): Make sure that virtual bases come after
5508 non-virtual bases in the vtable group.
5509 (record_base_offsets): Don't save and restore TREE_VIA_VIRTUAL.
5510 (finish_struct_1): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5511 * search.c (struct vbase_info): Move definition.
5512 (marked_new_vtable_p): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5513 (unmarked_new_vtable_p): Likewise.
5514 (dfs_mark_vtable_path): Remove.
5515 (dfs_mark_new_vtable): Remove.
5516 (dfs_unmark_new_vtable): Likewise.
5517 (dfs_clear_search_slot): Likewise.
5518 (dfs_find_vbases): Adjust usage of BINFO_NEW_VTABLE_MARKED.
5519 (dfs_clear_vbase_slots): Likewise.
5520 (init_vbase_pointers): LIkewise.
5522 2000-03-22 Jason Merrill <jason@casey.cygnus.com>
5524 * typeck.c (type_after_usual_arithmetic_conversions): Prefer a
5525 SIZETYPE to a non-SIZETYPE.
5527 2000-03-21 Mark Mitchell <mark@codesourcery.com>
5529 * class.c (layout_virtual_bases): Adjust names in conditionally
5532 * class.c (record_base_offsets): New function.
5533 (layout_conflict_p): Likewise.
5534 (layout_nonempty_base_or_field): Use it.
5535 (layout_empty_base): New function.
5536 (build_base_field): Use it.
5537 (build_base_fields): Update comment.
5538 (layout_virtual_bases): Fold in a little code form
5539 layout_basetypes. Use layout_empty_base.
5540 (layout_basetypes): Remove.
5541 (end_of_class): New function.
5542 (layout_class_type): Use it. Adjust.
5544 * cp-tree.h (CLASSTYPE_VBASECLASSES): Fix typo in comment.
5546 * search.c (dfs_skip_nonprimary_vbases_unmarkedp): Fix typo in
5548 (dfs_skip_nonprimary_vbases_markedp): Likewise.
5549 * typeck.c (fntype_p): Remove.
5551 * cp-tree.h (TI_SPEC_INFO): Remove.
5552 (CLASSTYPE_TI_SPEC_INFO): Likewise.
5553 * pt.c (process_partial_specialization): Likewise.
5555 * class.c (build_base_field): Fix thinko in computation of binfo
5558 * tree.c (mark_local_for_remap_p): Mark variables declared in
5559 TARGET_EXPRs as well.
5561 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
5563 * typeck.c (require_complete_type, complete_type,
5564 complete_type_or_else, c_sizeof, c_sizeof_nowarn,
5565 build_array_ref, convert_arguments, pointer_diff,
5566 build_x_unary_op, build_unary_op, build_c_cast,
5567 build_modify_expr): Use COMPLETE_TYPE_P etc.
5568 * call.c (is_complete, convert_like_real,
5569 build_new_method_call): Likewise.
5570 * class.c (build_vbase_pointer_fields, check_bases,
5571 build_base_field, finish_struct_1, pushclass): Likewise.
5572 * cvt.c (cp_convert_to_pointer, convert_to_void): Likewise.
5573 * decl.c (maybe_process_template_type_declaration, pushtag,
5574 pushdecl, redeclaration_error_message, start_decl, start_decl_1,
5575 layout_var_decl, check_initializer, cp_finish_decl,
5576 grokdeclarator, require_complete_types_for_parms,
5577 grok_op_properties, xref_tag, xref_basetypes,
5578 check_function_type): Likewise.
5579 * decl2.c (check_classfn, reparse_absdcl_as_casts): Likewise.
5580 * friend.c (do_friend): Likewise.
5581 * init.c (build_offset_ref): Likewise.
5582 * parse.y (structsp): Likewise.
5583 * pt.c (maybe_process_partial_specialization,
5584 tsubst_friend_function, instantiate_class_template, tsubst,
5585 do_type_instantiation, instantiate_pending_templates): Likewise.
5586 * repo.c (repo_get_id): Likewise.
5587 * rtti.c (build_typeid, get_typeid, build_dynamic_cast_1,
5588 synthesize_tinfo_var, emit_support_tinfos): Likewise.
5589 * search.c (lookup_fnfields_1, lookup_conversions): Likewise.
5590 * semantics.c (begin_class_definition): Likewise.
5591 * tree.c (build_cplus_method_type): Likewise.
5592 * typeck2.c (digest_init, build_functional_cast,
5593 add_exception_specifier): Likewise.
5594 * parse.h, parse.c: Regenerated.
5596 2000-03-21 Nathan Sidwell <nathan@codesourcery.com>
5598 * inc/cxxabi.h: New header file. Define new-abi entry points.
5599 (__pointer_type_info::target): Rename member to ...
5600 (__pointer_type_info::type): ... here.
5601 (__base_class_info::type): Rename member to ...
5602 (__base_class_info::base): ... here.
5603 * Make-lang.in (CXX_EXTRA_HEADERS): Add cxxabi.h
5604 * cp-tree.h (CPTI_ABI): New global tree enumeration.
5605 (abi_node): New global tree node.
5606 * decl.c (abi_node): Document.
5607 (init_decl_processing): Initialize abi_node.
5608 * rtti.c (build_dynamic_cast_1): Use abi_node for new-abi.
5609 (get_vmi_pseudo_type_info): Likewise.
5610 (create_tinfo_types): Likewise.
5611 (emit_support_tinfos): Likewise.
5612 * tinfo.h (cxxabi.h): Include for new-abi.
5613 Move rtti class definitions to new header file.
5614 * tinfo.cc (abi): Use the namespace.
5615 (std): Move new abi rtti classes from here ...
5616 (__cxxabiv1): ... to here.
5617 * tinfo2.cc (cxxabi.h): Include for new-abi.
5618 Move rtti class definitions to new header file.
5619 (std): Move new abi rtti classes from here ...
5620 (__cxxabiv1): ... to here.
5621 * inc/typeinfo (__class_type_info): Move into __cxxabiv1
5624 2000-03-20 Jed Wing <jedwin@zloty.ugcs.caltech.edu>
5625 Jason Merrill <jason@casey.cygnus.com>
5627 * method.c (build_overload_int): Use host_integerp.
5629 2000-03-20 Theodore Papadopoulo <Theodore.Papadopoulo@sophia.inria.fr>
5631 * init.c (build_offset_ref): Handle the case of a templated member
5634 2000-03-19 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5636 * except.c (expand_exception_blocks): Clear catch_clauses_last.
5638 2000-03-18 Mark Mitchell <mark@codesourcery.com>
5640 * cp-tree.h (CLEAR_DECL_C_BIT_FIELD): New macro.
5641 * class.c (check_bitfield_decl): Turn illegal bitfields into
5643 (dfs_propagate_binfo_offsets): Adjust for new size_binop
5645 (dfs_offset_for_unshared_vbases): Likewise.
5646 * cvt.c (cp_convert_to_pointer): Convert NULL to a
5647 pointer-to-member correctly under the new ABI.
5648 * expr.c (cplus_expand_constant): Don't use cp_convert when
5649 turning an offset into a pointer-to-member.
5650 * init.c (resolve_offset_ref): Don't adjust pointers-to-members
5651 when dereferencing them under the new ABI.
5652 * typeck.c (get_member_function_from_ptrfunc): Tweak calculation
5653 of pointers-to-members under the new ABI.
5655 * class.c (check_bitfield_decl): Remove restriction on really long
5657 (layout_class_type): Implement new ABI handling of bitfields
5658 longer than their types.
5660 2000-03-18 Martin v. Löwis <loewis@informatik.hu-berlin.de>
5662 * parse.y (extdefs): Call ggc_collect.
5663 * parse.c: Regenerated.
5665 2000-03-18 Nathan Sidwell <nathan@codesourcery.com>
5667 * class.c (build_base_field): Use TYPE_ALIGN to examine a type.
5668 (note_name_declared_in_class): Use OVL_CURRENT to get at a
5671 Fri Mar 17 08:09:14 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5673 * class.c (build_vbase_path): Use integer_zerop.
5674 (build_vtable_entry): Use tree_low_cst.
5675 (get_vfield_offset): Use bit_position.
5676 (dfs_modify_vtables): New variable vindex_val; `i' is HOST_WIDE_INT.
5678 (check_bitfield_decl): Set DECL_SIZE using convert.
5679 (build_base_field): Set DECL_SIZE and DECL_SIZE_UNIT using size_binop.
5680 (layout_virtual_bases): DSIZE is unsigned HOST_WIDE_INT.
5682 (finish_struct_1): Use bit_position.
5683 (dump_class_hierarchy): Use tree_low_cst.
5684 * cp-tree.h (min_precision): Add declaration.
5685 * decl.c (xref_tag, xref_basetypes): Use tree_low_cst.
5686 * error.c (dump_type_suffix): Use host_integerp and tree_low_cst.
5687 (dump_expr): Use integer_zerop, host_integerp, and tree_low_cst.
5688 * expr.c (cplus_expand_constant): Use bit_position.
5689 * init.c (build_vec_init): Use host_integerp and tree_low_cst.
5690 * rtti.c (get_base_offset): Use bit_position.
5691 * typeck.c (build_binary_op): Use integer_zerop, compare_tree_int,
5692 host_integerp, and tree_low_cst.
5693 (pointer_int_sum): Use integer_zerop.
5694 (build_component_addr): Use bit_position.
5696 2000-03-17 Nathan Sidwell <nathan@codesourcery.com>
5698 * typeck.c (require_complete_type): Don't assume size_zero_node.
5699 (complete_type_or_else): Likewise.
5701 2000-03-16 Steven Grady <grady@digitaldeck.com>
5702 Jason Merrill <jason@casey.cygnus.com>
5704 * rtti.c (build_dynamic_cast_1): Improve diagnostics.
5706 2000-03-16 Nathan Sidwell <nathan@codesourcery.com>
5708 * decl2.c (grokfield): Bail out if type is error_mark_node.
5710 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
5712 * tinfo2.cc (__ptr_to_member_data): Rename to ...
5713 (__pointer_to_member_data): ... here. Adjust.
5714 * rtti.c (create_tinfo_types): Adjust.
5716 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
5718 * cp-tree.h (CPTI_REF_DESC_TYPE, ref_desc_type_node): Remove.
5719 * decl.c (ref_desc_type_node): Undocument.
5720 * rtti.c (ptr_ref_initializer): Rename to ...
5721 (ptr_initializer): ... here. Adjust comments.
5722 (ptmd_initializer): Fix comment thinko.
5723 (synthesize_tinfo_var): Remove REFERENCE_TYPE case.
5724 (create_tinfo_types): Remove ref_desc_type_node init.
5725 * tinfo2.cc (__reference_type_info): Remove.
5727 2000-03-15 Nathan Sidwell <nathan@codesourcery.com>
5729 * decl.c (cp_finish_decl): Remove obsolete comment.
5731 * typeck.c (build_ptrmemfunc1): Kill uninitialized warning.
5733 2000-03-14 Mark Mitchell <mark@codesourcery.com>
5735 * cp-tree.h: Tweak documentation.
5736 * class.c (build_vbase_pointer_fields): Layout the fields, too.
5737 (avoid_overlap): Remove.
5738 (get_binfo_offset_as_int): New function.
5739 (dfs_serach_base_offsets): Likewise.
5740 (layout_nonempty_base_or_field): Likewise.
5741 (build_base_field): Layout fields here. Avoid placing two objects
5742 of the same type at the same address, under the new ABI.
5743 (build_base_fields): Adjust accordingly.
5744 (create_vtable_ptr): Return the new field, but don't attach it to
5746 (remove_base_field): Remove.
5747 (remove_base_fields): Remove.
5748 (layout_basetypes): Adjust accordingly.
5749 (layout_class_type): Call layout_field for each field, rather than
5750 just making a wholesale call to layout_type.
5752 2000-03-14 Jeff Sturm <jsturm@sigma6.com>
5754 * except.c (expand_throw): Fix typo in _Jv_Sjlj_Throw.
5756 2000-03-13 Jason Merrill <jason@casey.cygnus.com>
5758 * decl.c (grokfndecl): Set TREE_NOTHROW if TYPE_NOTHROW_P.
5760 * except.c (dtor_nothrow): New fn.
5761 (do_pop_exception): Use it. Take type parm.
5762 (push_eh_cleanup): Take type parm.
5763 (expand_start_catch_block): Pass it.
5764 (build_eh_type_type_ref): Accept null type.
5766 2000-03-12 Mark Mitchell <mark@codesourcery.com>
5768 * cp-tree.h (revert_static_member_fn): Change prototype.
5769 * decl.c (grokfndecl): Adjust call to revert_static_member_fn.
5770 (grok_op_properties): Likewise.
5771 (start_function): Likewise.
5772 (revert_static_member_fn): Simplify.
5773 * pt.c (check_explicit_specialization): Adjust call to
5774 revert_static_member_fn.
5776 2000-03-11 Mark Mitchell <mark@codesourcery.com>
5778 * cp-tree.h (scope_kind): New type.
5779 (tmpl_spec_kind): Likewise.
5780 (declare_pseudo_global_level): Remove.
5781 (pseudo_global_level_p): Rename to template_parm_scope_p.
5782 (pushlevel): Remove declaration.
5783 (begin_scope): New function.
5784 (finish_scope): Likewise.
5785 (current_tmpl_spec_kind): Likewise.
5786 * decl.c (struct binding_level): Shorten parm_flag to 2 bits.
5787 Shorten keep to 2 bits. Rename pseudo_global to template_parms_p.
5788 Add template_spec_p.
5789 (toplevel_bindings_p): Adjust.
5790 (declare_pseudo_global_level): Remove.
5791 (pseudo_global_level_p): Rename to template_parm_scope_p.
5792 (current_tmpl_spec_kind): New function.
5793 (begin_scope): Likewise.
5794 (finish_scope): Likewise.
5795 (maybe_push_to_top_level): Adjust.
5796 (maybe_process_template_type_declaration): Likewise.
5797 (pushtag): Likewise.
5798 (pushdecl_nonclass_level): Likewise.
5799 (lookup_tag): Likewise.
5800 (grokfndecl): Handle member template specializations. Share
5801 constructor and non-constructor code.
5802 * decl2.c (check_classfn): Handle member template specializations.
5803 * pt.c (begin_template_parm_list): Use begin_scope.
5804 (begin_specialization): Likewise.
5805 (end_specialization): Likewise.
5806 (check_explicit_specialization): Use current_tmpl_spec_kind.
5807 Handle member template specializations.
5808 (end_template_decl): Use finish_scope. Remove call to
5810 (push_template_decl_real): Remove bogus error message.
5811 (tsubst_decl): Fix typo in code contained in comment.
5812 (instantiate_template): Handle member template specializations.
5813 (most_general_template): Likewise.
5815 2000-03-11 Gabriel Dos Reis <gdr@codesourcery.com>
5817 * lex.c (whitespace_cr): Compress consecutive calls to warning().
5818 (do_identifier): Ditto for error().
5820 * pt.c (convert_nontype_argument): Ditto for cp_error().
5821 (convert_template_argument): Ditto for cp_pedwarn().
5823 2000-03-11 Jason Merrill <jason@casey.cygnus.com>
5825 * exception.cc (__check_null_eh_spec): New fn.
5826 * except.c (expand_end_eh_spec): Call it if the spec is throw().
5828 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
5830 * decl.c (push_throw_library_fn): Take the FUNCTION_TYPE.
5831 * except.c (expand_end_eh_spec): Add the return type.
5832 * rtti.c (throw_bad_cast): Add the parmtypes.
5833 (throw_bad_typeid): Likewise.
5835 * semantics.c (expand_stmt): Only leave out rtl for unused
5836 artificials, and set DECL_IGNORED_P on them as well.
5837 * decl.c (wrapup_globals_for_namespace): Likewise.
5839 2000-03-09 Nathan Sidwell <nathan@codesourcery.com>
5841 * decl.c (maybe_commonize_var): Skip all artificial decls.
5842 * pt.c (tsubst_decl): Don't copy TREE_ASM_WRITTEN.
5844 2000-03-10 Jason Merrill <jason@casey.cygnus.com>
5846 * lang-options.h, decl2.c: Add -fno-enforce-eh-specs.
5847 * cp-tree.h: Declare flag_enforce_eh_specs.
5848 * decl.c (store_parm_decls, finish_function): Check it.
5850 C library functions don't throw.
5851 * Makefile.in (cfns.h): New target.
5852 (except.o): Depend on it.
5853 * Make-lang.in (cc1plus): Depend on cfns.gperf.
5854 * cfns.gperf: New file.
5855 * cfns.h: Generated.
5856 * except.c: Include it.
5857 (nothrow_libfn_p): New fn.
5858 * decl.c (grokfndecl): Use it.
5859 * cp-tree.h: Declare it.
5861 * decl.c (push_overloaded_decl_1, auto_function,
5862 define_function): Lose.
5863 (build_library_fn_1): New static fn.
5864 (builtin_function): Use it.
5865 (get_atexit_node): Use build_library_fn_ptr.
5866 (build_library_fn, build_cp_library_fn, build_library_fn_ptr,
5867 build_cp_library_fn_ptr, push_library_fn, push_cp_library_fn,
5868 push_void_library_fn, push_throw_library_fn): New fns.
5869 * cp-tree.h: Declare them.
5870 (cp_tree_index): Remove CPTI_BAD_CAST, CPTI_BAD_TYPEID.
5871 (throw_bad_cast_node, throw_bad_typeid_node): Lose.
5872 * except.c (init_exception_processing, call_eh_info, do_pop_exception,
5873 (expand_end_eh_spec, alloc_eh_object, expand_throw): Use above fns.
5874 * rtti.c (build_runtime_decl): Lose.
5875 (throw_bad_cast, throw_bad_typeid, get_tinfo_decl,
5876 build_dynamic_cast_1, expand_si_desc, expand_class_desc,
5877 expand_ptr_desc, expand_attr_desc, expand_generic_desc): Use above fns.
5879 * call.c (build_call): Remove result_type parm.
5880 Call mark_used on unused artificial fns.
5881 * init.c, method.c, typeck.c, except.c, rtti.c: Adjust.
5883 2000-03-09 Jason Merrill <jason@casey.cygnus.com>
5885 * call.c (build_call): Set TREE_NOTHROW on the CALL_EXPR as
5887 * decl.c (define_function): Set TREE_NOTHROW on the FUNCTION_DECL.
5888 * except.c (call_eh_info, alloc_eh_object, expand_throw): Set
5889 TREE_NOTHROW or TREE_THIS_VOLATILE on the function as appropriate.
5890 * rtti.c (build_runtime_decl, get_tinfo_decl, build_dynamic_cast_1,
5891 expand_si_desc, expand_class_desc, expand_ptr_desc, expand_attr_desc,
5892 expand_generic_desc): Likewise.
5894 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
5896 * exception.cc (__cp_pop_exception): Cleanup the original object.
5898 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
5900 * decl.c (grok_op_properties): Merge conversion to void warning
5901 with other silly op warnings.
5903 2000-03-08 Jason Merrill <jason@casey.cygnus.com>
5905 * typeck2.c (process_init_constructor): Set TREE_PURPOSE of
5906 array CONSTRUCTOR elements. Don't use expr_tree_cons.
5908 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
5910 * decl.c (cp_make_fname_decl): New function.
5911 (wrapup_globals_for_namespace): Don't emit unused static vars.
5912 (init_decl_processing): Remove comment about use of
5913 array_domain_type. Set make_fname_decl.
5914 (cp_finish_decl): Remove __FUNCTION__ nadgering.
5915 * semantics.c (begin_compound_stmt): Remove
5916 current_function_name_declared flagging.
5917 (expand_stmt): Don't emit unused local statics.
5918 * typeck.c (decay_conversion): Don't treat __FUNCTION__ decls
5921 2000-03-08 Nathan Sidwell <nathan@codesourcery.com>
5923 * typeck.c (convert_for_assignment): Don't look at array
5925 * call.c (convert_like_real): Likewise.
5927 2000-03-07 Jason Merrill <jason@casey.cygnus.com>
5929 Add initial support for '\uNNNN' specifier.
5930 * lex.c (read_ucs): New fn.
5931 (readescape, skip_white_space): Call it.
5932 (is_extended_char, is_extended_char_1): New fns.
5933 (utf8_extend_token): New fn, #if 0'd out.
5934 (real_yylex): Treat extended chars like letters.
5936 * search.c (note_debug_info_needed): Walk the bases even if we
5937 weren't deferring the type itself.
5939 2000-03-07 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
5941 * decl2.c (finish_objects): Constify a char*.
5943 * method.c (emit_thunk): Likewise.
5945 2000-03-06 Nathan Sidwell <nathan@codesourcery.com>
5947 * typeck.c (dubious_conversion_warnings): Look through
5950 Mon Mar 6 08:46:47 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
5952 * class.c (dfs_modify_vtables): I is now unsigned.
5953 (check_bitfield_decl): Use tree_int_cst_sgn and compare_tree_int.
5954 (build_base_field): Add casts of TREE_INT_CST_LOW to HOST_WIDE_INT.
5955 * error.c (dump_expr): Cast TREE_INT_CST_HIGH to unsigned.
5956 * init.c (build_vec_init): Cast TREE_INT_CST_LOW to HOST_WIDE_INT.
5957 * method.c (build_overload_int): Cast TREE_INT_CST_HIGH to unsigned.
5958 * typeck.c (build_binary_op, case TRUNC_DIV_EXPR):
5959 Call integer_all_onesp.
5960 * typeck2.c (process_init_constructor): Use compare_tree_int.
5962 * lang-specs.h (as): Don't call if -syntax-only.
5964 2000-03-06 Mark Mitchell <mark@codesourcery.com>
5966 * expr.c (cplus_expand_expr, case STMT_EXPR): Don't set
5967 RTL_EXPR_HAS_NO_SCOPE after all.
5969 2000-03-05 Mark Mitchell <mark@codesourcery.com>
5971 * expr.c (cplus_expand_expr, case STMT_EXPR): Use
5972 expand_start_stmt_expr and expand_end_stmt_expr directly. Set
5973 RTL_EXPR_HAS_NO_SCOPE.
5975 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG a little
5978 * dump.c (dequeue_and_dump): Dump SCOPE_NO_CLEANUPS_P.
5980 2000-03-05 Nathan Sidwell <nathan@codesourcery.com>
5982 * call.c (convert_like): Macrofy.
5983 (convert_like_with_context): New macro.
5984 (convert_like_real): Renamed from convert_like. Add calling
5985 context parameters, for diagnostics. Add recursive flag. Call
5986 dubious_conversion_warnings for outer conversion.
5987 (build_user_type_conversion): Use convert_like_with_context.
5988 (build_over_call): Likewise. Don't warn about dubious
5989 conversions here. Adjust convert_default_arg calls.
5990 (convert_default_arg): Add context parameters for diagnostics.
5991 Pass throught to convert_like_with_context.
5992 * cp-tree.h (convert_default_arg): Add context parameters.
5993 (dubious_conversion_warnings): Prototype new function.
5994 * typeck.c (convert_arguments): Adjust convert_default_arg call.
5995 (dubious_conversion_warnings): New function, broken
5996 out of convert_for_assignment.
5997 (convert_for_assignment): Adjust.
5999 2000-03-03 Jason Merrill <jason@casey.cygnus.com>
6001 * decl2.c (key_method): Break out from...
6002 (import_export_vtable, import_export_class): ...here.
6004 * decl.c (finish_function): Don't mess with flag_keep_inline_functions.
6005 * decl2.c (finish_vtable_vardecl): Don't check decl_function_context.
6007 * search.c (note_debug_info_needed, dfs_debug_mark,
6008 dfs_debug_unmarkedp): Uncomment. Adjust for new scheme.
6009 * decl2.c (finish_vtable_vardecl): Call note_debug_info_needed.
6011 2000-03-03 Nathan Sidwell <nathan@codesourcery.com>
6013 * decl.c (cp_finish_decl): Remove obsolete obstack comments, fix
6016 2000-03-02 Mark Mitchell <mark@codesourcery.com>
6018 * cp-tree.h (TYPE_NEEDS_DESTRUCTOR): Rename to ...
6019 (TYPE_HAS_NONTRIVIAL_DESTRUCTOR): ... this.
6020 (TYPE_HAS_TRIVIAL_DESTRUCTOR): New macro.
6021 (lang_type): Split gets_new into has_new and has_array_new.
6022 (TYPE_VEC_NEW_USES_COOKIE): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6023 (TYPE_GETS_NEW): Split into ...
6024 (TYPE_HAS_NEW_OPERATOR): ... this, and ...
6025 (TYPE_HAS_ARRAY_NEW_OPERATOR): ... this.
6026 (DECL_ARRAY_DELETE_OPERATOR_P): New macro
6027 (build_op_new_call): Don't declare.
6028 (build_new_1): Likewise.
6029 * call.c (build_op_new_call): Remove.
6030 * class.c (check_bases): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
6031 instead of TYPE_NEEDS_DESTRUCTOR.
6032 (finish_struct_bits): Likewise.
6033 (add_implicitly_declared_members): Likewise.
6034 (check_field_decl): Likewise.
6035 (check_methods): Set TYPE_VEC_DELETE_TAKES_SIZE here, and set it
6036 correctly under the new ABI.
6037 * decl.c (start_decl_1): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR
6038 instead of TYPE_NEEDS_DESTRUCTOR.
6039 (initialize_local_var): Likewise.
6040 (destroy_local_var): Likewise.
6041 (cp_finish_decl): Likewise.
6042 (register_dtor_fn): Likewise.
6043 (grok_op_properties): Set TYPE_HAS_NEW_OPERATOR and
6044 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW. Don't set
6045 TYPE_VEC_DELETE_TAKES_SIZE here.
6046 (xref_basetypes): Set TYPE_HAS_NEW_OPERATOR and
6047 TYPE_HAS_ARRAY_NEW_OPERATOR, not TYPE_HAS_NEW.
6048 (store_parm_decls): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6049 (finish_destructor_body): Likewise.
6050 (maybe_build_cleanup_1): Likewise.
6051 * decl2.c (do_static_destruction): Likewise.
6052 * init.c (build_new_1): Make it static.
6053 (perform_member_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6054 (expand_cleanup_for_base): Likewise.
6055 (get_cookie_size): New function.
6056 (build_new_1): Handle array-new cookies correctly under the new
6058 (build_vec_delete_1): Likewise.
6059 (build_vec_init): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6060 (build_delete): Likewise.
6061 (build_vec_delete): Handle array-new cookies correctly under the new
6063 * lex.c (do_identifier): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6064 * pt.c (instantiate_class_template): Set TYPE_HAS_NEW_OPERATOR and
6065 TYPE_HAS_ARRAY_NEW_OPERATOR.
6066 * ptree.c (print_lang_type): Check them.
6067 * search.c (context_for_name_lookup): Fix typo in comment.
6068 (tree_has_any_destructor_p): Use TYPE_HAS_NONTRIVIAL_DESTRUCTOR.
6069 * tree.c (break_out_cleanups): Likewise.
6070 (build_cplus_array_test_1): Likewise.
6071 (cp_build_qualified_type_real): Likewise.
6072 * typeck.c (complete_type): Likewise.
6074 * g++spec.c (lang_specific_driver): Add -fnew-abi at the start of
6075 the command-line, not the end.
6077 2000-03-01 Jason Merrill <jason@casey.cygnus.com>
6079 * pt.c (instantiate_decl): Clear TI_PENDING_TEMPLATE_FLAG.
6081 2000-03-02 Tom Tromey <tromey@cygnus.com>
6083 * cp-tree.h (build_java_class_ref): Declare.
6084 * init.c (build_java_class_ref): No longer static.
6085 * except.c (expand_throw): Generate a Java-style `throw' if the
6086 thrown object is a "Java" object.
6087 (initialize_handler_parm): Generate a Java-style lookup of
6088 exception info if the caught object is a "Java" object.
6089 (catch_language, catch_language_init): New globals.
6090 (decl_is_java_type): New function.
6091 (expand_start_catch_block): Don't call push_eh_info() or
6092 push_eh_cleanup() when handling a Java-style "catch". Pass Java
6093 class reference to build_catch_block.
6095 Thu Mar 2 13:32:01 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6097 * typeck.c (comptypes): Treat sizetype like its language equivalent.
6099 2000-03-01 Bernd Schmidt <bernds@cygnus.co.uk>
6101 * typeck.c (maybe_warn_about_returning_address_of_local): Reorganize
6102 to merge reference/pointer code and fix incorrect warnings.
6104 2000-02-29 Jason Merrill <jason@casey.cygnus.com>
6106 * search.c (protected_accessible_p): Use context_for_name_lookup.
6108 * init.c (construct_virtual_bases): Fix thinko.
6109 * typeck.c (expand_ptrmemfunc_cst): Fix thinko.
6111 2000-03-01 Martin von Loewis <loewis@informatik.hu-berlin.de>
6113 * decl.c (current_function_decl): Move to toplev.c.
6115 2000-02-29 Nathan Sidwell <nathan@codesourcery.com>
6117 * pt.c (fn_type_unification): Unify return type, whenever
6119 (get_bindings_real): Only pass return type when necessary.
6120 Remove explicit return type check.
6121 * class.c (resolve_address_of_overloaded_function): Pass desired
6122 return type to fn_type_unification.
6124 Mon Feb 28 08:15:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6126 * class.c (build_vtbl_or_vbase_field, check_methods): Don't clear
6128 (check_bitfield_decl, check_field_decls): Set DECL_SIZE, not
6130 * rtti.c (expand_class_desc): Likewise.
6131 * cp-tree.h (DECL_INIT_PRIORITY): Use underlying union name.
6132 (THUNK_VCALL_OFFSET): Likewise.
6133 (THUNK_DELTA): Reflect changes in ../tree.h.
6135 2000-02-28 Jason Merrill <jason@casey.cygnus.com>
6137 * search.c (protected_accessible_p): Also allow the access if
6138 the member is public in DERIVED. Lose TYPE parm.
6139 (friend_accessible_p): Lose TYPE parm.
6140 (accessible_p): Adjust.
6142 Sun Feb 27 16:40:33 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6144 * class.c (dfs_build_vtable_offset_vtbl_entries): Don't use size_binop
6145 on things that are not sizes; ssize_binop deleted.
6146 Call size_diffop when appropriate.
6147 (dfs_build_vcall_offset_vtbl_entries): Likewise.
6148 (build_primary_vtable, build_secondary_vtable): Likewise.
6149 (dfs_set_offset_for_unshared_vbases, dfs_modify_vtables): Likewise.
6150 Variable I is HOST_WIDE_INT.
6151 (get_vfield_offset): Pass proper types to size_binop.
6152 (size_extra_vtbl_entries, layout_virtual_bases): Likewise.
6153 (finish_struct_1): Likewise.
6154 (skip_rtti_stuff): Arg N is now pointer to signed.
6155 (layout_class_type): Use size_zero_node.
6156 * cp-tree.h (skip_rtti_stuff): Arg N is pointer to signed.
6157 * cvt.c (cp_convert_to_pointer): Pass proper types to size_binop.
6158 * decl.c (complete_arry_type): Pass proper types to size_binop.
6159 (xref_basetypes): BINFO_OFFSET is sizetype.
6160 * error.c (dump_expr): Don't use size_binop non-sizes.
6161 * expr.c (cplus_expand_constant): Pass proper types to size_binop.
6162 * init.c (construct_virtual_bases): Fix type error.
6163 (build_vec_delete_1): Pass proper type to size_binop and don't
6165 * lex.c (cp_make_lang_type): BINFO_OFFSET is sizetype.
6166 * rtti.c (get_base_offset): Pass proper type to size_binop.
6167 * search.c (dfs_find_vbases): Fix type error.
6168 (expand_upcast_fixups): Arg to skip_rtti_stuff is pointer to signed.
6169 (dfs_get_vbase_types): BINFO_OFFSET is sizetype.
6170 * tree.c (debug_binfo): Variable N is signed.
6171 Use HOST_WIDE_INT_PRINT_DEC.
6172 * typeck.c (comptypes): sizetype is same as equivalent integer type.
6173 (c_sizeof, c_sizeof_nowarn, expr_sizeof): Use TYPE_SIZE_UNIT,
6174 size_one_node and size_zero_node.
6175 (c_alignof): Use size_one_node.
6176 (build_component_addr): Pass proper types to size_binop.
6177 (expand_ptrmemfunc_cst): Don't use size_binop on non-sizes.
6179 2000-02-26 Jason Merrill <jason@casey.cygnus.com>
6181 Implement class scope using-declarations for functions.
6182 * class.c (handle_using_decl): Call add_method for used functions.
6183 Use IDENTIFIER_CLASS_VALUE to check for conflicts.
6184 (add_method): Used functions are hidden by local functions.
6185 (check_bases_and_members): Handle using-decls before finalizing
6186 CLASSTYPE_METHOD_VEC.
6187 * call.c (add_function_candidate): Add ctype parm; if non-zero,
6188 override the type of 'this' accordingly.
6189 (add_template_candidate, add_template_candidate_real): Add ctype parm.
6190 (convert_class_to_reference, build_user_type_conversion_1,
6191 build_new_function_call, build_object_call, build_new_op,
6192 build_new_method_call): Pass ctype parm.
6194 * search.c (lookup_member): Put rval_binfo, not basetype_path, in
6196 * call.c (convert_class_to_reference, build_user_type_conversion_1,
6197 build_new_function_call, build_object_call, build_new_op,
6198 build_new_method_call, build_op_delete_call): Don't get basetype_path
6200 * typeck.c (build_component_ref): Likewise.
6201 * init.c (build_offset_ref): Likewise.
6202 (resolve_offset_ref): Don't call enforce_access.
6203 Call build_scoped_ref.
6204 * typeck2.c (build_scoped_ref): Simplify. Do nothing if it
6205 would cause an error or if -pedantic.
6206 * class.c (alter_access): Lose binfo parm.
6208 2000-02-26 Mark Mitchell <mark@codesourcery.com>
6210 * semantics.c (simplify_aggr_init_exprs_p): Don't walk into
6213 2000-02-25 Alfred Minarik <a8601248@unet.univie.ac.at>
6215 * rtti.c (get_vmi_pseudo_type_info): Move __vmi_class_type_info
6216 pseudo_type_info creation into the std namespace
6218 2000-02-26 Mark Mitchell <mark@codesourcery.com>
6220 * cp-tree.h (DECL_NEEDED_P): Tweak to correct usage before EOF.
6221 (import_export_class): Remove declaration.
6222 * decl2.c (import_export_class): Make it static.
6223 * dump.c (dequeue_and_dump): Handle PREDECREMENT_EXPR,
6224 PREINCREMENT_EXPR, POSTDECREMENT_EXPR, POSTINCREMENT_EXPR,
6225 EXPR_WITH_FILE_LOCATION.
6226 * lex.c (check_newline): Tweak filename/lineno setting.
6227 * semantics.c (begin_while_stmt): Fix typo in comment.
6229 Sat Feb 26 19:50:23 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6231 * lang-options.h (-fmessage-length=): Add missing option.
6233 * Make-lang.in (CXX_SRCS): Add .h files and sort list.
6235 2000-02-26 Zack Weinberg <zack@wolery.cumb.org>
6237 * Make-lang.in: Delete refs to LIBGCC2_DEPS.
6239 Fri Feb 25 14:52:33 2000 Jim Wilson <wilson@cygnus.com>
6241 * optimize.c (expand_call_inline): Emit the return label before
6242 evaluating the return value.
6244 2000-02-24 Mark Mitchell <mark@codesourcery.com>
6246 * lex.c (check_newline): Use push_srcloc and pop_srcloc, rather
6247 than duplicating functionality here.
6248 * optimize.c: Include input.h.
6249 (expand_call_inline): Use push_srcloc and pop_srcloc.
6250 * parse.y (maybe_cv_qualifier): Remove calls to emit_line_note.
6251 * parse.c: Regenerated.
6252 * Makefile.in (lex.o): Depend on input.h.
6253 (optimize.o): Likewise.
6255 2000-02-24 Nathan Sidwell <nathan@codesourcery.com>
6257 * decl.c (grokdeclarator): Diagnose qualifiers on non-member
6258 function type, rather than ICE.
6260 2000-02-23 Jason Merrill <jason@casey.cygnus.com>
6262 * decl.c (grokdeclarator): Call decl_type_access_control.
6263 * parse.y (parse_end_decl): Don't call decl_type_access_control if
6266 2000-02-23 Nathan Sidwell <nathan@codesourcery.com>
6268 * decl.c (decls_match): Remove obsolete static member nadgering.
6270 2000-02-21 Martin v. Löwis <loewis@informatik.hu-berlin.de>
6272 * decl.c (grokdeclarator): Change ANSI to ISO.
6273 * lex.c (consume_string, readescape, do_identifier): Likewise.
6274 (parse_float, real_yylex): Likewise.
6275 * parse.y (paren_expr_or_null, paren_cond_or_null): Likewise.
6276 (unary_expr, new_initializer, cast_expr, primary, primary_no_id,
6277 new_type_id, maybe_label_decls, simple_stmt,
6278 for.init.statement): Likewise.
6279 * pt.c (do_decl_instantiation, do_type_instantiation): Likewise.
6280 * semantics.c (finish_named_return_value): Likewise.
6281 * parse.c: Regenerate.
6283 2000-02-21 Mark Mitchell <mark@codesourcery.com>
6285 * cp-tree.h (CPTI_VTABLE_INDEX_TYPE): New macro.
6286 (CPTI_CLASS_STAR_TYPE): Remove.
6287 (vtable_index_type): Likewise.
6288 (class_star_type_node): Remove.
6289 (TYPE_PTRMEMFUNC_FN_TYPE): Adjust for the new ABI.
6290 (build_binary_op_nodefault): Remove.
6291 * call.c (build_new_op): Use build_binary_op instead of
6292 build_binary_op_nodefault.
6293 * decl.c (init_decl_processing): Remove class_star_type_node
6294 initialization. Make delta_type_node ptrdiff_type_node under the
6295 new ABI. Initialize vtable_index_type.
6296 (build_ptrmemfunc_type): Build different structures for the new
6298 (build_enumerator): Use build_binary_op instead of
6299 build_binary_op_nodefault.
6300 * method.c (build_overload_value): Mangle pointers-to-members
6301 appropriately under the new ABI.
6302 * typeck.c (build_array_ref): Use build_binary_op instead of
6303 build_binary_op_nodefault.
6304 (get_member_function_from_ptrfunc): Adjust for the new ABI.
6305 (build_binary_op_nodefault): Rename to ...
6306 (build_binary_op): ... this. Remove old version. Adjust for
6307 pointer-to-member comparisons under the new ABI.
6308 (build_ptrmemfunc1): Remove dead code. Adjust for the new ABI.
6309 (build_ptrmemfunc): Adjust for the new ABI.
6310 (expand_ptrmemfunc_cst): Likewise.
6311 (delta2_from_ptrmemfunc): Assert that we're not using the new ABI.
6312 (pfn_from_ptrmemfunc): Adjust for the new ABI.
6314 2000-02-21 Gabriel Dos Reis <gdr@codesourcery.com>
6316 * call.c (build_object_call): Compress consecutive calls to
6318 (build_conditional_expr): Say 'ISO C++' not 'ANSI C++'.
6319 (build_op_delete_call): Adjust message formatting.
6321 * class.c (check_bases): Compress consecutive calls to
6323 (finish_struct_anon): Say 'ISO C++'.
6325 * decl.c (start_decl): Same here.
6326 (grok_reference_init): Likewise.
6327 (grokfndecl): Correct message formatting.
6328 (grokfndecl): Improve diagnostic.
6329 (check_static_variable_definition): Likewise. Say 'ISO C++'
6330 (compute_array_index_type): Say 'ISO C++'
6331 (create_array_type_for_decl): Compress consecutive calls to
6333 (grokdeclarator): Say 'ISO C++'
6334 (grok_op_properties): Likewise.
6336 * decl2.c (delete_sanity): Clairify diagnostic.
6337 (check_member_template): Same here.
6338 (grok_function_init): Use consistent terminology.
6340 * expr.c (do_case): Say 'ISO C++'
6342 * friend.c (do_friend): Compress consecutive calls to warning.
6344 2000-02-20 Mark Mitchell <mark@codesourcery.com>
6346 * cp-tree.h (merge_primary_and_secondary_vtables_p): New macro.
6347 * class.c (build_secondary_vtable): Reorganize. Don't create a
6348 new vtable under the new ABI.
6349 (layout_vtable_decl): Don't add num_extra_vtbl_entries when
6351 (build_vtbl_initializer): Don't return a CONSTRUCTOR; just return
6352 the initializing elements.
6353 (initialize_vtable): New function.
6354 (dfs_finish_vtbls): Use it.
6355 (dfs_accumulate_vtbl_inits): New function.
6356 (finish_vtbls): Merge primary and secondary vtables under the new
6358 (finish_struct_1): Remove redundant call to layout_vtable_decl.
6359 * init.c (expand_virtual_init): Deal with BINFO_VTABLEs that
6362 * class.c (build_vtable): New function, split out from ...
6363 (get_vtable_decl): ... here, and ...
6364 (build_secondary_vtable): ... here.
6366 * pt.c (tsubst_decl): Fix formatting.
6368 Sat Feb 19 18:43:13 2000 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
6370 * class.c (build_primary_vtable, layout_vtable_decl): Likewise.
6371 (avoid_overlap, build_base_field): Likewise.
6372 (build_base_field, build_base_fields, is_empty_class):
6373 Test DECL_SIZE with integer_zero.
6374 (layout_class_type): Set CLASSTYPE_SIZE_UNIT.
6375 * cp-tree.h (struct lang_type): New field size_unit.
6376 (CLASSTYPE_SIZE_UNIT): New macro.
6377 * decl.c (init_decl_processing): Set DECL_SIZE_UNIT.
6378 (cp_finish_decl): Delete -Wlarger-than processing.
6379 * optimize.c (remap_decl): Walk DECL_SIZE_UNIT.
6380 * pt.c (tsubst_decl): Set DECL_SIZE_UNIT.
6381 * tree.c (make_binfo): binfo vector is one entry longer.
6382 (walk_tree): Walk DECL_SIZE_UNIT.
6384 2000-02-19 Mark Mitchell <mark@codesourcery.com>
6386 * class.c (dfs_build_vcall_offset_vtbl_entries): Fix typo in
6388 (build_vtable_entry): Don't assume all vtable entries are
6390 (build_vtbl_initializer): Adjust accordingly.
6391 (get_vtable_decl): Fix formatting.
6393 2000-02-18 Jason Merrill <jason@casey.cygnus.com>
6395 * semantics.c (deferred_type_access_control): Walk the entire
6397 (save_type_access_control): Rename from
6398 initial_deferred_type_access_control. Just remember the value.
6399 (decl_type_access_control): New fn.
6400 (begin_function_definition): Use deferred_type_access_control, after
6401 we've started the function. Set type_lookups to error_mark_node.
6402 * parse.y (frob_specs, fn.def1): Adjust.
6403 (parse_decl0, parse_field, parse_field0, parse_bitfield): New fns.
6404 (parse_end_decl, parse_bitfield0, parse_method): New fns.
6405 (fn.def2, initdcl, initdcl0_innards, nomods_initdcl0): Use them.
6406 (after_type_component_declarator0): Likewise.
6407 (after_type_component_declarator): Likewise.
6408 (notype_component_declarator): Likewise.
6409 * cp-tree.h: Adjust.
6411 * decl.c (redeclaration_error_message): Allow redeclaration of
6412 namespace-scope decls.
6414 2000-02-18 Martin von Loewis <loewis@informatik.hu-berlin.de>
6416 * typeck2.c (my_friendly_abort): Use GCCBUGURL.
6418 2000-02-17 Mark Mitchell <mark@codesourcery.com>
6420 * class.c (add_method): Don't set DECL_VIRTUAL_CONTEXT.
6421 * decl2.c (grokclassfn): Likewise.
6423 * ir.texi: Document DECL_TEMPLATE_INSTANTIATIONS.
6425 * decl2.c (lang_decode_option): Don't set default message length
6427 * lex.c (lang_init_options): Set it here.
6429 2000-02-16 Mark Mitchell <mark@codesourcery.com>
6431 Make DECL_CONTEXT mean the class in which a member function was
6432 declared, even for a virtual function.
6433 * cp-tree.h (DECL_CLASS_CONTEXT): Adjust.
6434 (DECL_FRIEND_CONTEXT): New macro.
6435 (DECL_REAL_CONTEXT): Remove.
6436 (SET_DECL_FRIEND_CONTEXT): Likewise.
6437 (DECL_VIRTUAL_CONTEXT): Adjust.
6438 (DECL_CLASS_SCOPE_P): Use TYPE_P.
6439 (add_friends): Remove.
6440 (hack_decl_function_context): Likewise.
6441 * call.c (build_new_function_call): Replace DECL_REAL_CONTEXT with
6443 (build_over_call): Fix indentation. Use DECL_CONTEXT
6444 instead of DECL_CLASS_CONTEXT.
6445 * class.c (dfs_build_vcall_offset_vtbl_entries): Likewise.
6446 (add_method): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
6447 (strictly_overrides): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6448 (build_vtbl_or_vbase_field): Don't set DECL_CLASS_CONTEXT.
6449 (build_base_field): Likewise.
6450 (finish_struct_1): Likewise.
6451 (build_self_reference): Likewise.
6452 * decl.c (push_class_binding): Use CP_DECL_CONTEXT, not
6454 (pushtag): Use decl_function_context, not
6455 hack_decl_function_context.
6456 (decls_match): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6457 (duplicate_decls): Use DECL_VIRTUAL_CONTEXT.
6458 (pushdecl): Remove bogus code.
6459 (start_decl): Use DECL_CONTEXT rather than DECL_CLASS_CONTEXT.
6460 (cp_finish_decl): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6461 (grokfndecl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6462 Use decl_function_context, nothack_decl_function_context.
6463 (grokvardecl): Don't set DECL_CLASS_CONTEXT.
6464 (grokdeclarator): Likewise. Use decl_function_context, not
6465 hack_decl_function_context.
6466 (copy_args_p): Document. Don't use DECL_CLASS_CONTEXT.
6467 (start_function): Use DECL_FRIEND_CONTEXT, not
6468 DECL_CLASS_CONTEXT. Use decl_function_context, not
6469 hack_decl_function_context.
6470 (finish_function): Use decl_function_context, not
6471 hack_decl_function_context.
6472 (maybe_retrofit_in_chrg): Use DECL_CONTEXT, not
6474 (grokclassfn): Set DECL_VIRTUAL_CONTEXT, not DECL_CONTEXT.
6475 (finish_static_data_member_decl): Don't set DECL_CLASS_CONTEXT.
6476 (grokfield): Likewise.
6477 (finish_builtin_type): Likewise.
6478 (finish_vtable_vardec): Use decl_function_context, not
6479 hack_decl_function_context.
6480 (import_export_decl): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6481 (start_static_initialization_or_destruction): Likewise.
6482 (finish_static_initialization_or_destruction): Likewise.
6483 (mark_used): Adjust logic for deciding when to synthesize methods.
6484 * dump.c (dequeue_and_dump): Use CP_DECL_CONTEXT, not
6486 * error.c (dump_function_decl): Use DECL_CONTEXT, not
6488 * friend.c (is_friend): Likewise.
6489 (add_friends): Remove.
6490 (do_friend): Use SET_DECL_FRIEND_CONTEXT.
6491 * lex.c (begin_definition_of_inclass_inline): Use
6492 decl_function_context, not hack_decl_function_context.
6493 (process_next_inline): Likewise.
6494 (do_identifier): Use CP_DECL_CONTEXT, not DECL_REAL_CONTEXT.
6495 * method.c (set_mangled_name_for_decl): Use DECL_CONTEXT, not
6496 DECL_CLASSS_CONTEXT.
6497 (hack_identifier): Likewise.
6498 (synthesize_method): Use decl_function_context, not
6499 hack_decl_function_context.
6500 * pt.c (template_class_depth_real): Use CP_DECL_CONTEXT, not
6502 (is_member_template): Use decl_function_context, not
6503 hack_decl_function_context. Use DECL_CONTEXT, not
6505 (build_template_decl): Set DECL_VIRTUAL_CONTEXT, not
6507 (check_default_tmpl_args): Use CP_DECL_CONTEXT, not
6509 (push_template_decl_real): Likewise.
6510 (instantiate_class_template): Don't call add_friends.
6511 (tsubst_default_argument): Use DECL_CONTEXT, not
6513 (tsubst_decl): Set DECL_VIRTUAL_CONTEXT, not DECL_CLASS_CONTEXT.
6514 Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6515 (set_meangled_name_for_template_decl): Use DECL_CONTEXT, not
6517 * repo.c (repo_inline_used): Likewise.
6518 * search.c (current_scope): Adjust for new _CONTEXT macros.
6519 (context_for_name_lookup): Use CP_DECL_CONTEXT, not
6521 (friend_accessible_p): Use DECL_CONTEXT, not DECL_CLASS_CONTEXT.
6522 (lookup_fnfields_here):Likewise.
6523 (check_final_overrider): Likewise.
6524 (init_vbase_pointers): Likewise.
6525 (virtual_context): Likewise.
6526 * semantics.c (finish_member_declaration): Just set DECL_CONTEXT.
6527 (expand_body): Use decl_function_context, not
6528 hack_decl_function_context.
6529 * tree.c (hack_decl_function_context): Remove.
6530 * typeck.c (build_x_function_call): Use DECL_CONTEXT, not
6532 * typeck2.c (error_not_base_type): Likewise.
6534 2000-02-15 Jason Merrill <jason@casey.cygnus.com>
6536 * decl.c (xref_tag): Don't SET_IDENTIFIER_NAMESPACE_VALUE.
6538 2000-02-16 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6540 * Make-lang.in (g++spec.o): Depend on $(GCC_H), not gcc.h.
6542 2000-02-15 Jonathan Larmour <jlarmour@redhat.co.uk>
6544 * lang-specs.h: Add new __GNUC_PATCHLEVEL__ define to default spec.
6546 2000-01-16 Gabriel Dos Reis <gdr@codesourcery.com>
6548 * decl2.c (lang_decode_option): Enable automatic line wrapping.
6550 2000-02-13 Jason Merrill <jason@casey.cygnus.com>
6552 * parse.y (frob_specs): Split out...
6553 (parse_decl): From here.
6554 (fn.def2): Call initial_deferred_type_access_control.
6555 (after_type_component_declarator0): Call frob_specs.
6556 (notype_component_declarator0): Likewise.
6557 * search.c (friend_accessible_p): Nested classes are friends of their
6560 2000-02-10 Mark Mitchell <mark@codesourcery.com>
6562 * ir.texi (ADDR_EXPR): Document the fact that an ADDR_EXPR can be
6563 used to create an implicit temporary.
6565 * class.c (dfs_modify_vtables): Tweak calculation of functions to
6568 2000-02-08 Nathan Sidwell <nathan@acm.org>
6570 * typeck.c (strip_all_pointer_quals): Use TYPE_MAIN_VARIANT, to
6571 strip array element qualifiers too.
6573 2000-02-07 Mark Mitchell <mark@codesourcery.com>
6575 * decl.c (store_parm_decls): Don't build cleanups for parameters
6576 while processing_template_decl.
6578 2000-02-07 Jason Merrill <jason@casey.cygnus.com>
6580 * cp-tree.h (struct saved_scope): Add incomplete field.
6581 (namespace_scope_incomplete): New macro.
6582 * decl.c (pushdecl): Use it.
6583 (hack_incomplete_structures): Use it. See through artificial
6585 (mark_saved_scope): Mark it.
6587 Implement access control for nested types.
6588 * search.c (type_access_control): New fn.
6589 (accessible_p): Now we do perform access control for types.
6590 * semantics.c (deferred_type_access_control): New fn.
6591 (initial_deferred_type_access_control): New fn.
6592 (begin_function_definition): Call it. Add lookups parm.
6593 * decl.c (struct binding_level): Add this_class field.
6594 (pushlevel_class): Set it.
6595 (mark_binding_level): Mark it.
6596 (lookup_name_real): Use it. Call type_access_control.
6597 (mark_saved_scope): Mark lookups field.
6598 * cp-tree.h (flagged_type_tree): Add lookups field.
6599 (struct saved_scope): Add lookups field.
6600 (type_lookups): New macro.
6601 * parse.y (declmods): Now <ftype>.
6602 (parse_decl): Add lookups parm. Call
6603 initial_deferred_type_access_control.
6604 (lang_extdef): Clear type_lookups.
6605 (typed_declspecs, declmods, typespec): Set lookups field.
6606 (initdcl): Call deferred_type_access_control.
6607 (fn.def1, fn.def2, typed_declspecs1, initdcl0_innards, nomods_initdcl0,
6608 component_decl_1, named_parm): Adjust.
6609 * friend.c (is_friend): Nested classes are friends of their
6612 * class.c (currently_open_derived_class): New fn.
6613 * method.c (hack_identifier): Use it.
6615 * lex.c (do_identifier): Remove obsolete code.
6617 * parse.y (typed_typespecs): Propagate new_type_flag properly.
6619 2000-02-05 Zack Weinberg <zack@wolery.cumb.org>
6621 * tinfo.h: Remove apostrophes from C++ comment (xgettext
6622 thinks this file is plain C).
6624 2000-02-05 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6626 * Makefile.in (call.o): Depend on $(EXPR_H).
6628 * call.c: Include "expr.h".
6630 * class.c (dump_class_hierarchy): Add prototype.
6632 * search.c (dfs_get_pure_virtuals): Likewise.
6634 2000-02-1 Ulrich Drepper <drepper@redhat.com>
6636 * parse.y (simple_stmt): Allow :: token in asm parameter list.
6639 Mon Jan 31 15:35:29 2000 Jim Wilson <wilson@cygnus.com>
6641 * class.c (build_vtbl_or_vbase_field): New parameter fcontext.
6642 Store it in DECL_FCONTEXT.
6643 (build_vbase_pointer_fields, create_vtable_ptr): Fix callers.
6645 2000-01-31 Jason Merrill <jason@casey.cygnus.com>
6647 * tinfo.h (old abi): #include "tconfig.h".
6648 * tinfo.cc (convert_to_base): Move into old abi section.
6650 2000-01-31 Mark Mitchell <mark@codesourcery.com>
6652 * cp-tree.h (BINFO_VIRTUALS): Tweak documentation.
6653 (CLASSTYPE_PRIMARY_BINFO): Use BINFO_PRIMARY_BINFO.
6654 (BINFO_PRIMARY_BINFO): New macro.
6655 (BF_DELTA): Rename to ...
6656 (BV_DELTA): ... this.
6657 (BF_VCALL_INDEX): Rename to ...
6658 (BV_VCALL_INDEX): ... this.
6659 (BF_FN): Rename to ...
6661 * class.c (build_vbase_path): Adjust for changes to reverse_path.
6662 (set_rtti_entry): Rename BF_ macros to BV_ variants.
6663 (modify_vtable_entry): Simplify.
6664 (add_virtual_function): Rename BF_ macros to BV_ variants.
6665 (build_vtable_initializer): Likewise.
6666 (get_class_offset_1): Remove.
6667 (dfs_get_class_offset): Likewise.
6668 (get_class_offset): Likewise.
6669 (dfs_find_final_overrider): New function.
6670 (find_final_overrider): Likewise.
6671 (modify_one_vtable): Remove.
6672 (dfs_find_base): New function.
6673 (dfs_modify_vtables): Fold modify_one_vtable in here. Use
6674 find_final_overrider.
6675 (modify_all_vtables): Adjust. Set BV_VCALL_INDEX on new
6677 (dfs_fixup_vtable_deltas): Remove.
6678 (override_one_vtable): Remove.
6679 (merge_overrides): Likewise.
6680 (layout_virtual_bases): Make sure BINFO_OFFSET is set right for
6681 unreal chilren of virtual bases.
6682 (finish_struct_1): Don't use merge_overrides. Don't use
6683 dfs_fixup_vtable_deltas.
6684 * tree.c (reverse_path): Return a TREE_LIST, not a chain of
6687 2000-01-31 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
6688 Jason Merrill <jason@yorick.cygnus.com>
6690 * tinfo.h: Rename USItype to myint32, depend on BITS_PER_UNIT.
6692 2000-01-31 Alfred Minarik <a8601248@unet.univie.ac.at>
6694 * exception.cc (__throw_bad_typeid): Add missing std::.
6696 2000-01-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6698 * cp-tree.h (make_thunk): PROTO -> PARAMS.
6700 2000-01-31 Nathan Sidwell <sidwell@codesourcery.com>
6702 * cp-tree.h (new_abi_rtti_p): Use flag_new_abi.
6704 Runtime support for new-abi rtti.
6705 * inc/typeinfo (type_info::operator!=): Define in class.
6706 (type_info::before, type_info::name, type_info::operator==,
6707 type_info::operator!=): Define new ABI implementations.
6708 (type_info::is_pointer_p, type_info::is_function_p): Declare
6709 new virtual functions.
6710 (type_info::do_catch, type_info::do_upcast): Likewise.
6712 * tinfo.h (__base_class_info): Define new class.
6713 (__class_type_info): Likewise.
6714 (__si_class_type_info): Likewise.
6715 (__vmi_class_type_info): Likewise.
6716 (__dynamic_cast): Prototype.
6718 * tinfo.cc: Conditionalize old and new rtti mechanisms.
6719 (type_info::is_pointer_p): Define new function.
6720 (type_info::is_function_p): Likewise.
6721 (type_info::do_catch): Likewise.
6722 (type_info::do_upcast): Likewise.
6723 (vtable_prefix): New structure for vtable access.
6724 (adjust_pointer): Define new template function.
6725 (contained_p, public_p, virtual_p, contained_public_p,
6726 contained_nonpublic_p, contained_nonvirtual_p): Define new
6728 (nonvirtual_base_type): New local variable.
6729 (__class_type_info::~__class_type_info): Define.
6730 (__si_class_type_info::~__si_class_type_info): Likewise.
6731 (__vmi_class_type_info::~__vmi_class_type_info): Likewise.
6732 (__class_type_info::do_catch): Define new function.
6733 (__class_type_info::do_upcast): Likewise.
6734 (__class_type_info::find_public_src): Likewise.
6735 (__class_type_info::do_find_public_src): Likewise.
6736 (__si_class_type_info::do_find_public_src): Likewise.
6737 (__vmi_class_type_info::do_find_public_src): Likewise.
6738 (__class_type_info::do_dyncast): Likewise.
6739 (__si_class_type_info::do_dyncast): Likewise.
6740 (__vmi_class_type_info::do_dyncast): Likewise.
6741 (__class_type_info::do_upcast): Likewise.
6742 (__si_class_type_info::do_upcast): Likewise.
6743 (__vmi_class_type_info::do_upcast): Likewise.
6744 (__dynamic_cast): Likewise.
6746 * tinfo2.cc (__fundamental_type_info): Define new class.
6747 (__pointer_type_info): Likewise.
6748 (__reference_type_info): Likewise.
6749 (__array_type_info): Likewise.
6750 (__function_type_info): Likewise.
6751 (__enum_type_info): Likewise.
6752 (__ptr_to_member_type_info): Likewise.
6753 (__fundamental_type_info::~__fundamental_type_info): Define.
6754 (__pointer_type_info::~__pointer_type_info): Likewise.
6755 (__reference_type_info::~__reference_type_info): Likewise.
6756 (__array_type_info::~__array_type_info): Likewise.
6757 (__function_type_info::~__function_type_info): Likewise.
6758 (__enum_type_info::~__enum_type_info): Likewise.
6759 (__ptr_to_member_type_info::~__ptr_to_member_type_info): Likewise.
6760 (__pointer_type_info::do_catch): Define new function.
6761 (__ptr_to_member_type_info::do_catch): Define new function.
6763 (__throw_type_match_rtti_2): Use new ABI interface, if enabled.
6764 (__is_pointer): Likewise.
6766 * exception.cc (__cplus_type_matcher): Deal with new-abi rtti.
6768 2000-01-30 Mark Mitchell <mark@codesourcery.com>
6770 * cp/class.c (build_vtable): Rename to build_primary_vtable.
6771 (prepare_fresh_vtable): Rename to build_secondary_vtable.
6772 (make_new_vtable): New function.
6773 (modify_vtable_entry): Handle generation of new vtables correctly.
6774 (modify_one_vtable): Remove unused parameter.
6775 (dfs_fixup_vtable_deltas): Likewise.
6776 (override_one_vtable): Use build_secondary_vtable.
6777 (finish_struct_1): Use build_primary_vtable and
6778 build_secondary_vtable.
6780 2000-01-28 Ulrich Drepper <drepper@redhat.com>
6782 * cp/decl.c: Adjust variable names, comments, help strings.
6784 2000-01-29 Nathan Sidwell <nathan@acm.org>
6786 * new2.cc (operator delete[]): Use operator delete, don't assume
6789 2000-01-29 Nathan Sidwell <sidwell@codesourcery.com>
6791 * class.c (build_vtbl_initializer): Add argument to
6792 build_vtable_entry call.
6794 2000-01-27 Mark Mitchell <mark@codesourcery.com>
6796 * cp-tree.def (THUNK_DECL): Discuss vcall indices.
6797 * cp-tree.h (BINFO_VIRTUALS): Update documentation.
6798 (BF_DELTA): New macro.
6799 (BF_VCALL_INDEX): Likewise.
6801 (THUNK_VCALL_OFFSET): Likewise.
6802 (make_thunk): Change prototype.
6803 * class.c (build_vtable_entry): Integrate
6804 build_vtable_entry_for_fn. Handle vcall indices.
6805 (build_vtable_entry_for_fn): Remove.
6806 (set_rtti_entry): Handle vcall indices. Use BF_DELTA,
6807 BF_VCALL_INDEX, BF_FN.
6808 (modify_vtable_entry): Integrate common code from
6809 modify_one_vtable and dfs_fixup_vtable_deltas.
6810 (add_virtual_function): Set BF_VCALL_INDEX.
6811 (build_vtbl_initializer): Simplify. Use BF_DELTA, BF_VCALL_INDEX,
6813 (modify_one_vtable): Simplify.
6814 (dfs_fixup_vtable_deltas): Likewise.
6815 (override_one_vtable): Use BF_DELTA, BF_VCALL_INDEX, BF_FN.
6816 * method.c (make_thunk): Handle vcall indices.
6818 2000-01-28 Nathan Sidwell <sidwell@codesourcery.com>
6820 Compiler side new abi rtti (not enabled).
6821 * cp-tree.h (new_abi_rtti_p): New macro.
6822 (emit_support_tinfos): Prototype new function.
6823 (tinfo_decl_p): Likewise.
6824 (emit_tinfo_decl): Likwise.
6825 * rtti.c (TINFO_PSEUDO_TYPE, TINFO_VTABLE_DECL): New accessor
6827 (doing_runtime): New local static.
6828 (init_rtti_processing): Add new-abi initializer.
6829 (get_tinfo_decl): Add new-abi logic.
6830 (tinfo_from_decl): Likewise.
6831 (build_dynamic_cast_1): Likewise.
6832 (qualifier_flags): New static function.
6833 (tinfo_base_init): Likewise.
6834 (generic_initializer): Likewise.
6835 (ptr_ref_initializer): Likewise.
6836 (ptmd_initializer): Likewise.
6837 (class_hint_flags): Likewise.
6838 (class_initializer): Likewise.
6839 (synthesize_tinfo_var): Likewise.
6840 (create_real_tinfo_var): Likewise.
6841 (create_pseudo_type_info): Likewise.
6842 (get_vmi_pseudo_type_info): Likewise.
6843 (create_tinfo_types): Likewise.
6844 (emit_support_tinfos): New global function.
6845 (tinfo_decl_p): New global predicate.
6846 (emit_tinfo_decl): New global function.
6847 * class.c (set_rtti_entry): Generalize for old and new rtti.
6848 (build_vtbl_initializer): Likewise.
6849 * decl2.c (finish_file): Likewise.
6851 Thu Jan 27 20:53:36 2000 Jim Wilson <wilson@cygnus.com>
6853 * optimize.c (remap_decl): Add walk_tree calls for DECL_SIZE (t)
6854 and TYPE_MAX_VALUE (TYPE_DOMAIN (TREE_TYPE (t))).
6856 Thu Jan 27 13:54:12 2000 Mike Stump <mrs@wrs.com>
6858 * decl.c (pushdecl): Fix up shadow warnings with respect to implicit
6861 2000-01-26 Jason Merrill <jason@casey.cygnus.com>
6863 * pt.c (unify): Use fold, not maybe_fold_nontype_arg.
6865 Wed Jan 26 22:19:14 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
6867 * optimize.c (calls_setjmp_r): Supply new argument
6868 to special_function_p.
6870 2000-01-26 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6872 * call.c: PROTO -> PARAMS.
6873 * class.c: Likewise.
6874 * cp-tree.h: Likewise.
6878 * decl2.c: Likewise.
6880 * errfn.c: Likewise.
6881 * error.c: Likewise.
6882 * except.c: Likewise.
6885 * input.c: Likewise.
6888 * method.c: Likewise.
6889 * optimize.c: Likewise.
6890 * parse.y: Likewise.
6894 * search.c: Likewise.
6895 * semantics.c: Likewise.
6898 * typeck.c: Likewise.
6899 * typeck2.c: Likewise.
6902 2000-01-25 Richard Henderson <rth@cygnus.com>
6904 * typeck.c (build_binary_op_nodefault): Remove UNNE_EXPR.
6906 2000-01-25 Mark Mitchell <mark@codesourcery.com>
6908 * cp-tree.h (vcall_offset_in_vtable_p): New macro.
6909 * class.c (build_vbase_offset_vtbl_entries): Fix typo in commment.
6910 (struct vcall_offset_data_s): New type.
6911 (dfs_vcall_offset_queue_p): New function.
6912 (dfs_build_vcall_offset_vtbl_entries): Likewise.
6913 (build_vcall_offset_vtbl_entries): Likewise.
6914 (layout_vtable_decl): Likewise.
6915 (num_vfun_entries): Likewise.
6916 (num_extra_vtbl_entries): Add the entries for vcall offsets.
6917 (build_vtbl_initializer): Likewise.
6918 (dfs_finish_vtabls): Use layout_vtable_decl.
6919 (modify_one_vtables): Always duplicate vtables under the new ABI.
6920 (finish_struct_1): Use layout_vtable_decl.
6922 2000-01-25 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
6924 * decl.c (member_function_or_else): Change third arg from a format
6925 specifier to an `enum overload_flags'. Callers changed.
6927 2000-01-25 Gabriel Dos Reis <gdr@codesourcery.com>
6929 * typeck.c (composite_pointer_type, c_sizeof, expr_sizeof,
6930 build_binary_op_nodefault, build_unary_op, build_reinterpret_cast,
6931 build_const_cast, get_delta_difference, check_return_expr): Avoid
6932 ANSI string concatenation usage.
6934 2000-01-24 Mark Mitchell <mark@codesourcery.com>
6936 * class.c (layout_class_type): Put the fields required to make a
6937 class non-empty at the end, not the beginning, of the TYPE_FIELDs
6940 2000-01-24 Jason Merrill <jason@casey.cygnus.com>
6942 * pt.c (maybe_fold_nontype_arg): Do nothing if we're not in a
6945 * decl2.c (mark_used): Do instantiate inlines that have been
6946 explicitly instantiated.
6948 2000-01-24 Richard Henderson <rth@cygnus.com>
6950 * call.c (build_over_call): Use expand_tree_builtin.
6951 * typeck.c (build_function_call_real): Likewise.
6952 (build_binary_op_nodefault): Handle unordered compares.
6954 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
6956 * cp-tree.h (CPTI_BAD_CAST, CPTI_BAD_TYPEID, CPTI_DCAST): New
6957 cp_tree_index values.
6958 (throw_bad_cast_node, throw_bad_typeid_node, dynamic_cast_node):
6959 New global node #defines for them.
6960 * rtti.c (call_void_fn): Replace with ...
6961 (build_runtime_decl): ... new static function.
6962 (throw_bad_cast): Use throw_bad_cast_node and build_runtime_decl.
6963 (throw_bad_typeid): Use throw_bad_typeid_node and build_runtime_decl.
6964 (build_dynamic_cast_1): Always produce correctly typed result.
6965 Explicitly produce type_info addresses. Use dynamic_cast_node.
6966 * exception.cc (__throw_bad_cast): Return `void *'.
6967 (__throw_bad_typeid): Return `const type_info &'.
6969 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
6971 * cp-tree.h (get_vtable_decl): Prototype new function.
6972 * class.c (get_vtable_decl): New function. Broken out from ...
6973 (build_vtable): ... here. Use it.
6974 * decl2.c (finish_vtable_vardecl): Ignore dummy vtables created
6977 2000-01-24 Nathan Sidwell <sidwell@codesourcery.com>
6979 * cp-tree.h (CPTI_TP_DESC_TYPE, CPTI_ACCESS_MODE_TYPE,
6980 CPTI_USER_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_ATTR_DESC_TYPE,
6981 CPTI_PTMF_DESC_TYPE): Remove cp_tree_index enumerations.
6982 (CPTI_TI_DESC_TYPE, CPTI_REF_DESC_TYPE, CPTI_ARY_DESC_TYPE,
6983 CPTI_ENUM_DESC_TYPE, CPTI_CLASS_DESC_TYPE, CPTI_SI_CLASS_DESC_TYPE,
6984 CPTI_VMI_CLASS_DESC_TYPE, CPTI_BASE_DESC_TYPE): New enumerations.
6985 (CPTI_TINFO_FN_ID, CPTI_TINFO_FN_TYPE): Rename to ...
6986 (CPTI_TINFO_DECL_ID, CPTI_TINFO_DECL_TYPE): ... here.
6987 (CPTI_TINFO_VAR_ID): New enumeration.
6988 (__tp_desc_type_node, __access_mode_type_node,
6989 __bltn_desc_type_node, __user_desc_type_node,
6990 __class_desc_type_node, __ptr_desc_type_node,
6991 __attr_desc_type_node, __func_desc_type_node,
6992 __ptmf_desc_type_node, __ptmd_desc_type_node): Remove #defines.
6993 (ti_desc_type_node, bltn_desc_type_node, ptr_desc_type_node,
6994 ref_desc_type_node, ary_desc_type_node, func_desc_type_node,
6995 enum_desc_type_node, class_desc_type_node,
6996 si_class_desc_type_node, vmi_class_desc_type_node,
6997 ptmd_desc_type_node, base_desc_type_node): New #defines.
6998 (tinfo_fn_id, tinfo_fn_type): Rename to ...
6999 (tinfo_decl_id, tinfo_decl_type): ... here. Adjust.
7000 (tinfo_var_id): New enumeration.
7001 (DECL_TINFO_FN_P): Augment comment.
7002 * decl.c (cp_global_trees): Adjust documentation.
7003 * rtti.c (init_rtti_processing): Adjust for tinfo_decl_id,
7004 tinfo_decl_type and tinfo_var_id.
7005 (get_tinfo_decl_dynamic): Adjust for tinfo_decl_type.
7006 (build_typeid): Remove unused variable.
7007 (get_tinfo_var): Use tinfo_var_id.
7008 (tinfo_name): New static function.
7009 (get_tinfo_decl): Adjust for tinfo_decl_id and tinfo_decl_type.
7010 (tinfo_from_decl): Likewise.
7011 (get_base_offset): New static function, broken out of
7013 (expand_si_desc): Use tinfo_name.
7014 (expand_class_desc): Likewise. Lose local static variable.
7015 Use base_desc_type_node. Use get_base_offset.
7016 (expand_ptr_desc): Use tinfo_name.
7017 (expand_attr_desc): Likewise.
7018 (expand_generic_desc): Likewise.
7020 * tinfo.cc (__GXX_ABI_VERSION): Test value and existance.
7021 * tinfo.h (__GXX_ABI_VERSION): Test value and existance.
7023 2000-01-23 Mark Mitchell <mark@codesourcery.com>
7025 * cp-tree.h (__eprintf): Remove declaration.
7026 * tree.c (__eprintf): Remove definition.
7028 2000-01-23 Zack Weinberg <zack@rabi.columbia.edu>
7029 Mark Mitchell <mark@codesourcery.com>
7031 * cp-tree.h (CLASSTYPE_MARKED_N, SET_CLASSTYPE_MARKED_N,
7032 CLEAR_CLASSTYPE_MARKED_N): Avoid signed vs. unsigned warnings.
7034 2000-01-23 Brad Lucier <lucier@math.purdue.edu>
7036 * class.c (dump_class_hierarchy): Print HOST_WIDE_INT properly.
7038 2000-01-23 Mark Mitchell <mark@codesourcery.com>
7040 * cp-tree.h (register_dtor_fn): New function.
7041 * decl.c (destroy_local_static): Rename to ...
7042 (register_dtor_fn): ... this. Give it external linkage.
7043 (expand_static_init): Use it.
7044 * decl2.c (do_static_initialization): Likewise, if using
7046 (do_static_destruction): Check that __cxa_atexit is not in use.
7047 (finish_file): Don't call do_static_destruction if using
7050 * typeck.c (convert_arguments): Restore two-message error
7053 2000-01-20 Nathan Sidwell <sidwell@codesourcery.com>
7055 Remap dynamic cast hint values to be consistent across ABIs.
7056 * search.c (dynamic_cast_base_recurse): Remap generated value.
7057 (get_dynamic_cast_base_type): Adjust documentation.
7058 * tinfo.h (__user_type_info::dyncast): Likewise.
7059 (__user_type_info::find_public_subobj): Remap BOFF meaning.
7060 * tinfo.cc (__si_type_info::do_dyncast): Remap BOFF meaning.
7061 (__class_type_info::do_dyncast): Likewise.
7062 (__class_type_info::do_find_public_subobj): Likewise.
7063 * tinfo2.cc (__dynamic_cast): Remap BOFF parameter.
7065 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
7067 * typeck.c (build_unary_op): Use cp_pedwarn, not pedwarn.
7069 * typeck2.c (incomplete_type_error): Restore previous
7070 cp_error and cp_error_at call sequence.
7072 2000-01-20 Brad Lucier <lucier@math.purdue.edu>
7074 * class.c (dump_class_hierarchy): Make format agree with argument;
7075 cast pointer to unsigned long and print with %lx.
7077 2000-01-19 Gabriel Dos Reis <gdr@codesourcery.com>
7079 * decl2.c (lang_decode_option): Set default line-wrap length to 72.
7081 * typeck.c (composite_pointer_type, common_type,
7082 comp_target_parms, c_sizeof, expr_sizeof, build_array_ref,
7083 build_function_call_real, convert_arguments,
7084 build_binary_op_nodefault, pointer_int_sum, pointer_diff,
7085 build_unary_op, mark_addressable, build_compound_expr,
7086 build_static_cast, build_reinterpret_cast, build_const_cast,
7087 build_c_cast, build_modify_expr, get_delta_difference,
7088 build_ptrmemfunc, check_return_expr): Replace 'ANSI C++' with
7089 'ISO C++'. Fusion consecutive calls to diagnotic message routines
7091 * typeck2.c (readonly_error, abstract_virtuals_error,
7092 process_init_constructor, check_for_new_type): Likewise.
7094 2000-01-19 Mark Mitchell <mark@codesourcery.com>
7096 * tree.c (bot_manip): Set DECL_CONTEXT for newly created
7099 2000-01-18 Nathan Sidwell <sidwell@codesourcery.com>
7101 * cp-tree.h (get_tinfo_fn_dynamic): Remove prototype.
7102 (build_x_typeid): Likewise.
7103 (get_tinfo_fn): Likewise.
7104 (get_tinfo_fn_unused): Rename to ...
7105 (get_tinfo_decl): ... here.
7106 * rtti.c (build_headof): Replace logic error with assertion.
7107 (get_tinfo_fn_dynamic): Rename to ...
7108 (get_tinfo_decl_dynamic): ... here. Make static. Use
7109 complete_type_or_else.
7110 (build_x_typeid): Move into ...
7111 (build_typeid): ... here. Adjust call to
7112 get_tinfo_decl_dynamic. Use tinfo_from_decl. Simplify
7113 throw_bad_typeid expression.
7114 (get_tinfo_fn_unused): Rename to ...
7115 (get_tinfo_decl): ... here. Adjust comment.
7116 (get_tinfo_fn): Delete.
7117 (tinfo_from_decl): New static function.
7118 (get_typeid_1): Call get_tinfo_decl and tinfo_from_decl.
7119 (get_typeid): Use complete_type_or_else.
7120 (build_dynamic_cast_1): Adjust calls to
7121 get_tinfo_decl_dynamic. Simplify throw_bad_cast expression.
7122 * parse.y (primary): Adjust call to build_typeid.
7123 * except.c (build_eh_type_type_ref): Adjust call to
7124 get_tinfo_decl. Mark as used.
7125 * class.c (set_rtti_entry): Adjust call to get_tinfo_decl.
7126 * decl2.c (build_expr_from_tree): Adjust call to build_typeid.
7127 * parse.c: Regenerated.
7129 2000-01-17 Mark Mitchell <mark@codesourcery.com>
7131 * class.c (fixed_type_or_null): Don't clear NONNULL. Document
7133 (resolves_to_fixed_type_p): Document calling convention.
7134 * rtti.c (build_x_typeid): Initialize NONNULL.
7136 * cp-tree.h (build_shared_int_cst): New function.
7137 * call.c (build_over_call): Use DECL_VIRTUAL_CONTEXT, for clarity.
7138 * class.c (modify_vtable_entry): Likewise.
7139 (add_virtual_function): Split out code to generated shared
7140 INTEGER_CSTs to build_share_int_cst.
7141 (modify_all_vtables): Handle all the overridden functions here.
7142 Add overridden functions from non-primary virtual bases to the
7144 (finish_struct_1): Adjust call to modify_all_vtables. Add
7145 overridden functions from non-primary bases to the vtable.
7146 * tree.c (build_shared_int_cst): New function.
7148 * cp-tree.h (scratchalloc): Remove.
7149 (build_scratch_list): Likewise.
7150 * call.c (convert_class_to_reference): Replace build_scratch_list
7151 and build_expr_list with build_tree_list.
7152 (add_candidate): Replace scratchalloc with expralloc. Note memory
7154 (build_user_type_conversion_1): Replace build_scratch_list
7155 and build_expr_list with build_tree_list.
7156 (build_new_op): Likewise.
7157 (build_op_delete_call): Likewise.
7158 (convert_like): Likewise.
7159 * cvt.c (ocp_convert): Likewise.
7160 * decl.c (start_decl): Likewise.
7161 (start_function): Likewise.
7162 (finish_destructor_body): Likewise.
7163 (maybe_build_cleanup_1): Likewise.
7164 * decl2.c (reparse_decl_as_expr): Likewise.
7165 * init.c (perform_member_init): Likewise.
7166 (expand_cleanup_for_base): Likewise.
7167 (build_builtin_delete_call): Likewise.
7168 (build_new_1): Likewise.
7169 (build_delete): Likewise.
7170 * method.c (do_build_assign_ref): Likewise.
7171 * parse.y (already_scoped_stmt): Likewise.
7172 (nontrivial_exprlist): Likewise.
7173 (net_initializer): Likewise.
7174 (initlist): Likewise.
7175 * parse.c: Regenerated.
7176 * rtti.c (build_x_typeid): Likewise.
7177 (build_dynamic_cast_1): Likewise.
7178 * typeck.c (build_x_compound_expr): Likewise.
7179 (build_static_cast): Likewise.
7180 (build_modify_expr): Likewise.
7182 * cp-tree.h (DECL_VINDEX): Add documentation.
7183 * class.c (build_vtable_entry): Likewise.
7184 (start_vtable): Add comment.
7185 (add_virtual_function): Replace pending_hard_virtuals with
7186 overridden_virtuals and pending_virtuals with new_virtuals.
7187 Replace redundant assignments with assertions.
7188 (check_for_override): Add comment.
7189 (check_bases_and_members): Replace pending_hard_virtuals with
7190 overridden_virtuals and pending_virtuals with new_virtuals.
7191 (create_vtbl_ptr): Likewise.
7192 (layout_class_type): Likewise.
7193 (finish_struct_1): Likewise. Add comments.
7195 2000-01-16 Mark Mitchell <mark@codesourcery.com>
7197 * class.c (finish_struct_1): Replace redundant code with
7200 * cp-tree.h (flag_new_abi): Move.
7201 (flag_use_cxa_atexit): Likewise.
7202 (flag_honor_std): Likewise.
7203 (flag_rtti): Likewise.
7204 (vbase_offsets_in_vtable_p): Define.
7205 (vptrs_present_everywhere_p): Likewise.
7206 (TYPE_CONTAINS_VPTR_P): Likewise.
7207 (dfs_walk_real): Declare.
7208 * class.c (build_vbase_pointer_fields): Check
7209 vbase_offsets_in_vtable_p.
7210 (dfs_build_vbase_offset_vtbl_entries): Record the vbase indices in
7212 (build_vbase_offset_vtbl_entries): Simplify.
7213 (build_vbase_offset_vtbl_entries): Adjust.
7214 (build_vbase_pointer): Add ability to look up vbase offsets in
7216 (start_vtable): New function.
7217 (add_virtual_function): Use it.
7218 (determine_primary_base): Use TYPE_CONTAINS_VPTR_P.
7219 (num_extra_vtbl_entries): Use vbase_offsets_in_vtable_p.
7220 (build_vtbl_initializer): Take the type of the complete object as
7221 input. Use it to correctly calculate vbase offsets.
7222 (dfs_finish_vtbls): Pass the complete type to
7223 build_vtbl_initializer.
7224 (check_bases_and_members): Use TYPE_CONTAINS_VPTR_P.
7225 (create_vtable_ptr): Create a vtable even if there are no
7226 new virtual functions, under the new ABI.
7227 (finish_struct_1): Likewise.
7228 (get_vfield_name): Use TYPE_CONTAINS_VPTR_P.
7229 * decl.c (exapnd_static_init): Remove call to
7230 preserve_initializer.
7231 * decl2.c (mark_vtable_entries): Tweak to handle vbase offsets in
7233 * init.c (initialize_vtbl_ptrs): Initialize them in pre-order.
7234 (expand_virtual_init): Use vbase_offsets_in_vtable_p.
7235 (construct_virtual_bases): Don't initialize virtual base pointers
7237 (build_aggr_init): Clean up comment.
7238 (expand_aggr_init_1): Likewise.
7239 * rtti.c (expand_class_desc): Store the virtual function table
7240 index where the vbase offset lives in the offset field.
7241 * search.c (dfs_walk_real): Make it global.
7242 (dfs_debug_mark): Use TYPE_CONTAINS_VPTR_P.
7243 * tree.c (make_binfo): Don't clear BINFO_VPTR_FIELD.
7245 * tinfo.h (USItype): Make it signed under the new ABI.
7246 * tinfo.cc (convert_to_base): New function. Encapsulate base
7247 conversion logic here.
7248 (__class_type_info::do_upcast): Use it.
7249 (__class_type_info::do_dyncast): Likewise.
7250 (__class_type_info::do_find_public_subobj): Likewise.
7252 * init.c (construct_virtual_bases): Don't look up the addresses of
7253 virtual bases at run-time.
7255 * class.c (build_vbase_pointer): Relocate.
7256 (build_vbase_pointer_fields): Likewise.
7257 (dfs_build_vbase_offset_vtbl_entries): Likewise.
7258 (build_vbase_offset_vtbl_entries): Likewise.
7260 * decl.c (init_decl_processing): Complain if -fnew-abi
7261 -fno-vtable-thunks is used.
7263 * decl2.c (lang_decode_option): Don't couple flag_honor_std to
7266 2000-01-15 Mark Mitchell <mark@codesourcery.com>
7268 * cp-tree.h (num_extra_vtbl_entries): New function.
7269 (size_extra_vtbl_entries): Likewise.
7270 (dfs_vtable_path_unmark): Likewise.
7271 (dfs_vtable_path_unmarked_real_bases_queue_p): Likewise.
7272 (dfs_vtable_path_marked_real_bases_queue_p): Likewise.
7273 * class.c (num_extra_vtbl_entries): New function.
7274 (size_extra_vtbl_entries): Likewise.
7275 (dfs_build_vbase_offset_vtbl_entries): New function.
7276 (build_vbase_offset_vtbl_entries): Likewise.
7277 (build_vtbl_initializer): Use it.
7278 (finish_struct_1): Adjust vtable sizes (using
7279 num_extra_vtbl_entries).
7280 * expr.c (cplus_expand_expr): Assert that the DECL_RTL for a
7281 THUNK_DECL is non-NULL before expanding it.
7282 * init.c (expand_virtual_init): Adjust the vtable pointer by
7283 size_extra_vtbl_entries before storing it.
7284 * search.c (get_shared_vase_if_not_primary): Adjust prototype.
7285 Handle TREE_LIST parameters here, not in the dfs_* functions.
7286 (dfs_unmarked_real_bases_queue_p): Adjust.
7287 (dfs_marked_real_bases_queue_p): Likewise.
7288 (dfs_vtable_path_unmarked_real_bases_queue_p): New function.
7289 (dfs_vtable_path_marked_real_bases_queue_p): New function.
7290 (dfs_vtable_path_unmark): Likewise.
7292 2000-01-14 Mark Mitchell <mark@codesourcery.com>
7294 * optimize.c (copy_body_r): Clear the operand three of a
7295 TARGET_EXPR when copying it.
7297 2000-01-14 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7299 * method.c (build_decl_overload_real): Check whether we are in ::
7300 before returning __builtin_new/delete.
7302 2000-01-13 Mark Mitchell <mark@codesourcery.com>
7304 * pt.c (tsubst_friend_function): Improve comment.
7305 (instantiate_decl): Avoid crashing when a "nested" function is
7306 instantiated from the top level.
7308 * dump.c (dqeueue_and_dump): Dump
7309 DECL_FRIEND_PSEUDO_TEMPLATE_INSTANTIATION.
7311 2000-01-13 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7313 * call.c: If GATHER_STATISTICS, declare `n_build_method_call'.
7315 2000-01-13 Nathan Sidwell <sidwell@codesourcery.com>
7317 * g++spec.c (lang_specific_driver): Add -fnew-abi if
7318 ENABLE_NEW_GXX_ABI defined.
7319 * Make-lang.in (tinfo.o, tinfo2.o, exception.o, new.o,
7320 opnew.o, opnewnt.o, opvnew.o, opvnewnt.o, opdel.o, opdelnt.o,
7321 opvdel.o, opvdelnt.o): Use GXX_ABI_FLAG switch.
7323 2000-01-12 Mark Mitchell <mark@codesourcery.com>
7325 * decl.c (start_cleanup_fn): Call pushdecl.
7327 * call.c (convert_class_to_reference): Fix typos.
7328 (build_conditional_expr): Handle errors gracefully.
7329 * class.c (push_nested_class): Likewise.
7330 * cp-tree.h (VAR_FUNCTION_OR_PARM_DECL_CHECK): New macro.
7331 (DECL_THIS_EXTERN): Use it.
7332 (DECL_THIS_STATIC): Likewise.
7333 * cvt.c (convert_to_void): Handle errors gracefully.
7334 (build_expr_type_conversion): Likewise.
7335 * decl.c (maybe_push_decl): Likewise.
7336 (start_decl_1): Likewise.
7337 (require_complete_types_for_parms): Likewise.
7338 * parse.y (structsp): Likewise.
7339 (base_class): Likewise.
7340 * parse.c: Regenerated.
7341 * pt.c (finish_member_template_decl): Likewise.
7342 * typeck.c (decay_conversion): Likewise.
7344 * cp-tree.h (dfs_skip_vbases): New function.
7345 (find_vbase_instance): Likewise.
7346 * class.c (determine_primary_base): Allow a nearly empty base to
7347 serve as a primary base class under the new ABI.
7348 (get_class_offset_1): Rename to ...
7349 (dfs_get_class_offset): ... this. Simplify. Don't issue error
7351 (get_class_offset): Use it. Issue error messages here.
7352 (dfs_modify_vtables): Rely on dfs_unmarked_real_bases_queue_p to
7353 find the right copies of virtual bases.
7354 (fixup_vtable_deltas1): Rename to ...
7355 (dfs_fixup_vtable_deltas): ... this. Adjust to handle virtual
7356 bases as primary bases.
7357 (fixup_vtable_deltas): Remove.
7358 (override_one_vtable): Handle virtual bases as primary bases.
7359 (merge_overrides): Likewise.
7360 (finish_struct_1): Likewise.
7361 (dump_class_hierarchy): Dump primary-ness of bases as well.
7362 * search.c (mark_primary_bases): Use a pre-order traversal to
7363 handle primary virtual bases.
7364 (dfs_skip_vbases): New fiunction.
7365 (expand_upcast_fixups): Adjust to handle primary virtual bases.
7366 (fixup_virtual_upcast_offsets): Likewise.
7367 (fixup_all_virtual_upcast_offsets): Likewise.
7368 (dfs_find_vbase_instances): New function.
7369 (find_vbase_instance): Likewise.
7371 2000-01-11 Mumit Khan <khan@xraylith.wisc.edu>
7373 * lex.c (DIR_SEPARATOR): Delete macro.
7375 2000-01-12 Gabriel Dos Reis <gdr@codesourcery.com>
7377 * decl2.c (lang_decode_option): Handle automatic line wrapping
7380 2000-01-11 Mark Mitchell <mark@codesourcery.com>
7382 * friend.c (do_friend): Don't resolve scopes when processing
7383 template declarations, even if the qualifying scope doesn't
7384 involve template parameters.
7386 2000-01-10 Mark Mitchell <mitchell@dumbledore.codesourcery.com>
7388 * class.c (dfs_modify_vtables_queue_p): Remove.
7389 (modify_all_vtables): Use dfs_unmarked_real_bases_queue_p
7390 and dfs_marked_real_bases_queue_p instead of
7391 dfs_modify_vtables_queue_p.
7393 * class.c (build_vbase_path): Simplify.
7394 (dfs_propagate_binfo_offsets): New function.
7395 (propagate_binfo_offsets): Use it.
7396 (remove_base_field): Simplify.
7397 (dfs_set_offset_for_vbases): Remove.
7398 (dfs_set_offset_for_shared_vbases): New function.
7399 (dfs_set_offset_for_unshared_vbases): Likewise.
7400 (layout_virtual_bases): Use them.
7401 (layout_basetypes): Don't call propagate_binfo_offsets.
7402 * search.c (dfs_get_vbase_types): Clone completely fresh binfos
7405 * class.c (build_base_field): New function, split out from ...
7406 (build_base_fields): ... here. Use it. Allocate primary bases
7407 first, under the new ABI.
7408 (get_vtable_entry): Remove.
7409 (remove_base_field): New function, split out from ...
7410 (remove_base_fields): ... here. Adjust since primary bases come
7411 first under the new ABI.
7413 * cp-tree.h (expand_direct_vtbls_init): Remove declaration.
7414 (initialize_vtbl_ptrs): New function.
7415 (expand_indirect_vtbls_init): Change prototype.
7416 (convert_pointer_to_vbase): Declare.
7417 * init.c (expand_direct_vtbls_init): Remove.
7418 (dfs_initialize_vtbl_ptrs): New function.
7419 (initialize_vtbl_ptrs): Likewise.
7420 (emit_base_init): Use initialize_vtbl_ptrs.
7421 * search.c (convert_pointer_to_vbase): Make it global.
7422 (expand_indirect_vtbls_init): Remove vtable initialization code.
7423 * semantics.c (setup_vtbl_ptr): Use initialize_vtbl_ptrs.
7425 * class.c (dfs_finish_vtbls): New function.
7426 (finish_vtbls): Use it.
7427 (dump_class_hierarchy): New function.
7429 * cp-tree.h (BINFO_PRIMARY_MARKED_P): Change definition.
7430 (BINFO_VBASE_PRIMARY_P): New macro.
7431 (BINFO_VIRTUALS): Add to documentation.
7432 (SET_BINFO_PRIMARY_MARKED_P): Remove.
7433 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7434 (dfs_mark_primary_bases_queue_p): Likewise.
7435 (dfs_unmarked_real_bases_queue_p): New function.
7436 (dfs_marked_real_bases_queue_p): Likewise.
7437 * search.c (dfs_mark_primary_bases): Adjust.
7438 (mark_primary_bases): Likewise.
7439 (get_shared_vbase_if_not_primary): New function.
7440 (dfs_unmarked_real_bases_queue_p): Likewise.
7441 (dfs_marked_real_bases_queue_p): Likewise.
7442 (dfs_get_pure_virtuals): Simplify.
7443 (get_pure_virtuals): Likewise.
7445 2000-01-10 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7447 * lex.c: Include tm_p.h.
7449 2000-01-07 Nathan Sidwell <sidwell@codesourcery.com>
7451 * lang-specs.h (__GXX_ABI_VERSION): New preprocessor macro.
7453 2000-01-06 Jason Merrill <jason@casey.cygnus.com>
7455 * decl2.c (comdat_linkage): Don't set DECL_DEFER_OUTPUT.
7456 * pt.c (instantiate_decl): Defer comdat templates that might not be
7459 * cp-tree.h (DECL_NEEDED_P): Also true if !DECL_COMDAT.
7460 * decl2.c (finish_vtable_vardecl): Don't check !DECL_COMDAT.
7461 (finish_file): Likewise.
7463 * decl2.c (import_export_class): Undo 12/14 change.
7465 * error.c (dump_decl): operator new, not operatornew.
7467 * class.c (field_decl_cmp): A nontype is "greater" than a type.
7468 * search.c (lookup_field_1): Look for the last field with the
7471 2000-01-05 Nathan Sidwell <nathan@acm.org>
7473 * decl2.c (lookup_arg_dependent): Deal with FNS not being a
7476 2000-01-05 Nathan Sidwell <nathan@acm.org>
7478 * typeck.c (build_static_cast): Don't strip target qualifiers
7479 when casting from a class.
7481 2000-01-04 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
7483 * class.c (warn_hidden): Initialize variable `fndecl'.
7485 2000-01-03 Ulrich Drepper <drepper@cygnus.com>
7487 * decl.c (flag_isoc9x): New variable to be able to use code in
7488 c-common.c. For now always zero.
7490 2000-01-03 Mark Mitchell <mark@codesourcery.com>
7492 * cp-tree.h (CLASSTYPE_VBASECLASSES): Improve documentation.
7493 * class.c (layout_basetypes): Don't set BINFO_INHERITANCE_CHAIN
7494 or unshare_base_binfos for virtual bases here.
7495 * search.c (dfs_get_vbase_types): Do it here.
7496 (get_vbase_types): Adjust.
7498 2000-01-02 Mark Mitchell <mark@codesourcery.com>
7500 * cp-tree.h (CLASSTYPE_VFIELDS): Move definition.
7501 (BINFO_PRIMARY_MARKED_P): Use flag 5.
7502 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
7503 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7504 (unmark_primary_bases): Remove declaration.
7505 (unmarkedp): Declare.
7506 (dfs_vbase_unmark): Likewise.
7507 * class.c (determine_primary_base): Return immediately if there
7508 are no base classes. Call mark_primary_bases here.
7509 (modify_all_direct_vtables): Remove.
7510 (modify_all_indirect_vtables): Remove.
7511 (dfs_modify_vtables_queue_p): New function.
7512 (dfs_modify_vtables): New function.
7513 (modify_all_vtables): Use them.
7514 (build_base_fields): Build FIELD_DECLs for primary virtual base
7516 (create_vtable_ptr): Don't call determine_primary_base here.
7517 (dfs_mark_primary_bases_and_set_vbase_offsets): Rename to ...
7518 (dfs_set_offset_for_vbases): ... this.
7519 (layout_virtual_bases): Use it.
7520 (layout_class_type): Call determine_primary_base here.
7521 * search.c (unmarkedp): Make it global.
7522 (shared_marked_p): Simplify.
7523 (shared_unmarked_p): Likewise.
7524 (dfs_primary_bases_queue_p): Remove.
7525 (dfs_unmark_primary_bases): Likewise.
7526 (unmark_primary_bases): Likewise.
7527 (mark_primary_bases): Simplify.
7528 (get_pure_virtuals): Don't call mark_primary_bases here.
7529 (dfs_vbase_unmark): New function.
7530 (get_vbase_types): Simplify.
7532 * class.c (struct base_info): Remove.
7533 (determine_primary_base): Take has_virtual_p rather than a
7534 base_info as input. Don't calculate max_has_virtual.
7535 (finish_struct_bits): Remove max_has_virtual argument.
7536 (create_vtable_ptr): Remove max_has_virtual_p argument.
7537 (layout_virtual_bases): Remove max argument.
7538 (layout_basetypes): Likewise.
7539 (layout_class_type): Remove max_has_virtual_p argument.
7540 (finish_struct_1): Remove max_has_virtual.
7542 * cp-tree.h (dfs_mark_primary_bases_queue_p): New function.
7543 (layout_basetypes): Remove.
7544 * class.c (propagate_binfo_offsets): Moved here from tree.c.
7545 Update to handle primary virtual bases.
7546 (remove_base_fields): New function, split out from
7548 (dfs_mark_primary_bases_and_set_vbase_offsets): New function.
7549 (layout_virtual_bases): New function, split out from
7550 layout_basetypes. Update to handle primary virtual bases.
7551 (layout_basetypes): Moved here from tree.c. Use
7552 remove_base_fields and layout_virtual_bases.
7553 * search.c (dfs_mark_primary_bases_queue_p): New function.
7554 (mark_primary_bases): Use it.
7555 * tree.c (CEIL): Remove.
7556 (propagate_binfo_offsets): Remove.
7557 (layout_basetypes): Remove.
7559 2000-01-01 Mark Mitchell <mark@codesourcery.com>
7561 * cp-tree.h (CLASSTYPE_N_BASECLASSES): Use BINFO_N_BASETYPES.
7562 (BINFO_PRIMARY_MARKED_P): New macro.
7563 (SET_BINFO_PRIMARY_MARKED_P): Likewise.
7564 (CLEAR_BINFO_PRIMARY_MARKED_P): Likewise.
7565 (mark_primary_bases): New function.
7566 (unmark_primary_bases): Likewise.
7567 * search.c (get_abstract_virtuals_1): Remove.
7568 (dfs_mark_primary_bases): New function.
7569 (mark_primary_bases): Likewise.
7570 (dfs_unmark_primary_bases): Likewise.
7571 (unmark_primary_bases): Likewise.
7572 (dfs_get_pure_virtuals): Likewise.
7574 2000-01-01 Mark Mitchell <mark@codesourcery.com>
7576 * cp-tree.h (skip_rtti_stuff): Adjust prototype.
7577 * class.c (skip_rtti_stuff): Reorganize parameters and return value.
7578 (modify_one_vtable): Adjust.
7579 (fixup_vtable_deltas1): Likewise.
7580 (override_one_vtable): Likewise.
7581 * search.c (get_abstract_virtuals_1): Likewise.
7582 (get_pure_virtuals): Likewise.
7583 (expand_upcast_fixups): Likewise.
7584 * tree.c (debug_binfo): Likewise.
7586 * class.c (build_vtable): Don't return a value. Don't rebuild
7587 vtables for bases that have already been handled.
7588 (prepare_fresh_vtable): Don't rebuild vtables for bases that have
7589 already been handled.
7590 (modify_one_vtable): Adjust accordingly.
7591 (fixup_vtable_deltas1): Likewise.
7592 (finish_struct_1): Likewise.
7594 2000-01-01 Martin v. Löwis <loewis@informatik.hu-berlin.de>
7596 * call.c (build_new_method_call): Also check destructors.